Skip to content

[Feature Request] Specify which folders in ToC are expanded by default #576

Description

@michjnich

Allow ToC to expand sections by default

Say I have a posts structure as follows:

Posts
-- Tech
-- -- 2022
-- -- 2021
-- -- 2020
-- Personal
-- -- 2022

At the moment, when I go into posts I will see Tech and Personal at the top level. I would also like to see the expanded view of Tech though, and possibly even the expanded view of the most recent year (2022).

Describe alternatives you've considered

The solution I was considering was to add a parameter to the _index.md file for these folders to set expand. The default would be false (as is) and would only change if explicitly set.

So, eg.

---
title: Technology
menu:
  sidebar:
    name: Tech
    identifier: tech
    expand: true
    weight: 1000
---

If this is set then the section is expanded by default when the page is created.

Additional context

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions