Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"@rspress/plugin-preview": "^1.44.0",
"@tailwindcss/postcss": "^4.1.11",
"@types/node": "^18.11.17",
"autoprefixer": "^10.4.22",
"postcss": "^8.5.6",
"tailwindcss": "^4.1.10"
"tailwindcss": "^4.1.17"
}
}
2 changes: 1 addition & 1 deletion docs/rspress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default defineConfig({
message: "MIT Licensed | © 2025 DevCloudFE. All Rights Reserved.",
},
},
globalStyles: path.resolve(__dirname, "./docs/tailwind.css"),
globalStyles: path.resolve(__dirname, "theme/styles/index.css"),
route: {
cleanUrls: true,
},
Expand Down
16 changes: 16 additions & 0 deletions docs/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
content: [
"./docs/**/*.{md,mdx,js,ts,jsx,tsx}",
"./theme/**/*.{js,ts,jsx,tsx}",
],
darkMode: ["selector"],
theme: {
extend: {
colors: {
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: "hsl(var(--primary))",
},
},
},
};
40 changes: 40 additions & 0 deletions docs/theme/styles/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));

@theme {
--color-background: hsl(0 0% 100%);
--color-foreground: hsl(222.2 84% 4.9%);
--color-primary: hsl(221.2 83.2% 53.3%);

--color-background: var(--background);
--color-foreground: var(--foreground);
--color-primary: var(--primary);

--rp-c-bg: var(--color-background);
--rp-c-text: var(--color-foreground);
--rp-c-brand: var(--color-primary);
--rp-c-brand-light: color-mix(in srgb, var(--color-primary) 80%, transparent);
}

:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--primary: 221.2 83.2% 53.3%;
}

.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
--primary: 217.2 91.2% 59.8%;
}

@layer base {
body {
@apply bg-background text-foreground;
}
}
@layer components {
.rspress-doc a {
@apply text-primary hover:underline;
}
}
3 changes: 2 additions & 1 deletion docs/theme/index.tsx → docs/theme/styles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useLang } from "rspress/runtime";
import {
HomeLayout as BasicHomeLayout,
Layout as BasicLayout,
// getCustomMDXComponent,
} from "rspress/theme";
import "./styles/index.css";

function HomeLayout() {
// const { code: Code } = getCustomMDXComponent();
Expand All @@ -21,6 +21,7 @@ const Layout = () => {
: "🚧 MateChat React 文档仍在开发中"}
</div>
}
// components={{ ... }}
/>
);
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@
"type": "module",
"types": "./dist/*.d.ts",
"version": "0.1.1"
}
}
95 changes: 40 additions & 55 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.