Display only a list of special archetypes

Hi there

i love hugo, its a great tool. Now i have trouble to realize the following.

i created a special archtype (themes). On my homepage i would like to show every post (theme). I have also “normal” sites like imprint or about. i created a template (partial/themes.li) with the following content.

{{ range .Data.Pages }}
 {{ .Title }}
{{ end }}

So it displays all pages (“normal” and “themes”). How can I display only the themes? Is there a function/variable to do that? Like .Data.Pages.ARCHTYPE or anything else?

thanks for your support.

No, but there are a powerful query language. Look for where in the documentation.

great, thanks for your help i solved it with the following filter

{{ range where .Data.Pages "Section" "themes"}}

{{ end }}
1 Like