Hello all,
i have 2 blogs in my hugo project, so I list them using the type attribute from frontmatter {{ $paginator := .Paginate (where .Site.Pages "Params.type" "xyz-blog") }} .
Also on the same list page, I show categories and their total count {{ range $name, $taxonomy := .Site.Taxonomies.categories }}. Now the problem is it shows categories from both the blogs since I have used .Site.
Can someone please help me with the correct syntax . Thanks in advance
Also, I need to ask, so I have categories/taxonomy.html page so when I click on the above $href link it navigates to this page, and here it shows listings from both blogs. Any way out for that ??
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range where .Pages "Params.type" "xyz-blog" }}
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ end }}
{{ end }}
However, if you were on a page in “other-blog” to which the term “foo” was applied to the “categories” taxonomy, and you clicked on the “foo” link, you would not see any pages from “other-blog”. So this is a global change to what is presented for any term in the “categories” taxonomy.
What you are doing seems a bit messy. It seems like it would be easier to use a different taxonomy for the “other-blog”.