chiark / gitweb /
doc: mention that even the Pelican theme itself needs m.htmlsanity.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 24 Oct 2017 15:31:41 +0000 (17:31 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 24 Oct 2017 15:32:25 +0000 (17:32 +0200)
Well. That makes it a bit harder to adopt now :/

doc/pelican/theme.rst

index 10e40ec5e2ee877c13f6793f59c8644442f4263a..a045ef664e6d3a20fa878309caf82a8daec64744 100644 (file)
@@ -54,7 +54,9 @@ subdir of your ``m.css`` submodule), then you tell it to put the static
 contents of the theme into a ``static/`` directory in the root of your
 webserver; the ``CSS_FILES`` variable is a list of CSS files that the theme
 needs. You can put there any files you need, but there need to be at least the
-files mentioned on the `CSS themes <{filename}/css/themes.rst>`_ page.
+files mentioned on the `CSS themes <{filename}/css/themes.rst>`_ page. Lastly,
+the theme uses some Jinja2 filters from the `m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_
+plugin, so that plugin needs to be loaded as well.
 
 .. code:: py
 
@@ -64,6 +66,9 @@ files mentioned on the `CSS themes <{filename}/css/themes.rst>`_ page.
                  '/static/m-dark.css']
     DIRECT_TEMPLATES = ['index']
 
+    PLUGIN_PATHS += ['m.css/pelican-plugins']
+    PLUGINS += ['m.htmlsanity']
+
 Here you can take advantage of the ``pelicanconf.py`` and ``publishconf.py``
 distinction --- use ``m-dark.css`` for local development and override the
 :py:`CSS_FILES` to use the smaller, faster and more compatible ``m-dark.compiled.css``