A standalone macOS markdown viewer. SwiftUI shell, WKWebView rendering core. Built with Swift 6 strict concurrency, targeting macOS 14.0.
Fully offline: every engine (highlight.js, KaTeX, mermaid) and all fonts are bundled -- no CDN, no network access at runtime. A document opened in airplane mode renders math, diagrams, and highlighted code exactly as online.
- Live markdown rendering -- pure-Swift markdown to HTML pipeline, unit-tested
- Syntax highlighting for 40+ languages (bundled highlight.js)
- Math -- LaTeX via bundled KaTeX with all fonts inlined as data URIs
- Diagrams -- Mermaid flowcharts, sequence, gantt, etc. (theme-aware)
- Outline sidebar with live heading highlight and click-to-navigate
- Live reload -- edits in your editor appear instantly; scroll position preserved
- Themes -- System / Light / Dark, live re-theme including code and diagrams
- Find in page -- Cmd-F with result counts and Cmd-G / Cmd-Shift-G cycling
- Navigation -- relative links open in-app with Cmd-[ / Cmd-] history; external links hand off to Safari
- Self-contained export -- PDF (paginated, letter-size) and single-file HTML (fonts + engines inlined) that work fully offline
- Zoom -- Cmd-= / Cmd-- / Cmd-0, persisted across launches
- Native window tabs -- merge windows into tabs, geometry restored
- Open anything -- double-click .md in Finder, Cmd-O, Open Recent, or from the command line: open -a MarkView notes.md
- Frontmatter -- YAML frontmatter shown as a styled header card
- Task lists, tables, blockquotes, images -- standard GitHub-flavored markdown
- macOS 14.0 or later
- Xcode 15+ (Swift 6 toolchain with strict concurrency)
# SwiftPM is the build system; build-app.sh assembles a runnable MarkView.app
bash build-app.sh debug # builds + assembles ./MarkView.app (ad-hoc signed)
open ./MarkView.appRun tests:
swift test # 121 testsOn hosts that restrict SwiftPM's own sandbox (e.g. a DSH-style sandbox), append
--disable-sandbox --scratch-path .build.build-app.shhandles this and the Xcode-beta env automatically. GitHub Actions runs the plain commands via.github/workflows/ci.yml.