mixin article(title) article h2.title= title block
+article('hello there') p Content goes here
See: Mixin blocks
mixin pet(name) span.pet= name
See: Mixin attributes
mixin list ul ···
Mixins allow you to create reusable code blocks.
if authenticated a(href='/logout') Sign out else a(href='/login') Sign in
p. This is text that doesn't need to be prefixed by pipes.
//- page.pug extends layout.pug block title | hello block content | hello
//- layout.pug title block title body block content
ul each user in users li= user
// This comment will appear in the HTML
//- This is a silent comment
//- Nesting inside a comment creates a comment block