Skip to content

Commit 02144ea

Browse files
committed
refactor(website): minor improvements
1 parent d6e64f9 commit 02144ea

File tree

13 files changed

+135
-199
lines changed

13 files changed

+135
-199
lines changed

apps/website/app/base.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import "tailwindcss";
22
@import "fumadocs-ui/css/neutral.css";
33
@import "fumadocs-ui/css/preset.css";
4+
@import "fumadocs-twoslash/twoslash.css";
45

56
@source "../components/fumadocs-ui/**/*.js";
67

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1+
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
12
import defaultMdxComponents from "fumadocs-ui/mdx";
23
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from "fumadocs-ui/page";
34
import { notFound } from "next/navigation";
45

56
import { source } from "#/lib/source";
67

8+
const mdxComponents = {
9+
...defaultMdxComponents,
10+
Tab,
11+
Tabs,
12+
};
13+
714
export default async function Page(props: {
815
params: Promise<{ slug?: string[] }>;
916
}) {
@@ -18,7 +25,7 @@ export default async function Page(props: {
1825
<DocsTitle>{page.data.title}</DocsTitle>
1926
<DocsDescription>{page.data.description}</DocsDescription>
2027
<DocsBody>
21-
<MDX components={{ ...defaultMdxComponents }} />
28+
<MDX components={mdxComponents} />
2229
</DocsBody>
2330
</DocsPage>
2431
);

apps/website/app/overrides.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
monospace;
4545
}
4646

47+
button[role] {
48+
cursor: pointer;
49+
}
50+
4751
#nd-docs-layout #nd-sidebar a[data-active] {
4852
font-weight: 400;
4953
}

apps/website/content/docs/getting-started/javascript.mdx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,8 @@ description: Getting started with JavaScript setup
55

66
## Install
77

8-
```sh copy title="Terminal"
9-
# npm
8+
```package-install
109
npm install --save-dev eslint @eslint/js @eslint-react/eslint-plugin
11-
12-
# pnpm
13-
pnpm add --save-dev eslint @eslint/js @eslint-react/eslint-plugin
14-
15-
# yarn
16-
yarn add --dev eslint @eslint/js @eslint-react/eslint-plugin
1710
```
1811

1912
## Setup

apps/website/content/docs/getting-started/typescript.mdx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,8 @@ description: Getting started with TypeScript setup
55

66
## Install
77

8-
```sh copy title="Terminal"
9-
# npm
8+
```package-install
109
npm install --save-dev typescript-eslint @eslint-react/eslint-plugin
11-
12-
# pnpm
13-
pnpm add --save-dev typescript-eslint @eslint-react/eslint-plugin
14-
15-
# yarn
16-
yarn add --dev typescript-eslint @eslint-react/eslint-plugin
1710
```
1811

1912
## Setup

apps/website/content/docs/using-an-alternative-parser/babel-eslint-parser.mdx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,8 @@ description: "Using @babel/eslint-parser as an alternative parser for JavaScript
55

66
## Install
77

8-
```sh copy title="Terminal"
9-
# npm
8+
```package-install
109
npm install --save-dev eslint @eslint/js globals @babel/core @babel/eslint-parser @babel/preset-env @babel/preset-react @eslint-react/eslint-plugin
11-
12-
# pnpm
13-
pnpm add --save-dev eslint @eslint/js globals @babel/core @babel/eslint-parser @babel/preset-env @babel/preset-react @eslint-react/eslint-plugin
14-
15-
# yarn
16-
yarn add --dev eslint @eslint/js globals @babel/core @babel/eslint-parser @babel/preset-env @babel/preset-react @eslint-react/eslint-plugin
1710
```
1811

1912
## Setup

apps/website/content/docs/using-an-alternative-parser/ts-blank-eslint-parser.mdx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,8 @@ Use it only if you are okay with the limitations.
1616

1717
## Install
1818

19-
```sh copy title="Terminal"
20-
# npm
19+
```package-install
2120
npm install --save-dev eslint typescript-eslint @eslint/js globals ts-blank-eslint-parser @eslint-react/eslint-plugin@next
22-
23-
# pnpm
24-
pnpm add --save-dev eslint typescript-eslint @eslint/js globals ts-blank-eslint-parser @eslint-react/eslint-plugin@next
25-
26-
# yarn
27-
yarn add --dev eslint typescript-eslint @eslint/js globals ts-blank-eslint-parser @eslint-react/eslint-plugin@next
2821
```
2922

3023
## Setup

apps/website/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
"dependencies": {
1616
"@chevrotain/regexp-to-ast": "^11.0.3",
1717
"clsx": "^2.1.1",
18-
"fumadocs-core": "15.0.10",
19-
"fumadocs-docgen": "1.3.7",
20-
"fumadocs-mdx": "11.5.6",
21-
"fumadocs-twoslash": "3.0.0",
22-
"fumadocs-typescript": "3.0.3",
23-
"fumadocs-ui": "15.0.10",
18+
"fumadocs-core": "^15.0.10",
19+
"fumadocs-docgen": "^1.3.7",
20+
"fumadocs-mdx": "^11.5.6",
21+
"fumadocs-twoslash": "^3.0.0",
22+
"fumadocs-typescript": "^3.0.3",
23+
"fumadocs-ui": "^15.0.10",
2424
"lucide-react": "^0.475.0",
2525
"next": "^15.1.7",
2626
"next-view-transitions": "^0.3.4",
@@ -43,7 +43,7 @@
4343
"@tsconfig/strictest": "^2.0.5",
4444
"@types/hast": "^3.0.4",
4545
"@types/mdx": "^2.0.13",
46-
"@types/node": "^22.13.4",
46+
"@types/node": "^22.13.5",
4747
"@types/react": "^19.0.10",
4848
"@types/react-dom": "^19.0.4",
4949
"autoprefixer": "^10.4.20",
@@ -59,7 +59,7 @@
5959
"eslint-plugin-unicorn": "^57.0.0",
6060
"markuplint": "^4.11.6",
6161
"postcss": "^8.5.3",
62-
"tailwindcss": "4.0.8",
62+
"tailwindcss": "^4.0.8",
6363
"typescript": "^5.7.3",
6464
"typescript-eslint": "^8.24.1"
6565
}

apps/website/source.config.ts

Lines changed: 9 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,15 @@
1+
import { remarkDocGen, remarkInstall } from "fumadocs-docgen";
12
import { defineConfig, defineDocs } from "fumadocs-mdx/config";
23

34
export const { meta, docs } = defineDocs({
45
dir: "content/docs",
56
});
67

7-
export default defineConfig();
8-
9-
// import { defineConfig, defineDocs } from "fumadocs-mdx/config";
10-
// import { transformerTwoslash } from "fumadocs-twoslash";
11-
// import { remarkInstall } from "fumadocs-docgen";
12-
13-
// export const { docs, meta } = defineDocs({
14-
// dir: "content/docs",
15-
// // docs: {
16-
// // async: true,
17-
// // },
18-
// });
19-
20-
// export default defineConfig({
21-
// lastModifiedTime: "git",
22-
// mdxOptions: async () => {
23-
// const { rehypeCodeDefaultOptions } = await import(
24-
// "fumadocs-core/mdx-plugins"
25-
// );
26-
// return {
27-
// rehypeCodeOptions: {
28-
// lazy: true,
29-
// langs: ["ts", "js", "html"],
30-
// inline: "tailing-curly-colon",
31-
// // themes: {
32-
// // light: "catppuccin-latte",
33-
// // dark: "catppuccin-mocha",
34-
// // },
35-
// transformers: [
36-
// ...(rehypeCodeDefaultOptions.transformers ?? []),
37-
// transformerTwoslash(),
38-
// {
39-
// name: "transformers:remove-notation-escape",
40-
// code(hast) {
41-
// for (const line of hast.children) {
42-
// if (line.type !== "element") continue;
43-
44-
// const lastSpan = line.children.findLast(
45-
// (v) => v.type === "element",
46-
// );
47-
48-
// const head = lastSpan?.children[0];
49-
// if (head?.type !== "text") return;
50-
51-
// head.value = head.value.replace(/\[\\!code/g, "[!code");
52-
// }
53-
// },
54-
// },
55-
// ],
56-
// },
57-
// remarkPlugins: [
58-
// [remarkInstall, { persist: { id: "package-manager" } }],
59-
// ],
60-
// // rehypePlugins: (v) => [rehypeKatex, ...v],
61-
// };
62-
// },
63-
// });
8+
export default defineConfig({
9+
mdxOptions: {
10+
remarkPlugins: [
11+
[remarkDocGen, { generators: [] }],
12+
remarkInstall,
13+
],
14+
},
15+
});

examples/dual-react-dom-lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@eslint/js": "^9.20.0",
3535
"@tsconfig/node22": "^22.0.0",
3636
"@tsconfig/strictest": "^2.0.5",
37-
"@types/node": "^22.13.4",
37+
"@types/node": "^22.13.5",
3838
"@types/react": "^19.0.10",
3939
"eslint": "^9.20.1",
4040
"eslint-plugin-react-dom": "workspace:*",

0 commit comments

Comments
 (0)