vitepress
vitepress copied to clipboard
Documentation in the same style as dumi
Is your feature request related to a problem? Please describe.
The markdown of the component is expected to be written under the packages, not in the docs directory.
Like Dumi: https://d.umijs.org/
This will make our documentation more maintainable.
This is important when developing monorepo projects.
Describe the solution you'd like
The directory structure is as follows
├── docs/
│ ├── .vitepress/
│ │ ├── dist/
│ │ └── config.js
│ └── index.md
├── packages/
│ └── package-A/
│ ├── dist/
│ ├── node_modules/
│ ├── src/
│ │ ├── ...
│ │ ├── func-A/
│ │ │ ├── __tests__/ # Jest
│ │ │ ├── demos/ # Vue Demos
│ │ │ │ ├── Basic.vue # Example Component
│ │ │ │ └── Timer.vue # Example Component
│ │ │ ├── index.md # API Markdown ☞☞ Expectation: Doc documentation can be written here, can be compiled by vitepress, instead of having to be written in the docs directory
│ │ │ └── index.ts # Source Code
│ │ ├── ...
│ │ └── index.ts
│ ├── README.md
│ ├── package.json
│ ├── tsconfig.json
│ └── typings.d.ts
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .fatherrc.ts
├── .gitignore
├── .npmrc
├── .prettierignore
├── .prettierrc
├── README.md
├── lerna.json
├── package.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
└── tsconfig.json
Describe alternatives you've considered
No response
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Read the Contributing Guidelines.
- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
I am keeping this open for now, but it'll be quite tricky IG. The closest we can get you is supporting permalink feature from VuePress, using that you can just run VitePress at root and it'll recursively find all markdown files. If those have a permalink specified then they can be served at /package-A/ instead of /packages/package-A/src/.
https://github.com/dewfall123/vitepress-for-component
这里有个开发者弄的
here is a developer do it build vitepress like dumi
https://github.com/dewfall123/vitepress-for-component 这里有个开发者弄的 here is a developer do it build vitepress like dumi
I refactored it, and this plugin might be a solution. https://github.com/dewfall123/ruabick/blob/master/packages/vite-plugin-gen-temp/README.md