justint / papaya

A clean Zola theme for blogging and projects.
https://justintennant.me/papaya/
MIT License
45 stars 24 forks source link

Added shortcode for embedding YouTube videos at 16:9 #17

Open moppius opened 1 year ago

moppius commented 1 year ago

I figured it'd be nice to support YouTube embeds neatly out-of-the-box - please point me in the right direction if this is already supported and I missed it!

Example project .md would look like this, nice and simple:

# Teaser trailer

The footage for this trailer was all captured in real-time at 30fps using ray-traced reflections in an internal prototype engine.

{{ youtube(id="LXo0WdlELJk") }}

Ends up looking something like this: image

You can also supply a custom class argument if you want to style it further.

moppius commented 1 year ago

I recommend squashing & merging this if you accept it, since I messed up the spacing and had to make two commits! 🤦