pebblecode / pebblecode.github.io

Jekyll powered pebblecode.com site
5 stars 5 forks source link

Videos #85

Open export-mike opened 8 years ago

export-mike commented 8 years ago

How can we load up videos in a more declarative way?

At the moment, we have markdown for page content. then use IDS in divs etc to determine what video to place in the given element. this requires code to be added for every video we have on the site.

We could improve this by having something like:

markdown file

  video-url: 'path/to/video.mp4'
  mobile-video-gif: 'path/to/image.gif'

corresponding handlebars template would have:

<div data-video-url="{videoUrl}" data-video-mobile-gif="{mobileVideoUrl}"> 
</div>

thoughts suggestions?