Skip to content

Commit 55f1892

Browse files
authored
Merge pull request #2 from dev-git-com/design
Design
2 parents 4d1b043 + f252097 commit 55f1892

File tree

46 files changed

+606
-195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+606
-195
lines changed

bun.lockb

211 KB
Binary file not shown.

eslint.config.mjs

Lines changed: 76 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,97 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import react from 'eslint-plugin-react'
4-
import reactHooks from 'eslint-plugin-react-hooks'
5-
import reactRefresh from 'eslint-plugin-react-refresh'
1+
// import js from '@eslint/js'
2+
// import globals from 'globals'
3+
// import react from 'eslint-plugin-react'
4+
// import reactHooks from 'eslint-plugin-react-hooks'
5+
// import reactRefresh from 'eslint-plugin-react-refresh'
6+
7+
// export default [
8+
// { ignores: ['dist'] },
9+
// {
10+
// files: ['**/*.{js,jsx,ts,tsx}'],
11+
// languageOptions: {
12+
// ecmaVersion: 2020,
13+
// globals: globals.browser,
14+
// parserOptions: {
15+
// ecmaVersion: 'latest',
16+
// ecmaFeatures: { jsx: true },
17+
// sourceType: 'module',
18+
// },
19+
// },
20+
// settings: { react: { version: '18.3' } },
21+
// plugins: {
22+
// react,
23+
// 'react-hooks': reactHooks,
24+
// 'react-refresh': reactRefresh,
25+
// },
26+
// rules: {
27+
// ...js.configs.recommended.rules,
28+
// ...react.configs.recommended.rules,
29+
// ...react.configs['jsx-runtime'].rules,
30+
// ...reactHooks.configs.recommended.rules,
31+
// 'react/jsx-no-target-blank': 'off',
32+
// 'react-refresh/only-export-components': [
33+
// 'warn',
34+
// { allowConstantExport: true },
35+
// ],
36+
// },
37+
// },
38+
// ]
39+
40+
import js from "@eslint/js";
41+
import globals from "globals";
42+
import react from "eslint-plugin-react";
43+
import reactHooks from "eslint-plugin-react-hooks";
44+
import reactRefresh from "eslint-plugin-react-refresh";
45+
import mdx from "eslint-mdx";
646

747
export default [
8-
{ ignores: ['dist'] },
48+
{ ignores: ["dist"] },
49+
50+
// ✅ Base config for JS/TS/React
951
{
10-
files: ['**/*.{js,jsx,ts,tsx}'],
52+
files: ["**/*.{js,jsx,ts,tsx}"],
1153
languageOptions: {
1254
ecmaVersion: 2020,
1355
globals: globals.browser,
1456
parserOptions: {
15-
ecmaVersion: 'latest',
57+
ecmaVersion: "latest",
1658
ecmaFeatures: { jsx: true },
17-
sourceType: 'module',
59+
sourceType: "module",
1860
},
1961
},
20-
settings: { react: { version: '18.3' } },
62+
settings: {
63+
react: { version: "18.3" },
64+
},
2165
plugins: {
2266
react,
23-
'react-hooks': reactHooks,
24-
'react-refresh': reactRefresh,
67+
"react-hooks": reactHooks,
68+
"react-refresh": reactRefresh,
2569
},
2670
rules: {
2771
...js.configs.recommended.rules,
2872
...react.configs.recommended.rules,
29-
...react.configs['jsx-runtime'].rules,
73+
...react.configs["jsx-runtime"].rules,
3074
...reactHooks.configs.recommended.rules,
31-
'react/jsx-no-target-blank': 'off',
32-
'react-refresh/only-export-components': [
33-
'warn',
75+
"react/jsx-no-target-blank": "off",
76+
"react-refresh/only-export-components": [
77+
"warn",
3478
{ allowConstantExport: true },
3579
],
3680
},
3781
},
38-
]
82+
83+
// ✅ MDX support
84+
{
85+
files: ["**/*.{md,mdx}"],
86+
languageOptions: {
87+
parser: mdx.parser,
88+
},
89+
plugins: {
90+
mdx,
91+
},
92+
processor: mdx.processor,
93+
rules: {
94+
// Add MDX-specific rules if needed
95+
},
96+
},
97+
];

mdx-components.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { useMDXComponents as getThemeComponents } from "nextra-theme-docs";
2+
const themeComponents = getThemeComponents();
3+
4+
export function useMDXComponents(components) {
5+
return {
6+
...components,
7+
...themeComponents,
8+
}
9+
}

next.config.mjs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// import nextra from 'nextra';
2+
3+
// const withNextra = nextra({
4+
// defaultShowCopyCode: true,
5+
// mdxOptions: {
6+
// remarkPlugins: [],
7+
// rehypePlugins: []
8+
// }
9+
// });
10+
11+
// export default withNextra({
12+
// pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
13+
// theme: 'nextra-theme-docs',
14+
// themeConfig: './theme.config.tsx',
15+
// turbopack: {
16+
// resolveAlias: {
17+
// 'next-mdx-import-source-file': './mdx-components.tsx'
18+
// }
19+
// },
20+
// });
21+
22+
import nextra from "nextra";
23+
24+
const withNextra = nextra({
25+
// theme: "nextra-theme-docs",
26+
// themeConfig: "./theme.config.tsx",
27+
});
28+
29+
export default withNextra({
30+
pageExtensions: ["js", "jsx", "md", "mdx", "ts", "tsx"],
31+
turbopack: {
32+
resolveAlias: {
33+
"next-mdx-import-source-file": "./mdx-components.js",
34+
},
35+
},
36+
// async redirects() {
37+
// return [
38+
// {
39+
// source: "/docs",
40+
// destination: "/docs",
41+
// permanent: true,
42+
// },
43+
// {
44+
// source: "/develop",
45+
// destination: "/develop/intro",
46+
// permanent: true,
47+
// },
48+
// ];
49+
// }
50+
});

next.config.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

package.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"dev": "next dev --turbopack",
6+
"dev": "next dev",
77
"build": "next build",
8+
"postbuild": "pagefind --site .next/server/app --output-path public/_pagefind",
89
"start": "next start",
910
"lint": "next lint"
1011
},
@@ -27,7 +28,10 @@
2728
"jszip": "^3.10.1",
2829
"lucide-react": "^0.474.0",
2930
"motion": "^12.23.6",
30-
"next": "15.1.6",
31+
"next": "15.4.5",
32+
"nextra": "^4.3.0",
33+
"nextra-theme-docs": "^4.3.0",
34+
"pagefind": "^1.3.0",
3135
"react": "^19.0.0",
3236
"react-day-picker": "^9.8.0",
3337
"react-dom": "^19.0.0",
@@ -37,14 +41,15 @@
3741
"tailwindcss-animate": "^1.0.7"
3842
},
3943
"devDependencies": {
40-
"typescript": "^5",
44+
"@eslint/eslintrc": "^3",
4145
"@types/node": "^20",
4246
"@types/react": "^19",
4347
"@types/react-dom": "^19",
44-
"postcss": "^8",
45-
"tailwindcss": "^3.4.1",
4648
"eslint": "^9",
4749
"eslint-config-next": "15.1.6",
48-
"@eslint/eslintrc": "^3"
50+
"eslint-mdx": "^3.6.2",
51+
"postcss": "^8",
52+
"tailwindcss": "^3.4.1",
53+
"typescript": "^5"
4954
}
50-
}
55+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use client'
2+
3+
export function ClickButton() {
4+
return (
5+
<a onClick={() => alert('Hello from MDX!')}>
6+
Click Me
7+
</a>
8+
)
9+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
# Features
3+
This is an MDX page built with Nextra.
4+
5+
## Features
6+
7+
- Write Markdown and JSX
8+
- Use React components
9+
- Powered by Nextra
10+
11+
#### Example Component
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
# Get Started
3+
This is an MDX page built with Nextra.
4+
5+
## Features
6+
7+
- Write Markdown and JSX
8+
- Use React components
9+
- Powered by Nextra
10+
11+
#### Example Component

src/app/(docs)/docs/page.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { ClickButton } from './components/ClickButton.tsx'
2+
3+
# Introduction
4+
This is an MDX page built with Nextra.
5+
6+
## Features
7+
8+
- Write Markdown and JSX
9+
- Use React components
10+
- Powered by Nextra
11+
12+
#### Example Component
13+
<ClickButton />

0 commit comments

Comments
 (0)