Markdown Viewer is a browser-based Markdown editor and viewer that can run as a static web application, a self-hosted Docker site, a Cloudflare deployment with optional sharing features, or a Neutralino desktop application. 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/media/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 view, live Preview, sync scrolling, local storage, local .md file imports, exports, PWA registration, and CDN-loaded renderers. The default local client sends consented managed-media uploads to the production image/media API. Other Cloudflare-only features such as stored Share Snapshot and Live Share require their matching deployed endpoints.
An individual local Markdown import is limited to 10 MB. See Features: Known Technical Limits for the other enforced limits.
- Open the application over HTTPS or
localhost. - Wait for the first page load and Service Worker registration.
- Use the browser's Install or Add to Home Screen action.
- Launch the installed application once while online and open any renderer you expect to use offline so its CDN libraries can be cached.
The PWA is offline-capable, not fully offline on first use. Network-backed sharing, import, media, remote diagrams, external assets, and map tiles always need connectivity.
Using the published image:
docker run -d \
--name markdown-viewer \
-p 8080:80 \
--restart unless-stopped \
ghcr.io/thisis-developer/markdown-viewer:latestOpen 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.
Known limitation: The checked-in root
Dockerfiledoes not copypreview-worker.jsorsample.md, whilesw.jsexpects both during critical precache. The stock image can use main-thread Preview fallback, but large-Document Worker rendering and PWA/offline installation are incomplete. This documentation audit does not change Docker behavior. See Docker Deployment.
Serve at least these root files:
index.htmlworkspace-storage.jsscript.jsstyles.csspreview-worker.jssw.jssample.mdmanifest.jsonassets/
For Cloudflare Pages with managed media, stored Share Snapshot, and Live Share, also deploy:
functions/api/image/[[id]].jsfunctions/api/media/[[id]].jsfunctions/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.
Managed media and Share Snapshot storage need a KV namespace bound as SHARE_KV. Their records use separate key prefixes.
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 and Configuration.
Published desktop binaries are available from GitHub Releases. Use a published build for a stable release, or build from main when you need to test changes that have not yet been released.
From desktop-app/:
npm install
npm run devBuild the seven self-contained platform binaries with:
npm run buildThe results are written to desktop-app/dist/markdown-viewer/. Each Windows,
Linux, and macOS binary embeds the application resources, so users can download
only the file matching their operating system and architecture.
The development and build commands run setup automatically. Setup:
- 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.
See Desktop Application for output names, native permissions, and platform launch notes.
The desktop application 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: managed media upload, 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_universalRun quarantine-removal commands only for a binary you trust.
- Docker documentation
- Cloudflare Pages Functions
- Cloudflare Workers KV
- Cloudflare Durable Objects
- Neutralinojs documentation
These upstream pages describe their platforms. Markdown Viewer-specific commands, bindings, and limitations remain documented in this Wiki.
- Open a local
.mdfile smaller than 10 MB. - Switch among Editor, Split view, and Preview.
- Render one client-side fence such as
mermaidand one remote fence such asgraphvizif remote rendering is intended. - Export Markdown and HTML.
- Confirm Service Worker registration only on HTTPS or localhost.
- For Cloudflare, create a stored Share Snapshot and test a Live Share room from a second browser profile.
- For desktop, test native open/save and verify that
os.execCommandremains unavailable in the default build.
If a check fails, use Troubleshooting.