A single-file Markdown viewer that reads a file and renders it to a GitHub-quality view. Parsing is done in Rust (comrak), while only the runtime-dependent parts — diagrams, code highlighting, math — are handled by the system WebView.
See SPEC.md for the full design.
- GFM rendering: paragraphs, headings, lists, tables, task lists, strikethrough, autolinks, footnotes, blockquotes, horizontal rules
- Code block syntax highlighting (highlight.js, GitHub theme)
- Mermaid diagrams (flowchart, sequence, gantt, class, etc.)
- KaTeX math (
$...$,$$...$$,```mathblocks) - Light/dark theme (follows OS setting, togglable, Mermaid theme synced)
- Table of contents (TOC) side panel
- Font settings: body/code font, size, line-height (persisted)
- Relative-path image loading (relative to the Markdown file)
- Live reload on file change
- Open by drag-and-drop
- Remembers window position/size, configurable minimum size
- Internal anchor (
#heading) scrolling (external links are not opened)
All client assets (mermaid, highlight.js, KaTeX, styles) are embedded in the binary and work offline.
Only the Rust stable toolchain (rustup) is required. No commercial compiler is needed.
cargo build --release
# Output: target/release/mdmonster(.exe) — a single executablePrebuilt binaries (Windows/macOS/Linux) are available as GitHub Actions artifacts.
# Open a file passed as an argument
mdmonster README.md
# Run without arguments to show the open dialog
mdmonsterYou can also drag and drop a .md (.markdown, .mdown, .mkd) file onto the window.
| Button | Action |
|---|---|
| 📂 | Open file |
| 📑 | Toggle table of contents (TOC) panel |
| 🌓 | Switch theme (light → dark → auto) |
| A− / A+ | Decrease / increase font size |
| 🔤 | Toggle font settings (body/code font, line-height) panel |
| Shortcut | Action |
|---|---|
Ctrl + |
Increase font size |
Ctrl - |
Decrease font size |
Ctrl 0 |
Reset font size to default (16px) |
Theme, font, and window state are saved to mdmonster.toml. Save path priority (portable first + OS fallback):
- If
mdmonster.tomlexists next to the executable or that directory is writable, use it (portable mode) - Otherwise fall back to the OS standard config path
- Windows:
%APPDATA%\mdmonster\mdmonster.toml - macOS:
~/Library/Application Support/mdmonster/mdmonster.toml - Linux:
~/.config/mdmonster/mdmonster.toml
- Windows:
theme = "auto" # "auto" | "light" | "dark"
[font]
body_family = "" # empty uses the default font stack
code_family = ""
size = 16 # px
line_height = 1.6
[window]
# x, y, width, height are saved/restored automatically on exit (physical pixels)
min_width = 960 # minimum window size (logical pixels)
min_height = 520A missing or corrupted file falls back to defaults.
Using the system WebView keeps the binary small and distribution simple.
- Windows: WebView2 runtime (built into Windows 11; recent Windows 10 as well)
- macOS: WKWebView (OS built-in)
- Linux: WebKitGTK (
libwebkit2gtk-4.1)
Rust · tao (windowing) · wry (WebView) · comrak (GFM parsing) · notify (file watching) · rfd (dialogs) · rust-embed (asset embedding)
단일 실행파일로 동작하는 Markdown 뷰어. 파일을 읽어 GitHub 수준으로 렌더링하여 표시한다. 파싱은 Rust(comrak)에서 수행하고, 다이어그램·코드 강조·수식 등 런타임이 필요한 부분만 시스템 WebView에서 처리한다.
자세한 설계는 SPEC.md를 참고한다.
- GFM 렌더링: 문단·제목·목록·표·태스크리스트·취소선·자동링크·각주·인용·수평선
- 코드 블록 구문 강조 (highlight.js, GitHub 테마)
- Mermaid 다이어그램 (flowchart, sequence, gantt, class 등)
- KaTeX 수식 (
$...$,$$...$$,```math블록) - 라이트/다크 테마 (OS 설정 추종, 토글 가능, Mermaid 테마 연동)
- 목차(TOC) 사이드 패널
- 폰트 설정: 본문/코드 글꼴, 글자 크기, 행간 (설정 영구 저장)
- 상대 경로 이미지 로드 (Markdown 파일 기준)
- 파일 변경 자동 감지 후 재렌더링 (라이브 리로드)
- 파일 드래그 앤 드롭으로 열기
- 창 위치/크기 기억 및 최소 크기 설정
- 내부 앵커(
#heading) 스크롤 이동 (외부 링크는 열지 않음)
모든 클라이언트 자산(mermaid, highlight.js, KaTeX, 스타일)은 바이너리에 내장되어 오프라인에서 동작한다.
Rust stable 툴체인(rustup)만 있으면 된다. 상용 컴파일러는 불필요하다.
cargo build --release
# 산출물: target/release/mdmonster(.exe) — 단일 실행파일미리 빌드된 바이너리는 GitHub Actions의 아티팩트(Windows/macOS/Linux)에서 받을 수 있다.
# 파일을 인자로 열기
mdmonster README.md
# 인자 없이 실행하면 열기 다이얼로그 표시
mdmonster창에 .md(.markdown, .mdown, .mkd) 파일을 드래그 앤 드롭해도 열린다.
| 버튼 | 기능 |
|---|---|
| 📂 | 파일 열기 |
| 📑 | 목차(TOC) 패널 토글 |
| 🌓 | 테마 전환 (light → dark → auto) |
| A− / A+ | 글자 크기 줄이기 / 키우기 |
| 🔤 | 폰트 설정(본문/코드 글꼴, 행간) 패널 토글 |
| 단축키 | 기능 |
|---|---|
Ctrl + |
글자 크게 |
Ctrl - |
글자 작게 |
Ctrl 0 |
글자 크기 기본값(16px)으로 복원 |
테마·폰트·창 상태가 mdmonster.toml에 저장된다. 저장 경로 우선순위(휴대용 우선 + OS 폴백):
- 실행파일과 같은 디렉터리에
mdmonster.toml이 있거나 쓰기가 가능하면 그 파일을 사용 (휴대용 모드) - 그렇지 않으면 OS 표준 설정 경로로 폴백
- Windows:
%APPDATA%\mdmonster\mdmonster.toml - macOS:
~/Library/Application Support/mdmonster/mdmonster.toml - Linux:
~/.config/mdmonster/mdmonster.toml
- Windows:
theme = "auto" # "auto" | "light" | "dark"
[font]
body_family = "" # 비어 있으면 기본 폰트 스택 사용
code_family = ""
size = 16 # px
line_height = 1.6
[window]
# x, y, width, height 는 종료 시 자동 저장/복원 (물리 픽셀)
min_width = 960 # 최소 창 크기 (논리 픽셀)
min_height = 520잘못되거나 손상된 파일은 기본값으로 폴백한다.
시스템 WebView를 사용하므로 바이너리 크기가 작고 배포가 단순하다.
- Windows: WebView2 런타임 (Windows 11 기본 내장, Windows 10 최신도 기본 내장)
- macOS: WKWebView (OS 기본)
- Linux: WebKitGTK (
libwebkit2gtk-4.1)
Rust · tao(윈도우) · wry(WebView) · comrak(GFM 파싱) · notify(파일 감시) · rfd(다이얼로그) · rust-embed(자산 내장)