Skip to content

Commit f6f1646

Browse files
committed
fix(website): fixed duplicated items in sidebar
1 parent dc132f5 commit f6f1646

File tree

4 files changed

+52
-90
lines changed

4 files changed

+52
-90
lines changed

apps/website/app/docs/layout.tsx

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
11
// Docs layout
2-
// import type { ReactNode } from "react";
3-
// import { baseOptions } from "#/app/layout.config";
4-
5-
// import { source } from "#/lib/source";
6-
// import { DocsLayout } from "fumadocs-ui/layouts/docs";
7-
8-
// export default function Layout({ children }: { children: ReactNode }) {
9-
// return (
10-
// <DocsLayout {...baseOptions} tree={source.pageTree}>
11-
// {children}
12-
// </DocsLayout>
13-
// );
14-
// }
15-
16-
// Notebook layout
172
import type { ReactNode } from "react";
183
import { baseOptions } from "#/app/layout.config";
4+
195
import { source } from "#/lib/source";
20-
import { DocsLayout } from "fumadocs-ui/layouts/notebook";
6+
import { DocsLayout } from "fumadocs-ui/layouts/docs";
217

228
export default function Layout({ children }: { children: ReactNode }) {
239
return (
2410
<DocsLayout
2511
{...baseOptions}
26-
links={baseOptions.links?.slice(1, -1) ?? []}
27-
// the position of navbar
28-
nav={{ ...baseOptions.nav, mode: "top" }}
29-
// the position of Sidebar Tabs
30-
tabMode="navbar"
3112
tree={source.pageTree}
3213
>
3314
{children}
3415
</DocsLayout>
3516
);
3617
}
18+
19+
// Notebook layout
20+
// import type { ReactNode } from "react";
21+
// import { baseOptions } from "#/app/layout.config";
22+
// import { source } from "#/lib/source";
23+
// import { DocsLayout } from "fumadocs-ui/layouts/notebook";
24+
25+
// export default function Layout({ children }: { children: ReactNode }) {
26+
// return (
27+
// <DocsLayout
28+
// {...baseOptions}
29+
// links={baseOptions.links?.slice(1, -1) ?? []}
30+
// // the position of navbar
31+
// nav={{ ...baseOptions.nav, mode: "top" }}
32+
// // the position of Sidebar Tabs
33+
// tabMode="navbar"
34+
// tree={source.pageTree}
35+
// >
36+
// {children}
37+
// </DocsLayout>
38+
// );
39+
// }

apps/website/app/layout.config.tsx

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13,48 +13,7 @@ import React from "react";
1313
*/
1414
export const baseOptions: BaseLayoutProps = {
1515
githubUrl: "https://github.com/Rel1cx/eslint-react",
16-
links: [
17-
{
18-
active: "nested-url",
19-
text: "Getting Started",
20-
url: "/docs/getting-started",
21-
},
22-
{
23-
active: "nested-url",
24-
text: "Rules",
25-
url: "/docs/rules",
26-
},
27-
{
28-
active: "nested-url",
29-
text: "Presets",
30-
url: "/docs/presets",
31-
},
32-
{
33-
active: "nested-url",
34-
text: "Contributing",
35-
url: "/docs/contributing",
36-
},
37-
{
38-
active: "nested-url",
39-
text: "Community",
40-
url: "/docs/community",
41-
},
42-
{
43-
active: "nested-url",
44-
text: "Changelog",
45-
url: "/docs/changelog",
46-
},
47-
{
48-
active: "nested-url",
49-
text: "Roadmap",
50-
url: "/docs/roadmap",
51-
},
52-
{
53-
active: "nested-url",
54-
text: "FAQ",
55-
url: "/FAQ",
56-
},
57-
],
16+
links: [],
5817
nav: {
5918
title: (
6019
<div className="flex items-between gap-2.5 min-w-max">

apps/website/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
"@chevrotain/regexp-to-ast": "^11.0.3",
1414
"bsky-react-post": "^0.1.7",
1515
"clsx": "^2.1.1",
16-
"fumadocs-core": "15.2.0",
16+
"fumadocs-core": "15.2.1",
1717
"fumadocs-docgen": "2.0.0",
1818
"fumadocs-mdx": "11.5.7",
1919
"fumadocs-twoslash": "3.1.0",
20-
"fumadocs-typescript": "4.0.0",
21-
"fumadocs-ui": "15.2.0",
20+
"fumadocs-typescript": "4.0.1",
21+
"fumadocs-ui": "15.2.1",
2222
"lucide-react": "^0.486.0",
2323
"next": "^15.2.4",
2424
"next-view-transitions": "^0.3.4",
2525
"react": "^19.1.0",
2626
"react-dom": "^19.1.0",
2727
"shiki": "^3.2.1",
28-
"tailwind-merge": "^3.0.2",
28+
"tailwind-merge": "^3.1.0",
2929
"twoslash": "^0.3.1"
3030
},
3131
"devDependencies": {

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)