From d80f8353f89b8ad91ee2a224f948f41d0c4545ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Here=C3=B1=C3=BA?= Date: Sat, 18 May 2024 00:55:59 -0300 Subject: [PATCH] d2: update page (#12799) --- pages/common/d2.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pages/common/d2.md b/pages/common/d2.md index e8edef2fb..8fa519234 100644 --- a/pages/common/d2.md +++ b/pages/common/d2.md @@ -1,15 +1,16 @@ # d2 > A modern diagram scripting language that turns text to diagrams. +> Note: the output file supports SVG and PNG file formats. > More information: . -- Compile and render a D2 source file into an SVG or PNG file: +- Compile and render a D2 source file into an output file: -`d2 {{path/to/input_file.d2}} {{path/to/output_file.svg|path/to/output_file.png}}` +`d2 {{path/to/input_file.d2}} {{path/to/output_file.ext}}` - [w]atch live changes made to a D2 source file in the default web browser: -`d2 --watch {{path/to/input_file.d2}} {{path/to/output_file.svg|path/to/output_file.png}}` +`d2 --watch {{path/to/input_file.d2}} {{path/to/output_file.ext}}` - Format a D2 source file: @@ -21,8 +22,8 @@ - Use a different [t]heme for the output file (list available themes first to get the desired `theme_id`): -`d2 --theme {{theme_id}} {{path/to/input_file.d2}} {{path/to/output_file.svg|path/to/output_file.png}}` +`d2 --theme {{theme_id}} {{path/to/input_file.d2}} {{path/to/output_file.ext}}` - Make rendered diagrams look like hand [s]ketches: -`d2 --sketch true {{path/to/input_file.d2}} {{path/to/output_file.svg|path/to/output_file.png}}` +`d2 --sketch true {{path/to/input_file.d2}} {{path/to/output_file.ext}}`