import Link from 'next/link'; import Layout from '../components/layout'; import { Site } from '../lib/site'; import SiteMap from '../public/sitemap.json'; function traverseMap(head: Site, cwd = '', depth = 0) { if (head.subpages === undefined) return []; let elements = []; for (const [slug, info] of Object.entries(head.subpages)) { const path = `${cwd}/${slug}`; const children = (<>); elements.push(<>
  • {info.title} {children}
  • ); } return elements; } function SiteMapPage() { return ; } export default SiteMapPage;