From a8580b726a3d542be5159e5544d50ab69dda7eed Mon Sep 17 00:00:00 2001 From: Antonin Godard Date: Mon, 18 Nov 2024 15:24:01 +0100 Subject: 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. Suggested-by: Quentin Schulz Reviewed-by: Quentin Schulz (From yocto-docs rev: 2c28575c9aa0ca77d9c21f0833bacb19d44a7931) Signed-off-by: Antonin Godard (cherry picked from commit f86ffa1b1dcf0665c17424eee87b6bead09960f6) Signed-off-by: Antonin Godard Signed-off-by: Steve Sakoman --- documentation/standards.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'documentation/standards.md') diff --git a/documentation/standards.md b/documentation/standards.md index bc403e393e..f3d88d446b 100644 --- a/documentation/standards.md +++ b/documentation/standards.md @@ -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 -- cgit v1.2.3-54-g00ecf