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

Or, with pip:

pip install slate

Usage

Generate a static HTML page

slate input.md page.html -t "Page Title" -o output_dir -n index.html

  • input.md: Input markdown.
  • page.html: HTML template.
  • -t "Page Title": Title override, slate will use the first H1 as the title otherwise.
  • -o output_dir: Output directory.
  • -n index.html: Output filename.

See test.md for all supported content types.

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 since I found other SSGs (Static Site Generators) to be needlessly complicated for my usage. All I needed to do was take some Markdown, and create HTML with correct classes, divs, etc, based on a template and a CSS file.

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

My personal website link is created with slate. You can view the GitHub repo of that website to get an idea 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, modify, etc.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: slate_md-0.1.3.tar.gz
  • Upload date:
  • Size: 7.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.3.tar.gz
Algorithm Hash digest
SHA256 434b2d57957ffa9badbe89d7cec46aa9e7194ba8e81258e1ef30171191d83077
MD5 d0e80fd8bd25e900c09298cc51ed1808
BLAKE2b-256 1b302fdcac30afd7da10023c78fb1b52a170928594a7c26803991d71bf87266b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: slate_md-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 242dd7884a4e5029a9b86765044a1eae2d4f7d3b9637d5bf7809a284d7a6cd4f
MD5 d5ab51e8a42ef781798a5ba7c7585eb0
BLAKE2b-256 5782057ec5b12140fb2d0a8a4a32952ab0e349606bed6c24d9ff58821f6566a8

See more details on using hashes here.

Provenance

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