Skip to main content

No project description provided

Project description

Slate

KISS, reliable, and accessible.

Slate is a lightweight Python CLI tool for converting Markdown to accessible static HTML pages, Gemtext, and Gophermaps. Designed for blogs, knowledge bases, and personal sites where simplicity is paramount.

Features

  • Semantic HTML: Converts Markdown to accessible HTML5 with semantic tags.
  • Multi-Format: Outputs to HTML, Gemini (Gemtext), and Gopher.
  • Smart Updates: intelligently updates existing files without needing to re-specify arguments.
  • Dynamic Links: Automatically converts [!MD-PAGE] links to .html in the output, keeping your Markdown portable.
  • Customizable: Integrates with Jinja2 templates and outputs CSS-ready classes.
  • Extensible: Easily add custom Markdown tokens via a registry system.

Quickstart

Install via pipx (recommended)

pipx install slate-md

Or, with pip:

pip install slate-md

Usage

Build a new page

slate build <input> <output> [flags]
  • input: Input Markdown file path.
  • output: Output file path (e.g., pages/post.html).
  • -f, --format: Output format: html (default), gemini, or gopher.
  • -T, --template: Jinja2 HTML template file (required for html output).
  • -t, --title: Optional title override; otherwise the first H1 is used.
  • -d, --description: Optional meta description for the template.

Update an existing page

Slate remembers the source file and template used to generate an HTML file.

slate update <output_file>
  • output_file: The existing HTML file to update.

You can still override the input or template if needed:

slate update output.html input.md -T new_template.html

Dynamic Links

Slate supports "Dynamic Links" to keep your Markdown navigable on GitHub/Obsidian but working correctly on your site.

Use the [!MD-PAGE] token:

Check out my [!MD-PAGE] [Latest Post](posts/latest.md)

Slate converts this to:

Check out my <a href="posts/latest.html" class="content-link">Latest Post</a>

Template Variables

Your Jinja2 templates have access to these variables:

  • {{ content }}: The rendered HTML content.
  • {{ title }}: The page title.
  • {{ description }}: The page description.
  • {{ date }} / {{ updated-date }}: Build date (DD/MM/YYYY).
  • {{ time }} / {{ updated-time }}: Build time (HH:MM).
  • {{ source-date }}: Modification date of the source Markdown file.

Why Slate?

Slate was created because many SSGs are needlessly complicated for me. Slate is a tiny tool that does one thing well: converts Markdown into accessible HTML (and other formats) using a template.

  • No Config Files: Everything is CLI arguments or embedded metadata.
  • Monolithic CSS: Designed to be used with a single CSS file.
  • Hackable: The codebase is small and easy to extend. See documentation/hacking for details.

Documentation

License

LGPL v3

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

slate_md-0.1.4.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

slate_md-0.1.4-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file slate_md-0.1.4.tar.gz.

File metadata

  • Download URL: slate_md-0.1.4.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for slate_md-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b334bc5345e8df0b18ba9c47094d22f595a494cb9925a588a2f02a1f530da20b
MD5 1453be41706bcc2c49587103f4106c7e
BLAKE2b-256 d030278a633f1d43d990a59ee1267e28ec01a66adf9d571f77ce9c280f7e8de5

See more details on using hashes here.

Provenance

The following attestation bundles were made for slate_md-0.1.4.tar.gz:

Publisher: python-publish.yml on H41L33/slate

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

File details

Details for the file slate_md-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: slate_md-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for slate_md-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6ca6d4e3e44621cf92960334231a029d634cd922557b8ba3aabd92cd78276625
MD5 8575afc55b16b015b61ecfe3ee45b3dc
BLAKE2b-256 0a7b6c8f014a08524d5fde4f31a848b5315d2e77b68df9be524e0a8da9c6526a

See more details on using hashes here.

Provenance

The following attestation bundles were made for slate_md-0.1.4-py3-none-any.whl:

Publisher: python-publish.yml on H41L33/slate

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