是否可以使用相互扩展的模板?
说,我有这些文件:
base.html:
<html><head>...<head><body>{{{ contents }}}</body></html>
三列.html:
---
layout: base.html
---
<div class="three-cols-row">
<div class="first col">
{{> nav}}
</div>
<div class="second col">
{{{ contents }}}
</div>
<div class="third col">
{{> aside}}
</div>
</div>
somePost.html:
---
layout: threeColumns.html
---
My awesome blogbost
期望的输出:
<html><head>...<head>
<body>
<div class="three-cols-row">
<div class="first col">
NAV CONTENT
</div>
<div class="second col">
My awesome blogbost
</div>
<div class="third col">
ASIDE CONTENT
</div>
</div>
</body>
</html>
我正在使用金属匠布局。