I have a file includes/mixins.pug
that has some mixins. I also have a main layout file layouts/default.pug
that I am extend
-ing. How can I include those mixins in my layout file so that I don't have to write include includes/mixins
on every page?
For example, this is what I have to do for each additional pug file. In this case: new_page.pug
extends layouts/default
include includes/mixins
block content
+my_mixin('Hello World')
layouts/default.pug
doctype html
html(lang=$localeName)
block vars
head
meta(charset="UTF-8")
meta(http-equiv="X-UA-Compatible" content="IE=edge")
meta(name="viewport" content="width=device-width, initial-scale=1.0")
block styles
link(rel="stylesheet" type="text/css" href="/assets/css/styles.min.css")
body
block content
How do I include the mixins in layouts/default.pug
? I had trouble finding a solution in the documentation.