GitHub-style Markdown viewer
Project description
๐ Markdown Viewer (GitHub-Style)
A GitHub-style Markdown viewer for local docs, with file tree, search, and live reload.
A local Markdown documentation browser that:
- Renders
.mdfiles with GitHub-flavored styles - Displays a recursive file/folder tree
- Supports live plain-text filtering (client-side)
- Supports filename/content search using
fdorrg - Auto-reloads edited files
- Dark/light mode toggle
- Export/Print to PDF
- Breadcrumb navigation with folder/file icons
- Highlights current file in tree and auto-expands
๐ Preview
mdviewer opens a clean, local browser UI to view Markdown files โ with a collapsible file tree, file filtering, fuzzy search, and full-text content search built in.
๐ Installation
๐ง Option 1: Homebrew (macOS/Linux)
brew tap biaojiang/mdviewer
brew install biaojiang/mdviewer/mdviewer
๐ Option 2: Python (via pip)
pip install mdviewer
Optionally add an alias:
echo 'alias mdv="mdviewer"' >> ~/.zshrc
source ~/.zshrc
# or symlink
sudo ln -s $(which mdviewer) /usr/local/bin/mdv
๐ง Option 3: Build from Source
# Install Python deps
pip install -r requirements.txt
# Optional: use a venv
python -m venv .venv
source .venv/bin/activate
# Install tools if needing advanced search
brew install fd ripgrep
# or
sudo apt install fd-find ripgrep
# โถ๏ธ Run the Server
python app.py
Open [http://127.0.0.1:5000](http://127.0.0.1:5000/) in your browser.
๐ ๏ธ Usage
mdviewer [PATH] or mdv [PATH]
# e.g.:
mdv # to start in current directory, there will be a warning if no README.md found
mdv .
mdv /path/to/README.md
mdv
๐ Features
- โ
GitHub-style rendering via
markdown-it-py+ GitHub CSS - โ
Auto-expandable file tree using
<details> - โ Live filtering with reset button
- โ
Backend-powered search:
fd: fuzzy filename matchingrg: content search
- โ Flask-based local webserver
- โ MathJax support for LaTeX
- โ
Reload current buffer on changes (with
livereload) - โ Font Awesome icons for folders/files
- โ Breadcrumb that reflects navigation path
- โ Highlight + auto-expand tree for active file
- โ PDF/Print export button with clean print CSS
๐ File Structure
.
โโโ docs
โ โโโ math
โ โโโ math-test.md
โโโ pyproject.toml
โโโ README.md
โโโ requirements.txt
โโโ screenshot.png
โโโ src
โโโ mdviewer
โ โโโ __init__.py
โ โโโ app.py
โ โโโ cli.py
โ โโโ search
โ โ โโโ __init__.py
โ โ โโโ __pycache__
โ โ โโโ fd_search.py
โ โ โโโ rg_search.py
โ โโโ static
โ โ โโโ script.js
โ โ โโโ style.css
โ โโโ templates
โ โโโ index.html
โ โโโ search.html
โ โโโ viewer.html
โโโ
๐ Search Modes
fd: fuzzy filename match (fast)rg: full-text content match (powerful)
โ๏ธ Keyboard & UI
- ๐ Dark/light toggle
- โจ๏ธ Live tree filter with reset
- ๐ Expandable nested folders
- ๐ Click to render
.mdfile in browser - ๐จ Export/Print to PDF button
- ๐ Breadcrumb with Font Awesome icons
- ๐ Highlight + expand tree for active file
โญ๏ธ Next Steps
๐ License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mdviewer-0.3.1.tar.gz.
File metadata
- Download URL: mdviewer-0.3.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98cf74ddc8b3b75f9de00ac012f5110fa7937bd928728201fd00b25c9b1d1e42
|
|
| MD5 |
894aa74ce8ce129abb06cfa17d84dc8e
|
|
| BLAKE2b-256 |
3acee28a3de27afedb03691337897efe96a370b1e0155d0a740be3673089bef1
|
Provenance
The following attestation bundles were made for mdviewer-0.3.1.tar.gz:
Publisher:
python-publish.yml on biaojiang/mdviewer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdviewer-0.3.1.tar.gz -
Subject digest:
98cf74ddc8b3b75f9de00ac012f5110fa7937bd928728201fd00b25c9b1d1e42 - Sigstore transparency entry: 1679203579
- Sigstore integration time:
-
Permalink:
biaojiang/mdviewer@2429f044163456c4af20c4d9906df0b2215ae282 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/biaojiang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2429f044163456c4af20c4d9906df0b2215ae282 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mdviewer-0.3.1-py3-none-any.whl.
File metadata
- Download URL: mdviewer-0.3.1-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e660e255b3e44d00e0b907668d20e353eeaeb880eee1f2e2d84b13f0779ed81e
|
|
| MD5 |
a89f4bce7a2a8dc70bb97d7406a26d82
|
|
| BLAKE2b-256 |
25e6db4c1949e0ea1738e7fb7d8df4e532c8be860ac90eb3f9871af7a1ba9e58
|
Provenance
The following attestation bundles were made for mdviewer-0.3.1-py3-none-any.whl:
Publisher:
python-publish.yml on biaojiang/mdviewer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdviewer-0.3.1-py3-none-any.whl -
Subject digest:
e660e255b3e44d00e0b907668d20e353eeaeb880eee1f2e2d84b13f0779ed81e - Sigstore transparency entry: 1679203745
- Sigstore integration time:
-
Permalink:
biaojiang/mdviewer@2429f044163456c4af20c4d9906df0b2215ae282 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/biaojiang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2429f044163456c4af20c4d9906df0b2215ae282 -
Trigger Event:
release
-
Statement type: