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' import { getSearchIndex, SearchIndex } from '../utils/search' const pages = [ { slug: '/variables', title: 'Variables', desc: 'Variables let you define the various objects displayed in Conky including text, bars, graphs, and more.', }, { slug: '/config_settings', title: 'Configuration settings', desc: 'Global configuration pramaters for Conky allow you to customize various behaviours.', }, { slug: '/lua', title: 'Lua API', desc: 'Program wild things into your Conky with the Lua API', }, ] interface IndexProps { documents: Document[] searchIndex: SearchIndex } export default function Index({ documents, searchIndex }: 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() const searchIndex = getSearchIndex() return { props: { documents, searchIndex } } }