OSX – How to make Spotlight Index MarkDown files?

I usually use .markdown or .md extensions for markdown documents. Unfortunately, Spotlight refuses to index unless they have a .txt file extension.

I have seen a possible solution involving editing Info.plist files on the textmate blog. Is there a better way?

Update: I just discovered the QuickLook generator for Markdown files, which adds Spotlight support and beautiful HTML quicklook previews. It is a treatment!

You must write a Spotlight importer. There is an Xcode project template that will set up the basic things for you to get you started; I think there is also a developer example.

Your importer will need a UTExportedTypeDeclarations section in its Info.plist, which describes the uniform type identifiers for marked files with path extensions. So this is just a matter of letting your importer obtain relevant data through Spotlight to obtain a price reduction document.

I usually use .markdown or .md extensions for markdown documents. Unfortunately, Spotlight refuses to index unless they have a .txt file extension.

I have seen a possible solution involving editing Info.plist files on the textmate blog. Is there a better way?

Update: I just discovered the QuickLook generator for Markdown files, which adds Spotlight support and beautiful HTML quicklook previews. It is a treatment!

You must write a Spotlight importer. There is an Xcode project template that will set up the basic things for you to get you started; I think there is also a developer example.

Your importer will need a UTExportedTypeDeclarations section in its Info.plist, which describes the uniform type identifiers for marked files with path extensions. So this is just a matter of letting your importer obtain relevant data through Spotlight to obtain a price reduction document.

Leave a Comment

Your email address will not be published.