MacDown is an open source Markdown editor for OS X, released under the MIT License. The author stole the idea from Chen Luo’s Mou so that people can make crappy clones.
Visit the project site for more information, or download MacDown.app.zip directly from the latest releases page.
Download, unzip, and drag the app to Applications folder. MacDown is also available through Homebrew Cask:
brew install --cask macdown
MacDown is released under the terms of MIT License. You may find the content of the license here, or inside the LICENSE directory.
You may find full text of licenses about third-party components in the LICENSE directory, or the About MacDown panel in the application.
The following editor themes and CSS files are extracted from Mou, courtesy of Chen Luo:
- Mou Fresh Air
- Mou Fresh Air+
- Mou Night
- Mou Night+
- Mou Paper
- Mou Paper+
- Tomorrow
- Tomorrow Blue
- Tomorrow+
- Writer
- Writer+
- Clearness
- Clearness Dark
- GitHub
- GitHub2
If you wish to build MacDown yourself, you will need the following components/tools:
- macOS SDK (12.0 or later; this is the current
MACOSX_DEPLOYMENT_TARGET) - A recent Xcode
- Git
- Bundler
Note: Old versions of CocoaPods are not supported. Please use Bundler to execute CocoaPods, or make sure your CocoaPods is later than shown in
Gemfile.lock.
Note: The Command Line Tools (CLT) should be unnecessary. If you failed to compile without it, please install CLT with
xcode-select --installand report back.
An appropriate SDK should be bundled with your version of Xcode.
After cloning the repository, run the following commands inside the repository root (directory containing this README.md file):
git submodule update --init
bundle install
bundle exec pod install
make -C Dependency/peg-markdown-highlight
and open MacDown.xcworkspace in Xcode. The first command initialises the dependency submodule(s) used in MacDown; the second one installs dependencies managed by CocoaPods.
Refer to the official guides of Git and CocoaPods if you need more instructions. If you run into build issues later on, try running the following commands to update dependencies:
git submodule update
bundle exec pod install
The Markdown preview pane runs on WKWebView (the legacy, deprecated WebView
it used to run on has been fully removed). A few things follow from that if
you're working on the preview/rendering code:
- The rendered preview is written to a hidden sidecar file next to the open
document (
.macdown-preview-<uuid>.html, ignored by.gitignore) and loaded via-loadFileURL:allowingReadAccessToURL:, rather than loaded in-memory via-loadHTMLString:baseURL:. This is what lets the preview read local images/stylesheets from anywhere on disk; WKWebView otherwise restrictsfile://sub-resource loads to the loaded page's own directory. - Local stylesheets/scripts (custom user styles, Prism, MathJax's init
script) are embedded inline into the generated HTML rather than
<link>/<script src>-referenced, for the same reason. - MathJax itself still loads from the CDN (
cdnjs.cloudflare.com) rather than a bundled copy, since only its small bootstrap file is vendored locally — the fonts/config/extensions it fetches relative to its own script URL at runtime aren't. Math rendering requires network access. - Sparkle has been upgraded from 1.x to 2.x (
SPUStandardUpdaterController). If you're testing auto-update, you'll need your own EdDSA key pair (Sparkle/bin/generate_keys) — the old DSA key mechanism is gone.
Please help translation on Transifex.
Join our Gitter channel if you have any problems with MacDown. Any suggestions are welcomed, too!
You can also file an issue directly on GitHub if you prefer so. But please, search first to make sure no-one has reported the same issue already before opening one yourself. MacDown does not update in your computer immediately when we make changes, so something you experienced might be known, or even fixed in the development version.
MacDown depends a lot on other open source projects, such as Hoedown for Markdown-to-HTML rendering, Prism for syntax highlighting (in code blocks), and PEG Markdown Highlight for editor highlighting. If you find problems when using those particular features, you can also consider reporting them directly to upstream projects as well as to MacDown’s issue tracker. I will do what I can if you report it here, but sometimes it can be more beneficial to interact with them directly.
If you find MacDown suitable for your needs, please consider giving me a tip through PayPal. Or, if you prefer to buy me a drink personally instead, just send me a tweet when you visit Taipei, Taiwan, where I live. I look forward to meeting you!
