【发布时间】:2022-05-03 10:19:10
【问题描述】:
我使用此代码在/content/posts 中的帖子的相同部分中显示相关帖子。但是,当我将内容移动到嵌套部分(例如 content/posts/news)时,代码停止工作,导致出现其他部分的内容。谁能提供解决方案或指导我如何完成这项工作?
{{ range where (where site.RegularPages "Section" .Section) "Permalink" "ne" .Permalink }}
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ end }}
【问题讨论】:
标签: go hugo hugo-content-organization