1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-04-09 13:38:36 +08:00

Merge pull request #7 from 142vip/next

feat:修改配置,theme配置优化
This commit is contained in:
Rong姐姐好可爱
2023-02-08 18:31:05 +08:00
committed by GitHub
6 changed files with 98 additions and 91 deletions

View File

@@ -1,6 +1,7 @@
import themeConfig from "./config/theme.config";
import pluginsConfig from "./config/plugins.config";
export default {
title: "计算机应试全家桶",
description: "磨刀不误砍柴工,读完硕士再打工",
@@ -22,6 +23,6 @@ export default {
})();`
]
],
theme: themeConfig,
plugins: pluginsConfig
...themeConfig,
...pluginsConfig
}

View File

@@ -1,5 +1,5 @@
export const FOOTER_HTML_INFO=`
<a href="https://tongji.baidu.com/web/welcome/login" target="_blank">百度统计</a> Copyrights © 2015-${new Date().getFullYear()}
| <a href="https://github.com/mmdapl" target="_blank">储凡</a>
| <a href="https://github.com/mmdapl" target="_blank">Chu Fan</a>
`

View File

@@ -1,19 +1,21 @@
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",
},
],
}),
]
export default {
plugins:[
searchProPlugin({
// 索引全部内容
indexContent: true,
// 为分类和标签添加索引
customFields: [
{
getter: (page) => page.frontmatter.category,
formatter: "分类:$content",
},
{
getter: (page) => page.frontmatter.tag,
formatter: "标签:$content",
},
],
}),
]
}

View File

@@ -1,80 +1,84 @@
import {hopeTheme} from "vuepress-theme-hope";
import navbar from "./navbar";
import sidebar from "./sidebar";
import {FOOTER_HTML_INFO} from "./constant";
import {FOOTER_HTML_INFO} from "./constant.config";
/**
* hope主题配置
* 参考https://theme-hope.vuejs.press/zh/config/
*/
export default hopeTheme({
darkmode:"toggle",
// 支持全屏
// fullscreen: true,
// 纯净模式
// pure: true,
hostname:'https://408.142vip.cn',
author:{
name:'ChuFan',
email:'fairy_408@2925.com',
url:'https://www.142vip.cn'
},
favicon:"/408_favicon.ico",
logo: "/assets/408_logo.png",
navbar: navbar,
// 导航栏布局
navbarLayout:{
start: ["Brand"],
center: ["Links"],
end: ["Language","Search","Repo", "Outlook", ]
},
sidebar: sidebar,
// sidebar: "heading",
// 主题布局选项
repo: "https://github.com/mmdapl/408CSFamily",
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,
copyright:false,
// 主题色选择器
themeColor: {
blue: "#2196f3",
red: "#f26d6d",
green: "#3eaf7c",
orange: "#fb9b5f",
},
plugins: {
copyright:false,
// 开启博客功能
blog:true,
// 代码块
mdEnhance: {
codetabs: true,
export default {
theme: hopeTheme({
darkmode:"toggle",
// 支持全屏
// fullscreen: true,
// 纯净模式
// pure: true,
print: false, // 打印按钮
hostname:'https://408.142vip.cn',
author:{
name:'ChuFan',
email:'fairy_408@2925.com',
url:'https://www.142vip.cn'
},
copyCode: {
showInMobile:true
favicon:"/408_favicon.ico",
logo: "/assets/408_logo.png",
navbar: navbar,
// 导航栏布局
navbarLayout:{
start: ["Brand"],
center: ["Links"],
end: ["Language","Search","Repo", "Outlook", ]
},
feed: {
json: true,
sidebar: sidebar,
// sidebar: "heading",
// 主题布局选项
repo: "https://github.com/mmdapl/408CSFamily",
logoDark:"/assets/408_logo.png",
// 博客配置
blog:{
name:'凡是过往',
avatar:'',
description:'',
intro:'',
roundAvatar:true,
timeline:"时间轴的顶部文字",
articleInfo:"",
// sidebarDisplay:"always",
medias:{
"BiliBili": "https://space.bilibili.com/350937042?spm_id_from=333.1007.0.0"
}
},
},
})
// 设置页脚
displayFooter:true,
footer:FOOTER_HTML_INFO,
// copyright:false,
// 主题色选择器
themeColor: {
blue: "#2196f3",
red: "#f26d6d",
green: "#3eaf7c",
orange: "#fb9b5f",
},
plugins: {
copyright:false,
// 开启博客功能
// blog:true,
// 代码块
mdEnhance: {
codetabs: true,
},
copyCode: {
showInMobile:true
},
feed: {
json: true,
},
},
})
}

View File

@@ -1,7 +1,7 @@
// 参考https://theme-hope.vuejs.press/zh/guide/interface/code-theme.htm
// 浅色主题
$code-light-them:"vs";
$code-light-them:"coldark-cold";
// 深色主题
$code-dark-theme:"atom-dark";

View File

@@ -6,7 +6,7 @@ actions:
- text: 快速开始→
link: /guide/
type: primary
- text: 工作机会
- text: 工作机会 💡
link: /work/
type: secondary
features: