Skip to content

Commit

Permalink
docs: move sidebar for npm packages (#97)
Browse files Browse the repository at this point in the history
## Description

Move sidebar items for packages below components so that users
navigating with the next buttons come across the components before the
other npm packages. I also removed the dedicated sidebar for the npm
packages and directly added them to the "regular" sidebar to reduce
confusions while navigating our documentation.
  • Loading branch information
larsrickert authored Jan 10, 2024
1 parent 87912f0 commit 5ccce34
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 76 deletions.
83 changes: 26 additions & 57 deletions apps/docs/src/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,62 +29,31 @@ export default defineConfig({
{ text: "Q&A", link: "https://github.com/schwarzit/onyx/discussions/categories/q-a" },
],
socialLinks: [{ icon: "github", link: packageJson.repository.url }],
sidebar: {
// default sidebar items
"/": [
{
text: "Introduction",
collapsed: false,
items: [
{ text: "Getting Started", link: "/getting-started" },
{ text: "The Team", link: "/team" },
],
},
{
text: "Advanced",
collapsed: false,
items: [
{
text: "Additional packages",
link: "/packages/",
},
],
},
{
text: "Components",
base: "/components",
collapsed: false,
items: getComponents().map((name) => ({ text: name, link: `/${name}` })),
},
],
// standalone sidebar for documentation about our additional packages
"/packages/": [
{
text: "Introduction",
items: [
{ text: "Back to Onyx", link: "/getting-started" },
{ text: "About", link: "/packages/" },
],
},
{
text: "Additional packages",
base: "/packages",
items: [
{
text: "@sit-onyx/figma-utils",
link: "/figma-utils",
},
{
text: "@sit-onyx/headless",
link: "/headless",
},
{
text: "@sit-onyx/storybook-utils",
link: "/storybook-utils",
},
],
},
],
},
sidebar: [
{
text: "Introduction",
collapsed: false,
items: [
{ text: "Getting Started", link: "/getting-started" },
{ text: "The Team", link: "/team" },
],
},
{
text: "Components",
base: "/components",
collapsed: false,
items: getComponents().map((name) => ({ text: name, link: `/${name}` })),
},
{
text: "Other Onyx npm packages",
base: "/packages",
collapsed: false,
items: [
{ text: "Figma utilities", link: "/figma-utils" },
{ text: "Headless composables", link: "/headless" },
{ text: "Storybook utilities", link: "/storybook-utils" },
],
},
],
},
});
19 changes: 0 additions & 19 deletions apps/docs/src/packages/index.md

This file was deleted.

0 comments on commit 5ccce34

Please sign in to comment.