Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow to collapse even with multiple children #93

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dentou
Copy link

@dentou dentou commented Nov 26, 2023

This PR introduces an additional flag force_collapse to allow a section to collapse even if it has multiple children, which is a simple workaround for the issue in #53.

Considering the example in the issue above, the original file structure is as follows:

.
└── projects/
    └── project_name/
        └── docs/
            ├── page1.md
            ├── page2.md
            └── subdir/
                └── page3.md

The generated structure would be:

  • Projects/
    • Project_name/
      • Docs/
        • Page1
        • Page2
        • Subdir/
          • Page3

To move everything within Docs up one level, put a .pages file inside the docs folder with the following contents:

collapse: true
force_collapse: true

The new structure would be:

  • Project/
    • Project_name/
      • Page1
      • Page2
      • Subdir/
        • Page3

which is the desired outcome described in #53.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant