# GlanceMD
**Repository Path**: Fountain/GlanceMD
## Basic Information
- **Project Name**: GlanceMD
- **Description**: 一款轻量级的跨平台 Markdown 查看器与编辑器。启动速度媲美记事本,渲染效果媲美 Obsidian。Windows 版本保持约 1 MB 的单文件可执行程序,macOS 与 Linux 提供系统原生软件包。
更多产品,请关注 https://vastnext.com
- **Primary Language**: Rust
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-09-03
- **Last Updated**: 2026-09-03
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 🚀 GlanceMD
简体中文 · English
A lightweight cross-platform markdown viewer and editor. It keeps the Notepad-fast startup and Obsidian-pretty rendering; the Windows build remains a single ~900 KB executable, while macOS and Linux use native packages.
Built with Rust and the system webview, with no Electron. Windows uses WebView2, macOS uses WebKit, and Linux uses WebKitGTK.
GlanceMD is deeply developed from the open-source project **[Peekdown](https://github.com/Mockitup/Peekdown)** (by Mockitup), with the preview typography theme from the **[Marco](https://github.com/Ranrar/Marco)** reader. See [Acknowledgments](#-acknowledgments).
## ✅ Features
- **Instant startup** ⚡ — native window, no framework overhead
- **Live preview** 👀 — rendered markdown with full GFM support (tables, task lists, footnotes)
- **Marco rendering** 🎨 — signature Astro/Space preview style: left-aligned gradient headings, full-width content and tables
- **Split view** ↔️ — side-by-side editor and preview with live sync (Ctrl+\\)
- **Syntax highlighting** 🌈 — 30+ languages via highlight.js
- **Multi-tab** 📑 — open multiple files, auto-hides tab bar for single files
- **Dark/Light themes** 🌙/☀️ — toggle with one click
- **Find in document** 🔍 — Ctrl+F with match highlighting and navigation
- **Table of Contents** 🧭 — auto-generated outline sidebar (Ctrl+Shift+O)
- **Zoom** 🔎 — Ctrl+/- or Ctrl+scroll, with level indicator
- **Drag & drop** 📥 — drop `.md` files to open, drop multiple to open tabs
- **Adjustable preview width** 📐 — drag the edge to resize
- **Recent files** 🕘 — quick-open panel on empty tabs
- **Cross-mode selection** 🔄 — selected text stays selected when toggling edit/preview
- **File associations** 📄 — use as default `.md` viewer via "Open With"
- **Embedded frontend** 💾 — HTML, CSS and JavaScript are compiled into the native binary
## ⌨️ Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| Ctrl+O | Open file |
| Ctrl+S | Save |
| Ctrl+Shift+S | Save As |
| Ctrl+N | New tab |
| Ctrl+W | Close tab |
| Ctrl+Tab | Next tab |
| Ctrl+Shift+Tab | Previous tab |
| Ctrl+E | Toggle edit/preview |
| Ctrl+\\ | Toggle split view |
| Ctrl+F | Find in document |
| Ctrl+Shift+O | Toggle outline |
| Ctrl+= / Ctrl+- | Zoom in/out |
| Ctrl+0 | Reset zoom |
## 🛠️ Build
Requires Rust and the target platform's webview development environment. Windows 10/11 includes WebView2; Linux builds also require GTK3 and WebKitGTK 4.1 development packages.
```bash
cargo build --release
```
Windows output: `target/release/GlanceMD.exe`. GitHub Actions creates native macOS and Linux packages on their respective runners.
### 🚦 Release via GitHub Actions
Push a `v*` tag to automatically build and publish a release:
```bash
git tag v1.3.6 && git push origin v1.3.6
```
Release artifacts include Windows x64 EXE, unsigned Apple Silicon and Intel macOS DMGs, and Linux x64 DEB/AppImage packages.
> macOS packages are not yet signed with Developer ID or notarized by Apple. The first launch may require manual approval in System Settings → Privacy & Security.
## ⚙️ Tech Stack
- **Rust** — window management, file I/O, IPC ([tao](https://github.com/niceshell/niceshell) + [wry](https://github.com/niceshell/niceshell))
- **System webview** — WebView2 on Windows, WebKit on macOS, WebKitGTK on Linux
- **marked.js** — markdown to HTML
- **highlight.js** — code syntax highlighting
- **No Electron, no Node, no bundler** — all frontend assets are embedded at compile time via `include_str!`
## 🙏 Acknowledgments
This project is built on top of, and deeply indebted to:
- **[Peekdown](https://github.com/Mockitup/Peekdown)** (by Mockitup) — the project this fork originated from. Window management, file I/O, multi-tab architecture and the overall product shape all come from it
- **[Marco](https://github.com/Ranrar/Marco)** / [marco-core](https://github.com/Ranrar/marco-core) (by Kim Skov Rasmussen, MIT) — the preview typography theme is derived from Marco's Astro/Space theme: gradient headings, full-width layout, striped tables and more
Thank you both for open-sourcing your work! 🚀
## 📄 License
MIT — see [LICENSE](LICENSE)