Render README.md as a partial in template

Hello

I want to do a pretty simple thing - for my “yet another middleman boilerplate” project, i would love to be able to render a README.md (the one used by github to show readme on a project page) as a partial in my index page, just to fill it with some usefull informations for any potential users of my boilerplate. My intentions are not so important though.

I was trying to put render :markdown, '../README.md' in my index.html (my index.html.erb file is inside /src dir) but middleman throws

Error: Could not locate partial: ../README.md

I’ve been trying to use any possible README.md path but any of them was throwing this exception so i am wondering - is that even possible?

Thanks in advance!

I think that if you run your README.md by a ERb processor you could achieve this.

As far as I know, you can do this adding a .erb on the name of the file, as README.md.erb, since the Middleman will pass this erb file into the processing chain.