我在使用 Hugo v0.16 并创建主题时遇到问题。
基本上我定义了一个list.html
带有{{ block }}
条目的文件,以便稍后在我的分类中覆盖它
阅读此处的文档后,文件中似乎应该有一个好的入口点/themes/THEME/layouts/_default/taxonomy.html
。但是当我渲染它时index.html
,它使用分类文件中的定义。我认为这是一个错误,但我只是想确定一下。
这是我的文件的基本内容:
_default/list.html
<h1>Foo {{ block "bar"}}{{ end }}</h1>
_default/taxonomy.html
{{ define "bar" }}Bar{{ end }}
我所期待的:
索引.html
<h1>Foo </h1>
/taxonomy_plural/taxonomy_term/
<h1>Foo Bar</h1>
但是 index.html 看起来像 /taxonomy_plural/taxonomy_term/ 这不是我想要的