Skip to content

Commit d5ffb10

Browse files
committed
Better explain paths for static files
1 parent 4d27c51 commit d5ffb10

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/contributing/myst-reference.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ Use `image` for anything but diagrams.
108108

109109
Use `figure` for diagrams.
110110

111-
Paths to images and figures must resolve in both the main documentation and the submodule's documentation, if present.
111+
When the documentation is in a submodule, paths to images and figures must resolve in both the main documentation and the submodule's documentation.
112+
In other words, don't use file-relative paths.
113+
Instead place static assets in `/_static/` and a subdirectory named after the part or page of the documentation, and use a root-relative path, such as `/_static/user-manual/block-left-add-icon.png`
114+
Configuration in the `conf.py` files for the main documentation and its submodules handle the resolution of root-relative paths for you.
112115

113116

114117
#### Width of media

0 commit comments

Comments
 (0)