Closed petertait closed 8 years ago
Nice abstraction 🎉
👍 so does this remove the issue https://github.com/pebblecode/pebblecode.github.io/issues/85 ?
No I don't think so, you might be able to use the same technique though. For example, creating a template for video with gif fallback
which would use the same {include} markup in the markdown file.
I'll have a look into this and see if possible.
@petertait cool! I can imagine there would be some js stuff still to load in the video elements, as I think theres a check for is mobile. unless we can do a mobile first approach in someway which doesnt require js?
This adds the ability to include images and youtube videos using a single line direct into the blog post's markdown file. Added feature is the ability to also include an option caption which can double up for alt text.
Youtube
New:
{% include youtube.html id="QmAl2cg3C5U" caption="This is an excellent video" %}
Current:
<div class="video"><iframe width="532" height="400" src="//www.youtube.com/embed/QmAl2cg3C5U" frameborder="0" allowfullscreen="allowfullscreen"></iframe></div>
Image (with caption)
New:
{% include image.html url="/img/posts/2016-05-17-screen-saver/screen.gif" caption="Our Propsboard dashboard in action" %}
Current (still works, but without caption):
![Our Propsboard dashboard in action](/img/posts/2016-05-17-screen-saver/screen.gif)
Thoughts?