recipe/packages/create/template/blog/config/zh/theme.ts
2024-08-18 19:16:25 +08:00

230 lines
6.0 KiB
TypeScript

import { hopeTheme } from "vuepress-theme-hope";
import navbar from "./navbar.js";
import sidebar from "./sidebar.js";
import { MR_HOPE_AVATAR } from "./logo.js";
export default hopeTheme({
hostname: "https://mister-hope.github.io",
author: {
name: "Mr.Hope",
url: "https://mister-hope.com",
},
iconAssets: "fontawesome-with-brands",
logo: "https://theme-hope-assets.vuejs.press/logo.svg",
repo: "vuepress-theme-hope/vuepress-theme-hope",
docsDir: "src",
// 導航欄
navbar,
// 側邊欄
sidebar,
// 頁尾
footer: "內設頁尾",
displayFooter: true,
// 網誌相關
blog: {
description: "一個前端開發者",
intro: "/intro.html",
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",
MrHope: ["https://mister-hope.com", MR_HOPE_AVATAR],
},
},
// 加密配置
encrypt: {
config: {
"/demo/encrypt.html": ["1234"],
},
},
// 多語言配置
metaLocales: {
editLink: "在 GitHub 上編輯此頁",
},
// 如果想要實時查看任何改變,啟用它。注: 這對更新性能有很大負面影響
// hotReload: true,
// 在這裡配置主題提供的外掛程式
plugins: {
blog: true,
// 啟用之前需安裝 @waline/client
// 警告: 這是一個僅供範例的測試服務,在生產環境中請自行部署並使用自己的服務!
// comment: {
// provider: "Waline",
// serverURL: "https://waline-comment.vuejs.press",
// },
components: {
components: ["Badge", "VPCard"],
},
// 此處開啟了很多功能用於範例,你應僅保留用到的功能。
mdEnhance: {
align: true,
attrs: true,
codetabs: true,
component: true,
demo: true,
figure: true,
imgLazyload: true,
imgSize: true,
include: true,
mark: 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,
// 在啟用之前安裝 chart.js
// chart: true,
// insert component easily
// 在啟用之前安裝 echarts
// echarts: true,
// 在啟用之前安裝 flowchart.ts
// flowchart: true,
// gfm requires mathjax-full to provide tex support
// gfm: true,
// 在啟用之前安裝 katex
// katex: true,
// 在啟用之前安裝 mathjax-full
// mathjax: true,
// 在啟用之前安裝 mermaid
// mermaid: true,
// playground: {
// presets: ["ts", "vue"],
// },
// 在啟用之前安裝 reveal.js
// revealJs: {
// plugins: ["highlight", "math", "search", "notes", "zoom"],
// },
// 在啟用之前安裝 @vue/repl
// vuePlayground: true,
// install sandpack-vue3 before enabling it
// sandpack: true,
},
// 如果你需要 PWA。安裝 @vuepress/plugin-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",
// },
// ],
// },
// ],
// },
// },
},
});