Is this still the way to do it? Or is there a more condensed up-to-date version?
content
content/
βββ albums/
β βββ album-1.md
β βββ album-2.md
β βββ _index.md
βββ books/
β βββ fiction/
β β βββ fiction-1.md
β β βββ fiction-2.md
β β βββ _index.md
β βββ non-fiction/
β β βββ _index.md
β β βββ non-fiction-1.md
β β βββ non-fiction-2.md
β βββ book-1.md
β βββ book-2.md
β βββ _index.md
βββ _index.md
To list all regular pages, but exclude the non-fiction section:
{{ $p1 := site.RegularPages }}
{{ $p2 := (site.GetPage "books/non-fiction").Pages }}
{{ $p := $p1 | complement $p2 }}
{{ range $p.ByTitle }}
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ end }}
This assumes you have created content/books/non-fiction/_index.md
.
2 Likes
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.