Organizing partials in subfolders?


#1

Hi, I’m trying to organize partials into a separate directory under the www folder. Right now, a standard partial works just fine with {{> header}} where _header.html is under the www directory one level below. e.g. www/_header.html accessing it from www/index.html for example.

However, when I try to put the partial inside a subfolder (calling it includes) for organizational purposes and reference it from index.html using {{> includes/header}} it doesn’t work. Also, tried variations such as:

{{> includes/header}}
{{> /includes/_header}}
{{> ./includes/header}}
along with some other variations using _ and adding the .html and even quotes a la nunjucks.js syntax.

Is there another format that can work? Or, are we constrained to the first level of the www folder only?

thanks in advance!


#2

@mariocontext Right now, Vapid only look for partials in the root folder, not subfolders. It sounds like a good feature request, though. If you’re interested, feel free to add a feature request issue on GitHub, and we’ll look into incorporating subfolder partials in a future release.


#3

Thanks Scott! Will do.