Ami*_*mir 23
你可以使用mixins.将您的包含内容包含在mixin中,并在您的pug文件中调用mixin函数.请参阅下面的示例.
包括-file.pug
mixin my-include(title, description)
h1= title
p= description
Run Code Online (Sandbox Code Playgroud)
index.pug
include include-file
html
head
body
+my-include('my title', 'my description')
Run Code Online (Sandbox Code Playgroud)