Define layout engine in d2 file (#9697)

## What changed?

Moved decision which d2 layout engine to use into file.

## Why?

Allows each file to pick the right layout engine for itself.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Stephan Behnke
2026-03-30 10:08:45 -07:00
committed by GitHub
parent 87f3e355d6
commit 648daa7d2e
5 changed files with 327 additions and 333 deletions

View File

@@ -4,8 +4,8 @@ DIAGRAMS := $(wildcard ./_assets/*.d2)
install-d2:
@printf $(COLOR) "Install d2..."
@go install oss.terrastruct.com/d2@v0.6.3
@go install oss.terrastruct.com/d2@v0.7.1
update-diagrams: install-d2
@printf $(COLOR) "Update diagrams"
$(foreach DIAGRAM, $(DIAGRAMS), $(shell d2 --layout elk --theme 7 --dark-theme 200 $(DIAGRAM) $(NEWLINE)))
$(foreach DIAGRAM, $(DIAGRAMS), $(shell d2 --theme 7 --dark-theme 200 $(DIAGRAM) $(NEWLINE)))

View File

@@ -1,6 +1,12 @@
# https://d2lang.com
# Generate SVG by running `make` inside of `docs/`.
vars: {
d2-config: {
layout-engine: elk
}
}
Cluster: {
grid-rows: 2
vertical-gap: 10

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -1,6 +1,12 @@
# https://d2lang.com
# Generate SVG by running `make` inside of `docs/`.
vars: {
d2-config: {
layout-engine: elk
}
}
classes: {
invisible: {
style.opacity: 0

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB