mbox series

[RFC,0/2] support bitbake blocks

Message ID 20260421172416.1801567-1-twoerner@gmail.com
Headers show
Series support bitbake blocks | expand

Message

Trevor Woerner April 21, 2026, 5:24 p.m. UTC
From: Trevor Woerner <trevor.woerner@amd.com>

Out of the box, Pygments does not handle bitbake blocks for syntax
highlighting. As a result the numerous bitbake examples and snippets
throughout our documentation use a basic, non-bitbake-specific
highlighting.

This patchset adds a custom lexer to support bitbake syntax, based on
the vim syntax highlighting information in [1], adds it to the sphinx
extensions, and then goes through the BSP Developer's Guide identifying
and re-formatting any bitbake blocks as "..code-block: bitbake".

If this RFC is acceptable, I can update it to convert all such blocks
throughout the entire documentation set.

[1] https://git.openembedded.org/bitbake/tree/contrib/vim

Trevor Woerner (2):
  add a "bitbake" pygments lexer
  BSP dev guide: update to use bitbake lexer

 documentation/bsp-guide/bsp.rst |  40 +++++--
 documentation/conf.py           |   3 +-
 documentation/sphinx/bitbake.py | 195 ++++++++++++++++++++++++++++++++
 3 files changed, 227 insertions(+), 11 deletions(-)
 create mode 100644 documentation/sphinx/bitbake.py

Comments

Trevor Woerner April 21, 2026, 7:36 p.m. UTC | #1
Hello docs people!

In today's YP tech call I mentioned that I had been using reST/Sphinx
extensively recently and had a couple updates I thought might be
useful to the project. I have submitted this RFC patchset to gauge
interest in this proposal. If you like it I can submit a full patchset
with updates for all document.

Thanks and best regards,
    Trevor