import Link from 'next/link';
import Layout from '../components/layout';
import { Sites } from '../lib/site';
import SiteMap from '../public/sitemap.json';
function Desc(props: any) {
return (
{props.term}
{props.details}
{props.children}
);
}
function traverseMap(head?: Sites, cwd = '', depth = 0) {
if (!head) return [];
let elements = [];
for (const [slug, site] of Object.entries(head)) {
if (slug === 'sitemap')
continue;
let details;
let list;
const path = `${cwd}/${slug}`;
details = paulw.xyz{path};
list = traverseMap(site.pages, path, depth + 1);
elements.push({list})
}
return elements;
}
function SiteMapPage() {
return
{traverseMap(SiteMap.pages)}
;
}
export default SiteMapPage;