15

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.

Thunderforge
  • 2,093

1 Answers1

20

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 install toland-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 install toland-qlmarkdown
xattr -cr ~/Library/QuickLook/QLMarkdown.qlgenerator
qlmanage -r
qlmanage -r cache
killall Finder  # relaunch finder

It should hopefully work now.

ychz
  • 237
Thunderforge
  • 2,093
  • 1
    In case anybody is wondering, no I am not associated with this QLMarkdown. I self-answered this question because I had a problem and wanted to share my solution in case others ran into it too. – Thunderforge Sep 03 '17 at 03:12
  • Good answer, can you please repost it on the question linked above (which covers the same topic but mentions the plugin only briefly)? – nohillside Sep 03 '17 at 04:20
  • @patrix Would that be appropriate? It looks like that question was just looking for applications. Also, wouldn't that make my question a duplicate of that one? – Thunderforge Sep 03 '17 at 04:23
  • The question is broad enough to allow both applications and QL plugins (preview can be both, somehow) – nohillside Sep 03 '17 at 04:31
  • @patrix How does the duplicate policy work on this site? I got burned earlier today on Sci-fi/Fantasy SE by asking a question that was marked as a duplicate because another question's answer addressed my question. I would hate for somebody to mark my question as a duplicate because the other question now has the answer. – Thunderforge Sep 03 '17 at 04:33
  • @patrix According to this, the Community user will flag it as an exact duplicate if I repost that answer. Are you sure it's okay for me to do this? Sorry if I'm sounding to paranoid, just want to make sure I do things the right way. – Thunderforge Sep 03 '17 at 04:35
  • 1
    I've already closed your question here as a duplicate to the other one. Reposting the answer may raise an auto flag for the mods but we easily clear this flag without harm – nohillside Sep 03 '17 at 04:43
  • 1
    @patrix Thanks for clarifying. I wish the notification system would let users know when their questions are closed. I didn't realize that had happened until you mentioned it. – Thunderforge Sep 03 '17 at 04:56