Skip to content

johannesnagl/showmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

77 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

showmd icon

showmd total downloads

The most readable way to preview any .md file on macOS.
A free, native Quick Look extension that renders Markdown beautifully β€” press Space in Finder and go.

Website Β· Install Β· Features Β· Build from Source


Install

brew install --cask showmd

Then open showmd once, go to System Settings β†’ Privacy & Security β†’ Extensions β†’ Quick Look, and enable it. After that, pressing Space on any Markdown file in Finder will use showmd automatically.

Note: On first launch, macOS will ask showmd to "access data from other apps." This is required so the host app and the Quick Look extension can share your settings (theme, font size, etc.) via App Groups. Click Allow β€” it only happens once.

Features

  • Full GitHub Flavored Markdown β€” tables, task lists, strikethrough, fenced code blocks
  • Syntax highlighting for 190+ languages (highlight.js, bundled offline)
  • Math rendering β€” LaTeX via KaTeX, inline $...$ and block $$...$$
  • Mermaid diagrams β€” optional, toggle in settings
  • YAML frontmatter β€” parsed and rendered as a collapsible metadata table
  • Emoji shortcodes β€” :rocket: β†’ πŸš€
  • GitHub-style alerts β€” > [!NOTE], > [!TIP], > [!IMPORTANT], > [!WARNING], > [!CAUTION]
  • Agentic AI XML tags β€” <example>, <instructions>, <thinking>, <context>, and more rendered as labeled blocks
  • Footnotes, highlight, superscript, subscript, smart quotes
  • Rendered / Source toggle β€” switch between rendered HTML and raw Markdown
  • Copy as HTML β€” one click to copy the rendered output
  • Dark mode β€” follows macOS appearance, or override in settings (Light / Dark / Auto)
  • Adjustable font size β€” Small, Medium, or Large
  • Fully offline β€” all JS/CSS dependencies are bundled, no network needed
  • XSS-hardened β€” all user content is escaped and raw HTML is sanitized

Supported file extensions

.md, .markdown, .mdx, .mdc, .rmd, .qmd, .mdown, .mkd, .mkdn, .mdtext, .mdtxt

Build from Source

Prerequisites

  • macOS 26 or later
  • Xcode 16 or later
  • XcodeGen β€” brew install xcodegen

Steps

# Clone the repo
git clone https://github.com/johannesnagl/showmd.git
cd show.md

# Generate the Xcode project
xcodegen generate

# Open in Xcode
open show.md.xcodeproj

In Xcode:

  1. Set your Development Team in Signing & Capabilities for both the ShowMd and ShowMdExtension targets
  2. Build and run the ShowMd scheme

The .xcodeproj is generated from project.yml and excluded from git. Always regenerate it after pulling changes.

Run tests

cd MarkdownRenderer
swift test

Architecture

show.md/
β”œβ”€β”€ ShowMd/                  # Host app (SwiftUI settings window)
β”œβ”€β”€ ShowMdExtension/         # Quick Look preview extension
β”œβ”€β”€ MarkdownRenderer/        # Swift package (shared between both targets)
β”‚   β”œβ”€β”€ Sources/
β”‚   β”‚   └── MarkdownRenderer/
β”‚   β”‚       β”œβ”€β”€ HTMLVisitor.swift       # Markdown β†’ HTML conversion
β”‚   β”‚       β”œβ”€β”€ HTMLTemplate.swift      # HTML page wrapper + theme
β”‚   β”‚       β”œβ”€β”€ HTMLPostProcessor.swift # Emoji, footnotes, autolinks, etc.
β”‚   β”‚       β”œβ”€β”€ HTMLEscape.swift        # XSS prevention
β”‚   β”‚       β”œβ”€β”€ FrontmatterParser.swift # YAML frontmatter extraction
β”‚   β”‚       β”œβ”€β”€ ResourceLoader.swift    # Bundled JS/CSS loader
β”‚   β”‚       β”œβ”€β”€ Settings.swift          # UserDefaults via App Groups
β”‚   β”‚       └── Resources/             # highlight.js, KaTeX, Mermaid (offline)
β”‚   └── Tests/
β”œβ”€β”€ docs/                    # Marketing website (showmd)
└── project.yml              # XcodeGen project definition

Settings are shared between the host app and the Quick Look extension via App Groups (group.one.yetanother.showmd).

Dependencies

Dependency Purpose
apple/swift-markdown Markdown parsing (GFM)
highlight.js Syntax highlighting (bundled)
KaTeX Math rendering (bundled)
Mermaid Diagram rendering (bundled)

License

MIT

Author

Johannes Nagl β€” showmd

Concept, growth, and everything except coding β€” coded with Claude.

About

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors