.. link: .. description: .. tags: .. date: 2013/08/08 21:51:25 .. title: Customizing Nikola .. slug: customizing-nikola This “blog” is written using `Restructured Text`_ and generated by Nikola_. Simple customizations to Nikola are done by modifying files in ``files/assets/``. The files in the ``files`` directory are moved verbatim into the output. The CSS file `files/assets/css/custom.css `_ is loaded by the default theme, so simple customizations go there. The files for the theme, set in the ``conf.py`` file, are also copied into the assets directory, as documented in the `theme reference`_. Nikola has an interesting theme system, where a theme can have a parent theme. The files from the parent theme are used, unless the current theme defines the same file. The ``base.tmpl`` file is where the html pages are defined, then the other specialized templates fill in the details. To get information from the specific templates, like the ``post.tmpl``, into the base, we can put a block in ``base.tmpl``, and then set the values in the block in ``post.tmpl``. In ``base.tmpl``: .. code:: mako <%block name="extra_information">%block> In ``post.tmpl``: .. code:: mako <%block name="extra_information"> % if post.meta('use_extra_data'):