Skip to main content

Microdocs

PyPI Test Python Version License: MIT

Transform your Markdown files into a self-contained HTML documentation site.

Microdocs is a Python tool that converts Markdown files (like README.md and CHANGELOG.md) into a beautiful, single-page HTML documentation site with navigation, table of contents, and syntax highlighting.

✨ Zero Configuration Required - Just point it at your Markdown files and get a beautiful documentation site. No config files, no setup, no dependencies to install.

Features

  • Simple & Fast - Convert multiple Markdown files to HTML with a single command
  • Self-Contained - Generates a single HTML file with all styles embedded (only tocbot loaded from CDN)
  • Beautiful UI - Modern, clean design with Tailwind CSS and Alpine.js
  • Smart Navigation - Single-page app with tab-based navigation between sections
  • Automatic Table of Contents - Generated with tocbot with active heading tracking
  • Dark Mode - Automatic system preference detection with manual toggle
  • Syntax Highlighting - Code blocks with Pygments highlighting for both light and dark themes
  • Responsive Design - Optimized layouts for mobile and desktop
  • Zero Configuration - Works out of the box with sensible defaults
  • Customizable - Use your own HTML templates and CSS styles

Examples

See Microdocs in action with these live documentation sites:

Both sites are generated from Markdown files using Microdocs with the default template.

Installation

Using uv (recommended)

uvx microdocs

Using pip

pip install microdocs

Quick Start

Convert your README and CHANGELOG to HTML:

uvx microdocs README.md CHANGELOG.md

This creates index.html in your current directory. Open it in your browser!

Usage Examples

Basic Usage

# Convert a single file
uvx microdocs README.md

# Convert multiple files
uvx microdocs README.md CHANGELOG.md CONTRIBUTING.md

# Specify output file
uvx microdocs README.md -o docs/index.html

# Set custom title
uvx microdocs README.md --title "My Project Docs"

# Add repository link
uvx microdocs README.md --repo-url https://github.com/user/repo

Advanced Usage

# Use custom template
uvx microdocs README.md -t custom-template.html

# Combine options
uvx microdocs README.md CHANGELOG.md \
  -o dist/index.html \
  --title "My Project" \
  --repo-url https://github.com/user/repo \
  -t templates/custom.html

GitHub Actions

Automatically deploy your documentation to GitHub Pages:

- name: Build and deploy documentation
  uses: bartTC/microdocs@v1
  with:
    files: |
      README.md
      CHANGELOG.md
    title: 'My Project'

See full GitHub Actions documentation →

Template System

Microdocs uses Jinja2 templates with Vite-based builds. The default template includes:

  • Responsive Layout - Two-column design with main content and TOC sidebar
  • Page Navigation - Tab-like navigation between sections
  • Sticky TOC - Table of contents that follows you as you scroll
  • Dark Mode Ready - Automatic theme detection with manual toggle

Using Custom Templates

# Use built-in template by name
uvx microdocs README.md -t default

# Use custom template file
uvx microdocs README.md -t /path/to/custom-template.html

See full template development guide →

File Support

  • Markdown files (.md, .markdown) - Full markdown processing with extensions
  • Plain text files - Displayed with preserved formatting

Metadata

Release files for microdocs 1.2.1

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

Source distribution (sdist)

Source distribution for microdocs 1.2.1
File Size Uploaded
microdocs-1.2.1.tar.gz 69.0 kB Details

Built distribution (wheel)

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

Total release size: 93.8 kB

Release files / microdocs-1.2.1.tar.gz

Download URL microdocs-1.2.1.tar.gz
Size 69.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9166e9c0869824195068524b7f021983a54a544f732bc8c5088bc2bde48108ea
BLAKE2b-256 checksum
How to use checksums
4a8c1f6a0e6ecff154cd7948f683421b94870e879a05f0b08546f545aa305837
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / microdocs-1.2.1-py3-none-any.whl

Download URL microdocs-1.2.1-py3-none-any.whl
Size 24.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbc6506a110788980739b199847e5c223a029bafa1c49e76afab035c3094cbdd
BLAKE2b-256 checksum
How to use checksums
ec142c55238c74c175683d36292002d1725125c20981fdf049fec27b6a1a6c93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

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