Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced blog post media #89

Merged
merged 3 commits into from
May 17, 2016
Merged

Enhanced blog post media #89

merged 3 commits into from
May 17, 2016

Conversation

petertait
Copy link
Member

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?

@markdurrant markdurrant merged commit 46b0672 into master May 17, 2016
@shapeshed
Copy link
Member

Nice abstraction 🎉

@export-mike
Copy link
Member

👍 so does this remove the issue #85 ?

@petertait
Copy link
Member Author

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.

@export-mike
Copy link
Member

export-mike commented May 17, 2016

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants