I have 2 sections I want to cross-link automatically: posts and wiki
in each wiki page I want:
for page in .Section.Posts:
if .Params.name or .Params.symbol in page.tags:
\<a href= page.Permalink > page.title </a>
This is what I got so far:
<h2> Read more detailed posts about {{.Params.name}}:</h2>
<ul>
{{ $pages := (union (where .Pages "tags" .Params.symbol) (where .Pages "tags" .Params.name) ) }}
{{- range intersect (where .Pages "Section" "posts") $pages}}
<li> <a href="{{.RelPermalink}}"> {{.title}}</a> </li>
{{end}}
</ul>
Iterating syntax in Hugo is very hard, I appreciate any advice or resource to help understand it (any more than reading the docs and videos).