Skip to content

Commit 3f81701

Browse files
authored
feat: move comment widget below navigation in blog articles (#60)
1 parent 25a3952 commit 3f81701

File tree

3 files changed

+13
-26
lines changed

3 files changed

+13
-26
lines changed

next.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { createMDX } from "fumadocs-mdx/next";
2-
import { docs, blog } from "./source.config.ts";
2+
import { createJiti } from "jiti";
3+
4+
const jiti = createJiti(import.meta.url, { interopDefault: true, moduleCache: false });
5+
const { docs, blog } = jiti("./source.config.ts");
36

47
const withMDX = createMDX({
58
collections: { docs, blog },

package-lock.json

Lines changed: 1 addition & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/blog/[...slug]/page.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ export default async function Page({ params }: { params: Promise<{ slug: string[
3636
const readTime = calculateReadingTime(rawContent);
3737

3838
return (
39-
<DocsPage toc={toc} full={pageData.full}>
39+
<DocsPage
40+
toc={toc}
41+
full={pageData.full}
42+
footer={{
43+
// Render comments below the built-in prev/next recommendations
44+
children: <Comments />,
45+
}}
46+
>
4047
<div className="mb-8">
4148
<h1 className="mb-4 text-3xl font-bold tracking-tight text-foreground sm:text-4xl">
4249
{pageData.title}
@@ -61,7 +68,6 @@ export default async function Page({ params }: { params: Promise<{ slug: string[
6168
</div>
6269
)}
6370
<MDX components={getMDXComponents()} />
64-
<Comments />
6571
</DocsBody>
6672
</DocsPage>
6773
);

0 commit comments

Comments
 (0)