doc: boards: extensions: board catalog is only available in HTML
Although boards/index.rst is not included in the PDF toc, it seems as if Sphinx tries to build the page anyway, which fails because the board catalog directive is not outputting any node on non-HTML builders. This commit fixes it by returning a "Board catalog is only available in HTML." paragraph. In the future, we might want to output some kind of static table or bullet list for non-HTML builders. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
parent
18419b618f
commit
239f4308be
1 changed files with 2 additions and 0 deletions
|
@ -586,6 +586,8 @@ class BoardCatalogDirective(SphinxDirective):
|
|||
renderer = SphinxRenderer([TEMPLATES_DIR])
|
||||
rendered = renderer.render("board-catalog.html", {"catalog": board_catalog})
|
||||
return [nodes.raw("", rendered, format="html")]
|
||||
else:
|
||||
return [nodes.paragraph(text="Board catalog is only available in HTML.")]
|
||||
|
||||
|
||||
class ZephyrDomain(Domain):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue