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' import { Url } from 'url' 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 IndexItemProps { href: string as?: string title: string desc?: string } const IndexItem: React.FunctionComponent = (props) => { return (

{props.title}

{props.desc && (

{props.desc}

)}
) } interface IndexProps { documents: Document[] searchIndex: SearchIndex } export default function Index({ documents, searchIndex }: IndexProps) { return (
{pages.map((p) => ( ))} {documents.map((document) => ( ))}
) } export function getStaticProps() { const documents = getDocuments() const searchIndex = getSearchIndex() return { props: { documents, searchIndex } } }