Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: --board flag #1707

Closed
alixander opened this issue Nov 7, 2023 · 2 comments · Fixed by #1725
Closed

cli: --board flag #1707

alixander opened this issue Nov 7, 2023 · 2 comments · Fixed by #1725

Comments

@alixander
Copy link
Collaborator

This should allow exporting a single board from a multi-board diagram.

d2 --board root.x index.d2

index.d2:

a -> b
layers: {
  x: {
    c -> d
  }
}
@cyborg-ts cyborg-ts added this to D2 Nov 7, 2023
@Karreg
Copy link

Karreg commented Nov 7, 2023

Count me in for that one!
My use case is a technical documentation, when you want only one diagram with more or less details depending on the location in the documentation. Combined with mkdocs and mkdocs-d2-plugin it would be great!

@landmaj
Copy link
Contributor

landmaj commented Nov 12, 2023

This was surprisingly easy because D2 already supported rendering a specific board - it was used in --watch mode. I opened a PR.

@github-project-automation github-project-automation bot moved this to Done in D2 Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants