As the title states, I would like to serve a page/file as both raw (just text) and Markdown processed into HTML.
My reasoning is that I have some files that I would like to show on the website and I would also like to give the user a “Download this file” link, similar to the “Raw” link for files on Github or Bitbucket.
So far I’ve been fairly unsuccessful. The furthest that I’ve gotten has been that I think it involves a proxy, like so:
page '/file.txt', :layout => 'my_layout', :proxy => '/file.html'
However the ‘layout’ option is ignored and the raw file is still served.
This raised a good question for which is, in Middleman, is there a way to manually define how a page will be processed when defining it via ‘page’? Or if not, is there any other way to achieve my goal?