Skip to main content

No project description provided

Project description

Slate

Slate is a KISS, reliable Python CLI tool for converting Markdown to accessible static HTML pages. Perfect for blogs, knowledge bases, and personal sites.

Features

  • Converts Markdown to HTML with semantic tags

  • Supports headings, paragraphs, lists, tables, blockquotes, images, code blocks, inline code, and links

  • Parses custom Markdown callouts (e.g., [!NOTE], [!WARNING])

  • Integrates with Jinja2 templates for customizable page layout

  • Outputs HTML with CSS classes for instant theme support

  • CLI usability: specify input, template, title override, and output destination

Quickstart

bash

Install via pipx (recommended)

pipx install slate-md

Or, with pip:

pip install slate-md

Usage

Generate a static page (new CLI flags)

slate -i input.md -T template.html -o out_dir -t "Page Title" -d "Short description" -f html

  • -i, --input: Input Markdown file path.
  • -T, --template: Jinja2 HTML template file (required for html output).
  • -o, --output: Output directory to write the rendered file(s).
  • -t, --title: Optional title override; otherwise the first H1 is used.
  • -d, --description: Optional meta description for the template.
  • -f, --format: Output format: html (default), gemini, or gopher.

Examples:

  • Render HTML: slate -i mydoc.md -T page.html -o site -t "My Doc" -f html
  • Render Gemini (gemtext): slate -i mydoc.md -o out -f gemini
  • Render Gopher: slate -i mydoc.md -o out -f gopher

See test.md for supported Markdown features and examples.

Callouts, images with captions, tables, and codeblocks are rendered with modern CSS and accessibility in mind.

Limitations

  • Nested lists, nested blockquotes, and multi-line items are not fully supported

  • Complex tables with nested or block content will be flattened

  • Markdown extensions not in CommonMark spec may be ignored

  • All unsupported features are documented in the example page.

Why Slate?

slate was created because many other SSGs were needlessly complicated for simple use cases. The goal was a tiny tool that converts Markdown into accessible HTML using a template and minimal configuration.

Because of that, slate is not as feature-full as other SSGs, but it is very simple to get started with and easier to customize.

My personal website, Hailey's site, is built with slate. You can view that repository for examples of how to extend slate.

slate is designed to be used with a monolithic CSS file, and maps Markdown elements to defined CSS classes.

Feel free to fork and modify.

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.4a0.tar.gz (12.6 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.4a0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slate_md-0.1.4a0.tar.gz
  • Upload date:
  • Size: 12.6 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.4a0.tar.gz
Algorithm Hash digest
SHA256 e53ed3b1680a4288c2f7580cdbed95187f9010b9540bb2cc670213dacbc9d9ec
MD5 2a076efda989c7d86ac2503f52ace7af
BLAKE2b-256 496683276f82ae3a7b140d2c2c0e1afd9a24e229eea439a0b210c458b242b876

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: slate_md-0.1.4a0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 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.4a0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c67961bcf4ae24452eef19b7c1c6af54250d4deb7a02b3bd75e97a5c744db7e
MD5 fee025f8755d7c91f72d3876d69ee4ae
BLAKE2b-256 3d09a4cffd79583bda4f42536ef39231fdb6253f73cf23e8ab3c01d0d2ec818d

See more details on using hashes here.

Provenance

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