Includes allow you to insert the contents of one Pug file into another.
The path of the included file, if specified absolutely (e.g.
include /root.pug), is resolved by prepending
options.basedir to the file name provided. Otherwise, the path is relative to the current file being compiled.
If no file extension is given,
.pug is automatically appended to the file name.
Including Plain Text
Including files that are not Pug just includes the raw text.
Including Filtered Text
You can combine filters with includes to filter things as you include them.
//- index.pug html head title An Article body include:markdown-it article.md
# article.md This is an article written in markdown.
<html> <head> <title>An Article</title> </head> <body> <h1>article.md</h1> <p>This is an article written in markdown.</p> </body> </html>