QuickLook Markdown preview and icon thumbnailing app extensions for macOS Catalina and beyond
This app provides Markdown file preview and thumbnailing extensions for Catalina and later versions of macOS.
Just run the host app once to register the extensions — you can quit the app as soon as it has launched. We recommend logging out of your Mac and back in again at this point. Now you can preview markdown documents using QuickLook (select an icon and hit Space), and Finder’s preview pane and Info panels.
You can disable and re-enable the Previewer and Thumbnailer extensions at any time in System Preferences > Extensions > Quick Look.
You can alter some of the key elements of the preview by using the Preferences panel:
Changing these settings will affect previews immediately, but may not affect thumbnails until you open a folder that has not been previously opened in the current login session.
For more information on the background to this app, please see this blog post.
PreviewMarkdown supports rendering YAML front matter in Markdown files. To enable it, go to Preview Markdown > Preferences... and check the Show YAML front matter checkbox. YAML will appear in QuickLook previews only, not thumbnails.
From version 1.5.1, YAML front matter can be delimited with both ---
and ---
, and ---
and ...
start and end markers.
Users of Markdown editing tools like OneMarkdown and Marked may not see PreviewMarkdown-produced previews. This is because those apps claim ownership of key Markdown file UTIs which may cause Finder to pre-empt PreviewMarkdown. There is no workaround at this time.
This repository contains the primary source code for PreviewMarkdown. Certain graphical assets, code components and data files are not included. To build PreviewMarkdown from scratch, you will need to add these files yourself or remove them from your fork.
This includes minor changes made to the SwiftyMarkdown source — specifically to unset NSAttributedString’s .link
attribute for links in order to prevent NSAttributedString applying its own link text formatting.
The files REPLACE_WITH_YOUR_FUNCTIONS
and REPLACE_WITH_YOUR_CODES
must be replaced with your own files. The former will contain your sendFeedback(_ feedback: String) -> URLSessionTask?
function. The latter your Developer Team ID, used as the App Suite identifier prefix.
You will need to generate your own Assets.xcassets
file containing the app icon.
You will need to create your own new
directory containing your own new.html
file.
PreviewMarkdown’s app extensions contain SwiftyMarkdown by Simon Fairbairn and other contributors, and YamlSwift by Behrang Noruzi Niya and other contributors.
public.markdown
UTI....
end marker (Thanks, anonymous).Markdown Previewer
and Markdown Thumbnailer
.com.nutstore.down
.[x]
, [ ]
).net.ia.markdown
.pro.writer.markdown
.string index out of range
in SwiftyMarkdown).Primary app code and UI design © 2024, Tony Smith.
Code portions © 2022 Simon Fairbairn. Code portions © 2021 Behrang Noruzi Niya.