recipe/packages/create/template/docs/config/en/theme.ts

184 lines
4.4 KiB
TypeScript
Raw Permalink Normal View History

2024-08-18 19:16:25 +08:00
import { hopeTheme } from "vuepress-theme-hope";
import navbar from "./navbar.js";
import sidebar from "./sidebar.js";
export default hopeTheme({
hostname: "https://vuepress-theme-hope-docs-demo.netlify.app",
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
navbar,
// sidebar
sidebar,
footer: "Default footer",
displayFooter: true,
encrypt: {
config: {
"/demo/encrypt.html": ["1234"],
},
},
metaLocales: {
editLink: "Edit this page on GitHub",
},
plugins: {
// Note: This is for testing ONLY!
// You MUST generate and use your own comment service in production.
comment: {
provider: "Giscus",
repo: "sinotec2/discuss",
repoId: "R_kgDOL8RFWw",
category: "Announcements",
categoryId: "DIC_kwDOL8RFW84CfZdr",
},
components: {
components: ["Badge", "VPCard"],
},
// All features are enabled for demo, only preserve features you need here
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,
// install chart.js before enabling it
// chart: true,
// insert component easily
// install echarts before enabling it
// echarts: true,
// install flowchart.ts before enabling it
// flowchart: true,
// gfm requires mathjax-full to provide tex support
// gfm: true,
// install katex before enabling it
// katex: true,
// install mathjax-full before enabling it
// mathjax: true,
// install mermaid before enabling it
// mermaid: true,
// playground: {
// presets: ["ts", "vue"],
// },
// install reveal.js before enabling it
// revealJs: {
// plugins: ["highlight", "math", "search", "notes", "zoom"],
// },
// install @vue/repl before enabling it
// vuePlayground: true,
// install sandpack-vue3 before enabling it
// sandpack: true,
},
// 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",
// },
// ],
// },
// ],
// },
// },
},
});