Syntax
The syntax is based on Pug (formerly known as Jade). Most of Pug’s syntax is supported.
Elements
Write elements in short CSS-like syntax. Express nesting through indentation.
.alert.alert-danger#error
a(href="google.com") Google
See: Elements
Code
Use =
and -
to run Elixir code.
= if @user do
= "Welcome, #{@user.name}"
- else
| You're not signed in.
See: Code
Text
Text nodes begin with |
.
a(href="/signup")
| Register now
See: Text
Comments
//- This is a comment
-# this, too
// this is an HTML comment
See: Comments
Doctype
doctype html
See: Doctype
Compatibility with Pug
Most of Pug’s syntax is supported, with a few differences. See: Compatibility with Pug