Skip to main content

docs-site

PyPI CI Python versions License: MIT

Turn a folder of Markdown, HTML, and PDF files into a clean, searchable, dark-mode-ready local documentation site with built-in LLM support.

Features

  • Static & Offline: Generates a self-contained static site with zero runtime server required. Works out of the box with file:/// URLs or any static host.
  • Multi-Format Processing:
    • Markdown (.md, .markdown): Rendered with syntax highlighting, tables, and admonitions.
    • HTML (.html, .htm): Formatted with isolated reader styling and link rewriting.
    • PDF (.pdf): Integrated directly with bookmark outlines and portable file bundling.
  • Fast Client-Side Search: Full-text MiniSearch indexing across titles, filenames, relative paths, headings, and body text, with "exact phrase" matching, OR logic, word* wildcards, -exclusions, type:/title:/path: qualifiers, clipboard phrase handoff (Ctrl+F / ⌘F), in-dropdown match preview cycling (‹ 1 / N › via ←/→), and keyboard navigation (↑/↓/←/→/Enter/Esc).
  • LLM-Ready Workflows:
    • Copy Page: One-click button in the header toolbar copies the active page's clean, structured Markdown to your clipboard.
    • Standardized llms.txt: Automatically creates llms.txt index and llms-full.txt corpus following the llmstxt.org standard.
    • CLI Pipe: Dump clean Markdown directly to stdout for CLI piping (e.g. docs-site docs/ --dump | llm).
  • Responsive Navigation & TOC: Sidebar shows document titles with base filenames, collapses into an off-canvas drawer on narrow screens (< 850px), and keeps the "On this page" Table of Contents accessible in a header popover between 850px and 1149px.
  • Dark Mode: Built-in dark/light theme toggle, synchronized across framed documents and welcome screen.
  • Zero Configuration: Recursively scans folders while automatically ignoring .git, .venv, node_modules, and hidden directories.

Installation

Install globally as a CLI tool using uv:

uv tool install docs-site

Alternatively, install with pipx:

pipx install docs-site

Or with plain pip, ideally inside a virtual environment:

pip install docs-site

Usage

Build and Browse

# Build and open the site in your default browser
docs-site ~/notes/linux-learning

# Specify a custom output directory (default is <folder>/_site)
docs-site ~/notes/linux-learning -o ~/public_html/docs

# Build without automatically opening the browser
docs-site ~/notes/linux-learning --no-open

# Skip generating llms.txt and llms-full.txt
docs-site ~/notes/linux-learning --no-llms-txt

# Choose how document titles are resolved:
#   auto     (default) HTML <title>/<h1>, Markdown <h1>, PDF metadata, then file stem
#   h1       First <h1> / PDF outline heading, falling back to file stem
#   filename Always use the file stem
docs-site ~/notes/linux-learning --title-source filename

# Display version
docs-site --version

# View all options
docs-site --help

CLI Reference

Option Description
folder Folder or single file to scan (.md, .markdown, .html, .htm, .pdf)
-o, --output DIR Custom output directory (default: <folder>/_site)
--no-open Build the static site without launching the browser
--no-llms-txt Skip generating llms.txt and llms-full.txt
--title-source {auto,h1,filename} Control how primary document titles are resolved (default: auto)
--dump Print clean Markdown to stdout instead of building a site
--file TARGET Relative path or filename to print when using --dump
--version Show installed docs-site version and exit

Search Syntax

Search requires all terms by default (AND), and supports Google-style operators:

Syntax Behavior Example
term1 term2 Match documents containing both terms docker compose
"exact phrase" Match exact consecutive words (also scopes dropdown previews, counts, and highlights) "Map of France"
OR Match either branch (must be uppercase OR; lowercase or stays a regular term) docker OR podman
word* Trailing prefix wildcard anywhere in the query config* container
-term / -"phrase" Exclude documents containing a term or exact phrase install -legacy -"old api"
type:<fmt> Filter by format (html/htm, md/markdown, pdf; also supports -type:...) type:pdf "Map of France"
title:<query> Restrict term, word*, or "phrase" to document titles title:"Getting Started"
path:<query> Restrict term, word*, or "phrase" to relative file paths and filenames path:guides/docker*

CLI Pipe Workflow (LLMs & Tooling)

You can pipe clean Markdown straight to tools like llm without creating a site directory or launching a browser:

# Dump entire corpus as consolidated Markdown
docs-site ~/notes/linux-learning --dump | llm "summarize these notes"

# Dump a specific file
docs-site ~/notes/linux-learning --dump --file guide.md | llm "explain section 2"

# Dump a single file directly
docs-site ~/notes/linux-learning/guide.pdf --dump | llm "extract key concepts"

Project Scope & Constraints

  • Supported Formats: .md, .markdown, .html, .htm, and .pdf files.
  • Portable Output: All generated pages, markdown artifacts, and referenced PDFs are copied into the output directory, making -o <custom-dir> self-contained.
  • Clean Rebuilds: Output pages/ directory is cleanly recreated on rebuilds to eliminate stale files from deleted sources.
  • Indexing Cap: Indexed full text is capped at 400,000 characters per file in the manifest to keep client-side memory lightweight.

Contributing

Looking to work on docs-site itself? See CONTRIBUTING.md for the development setup, testing, and architecture overview.

License

This project is licensed under the MIT License.

Metadata

Release files for docs-site 0.4.0

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

Source distribution (sdist)

Source distribution for docs-site 0.4.0
File Size Uploaded Provenance Actions
docs_site-0.4.0.tar.gz 49.8 kB With provenance Details for docs_site-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for docs-site 0.4.0
File Interpreter ABI Platform Actions
docs_site-0.4.0-py3-none-any.whl Python 3 none any Details for docs_site-0.4.0-py3-none-any.whl

Total release size: 98.4 kB

Release files / docs_site-0.4.0.tar.gz

Download URL docs_site-0.4.0.tar.gz
Size 49.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ffdf3e6b5f42ddd28664891ccb2e516058058181643489ae5e81db4d29242be4
BLAKE2b-256 checksum
How to use checksums
b879cfd0e65fa37b7ef4fb084cc04eec8ebeb0785e913b2cf93f3b5a7cb0dc46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Release files / docs_site-0.4.0-py3-none-any.whl

Download URL docs_site-0.4.0-py3-none-any.whl
Size 48.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac3313f00b79d1bb888eea562a3cffedf42e68cdb121318b1311b07423957340
BLAKE2b-256 checksum
How to use checksums
876f731066104ad81fcf1e805cc5a9cf06abee9db263376115231d472755f532
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Security for docs-site 0.4.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for docs_site-0.4.0.tar.gz

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 Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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