Syrinx
Syrinx is a super simple python package for generating a static website
Example
pip install syrinx
touch content/index.md
syrinx .
python -m http.server -d dist
Conventions
Organize your content with some standard structure and syrinx will interpret it.
Content
- a
content/
directory with markdown fileindex.md
- Toml style frontmatter: Markdown files start with a standard header or "frontmatter" that is surrounded by triple pluses
+++
. - in content directories other than root,
index.md
is optional. Leaving it out signifies that you do not want a separate page build for this branch. - Special frontmatter entries:
SequenceNumber
: Used by templates to order child items in menu's and lists.Archetype
: The name of the template used to import these table data
Templating and style
- Templates are written in jinja2 and go into the
theme/templates/
directory. - The default template used is
page.jinja2
. If a template is found matching the name of the node (e.g.foo.jinja2
), orroot.jinja2
for the top-most page, this takes precedence. - CSS, images and other assets go into
theme/assets/
.
Table Data
Syrinx can generate content (markdown) files from CSV tables in the data/
directory.
- The archetype file used will be based on the filename of the data file.
- Each row is considered one record.
- The header (1st) row will be used as keys.
- The first column is used as name for the content item.
- Each column will be converted to a variable in the front matter