我在 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 的哈巴狗模板中替换标签?我想避免实际上必须在我的每个模板中手动添加元标记。