Jinja2 SSG
A very simple static site generator.
- The filesystem structure in
--srcis copied into--dest. - Files and folders starting with
_are skipped. - By default only html, txt, js files are used and the rest of them are skipped.
- YAML files can be used to provide data inside templates.
python3 -m pip install jinja2ssg
python3 -m jinja2ssg --src src --dest publish build
Example
site/src/
├── _base.html
├── _social_links.yaml
├── donate
│ └── index.html
├── _footer.html
├── index.html
└── _nav.html
Results in a DEST structure like:
site/www/
├── index.html
└── donate
└── index.html
Common patterns
- Run with
inotifyto rebuild on source file changes.inotifywait --recursive --monitor --format "%e %w%f" \ --event modify,move,create,delete ./src \ | while read changed; do echo $changed (python3 -m jinja2ssg build) done
- Put social links inside
_social.yamlfiles and access as{{ yaml._social.facebook }} - Access all build paths using
{{ build_paths }}. Useful while writing service worker code to cache the site as a PWA. - Access
{{ relative_path }}to know the path of the current file being rendered.
Metadata
Release files for jinja2ssg 0.2.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 | Provenance | Actions |
|---|---|---|---|---|
| jinja2ssg-0.2.0.tar.gz | 3.6 kB | Without provenance | Details for jinja2ssg-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jinja2ssg-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for jinja2ssg-0.2.0-py3-none-any.whl |
Total release size: 7.8 kB
Release files / jinja2ssg-0.2.0.tar.gz
| Download URL | jinja2ssg-0.2.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
839597470422134c1b5324f0da4c337592e48f1aa07551b6b484559bbd012974
|
|
BLAKE2b-256 checksum How to use checksums |
5a52bbd1c39b0f008bdea440d21ecd7356535e1bdabb88993d22996d9978906f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.11.4 Linux/5.4.0-172-generic
|
Release files / jinja2ssg-0.2.0-py3-none-any.whl
| Download URL | jinja2ssg-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0cf6a760f490c5afe6aa416a7b27eb196796e030ca87038e73a21093773a26d3
|
|
BLAKE2b-256 checksum How to use checksums |
843257a7b7f668d8e261131829f75077695e726708138635ab7dbc1898750c1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.11.4 Linux/5.4.0-172-generic
|
Security for jinja2ssg 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.