Answer the question
In order to leave comments, you need to log in
How to connect html to html?
I recently switched from sublime to VSCode and still don't understand how I can connect the header.html file to the main index.html file here. In sublime, kit helped out very well, but for some reason it doesn’t work here. Suggest a solution to the problem.
Answer the question
In order to leave comments, you need to log in
The logical solution would be to use a assembler (for example gulp )
gulp.task('html', function () {
gulp.src('src/*.html') //Выберем файлы по нужному пути
.pipe(rigger()) //Прогоним через rigger
.pipe(gulp.dest('dist/')) //Выплюнем их в папку build
.pipe(browserSync.reload({stream: true})); //И перезагрузим наш сервер для обновлений
});
<!DOCTYPE html>
<html>
<head lang="ru">
<meta charset="UTF-8">
<title>Пум-пум</title>
</head>
<body>
//= template/header.html
<section class="content">
Content
</section>
//= template/footer.html
</body>
</html>
Depending on the purpose for which you are making the page ... You can
simply "glue" on js with this (it works without an editor).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question