Standard.site landing page built in Next.js

Move llms.txt link from home nav to docs sidebar

aka.dad cba394ce 8b1109d5

verified
+23 -14
+22 -13
app/components/docs/DocsSidebar.tsx
··· 29 29 {section.title} 30 30 </span> 31 31 <div className="flex flex-col gap-1"> 32 - {section.items.map((item) => ( 33 - <Link 34 - key={item.href} 35 - href={item.href} 36 - className={`font-medium text-base tracking-tight py-0.5 ${ 37 - pathname === item.href 38 - ? 'text-base-content' 39 - : 'text-muted-content' 40 - } hover:text-base-content transition-colors`} 41 - > 42 - {item.label} 43 - </Link> 44 - ))} 32 + {section.items.map((item) => { 33 + const isDocPage = item.href.startsWith('/docs/') 34 + const className = `font-medium text-base tracking-tight py-0.5 ${ 35 + pathname === item.href 36 + ? 'text-base-content' 37 + : 'text-muted-content' 38 + } hover:text-base-content transition-colors` 39 + 40 + if (!isDocPage) { 41 + return ( 42 + <a key={item.href} href={item.href} className={className}> 43 + {item.label} 44 + </a> 45 + ) 46 + } 47 + 48 + return ( 49 + <Link key={item.href} href={item.href} className={className}> 50 + {item.label} 51 + </Link> 52 + ) 53 + })} 45 54 </div> 46 55 </div> 47 56 ))}
-1
app/data/content.ts
··· 8 8 9 9 export const SECONDARY_NAV_ITEMS = [ 10 10 { label: 'Documentation', href: '/docs/introduction' }, 11 - { label: 'llms.txt', href: '/llms.txt' }, 12 11 ] 13 12 14 13 export const EXTERNAL_LINKS = [
+1
app/data/docs-nav.ts
··· 32 32 items: [ 33 33 { label: 'Implementations', href: '/docs/implementations' }, 34 34 { label: 'FAQ', href: '/docs/faq' }, 35 + { label: 'llms.txt', href: '/llms.txt' }, 35 36 ], 36 37 }, 37 38 ]