create-vuepress-theme-hope
Version:
Create vuepress-theme-hope demo project helper
271 lines (234 loc) • 6.55 kB
text/typescript
import { hopeTheme } from "vuepress-theme-hope";
import { enNavbar, zhNavbar } from "./navbar/index.js";
import { enSidebar, zhSidebar } from "./sidebar/index.js";
export default hopeTheme({
hostname: "https://mister-hope.github.io",
author: {
name: "Mr.Hope",
url: "https://mister-hope.com",
},
logo: "https://theme-hope-assets.vuejs.press/logo.svg",
repo: "vuepress-theme-hope/vuepress-theme-hope",
docsDir: "src",
blog: {
medias: {
Baidu: "https://example.com",
BiliBili: "https://example.com",
Bitbucket: "https://example.com",
Dingding: "https://example.com",
Discord: "https://example.com",
Dribbble: "https://example.com",
Email: "mailto:info@example.com",
Evernote: "https://example.com",
Facebook: "https://example.com",
Flipboard: "https://example.com",
Gitee: "https://example.com",
GitHub: "https://example.com",
Gitlab: "https://example.com",
Gmail: "mailto:info@example.com",
Instagram: "https://example.com",
Lark: "https://example.com",
Lines: "https://example.com",
Linkedin: "https://example.com",
Pinterest: "https://example.com",
Pocket: "https://example.com",
QQ: "https://example.com",
Qzone: "https://example.com",
Reddit: "https://example.com",
Rss: "https://example.com",
Steam: "https://example.com",
Twitter: "https://example.com",
Wechat: "https://example.com",
Weibo: "https://example.com",
Whatsapp: "https://example.com",
Youtube: "https://example.com",
Zhihu: "https://example.com",
VuePressThemeHope: {
icon: "https://theme-hope-assets.vuejs.press/logo.svg",
link: "https://theme-hope.vuejs.press",
},
},
},
locales: {
"/": {
// navbar
navbar: enNavbar,
// sidebar
sidebar: enSidebar,
footer: "Default footer",
displayFooter: true,
blog: {
description: "A FrontEnd programmer",
intro: "/intro.html",
},
metaLocales: {
editLink: "Edit this page on GitHub",
},
},
/** Chinese locale config */
"/zh/": {
// navbar
navbar: zhNavbar,
// sidebar
sidebar: zhSidebar,
footer: "默认页脚",
displayFooter: true,
blog: {
description: "一个前端开发者",
intro: "/zh/intro.html",
},
// page meta
metaLocales: {
editLink: "在 GitHub 上编辑此页",
},
},
},
encrypt: {
config: {
"/demo/encrypt.html": {
hint: "Password: 1234",
password: "1234",
},
"/zh/demo/encrypt.html": {
hint: "Password: 1234",
password: "1234",
},
},
},
// enable it to preview all changes in time
// hotReload: true,
// These features are enabled for demo, only preserve features you need here
markdown: {
align: true,
attrs: true,
codeTabs: true,
component: true,
demo: true,
figure: true,
gfm: true,
imgLazyload: true,
imgSize: true,
include: true,
mark: true,
plantuml: true,
spoiler: true,
stylize: [
{
matcher: "Recommended",
// oxlint-disable-next-line typescript/consistent-return
replacer: ({ tag }) => {
if (tag === "em") {
return {
tag: "Badge",
attrs: { type: "tip" },
content: "Recommended",
};
}
},
},
],
sub: true,
sup: true,
tabs: true,
tasklist: true,
vPre: true,
// uncomment these if you need TeX support
// math: {
// // install katex before enabling it
// type: "katex",
// // or install @mathjax/src before enabling it
// type: "mathjax",
// },
// install chart.js before enabling it
// chartjs: true,
// install echarts before enabling it
// echarts: true,
// install flowchart.ts before enabling it
// flowchart: true,
// install mermaid before enabling it
// mermaid: true,
// playground: {
// presets: ["ts", "vue"],
// },
// install @vue/repl before enabling it
// vuePlayground: true,
// install sandpack-vue3 before enabling it
// sandpack: true,
// install @vuepress/plugin-revealjs and uncomment these if you need slides
// revealjs: {
// plugins: ["highlight", "math", "search", "notes", "zoom"],
// },
},
plugins: {
blog: true,
// Install @waline/client before enabling it
// Note: This is for testing ONLY!
// You MUST generate and use your own comment service in production.
// comment: {
// provider: "Waline",
// serverURL: "https://waline-comment.vuejs.press",
// },
components: {
components: ["Badge", "VPCard"],
},
icon: {
prefix: "fa6-solid:",
},
// install @vuepress/plugin-pwa and uncomment these if you want a PWA
// pwa: {
// favicon: "/favicon.ico",
// cacheHTML: true,
// cacheImage: true,
// appendBase: true,
// apple: {
// icon: "/assets/icon/apple-icon-152.png",
// statusBarColor: "black",
// },
// msTile: {
// image: "/assets/icon/ms-icon-144.png",
// color: "#ffffff",
// },
// manifest: {
// icons: [
// {
// src: "/assets/icon/chrome-mask-512.png",
// sizes: "512x512",
// purpose: "maskable",
// type: "image/png",
// },
// {
// src: "/assets/icon/chrome-mask-192.png",
// sizes: "192x192",
// purpose: "maskable",
// type: "image/png",
// },
// {
// src: "/assets/icon/chrome-512.png",
// sizes: "512x512",
// type: "image/png",
// },
// {
// src: "/assets/icon/chrome-192.png",
// sizes: "192x192",
// type: "image/png",
// },
// ],
// shortcuts: [
// {
// name: "Demo",
// short_name: "Demo",
// url: "/demo/",
// icons: [
// {
// src: "/assets/icon/guide-maskable.png",
// sizes: "192x192",
// purpose: "maskable",
// type: "image/png",
// },
// ],
// },
// ],
// },
// },
},
});