Pelican YouTube is a plugin to enabled you to embed YouTube videos in your pages and articles.
To install pelican-youtube, simply install it from PyPI:
$ pip install pelican-youtube
Then enabled it in your pelicanconf.py
PLUGINS = [
# ...
'pelican_youtube',
# ...
]
In your article or page, you simply need to add a line to embed you video.
.. youtube:: VIDEO_ID
Which will result in:
<div class="youtube" align="left">
<iframe width="420" height="315" src="https://www.youtube.com/embed/VIDEO_ID" frameborder="0"></iframe>
</div>
You can also specify a width, height and alignment
.. youtube:: 37818131
:width: 800
:height: 500
:align: center
Which will result in:
<div class="youtube" align="center">
<iframe width="800" height="500" src="https://www.youtube.com/embed/37818131" frameborder="0"></iframe>
</div>
MIT license.