Skip to content

Commit f829eef

Browse files
Merge pull request #9848 from mr-raj12/docs-pack-files-figures
docs: illustrate pack file format and sync packs.rst to multi-object packs
2 parents e779e55 + 55535a2 commit f829eef

9 files changed

Lines changed: 39302 additions & 12 deletions

File tree

docs/borg_theme/css/borg.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ cite {
179179
white-space: nowrap;
180180
}
181181

182+
/* Extra vertical breathing room for figures that need it. */
183+
.figure-padded {
184+
margin-top: 1.5em;
185+
margin-bottom: 1.5em;
186+
}
187+
182188
/* Remove the right-column max-width cap so content fills the full available width. */
183189
#right-column {
184190
max-width: none;

docs/development.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,29 @@ Then point a web browser at docs/_build/html/index.html.
387387
The website is updated automatically by ReadTheDocs through GitHub web hooks on the
388388
main repository.
389389

390+
Diagrams and figures
391+
~~~~~~~~~~~~~~~~~~~~~
392+
393+
Diagrams in the docs (for example the pack file figures in
394+
``docs/internals/``) are drawn with `Excalidraw <https://excalidraw.com/>`_.
395+
396+
For every figure we keep the editable source next to the image it produces, in
397+
the same directory and with the same base name: ``pack-layout.excalidraw`` for
398+
``pack-layout.png``. The ``.excalidraw`` file is plain JSON, so it diffs in git
399+
and anyone can open it on excalidraw.com to make changes and re-export.
400+
401+
To update a figure, edit the ``.excalidraw`` source, then export it to PNG with
402+
a white background at 2x scale (the docs use a light theme, so light text on a
403+
transparent background would be unreadable). Keep the PNG file name unchanged so
404+
the ``figure::`` directive that references it keeps working. Reference figures
405+
with the ``figure-padded`` class for consistent spacing::
406+
407+
.. figure:: pack-layout.png
408+
:width: 100%
409+
:figclass: figure-padded
410+
411+
Caption text.
412+
390413
Using Vagrant
391414
-------------
392415

0 commit comments

Comments
 (0)