We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is my project tree view:
src `-- templates |-- _layouts | `-- login.layout.njk `-- pages `-- login.njk
And the login.njk
{% extends "../_layouts/login.layout.njk" %} {% block main_content %} login page! {% endblock %}
The text was updated successfully, but these errors were encountered:
Emm. got same..
and my task..
exports.njk = function njk(){ return gulp.src(GULPCONFIG.filepath.njk, { base: GULPCONFIG.filepath.dev }) .pipe(nunjucks.compile()) .pipe(through.obj((chunk, enc, callback) => { chunk.extname = '.html'; return callback && callback(null, chunk); })) .pipe(gulp.dest(GULPCONFIG.filepath.dist)); };
how to fixed it?
Sorry, something went wrong.
Duplicate #14
Unfortunately in gulp-nunjucks is no option for relative path to templates.
The gulp-nunjucks-render has a better API and allows to specify the path from which all the templates will be resolved:
import gulpNunjucksRender from 'gulp-nunjucks-render'; export function buildTemplates() { return src('templates/**/*.nj') .pipe(gulpNunjucksRender({ path: 'templates/', })) .pipe(dest('dist/')) ; }
No branches or pull requests
This is my project tree view:
And the login.njk
The text was updated successfully, but these errors were encountered: