A
A
auddit2020-04-21 17:58:36
HTML
auddit, 2020-04-21 17:58:36

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.
92318403b5.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2020-04-21
@Seasle

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/'));
});

A
Alex Glebov, 2020-04-21
@SkiperX

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 question

Ask a Question

731 491 924 answers to any question