Answer the question
In order to leave comments, you need to log in
PUG - import code into another pug file at specified location?
Tell me, is it possible to implement such a thing in PUG:
Let's say I have two pug files, but the code contained in them must be inside one section.
For example, in the first file I have a header with some code, and in the second I have another code, which, when compiled, should be inside the header from the first file.
Answer the question
In order to leave comments, you need to log in
Main file:
doctype html
html(lang="ru")
head
include templates/head.pug
body
include templates/header.pug
// туть ваши крутые блоки
include templates/footer.pug
In the file, include the header, and in the header file, include the file that needs to be.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question