Skip to content

Commit 0ef5081

Browse files
author
Chu Fan
committed
docs: 新增一些文档,修复启动异常
1 parent 62bce4f commit 0ef5081

File tree

83 files changed

+5951
-2456
lines changed

Some content is hidden

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

83 files changed

+5951
-2456
lines changed

docs/.vuepress/client.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import {defineClientConfig} from '@vuepress/client'
2+
// import NotFound from './layouts/NotFound.vue'
3+
4+
export default defineClientConfig({
5+
enhance({app, router, siteData}) {
6+
},
7+
setup() {
8+
},
9+
layouts: {
10+
// NotFound: NotFound
11+
},
12+
rootComponents: [],
13+
})

docs/.vuepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export default defineUserConfig({
3838
level: [2, 3, 4]
3939
}
4040
},
41+
4142
// 主题配置
4243
...themeConfig,
4344
// 插件配置

docs/.vuepress/config/navbar.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ export default [
66
text: "前端", link: "/front-end/",
77
},
88
{
9-
text: "后端【Node.js】", link: "/server-end/",
9+
text: "Node后端", link: "/server-end/",
1010
},
1111
{
12-
text: "开发技巧", link: "/develop-skill/",
12+
text: "Solo算法", link: "/solo-algorithm/",
1313
},
1414
{
15-
text: "Solo算法", link: "/solo-algorithm/",
15+
text: "开发技巧", link: "/develop-skill/",
1616
},
1717
{
1818
text: "读书整理", link: "/read-books/",
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
// import {searchProPlugin} from "vuepress-plugin-search-pro";
1+
import {searchProPlugin} from "vuepress-plugin-search-pro";
22

33
/**
44
* 使用的插件配置
55
*/
66

77
export default {
88
plugins: [
9-
// searchProPlugin({
10-
// // 索引全部内容
11-
// indexContent: true,
12-
// // 为分类和标签添加索引
13-
// customFields: [
14-
// {
15-
// getter: (page:any) => page.frontmatter.category,
16-
// formatter: "分类:$content",
17-
// },
18-
// {
19-
// getter: (page) => page.frontmatter.tag,
20-
// formatter: "标签:$content",
21-
// },
22-
// ],
23-
// }),
9+
searchProPlugin({
10+
// 索引全部内容
11+
indexContent: true,
12+
// 为分类和标签添加索引
13+
customFields: [
14+
{
15+
getter: (page: any) => page.frontmatter.category,
16+
formatter: "分类:$content",
17+
},
18+
{
19+
getter: (page) => page.frontmatter.tag,
20+
formatter: "标签:$content",
21+
},
22+
],
23+
}),
2424
]
2525
}

docs/.vuepress/config/sidebar.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ import {developSkillSidebar} from "../../develop-skill/develop-skill.sidebar";
55
import {frontEndSidebar} from "../../front-end/front-end.sidebar";
66
import {OtherSidebar} from "../../other/other.sidebar";
77
import {jobChanceSidebar} from "../../job-chance/job-chance.sidebar";
8+
import {eggSidebar} from "../../server-end/framework/egg/egg.sidebar";
9+
import {esStandardSidebar} from "../../read-books/cs-books/es-standard/es-standard-sidebar";
810

911
export default {
1012
"/front-end": frontEndSidebar,
1113
"/server-end": serverEndSidebar,
14+
"/server-end/framework/egg": eggSidebar,
1215
"/develop-skill": developSkillSidebar,
1316
"/solo-algorithm": soloAlgorithmSidebar,
1417
"/read-books": readBooksSidebar,
18+
"/read-books/cs-books/es-standard": esStandardSidebar,
1519
"/other": OtherSidebar,
1620
"/job-chance": jobChanceSidebar,
1721
// "/": [

docs/.vuepress/config/theme.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ export default {
112112
copyCode: {
113113
showInMobile: true
114114
},
115+
// 不自动生成readme目录
116+
autoCatalog: false,
115117
// 参考:https://theme-hope.vuejs.press/zh/guide/markdown/components.html
116118
components: {
117119
components: [
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!--自定义404页面-->
2+
3+
<script lang="ts" setup>
4+
import {useRouteLocale} from '@vuepress/client'
5+
import {useThemeLocaleData} from '@vuepress/theme-default/lib/client/components'
6+
7+
const routeLocale = useRouteLocale()
8+
const themeLocale = useThemeLocaleData()
9+
10+
const messages = themeLocale.value.notFound ?? ['Not Found']
11+
const getMsg = (): string =>
12+
messages[Math.floor(Math.random() * messages.length)]
13+
const homeLink = themeLocale.value.home ?? routeLocale.value
14+
const homeText = themeLocale.value.backToHome ?? 'Back to home'
15+
</script>
16+
17+
<template>
18+
<div class="theme-container">
19+
<main class="page">
20+
<div class="theme-default-content">
21+
<h1>404</h1>
22+
23+
<blockquote>{{ getMsg() }}</blockquote>
24+
25+
<RouterLink :to="homeLink">{{ homeText }}</RouterLink>
26+
</div>
27+
</main>
28+
</div>
29+
</template>
30+

docs/.vuepress/styles/config.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
$code-light-them: "atom-dark";
55

66
// 深色主题
7-
$code-dark-theme: "atom-dark";
7+
//$code-dark-theme: "atom-dark";

docs/.vuepress/styles/palette.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// 主题色
22
$theme-color: #2980B9;
33
$sidebar-width: 20rem;
4-
//$sidebar-mobile-width: 16rem;
4+
$sidebar-mobile-width: 16rem;
55
$content-width: 75rem;
66
$home-page-width:80rem;

docs/develop-skill/develop-skill.sidebar.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
export const developSkillSidebar = [
22
{
33
text: '软件安装',
4-
collapsible: true,
5-
children: [
6-
{
7-
text: 'IDEA',
8-
link: '/develop-skill/npm/npm'
9-
},
10-
{
11-
text: '软件大杂烩',
12-
link: '/develop-skill/software-install/readme.md'
13-
}
14-
]
4+
link: '/develop-skill/software-install/readme.md'
155
},
166
{
177
text: '包管理器',
@@ -40,7 +30,7 @@ export const developSkillSidebar = [
4030
link: '/develop-skill/monorepo/pnpm-style.md'
4131
},
4232
{
43-
text: 'turboRepo',
33+
text: 'TurboRepo',
4434
link: '/develop-skill/monorepo/turboRepo.md'
4535
}
4636
]

0 commit comments

Comments
 (0)