Skip to content

View all your Markdown docs in one place — across repos, branches, and folders. Single binary, zero config.

License

Notifications You must be signed in to change notification settings

CageChen/markhub

Repository files navigation

MarkHub

CI codecov License Go Version

In the AI era, documentation lives across multiple repositories and branches — design docs on feature-x, API specs on main, architecture notes on v2-refactor. MarkHub brings them all into a single, beautiful web interface.

Point it at any number of local repos and git refs to instantly browse Markdown files with live hot-reload, syntax highlighting, and a premium reading experience. Zero configuration, single binary, just run and read.

Features

  • 📁 Multi-Folder Support - Serve multiple directories simultaneously with custom aliases
  • 🌿 Git Ref Browsing - Browse any branch, tag, or commit without checking it out
  • GFM Support - Full GitHub Flavored Markdown with tables, task lists, and more
  • 🎨 Syntax Highlighting - Beautiful code blocks with automatic language detection
  • 🔥 Hot Reload - Live updates via WebSocket when files change
  • 🌓 Dark / Light Theme - Optimized light and dark themes
  • 🧘 Zen Mode - Distraction-free reading (Ctrl+Shift+Z)
  • 🚀 Single Binary - No external runtime required, all assets embedded

Installation

One-line install (Linux / macOS):

curl -sSfL https://raw.githubusercontent.com/CageChen/markhub/master/install.sh | sh

Go install (requires Go 1.24+):

go install github.com/CageChen/markhub/cmd/markhub@latest

Build from source:

git clone https://github.com/CageChen/markhub.git
cd markhub
make build

Docker:

docker build -t markhub .
docker run -p 8080:8080 -v $(pwd)/docs:/docs markhub

Quick Start

markhub --path ./docs --open

Configuration

MarkHub loads config from ~/.config/markhub/config.yaml or ./markhub.yaml (use --config to override):

folders:
  - path: ./docs
    alias: Documentation
  - path: ./projects/web/notes
    alias: Web Notes
    exclude: ["drafts/**", "temp/**"]       # folder-level excludes
  - path: /home/user/my-repo
    alias: "my-repo (main)"
    git_ref: main                           # browse a git branch
    sub_path: docs                          # only serve a subdirectory
port: 8080
theme: dark
watch: true
extensions:
  - .md
  - .markdown

# global excludes — dependency dirs contain thousands of .md files from packages
exclude:
  - node_modules
  - .git
  - .svn
  - vendor

# repo-level excludes (applied to all refs of the same repo)
repo_exclude:
  /home/user/my-repo:
    - "internal/**"

Run ./bin/markhub --help for all CLI options.

License

MIT License - see LICENSE for details.

About

View all your Markdown docs in one place — across repos, branches, and folders. Single binary, zero config.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors