How can I read markdown files with QuickLook? [duplicate]

I would like to be able to read markdown (.md) files with Quick Look. Unfortunately, it just appears like this:

Markdown file macOS Quick Look

Is there any way that I can be able to see the contents of this file? I don't care whether it's in rendered or unrendered format, just that I can see it somehow.


Solution 1:

There is no setting in macOS to enable markdown support. However, Quick Look does allow for third party plugins to extend the base behavior. The QLMarkdown plugin is one such plugin that allows Markdown files to be read.

You can install it either by:

  • Download the QLMarkdown.qlgenerator in either ~/Library/QuickLook (current user) or /Library/QuickLook (all users).
  • Using Homebrew, run brew cask install qlmarkdown in the Terminal

After that, you should be able to view markdown files.

Getting it to work on macOS Catalina - Source

If you got the security warning as shown below, go to System Preferences / Security & Privacy / General and click Allow Anyway at the bottom. enter image description here Now try to Quicklook a markdown file again. If it still doesn't work, run the following commands in your terminal.

brew cask install qlmarkdown
xattr -cr ~/Library/QuickLook/QLMarkdown.qlgenerator
qlmanage -r
qlmanage -r cache
killall Finder  # relaunch finder

It should hopefully work now.