/markhtml

Markdown to HTML with TOC based on markdown headings

Primary LanguagePythonMIT LicenseMIT

Markdown to HTML

CircleCI PyPI version Pypi PyPI license Code style: black Downloads

Markdown to HTML converter. Converts a Markdown file into an HTML file formed of two columns:

  • TOC (left-column)
    • An auto generated Table of Contents based in the markdown headings
  • Markdown content (right-column)

example

Install

  1. Create virtualenv.
python3 -m venv ~/.virtualenvs/markhtml
  1. Activate venv.
source ~/.virtualenvs/markhtml/bin/activate
  1. Install requirements.
pip install -r requirements.txt

Usage

To convert example.md using src/markhtml.py path-to-markdown-file.md generates example.html

src/markhtml.py examples/example.md
Generated file: examples/example.html

Notes

Uses python-markdown with TOC extension.