react-docs-ui 0.3.0 → 0.4.0
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/README.md +49 -77
- package/dist/react-docs-ui.css +1 -1
- package/dist/react-docs-ui.es.js +25731 -11607
- package/package.json +103 -96
package/README.md
CHANGED
|
@@ -1,77 +1,49 @@
|
|
|
1
|
-
English | [简体中文](README-zh.md)
|
|
2
|
-
|
|
3
|
-
## react-docs-ui
|
|
4
|
-
|
|
5
|
-
React documentation site UI components.
|
|
6
|
-
|
|
7
|
-
### Install
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### Configuration file (`public/config/site.yaml`)
|
|
52
|
-
See the `create-react-docs-ui` README for a full example. Basic shape:
|
|
53
|
-
```yaml
|
|
54
|
-
site:
|
|
55
|
-
logo: /logo.svg
|
|
56
|
-
title: My Docs
|
|
57
|
-
description: Awesome docs
|
|
58
|
-
navbar:
|
|
59
|
-
items:
|
|
60
|
-
- title: GitHub
|
|
61
|
-
link: https://github.com/shenjianZ/react-docs-ui
|
|
62
|
-
external: true
|
|
63
|
-
sidebar:
|
|
64
|
-
collections: {}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Documentation content
|
|
68
|
-
- Place markdown under `public/docs/<lang>/**/*.md`
|
|
69
|
-
- Route path maps to file path after the language segment
|
|
70
|
-
- Optional frontmatter is supported by a simple parser
|
|
71
|
-
|
|
72
|
-
### Requirements
|
|
73
|
-
- React 18+
|
|
74
|
-
- Works with Vite; CSS file must be imported
|
|
75
|
-
|
|
76
|
-
### License
|
|
77
|
-
MIT
|
|
1
|
+
English | [简体中文](README-zh.md)
|
|
2
|
+
|
|
3
|
+
## react-docs-ui
|
|
4
|
+
|
|
5
|
+
React documentation site UI components. Build modern docs sites with a ready-to-use app shell.
|
|
6
|
+
|
|
7
|
+
### Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install react-docs-ui
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Quick Start
|
|
14
|
+
|
|
15
|
+
Full app (reads `public/config/site(.lang).yaml` and `public/docs/<lang>/**/*.md`):
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import 'react-docs-ui/dist/style.css'
|
|
19
|
+
import { DocsApp } from 'react-docs-ui'
|
|
20
|
+
|
|
21
|
+
export default function App() {
|
|
22
|
+
return <DocsApp />
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
- Configuration-driven via `site.yaml`
|
|
29
|
+
- MD/MDX with syntax highlighting
|
|
30
|
+
- Light/dark themes
|
|
31
|
+
- Command menu (Cmd+K)
|
|
32
|
+
- Context menu
|
|
33
|
+
- Internationalization
|
|
34
|
+
- Table of contents
|
|
35
|
+
- PWA support
|
|
36
|
+
- AI integration (requires API key)
|
|
37
|
+
|
|
38
|
+
### Exports
|
|
39
|
+
|
|
40
|
+
- Layout: `DocsLayout`
|
|
41
|
+
- App shell: `DocsApp`
|
|
42
|
+
- Navigation: `HeaderNav`, `SidebarNav`, `TableOfContents`
|
|
43
|
+
- Theming: `ThemeProvider`, `ModeToggle`, `LanguageSwitcher`
|
|
44
|
+
- Markdown: `MdxContent`
|
|
45
|
+
- Primitives: `ScrollArea`, `Tooltip`, `Dialog`, `DropdownMenu`, `Command`, `ContextMenu`
|
|
46
|
+
|
|
47
|
+
### License
|
|
48
|
+
|
|
49
|
+
MIT
|