terrastruct / d2

D2 is a modern diagram scripting language that turns text to diagrams.
https://d2lang.com
Mozilla Public License 2.0
17.5k stars 430 forks source link

Layout-engine-specific CLI options should be documented on website #2086

Open smheidrich opened 2 months ago

smheidrich commented 2 months ago

Proposal

It would be nice if layout-engine-specific CLI options such as --dagre-nodesep or --elk-padding were documented in the web docs somewhere so that people can find them when they search for the relevant keywords.

Possible implementations

A very easy way to do this would be to just add the output of d2 layout <ENGINE> for all engines to the CLI manual page.

Of course the "proper" way would be to have a separate page about these somewhere with proper formatting, but that probably only makes sense once that exists for the CLI in general.

Background

I was looking for a way to reduce the padding within nodes, but searching for "padding" on the docs website yields no useful results, making it look like that's not possible.

So I had a look at the issues and found https://github.com/terrastruct/d2/issues/1740#issuecomment-1925330949 which mentions the --dagre-nodesep CLI options, which made me curious if there were other options related to spacing, and indeed, there is --elk-padding for the ELK layout engine, which does exactly what I want.