File size: 1,238 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
import { docs } from ".velite"
const getStarted = docs
.filter((page) => page.category.startsWith("docs/get-started"))
.map((page) => ({
label: page.title,
value: page.slug,
description: page.description,
category: "Get started",
}))
const styling = docs
.filter((page) => page.category.startsWith("docs/styling"))
.map((page) => ({
label: page.title,
value: page.slug,
description: page.description,
category: "Styling",
}))
const theming = docs
.filter((page) => page.category.startsWith("docs/theming"))
.map((page) => ({
label: page.title,
value: page.slug,
description: page.description,
category: "Styling",
}))
const components = docs
.filter((page) => page.category.startsWith("docs/components"))
.map((page) => ({
label: page.title,
value: page.slug,
description: page.description,
category: "Component",
}))
const charts = docs
.filter((page) => page.category.startsWith("docs/charts"))
.map((page) => ({
label: page.title === "Charts" ? "Get Started" : page.title,
value: page.slug,
description: page.description,
category: "Charts",
}))
export const data = { getStarted, styling, theming, components, charts }
|