website icon indicating copy to clipboard operation
website copied to clipboard

Automatically generate the left-side docs menu

Open mikenikles opened this issue 4 years ago • 3 comments

For /docs/* URLs, we display a menu on the left-hand side that is currently hard-coded in src/lib/contents/docs/menu.ts.

In #1393, we move the documentation to a different repository and updating the menu.ts file in the website repo is no longer a convenient workflow. We need to auto-generate the menu based on frontmatter available in the documentation Markdown files.

Tasks

  • [ ] Remove all unused frontmatter properties in gitpod/docs/**/*.md.
  • [ ] Add a new status frontmatter property to mark menu items as "Beta" or "Soon" (possibly others in the future). See https://www.gitpod.io/docs/editors for how it will be used
  • [x] Write a new handle* function in src/hooks.ts to parse the documentation frontmatter and generate the menu.
  • [x] Update the getSession() function in src/hooks.ts to expose the generated docs menu.
  • [ ] Update gitpod/docs/__layout.svelte to use the generated docs menu.
    • [ ] Test on mobile
    • [ ] Test on desktop
  • [ ] Remove src/lib/contents/docs/menu

mikenikles avatar Dec 27 '21 18:12 mikenikles

@Cahllagerfeld is this issue still valid?

mikenikles avatar Jul 12 '22 06:07 mikenikles

It is in regards for versioning, I can link that issue to the relevant PR 👍

It's not implemented in the described way though

I'd love to sync on this before merging though

Cahllagerfeld avatar Jul 12 '22 06:07 Cahllagerfeld

👍 One for tomorrow's daily sync :)

mikenikles avatar Jul 13 '22 18:07 mikenikles

@Cahllagerfeld is this issue still relevant? Can it be closed? Should it be prioritized or moved to the backlog? 🙏

chrifro avatar Oct 18 '22 10:10 chrifro

That's not relevant anymore, closing it

Cahllagerfeld avatar Oct 18 '22 10:10 Cahllagerfeld