Skip to content

Commit e85c723

Browse files
refactor: import snap sidebar config from JSON for automated sync
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8075751 commit e85c723

2 files changed

Lines changed: 40 additions & 37 deletions

File tree

src/lib/nav-config.ts

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import snapSidebar from "./snap-sidebar.json";
2+
13
export type NavLink = {
24
text: string;
35
link: string;
@@ -637,43 +639,7 @@ export const SECTIONS: SectionConfig[] = [
637639
text: "Snap",
638640
link: "/snap/",
639641
pathPrefix: "/snap",
640-
sidebar: [
641-
{
642-
text: "Learn",
643-
items: [
644-
{ text: "Introduction", link: "/snap/" },
645-
{ text: "Examples", link: "/snap/examples" },
646-
],
647-
},
648-
{
649-
text: "Create",
650-
items: [{ text: "Building a Snap", link: "/snap/building" }],
651-
},
652-
{
653-
text: "Integrate",
654-
items: [
655-
{ text: "On existing website", link: "/snap/existing-site" },
656-
],
657-
},
658-
{
659-
text: "Reference",
660-
items: [
661-
{ text: "Elements", link: "/snap/elements" },
662-
{ text: "Buttons", link: "/snap/buttons" },
663-
{ text: "Actions", link: "/snap/actions" },
664-
{ text: "Effects", link: "/snap/effects" },
665-
{ text: "Constraints", link: "/snap/constraints" },
666-
{ text: "Theme & Styling", link: "/snap/theme" },
667-
{ text: "Color Palette", link: "/snap/colors" },
668-
{ text: "Authentication", link: "/snap/auth" },
669-
{ text: "Data Store", link: "/snap/data-store" },
670-
],
671-
},
672-
{
673-
text: "Agents",
674-
items: [{ text: "Agents", link: "/snap/agents" }],
675-
},
676-
],
642+
sidebar: snapSidebar as SidebarItem[],
677643
},
678644
];
679645

src/lib/snap-sidebar.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[
2+
{
3+
"text": "Learn",
4+
"items": [
5+
{ "text": "Introduction", "link": "/snap/" },
6+
{ "text": "Examples", "link": "/snap/examples" }
7+
]
8+
},
9+
{
10+
"text": "Create",
11+
"items": [{ "text": "Building a Snap", "link": "/snap/building" }]
12+
},
13+
{
14+
"text": "Integrate",
15+
"items": [
16+
{ "text": "On existing website", "link": "/snap/existing-site" }
17+
]
18+
},
19+
{
20+
"text": "Reference",
21+
"items": [
22+
{ "text": "Elements", "link": "/snap/elements" },
23+
{ "text": "Buttons", "link": "/snap/buttons" },
24+
{ "text": "Actions", "link": "/snap/actions" },
25+
{ "text": "Effects", "link": "/snap/effects" },
26+
{ "text": "Constraints", "link": "/snap/constraints" },
27+
{ "text": "Theme & Styling", "link": "/snap/theme" },
28+
{ "text": "Color Palette", "link": "/snap/colors" },
29+
{ "text": "Authentication", "link": "/snap/auth" },
30+
{ "text": "Data Store", "link": "/snap/data-store" }
31+
]
32+
},
33+
{
34+
"text": "Agents",
35+
"items": [{ "text": "Agents", "link": "/snap/agents" }]
36+
}
37+
]

0 commit comments

Comments
 (0)