mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 16:39:03 -04:00
Add link on how to configure TOC w/ Goldmark
This commit is contained in:
parent
ea339f2d67
commit
fd38286737
@ -18,7 +18,11 @@ toc: true
|
||||
---
|
||||
|
||||
{{% note "TOC Heading Levels are Fixed" %}}
|
||||
Currently, the `{{.TableOfContents}}` [page variable](/variables/page/) does not allow you to specify which heading levels you want the TOC to render. [See the related GitHub discussion (#1778)](https://github.com/gohugoio/hugo/issues/1778). As such, the resulting `<nav id="TableOfContents"><ul></ul></nav>` is going to start at `<h1>` when pulling from `{{.Content}}`.
|
||||
|
||||
Previously, there was no out-of-the-box way to specify which heading levels you want the TOC to render. [See the related GitHub discussion (#1778)](https://github.com/gohugoio/hugo/issues/1778). As such, the resulting `<nav id="TableOfContents"><ul></ul></nav>` was going to start at `<h1>` when pulling from `{{.Content}}`.
|
||||
|
||||
Hugo [v0.60.0](https://github.com/gohugoio/hugo/releases/tag/v0.60.0) made a switch to [Goldmark](https://github.com/yuin/goldmark/) as the default library for Markdown which has improved and configurable implementation of TOC. Take a look at [how to configure TOC](/getting-started/configuration-markup/#table-of-contents) for Goldmark renderer.
|
||||
|
||||
{{% /note %}}
|
||||
|
||||
## Usage
|
||||
|
Loading…
x
Reference in New Issue
Block a user