mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-11 15:29:57 -04:00
Fix documentation of Fragments
This commit is contained in:
parent
73a6cd966b
commit
41ca381b0e
@ -28,14 +28,15 @@ Use the `Fragments` method on a `Page` object to create a table of contents with
|
|||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
Headings
|
Headings
|
||||||
: (`map`) A nested map of all headings on the page. Each map contains the following keys: `ID`, `Level`, `Title` and `Headings`. To inspect the data structure:
|
: (`slice`) A slice of maps of all headings on the page, with first-level keys for each heading. Each map contains the following keys: `ID`, `Level`, `Title` and `Headings`. To inspect the data structure:
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
<pre>{{ debug.Dump .Fragments.Headings }}</pre>
|
<pre>{{ debug.Dump .Fragments.Headings }}</pre>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
HeadingsMap
|
HeadingsMap
|
||||||
: (`slice`) A slice of maps of all headings on the page, with first-level keys for each heading. Each map contains the following keys: `ID`, `Level`, `Title` and `Headings`. To inspect the data structure:
|
: (`map`) A nested map of all headings on the page. Each map contains the following keys: `ID`, `Level`, `Title` and `Headings`. To inspect the data structure:
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
<pre>{{ debug.Dump .Fragments.HeadingsMap }}</pre>
|
<pre>{{ debug.Dump .Fragments.HeadingsMap }}</pre>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user