import Link from 'next/link' import { getDocuments, Document } from '../utils/mdx-utils' import Layout from '../components/Layout' import ArrowIcon from '../components/ArrowIcon' import SEO from '../components/SEO' const pages = [ { slug: '/config_settings', title: 'Configuration settings', desc: 'Global configuration pramaters for Conky allow you to customize various behaviours.', }, { slug: '/variables', title: 'Variables', desc: 'Variables let you define the various objects displayed in Conky including text, bars, graphs, and more.', }, { slug: '/lua', title: 'Lua API', desc: 'Program wild things into your Conky with the Lua API', }, ] interface IndexProps { documents: Document[] } export default function Index({ documents }: IndexProps) { return (
{pages.map((p) => (

{p.title}

{p.desc}

))} {documents.map((document) => (

{document.data.title}

{document.data.description && (

{document.data.description}

)}
))}
) } export function getStaticProps() { const documents = getDocuments() return { props: { documents } } }