I have the following structure in my content directory.
├── hug
│ └── index.md
├── links
│ ├── 2024-05-27-link1.md
│ ├── 2024-05-28-link2.md
│ ├── 2024-05-29-link3.md
│ ├── 2024-06-11-link4.md
│ └── 2024-06-18-link5.md
└── posts
└── my-first-post.md
In my layout index.html file if have the following two blocks.
<div>
<h1>Blog</h1>
{{- range (.Paginate ( where site.RegularPages "Section" "posts" ) ).Pages }}
<div>
<a href="{{.Permalink}}">{{ .Title }}</a>
</div>
{{- end}}
</div>
<div>
<h1>Links</h1>
{{ range (.Paginate ( where site.RegularPages "Section" "links" ) ).Pages }}
<div>
<a href="{{.Permalink}}">{{ .Title }}</a>
</div>
{{ end}}
</div>
I would expect that the first block outputs all content from posts directory and the second block all content from links. Nevertheless, both blocks output only the one entry from posts.
But outputting the sections on the other hand produces exactly two entries using the following.
<div>
<h1>Sections</h1>
{{ range .Site.Sections }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</div>
Even though I’m surprised that hug is completely ignored for both cases.
What am I missing here?
Thanks.
