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: '鄂ICP备2020015769号-1', 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, }, }, });