1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

89 lines
1.8 KiB
TypeScript

import { getDirname, path } from "vuepress/utils";
import { hopeTheme } from "vuepress-theme-hope";
import navbar from "./navbar.js";
import sidebar from "./sidebar/index.js";
const __dirname = getDirname(import.meta.url);
export default hopeTheme({
hostname: "https://javaguide.cn/",
logo: "/logo.png",
favicon: "/favicon.ico",
author: {
name: "Guide",
url: "https://javaguide.cn/article/",
},
repo: "https://github.com/Snailclimb/JavaGuide",
docsDir: "docs",
pure: true,
focus: false,
breadcrumb: false,
navbar,
sidebar,
footer:
'<a href="https://beian.miit.gov.cn/" target="_blank">鄂ICP备2020015769号-1</a>',
displayFooter: true,
pageInfo: ["Author", "Category", "Tag", "Original", "Word", "ReadingTime"],
blog: {
intro: "/about-the-author/",
sidebarDisplay: "mobile",
medias: {
Zhihu: "https://www.zhihu.com/people/javaguide",
Github: "https://github.com/Snailclimb",
Gitee: "https://gitee.com/SnailClimb",
},
},
markdown: {
align: true,
codeTabs: true,
gfm: true,
include: {
resolvePath: (file, cwd) => {
if (file.startsWith("@"))
return path.resolve(
__dirname,
"../snippets",
file.replace("@", "./"),
);
return path.resolve(cwd, file);
},
},
tasklist: true,
},
plugins: {
blog: true,
copyright: {
author: "JavaGuide(javaguide.cn)",
license: "MIT",
triggerLength: 100,
maxLength: 700,
canonical: "https://javaguide.cn/",
global: true,
},
feed: {
atom: true,
json: true,
rss: true,
},
icon: {
assets: "//at.alicdn.com/t/c/font_2922463_o9q9dxmps9.css",
},
search: {
isSearchable: (page) => page.path !== "/",
maxSuggestions: 10,
},
},
});