Skip to content
Alexandre Vicenzi edited this page Apr 21, 2020 · 9 revisions

Flex uses Pygments for code highlight and has a lot of styles ready for use.

You just need to pick up one from here and set it in your pelicanconf.py.

Example:

PYGMENTS_STYLE = "monokai"

Remember to remove .min.css from the file name.

You can see how most of the styles look like at Pygments Demo.

How to add new Styles?

Except for github all other styles are built-in from Pygments. If you want to add a new one, you need to find a Python package that is what you want or you can create your own.

After this, you can run this tool inside Flex to generate all Pygments CSS files and run gulp to minify.