gnrt - lightweight, fast and extensible static site generator
About
A lightweight static site generator written in Python.
Features:
- Markdown-based content
- Frontmatter support
- Jinja2 templating
- Optional YAML-based configuration
Usage
gnrt.py
It will look for an optional config.yml file in the current directory, optional Jinja2 templates in the templates folder, markdown files in the content folder, then write the generated output files in the public folder, while respecting the content folder and sub-folders structure.
Configuration
Configuration is stored in config.yml. Any key-value pair is allowed. These keys can be used in the content and template files.
---
sitename: My awesome blog
baseurl: https://example.com/
language: en
foo: bar
If the config.yml file exists, gnrt.py will look for the defaults and lists entries.
Defaults
This is where you define default configuration values, which can be overriden in content files.
Example:
defaults:
template: default.j2
bar: foo
Lists
This is where lists of content are defined, allowing the generation of lists of links for instance.
Example:
lists:
nav1:
filter:
key: category
value: page
template: nav-page.j2
nav2:
filter:
key: category
value: article
sort: published
reverse: true
template: nav-article.j2
rss:
filter:
key: category
value: article
sort: published
reverse: true
template: rss.j2
target: public/rss.xml
Example
See the example website in docs/example.
Metadata
Release files for gnrt 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gnrt-0.1.0.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gnrt-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.6 kB
Release files / gnrt-0.1.0.tar.gz
| Download URL | gnrt-0.1.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d943f4f65c05d05f78a188fa4799f6e290e805e41eb31ca00659b563a30a639b
|
|
BLAKE2b-256 checksum How to use checksums |
d7dccf8e111ce947613c4ef97996183a861235a67d73b984c4d03a3143d73fd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.1 requests-toolbelt/0.8.0 tqdm/4.46.1 CPython/3.8.2
|
Release files / gnrt-0.1.0-py3-none-any.whl
| Download URL | gnrt-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2c19b0a6f56c97ac53e20e1fc8569372829b266626f98c4b0fcafc3e404d38d
|
|
BLAKE2b-256 checksum How to use checksums |
e9063cc6966021dcfe85dc6f2854b95da0402aafa9090293f743c41a143bb6a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.1 requests-toolbelt/0.8.0 tqdm/4.46.1 CPython/3.8.2
|