Reputation: 865
I'm using Jade without Node, I'm simply using the software Prepros to compile the templates to static HTML.
I want to include partials that are outside of the folder the Jade templates are in, like so:
include /partials/foo.html
However, using paths that begin with a /
with include
in Prepros gives the following error:
the "basedir" option is required to use "include" with "absolute" paths
Usually you could set the basedir
using something like app.locals.basedir = __dirname + '/views'
, but there's no way to do this with Prepros. Is there some other way?
Upvotes: 1
Views: 1377
Reputation: 1
You can just deleted /
and it will works.
You also can add the path in the root folder and just call it like foot.html.
Upvotes: 0
Reputation: 101
It is security restriction imposed by jade language. I have added a workaround in Prepros Jade compiler to fix this issue, fix will be available from the next version of Prepros.
Upvotes: 3