Answer the question
In order to leave comments, you need to log in
Gulp rigger and conditional statements?
You need to underline active menu items, but since the project is built through Rigger, one header file is underlined on all pages. Thus, only one point is emphasized.
Is it possible to somehow set conditions so that, depending on the page, a certain menu item is underlined? For example, do it through parameters or something else.
Answer the question
In order to leave comments, you need to log in
Throw out gulp-rigger. Install gulp-nunjucks ( API ) . So it will be possible to make a task:
gulp.task('build:html', () => {
return gulp.src('src/*.html')
.pipe(nunjucks.compile())
.pipe(gulp.dest('dist/'));
});
gulp-rigger used to be used for merging js and css, there are no options.
You need a template engine, pug, handlebars, etc.
Or you can explain that there is no backend, and there is nothing to highlight the desired item.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question