Skip to content

Commit

Permalink
Merge pull request #332 from chromaui/create-plugin-section
Browse files Browse the repository at this point in the history
Update sidebar sections and rearrange docs
  • Loading branch information
domyen authored Dec 7, 2023
2 parents 8ad13af + 0d77a39 commit e5a3873
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/Navigation/Navigation.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface Props {
| CollectionEntry<"modes">
| CollectionEntry<"snapshot">
| CollectionEntry<"collaborate">
| CollectionEntry<"plugins">
| CollectionEntry<"ci">
| CollectionEntry<"account">
)[];
Expand Down
6 changes: 6 additions & 0 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ const collaborate = defineCollection({
schema,
});

const plugins = defineCollection({
type: "content",
schema,
});

const ci = defineCollection({
type: "content",
schema,
Expand All @@ -53,6 +58,7 @@ export const collections = {
modes,
snapshot,
collaborate,
plugins,
ci,
account,
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: "../../layouts/Layout.astro"
title: Figma in Chromatic
description: View Figma components next to their stories in Chromatic
sidebar: { order: 5 }
sidebar: { order: 3 }
---

# Figma in Chromatic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: "../../layouts/Layout.astro"
title: Figma Plugin
description: Connect stories to variants
sidebar: { order: 4 }
sidebar: { order: 2 }
---

# Figma plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: "../../layouts/Layout.astro"
title: Visual Tests addon for Storybook (beta)
description: Configure Storybook to test UIs with the Visual Tests Addon
sidebar: { order: 16, label: Addon for Storybook (beta) }
sidebar: { order: 1, label: Addon for Storybook (beta) }
---

# Visual Tests addon for Storybook
Expand Down
5 changes: 5 additions & 0 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const configuration = await getCollection("configuration");
const modes = await getCollection("modes");
const snapshot = await getCollection("snapshot");
const collaborate = await getCollection("collaborate");
const plugins = await getCollection("plugins");
const ci = await getCollection("ci");
const account = await getCollection("account");
Expand Down Expand Up @@ -52,6 +53,10 @@ const navItems = [
title: "Collaborate",
items: collaborate,
},
{
title: "Plugins",
items: plugins,
},
{
title: "CI",
items: ci,
Expand Down
2 changes: 2 additions & 0 deletions src/pages/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export async function getStaticPaths() {
const modes = await getCollection("modes");
const snapshot = await getCollection("snapshot");
const collaborate = await getCollection("collaborate");
const plugins = await getCollection("plugins");
const ci = await getCollection("ci");
const account = await getCollection("account");
const notInNavigation = await getCollection("notInNavigation");
Expand All @@ -19,6 +20,7 @@ export async function getStaticPaths() {
...modes,
...snapshot,
...collaborate,
...plugins,
...ci,
...account,
...notInNavigation,
Expand Down

1 comment on commit e5a3873

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.