Skip to content

Can I have folders inside an autogenerated directory with each folder being just a page in the sidebar? #2207

Closed Answered by delucis
darrenparkinson asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @darrenparkinson, you have two options here, or rather I guess two versions of the same option depending on the complexity of your project.

I’d recommend switching away from full autogeneration to reference pages with slugs, so for example based on your content tree, this could look like:

{
    label: 'My Group of Things',
    items: ['thing1/readme', 'thing2/readme'],
},

Internal link shorthand like this still loads all the metadata like page title etc. from the content files, but they are specified directly giving you full control of their nesting, order etc.

Version two is kind of an update on this if you have a lot of instances of this and really do want to autogenerate rather than…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@darrenparkinson
Comment options

Answer selected by darrenparkinson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants