Answer the question
In order to leave comments, you need to log in
How to get readable layout from Jade?
Good day, I decided to use jade. Created index.jade with this content
doctype html
html(lang="en")
head
title= pageTitle
script(type='text/javascript').
if (foo) {
bar(1 + 5)
}
body
h1 Jade - node template engine
#container.col
if youAreUsingJade
p You are amazing
else
p Get on it!
p.
Jade is a terse and simple
templating language with a
strong focus on performance
and powerful features.
<!DOCTYPE html><html lang="en"><head><title></title><script type="text/javascript">if (foo) {
bar(1 + 5)
}</script></head><body><h1>Jade - node template engine</h1><div id="container" class="col"><p>Get on it!</p><p>Jade is a terse and simple
templating language with a
strong focus on performance
and powerful features.</p></div></body></html>
Answer the question
In order to leave comments, you need to log in
Use the pretty option: true // 2 spaces '\t' tabs
jade-lang.com/api
Can be additionally run with pretfire because mixins are not properly formatted.
For example gulp-prettify How to remove extra padding when compiling Jade in mixins?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question