Skip to content

Commit 9bb8b5d

Browse files
committed
Add mermaid support and PowerShell/bash syntax highlighting
1 parent 68b00ac commit 9bb8b5d

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

docusaurus.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ const config = {
2525
onBrokenMarkdownLinks: 'warn',
2626
onBrokenAnchors: 'warn',
2727

28+
// Set Mermaid
29+
markdown: {
30+
mermaid: true,
31+
},
32+
themes: ['@docusaurus/theme-mermaid'],
33+
2834
// Performance optimizations with Docusaurus Faster
2935
future: {
3036
experimental_faster: {
@@ -103,6 +109,17 @@ const config = {
103109
themeConfig:
104110
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
105111
({
112+
// MermaidJS Config
113+
mermaid: {
114+
theme: {
115+
light: 'neutral',
116+
dark: 'dark',
117+
},
118+
options: {
119+
look: 'handDrawn',
120+
handDrawnSeed: 1,
121+
},
122+
},
106123
// Replace with your project's social card
107124
image: 'img/Logo_RGB.svg',
108125
docs: {
@@ -205,6 +222,7 @@ const config = {
205222
prism: {
206223
theme: prismThemes.github,
207224
darkTheme: prismThemes.dracula,
225+
additionalLanguages: ['powershell', 'bash'],
208226
},
209227
}),
210228
// Add preconnect for better search performance

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@docusaurus/plugin-google-tag-manager": "^3.8.1",
2323
"@docusaurus/plugin-rsdoctor": "^3.8.1",
2424
"@docusaurus/preset-classic": "^3.8.1",
25+
"@docusaurus/theme-mermaid": "^3.8.1",
2526
"@mdx-js/react": "^3.0.0",
2627
"prism-react-renderer": "^2.3.0",
2728
"react": "^18.3.1",

0 commit comments

Comments
 (0)