第一次提交
This commit is contained in:
116
src/.vuepress/theme.ts
Normal file
116
src/.vuepress/theme.ts
Normal file
@@ -0,0 +1,116 @@
|
||||
import {hopeTheme} from "vuepress-theme-hope";
|
||||
|
||||
import navbar from "./navbar.js";
|
||||
import sidebar from "./sidebar.js";
|
||||
//VuePress Theme Hope主题的博客
|
||||
export default hopeTheme(
|
||||
{
|
||||
// 网站域名配置(用于SEO和RSS等功能)
|
||||
hostname: "https://mangmang.fun/",
|
||||
|
||||
// 作者信息
|
||||
author: {
|
||||
name: "LiuMangMang",
|
||||
},
|
||||
|
||||
// 网站许可证
|
||||
license: "CC 4.0",
|
||||
|
||||
// 导航栏配置(从 navbar.js 文件导入)
|
||||
navbar,
|
||||
|
||||
// 侧边栏配置(从 sidebar.js 文件导入)
|
||||
sidebar,
|
||||
|
||||
// 网站logo设置
|
||||
logo: "logo/transparentLogo.png", // 亮色模式下的logo
|
||||
logoDark: "logo/transparentLogo.png", // 暗色模式下的logo
|
||||
|
||||
// 支持简写仓库名称,会解析到 GitHub 上,同时也可以是一个完整的 URL
|
||||
// repo: "https://gitea.mangmang.fun/mangmang/blog",
|
||||
// 默认从 `repo` 内容中推断为以下之一:
|
||||
// "GitHub" / "GitLab" / "Gitee" / "Bitbucket" / "Source"
|
||||
repoLabel: "Gitea",
|
||||
repoDisplay: true,
|
||||
|
||||
// 是否显示编辑链接
|
||||
editLink: true,
|
||||
|
||||
// 文档源码目录
|
||||
docsDir: "src",
|
||||
|
||||
// 页脚配置
|
||||
footer: "<a href='https://beian.miit.gov.cn/' target='_blank'>蜀ICP备2025176018号-1</a> | Powered by VuePress | Theme by Hope",
|
||||
displayFooter: true,
|
||||
|
||||
// 是否显示最后更新时间
|
||||
lastUpdated: false,
|
||||
|
||||
// 深色模式配置(toggle表示用户可以切换)
|
||||
darkmode: "toggle",
|
||||
|
||||
// 博客相关配置
|
||||
blog: {
|
||||
description: "一个后端开发者",
|
||||
intro: "/intro.html"
|
||||
},
|
||||
|
||||
// Markdown增强功能配置
|
||||
markdown: {
|
||||
align: true, // 启用文本对齐
|
||||
attrs: true, // 启用属性支持
|
||||
codeTabs: true, // 启用代码选项卡
|
||||
component: true, // 启用组件支持
|
||||
demo: true, // 启用演示支持
|
||||
figure: true, // 启用图片描述
|
||||
gfm: true, // 启用GitHub风格的Markdown
|
||||
imgLazyload: true, // 启用图片懒加载
|
||||
imgSize: true, // 启用图片尺寸设置
|
||||
include: true, // 启用文件包含
|
||||
mark: true, // 启用标记高亮
|
||||
plantuml: true, // 启用PlantUML图表
|
||||
spoiler: true, // 启用剧透标记
|
||||
|
||||
// 文本样式化配置
|
||||
stylize: [
|
||||
{
|
||||
matcher: "Recommended",
|
||||
replacer: ({tag}) => {
|
||||
if (tag === "em")
|
||||
return {
|
||||
tag: "Badge",
|
||||
attrs: {type: "tip"},
|
||||
content: "Recommended",
|
||||
};
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
sub: true, // 启用下标
|
||||
sup: true, // 启用上标
|
||||
tabs: true, // 启用选项卡
|
||||
tasklist: true, // 启用任务列表
|
||||
vPre: true, // 启用v-pre支持
|
||||
},
|
||||
|
||||
// 插件配置
|
||||
plugins: {
|
||||
// 启用博客功能
|
||||
blog: true,
|
||||
|
||||
// 组件配置
|
||||
components: {
|
||||
components: ["Badge", "VPCard"],
|
||||
},
|
||||
|
||||
// 图标配置
|
||||
icon: {
|
||||
prefix: "fa6-solid:",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
// 自定义主题配置
|
||||
custom: true
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user