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

111 lines
2.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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",
iconAssets: "//at.alicdn.com/t/c/font_2922463_o9q9dxmps9.css",
author: {
name: "Guide",
url: "https://javaguide.cn/article/",
},
repo: "https://github.com/Snailclimb/JavaGuide",
docsDir: "docs",
// 纯净模式https://theme-hope.vuejs.press/zh/guide/interface/pure.html
pure: true,
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",
},
},
plugins: {
components: {
rootComponents: {
// https://plugin-components.vuejs.press/zh/guide/utilities/notice.html#%E7%94%A8%E6%B3%95
// notice: [
// {
// path: "/",
// title: "PDF面试资料2024版",
// showOnce: true,
// content:
// "2024最新版原创PDF面试资料来啦涵盖 Java 核心、数据库、缓存、分布式、设计模式、智力题等内容,非常全面!",
// actions: [
// {
// text: "点击领取",
// link: "https://oss.javaguide.cn/backend-notekbook/official-account-traffic-backend-notebook-with-data-screenshot.png",
// type: "primary",
// },
// ],
// },
// ],
},
},
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,
},
mdEnhance: {
align: true,
codetabs: true,
figure: true,
gfm: true,
hint: true,
include: {
resolvePath: (file, cwd) => {
if (file.startsWith("@"))
return path.resolve(
__dirname,
"../snippets",
file.replace("@", "./"),
);
return path.resolve(cwd, file);
},
},
tasklist: true,
},
search: {
isSearchable: (page) => page.path !== "/",
maxSuggestions: 10,
},
},
});