mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-01 12:48:49 -05:00
5fd1e74903
``` git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash ``` Closes #11925
730 B
730 B
title | description | categories | keywords | action | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sections | Returns a collection of first level section pages. |
|
Given this content structure:
content/
├── books/
│ ├── book-1.md
│ └── book-2.md
├── films/
│ ├── film-1.md
│ └── film-2.md
└── _index.md
This template:
{{ range .Site.Sections }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}
Is rendered to:
<h2><a href="/books/">Books</a></h2>
<h2><a href="/films/">Films</a></h2>