Answer the question
In order to leave comments, you need to log in
How to layout a multi-page static site using JADE?
I do so. I create jade + sass + js block. One block = BEM block.
This is a really cool scheme. There is only one drawback. Different pages have different content. I hide the content in BEM block for example content which is hidden in a block for example middle (this is for example if there is a sidebar)
Then a very ugly topic begins.
Option 1 page.jade
+
middle(".......long content escaping any characters......")
middle.jade
+content(content)
content.jade
#{content}
The disadvantage of this approach is that you have to escape characters, remove hyphens, and so on
Option 2
page.jade
+middle("page_alias")
middle.jade
+content(page_alias)
content.jade
if page_alias == "a"
......content output.....
This is generally a rather flawed method. in the content.jade file, you get a dozen branches with if .... else if ...
How to be that one?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question