Markdown Viewer
Live: spskelly.github.io/markdown-viewer
Repo: GitHub
What It Does
A lightweight PWA that registers as your system’s default .md file handler. Install it from the browser, set it as default, and double-clicking any markdown file renders it instantly, no editor, no terminal, no internet required.
Features
- System file handler, registers for
.mdand.markdownfiles via the File Handling API (Chromium) - Tabbed viewing, open multiple files simultaneously and switch between them
- Syntax highlighting, 100+ languages via highlight.js
- Mermaid diagrams, flowcharts, sequence diagrams, Gantt charts rendered inline
- Dark/light mode,
Ctrl+Dto toggle, preference persisted - Drag and drop, drop files directly onto the window
- Keyboard shortcuts, full shortcut set accessible via
? - Print-friendly, clean print stylesheet
- Offline, service worker caches all assets after first visit
Why It Exists
There isn’t a good lightweight, dedicated markdown viewer out there. Most options are heavy editors, clunky browser extensions, or terminal tools. This fills the gap, double-click and get instant rendering.
Technical Details
The entire app is 5 files: index.html, app.js, styles.css, manifest.json, service-worker.js. ~1,700 lines total. No build step, no bundler, no framework. Vanilla JavaScript with the Web File Handling API for system integration and a cache-first service worker for offline support.