Skip to content

Commit f681215

Browse files
authored
docs: change playground site
docs: change playground site
2 parents 4a148d8 + a5507f8 commit f681215

File tree

5 files changed

+62
-28
lines changed

5 files changed

+62
-28
lines changed

DEV_DOCUMENT.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Dev the Document
2+
3+
## Working principle
4+
5+
I modified the [ruabick](https://github.com/dewfall123/ruabick) plugin o read the .md file and map the generated path。
6+
7+
### plugins:
8+
9+
- `@vue-hooks-plus/vite-plugin-gen-temp` dynamically generate md files.
10+
- `@vue-hooks-plus/vitepress-demo-block` demo block at the md files.
11+
- `@vue-hooks-plus/vitepress` transformation based on vitepress to support internationalization.
12+
- `@vue-hooks-plus/md-demo-plugins` apply demo block.
13+
14+
[Source](https://github.com/InhiblabCore/plugins)
15+
16+
## Start
17+
18+
need run initial at `packages/hooks` folder.
19+
20+
```bash
21+
22+
pnpm initial
23+
24+
```
25+
26+
Check if a .docs folder is generated in your directory。If it fails, it cannot be started and needs to be re-run `initial` 👆 .
27+
28+
next, vitepress run .docs
29+
30+
```bash
31+
32+
pnpm docs:dev
33+
34+
```
35+
36+
If the page startup is blank, you need to refresh the page.

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,9 @@ import useRequest from 'vue-hooks-plus/es/useRequest'
6464
- [English Documentations](https://inhiblabcore.github.io/docs/hooks/en)
6565
- [中文文档](https://inhiblabcore.github.io/docs/hooks)
6666

67-
## 🕹️ Dev the document
67+
## 🕹️ Document Effects
6868

69-
```
70-
<!-- need run initial -->
71-
72-
npm run docs:dev
73-
```
69+
Start documentation via [Dev Document Guide](./DEV_DOCUMENT.md).
7470

7571
## 🪴 Project Activity
7672

README.zh-CN.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,9 @@ import useRequest from 'vue-hooks-plus/es/useRequest'
6464
- [English Documentations](https://inhiblab-core.gitee.io/docs/hooks/en)
6565
- [中文文档](https://inhiblab-core.gitee.io/docs/hooks)
6666

67-
## 🕹️ 调试文档
67+
## 🕹️ 文档效果
6868

69-
```
70-
<!-- need run initial -->
71-
72-
npm run docs:dev
73-
```
69+
通过 [Dev Document Guide](./DEV_DOCUMENT.md) 启动文档。
7470

7571
# 🪴 项目活动
7672

packages/hooks/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,9 @@ import useRequest from 'vue-hooks-plus/es/useRequest'
6464
- [English Documentations](https://inhiblabcore.github.io/docs/hooks/en)
6565
- [中文文档](https://inhiblabcore.github.io/docs/hooks)
6666

67-
## 🕹️ Dev the document
67+
## 🕹️ Document Effects
6868

69-
```
70-
<!-- need run initial -->
71-
72-
npm run docs:dev
73-
```
69+
Start documentation via [Dev Document Guide](./DEV_DOCUMENT.md).
7470

7571
## 🪴 Project Activity
7672

packages/hooks/docs/.vitepress/config.ts

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,30 +71,40 @@ export default defineConfig({
7171
'/': {
7272
nav: [
7373
{ text: '⒡ Hooks', link: '/useRequest/' },
74-
{
75-
text: '演武场',
76-
link: 'http://43.138.187.142:9000/vue-hooks-plus/vhp-playground/',
77-
},
74+
isGithub
75+
? {
76+
text: '演武场',
77+
link: 'https://inhiblabcore.github.io/vue-hooks-plus-playground/play',
78+
}
79+
: {
80+
text: '演武场',
81+
link: 'https://inhiblab-core.gitee.io/vue-hooks-plus-playground/play',
82+
},
7883
isGithub
7984
? {
8085
text: '国内镜像 🇨🇳',
81-
link: 'https://inhiblab-core.gitee.io/docs/hooks/',
86+
link: 'https://inhiblab-core.gitee.io/docs/hooks',
8287
}
8388
: null,
8489
{
8590
text: '发行版本',
86-
link: 'https://github.com/InhiblabCore/vue-hooks-plus/releases/',
91+
link: 'https://github.com/InhiblabCore/vue-hooks-plus/releases',
8792
},
8893
].filter(Boolean),
8994
sidebar: getRouterConfig(),
9095
},
9196
'/en/': {
9297
nav: [
9398
{ text: '⒡ Hooks', link: '/en/useRequest/' },
94-
{
95-
text: 'Playground',
96-
link: 'http://43.138.187.142:9000/vue-hooks-plus/vhp-playground/',
97-
},
99+
isGithub
100+
? {
101+
text: 'Playground',
102+
link: 'https://inhiblabcore.github.io/vue-hooks-plus-playground/play',
103+
}
104+
: {
105+
text: 'Playground',
106+
link: 'https://inhiblab-core.gitee.io/vue-hooks-plus-playground/play',
107+
},
98108
isGithub
99109
? {
100110
text: 'Gitee Mirror 🇨🇳',

0 commit comments

Comments
 (0)