pythoncssstatic-sitepelican

Add CSS rules to Pelican without creating a theme


I rather like the default Pelican theme notmyidea. It serves my purposes nicely.

However, in order to implement the Python-Markdown admonishments extension, I need to add a few css rules to the template.

Nothing I can find in the documentation (or through googling) seems to explain how to do this. Only how to create a brand new theme, or use a custom style sheet, which overrides the default style sheet.

Is there a way to add a supplementary style sheet or even just a few supplementary rules?


Solution

  • Pelican allows for theme inheritance since version 3, but it seems to work only with the simple theme for some reason…

    Here are some less or more hacky ways, still without editing the theme itself: