Skip to content

eagle1maledetto/prettymark

Repository files navigation

PrettyMark

A lightweight, native Markdown viewer for Windows with live reload and syntax highlighting.

.NET 8 Windows License

Features

  • GitHub-style rendering — tables, fenced code blocks, task lists, TOC via marked.js
  • Syntax highlighting — automatic language detection via highlight.js (GitHub theme)
  • Live reload — preview updates instantly when the file is saved
  • Multi-tab — open multiple files in a single window
  • Sidebar — collapsible drawer with list of open files and paths
  • Drag & drop — drop .md files directly into the window
  • Find in pageCtrl+F with match highlighting and navigation
  • Dark mode — toggle with Ctrl+D, preference is remembered
  • PrintCtrl+P opens the native print dialog, prints only the rendered content
  • Recent files — File → Recent Files submenu, remembers the last 10 opened files
  • Session persistence — open tabs are restored when the app is relaunched
  • Multi-language — 12 languages (EN, IT, ES, PT, FR, DE, ZH, JA, KO, RU, TR, UK), auto-detects system language, switchable at runtime via View → Language
  • Full screenF11 toggle
  • ZoomCtrl++ / Ctrl+- / Ctrl+0
  • Native — single .exe, no Electron, no browser required (uses WebView2/EdgeChromium)

Download

Latest release (v1.0.0)

Package Description
PrettyMark-Setup-1.0.0-win-x64.exe Installer — Start menu, desktop shortcut, file associations, uninstaller
PrettyMark-portable-win-x64.zip Portable — unzip and run, no installation needed

Screenshot

Quick Start

Prerequisites

  • Windows 10/11
  • .NET 8 SDK (only for building from source)

Run from source

git clone https://gitlab.com/eagle1/prettymark.git
cd prettymark
dotnet run -- README.md

Build a standalone executable

dotnet publish -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true

The output is a single PrettyMark.exe in bin\Release\net8.0-windows\win-x64\publish\.

Build NSIS installer

Requires NSIS (works on both Windows and Linux).

makensis installer.nsi

The output is bin\PrettyMark-Setup-1.0.0-win-x64.exe.

Build MSIX installer (for Microsoft Store)

Requires Windows SDK (for makeappx.exe).

.\build-msix.ps1 -Version "1.0.0.0"
# Add -Sign to create a self-signed certificate for testing

Usage

# Open a file directly
PrettyMark.exe README.md

# Launch without arguments → welcome screen → File → Open or drag & drop
PrettyMark.exe

Keyboard Shortcuts

Shortcut Action
Ctrl+O Open file
Ctrl+W Close current tab
Ctrl+P Print
Ctrl+F Find in page
Ctrl+D Toggle dark mode
Ctrl+B Toggle sidebar
F11 Toggle full screen
Ctrl++ Zoom in
Ctrl+- Zoom out
Ctrl+0 Reset zoom

How It Works

PrettyMark is a WinForms application that hosts a WebView2 control (EdgeChromium). Markdown files are read by C# and passed to the embedded HTML page, which renders them client-side using marked.js and highlight.js.

  • Tab management is handled in C# — each open file gets its own FileSystemWatcher for live reload
  • Drag & drop uses native Chromium drop handling, intercepted via NewWindowRequested to open files as tabs
  • Settings (dark mode, sidebar state, language, recent files, session tabs) are persisted in %AppData%\PrettyMark\settings.json
  • i18n uses JSON files in assets/lang/ — C# loads the JSON and injects strings into JS via setStrings(). Adding a language is just adding a new JSON file

Contributing

The primary repository is on GitLab. Please open issues and merge requests there.

License

MIT

About

Native Markdown viewer for Windows with GitHub-style rendering, live reload, and syntax highlighting

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors