Skip to content

Commit

Permalink
feat: support mermaid
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanzisama committed Nov 15, 2024
1 parent a475a15 commit e448c17
Show file tree
Hide file tree
Showing 3 changed files with 1,031 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { defineConfig } from "vitepress";
import { getSidebar } from "./utils/vitepress";
import themeConfig from "./theme.config";
import { resolve } from "path";
import { withMermaid } from "vitepress-plugin-mermaid";

// https://vitepress.dev/reference/site-config
export default defineConfig({
export default withMermaid({
title: "NitWikit",
description: "一群笨蛋们写的 Minecraft 开服教程",
ignoreDeadLinks: true,
Expand Down Expand Up @@ -35,6 +35,9 @@ export default defineConfig({
},
},
},
optimizeDeps: {
include: ['@braintree/sanitize-url', 'dayjs', 'debug', 'cytoscape-cose-bilkent', 'cytoscape']
}
},
lang: "zh-CN",
themeConfig: {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
"@types/node": "^22.9.0",
"front-matter": "^4.0.2",
"markdown-it": "^14.1.0",
"mermaid": "^11.4.0",
"sass-embedded": "^1.80.6",
"tiny-glob": "^0.2.9",
"vitepress": "^1.5.0",
"vitepress-i18n": "^1.3.0",
"vitepress-plugin-mermaid": "^2.0.17",
"vue": "^3.5.12"
},
"dependencies": {
Expand Down
Loading

0 comments on commit e448c17

Please sign in to comment.