zephyr icon indicating copy to clipboard operation
zephyr copied to clipboard

doc: boards: extensions: introduce zephyr:board role and directive

Open kartben opened this issue 1 year ago • 6 comments

https://builds.zephyrproject.io/zephyr/pr/79994/docs/boards/seeed/wio_terminal/doc/index.html https://builds.zephyrproject.io/zephyr/pr/79994/docs/contribute/documentation/guidelines.html#boards

A new zephyr:board:: Sphinx directive allows to flag a documentation page as being the documentation for a specific board, allowing to auto-populate some of the contents, ex. by adding a board overview à la Wikipedia, and later things like supported HW features, a ready-to-copy-paste example of how to build Hello World, etc.

image

A corresponding :zephyr:board: role allows to link to a board doc page.

kartben avatar Oct 17 '24 13:10 kartben

@kartben unrelated to this PR, but, could we make header less cluttered?

image

gmarull avatar Oct 18 '24 07:10 gmarull

@kartben unrelated to this PR, but, could we make header less cluttered?

image

The "Open on github" and "Report an issue with this page" could simply be icons IMO, with the text in a tooltip. Of course accessibility needs to be verified.

pdgendt avatar Oct 18 '24 07:10 pdgendt

@kartben unrelated to this PR, but, could we make header less cluttered?

image

Agreed -- I too found it particularly striking when making the screen capture :) Will go for text-less version of the GH buttons and will try to find a way to have ellipses in the breadcrumb

kartben avatar Oct 18 '24 08:10 kartben

Just pushed a fix for a nasty bug that was causing Sphinx logs to be silenced - whoopsie.

kartben avatar Oct 18 '24 17:10 kartben

Great stuff can't wait to see how this renders in the pdf.

We don't include boards in the PDF 😝

kartben avatar Oct 18 '24 21:10 kartben

Had to push one more commit to clean up 3.7 release notes re: Sphinx lint. Just like code samples, boards are now referenced using a dedicated role and not the generic :ref: anymore so this requires updates tree-wide, and I deliberately hadn't made a pass on past release notes regarding Sphinx linting as I didn't want to "touch" them unnecessarily (but since the lint errors were actual bugs causing bad rendering, I probably should have...)

kartben avatar Oct 18 '24 21:10 kartben

LGTM. It would be nice to start a mass cleanup of board pages. They contain tons of redundant information that just increases doc build time.

@gmarull this will be incremental and take a lot of time but... yes, definitely -- e.g. https://github.com/zephyrproject-rtos/zephyr/pull/80048

kartben avatar Oct 21 '24 07:10 kartben