Skip to content

Commit

Permalink
Merge pull request #187 from ren-yamanashi/183-feat-render-mermaid
Browse files Browse the repository at this point in the history
feat:💪 render mermaid in md #183
  • Loading branch information
ubugeeei authored Dec 29, 2023
2 parents c5ec364 + 9bb30e9 commit abe055e
Show file tree
Hide file tree
Showing 3 changed files with 808 additions and 2 deletions.
10 changes: 8 additions & 2 deletions book/online-book/.vitepress/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import { defineConfig } from "vitepress";
import { sharedConfig } from "./shared.js";
import { jaConfig } from "./ja";
import { enConfig } from "./en.js";
import { withMermaid } from "vitepress-plugin-mermaid";
import { defineConfig } from "vitepress";


export default defineConfig({
// The same situation as the issue below is occurring, so mermaid is rendered only during production build.
// https://github.com/iamkun/dayjs/issues/480
export default (process.env.NODE_ENV === "production"
? withMermaid
: defineConfig)({
...sharedConfig,
locales: {
root: { label: "Japanese", lang: "ja", link: "/", ...jaConfig },
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"tsx": "^4.7.0",
"typescript": "^5.2.2",
"vitepress": "1.0.0-rc.4",
"vitepress-plugin-mermaid": "^2.0.16",
"vitest": "^0.29.2"
},
"volta": {
Expand Down
Loading

0 comments on commit abe055e

Please sign in to comment.