Skip to content

Commit c564f9f

Browse files
author
爱吃抹茶不吃茶
committed
feat: 修改hope主题配置,新增一些文档优化
- 优化导航栏结构 - 修改搜索框样式和位置 - 删除无用的eslint校验规则
1 parent 5474059 commit c564f9f

21 files changed

+5206
-2205
lines changed

.eslintrc.js

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

.gitignore

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ logs
33
*.log
44
.vscode
55
.vscode/*
6-
npm-debug.log*
7-
yarn-debug.log*
8-
yarn-error.log*
9-
lerna-debug.log*
106
*/.DS_Store
117
.DS_Store
128
*/.vscode
@@ -32,8 +28,6 @@ coverage
3228
# nyc test coverage
3329
.nyc_output
3430

35-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
36-
.grunt
3731

3832
# Bower dependency directory (https://bower.io/)
3933
bower_components
@@ -66,8 +60,6 @@ typings/
6660
.rts2_cache_es/
6761
.rts2_cache_umd/
6862

69-
# Optional REPL history
70-
.node_repl_history
7163

7264
# Output of 'npm pack'
7365
*.tgz
@@ -98,22 +90,12 @@ dist
9890
# vuepress build output
9991
# .vuepress/dist
10092

101-
## static resource
93+
## static resource
10294
docs/.vuepress/.cache/
10395
docs/.vuepress/.temp/
10496
docs/.vuepress/dist/
10597

10698

107-
108-
# Serverless directories
109-
.serverless/
110-
111-
# FuseBox cache
112-
.fusebox/
113-
114-
# DynamoDB Local files
115-
.dynamodb/
116-
11799
# TernJS port file
118100
.tern-port
119101
/docs/.vuepress/.temp/

Readme.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
>
4040
> 创建时间:2020年2月14日
4141
42-
43-
4442
<!-- ## 关于作者
4543
4644

docker-compose.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
##
2+
## 服务名: JavaScriptCollection
3+
## IP范围: 172.30.0.100
4+
##
15
version: '2'
26
services:
3-
### JavaScriptCollection服务,ip范围 172.30.0.100
47
JavaScriptCollection:
58
image: registry.cn-hangzhou.aliyuncs.com/142vip/doc_book:JavaScriptCollection_0.0.1
69
container_name: JavaScriptCollection

docs/.vuepress/config.js

Lines changed: 6 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,16 @@
1-
import {defaultTheme} from "vuepress";
2-
import navbar from "./config/navbar";
3-
import sidebar from "./config/sidebar";
4-
5-
6-
// 参考:https://v2.vuepress.vuejs.org/zh/guide/getting-started.html
7-
// 主题参考:https://antdocs.js.org/
1+
import pluginsConfig from "./config/plugins.config";
2+
import themeConfig from "./config/theme.config";
83

94

105
export default {
116
title: "凡是过往、皆为序章",
127
description: "一本有趣的JavaScript合集",
138
base: "/JavaScriptCollection/",
14-
port: 7100,
9+
port: 5000,
1510
head: [
1611
["link", {rel: "icon", href: "/fight_favicon.ico"}]
1712
],
18-
theme: defaultTheme({
19-
home: '/',
20-
logo: "/favicon.ico",
21-
darkMode: false, // 禁用夜色
22-
navbar,
23-
sidebar,
24-
smoothScroll: true,
25-
lastUpdated: true,
26-
lastUpdatedText: "最近更新",
27-
contributorsText: '贡献者',
28-
notFound: ['not exist'],// 自定义404 页面提示语,数组
29-
backToHome: '返回首页', // 返回首页
30-
repo: "https://github.com/mmdapl/JavaScriptCollection",
31-
editLink: false,
32-
// 默认为 "Edit this page"
33-
// editLinkText: '帮助我们改善此页面!',
34-
displayAllHeaders: true,// 默认值:false 显示所有页面的标题链接
35-
search: true,
36-
searchMaxSuggestions: 10,
37-
}),
38-
plugins: [
39-
// 全文搜索 参考配置:https://github.com/vuepress/vuepress-next/blob/main/docs/.vuepress/config.ts
40-
// ['@vuepress/docsearch',
41-
// {
42-
// apiKey: '<API_KEY>',
43-
// indexName: '<INDEX_NAME>',
44-
// locales: {
45-
// '/': {
46-
// placeholder: '搜索一下',
47-
// translations: {
48-
// button: {
49-
// buttonText: '搜索一下',
50-
// buttonAriaLabel: '搜索一下',
51-
// },
52-
// modal: {
53-
// searchBox: {
54-
// resetButtonTitle: '清除查询条件',
55-
// resetButtonAriaLabel: '清除查询条件',
56-
// cancelButtonText: '取消',
57-
// cancelButtonAriaLabel: '取消'
58-
// },
59-
// startScreen: {
60-
// recentSearchesTitle: '搜索历史',
61-
// noRecentSearchesText: '没有搜索历史',
62-
// saveRecentSearchButtonTitle: '保存至搜索历史',
63-
// removeRecentSearchButtonTitle: '从搜索历史中移除',
64-
// favoriteSearchesTitle: '收藏',
65-
// removeFavoriteSearchButtonTitle: '从收藏中移除',
66-
// },
67-
// errorScreen: {
68-
// titleText: '无法获取结果',
69-
// helpText: '你可能需要检查你的网络连接',
70-
// },
71-
// footer: {
72-
// selectText: '查询',
73-
// selectKeyAriaLabel: 'Enter key',
74-
// navigateText: '切换',
75-
// navigateUpKeyAriaLabel: 'Arrow up',
76-
// navigateDownKeyAriaLabel: 'Arrow down',
77-
// closeText: '关闭',
78-
// closeKeyAriaLabel: 'Escape key',
79-
// searchByText: '技术支持',
80-
// },
81-
// noResultsScreen: {
82-
// noResultsText: '无法找到相关结果',
83-
// suggestedQueryText: '你可以尝试查询',
84-
// openIssueText: '你认为该查询应该有结果?',
85-
// openIssueLinkText: '点击反馈',
86-
// },
87-
// },
88-
// }
89-
// }
90-
// }
91-
// }],
92-
// other plugins
93-
// [
94-
// // 本地全文搜索
95-
// '@vuepress/plugin-search',
96-
// {
97-
// locales: {
98-
// '/': {
99-
// placeholder: '搜索',
100-
// },
101-
// '/zh/': {
102-
// placeholder: '搜索',
103-
// },
104-
// },
105-
// maxSuggestions: 10 // 显示最大搜索
106-
// },
107-
// ],
108-
]
13+
theme: themeConfig,
14+
// 插件配置
15+
plugins:pluginsConfig,
10916
};

docs/.vuepress/config/constant.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
export const FOOTER_HTML_INFO=`Copyrights ©2019-${new Date().getFullYear()}
3+
<a href="https://github.com/mmdapl" target="_blank">Chu·Fan</a> All Rights Reserved Rong姐姐好可爱`
4+

docs/.vuepress/config/navbar/front-end.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default {
2-
text: "前端【Web】",
2+
text: "前端",
33
children: [
44
{
55
text: "HTML",

docs/.vuepress/config/navbar/index.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,24 @@ export default [
1818
battleInterview,
1919
readBooks,
2020
{
21-
text: "常用网站",
21+
text:"其他",
2222
children: [
2323
{
24-
text: "平台汇总",
24+
text: "常用网站",
2525
link: "/sum-links",
2626
},
2727
{
2828
text: "技术文档",
29-
children: [
30-
{
31-
text: "百度",
32-
link: "http://www.baidu.com",
33-
},
34-
],
29+
link:'/test'
30+
},
31+
{
32+
text: "todo计划",
33+
link: "/sum-links",
34+
},
35+
{
36+
text: "变更记录",
37+
link: "/sum-links",
3538
},
3639
],
37-
},
40+
}
3841
];

docs/.vuepress/config/navbar/microservice.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default {
2-
text: '分布式微服务',
2+
text: '微服务',
33
children: [
44
{
55
text: "RPC框架",
@@ -36,7 +36,7 @@ export default {
3636
],
3737
},
3838
{
39-
text: '服务网关Kong',
39+
text: '网关Kong',
4040
link: '/kong'
4141
},
4242
{
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import {searchProPlugin} from "vuepress-plugin-search-pro";
2+
3+
/**
4+
* 使用的插件配置
5+
*/
6+
export default [
7+
searchProPlugin({
8+
// 索引全部内容
9+
indexContent: true,
10+
// 为分类和标签添加索引
11+
customFields: [
12+
{
13+
getter: (page) => page.frontmatter.category,
14+
formatter: "分类:$content",
15+
},
16+
{
17+
getter: (page) => page.frontmatter.tag,
18+
formatter: "标签:$content",
19+
},
20+
],
21+
}),
22+
]

0 commit comments

Comments
 (0)