Skip to main content

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:

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 .md and .markdown
  • Watches markdown files and reloads the browser when content changes
  • Respects .gitignore while 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 htmy from 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

markserv-1.0.0.tar.gz (48.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

markserv-1.0.0-py3-none-any.whl (58.3 kB view details)

Uploaded Python 3

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

Hashes for markserv-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1b4968ef6317dfaa9ef9d6e64107ec69f6b0be4a2e3cddda5dd5369a42196648
MD5 64750b07bc5a830fd55d98069ebd8455
BLAKE2b-256 f93e682fecf1f2a3412b414ffa6864d738f8acd2952bf32fd04a62dca9944cf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for markserv-1.0.0.tar.gz:

Publisher: release.yml on nathan-gage/markserv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for markserv-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84b8a9b16d8112a4cfb16481dc7cbfb49916c43a59faf44c14c5e9763511a118
MD5 8faa803246cca29871b3ffa474b392cf
BLAKE2b-256 e3a1f4a862ba5189f50198283a5582cae35543a84c487ad2801df543ecbe3b22

See more details on using hashes here.

Provenance

The following attestation bundles were made for markserv-1.0.0-py3-none-any.whl:

Publisher: release.yml on nathan-gage/markserv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page