create-react-docs-ui 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +82 -0
- package/package.json +2 -1
- package/template/package.json +6 -1
- package/template/public/docs/en/guide.md +4 -4
- package/template/public/docs/en/index.md +1 -1
- package/template/public/docs/zh-cn/guide.md +4 -4
- package/template/public/docs/zh-cn/index.md +1 -1
- package/template/src/react-docs-ui.d.ts +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 shenjianZ
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOTT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# create-react-docs-ui
|
|
2
|
+
|
|
3
|
+
A simple scaffolding tool to quickly set up a modern documentation website powered by [react-docs-ui](https://github.com/btea/react-docs-ui).
|
|
4
|
+
|
|
5
|
+
This tool creates a new project with a pre-configured, feature-rich documentation site, allowing you to focus solely on writing your Markdown content.
|
|
6
|
+
|
|
7
|
+
## About the underlying library: react-docs-ui
|
|
8
|
+
|
|
9
|
+
`react-docs-ui` is a React component library and toolset designed specifically for building documentation websites. Its core philosophy is **configuration over code**.
|
|
10
|
+
|
|
11
|
+
### Core Features
|
|
12
|
+
|
|
13
|
+
- **Configuration-Driven**: No need to write complex React components or routing logic. Define your entire site—navigation, sidebar, themes, and footer—through a simple `site.yaml` file.
|
|
14
|
+
- **Fully-Featured Out-of-the-Box**:
|
|
15
|
+
- Responsive, modern design.
|
|
16
|
+
- Light/dark theme switching.
|
|
17
|
+
- Markdown rendering (GFM and Frontmatter supported).
|
|
18
|
+
- Built-in syntax highlighting.
|
|
19
|
+
- Quick command menu (`Cmd+K`).
|
|
20
|
+
- Internationalization (i18n) support.
|
|
21
|
+
- **Extremely Simple to Start**: Launch a complete documentation site in under a minute.
|
|
22
|
+
- **Highly Customizable**: Easily customize the logo, color scheme, navigation links, social media icons, and more.
|
|
23
|
+
|
|
24
|
+
## Getting Started
|
|
25
|
+
|
|
26
|
+
### Prerequisites
|
|
27
|
+
|
|
28
|
+
- **Node.js**: Version `>= 18.0.0`
|
|
29
|
+
- **Package Manager**: `npm`, `yarn`, or `pnpm`
|
|
30
|
+
|
|
31
|
+
### Creating a New Project
|
|
32
|
+
|
|
33
|
+
Run one of the following commands to create your new documentation site. Replace `my-docs` with your desired project name.
|
|
34
|
+
|
|
35
|
+
#### npm
|
|
36
|
+
```bash
|
|
37
|
+
npm create react-docs-ui@latest my-docs
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### yarn
|
|
41
|
+
```bash
|
|
42
|
+
yarn create react-docs-ui my-docs
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### pnpm
|
|
46
|
+
```bash
|
|
47
|
+
pnpm create react-docs-ui my-docs
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Running Your Site
|
|
51
|
+
|
|
52
|
+
After the project is created, navigate into the new directory, install dependencies, and start the development server.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
cd my-docs
|
|
56
|
+
npm install
|
|
57
|
+
npm run dev
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Your new documentation website will be running at `http://localhost:5173`.
|
|
61
|
+
|
|
62
|
+
## Project Structure
|
|
63
|
+
|
|
64
|
+
The generated project has a straightforward structure:
|
|
65
|
+
|
|
66
|
+
- **`public/config/site.yaml`**: The central configuration file for your entire site. This is where you'll define navigation, sidebars, and metadata.
|
|
67
|
+
- **`public/docs/`**: The directory where all your Markdown documentation files reside. It's pre-configured with `en` and `zh-cn` subdirectories for internationalization.
|
|
68
|
+
- **`src/`**: Contains the main application entry point. You typically won't need to modify files here.
|
|
69
|
+
|
|
70
|
+
## Basic Configuration
|
|
71
|
+
|
|
72
|
+
To customize your site, you'll primarily edit `public/config/site.yaml`. Here you can:
|
|
73
|
+
|
|
74
|
+
- **Change the site title and logo**: Modify the `site` object.
|
|
75
|
+
- **Add navigation links**: Add items to the `navbar.items` array.
|
|
76
|
+
- **Structure your documentation**: Define the hierarchy of your content in the `sidebar.collections` object.
|
|
77
|
+
|
|
78
|
+
For a complete guide on all available options, please refer to the documentation within your newly created project.
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
This project is licensed under the [MIT License](LICENSE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-react-docs-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"template/package.json",
|
|
13
13
|
"template/public/**/*",
|
|
14
14
|
"template/src/main.tsx",
|
|
15
|
+
"template/src/react-docs-ui.d.ts",
|
|
15
16
|
"template/src/vite-env.d.ts",
|
|
16
17
|
"template/tsconfig.app.json",
|
|
17
18
|
"template/tsconfig.json",
|
package/template/package.json
CHANGED
|
@@ -9,15 +9,20 @@
|
|
|
9
9
|
"preview": "vite preview"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react-docs-ui": "^0.1.2",
|
|
13
12
|
"buffer": "^6.0.3",
|
|
14
13
|
"react": ">=18",
|
|
14
|
+
"react-docs-ui": "^0.1.3",
|
|
15
15
|
"react-dom": ">=18",
|
|
16
16
|
"react-router-dom": "^7.8.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
+
"@types/debug": "^4.1.12",
|
|
20
|
+
"@types/hast": "^3.0.4",
|
|
21
|
+
"@types/mdast": "^4.0.4",
|
|
22
|
+
"@types/ms": "^2.1.0",
|
|
19
23
|
"@types/react": "^19.1.9",
|
|
20
24
|
"@types/react-dom": "^19.1.7",
|
|
25
|
+
"@types/unist": "^3.0.3",
|
|
21
26
|
"@vitejs/plugin-react": "^4.7.0",
|
|
22
27
|
"typescript": "~5.8.3",
|
|
23
28
|
"vite": "^7.1.0"
|
|
@@ -4,7 +4,7 @@ This guide will help you fully understand and master all the features of React D
|
|
|
4
4
|
|
|
5
5
|
## Table of Contents
|
|
6
6
|
|
|
7
|
-
- **[Introduction](/
|
|
8
|
-
- **[Installation](/
|
|
9
|
-
- **[Quick Start](/
|
|
10
|
-
- **[Configuration (`site.yaml`)](/
|
|
7
|
+
- **[Introduction](/guide/introduction)**: Learn about the core philosophy and main advantages of React Docs UI.
|
|
8
|
+
- **[Installation](/guide/installation)**: Learn how to install via the scaffolding tool or manually.
|
|
9
|
+
- **[Quick Start](/guide/quick-start)**: Create and run your first documentation website in 5 minutes.
|
|
10
|
+
- **[Configuration (`site.yaml`)](/guide/configuration)**: Dive deep into each configuration option to take full control of your site.
|
|
@@ -30,5 +30,5 @@ npm install && npm run dev
|
|
|
30
30
|
|
|
31
31
|
## Links
|
|
32
32
|
|
|
33
|
-
- **[Guide](/
|
|
33
|
+
- **[Guide](/guide/introduction)**: Start learning about all the features of React Docs UI.
|
|
34
34
|
- **[GitHub](https://github.com/shenjianZ/react-docs-ui)**: View the source code, submit issues, or contribute.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## 目录
|
|
6
6
|
|
|
7
|
-
- **[介绍](/
|
|
8
|
-
- **[安装](/
|
|
9
|
-
- **[快速上手](/
|
|
10
|
-
- **[配置说明 (`site.yaml`)](/
|
|
7
|
+
- **[介绍](/guide/introduction)**: 了解 React Docs UI 的核心理念和主要优势。
|
|
8
|
+
- **[安装](/guide/installation)**: 学习如何通过脚手架或手动方式安装。
|
|
9
|
+
- **[快速上手](/guide/quick-start)**: 在 5 分钟内创建并运行你的第一个文档网站。
|
|
10
|
+
- **[配置说明 (`site.yaml`)](/guide/configuration)**: 深入了解每个配置项,完全掌控你的网站。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'react-docs-ui';
|