Skip to content

Is there a way to make the sidebar & outline management more DRY? #138

@brikis98

Description

@brikis98

I was working on a guide for the Production Framework, with the hope of having the sidebar on the left and an outline of the content in the first part of the article too, and as best as I can tell, this requires the following:

  1. Create folders and files with specific naming conventions: 01-xxx/01-intro.md, 01-xxx/02-another-thing.md, 02-xxx/01-intro.md.
  2. Manually create sidebars/production-framework-guide.js and copy/paste the file/folder structure into it, and manually keep it in sync as new files are added/removed.
  3. Specify pagination_label in some of the .md files. Not sure what happens if I don't?
  4. Manually include the page title as an h1 via # <title> and in the front matter.
  5. If I want an outline in addition to the sidebar, I have to create the outline manually in the body of the intro .md file. I didn't see a way to generate this programmatically?

Note that I'm not sure I'm doing this right; I was basically copying the Ref Arch guide structure and used a lot of trial and error to get this working. So if there's a simpler way, LMK!

Is there any way to just create the files on disk and have (a) the sidebar created automatically and (b) a programmatic way to have an outline in the body too?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions