Skip to content

Commit 983b783

Browse files
author
喜欢葡萄+芝士的妹妹
committed
feat: 新增文档,优化navbar导航栏
1 parent 0df1d96 commit 983b783

21 files changed

Lines changed: 486 additions & 820 deletions

File tree

docs/.vuepress/config.js

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

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

Lines changed: 46 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,67 @@
1-
module.exports= {
1+
module.exports = {
22
text: "前端【Web】",
33
children: [
44
{
5-
text: "基础入门",
5+
text: "HTML",
6+
link: "/front-end/base-begin/html",
7+
},
8+
{
9+
text: "CSS",
10+
link: "/front-end/base-begin/css",
11+
},
12+
{
13+
text: "Javascript",
14+
link: "/front-end/base-begin/javascript",
15+
},
16+
{
17+
text: "前端框架",
618
children: [
719
{
8-
text: "html相关",
9-
link: "/front-end/base-begin/html",
20+
text: "Vue",
21+
link: "/front-end/front-framework/vue",
1022
},
1123
{
12-
text: "js相关",
13-
link: "/front-end/base-begin/javascript",
24+
text: "Nuxt",
25+
link: "/front-end/front-framework/nuxt",
1426
},
1527
{
16-
text: "css相关",
17-
link: "/front-end/base-begin/css",
28+
text: "JQuery",
29+
link: "/front-end/front-framework/jquery",
1830
},
1931
],
2032
},
2133
{
22-
text: "前端框架",
34+
text: "UI框架",
2335
children: [
2436
{
25-
text: "JQuery.js",
26-
link: "/front-end/front-framework/jquery",
37+
text: 'Ant-Design-Vue',
38+
link: '/front-end/ui-framework/ant-design-vue'
2739
},
2840
{
29-
text: "Vue.js",
30-
link: "/front-end/front-framework/vue",
41+
text: 'Element-UI',
42+
link: '/front-end/ui-framework/element-ui'
3143
},
3244
{
33-
text: "Nuxt.js",
34-
link: "/css",
45+
text: 'IView-Design',
46+
link: '/front-end/ui-framework/iview-design'
3547
},
36-
],
37-
},
38-
{
39-
text: "UI相关",
40-
link: "/ui-framework",
41-
// children: [{
42-
// text: 'Bootstrap',
43-
// link: '/html'
44-
// }, {
45-
// text: 'LayerUI',
46-
// link: '/js'
47-
// }, {
48-
// text: 'iView-UI',
49-
// link: '/css'
50-
// }, {
51-
// text: 'VantUI',
52-
// link: '/css'
53-
// }, {
54-
// text: 'Element-UI',
55-
// link: '/css'
56-
// }, {
57-
// text: 'Ant-design-vue',
58-
// link: '/css'
59-
// }]
48+
49+
{
50+
text: 'Vant-UI',
51+
link: '/front-end/ui-framework/vant-ui'
52+
},
53+
{
54+
text: 'Layer-UI',
55+
link: '/front-end/ui-framework/layer-ui'
56+
},
57+
{
58+
text: 'Bootstrap',
59+
link: '/front-end/ui-framework/bootstrap'
60+
},
61+
]
6062
},
61-
// {
62-
// text: '常用工具',
63-
// children: [{
64-
// text: '包管理器',
65-
// link: '/front-end/server-deploy/static-nginx'
66-
// }, {
67-
// text: '服务端渲染',
68-
// link: '/front-end/server-deploy/front-end-server'
69-
// }]
70-
// },
7163
{
72-
text: "常见部署",
64+
text: "服务部署",
7365
children: [
7466
{
7567
text: "前端分离【nginx】",
@@ -79,6 +71,10 @@ module.exports= {
7971
text: "服务端渲染",
8072
link: "/front-end/server-deploy/front-end-server",
8173
},
74+
{
75+
text: "SSR优化",
76+
link: '/ssr'
77+
}
8278
],
8379
},
8480
],
Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
module.exports = [
2-
{
3-
text: "首页",link: "/",
4-
},
5-
require('./front-end'),
6-
require('./server-end'),
7-
require('./dev-tool'),
8-
require('./solo-algorithm'),
9-
require('./battle-interview'),
10-
require('./read-books'),
11-
{
12-
text: "常用网站",
13-
children: [
14-
{
15-
text: "平台汇总",
16-
link: "/sum-links",
17-
},
18-
{
19-
text: "技术文档",
2+
{
3+
text: "首页", link: "/",
4+
},
5+
require('./front-end'),
6+
require('./server-end'),
7+
require('./microservice'),
8+
require('./dev-tool'),
9+
require('./solo-algorithm'),
10+
require('./battle-interview'),
11+
require('./read-books'),
12+
{
13+
text: "常用网站",
2014
children: [
21-
{
22-
text: "百度",
23-
link: "http://www.baidu.com",
24-
},
15+
{
16+
text: "平台汇总",
17+
link: "/sum-links",
18+
},
19+
{
20+
text: "技术文档",
21+
children: [
22+
{
23+
text: "百度",
24+
link: "http://www.baidu.com",
25+
},
26+
],
27+
},
2528
],
26-
},
27-
],
28-
},
29+
},
2930
];

0 commit comments

Comments
 (0)