mdpreview

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 15 Imported by: 0

README

mdpreview

Markdown preview server with live reload.

Usage

go install github.com/arclabs561/mdpreview@latest
mdpreview README.md

Or without installing:

go run github.com/arclabs561/mdpreview@latest README.md

Opens a local server at http://127.0.0.1:8080 with a GitHub-styled preview. The page updates automatically when the file changes on disk.

Pass a directory to browse all files with a sidebar tree:

mdpreview .                          # serve current directory
mdpreview -addr :3000 README.md      # custom port
mdpreview -debug README.md           # verbose logging

Rendering

  • GFM via goldmark (tables, task lists, strikethrough, autolinks)
  • Syntax highlighting via Shiki with github-light / github-dark themes (TextMate grammars, same as VS Code and GitHub)
  • Math via KaTeX ($inline$ and $$block$$)
  • GitHub alerts (> [!NOTE], > [!WARNING], > [!TIP], > [!IMPORTANT], > [!CAUTION])
  • GitHub Primer CSS with system dark mode detection
  • Relative images and links resolve from the markdown file's directory

Development

Rebuild the client bundle after editing client/main.ts:

make client   # requires bun or npm
make build    # or just: make

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL