Standard.site landing page built in Next.js
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add docs navigation data structure

+46
+46
app/data/docs-nav.ts
··· 1 + export interface DocsNavItem { 2 + label: string 3 + href: string 4 + } 5 + 6 + export interface DocsNavSection { 7 + title: string 8 + items: DocsNavItem[] 9 + } 10 + 11 + export const DOCS_NAV: DocsNavSection[] = [ 12 + { 13 + title: 'Getting Started', 14 + items: [ 15 + { label: 'Introduction', href: '/docs/introduction' }, 16 + { label: 'Quick Start', href: '/docs/quick-start' }, 17 + ], 18 + }, 19 + { 20 + title: 'Lexicons', 21 + items: [ 22 + { label: 'Publication', href: '/docs/lexicons/publication' }, 23 + { label: 'Document', href: '/docs/lexicons/document' }, 24 + ], 25 + }, 26 + { 27 + title: 'Resources', 28 + items: [ 29 + { label: 'FAQ', href: '/docs/faq' }, 30 + ], 31 + }, 32 + ] 33 + 34 + // Helper to get all doc slugs for static generation 35 + export function getAllDocSlugs(): string[][] { 36 + const slugs: string[][] = [] 37 + 38 + DOCS_NAV.forEach((section) => { 39 + section.items.forEach((item) => { 40 + const slug = item.href.replace('/docs/', '').split('/') 41 + slugs.push(slug) 42 + }) 43 + }) 44 + 45 + return slugs 46 + }