-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 优化导航栏结构 - 修改搜索框样式和位置 - 删除无用的eslint校验规则
- Loading branch information
Showing
21 changed files
with
5,206 additions
and
2,205 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,8 +39,6 @@ | |
> | ||
> 创建时间:2020年2月14日 | ||
|
||
|
||
<!-- ## 关于作者 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,109 +1,16 @@ | ||
import {defaultTheme} from "vuepress"; | ||
import navbar from "./config/navbar"; | ||
import sidebar from "./config/sidebar"; | ||
|
||
|
||
// 参考:https://v2.vuepress.vuejs.org/zh/guide/getting-started.html | ||
// 主题参考:https://antdocs.js.org/ | ||
import pluginsConfig from "./config/plugins.config"; | ||
import themeConfig from "./config/theme.config"; | ||
|
||
|
||
export default { | ||
title: "凡是过往、皆为序章", | ||
description: "一本有趣的JavaScript合集", | ||
base: "/JavaScriptCollection/", | ||
port: 7100, | ||
port: 5000, | ||
head: [ | ||
["link", {rel: "icon", href: "/fight_favicon.ico"}] | ||
], | ||
theme: defaultTheme({ | ||
home: '/', | ||
logo: "/favicon.ico", | ||
darkMode: false, // 禁用夜色 | ||
navbar, | ||
sidebar, | ||
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 // 显示最大搜索 | ||
// }, | ||
// ], | ||
] | ||
theme: themeConfig, | ||
// 插件配置 | ||
plugins:pluginsConfig, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
export const FOOTER_HTML_INFO=`Copyrights ©2019-${new Date().getFullYear()} | ||
<a href="https://github.com/mmdapl" target="_blank">Chu·Fan</a> All Rights Reserved Rong姐姐好可爱` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export default { | ||
text: "前端【Web】", | ||
text: "前端", | ||
children: [ | ||
{ | ||
text: "HTML", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {searchProPlugin} from "vuepress-plugin-search-pro"; | ||
|
||
/** | ||
* 使用的插件配置 | ||
*/ | ||
export default [ | ||
searchProPlugin({ | ||
// 索引全部内容 | ||
indexContent: true, | ||
// 为分类和标签添加索引 | ||
customFields: [ | ||
{ | ||
getter: (page) => page.frontmatter.category, | ||
formatter: "分类:$content", | ||
}, | ||
{ | ||
getter: (page) => page.frontmatter.tag, | ||
formatter: "标签:$content", | ||
}, | ||
], | ||
}), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import readBooksContent from "./read-books-content"; | ||
import readBooksContentSidebar from "./read-books-content.sidebar"; | ||
|
||
export default { | ||
"/read-books": readBooksContent | ||
"/read-books": readBooksContentSidebar | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import {hopeTheme} from "vuepress-theme-hope"; | ||
import navbar from "./navbar"; | ||
import sidebar from "./sidebar"; | ||
import {FOOTER_HTML_INFO} from "./constant"; | ||
|
||
/** | ||
* 主题相关配置 | ||
* 参考主题:https://theme-hope.vuejs.press/zh/config/intro.html#%E9%85%8D%E7%BD%AE%E6%A6%82%E5%BF%B5 | ||
*/ | ||
export default hopeTheme({ | ||
darkmode:"toggle", | ||
// 支持全屏 | ||
// fullscreen: true, | ||
// 纯净模式 | ||
// pure: true, | ||
hostname:'https://408.142vip.cn', | ||
author:{ | ||
name:'Chu·Fan', | ||
email:'fairy_408@2925.com', | ||
url:'https://www.142vip.cn' | ||
}, | ||
favicon:"/favicon.ico", | ||
// logo: "/assets/408_logo.png", | ||
navbar: navbar, | ||
// 导航栏布局 | ||
navbarLayout:{ | ||
start: ["Brand"], | ||
center: ["Links"], | ||
end: ["Language","Search","Repo", "Outlook", ] | ||
}, | ||
sidebar: sidebar, | ||
// sidebar: "heading", | ||
|
||
// 主题布局选项 | ||
docsRepo: "https://github.com/142vip/JavaScriptCollection.git", | ||
repo: "https://github.com/142vip/JavaScriptCollection", | ||
logoDark:"/assets/408_logo.png", | ||
|
||
// 博客配置 | ||
blog:{ | ||
name:'测试', | ||
avatar:'', | ||
description:'', | ||
intro:'', | ||
roundAvatar:true, | ||
timeline:"时间轴的顶部文字", | ||
articleInfo:"", | ||
medias:{ | ||
"BiliBili": "https://space.bilibili.com/350937042?spm_id_from=333.1007.0.0" | ||
} | ||
}, | ||
// 设置页脚 | ||
displayFooter:true, | ||
footer:FOOTER_HTML_INFO, | ||
|
||
// 主题色选择器 | ||
themeColor: { | ||
blue: "#2196f3", | ||
red: "#f26d6d", | ||
green: "#3eaf7c", | ||
orange: "#fb9b5f", | ||
}, | ||
|
||
plugins: { | ||
copyright:true, | ||
// 开启博客功能 | ||
blog:true, | ||
// 代码块 | ||
mdEnhance: { | ||
codetabs: true, | ||
}, | ||
copyCode: { | ||
showInMobile:true | ||
}, | ||
// 参考:https://theme-hope.vuejs.press/zh/guide/markdown/components.html | ||
components: { | ||
// 你想使用的组件 | ||
components: [ | ||
"AudioPlayer", | ||
"Badge", | ||
"BiliBili", | ||
"CodePen", | ||
"PDF", | ||
"StackBlitz", | ||
"VideoPlayer", | ||
"YouTube", | ||
], | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// 参考:https://theme-hope.vuejs.press/zh/guide/interface/code-theme.htm | ||
|
||
// 浅色主题 | ||
$code-light-them:"vs"; | ||
|
||
// 深色主题 | ||
$code-dark-theme:"atom-dark"; |
Oops, something went wrong.