Some sites are made by template engine Jinja2.
See more about Jinja2 template syntax.
Site structrue example:
Personal Site is built based on Twitter Bootstrap framework.
personal_site
- static # static resources directory
- partials # sub-templates directory
- base.html # base template
- index.html # template
- gallery.html # template
- config.json # site configuration file
Please go to config.py
and set sites['site-id']['templates']
list to specify which templates'll be rendered.
-
For all of sites
Fill the
params
variable in theconfig.py
. -
For a site
There are three ways to specify template parameters:
- Fill the
sites['site-id']['params']
variable in theconfig.py
- Add configuration into site
config.json
'sglobal
dictionary. - Provide by command line's
--params
option, e.g.,a=1;b=2
- Fill the
-
For one template of a site
Add configuration into site
config.json
'slocal
dictionary, using template path as key.
All of files and directories in the site's static
will be copied into the generated site top-level directory.