import Link from 'next/link'
import { formatDate, type ThemeRouteContext } from 'ampless'
import { ampless } from '@/lib/ampless'
import { SiteHeader } from '@/components/site-chrome/site-header'
import { SiteSidebar } from '@/components/site-chrome/site-sidebar'
import { SiteFooter } from '@/components/site-chrome/site-footer'
import { CollapsibleSidebar } from '@/components/site-chrome/collapsible-sidebar'
// Docs home: sidebar nav on the left (with optional tag-driven
// sections), latest posts list on the right. Acts as the docs landing
// page until the user arranges static pages.
export default async function DocsHome(_: ThemeRouteContext) {
const [settings, theme, postsResult] = await Promise.all([
ampless.loadSiteSettings(),
ampless.loadThemeConfig(),
ampless.listPublishedPosts({ limit: 12 }),
])
const posts = postsResult.items
return (
<>