Retrieving .Content and .Params from section listing?

I have found and which outline how to list sections (such as in the index.html). But I can’t figure out how to get the .Content or .Params that is specified in the for the sections. Is there a way to also access everything for the sections index pages?

Section pages are list pages and not single-page templates.

So, for example…

<!--layouts/_default/section.html--> ?
<!--In here do whatever you want for your section/index.html page-->

Look into the lookup order for list pages in Hugo. HTH.

Also check out .Site.GetPage function in the docs here:

I think maybe we are talking about two different things… I did not understand what you meant. But I actually figured this out and it was very simple.

It looks like Section pages have a Kind of “section”. The filter for the index.html became:

{{- range where .Site.Pages "Kind" "section" }}
<h4>{{ .Title }}</h4>
<a href="{{ .Params.external_link }}">Link</a>
<p>{{ .Summary }}</p>
{{ end }}

This will display all the section pages on the index.


You asked for…

…the .Content or .Params that is specified in the


That’s the .GetPage function: but that will just grab individual pages for sections; I think I misunderstood :smile: