import Head from 'next/head'; import Image from 'next/image'; import * as React from 'react'; import ReactMarkdown from 'react-markdown'; import fs from 'fs'; import yaml from 'js-yaml'; import styles from '../styles/Home.module.css'; import { withHotContentReload } from '../../dist/hotContentReload'; function Home(props) { return (
Create Next App

{props.title}

{props.description}

{props.grid.map((gridItem, index) => (

{gridItem.title}

{gridItem.text}

))}
); } export default withHotContentReload(Home); function Markdown({ inline, children }) { return ( { return ( {children} ); } }} > {children} ); } export function getStaticProps() { const yamlData = fs.readFileSync('content/index.yaml', 'utf-8'); const props = yaml.load(yamlData); return { props }; }