diff --git a/next.config.js b/next.config.js index e6cee3e..8af3852 100644 --- a/next.config.js +++ b/next.config.js @@ -10,14 +10,6 @@ const nextConfig = { return config; }, trailingSlash: true, - async rewrites() { - return [ - { - source: '/ai', - destination: '/posts/2024-ai-manifesto', - }, - ]; - }, }; module.exports = nextConfig; diff --git a/pages/ai.tsx b/pages/ai.tsx new file mode 100644 index 0000000..219ef7a --- /dev/null +++ b/pages/ai.tsx @@ -0,0 +1,41 @@ +import { getPost, PostFull } from "../lib/getPosts"; +import markdownToHtml from "../lib/markdownToHtml"; +import { MainFooter } from "../components/MainFooter"; +import { PostBody } from "../components/PostBody"; +import { SharedHead } from "../components/SharedHead"; +import { PostHeader } from "../components/PostHeader"; +import { SharedNav } from "../components/SharedNav"; + +export default function AI(props: { post: PostFull }) { + return ( +
+ + +
+
+ + +
+
+
+
+ +
+
+
+ ); +} + +export async function getStaticProps() { + const post = getPost("2024-ai-manifesto"); + const content = await markdownToHtml(post.content || ""); + + return { + props: { + post: { + ...post, + content, + }, + }, + }; +}