gh-md-to-html
Feature-rich Github-flavored Markdown to html python and command line interface.
What it is and what it does
gh-md-to-html is a Python module and command-line tool that converts Markdown to HTML, primarily targeting GitHub-flavored Markdown. It can use GitHub's online Markdown API (requiring internet) or operate offline with a mode designed to closely imitate GitHub's behavior. The package extends any underlying markdown converter with features like image downloading and optimization, LaTeX formula support, PDF export, emoji shortcode expansion, table-of-contents generation, and GitHub-style CSS styling.
The tool is designed mainly for static site generation from markdown files—particularly useful for GitHub Actions workflows or static site builders—but works for any markdown-to-HTML task. It handles non-ASCII characters, manages image caching and responsive sizing via srcset, and creates root-relative links. Dependencies include Pillow, beautifulsoup4, emoji, requests, shellescape, and webcolors for image processing, HTML parsing, and styling.
Use it for:
- Convert README.md files to standalone HTML pages for static documentation sites or GitHub Pages.
- Batch convert markdown homework or assignment files to PDF with formula support and image embedding.
- Generate styled HTML from markdown in CI/CD pipelines using offline mode without external service calls.
- Optimize and cache images referenced in markdown while maintaining correct relative links in output HTML.
- Create table-of-contents-enabled HTML documents from markdown with LaTeX formula rendering.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts GitHub-flavored Markdown to HTML with support for offline conversion, image optimization, LaTeX formulas, PDF export, and emoji shortcodes.
Yes, with conditions. The package is stable and has no known vulnerabilities, with low install friction. However, it is dormant—no updates in 788 days—so compatibility with current versions of its dependencies is unverified. Install if you need GitHub-flavored markdown conversion with image optimization and formula support and can tolerate potential drift; avoid if you require active maintenance.
Install
gh-md-to-html on PyPI
pip
pip install gh-md-to-htmluv
uv add gh-md-to-htmlpoetry
poetry add gh-md-to-htmlInstalling gh-md-to-html
Before you install
Low install friction with a pure-Python wheel distribution. The package is dormant (788 days since last release) but remains functional; maintenance status suggests no active development, though the repository is not archived.
License in practice
License treatment is unclear—the package includes a LICENSE.txt file but provides no SPDX identifier. Review the license file directly before use in proprietary or restricted contexts.
Quickstart
pip install gh-md-to-html
from gh_md_to_html import main
main(['input.md', 'output.html'])
Offline conversion requires LaTeX and dvisvgm installed; PDF export requires pdfkit. Online conversion requires internet access to GitHub's Markdown API.
Verify before relying
- Whether the package's offline conversion mode truly matches GitHub's current markdown behavior after 788 days of dormancy.
- Compatibility with modern versions of Pillow, beautifulsoup4, and requests given the long time since last release.
- Whether formula rendering via Codecogs EqnEditor still works reliably without documented API changes.
Package facts
| License | LICENSE.txt (unclear) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — Pillow, beautifulsoup4, emoji, requests, shellescape, webcolors |
| Maintenance | dormant — 788 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 176,396/month — #10,243 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gh_md_to_html-1.21.3-py3-none-any.whl
Tags
More HTML packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
lxmllxml provides Python bindings to libxml2 and…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
MarkdownConverts Markdown text to HTML using a Python…
permissive · top 1,000 on PyPI
py-gfmConverts GitHub-Flavored Markdown to HTML using…
permissive · top 15,000 on PyPI
md2pdfConverts Markdown files to PDF with custom CSS…
permissive · top 15,000 on PyPI
multimarkConverts Markdown to HTML, LaTeX, groff man,…
permissive · top 15,000 on PyPI
markdown-pdfConverts markdown text to PDF files, with…
agpl · top 15,000 on PyPI
imgkitimgkit wraps the wkhtmltoimage command-line…
permissive · top 15,000 on PyPI
wkhtmltopdfWraps the wkhtmltopdf command-line tool to…
permissive · top 15,000 on PyPI
cmarkgfmConverts CommonMark and GitHub-flavored…
permissive · top 15,000 on PyPI
nbconvertnbconvert converts Jupyter notebooks (.ipynb…
permissive · top 1,000 on PyPI
markdown-to-confluenceConverts Markdown files to Confluence Storage…
permissive · top 5,000 on PyPI
markdownifyConverts HTML to Markdown, with fine-grained…
permissive · top 1,000 on PyPI