Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Site + RTFM documentation in one?

Started by Muut Archive 10 years ago · 8 replies · 418 views
10 years ago

Is there a straightforward way to have the RTFM documentiation to a grav site without duplicating the grav system folders?

10 years ago

This worked out pretty well, only that it ends up also with the default theme's pages in the documentation's navigation sidebar as chapters of the documentation. Do you know of a way to use the documentation theme just for one page and its contents?

10 years ago

tried to solve it by collections:

YAML
title: Getting started
taxonomy:
    category: docs
theme: learn2
content:
   items:
      '@taxonomy.category': docs

Still shows all the pages in sidebar navigation.

10 years ago

Still didn't got it, but got closer to it:

in sidebar.html.twig I added a [2:]:

TWIG
{% for p in page.children[2:] %}

This makes only the documentation folder's children listed on the sidebar as wanted but it's isn't good because it lists the parent as the only top level menu entry, so the whole thing is slipped up one level.

10 years ago

Tried to introduce another for loop, which will let me get rid of the top level menu, but completely messes up the menu items, showing only the top level elements for every chapter and navigation is broken.

TWIG

{% for pa in page.children[2:] %}
    {% for p in pa.children %}
---
10 years ago

I'm attempting to figure this out as well. Will post if I can manage anything.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1359 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2956 9 years ago
Archive · by Muut Archive, 9 years ago
3 1121 9 years ago