A
A
Andrey Smirnov2019-08-22 12:54:25
webstorm
Andrey Smirnov, 2019-08-22 12:54:25

How to create a macro for PUG correctly?

Hello, I have a project with the following structure:
-app
--public
---news
----new1.html
---index.html
--src
---news
----new1.pug
--- index.pug
How to generate html from pug so that such a structure can be obtained? I can not understand.
Tried like this:
$FileDirPathFromParent(app)$/public/$FileNameWithoutExtension$.html
But there is no entry for index.pug like this.
How to implement for index.pug and in general for the news folder?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Smirnov, 2019-08-22
@And__Smi

--pretty $FilePath$ --out $FileParentDir(src)$/public/$FileDirName$/ I
came up with such a macro for the paga, BUT all files stored in the src folder are transferred to the public as:
-public
--src
--- index.html Does
anyone have any thoughts on this, how to make it ignore this folder and put it in public, that is:
-public
--index.html?
For news this macro works correctly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question