17 lines
448 B
TypeScript
Raw Normal View History

2021-04-06 23:47:32 +08:00
import { path } from "@vuepress/utils";
import { Theme } from "@vuepress/core";
2021-09-11 17:43:07 +08:00
import { MermaidPlugin } from "./plugin/mermaidPlugin";
2021-04-06 23:47:32 +08:00
2021-04-07 22:20:50 +08:00
export const docsPlugin: Theme = (options, app) => {
2021-04-06 23:47:32 +08:00
return {
name: "xray-docs-theme",
extends: "@vuepress/theme-default",
clientAppEnhanceFiles: path.resolve(__dirname, "clientAppEnhance.ts"),
2021-09-11 17:43:07 +08:00
extendsMarkdown: (md) => {
md.use(MermaidPlugin);
},
2021-04-06 23:47:32 +08:00
};
};
export default docsPlugin;