V
V
Vadim Somov2017-08-23 20:34:36
HTML
Vadim Somov, 2017-08-23 20:34:36

Organization pug?

Hello everyone, I decided to try pug. Everything seems to be clear with the syntax, but I don’t understand exactly the organization of files, crushing, connecting mixins and includes, and so on. Is there an article on these things or a good example?
And how do you generally organize work with pug in your projects?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
alvvi, 2017-08-23
@alvvi

I do not pretend to be correct, but I found this option convenient for myself:
Each component is a pug mixin. Mixins can be nested, for example:
+ make layout.pug, from which @extend-im all pages, include the necessary components and at the end we call mixins
In general, quite reusable blocks are obtained along with markup, logic, styles and content. This is very easy to pull on Express or just throw it from project to project.

F
Froggyweb, 2017-08-23
@Froggyweb

No, further as you need, fractions as you want, organize as you like. What is the meaning of some kind of manual?

Z
zooks, 2017-08-23
@zooks

You can create a folder chunksand put everything in it header.pug, footer.pugetc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question