paperjs/woods

Including markdown files from the page directory

jaskiratr opened this issue · 2 comments

Hello,
Is there a way to include .md files in .jade template files? The MD files are located in the folders of each respective page being rendered by woods.
If in a .jade template, I use something like : include code.md then it looks for code.md in templates directory instead of the code.md in the content of the page being rendered.
Would you happen to know a workaround for that? I need to include .md files placed under folder of the respective page.

Thanks!

You could try if it works if you walk up the folder hierarchy to get to the correct file. Something like include ../../content/whatever/text.md.
But in general it's a could idea to keep your content and your styling seperate. What are you trying to achieve with this? Maybe I could suggest a better way at solving it

Thank you. Although I've reverted to using a single .Md file, which was another workaround for me.
I was trying to include another .md file which in each of the page's respective folder into a specific place in the main content of the page. Like there are photos in each folder which get automatically picked up by woods and inserted in the main content; I was trying to include, instead of an image another .md file with a specific name. I hope that makes sense.