diff --git a/docs/index.md b/docs/index.md index b072229cf345b7229c6d91f26154099540c579e8..8790e97fd33831762c80f6e426116847e579421c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -10,8 +10,8 @@ hero: text: 快速开始 link: /guide/start - theme: alt - text: 开发文档 - link: /docs + text: 指南 + link: /guide/ image: src: logo.svg alt: logo diff --git a/docs/package.json b/docs/package.json index 7fd7a9abcc67f75bd3a0058b99ddafaf63e260b4..aeb6aa8aca3763bc0edc64648796aadd21ee313f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -9,9 +9,11 @@ }, "license": "ISC", "devDependencies": { + "@rspress/plugin-preview": "^1.41.2", "react": "^18.3.1", "react-dom": "^18.3.1", - "rspress": "^1.41.0" + "rspress": "^1.41.0", + "tailwindcss": "^3.4.17" }, "dependencies": { "@mini-markdown-rc/editor": "workspace:*", diff --git a/docs/rspress.config.ts b/docs/rspress.config.ts index f0b83fdfbb693bd0886867f7ccd347f58b36ddd7..a8c3bb3fdc3c53772aa77a779bc4b4178bb755ee 100644 --- a/docs/rspress.config.ts +++ b/docs/rspress.config.ts @@ -1,7 +1,11 @@ import { defineConfig } from "rspress/config"; import { sidebar } from "./sidebar"; +// import { pluginPreview } from "@rspress/plugin-preview"; export default defineConfig({ + // plugins: [pluginPreview({ + // // defaultRenderMode: 'pure' + // })], root: "./", title: "Mini Markdown Editor", description: "一个基于 React 的 Markdown 编辑器", diff --git a/docs/sidebar.ts b/docs/sidebar.ts index c77f4659807b4fc32bedb7857f30eca5baee55d5..a2c53c4cd57057ad9fd598ee49762e20e64612d2 100644 --- a/docs/sidebar.ts +++ b/docs/sidebar.ts @@ -21,14 +21,4 @@ export const sidebar = { items: [{ text: "使用", link: "/guide/ast-parser" }], }, ], - "/docs/": [ - { - text: "源码", - items: [], - }, - { - text: "开发文档", - items: [], - }, - ], }; diff --git a/docs/tsconfig.json b/docs/tsconfig.json index df9ad9637cc163054e2570d64c9417d43d3fb91a..81288d7ff40687417b061bb8985e06b9ad425a69 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -17,7 +17,9 @@ "allowImportingTsExtensions": true, }, "include": [ - "docs", + "**/*.mdx", + "**/*.ts", + "**/*.tsx", "theme", "rspress.config.ts" ], diff --git a/package.json b/package.json index fb8600872adc5ff28e201e807fc371bc9270f547..f7574d17a09a37a91e5a7763145e9bf2f093ea64 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,8 @@ "build:docs": "pnpm -F @mini-markdown-rc/docs build", "prepare": "husky", "lint": "node ./scripts/zx-lint.js", - "prettier": "prettier --write ." + "prettier": "prettier --write .", + "build": "pnpm build:ast && pnpm build:editor" }, "lint-staged": { "*.{js,ts,jsx,tsx}": [