ahmadnassri / node-metalsmith-pug

Metalsmith plugin to convert jade files
https://www.npmjs.com/package/metalsmith-pug
MIT License
21 stars 10 forks source link

Using metalsmith-pug and metalsmith-include to include rendered source files using pug #60

Open jhyland87 opened 7 years ago

jhyland87 commented 7 years ago

Hello. I'm using your metalsmith-pug plugin in combination with metalsmith-include to include markdown files in the source directory (which use pug). But I seem to be having an issue with it.

I know that you aren't supporting metalsmith-include, but I'm not sure which of the two plugins is having the problem, so I opened a ticket in metalsmith-include as well.

If you look at the example shown in the metalsmith-include README content, it very similar to what I'm trying to accomplish. The home.md loads home.jade as the template, then it includes thanks.md, assigning it to thanks. Then you can see that the thanks.md file sets the template to thanks.jade. Then thanks.jade just outputs contents (rendered content of home.md) and thanks (rendered content of thanks.md).

The only main difference I can see between that example and my code, is that I'm using pug instead of jade (which I know, same thing)

The problem I'm having, is I cant get the .md file that's getting used as an included file to actually render the content using the template configured in the .md file..

Any idea why the includes would be including the content from the markdown files, but not the rendered pug template?

I created a temporary git repository that will show you the exact issue i'm running into.

Thanks!