Page templates

SWAG uses the Jinja2 template system to generate the html pages from the rst files. A template is simply a canvas for your webpage made of css and pseudo html files containing Jinja instructions.

It is possible to use different templates depending of the type of page you are writting. For example, if you check your theme/templates folder you will see that the default theme comes with two main templates: page.html and index.html, both inherinting from base.html. The main difference is that with the index.html template there will be no submenu displayed. When writting a rst file you can specify which template you want to be used for rendering by using the tag :template: followed by the name of the template. By default, SWAG will use index.html for the index page of the website and page.html for any other page.

If you are familiar html/css it should be easy for you to modify the default theme or create your very own one. All you need to do is to save your files in the theme folder of your website direcotry for SWAG to use them.