Embedly Cards v0.2 - Markdown support now with added Markdownly goodness

Technology ?? Comments Mon 07 April 2014

I've just updated the embedly-cards Pelican plugin to version 0.2, adding markdown support; the new version can be downloaded from GitHub or PyPi (if you have already installed it via pip, it can be upgraded via pip install embedly-cards --upgrade).

Pelican tends to favour reStructuredText extensions in it's configuration (I guess due to the 'pythonic' nature of reStructuredText), and so setting up the embedly-cards markdown extension is slightly more convoluted (but still pretty simple, at only 2 lines!). Simply add the following to your pelicanconf.py file:

from embedly_cards import EmbedlyCardExtension
MD_EXTENSIONS = ['codehilite(css_class=highlight)',

As far as I can tell, defining MD_EXTENSIONS overwrites the default Pelican value, so be sure to include 'codehilite(css_class=highlight)' and 'extra' along with other markdown extensions you are currently using (otherwise you'll lose code highlighting support).

If you would like to use both the markdown and the ReST extensions, simply add 'embedly_cards' to the PLUGINS list in addition to defining MD_EXTENSIONS.


Once installed, to embed content in markdown files, simply use


where url is the url of the website containing the embeddable data. Similarly to the ReST extension, you can optionally pass the chrome parameter to force the embedded card to retain its border:


(leaving off this parameter is equivalent to passing chrome=0; i.e. the default will be to try and remove the border if supported).


Embedding an StackOverflow post:


Embedding a YouTube video with card border:


Embedding a YouTube video without card border:


Tags: pelican python