Skip to content

Commit c0f2d19

Browse files
mmdapl142vip.cn
and
142vip.cn
authored
refactor: 升级vuepress相关版本,优化项目结构 (#137)
* refactor: 升级vuepress相关版本 * refactor: 优化项目结构,整理文档 --------- Co-authored-by: 142vip.cn <fairy@2925.com>
1 parent 5d66278 commit c0f2d19

File tree

634 files changed

+3045
-4942
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

634 files changed

+3045
-4942
lines changed

.eslintignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
node_modules
2-
docs/manuscripts
2+
docs
33
.github
44
.idea
55
.dockerignore
6-
.gitignore
6+
.gitignore

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ node_modules/
1111
.npm
1212
*.tgz
1313
.cache
14+
.temp
1415
.next
1516
.nuxt
1617
dist
1718
.cache/
18-
docs/.vuepress/.cache/
19-
docs/.vuepress/.temp/
20-
docs/.vuepress/dist/
19+
.vuepress/.cache/
20+
.vuepress/.temp/
21+
.vuepress/dist/

Dockerfile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# APP_VERSION: 版本
66
# CONTAINER_BUILD: 采用容器构建
77
#
8-
# 注意:vite构建需要支持node14以上,安装node16较为稳妥
98

109
FROM registry.cn-hangzhou.aliyuncs.com/142vip/node:18.18.0-alpine AS build_base
1110

@@ -18,8 +17,6 @@ ENV PATH="$PNPM_HOME:$PATH"
1817
WORKDIR /apps
1918
COPY . .
2019

21-
RUN echo $CONTAINER_BUILD;
22-
2320
## 基于容器自动构建
2421
RUN --mount=type=cache,id=pnpm,target=/pnpm/store if [ "$CONTAINER_BUILD" = "true" ]; then \
2522
sh ./scripts/ci && pnpm build; \
@@ -38,14 +35,10 @@ ARG GIT_HASH
3835
ARG GIT_MESSAGE
3936
ARG HOME_PAGE
4037

41-
# 作者信息
38+
# 作者信息 & 项目信息 & Git信息
4239
LABEL "maintainer"="$AUTHOR <$EMAIL>"
43-
44-
# 项目信息
4540
LABEL "repo.name"=$APP_NAME "repo.version"=$APP_VERSION \
4641
"repo.homePage"="$HOME_PAGE" "repo.description"="$DESCRIPTION"
47-
48-
# Git信息
4942
LABEL "git.hash"="$GIT_HASH" "git.message"="$GIT_MESSAGE"
5043

5144
# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 注意:--from参数

Jenkinsfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 142vip.cn 储凡
3+
Copyright (c) 2020 - present 142vip.cn 储凡
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

code/express/apps/apis-demo/Readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
`express`模块提供了很多API方法,要了解、使用这些API去解决一些实际问题,首先需要安装:
44

5-
```bash
5+
```shell
66
## 安装express
77
npm install express --save
88
```
@@ -101,7 +101,7 @@ Express中内置的中间件功能。提供静态文件托管管理,基于`ser
101101

102102
@[code js](@code/express/apps/static-source-demo/app.js)
103103

104-
基于Express框架,关于静态文件托管,单独开了一篇做介绍,传送门:[静态资源托管](./静态文件.md)
104+
基于Express框架,关于静态文件托管,单独开了一篇做介绍
105105

106106
### 路由
107107

@@ -119,7 +119,7 @@ express.Router()创建路由器对象时也支持一些额外的参数,查看
119119
- `mergeParams`:保留req.params父路由器的值,布尔类型。如果父级和子级的参数名称有冲突,则子级的值优先。默认false
120120
- `strict`:是否开始严格模式路由,布尔类型。默认false,即:`/test``/test/`效果一样
121121

122-
路由器的用途还有很多,不仅支持多种请求类型的接口定义,还能分层管理,后面将单独开一篇详细讲讲,传送门:[路由的使用](./路由的使用.md)
122+
[//]: # (路由器的用途还有很多,不仅支持多种请求类型的接口定义,还能分层管理,后面将单独开一篇详细讲讲,传送门:[路由的使用]&#40;./路由的使用.md&#41;)
123123

124124
## application对象
125125

code/express/apps/template-demo/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ express --no-view template-demo
4545

4646
可以清晰地看见新创建了`template-demo`项目:
4747

48-
![](../images/express-create.png)
48+
![](./images/express-create.png)
4949

5050
## 目录结构
5151

docs/.vuepress/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
# vuepress 目录规范
3+
4+
- styles 目录固定
5+
- public 目录固定

docs/.vuepress/client.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/.vuepress/config.ts

Lines changed: 0 additions & 69 deletions
This file was deleted.

docs/.vuepress/config/index.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/.vuepress/config/sidebar.ts

Lines changed: 0 additions & 45 deletions
This file was deleted.

docs/.vuepress/theme/READEME.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 自定义布局
2+
3+
4+
## 参考
5+
6+
- <https://vuejs.press/zh/reference/frontmatter.html#layout>

docs/.vuepress/config/constant.config.ts renamed to docs/.vuepress/theme/constant.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const COPYRIGHT = `
3232
export const AUTHOR_INFO = {
3333
name: authorInfo.name,
3434
email: authorInfo.email,
35-
url: authorInfo.homePages
35+
url: authorInfo.homePage
3636
}
3737

3838

@@ -91,4 +91,4 @@ export const NotFoundMsgList = [
9191
"我陪你走到最后,能不能别想太多,会不会手牵着手,晚一点再到尽头,你说不该再相见只为了瞬间,谢谢你让我听见因为我在等待永远。",
9292
"天灰灰会不会,让我忘了你是谁,累不累睡不睡,单影无人相依偎,夜越黑梦违背,有谁肯安慰,我的世界将被摧毁也许颓废也是另一种美。",
9393
"我知道你我都没有错,只是忘了怎么退后,信誓旦旦给的承诺,全被时间扑了空。我知道我们都没有错,只是放手会比较好过,最美的爱情回忆里待续。",
94-
]
94+
]

docs/.vuepress/theme/headers.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import {HeadConfig} from "@vuepress/shared";
2+
3+
export const headers:HeadConfig[]=[
4+
[
5+
'link', { rel: 'icon', href: 'fight_favicon.ico' }
6+
],
7+
// vercel统计 相关配置
8+
[
9+
'script', { type: 'text/javascript', src: '/_vercel/insights/script.js' }
10+
],
11+
// 百度统计
12+
[
13+
'script', {}, `
14+
var _hmt = _hmt || [];
15+
(function() {
16+
var hm = document.createElement("script");
17+
hm.src = "https://hm.baidu.com/hm.js?613c9d7af9e1c9a7f9eef6a55aa2399d";
18+
var s = document.getElementsByTagName("script")[0];
19+
s.parentNode.insertBefore(hm, s);
20+
})();`
21+
]
22+
]

docs/.vuepress/config/lang.config.ts renamed to docs/.vuepress/theme/i18n.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {ThemeLocaleData} from "vuepress-theme-hope";
2-
import {NotFoundMsgList} from "./constant.config";
2+
import {NotFoundMsgList} from "./constant";
33

44
/**
55
* 支持中文
@@ -39,8 +39,10 @@ const localCN: ThemeLocaleData = {
3939
all: "全部",
4040
intro: "个人介绍",
4141
star: "收藏",
42+
empty:"空"
4243
},
4344

45+
4446
paginationLocales: {
4547
prev: "上一页",
4648
next: "下一页",
@@ -74,6 +76,6 @@ const localCN: ThemeLocaleData = {
7476
/**
7577
* 自定义语言,支持文案
7678
*/
77-
export const langConfig = {
79+
export const i18n = {
7880
"/": localCN
7981
}

0 commit comments

Comments
 (0)