A simple static website generator
Project description
sssimp :snake:
Simple Static Site Inductor Made in Python
Why?
I wanted a simple way to generate static websites and I like Jinja2. I had previous experiences working with Jekyll but it seemed like too much work to setup everytime and overkill for the job as it supports many features I don't necessarily use.
Installing
pip install sssimp
How to use
Create a folder called input
, it will hold the data to generate the site.
Running python -m sssimp
will generate content in the output
folder.
Generators
-
Files placed in
input/content
will be directly copied to theoutput
folderExample:
input/content/favicon.png
->output/favicon.png
-
HTML files with the suffix .html placed in
input/content
will be parsed as Jinja2 templates, they can use templates defined ininput/templates
.
See the Jinja2 documentationExample:
input/content/index.html
->output/index.html
Starting with content{% extends "base.html" %} ...
Will use the template
input/templates/base.html
-
CSS files in
input/css
will be merged together in a single fileoutput/bundle.css
-
Markdown files with the suffix .md placed in
input/content
will be parsed to HTML and passed to a template with the same name as their parent folder as the parametermarkdown
Example:
./input/content/post/hello-world.md
->./output/post/hello-world.html
Using the template./input/templates/post.html
Generated with context{'markdown': 'the markdown file converted to HTML'}
The template name can be overriden using the markdown meta argument "template"
Example:
./input/content/post/special.md
->./output/post/special.html
Starting with content--- template: special.html --- ...
Will use the template
./input/templates/special.html
instead ofpost.html
Examples
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sssimp-0.0.6.tar.gz
.
File metadata
- Download URL: sssimp-0.0.6.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f305595236a612696427bab41c53ba0b063c9844515271067c566a44c2628c5 |
|
MD5 | 2841acf7ca19d8a626f2303515be56b1 |
|
BLAKE2b-256 | a43073cf8314c9c24bd4312326362ee85f369cd159efeacb619483941b0c945e |
File details
Details for the file sssimp-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: sssimp-0.0.6-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34a5d21d18bffeefe919c03127e743ebecc998eac3b81191b19571e44b40c5b4 |
|
MD5 | f3c891503b21da15bf500a8b62b9fa58 |
|
BLAKE2b-256 | 1774d93178d482425485ad0dab9555000b92024aa6aaf53c37b752163c6b8717 |