Skip to content
New issue

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

Conditional Replacement #60

Open
MBurchard opened this issue Dec 11, 2017 · 0 comments
Open

Conditional Replacement #60

MBurchard opened this issue Dec 11, 2017 · 0 comments

Comments

@MBurchard
Copy link

I use gulp-html-replace in a small static page. It consists of 7 different pages with a bootstrap navigation.
I want to set the CSS class "active" for different HTML pages in the appropriate navigation and load the entire navigation from a template like I did with the footer.

gulp.task('buildHTML', function() {
	gulp.src('src/html/*.html')
		.pipe(htmlreplace({
			footer: gulp.src('src/html/parts/footer.part.html'),
			js: {
				src: ['jquery-3.2.1.min.js', 'bootstrap.min.js'],
				tpl: '<script type="text/javascript" src="/js/%s"></script>'
			}
		}))
		.pipe(gulp.dest(rootDir + '/'));
});

Is this possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant