Skip to content

Commit 3479da9

Browse files
authored
New code blocks 🎨 and mermaid πŸ§œβ€β™€οΈ diagrams (#127)
* deps: update * remove old font stuff * remove pnpm-lock What is this still doing here o_O * refactor: CodeBlock to use Shiki from Astro * refactor: use Shiki language IDs for code fences * refactor: use astro-mermaid for mermaid diagrams * style: add more article padding when using hiding sidebars * fix: find languages by aliases as well * fix: make style global * fmt: prettier
1 parent 3e2f89d commit 3479da9

28 files changed

Lines changed: 343 additions & 11029 deletions

β€Žastro.config.mjsβ€Ž

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { defineConfig, fontProviders } from "astro/config";
22

33
import mdx from "@astrojs/mdx";
4-
import rehypeMermaid from "rehype-mermaid";
54
import { modifiedTime } from "./src/plugins/modifiedTime.mjs";
65
import rehypeMdxCodeProps from "rehype-mdx-code-props";
6+
import mermaid from "astro-mermaid";
77

88
// https://astro.build/config
99
export default defineConfig({
1010
site: "https://luals.github.io",
11-
integrations: [mdx()],
11+
integrations: [mdx(), mermaid({ theme: "dark" })],
1212
image: {
1313
domains: ["avatars.githubusercontent.com"],
1414
},
@@ -30,13 +30,7 @@ export default defineConfig({
3030
},
3131
],
3232
markdown: {
33-
/** We use our own syntax highlight from highlight.js */
34-
syntaxHighlight: false,
35-
smartypants: false,
36-
rehypePlugins: [
37-
() => rehypeMermaid({ mermaidConfig: { darkMode: true, theme: "dark" } }),
38-
rehypeMdxCodeProps,
39-
],
33+
rehypePlugins: [rehypeMdxCodeProps],
4034
remarkPlugins: [modifiedTime],
4135
},
4236
trailingSlash: "always",

β€Žbun.lockβ€Ž

Lines changed: 93 additions & 131 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žpackage.jsonβ€Ž

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,23 @@
1616
"@fortawesome/fontawesome-svg-core": "^7.2.0",
1717
"@fortawesome/free-brands-svg-icons": "^7.2.0",
1818
"@fortawesome/free-solid-svg-icons": "^7.2.0",
19-
"@types/lodash": "^4.17.24",
20-
"astro": "^6.1.9",
19+
"astro": "^6.1.10",
20+
"astro-mermaid": "^2.0.1",
2121
"autoprefixer": "^10.5.0",
2222
"axios": "^1.15.2",
2323
"dayjs": "^1.11.20",
2424
"fuse.js": "^7.3.0",
25-
"highlight.js": "^11.11.1",
26-
"jsdom": "29.0.2",
25+
"jsdom": "^29.1.0",
2726
"lodash": "^4.18.1",
2827
"mermaid": "^11.14.0",
29-
"playwright": "^1.59.1",
3028
"rehype-mdx-code-props": "^3.0.1",
31-
"rehype-mermaid": "^3.0.0",
3229
"sass": "^1.99.0",
3330
"sharp": "^0.34.5",
3431
"tippy.js": "^6.3.7"
3532
},
3633
"devDependencies": {
37-
"@playwright/test": "^1.59.1",
34+
"@types/lodash": "^4.17.24",
3835
"@types/bun": "latest",
39-
"@types/canvas-confetti": "^1.9.0",
4036
"@types/jsdom": "^28.0.1",
4137
"@types/node-fetch": "^2.6.13",
4238
"@types/node-fetch-cache": "^3.0.5",
@@ -47,6 +43,6 @@
4743
},
4844
"private": true,
4945
"peerDependencies": {
50-
"typescript": "^5.8.3"
46+
"typescript": "^6.0.3"
5147
}
5248
}

0 commit comments

Comments
Β (0)