Another static site generator.
https://en.wikipedia.org/wiki/William_Gilbert_(astronomer)
This README contains a brief introduction to the project. Full documentation is available here.
Install gilbert: (** Not currently published **)
$ pip install gilbert
Or install from GitHub:
$ pip install git+https://github.com/funkybob/gilbert.git
Create a gilbert project:
$ gilbert --root mysite init
(You can omit --root
if it's the current directory.)
Create page files in mysite/pages/
Render your site:
$ gilbert --root mysite render
Have gilbert watch your files, and re-render on changes:
$ gilbert --root mysite watch
Finally, list all loaders and plugins:
$ gilbert --root mysite plugins
Gilbert current requires Python 3.7 or greater.
In order to install this package you need a recent version of setuptools
(>41.0.1
), to ensure this please run:
pip install -U pip
pip install -U setuptools
Each project contains 4 directories:
-
templates/
These are templates available to Content Objects, using the
stencil
template system. -
pages/
This is the hierarchy of pages to be rendered on the site.
-
content/
This contains other content objects to be made available to all pages on the site to include in their templates.
-
docs/
This is where the site distributable content are rendered into.
Content objects are basically YAML files, with a single YAML document, optionally followed by additional raw content.
The default Content Object is Data
which simply provides access to the data
in the YAML document.
The Page
content object is the default type for documents in the pages/
collection. It will render using the template defined in its data, or the
'default.html' template.
Gilbert supports auto-discovered plugins. They simply need to be packages existing in the namespaced package 'gilbert.plugins'.
By default, the following Plugins are provided:
-
yaml
Registers a loader for .yml and .yaml files.
-
markdown
An extension of
Page
which renders itscontent
using Markdown -
scss
Renders its content using SCSS