From: "Antonin Godard" <antonin.godard@bootlin.com>
To: <twoerner@gmail.com>, <docs@lists.yoctoproject.org>
Subject: Re: [docs] [PATCH 16/16] standards: describe how a code block states its language
Date: Thu, 03 Dec 2026 14:53:44 +0100 [thread overview]
Message-ID: <DNB5CBKY39CP.3KGY5EYSVEZGQ@bootlin.com> (raw)
In-Reply-To: <20261201152251.2742634-17-twoerner@gmail.com>
On Tue Dec 1, 2026 at 4:22 PM CET, Trevor Woerner via docs wrote:
> 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(+)
>
> diff --git a/documentation/standards.md b/documentation/standards.md
> index 152a90923401..2614220ef0e1 100644
> --- a/documentation/standards.md
> +++ b/documentation/standards.md
> @@ -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
Can you add a link to https://pygments.org/docs/lexers and mention that "short
names" should be used with the code-block directive?
At the beginning, can you add an example of what a "default" code-block looks
like? I assume not everyone knows that this means a code block coming after a
line ending with "::".
Thanks, that was quite the series to review!
Antonin
prev parent reply other threads:[~2026-12-03 13:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 15:22 [PATCH 00/16] docs: highlight code blocks as BitBake by default Trevor Woerner
2026-12-01 15:22 ` [PATCH 01/16] brief-yoctoprojectqs: state the language of the blocks that are not BitBake Trevor Woerner
2026-12-01 15:22 ` [PATCH 02/16] bsp-manual: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 03/16] contributor-guide: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 04/16] dev-manual: " Trevor Woerner
2026-12-03 13:53 ` [docs] " Antonin Godard
2026-12-01 15:22 ` [PATCH 05/16] kernel-dev: " Trevor Woerner
2026-12-03 13:53 ` [docs] " Antonin Godard
2026-12-01 15:22 ` [PATCH 06/16] migration-guides: " Trevor Woerner
2026-12-03 13:53 ` [docs] " Antonin Godard
2026-12-01 15:22 ` [PATCH 07/16] overview-manual: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 08/16] profile-manual: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 09/16] ref-manual: " Trevor Woerner
2026-12-03 13:53 ` [docs] " Antonin Godard
2026-12-01 15:22 ` [PATCH 10/16] security-manual: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 11/16] test-manual: " Trevor Woerner
2026-12-03 13:53 ` [docs] " Antonin Godard
2026-12-01 15:22 ` [PATCH 12/16] toaster-manual: " Trevor Woerner
2026-12-01 15:22 ` [PATCH 13/16] docs: show the examples the BitBake lexer misreads as text Trevor Woerner
2026-12-01 15:22 ` [PATCH 14/16] docs: drop the file-wide highlight directives Trevor Woerner
2026-12-01 15:22 ` [PATCH 15/16] conf.py: default the highlight language to bitbake Trevor Woerner
2026-12-01 15:22 ` [PATCH 16/16] standards: describe how a code block states its language Trevor Woerner
2026-12-03 13:53 ` Antonin Godard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DNB5CBKY39CP.3KGY5EYSVEZGQ@bootlin.com \
--to=antonin.godard@bootlin.com \
--cc=docs@lists.yoctoproject.org \
--cc=twoerner@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.