-
Notifications
You must be signed in to change notification settings - Fork 88
Installation
Markdown Viewer is a browser-based Markdown editor and viewer that can run as a static web app, a self-hosted Docker site, a Cloudflare deployment with optional sharing features, or a Neutralino desktop app. Choose the setup that matches how you want to open, read, edit, preview, and export Markdown files.
| Target | Requirements |
|---|---|
| Local web | Modern browser and a local HTTP server. |
| PWA/offline web | HTTPS or localhost for Service Worker support. |
| Docker | Docker Engine and port access to the container. |
| Cloudflare sharing/live | Cloudflare Pages, SHARE_KV, and LIVE_ROOMS Durable Object bindings. |
| Desktop build | Node.js/npm, Neutralino binaries, and internet access during setup/prepare. |
Do not rely on file:// for normal use. Web Workers and Service Workers can be blocked from local files.
From the repository root:
python -m http.server 8080or:
npx serve . -p 8080Open http://localhost:8080.
This runs the editor, split live preview, sync scrolling, local storage, local .md file imports, exports, PWA registration, and CDN-loaded renderers. Cloudflare-only features such as stored Share Snapshot and Live Share require their matching deployed endpoints.
Using the published image:
docker run -d \
--name markdown-viewer \
-p 8080:80 \
--restart unless-stopped \
ghcr.io/thisis-developer/markdown-viewer:sha-15eafb0Open http://localhost:8080.
Using Compose from the repository root:
docker compose up -dTo rebuild from local source:
docker compose up -d --buildThe Docker image serves static files with Nginx. It does not magically provide Cloudflare KV or Durable Objects; deploy those separately if you want stored Share Snapshot or Live Share.
Serve at least these root files:
index.htmlscript.jsstyles.csspreview-worker.jssw.jsmanifest.jsonassets/
For Cloudflare Pages with stored Share Snapshot and Live Share, also deploy:
functions/api/share/[[id]].jsfunctions/live-room/[[room]].jsworkers/live-room-worker.jswrangler.tomlwrangler.live-room.toml
If you host under a sub-path, test worker, service-worker, manifest, and dynamic library paths carefully.
Share Snapshot storage needs a KV namespace bound as SHARE_KV.
Live Share needs a Durable Object binding named LIVE_ROOMS using the LiveRoom class from workers/live-room-worker.js.
Deploy the live room worker with:
wrangler deploy -c wrangler.live-room.tomlThen deploy the Pages project with wrangler.toml or your Cloudflare Pages configuration. See Live Share Cloudflare and Configuration.
From desktop-app/:
npm install
npm run setup
npm run devBuild release resources and binaries with:
npm run buildWhat setup does:
- Downloads Neutralino binaries.
- Runs
prepare.js. - Copies the root app into
desktop-app/resources. - Downloads and verifies external libraries where integrity values are available.
- Rewrites dynamic renderer library paths to local
/libs/...files. - Prepares bundled renderer and export libraries for local desktop loading after setup.
The desktop app uses native open/save dialogs for Markdown and HTML files, asks before closing, and can load a Markdown file passed as a command-line argument.
Web/PWA:
- First load requires the app shell and any needed CDN libraries.
- After caching, the app shell and previously fetched CDN libraries can work offline.
- Features that require live network access still need it: GitHub import, stored Share Snapshot, Live Share, remote diagram rendering, external images, and map tiles.
Desktop:
- The prepared desktop bundle uses local libraries in
resources/libs. - Local editing, rendering, and export features are available without CDN access after preparation.
- Network features still use the network when invoked.
Windows desktop binaries may trigger SmartScreen because they are unsigned. Choose More info, then Run anyway if you trust the build.
Linux binaries may need execute permission:
chmod +x markdown-viewer-linux_x64
./markdown-viewer-linux_x64macOS binaries may need quarantine removal:
xattr -d com.apple.quarantine markdown-viewer-mac_universal
chmod +x markdown-viewer-mac_universal
./markdown-viewer-mac_universalWiki Home · Open Markdown Viewer · Repository · Releases · Report an Issue
Markdown Viewer documentation · Apache-2.0 License · Maintained by ThisIs-Developer
Get Started
Deploy & Configure
Project
Open Markdown Viewer
Markdown Viewer Repository
Releases
Report an Issue