Skip to content

Section,VertualSection,index.md and the flatten setting #124

@daCyberpunk

Description

@daCyberpunk

I've been using Version 2 for a while and decided to try the new version.
However, I ran into a significant change that I found confusing. In Version 2, my document structure allowed me to create sections in two ways: either by using a Component: entry in my .pages file which made it a VirtualSection, or simply listing files under the nav: section, creating a regular Section.

I have my doc structured like:

component
--index.md
----a_component
----another

my .pages was looking like either:
`nav:

  • Component:
    • index.md
    • a_component
    • another
      `

What makes the Component a VirtualSection, or:

`nav:

  • index.md
  • a_component
  • another`

What made Component a Section

With the flattening option enabled, clicking on a Component section in the frontend displayed its contents (from index.md) along with its subpages.

The new version behaves differently. Now I am getting in Frontend always:

component
--Component
----a_component
----another

I've tried adjusting the flattening setting in my .nav.yml files, both within the component directory and its parent, but I couldn't reproduce the previous behavior. I experimented with various configurations, trying also to understand the interaction between parent and child .nav.yml files

It became difficult to manage the overall structure. My goal is simply to have section links that can either display content themselves or just act as containers for subpages.

Now it is like not seeing the Forest anymore because of the trees.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions