Skip to contentSkip to conversation

standards.md: add a section on admonitions

PATCH In review Antonin Godard 2 participants 3 messages Nov 18, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 standards.md: add a section on admonitions

We try to limit our usage of these admonitions to note and warning, as the Sphinx documentation warns that most themes only style these two admonitions. So add a section on that.

---
 documentation/standards.md | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
documentation/standards.md +15 -0
index bc403e393e9a014daf0403b42197f3b71c75187b..f3d88d446b850ea015bd41ecef122afec490f4d3 100644
@@ -109,6 +109,21 @@ or in the BitBake User Manual
 If it is not described yet, the variable should be added to the
 glossary before or in the same patch it is used, so that `:term:` can be used.
 
+### Admonitions
+
+Sphinx has predefined admonitions that can be used to highlight a bit of text or
+add a side-note to the documentation. For example:
+
+```rst
+.. note::
+
+   This is a note admonition.
+```
+
+We try to limit our usage of these admonitions to `note` and `warning`, as the
+Sphinx documentation [warns](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#directives)
+that most themes only style these two admonitions.
+
 ## ReStructured Text Syntax standards
 
 This section has not been filled yet

---
base-commit: 4e6ff21b414943282a808b90a58edb584f5615e7
change-id: 20241118-update-standard-warn-note-925acaa7d0a8

Best regards,

Signature · 1 line
Antonin Godard <[email protected]>
#2 lore raw

Hi Quentin,

Quoted 10 lines · Quentin Schulz

Hi Antonin,

Quoted 6 lines · Antonin Godard

We try to limit our usage of these admonitions to note and warning, as the Sphinx documentation warns that most themes only style these two admonitions. So add a section on that.

Quoted 6 lines

Looks good to me,

Thanks!
Quentin

Thank you!
Antonin

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com