Absolute paths for template includes on server-side

53 views
Skip to first unread message

Ismael Gonzalez

unread,
Aug 26, 2016, 5:07:40 AM8/26/16
to Nunjucks
I'm using Nunjucks and Wintersmith via wintersmith-nunjucks.

Is there any way in Nunjucks to use include directives with absolute paths?
I don't know if it's a problem with the plugin implementation for Wintersmith or just a Nunjucks design decission.

I.E:

        {% include "../../_res/modules/c_footer/footer.tpl.html" %}

VS

        {% include "/src/_res/modules/c_footer/footer.tpl.html" %}


I've tried to modify https://github.com/jbuck/wintersmith-nunjucks/blob/master/index.js#L46 to use an absolute path, but i'm still getting a Nunjucks render error. (Template not found).

Thank you all!
Reply all
Reply to author
Forward
0 new messages