【发布时间】:2022-01-22 01:19:44
【问题描述】:
我在 Wintersmith layout.pug 中有以下行:
...
head
meta(name='description' content=locals.description)
...
我知道我可以在article.pug 模板中添加到 head 块中,如下所示:
...
block append head
meta(name='author' content=#{page.meta.author})
...
但现在我有两次 description 元标题:
<meta name="description" content="The thing from config.json.">
<meta name="description" content="The thing from the individual article.">
有没有办法替换 Wintersmith 中哈巴狗模板中的标签?我想避免实际上必须在每个模板中手动添加元标记。
【问题讨论】:
标签: pug wintersmith