对于我的 blogdown 创建的网站(使用Xmin https://themes.gohugo.io/hugo-xmin/主题),帖子目录(我可以从中查看单个帖子)出现在主页上,而不是单个帖子。
https://joshuamrosenberg.com/ https://joshuamrosenberg.com/
这似乎是在更新到最新版本的 Hugo 后发生的。我的网站的来源是here https://github.com/jrosen48/utk-homepage。我有点困惑该怎么办:你有什么建议吗?
这是由于 Hugo 0.57.0 中的重大更改造成的,并且我已经解决了这个问题 https://github.com/yihui/hugo-xmin/commit/6123be24bf4a7517ae9cbf05882b62f52684d16d在最新版本的 XMin 主题中。基本上你需要更换
{{ range (where .Data.Pages "Section" "!=" "") }}
with
{{ $pages := .Pages }}
{{ if .IsHome }}{{ $pages = .Site.RegularPages }}{{ end }}
{{ range (where $pages "Section" "!=" "") }}
在模板文件中layouts/_default/list.html
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)