mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
---
|
||||
title: Section
|
||||
description: Returns the name of the top level section in which the given page resides.
|
||||
description: Returns the name of the top-level section in which the given page resides.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/page/Type
|
||||
returnType: string
|
||||
signatures: [PAGE.Section]
|
||||
params:
|
||||
functions_and_methods:
|
||||
returnType: string
|
||||
signatures: [PAGE.Section]
|
||||
---
|
||||
|
||||
{{% glossary-term section %}}
|
||||
|
||||
With this content structure:
|
||||
|
||||
```text
|
||||
@@ -29,7 +30,7 @@ When rendering lesson-1.md:
|
||||
{{ .Section }} → lessons
|
||||
```
|
||||
|
||||
In the example above "lessons" is the top level section.
|
||||
In the example above "lessons" is the top-level section.
|
||||
|
||||
The `Section` method is often used with the [`where`] function to build a page collection.
|
||||
|
||||
|
Reference in New Issue
Block a user