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

Uploaded Python 3

File details

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

File metadata

  • Download URL: slate_md-0.1.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a9a54525b4e0cb1da38ed4d60346496f81f72f5ba63054ad5561ff93b01e9150
MD5 7aa711623cd7e957672c2e50076a6b45
BLAKE2b-256 c8720e09c13cb6380ada7bebdfd9e2de4e8610ccf78b67b53b192fe4f3938879

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: slate_md-0.1.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8039259fbd9e750d332b5ca12d122d4b0b067e224c06cbd4451308d21192464
MD5 4a6ebc5855ac05e2d4527d43962a9bc7
BLAKE2b-256 564f15eea92b1a870d27414c9d589f7c8bca4428ba8384d83d6d7fbee5296107

See more details on using hashes here.

Provenance

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