Skip to content

Commit aa3bb8e

Browse files
committed
feat: replace mermaid with D2
1 parent 183f907 commit aa3bb8e

17 files changed

Lines changed: 1331 additions & 49 deletions

File tree

.github/workflows/build-preview.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
with:
2323
cache: "pnpm"
2424
node-version: 20
25+
- name: "setup d2"
26+
run: "curl -fsSL https://d2lang.com/install.sh | sh -s --"
2527
- name: "install dependencies"
2628
run: "pnpm install"
2729
- name: "build"

.github/workflows/deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
with:
2525
cache: "pnpm"
2626
node-version: 20
27+
- name: "setup d2"
28+
run: "curl -fsSL https://d2lang.com/install.sh | sh -s --"
2729
- name: "install dependencies"
2830
run: "pnpm install"
2931
- name: "build"

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pnpm-workspace.yaml
44
*.mdx
55
!README.md
66
!CONTRIBUTING.md
7+
public/d2
78

89
# TODO: remove
910
old

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ How to get docs running on your local machine for development.
1111

1212
- [node](https://nodejs.org)
1313
- [pnpm](https://pnpm.io/installation)
14+
- [d2](https://d2lang.com/) (optional for development - used for generating diagrams)
1415

1516
### Local Development
1617

astro.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import starlight from "@astrojs/starlight";
2+
import d2 from "astro-d2";
23
import { defineConfig } from "astro/config";
34
// import starlightLinksValidator from "starlight-links-validator";
45
import starlightSidebarTopics from "starlight-sidebar-topics";
@@ -251,6 +252,9 @@ export default defineConfig({
251252
),
252253
],
253254
}),
255+
d2({
256+
skipGeneration: !prod, // comment out if you have D2 locally and want to use it during dev
257+
}),
254258
],
255259
markdown: {
256260
remarkPlugins: [

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@fontsource/jetbrains-mono": "^5.2.5",
1818
"@fontsource/poppins": "^5.2.5",
1919
"astro": "^5.6.1",
20+
"astro-d2": "^0.7.0",
2021
"sharp": "^0.34.1",
2122
"starlight-contributor-list": "^0.3.0",
2223
"starlight-links-validator": "^0.15.1",

pnpm-lock.yaml

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

public/d2/docs/paper/dev/getting-started/paper-plugins-0.svg

Lines changed: 170 additions & 0 deletions
Loading

public/d2/docs/paper/dev/getting-started/plugin-yml-0.svg

Lines changed: 170 additions & 0 deletions
Loading

public/d2/docs/velocity/dev/api/plugin-messaging-0.svg

Lines changed: 180 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)