skillfed

gh-md-to-html

Feature-rich Github-flavored Markdown to html python and command line interface.

gh-md-to-html v1.21.3 176.4K downloads/30d#10,243 on PyPI117
License unclear LICENSE.txt DORMANT released

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-html

uv

uv add gh-md-to-html

poetry

poetry add gh-md-to-html

Installing 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

Programming Language :: Python :: 3

Tags

markdown to html convertergithub flavored markdownoffline markdown conversionmarkdown to pdfstatic site generator markdownlatex formula in markdownimage optimization markdown
markdown-to-htmlstatic-site-generationoffline-conversion

More HTML packages