Skip to main content

A simple static site generator

Project description

Barium

The Barium logo

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 please don't use it in production.

Documentation

To get started, run pip install BariumSSG. You can then just run barium build and barium serve.

Barium reads files from the import directory, processes them with templates, and saves the output HTML files in the export directory. Files other than markdown are just copied.
You can set which template to use in a file's front matter by setting the template to a file name (including file extension) property. If no template is provided, Barium tries to use default.jinja.
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 file
  • slug: the name of the file
  • content: the HTML-content of the page
  • All the global template variables set in the config file

You can confige settings in the config.yaml file.

Property Description Standard value
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 dictonary of template vaiables that are avaiable in all templates {}

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

bariumssg-0.1.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bariumssg-0.1.3-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file bariumssg-0.1.3.tar.gz.

File metadata

  • Download URL: bariumssg-0.1.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bariumssg-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5bc349883c5b193d3b9262e6b9036a028beb4d9bcf26636494b815502f653a84
MD5 4661c66608c241bf114e558744242476
BLAKE2b-256 8730f7ee7a6d3bdd70390d1b3d71417b236e1f0930e6f92923b59e290f0e1306

See more details on using hashes here.

Provenance

The following attestation bundles were made for bariumssg-0.1.3.tar.gz:

Publisher: python-publish.yml on Gijs6/Barium

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bariumssg-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: bariumssg-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bariumssg-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f9b8285067da1b09f023743fd37daf4fa0309933902c762050744cab8b8042ae
MD5 4d7acb55592ae6bd94c1bb6b0eba4f1e
BLAKE2b-256 498bd24418843f1529a3caec6c823a597313d3f3fac788567610b8db8a88a403

See more details on using hashes here.

Provenance

The following attestation bundles were made for bariumssg-0.1.3-py3-none-any.whl:

Publisher: python-publish.yml on Gijs6/Barium

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page