diff --git a/content/essays/example.mdx b/content/essays/example.mdx index db2b89a..a1d1653 100644 --- a/content/essays/example.mdx +++ b/content/essays/example.mdx @@ -1,11 +1,10 @@ --- title: "Example Essay with Math" -createdAt: "2024-03-20" -updatedAt: "2024-03-20" +createdAt: "2024-02-27" --- -# Example Essay with Math +## hej This is an example of an essay with both inline math $E = mc^2$ and block math: $$ diff --git a/src/app/[...dir]/layout.tsx b/src/app/[...dir]/layout.tsx deleted file mode 100644 index b9feba8..0000000 --- a/src/app/[...dir]/layout.tsx +++ /dev/null @@ -1,7 +0,0 @@ -const Layout = ({ children }: { children: React.ReactNode }) => ( -
- {children} -
-); - -export default Layout; diff --git a/src/app/[...dir]/page.tsx b/src/app/[...dir]/page.tsx index 5d80d0d..0938ba4 100644 --- a/src/app/[...dir]/page.tsx +++ b/src/app/[...dir]/page.tsx @@ -5,12 +5,16 @@ import path from 'path'; import matter from 'gray-matter'; import remarkMath from 'remark-math'; import rehypeKatex from 'rehype-katex'; +import { Separator } from "@/components/ui/separator"; +import Link from "next/link"; +import ILink from "@/components/ilink"; // Update the type to match our MDX frontmatter type Post = { title: string; + author?: string; createdAt: string; - updatedAt: string; + updatedAt?: string; content: string; }; @@ -31,6 +35,7 @@ async function getPost(slug: string[]): Promise { return { title: data.title, + author: data.author, createdAt: data.createdAt, updatedAt: data.updatedAt, content: content, @@ -48,15 +53,22 @@ const Page = async ({ params }: { params: { dir: string[] } }) => { } return ( -
-

{post.title}

+
+ ← Home +

{post.title}

- + {post.updatedAt && ( )} + {post.author && ( + + Author: {post.author} + + )} +