Oops probably should've committed, not even sure what's changed. Set up MDX, set up cv and print, set up dark mode, look at react query

This commit is contained in:
2024-08-08 01:21:34 +01:00
parent 433ba19a7a
commit 7f88af8ee3
30 changed files with 3184 additions and 703 deletions

View File

@@ -0,0 +1,32 @@
import { glob } from "glob";
// type postMdx = {
// metadata: {
// title: string,
// date: string,
// coverImage: string,
// blurb: string,
// shortBlurb: string,
// tags: string[]
// }
// }
export async function generateStaticParams(): Promise<{slug: string[]}[]> {
const posts = await glob(`src/markdown/posts/[...slug]/**/*.mdx`, {
nodir: true,
});
const slugs = posts.map((post) => ({
slug: post.replace('src/markdown/posts/[...slug]/', '').replace(/\.mdx$/, '').split('/')
}));
return slugs;
}
export default function Post({params}: {params: { slug: string[] }}): React.JSX.Element {
return (
<>
{params.slug}
</>
);
}