Skip to content

Commit 1a5e5f4

Browse files
committed
dep: Fixed dependencies for mermaid
1 parent c3e65f1 commit 1a5e5f4

File tree

3 files changed

+63
-37
lines changed

3 files changed

+63
-37
lines changed

.vitepress/config.mts

+43-37
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,51 @@ import { withMermaid } from 'vitepress-plugin-mermaid'
99
import { sidebar } from '../constants/nav'
1010

1111
// https://vitepress.dev/reference/site-config
12-
export default defineConfig({
13-
title: "Kurage Notes",
14-
description: "A static site to showcase my notes.",
15-
base: '/notes/',
16-
markdown: {
17-
math: true,
18-
config: (md) => {
19-
md.use(BiDirectionalLinks())
20-
md.use(InlineLinkPreviewElementTransform)
21-
md.use(Mark)
22-
md.use(Callout)
12+
export default withMermaid(
13+
defineConfig({
14+
title: "Kurage Notes",
15+
description: "A static site to showcase my notes.",
16+
base: '/notes/',
17+
markdown: {
18+
math: true,
19+
config: (md) => {
20+
md.use(BiDirectionalLinks())
21+
md.use(InlineLinkPreviewElementTransform)
22+
md.use(Mark)
23+
md.use(Callout)
24+
},
2325
},
24-
},
25-
vite: {
26-
optimizeDeps: {
27-
exclude: [
28-
'@nolebase/vitepress-plugin-inline-link-preview/client',
29-
],
26+
vite: {
27+
optimizeDeps: {
28+
exclude: [
29+
'@nolebase/vitepress-plugin-inline-link-preview/client',
30+
'mermaid',
31+
'vitepress-plugin-mermaid',
32+
],
33+
},
34+
ssr: {
35+
noExternal: [
36+
// If there are other packages that need to be processed by Vite, you can add them here.
37+
'@nolebase/vitepress-plugin-inline-link-preview',
38+
'mermaid',
39+
'vitepress-plugin-mermaid',
40+
],
41+
},
3042
},
31-
ssr: {
32-
noExternal: [
33-
// If there are other packages that need to be processed by Vite, you can add them here.
34-
'@nolebase/vitepress-plugin-inline-link-preview',
43+
themeConfig: {
44+
// https://vitepress.dev/reference/default-theme-config
45+
nav: [
46+
{ text: 'Home', link: '/' },
47+
{ text: 'Table of Contents', link: '/pages/toc' },
48+
{ text: 'Examples', link: '/pages/markdown-examples' }
3549
],
36-
},
37-
},
38-
themeConfig: {
39-
// https://vitepress.dev/reference/default-theme-config
40-
nav: [
41-
{ text: 'Home', link: '/' },
42-
{ text: 'Table of Contents', link: '/pages/toc' },
43-
{ text: 'Examples', link: '/pages/markdown-examples' }
44-
],
4550

46-
// TODO: Consider adding script to compose sidebar items
47-
sidebar: sidebar,
51+
// TODO: Consider adding script to compose sidebar items
52+
sidebar: sidebar,
4853

49-
socialLinks: [
50-
{ icon: 'github', link: 'https://github.com/mdrkrg' }
51-
]
52-
}
53-
})
54+
socialLinks: [
55+
{ icon: 'github', link: 'https://github.com/mdrkrg' }
56+
]
57+
}
58+
})
59+
)

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
"type": "module",
33
"packageManager": "pnpm@9.5.0",
44
"devDependencies": {
5+
"@braintree/sanitize-url": "^7.1.0",
56
"@nolebase/markdown-it-bi-directional-links": "^2.5.0",
67
"@nolebase/vitepress-plugin-inline-link-preview": "^2.5.0",
78
"@types/node": "^22.7.4",
9+
"cytoscape": "^3.30.2",
10+
"cytoscape-cose-bilkent": "^4.1.0",
11+
"dayjs": "^1.11.13",
12+
"debug": "^4.3.7",
813
"markdown-it-mark": "^4.0.0",
914
"markdown-it-mathjax3": "^4.3.2",
1015
"mermaid": "^11.2.1",

pnpm-lock.yaml

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)