art-template模板继承
include
block
extent
footer.html
<div>
<h1>公共的底部</h1>
</div>
layout.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.css">
{{ block 'head' }}{{ /block }}
</head>
<body>
{{ include './header.html' }}
{{ block 'content' }}
<h1>默认内容</h1>
{{ /block }}
{{ include './footer.html' }}
<script src="/node_modules/jquery/dist/jquery.js"></script>
<script src="/node_modules/bootstrap/dist/js/bootstrap.js"></script>
{{ block 'script' }}{{ /block }}
</body>
</html>
list.html
{{extend './layout.html'}}
{{ block 'content' }}
<div>
<h1>列表页自己的内容</h1>
</div>
{{ /block }}
来源:CSDN
作者:黎犁泥栗
链接:https://blog.csdn.net/qq_43618136/article/details/104735999