Skip to content

Commit

Permalink
feat: 新增文档,优化navbar导航栏
Browse files Browse the repository at this point in the history
  • Loading branch information
chufan443 committed Dec 26, 2022
1 parent 0df1d96 commit 983b783
Show file tree
Hide file tree
Showing 21 changed files with 486 additions and 820 deletions.
198 changes: 100 additions & 98 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,103 +1,105 @@
import {defaultTheme} from "vuepress";
// 参考:https://v2.vuepress.vuejs.org/zh/guide/getting-started.html
// 主题参考:https://antdocs.js.org/


export default {
title: "凡是过往、皆为序章",
description: "一本有趣的JavaScript合集",
// base: "/JavaScriptCollection/",
port: 7100,
head: [
["link", { rel: "icon", href: "/fight_favicon.ico" }]
],
theme: defaultTheme({
home:'/',
logo: "/favicon.ico",
darkMode: false, // 禁用夜色
navbar: require("./config/navbar/index"), // 注意这个关键字有所改变
sidebar: require("./config/sidebar/index"),
smoothScroll: true,
lastUpdated: true,
lastUpdatedText: "最近更新",
contributorsText: '贡献者',
notFound: ['not exist'],// 自定义404 页面提示语,数组
backToHome: '返回首页', // 返回首页
repo: "https://github.com/mmdapl/JavaScriptCollection",
editLink: false,
// 默认为 "Edit this page"
// editLinkText: '帮助我们改善此页面!',
displayAllHeaders: true,// 默认值:false 显示所有页面的标题链接
search: true,
searchMaxSuggestions: 10,
}),
plugins: [
// 全文搜索 参考配置:https://github.com/vuepress/vuepress-next/blob/main/docs/.vuepress/config.ts
// ['@vuepress/docsearch',
// {
// apiKey: '<API_KEY>',
// indexName: '<INDEX_NAME>',
// locales: {
// '/': {
// placeholder: '搜索一下',
// translations: {
// button: {
// buttonText: '搜索一下',
// buttonAriaLabel: '搜索一下',
// },
// modal: {
// searchBox: {
// resetButtonTitle: '清除查询条件',
// resetButtonAriaLabel: '清除查询条件',
// cancelButtonText: '取消',
// cancelButtonAriaLabel: '取消'
// },
// startScreen: {
// recentSearchesTitle: '搜索历史',
// noRecentSearchesText: '没有搜索历史',
// saveRecentSearchButtonTitle: '保存至搜索历史',
// removeRecentSearchButtonTitle: '从搜索历史中移除',
// favoriteSearchesTitle: '收藏',
// removeFavoriteSearchButtonTitle: '从收藏中移除',
// },
// errorScreen: {
// titleText: '无法获取结果',
// helpText: '你可能需要检查你的网络连接',
// },
// footer: {
// selectText: '查询',
// selectKeyAriaLabel: 'Enter key',
// navigateText: '切换',
// navigateUpKeyAriaLabel: 'Arrow up',
// navigateDownKeyAriaLabel: 'Arrow down',
// closeText: '关闭',
// closeKeyAriaLabel: 'Escape key',
// searchByText: '技术支持',
// },
// noResultsScreen: {
// noResultsText: '无法找到相关结果',
// suggestedQueryText: '你可以尝试查询',
// openIssueText: '你认为该查询应该有结果?',
// openIssueLinkText: '点击反馈',
// },
// },
// }
// }
// }
// }],
// other plugins
// [
// // 本地全文搜索
// '@vuepress/plugin-search',
// {
// locales: {
// '/': {
// placeholder: '搜索',
// },
// '/zh/': {
// placeholder: '搜索',
// },
// },
// maxSuggestions: 10 // 显示最大搜索
// },
// ],
]
title: "凡是过往、皆为序章",
description: "一本有趣的JavaScript合集",
// base: "/JavaScriptCollection/",
port: 7100,
head: [
["link", {rel: "icon", href: "/fight_favicon.ico"}]
],
theme: defaultTheme({
home: '/',
logo: "/favicon.ico",
darkMode: false, // 禁用夜色
navbar: require("./config/navbar/index"), // 注意这个关键字有所改变
sidebar: require("./config/sidebar/index"),
smoothScroll: true,
lastUpdated: true,
lastUpdatedText: "最近更新",
contributorsText: '贡献者',
notFound: ['not exist'],// 自定义404 页面提示语,数组
backToHome: '返回首页', // 返回首页
repo: "https://github.com/mmdapl/JavaScriptCollection",
editLink: false,
// 默认为 "Edit this page"
// editLinkText: '帮助我们改善此页面!',
displayAllHeaders: true,// 默认值:false 显示所有页面的标题链接
search: true,
searchMaxSuggestions: 10,
}),
plugins: [
// 全文搜索 参考配置:https://github.com/vuepress/vuepress-next/blob/main/docs/.vuepress/config.ts
// ['@vuepress/docsearch',
// {
// apiKey: '<API_KEY>',
// indexName: '<INDEX_NAME>',
// locales: {
// '/': {
// placeholder: '搜索一下',
// translations: {
// button: {
// buttonText: '搜索一下',
// buttonAriaLabel: '搜索一下',
// },
// modal: {
// searchBox: {
// resetButtonTitle: '清除查询条件',
// resetButtonAriaLabel: '清除查询条件',
// cancelButtonText: '取消',
// cancelButtonAriaLabel: '取消'
// },
// startScreen: {
// recentSearchesTitle: '搜索历史',
// noRecentSearchesText: '没有搜索历史',
// saveRecentSearchButtonTitle: '保存至搜索历史',
// removeRecentSearchButtonTitle: '从搜索历史中移除',
// favoriteSearchesTitle: '收藏',
// removeFavoriteSearchButtonTitle: '从收藏中移除',
// },
// errorScreen: {
// titleText: '无法获取结果',
// helpText: '你可能需要检查你的网络连接',
// },
// footer: {
// selectText: '查询',
// selectKeyAriaLabel: 'Enter key',
// navigateText: '切换',
// navigateUpKeyAriaLabel: 'Arrow up',
// navigateDownKeyAriaLabel: 'Arrow down',
// closeText: '关闭',
// closeKeyAriaLabel: 'Escape key',
// searchByText: '技术支持',
// },
// noResultsScreen: {
// noResultsText: '无法找到相关结果',
// suggestedQueryText: '你可以尝试查询',
// openIssueText: '你认为该查询应该有结果?',
// openIssueLinkText: '点击反馈',
// },
// },
// }
// }
// }
// }],
// other plugins
// [
// // 本地全文搜索
// '@vuepress/plugin-search',
// {
// locales: {
// '/': {
// placeholder: '搜索',
// },
// '/zh/': {
// placeholder: '搜索',
// },
// },
// maxSuggestions: 10 // 显示最大搜索
// },
// ],
]
};
96 changes: 46 additions & 50 deletions docs/.vuepress/config/navbar/front-end.js
Original file line number Diff line number Diff line change
@@ -1,75 +1,67 @@
module.exports= {
module.exports = {
text: "前端【Web】",
children: [
{
text: "基础入门",
text: "HTML",
link: "/front-end/base-begin/html",
},
{
text: "CSS",
link: "/front-end/base-begin/css",
},
{
text: "Javascript",
link: "/front-end/base-begin/javascript",
},
{
text: "前端框架",
children: [
{
text: "html相关",
link: "/front-end/base-begin/html",
text: "Vue",
link: "/front-end/front-framework/vue",
},
{
text: "js相关",
link: "/front-end/base-begin/javascript",
text: "Nuxt",
link: "/front-end/front-framework/nuxt",
},
{
text: "css相关",
link: "/front-end/base-begin/css",
text: "JQuery",
link: "/front-end/front-framework/jquery",
},
],
},
{
text: "前端框架",
text: "UI框架",
children: [
{
text: "JQuery.js",
link: "/front-end/front-framework/jquery",
text: 'Ant-Design-Vue',
link: '/front-end/ui-framework/ant-design-vue'
},
{
text: "Vue.js",
link: "/front-end/front-framework/vue",
text: 'Element-UI',
link: '/front-end/ui-framework/element-ui'
},
{
text: "Nuxt.js",
link: "/css",
text: 'IView-Design',
link: '/front-end/ui-framework/iview-design'
},
],
},
{
text: "UI相关",
link: "/ui-framework",
// children: [{
// text: 'Bootstrap',
// link: '/html'
// }, {
// text: 'LayerUI',
// link: '/js'
// }, {
// text: 'iView-UI',
// link: '/css'
// }, {
// text: 'VantUI',
// link: '/css'
// }, {
// text: 'Element-UI',
// link: '/css'
// }, {
// text: 'Ant-design-vue',
// link: '/css'
// }]

{
text: 'Vant-UI',
link: '/front-end/ui-framework/vant-ui'
},
{
text: 'Layer-UI',
link: '/front-end/ui-framework/layer-ui'
},
{
text: 'Bootstrap',
link: '/front-end/ui-framework/bootstrap'
},
]
},
// {
// text: '常用工具',
// children: [{
// text: '包管理器',
// link: '/front-end/server-deploy/static-nginx'
// }, {
// text: '服务端渲染',
// link: '/front-end/server-deploy/front-end-server'
// }]
// },
{
text: "常见部署",
text: "服务部署",
children: [
{
text: "前端分离【nginx】",
Expand All @@ -79,6 +71,10 @@ module.exports= {
text: "服务端渲染",
link: "/front-end/server-deploy/front-end-server",
},
{
text: "SSR优化",
link: '/ssr'
}
],
},
],
Expand Down
51 changes: 26 additions & 25 deletions docs/.vuepress/config/navbar/index.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
module.exports = [
{
text: "首页",link: "/",
},
require('./front-end'),
require('./server-end'),
require('./dev-tool'),
require('./solo-algorithm'),
require('./battle-interview'),
require('./read-books'),
{
text: "常用网站",
children: [
{
text: "平台汇总",
link: "/sum-links",
},
{
text: "技术文档",
{
text: "首页", link: "/",
},
require('./front-end'),
require('./server-end'),
require('./microservice'),
require('./dev-tool'),
require('./solo-algorithm'),
require('./battle-interview'),
require('./read-books'),
{
text: "常用网站",
children: [
{
text: "百度",
link: "http://www.baidu.com",
},
{
text: "平台汇总",
link: "/sum-links",
},
{
text: "技术文档",
children: [
{
text: "百度",
link: "http://www.baidu.com",
},
],
},
],
},
],
},
},
];

0 comments on commit 983b783

Please sign in to comment.