A simple static site generator
Project description
Barium
A simple static site generator.
Jekyll is undocumented, and Flask feels a bit too bulky when all you need is a simple static site, so Barium aims to be the best of both worlds.
Barium generates static HTML pages from Markdown files and Jinja templates. And that's it. You get a folder of clean, static files and you can host them however and wherever you like. After all, it's a static site generator, not a static site deployer.
It also includes a really simple HTTP server to help you preview your site during development, but please don't use it in production.
Documentation
Installation
To get started, run pip install BariumSSG. You can then just run barium build to build all pages and barium serve to start the development server.
Building pages
Barium reads files from the import directory, puts them in a template, and saves the output HTML files in the export directory. Static files (i.e., all files other than Markdown) are not processed but just copied.
Templates
You can set which template to use in a file's front matter (YAML) by setting the template property to a file name (including file extension). If no template is provided, Barium tries to use the default_template that is configured in the config.yaml file. If that file also doesn't exist, Barium will not use any template.
The templates can be every file extension that Jinja supports. Inside the template, you can use the following variables through the page-dict:
- All front matter properties
path: the complete path of the fileslug: the name of the filecontent: the HTML content of the page- All the global template variables set in the config file
Please view the Jinja template documentation for docs about the templates and its syntax.
Configuration
You can configure the following settings in the config.yaml file. If a setting is not set, the default/fallback value will be used.
| Setting | Description | Default/fallback |
|---|---|---|
import_dir |
The directory where the Markdown files are located | ./source |
export_dir |
The directory where the HTML files should be built | ./build |
template_dir |
The directory where the template files are located | ./templates |
template_vars |
A dictionary of template variables that are available in all templates | {} |
default_template |
The template that should be used if no template is specified in the front matter or if the file has no front matter at all. | default.jinja |
port |
The port where the files should be served | 8000 |
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bariumssg-0.1.5.tar.gz.
File metadata
- Download URL: bariumssg-0.1.5.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbb1df5677d83b4d092fcf817de7cc8c9bd6193a42833047786585c97880e886
|
|
| MD5 |
500d02841aff1d547c93a04b8d7b9ee6
|
|
| BLAKE2b-256 |
b5ffe6aa41ed834906db2a44f4310310b1fc08f4b784fc9e57998dc5f1bf36be
|
Provenance
The following attestation bundles were made for bariumssg-0.1.5.tar.gz:
Publisher:
python-publish.yml on Gijs6/Barium
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bariumssg-0.1.5.tar.gz -
Subject digest:
dbb1df5677d83b4d092fcf817de7cc8c9bd6193a42833047786585c97880e886 - Sigstore transparency entry: 211462992
- Sigstore integration time:
-
Permalink:
Gijs6/Barium@4644cfc333bd106a1e49b78661fabd01d6b0fe74 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/Gijs6
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4644cfc333bd106a1e49b78661fabd01d6b0fe74 -
Trigger Event:
release
-
Statement type:
File details
Details for the file bariumssg-0.1.5-py3-none-any.whl.
File metadata
- Download URL: bariumssg-0.1.5-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51a32d3fbe0f0c1d74458181fe37f2ae70d5037590af73a333e951fd75d901ed
|
|
| MD5 |
314b2ba27f0b2a0939b764168cc712d9
|
|
| BLAKE2b-256 |
7eaa99037773e98bf22658cd2d85ae3ffda065f95f7b4d18f1d6880bcfc4b3bd
|
Provenance
The following attestation bundles were made for bariumssg-0.1.5-py3-none-any.whl:
Publisher:
python-publish.yml on Gijs6/Barium
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bariumssg-0.1.5-py3-none-any.whl -
Subject digest:
51a32d3fbe0f0c1d74458181fe37f2ae70d5037590af73a333e951fd75d901ed - Sigstore transparency entry: 211462995
- Sigstore integration time:
-
Permalink:
Gijs6/Barium@4644cfc333bd106a1e49b78661fabd01d6b0fe74 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/Gijs6
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4644cfc333bd106a1e49b78661fabd01d6b0fe74 -
Trigger Event:
release
-
Statement type: