Skip to content

Commit fdf4818

Browse files
Copilothuangyiirene
andcommitted
Consolidate TOC configuration and address code review feedback
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
1 parent 166df96 commit fdf4818

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

apps/site/app/docs/[[...slug]]/page.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,6 @@ export default async function Page({
1919
toc={page.data.toc}
2020
full={page.data.full}
2121
lastUpdate={page.data.lastModified}
22-
tableOfContent={{
23-
enabled: true,
24-
footer: (
25-
<div className="flex flex-col gap-2 border-t pt-4 mt-4 text-xs">
26-
<a
27-
href={`https://github.com/objectstack-ai/objectql/blob/main/apps/site/content/docs/${params.slug?.join('/') || 'index'}.mdx`}
28-
target="_blank"
29-
rel="noopener noreferrer"
30-
className="text-muted-foreground hover:text-foreground transition-colors"
31-
>
32-
Edit this page on GitHub →
33-
</a>
34-
</div>
35-
),
36-
}}
3722
>
3823
<DocsTitle>{page.data.title}</DocsTitle>
3924
<DocsDescription>{page.data.description}</DocsDescription>

apps/site/app/layout.config.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,18 @@ export const baseOptions: Omit<DocsLayoutProps, 'tree'> = {
2525
// Enable table of contents
2626
toc: {
2727
enabled: true,
28-
component: undefined,
28+
footer: (
29+
<div className="flex flex-col gap-2 border-t pt-4 mt-4 text-xs">
30+
<a
31+
href="https://github.com/objectstack-ai/objectql/blob/main/apps/site"
32+
className="text-muted-foreground hover:text-foreground transition-colors inline-flex items-center gap-1"
33+
target="_blank"
34+
rel="noopener noreferrer"
35+
>
36+
Edit this page on GitHub →
37+
</a>
38+
</div>
39+
),
2940
},
3041
// Enable last updated timestamp
3142
lastUpdate: {

0 commit comments

Comments
 (0)