我正在尝试在包含中使用块:
例如:layout.jade
!!!5
html
head
body
include header
#footer footer
block javascript
script('src'= 'jquery.js')
header.jade
h1 header
append javascript
script
console.log('Hi, I'm header')
我有 :
<h1>header</h1>
<script>console.log('Hi, I'm header')</script>
<div id="footer" >footer</div>
<script src="jquery.js" ></script>
我会:
<h1>header</h1>
<div id="footer" >footer</div>
<script src="jquery.js" ></script>
<script>console.log('Hi, I'm header')</script>
谢谢 :)