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.5.tar.gz (22.8 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.5-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slate_md-0.1.5.tar.gz
  • Upload date:
  • Size: 22.8 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.5.tar.gz
Algorithm Hash digest
SHA256 79abc17ac7395afe536c74ba1123fd80a70bb1b02e0fe9d8605296149e0fc89b
MD5 794efc8b493049509efe6e0da31b1c87
BLAKE2b-256 e9937a66bd97105c3be19e451f0a8f68dd7c169a5a184eda4033d60b1881138e

See more details on using hashes here.

Provenance

The following attestation bundles were made for slate_md-0.1.5.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.5-py3-none-any.whl.

File metadata

  • Download URL: slate_md-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 23.1 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 32835f9f16522e26e8c8eac7f640e5a925a1ba0b720efba0c0edfbe7b66a6bd7
MD5 7f71929cb57d57b56f747899e8526d74
BLAKE2b-256 2a2ec8ecc3786743fcd6e3b8e495986bc9a30122d0ce0ce00082e56318b5b799

See more details on using hashes here.

Provenance

The following attestation bundles were made for slate_md-0.1.5-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