@@ -134,6 +134,28 @@ Note that only "absolute" paths (starting with a '/') are allowed. The root
directory of that path is documentation/, that is, :doc:`/bsp-manual/index`
points at documentation/bsp-manual/index.rst.
+### Code blocks
+
+A code block is highlighted as BitBake unless it says otherwise, because
+most of the code in the manuals is BitBake metadata. A block of anything
+else states its language:
+
+ .. code-block:: console
+
+ $ bitbake core-image-minimal
+
+Use the language the block actually is, not the one it resembles. A
+session with a prompt is `console`, a script without one is `shell`, and
+a listing of paths or program output is `text`.
+
+If the BitBake lexer cannot read a valid BitBake block, show it as `text`
+and say why in a comment above it, so it can be switched back once the
+lexer is fixed:
+
+ .. Shown as text: the Pygments BitBake lexer misreads this block.
+
+ .. code-block:: text
+
## Adding screenshots
The preferred format for adding screenshots is
The manuals highlight a code block as BitBake unless it says otherwise, which is a rule a contributor can only discover by reading conf.py. Write it down, along with the languages the other blocks use and what to do with a block the BitBake lexer cannot read. AI-Generated: codex/claude-opus 5.5 (xhigh) Signed-off-by: Trevor Woerner <twoerner@gmail.com> --- documentation/standards.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)