md2static
A lightweight command-line tool that converts Markdown files into static PDFs, Images (PNG/JPEG), or HTML using the official GitHub Markdown API for pixel-perfect styling.
It leverages GitHub's API to parse the Markdown into HTML, wraps it in the official GitHub 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
md2static input.md output.pdf
PNG
md2static README.md screenshot.png
License
MIT
Metadata
Release files for md2static 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| md2static-0.2.0.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| md2static-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.1 kB
Release files / md2static-0.2.0.tar.gz
| Download URL | md2static-0.2.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9963a2a589ffb00fe3dbec75175d402c0839ef023022f08217a34a998ddf29e6
|
|
BLAKE2b-256 checksum How to use checksums |
229624cc2b44d21fd8afef8794e80a10b78b4a128a0ffbb3bc726cf1150bdc06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 27, 2026.
Transparency logRelease files / md2static-0.2.0-py3-none-any.whl
| Download URL | md2static-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98b90783f0b85108f55d9e6ce7f84139a51be4a4bfd84344d9ec5f429f6fe780
|
|
BLAKE2b-256 checksum How to use checksums |
5dc52f492e61f3c7bc16dbdd783176223321a68a522474bdcd16034d9ea07a89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 27, 2026.
Transparency log