Live-render GitHub-flavored markdown files and folders
Project description
markserv
markserv is a small FastAPI-based markdown preview server for local docs.
It uses:
cmarkgfmfor GitHub-flavored markdown renderingFastAPIfor the local web appFastHXfor HTMX-aware FastAPI renderinghtmyfor Python component-based HTML renderinggithub-markdown-cssfor GitHub-like stylingwatchfilesfor live reloadignoretreeto respect.gitignorerules while scanning
Install
Once published:
uv tool install markserv
For local development:
uv tool install .
Usage
Serve a directory of markdown files:
markserv docs/
Serve a single markdown file:
markserv README.md
Run the built-in synthetic demo site:
markserv.demo
Options:
markserv .
markserv --host localhost --port 4422 .
markserv --no-open README.md
markserv.demo --no-open --port 9001
Behavior
- Renders common markdown extensions like
.mdand.markdown - Watches markdown files and reloads the browser when content changes
- Respects
.gitignorewhile scanning so ignored trees like.venv/are skipped - Serves linked local assets like images from the same file tree
- In directory mode, shows a sidebar for browsing multiple markdown pages
- Includes a system/light/dark theme control that remembers your choice in browser storage
Development
Install dev tooling:
make install
Common commands:
make format
make format-check
make lint
make typecheck
make test
make all-ci
Notes
- This is intended for plain markdown / GFM-style docs, not MDX.
- UI components are rendered with
htmyfrom Python. - Front-end assets live under
src/markserv/public/. - Bundled CSS comes from
github-markdown-css. - Bundled HTMX assets are used for SSE-driven live updates.
- The upstream stylesheet license is included at
src/markserv/public/licenses/github-markdown-css.LICENSE. - The bundled HTMX license is included at
src/markserv/public/licenses/htmx.LICENSE.
Project details
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 markserv-1.0.0.tar.gz.
File metadata
- Download URL: markserv-1.0.0.tar.gz
- Upload date:
- Size: 48.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 |
1b4968ef6317dfaa9ef9d6e64107ec69f6b0be4a2e3cddda5dd5369a42196648
|
|
| MD5 |
64750b07bc5a830fd55d98069ebd8455
|
|
| BLAKE2b-256 |
f93e682fecf1f2a3412b414ffa6864d738f8acd2952bf32fd04a62dca9944cf3
|
Provenance
The following attestation bundles were made for markserv-1.0.0.tar.gz:
Publisher:
release.yml on nathan-gage/markserv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
markserv-1.0.0.tar.gz -
Subject digest:
1b4968ef6317dfaa9ef9d6e64107ec69f6b0be4a2e3cddda5dd5369a42196648 - Sigstore transparency entry: 1269118517
- Sigstore integration time:
-
Permalink:
nathan-gage/markserv@3a60e903c948c9e4120f9081f3b8bdde41585734 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/nathan-gage
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3a60e903c948c9e4120f9081f3b8bdde41585734 -
Trigger Event:
push
-
Statement type:
File details
Details for the file markserv-1.0.0-py3-none-any.whl.
File metadata
- Download URL: markserv-1.0.0-py3-none-any.whl
- Upload date:
- Size: 58.3 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 |
84b8a9b16d8112a4cfb16481dc7cbfb49916c43a59faf44c14c5e9763511a118
|
|
| MD5 |
8faa803246cca29871b3ffa474b392cf
|
|
| BLAKE2b-256 |
e3a1f4a862ba5189f50198283a5582cae35543a84c487ad2801df543ecbe3b22
|
Provenance
The following attestation bundles were made for markserv-1.0.0-py3-none-any.whl:
Publisher:
release.yml on nathan-gage/markserv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
markserv-1.0.0-py3-none-any.whl -
Subject digest:
84b8a9b16d8112a4cfb16481dc7cbfb49916c43a59faf44c14c5e9763511a118 - Sigstore transparency entry: 1269118719
- Sigstore integration time:
-
Permalink:
nathan-gage/markserv@3a60e903c948c9e4120f9081f3b8bdde41585734 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/nathan-gage
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3a60e903c948c9e4120f9081f3b8bdde41585734 -
Trigger Event:
push
-
Statement type: