Skip to main content

md2static

A lightweight command-line tool that converts Markdown files into static PDFs, Images (PNG/JPEG), or HTML with GitHub styling.

It parses the Markdown locally with cmark-gfm (the parser GitHub uses, via cmarkgfm), wraps it in github-markdown-css, and uses a headless browser (Playwright) to capture the styled output.

It is very much inspired by grip.

Install

Install with pip, pipx or uv, e.g

pip install md2static

Note that if you want to output to something different than HTML, then you would also need to install Playwright browser binaries (you only need to do this once), i.e

playwright install chromium

Example usage

HTML

md2static doc.md output.html

PDF

md2static input.md output.pdf

PNG

md2static README.md screenshot.png

License

MIT. Bundles github-markdown-css (MIT, © Sindre Sorhus), see src/md2static/static/LICENSE-github-markdown-css.

Metadata

Release files for md2static 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for md2static 0.3.0
File Size Uploaded Provenance Actions
md2static-0.3.0.tar.gz 10.8 kB With provenance Details for md2static-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for md2static 0.3.0
File Interpreter ABI Platform Actions
md2static-0.3.0-py3-none-any.whl Python 3 none any Details for md2static-0.3.0-py3-none-any.whl

Total release size: 22.3 kB

Release files / md2static-0.3.0.tar.gz

Download URL md2static-0.3.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
35ca5e457fb6c3d980c37a4ab6fca0b94a8a260e6f2f8f52bafa3e2cf5ed7593
BLAKE2b-256 checksum
How to use checksums
f056b5f8784365b3149957827860c1b0331286b301fe9c6ada0bc8bbf97d64a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / md2static-0.3.0-py3-none-any.whl

Download URL md2static-0.3.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
918e4a76dba9c422fc8e1cbdd8bb99167e5dc115cbe019515d3b05904d53a3a7
BLAKE2b-256 checksum
How to use checksums
e72052f36d5f1dfa56548501b098fe67a0f16e451702fafb927ba141e2a393b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for md2static 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for md2static-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page