Skip to content

digicrafts/markdown-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

icon_128

Markdown Preview - Mac OS Quicklook plugin

Quick Look extension for Markdown files on macOS.

Downloads Release Stars License

image

Download latest version

Download latest version here:

https://github.com/tsangwailam/markdown-preview/releases

‼️Since the app is signed with Adhoc. In order to run, ignore Mac OS security warning.

What is Markdown Preview?

Markdown Preview is a macOS Finder Quick Look plugin that renders Markdown documents as styled HTML previews. Instead of plain text in Quick Look, you get readable formatting for headings, lists, blockquotes, code fences, tables, links, and inline emphasis. The project includes:

  • MarkdownPreviewExtension: the Quick Look extension.
  • MarkdownPreviewApp: host app used for extension registration.
  • CoreMarkdownPreview: shared Swift package for rendering, theming, and cache.

Prerequisites

  • macOS with Xcode installed
  • Valid Apple Development code-signing identity (security find-identity -v -p codesigning)

Quick Start

From the repository root, use the local release script:

bash scripts/build_local_release.sh

To build and install to /Applications (and refresh Quick Look registration/cache):

bash scripts/build_local_release.sh --install

Default output app path:

/tmp/mdp-dd/Build/Products/Release/MarkdownPreviewApp.app

Optional: customize DerivedData path for build output:

DERIVED_DATA_PATH=/tmp/custom-mdp-dd bash scripts/build_local_release.sh --install

Sign + Install

Set your signing identity string and run:

IDENTITY='Apple Development: YOUR_NAME (TEAMID)'
SRC_APP='/tmp/mdp-dd/Build/Products/Release/MarkdownPreviewApp.app'
DST_APP='/Applications/MarkdownPreviewApp.app'
EXT_ENT='ROOT/src/Config/MarkdownPreviewExtension.entitlements'
APP_ENT='ROOT/src/Config/MarkdownPreviewApp.entitlements'

rm -rf "$DST_APP"
cp -R "$SRC_APP" "$DST_APP"
xattr -cr "$DST_APP"

EX="$DST_APP/Contents/PlugIns/MarkdownPreviewExtension.appex"

# Sign extension first
codesign --force --options runtime --timestamp=none \
  --entitlements "$EXT_ENT" \
  --sign "$IDENTITY" "$EX"

# Then sign app (no --deep so extension entitlements are preserved)
codesign --force --options runtime --timestamp=none \
  --entitlements "$APP_ENT" \
  --sign "$IDENTITY" "$DST_APP"

codesign --verify --deep --strict --verbose=2 "$DST_APP"

Register + Refresh Quick Look

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f -R -trusted /Applications/MarkdownPreviewApp.app
pluginkit -a /Applications/MarkdownPreviewApp.app/Contents/PlugIns/MarkdownPreviewExtension.appex

killall -9 quicklookd || true
killall -9 Finder || true

qlmanage -r cache
qlmanage -r

Optional: verify extension is registered

pluginkit -m -A -D -v -p com.apple.quicklook.preview | rg 'com.local.MarkdownPreviewApp.MarkdownPreviewExtension|/Applications/MarkdownPreviewApp.app'

License

This project is licensed under the MIT License. See LICENSE for details.

About

Markdown Preview Plugin for Mac OS

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors