import Layout from '../../components/layout'; import { getAllPosts, getPost } from '../../util/slug'; import ReactMarkdown from 'react-markdown'; import style from '../../styles/post.module.css'; function Post({ post }: any) { // eh return (<>
{post.content}
); } export async function getStaticProps({ params }: any) { const post = getPost(params.page); return { props: { post } }; } export async function getStaticPaths() { const posts = getAllPosts(); return { paths: posts.map((post: any) => { return { params: { page: post.slug } } }), fallback: false }; } export default Post;