Markdown Processing



At the very basic level, Bestatic simply uses Python-Markdown to process all the markdown files. Python-Markdown is very close to the reference implementation of Markdown and hence you can simply write in any standard markdown format and most likely it will be processed correctly. An extensive documentation on Python-Markdown is available here and here.

In Bestatic, you have the Attribute Lists, Tables, Meta Data, and Fenced Code Blocks extensions of Python-Markdown enabled by default.

We also have enabled CodeHilite extension which provides nice looking syntax highlighting options in the pages with Pygments. These linked pages provide information on how you can choose a particular color theme for your syntax highlighting and how you can generate your own CSS file for that (styles.css; this needs to be included in the static/css folder of your theme).

Importantly, we have included the markdown-customblocks extension in Bestatic which is a great tool that provides a common markup for parametrizable and nestable components. Without any effort, you can generate nice looking blocks: These can be admonition/call-out blocks, images, Instagram posts, YouTube videos, Mastodon posts, etc. See Built-in generators to get started quickly.

We have also enabled emoji support in Bestatic out of the box using PyMdown Extensions emoji. We have adopted Twemoji emoji set (as emoji provider) and SVG (as output). While full list of emojis that are supported can be found in the source code, any standard emoji shortcode (such as the shortcodes available on emoji cheat sheet or this GitHub gist) should work.