Skip to content
New issue

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

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

Already on GitHub? Sign in 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.

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

Successfully merging this pull request may close these issues.

None yet

1 participant