Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion website/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ export default defineConfig({
src: "1ds-init.js",
},
},
{
tag: "script",
attrs: {
type: "module",
},
content: `const els = document.querySelectorAll("pre.mermaid");
if (els.length > 0) {
const { default: mermaid } = await import("https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs");
mermaid.initialize({ startOnLoad: false });
await mermaid.run({ nodes: els });
}`,
},
],
social: [
{
Expand All @@ -70,7 +82,7 @@ export default defineConfig({
// @ts-expect-error wrong type
remarkPlugins: [remarkHeadingID],
rehypePlugins: [
rehypeMermaid,
[rehypeMermaid, { strategy: "pre-mermaid" }],
[rehypeAstroRelativeMarkdownLinks, { base, collectionBase: false, trailingSlash: "always" }],
],
shikiConfig: {
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dev": "astro dev",
"start": "astro dev",
"build": "tsx ./.scripts/build.ts",
"build:web": "pnpm regen-all-packages-docs && astro check --minimumFailingSeverity hint && NODE_OPTIONS=\"--max-old-space-size=8192\" astro build",
"build:web": "pnpm regen-all-packages-docs && astro check --minimumFailingSeverity hint && astro build",
"preview": "astro preview",
"astro": "astro",
"update-playground-versions": "tsx ./.scripts/update-playground-versions.ts",
Expand Down
Loading