-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate breadcrumbs in the nav groups transform and use the transfor…
…med data for SearchMeta
- Loading branch information
1 parent
3490c42
commit e299809
Showing
8 changed files
with
582 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import { getCollection } from "astro:content"; | ||
import { transformNavGroups, flattenGroups } from "./transform-nav-groups"; | ||
|
||
const overview = await getCollection("overview"); | ||
const storybook = await getCollection("storybook"); | ||
const playwright = await getCollection("playwright"); | ||
const cypress = await getCollection("cypress"); | ||
const configuration = await getCollection("configuration"); | ||
const modes = await getCollection("modes"); | ||
const snapshot = await getCollection("snapshot"); | ||
const snapshotOptions = await getCollection("snapshotOptions"); | ||
const turbosnap = await getCollection("turbosnap"); | ||
const collaborate = await getCollection("collaborate"); | ||
const plugins = await getCollection("plugins"); | ||
const ci = await getCollection("ci"); | ||
const account = await getCollection("account"); | ||
const guides = await getCollection("guides"); | ||
const troubleshooting = await getCollection("troubleshooting"); | ||
|
||
const rawNavGroups = [ | ||
{ | ||
title: "Overview", | ||
items: overview, | ||
defaultOpen: true, | ||
timeline: true, | ||
}, | ||
{ | ||
title: "Storybook", | ||
items: [ | ||
...storybook, | ||
{ | ||
title: "Modes", | ||
items: modes, | ||
}, | ||
{ | ||
title: "TurboSnap", | ||
items: turbosnap, | ||
}, | ||
], | ||
defaultOpen: false, | ||
}, | ||
{ | ||
title: "Playwright", | ||
items: playwright, | ||
timeline: true, | ||
}, | ||
{ | ||
title: "Cypress", | ||
items: cypress, | ||
timeline: true, | ||
}, | ||
{ | ||
title: "Guides", | ||
items: guides, | ||
}, | ||
{ | ||
title: "Configuration", | ||
items: configuration, | ||
}, | ||
{ | ||
title: "Snapshot", | ||
items: snapshot, | ||
}, | ||
{ | ||
title: "Snapshot options", | ||
items: snapshotOptions, | ||
}, | ||
{ | ||
title: "Collaborate", | ||
items: collaborate, | ||
}, | ||
{ | ||
title: "CI", | ||
items: ci, | ||
}, | ||
{ | ||
title: "Plugins", | ||
items: plugins, | ||
}, | ||
{ | ||
title: "Account", | ||
items: account, | ||
}, | ||
{ | ||
title: "Troubleshooting", | ||
items: troubleshooting, | ||
}, | ||
]; | ||
|
||
export const navGroups = transformNavGroups(rawNavGroups); | ||
export const flattenedNavItems = flattenGroups(navGroups); |
Oops, something went wrong.