How to skip processing certain templates?

I’d like to be able to specify a directory within source/ in which all files will be served as they are, without being processed by any of the templating engines. In my case, there’s a bunch of markdown files, which middleman very helpfully converts to html (which is precisely what I don’t want).

Alternately, is there at least a way to disable processing of files by extension?

Thank you in advance!

One solution could be to not have them inside the source directory, and upload them to the server either manually or by modifying the script that deploys the site.

Tommy, I’ve considered that, but what about the dev environment?

You could use a different extension, Middleman responds to: .markdown, .mdown, .md, .mkd and .mkdn. If the extension is unknown, it should output it as plain text.

Second option, store as text (file.txt) then proxy to it for the output url:

page "file.md", :proxy => "file.txt"

Third option, disable markdown support in Middleman:

::Tilt.mappings.delete('md')
1 Like

Thomas, thank you for your response. The first two options don’t seem right (it is a markdown file, giving it a different extension is wrong), but the third one will do in my case.

Thanks!

(I’m new to Discourse - there doesn’t seem to be a way for me to close the topic or mark it as resolved?)

I’m using middleman 3.3.7, and this way doesn’t work. I’m trying to put reveal.js slides in my source directory.

Below is my solution now:

ignore 'slides/*'
after_build do
  `cp -R source/slides build`
end