API link like on learn.getgrav.org


I just started using GRAV and wanted to use it to document one of my projects. I’ve found the learn2 skeleton which I set up and already created a custom of pages for, when I found the “API” link on learn.getgrav.org. I’d like to set up a link like this as well for a class reference also generated via sami, but wasn’t able to figure out how to do that.

How can I pass the /api route to my own custom folder and add it as a menu item in the learn2 theme?

Thanks in advance!

To add a new menu item, you need to edit the sidebar Twig, https://github.com/getgrav/grav-theme-learn2/blob/develop/templates/partials/sidebar.html.twig#L47-L53 - best way to do it is in a child theme.