grav-theme-learn2 icon indicating copy to clipboard operation
grav-theme-learn2 copied to clipboard

Add page TOC to navigation

Open shivahnshankar opened this issue 7 years ago • 3 comments

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?

shivahnshankar avatar Jan 12 '18 07:01 shivahnshankar

This is missing from the theme. Is there a way to integrate this currently? It should also be configurable which header are included into the menu. Standard could be h2. But it should be optional.

ghost avatar Aug 28 '18 12:08 ghost

still missing... Anyone any idea?

KoljaL avatar Apr 06 '20 12:04 KoljaL

the theme is dead :skull:

andrekutianski avatar Sep 23 '21 17:09 andrekutianski