getgrav / getgrav/grav-theme-learn2

Add page TOC to navigation

Open
#71 3 comments 4 reactions 0 assignees View on GitHub
Dominant language
SCSS
Stars
79
Forks
40
PR merge metrics
No merged PRs in 30d

Description

It would be great to have an option to add the TOC as links in the navigation menu when reading a long page with lots of headers. Else we would need to break the document into smaller chunks in a lot of folders, or use the TOC syntax in the page but it only displays the TOC at the top of the page itself, rather than the navigation menu.

In the forum, I saw that this can be enabled by inserting {{page.content | toc}} in the twig template of Learn2 that loops over the documents. Any suggestion where this could be inserted?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.