Commit graph

242 commits

Author SHA1 Message Date
Henrik Brix Andersen
f07063db20 doc: update copyright notice in the documentation
Update copyright notice to reflect current year.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-01-10 14:56:01 +01:00
Gerard Marull-Paretas
17806f2054 doc: extensions: api_overview: do not hardcode github URL
Add a new extension config value so that repo URL is not hardcoded in
the extension code.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-01-08 11:30:54 +01:00
Gerard Marull-Paretas
9a1c378b67 doc: extensions: doxybridge: add support for multiple projects
Modify the extension so that multiple Doxygen projects can be
referenced. While not required in upstream Zephyr, other users
downstream may require support for this feature.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-01-08 11:30:54 +01:00
Gerard Marull-Paretas
4f6b650c35 doc: extensions: doxyrunner: add support for multiple projects
Modify the extension so that multiple Doxygen projects can be added.
While not required in upstream Zephyr, other users downstream may
require support for this feature.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-01-08 11:30:54 +01:00
Gerard Marull-Paretas
05c1e56f73 doc: extensions: api_overview: refactor extension
The extension had a some major design flaws, mainly:

- Ignored the `api_overview_doxygen_xml_dir` setting, instead it
  "sniffed" doxyrunner properties, so violating environment boundaries
- Computation of Doxygen HTML path worked because of the hardcoded URL
  in relative form found in doc/conf.py

This patch moves most code to the actual directive, so that context can
be obtained from the document being parsed. Also, the only config
required now is the Doxygen output dir, obtained from doxyrunner at
conf.py level.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-01-08 11:30:54 +01:00
Henrik Brix Andersen
ea8bd5a09a doc: releases: remove v3.6.0 from the list of supported releases
remove Zephyr v3.6.0 from the list of supported releases. Zephyr v3.6.0
reached end-of-life on 2024-11-29.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-12-10 11:08:20 +01:00
Benjamin Cabé
e544465cd6 doc: _scripts: conf: apply ruff lint rules
This makes all remaining Python scripts in doc compliant w.r.t current
Ruff rules

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-26 15:43:52 -05:00
Mahesh Mahadevan
95633cf68c doc: release: Add v4.0.0 to the list of supported releases
Add v4.0.0 to the list of supported releases.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-15 17:27:32 -06:00
Benjamin Cabé
3c83604b84 doc: extensions: check dead zephyr_file/zephyr_raw links
Add a check to ensure that all zephyr_file/zephyr_raw links are pointing
to valid paths in the current zephyr tree.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-30 09:43:50 -07:00
Benjamin Cabé
dbf3c8f5cd doc: fix dark mode "flashing" on page load
This hooks up the dark-mode-toggle-stylesheets-loader so that the dark
mode styles are loaded immediately, rather than waiting for the page to
load and then switching to dark mode. This prevents the "flashing" of
light mode styles on page load.

Fixes #79791

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 16:33:24 +01:00
Jordan Yates
fd58374663 doc: get output folder from environment
Pull the output build folder from the environment, instead of hardcoding
the HTML output folder, which is wrong for the latex build.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-25 13:49:34 -05:00
Benjamin Cabé
145dbf820d doc: Increase navigation depth in side nav bar
Increase navigation depth by 1 to enable "local" toc navigation in the
side bar for those pages that are deeper in the documentation tree.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-18 15:31:39 +02:00
Benjamin Cabé
bd29c5c410 doc: extensions: Add Doxygen tooltips to main documentation
Add Doxygen tooltips in the main documentation.

The tooltips are triggered when hovering over C symbols in the
documentation and display a preview of the Doxygen documentation for the
symbol.

Some shadow DOM magic is needed to style the tooltips correctly, without
affecting the rest of the page.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-29 16:13:41 -04:00
Jordan Yates
2e99de8047 doc: conf.py: build directory from environment
Get the output directory from environment variables instead of
attempting to reparse the CLI arguments, as these can actually refer
to a program other than `sphinx-build` (for example `sphinx-autobuild`).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-26 17:05:39 +02:00
Gerard Marull-Paretas
e28232d515 doc: extensions: drop warnings_filter
This extension was created to overcome C domain/Breathe limitations.
This is no longer needed as we link directly to Doxygen pages.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-19 09:57:05 -04:00
Gerard Marull-Paretas
ea14a07952 doc: enable doxybridge
Enable the doxybridge extension.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-08-13 09:49:21 +01:00
Gerard Marull-Paretas
259db8c090 doc: deactivate breathe extension
Deactivate breathe extension from docs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-08-13 09:49:21 +01:00
Alberto Escolar Piedras
25b051cf56 doc: release: Remove v3.5.0 from the list of supported releases
3.5.0 went out of support end of August.

Note the end date was stated as either 2024/07/31 or 2024/07/26
in different places.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-31 12:55:29 +02:00
Alberto Escolar Piedras
0483685642 doc: release: Add v3.7.0 to the list of supported releases
Adds v3.7.0 to the list of supported releases.
The EOL data is currently set as 2.5 years after release
which is the minimum support period we claim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 13:17:55 +02:00
Théo Battrel
f2b6490dee Docs: Bluetooth: Update qualification page
With the new Bluetooth Qualification process the QDID and link to
launchstudio are outdated, remove them.

Also remove the ICS listing as it hasn't been updated for a while.
Instead add a download link to the Zephyr Bluetooth Host ICS file.

Update the documentation configuration script to include the ICS file
(`*.pts`) in the external contents.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-07-22 03:29:29 -04:00
Benjamin Cabé
9ee3bf221d doc: pdf: add ImageMagick converter extension
Our documentation uses image formats such as WebP that are not supported
by LaTeX. This commit enables Sphinx's sphinx.ext.imageconverter
extension, and updates the documentation to indicate ImageMagick is
required to build docs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-10 14:58:16 +03:00
Benjamin Cabé
8f17c830ed doc: generate sitemap.xml
Generate a sitemap.xml for the documentation.
This aims at helping search engines react faster to the addition/removal
of new pages.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-03 12:34:04 +03:00
Ederson de Souza
9ab243d671 doc: Generate develop/api/overview.rst API table from doxygen
A new extension, api_overview.py, is used to, leveraging doxygen's
Python module doxmlparser, parse the doxygen generated XML files.
All groups ('defgroup' and 'addtogroup' tags) are collected, alongside
their 'version' and 'since' info.

From there, a new Sphinx directive `api-overview-table` is populated,
including the name of the group, and if available, their 'since' and
'version' information.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-19 13:13:45 +01:00
Christopher Friedt
b14f7d00ca doc: lts: update conf.py to point at 2.7.6 (LTS)
Point the configuration at 2.7.6 (LTS).

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-03-02 06:21:25 -05:00
Maureen Helm
ce38e4ba6f doc: release: Remove v3.4.0 from the list of supported releases
Only the two most recent mainline releases are supported.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-02-23 18:30:32 -06:00
Maureen Helm
7c7b5fbf8b doc: release: Add v3.6.0 to the list of supported releases
Adds v3.6.0 to the list of supported releases. The EOL date corresponds
to the expected release date for v4.0.0.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-02-23 18:30:32 -06:00
Fabio Baltieri
24cf2f6548 doc: use substitutions to replace all current harcoded SDK versions
This creates a set of substitution rules to replace all current usages
of SDK versions in the documentation, apart from a few that were not
meant to be copy-pastable anyway and the version has just been swapped
with a <version> placeholder.

Since code-block does not parse the content, these have all been
replaced with parsed-literal. That one though parses URLs, which cannot
be broken, so a series of URL substitutions are provided too.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-18 10:54:20 +01:00
Gerard Marull-Paretas
9e5e8e8c40 doc: extensions: zephyr-domain: make Breathe inserts optional
So that external users of the domain only interested in e.g. referencing
roles, can skip tweaks made to Breathe's directives.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-11 10:04:44 +01:00
Henrik Brix Andersen
e2788525e0 doc: Update copyright notice in the documentation
Update copyright notice to reflect current year.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-05 14:43:47 -05:00
Benjamin Cabé
7e253ff937 doc: Make search engine configurable
Add UI to select preferred search engine when Google Programmable Search is
enabled. The user's preference is saved using local storage.

This also makes the search input field of type "search" for better UX (in
particular on mobile).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-12-15 04:34:48 -05:00
Benjamin Cabé
7688f4859c doc: Add Google Programmable Search Engine
Add Google Programmable Search engine to the documentation, while
leaving it possible to easily revert to the built-in Sphinx search
engine. As the styling of the search results is apparently not thought
to be easy to tweak, the gcs.css stylesheet might require further
improvements.
Fixes #55173.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-12-15 04:34:48 -05:00
Benjamin Cabé
29b19bcf8b doc: sphinx: Tweak page scroll behavior to maximize real estate
This picks up custom javscript from Godot documentation and uses CSS
rules we already had in place (only they were not used) to tweak the
page scroll behavior. As folks scroll down the page, the Zephyr logo in
the top right corner gradually disappears, leaving more room for the
navigation menu.

Also, when scrolling in the navigation pane, the UI there is slightly
adapted to make it more clear that the search box is "fixed", plus,
when one reaches the bottom of the navigation tree and continues
scrolling, the "main" page scrolls down.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-12-14 14:38:03 -05:00
Piotr Golyzniak
5a3b9799aa doc: test: improve pytest documentation
Improve documentation about pytest integration with Twister. Add
examples of usage, improve description of available options and
introduce automatic doc generation of two plugin classes (DeviceAdapter
and Shell) basing on their docstrings from source code.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-12-14 10:12:21 +01:00
Benjamin Cabé
aa1ca171aa doc: sphinx: Load RTD theme as a Sphinx extension
This commit loads the RTD theme as a Sphinx extension, which has the
benefit of going through said extension's "setup" method, effectively
setting useful settings such as default permalink icon (moving away from
the default, not so pretty, "¶").

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-12-06 09:23:36 +00:00
Benjamin Cabé
abc334016f doc: pdf: Use single column for the index
The index at the end of the PDF document can contain pretty long strings
that don't fit in the default 2-column layout.
This commit makes the index use a single-column.

Note: this relies on LaTeX package idxlayout which should already be
included in the packages recommended for installation in our
instructions.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-09 15:33:40 +01:00
Henrik Brix Andersen
f811a05044 doc: releases: remove v3.3.0 from supported releases
As of October 31, 2023, Zephyr v3.3.0 is no longer supported.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-03 09:56:58 +01:00
Benjamin Cabé
353f42d8bd doc: refactor vcs_link and git_info extensions
Refactor all git/github related extensions into one file, as they are
working hand in hand.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-27 10:49:11 +02:00
Benjamin Cabé
701f59ee1e doc: Make it easier to report issues in the documentation
- Add extension to get git metadata (date, SHA-1, ...) regarding the
  latest update made to a page
- Add date of last "actual" update to each manually authored doc page
- Add admonition inviting to report issues
- Add button in breadcrumb to report issue

Fixes #60622.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-27 10:49:11 +02:00
Benjamin Cabé
eb1968fa10 doc: extensions: Add ability to edit doc page on GitHub
Update the vcs_link extension to also support generating "edit" URL
vcs_link_version is also now a Sphinx config making its value available
to extensions.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-27 10:49:11 +02:00
Benjamin Cabé
f2b080b5d6 doc: Set default language for syntax highlighting to "none"
Force code blocks with no 'language' explicitly set to render with no
highlighting. The current default was to use python (bad), and there
would also be an option to set it to "guess" but this doesn't work all
so well (ex. some C blocks would be detected as Transact-SQL!).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-23 14:32:39 +02:00
Johan Hedberg
0d907c7428 doc: add 3.5.0 to the index of releases
Add the new release to the doc index.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-10-20 13:20:49 +03:00
Benjamin Cabé
472def94e7 doc: use more modern fonts
Use Noto as baseline font and Inconsolata Nerd Font for source code.
These are both esthetically pleasing and have good Unicode coverage.

NOTE: Unsupported characters (i.e. emojis, at the time of this commit)
are rendered as tofu (i.e. a square).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-19 21:03:57 +03:00
Benjamin Cabé
201b666ecb doc: use XeLaTeX as TeX typesetting engine
XeLaTeX is a TeX typesetting engine that extends LaTeX with support for
Unicode and modern font technologies such as OpenType.

It is included in all the LaTeX distro recommended for Zephyr so it is
safe to assume it is available to the user interested in building the
PDF documentation locally

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-19 21:03:57 +03:00
Benjamin Cabé
d3487c48bf doc: Group linkcheck options together in conf.py
Group all sections related to linkcheck target together.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-18 17:08:19 +03:00
Benjamin Cabé
b3a52f4882 doc: Configure copybutton extension for ignoring shell prompts
Add required settings for telling the copybutton Sphinx extension to
ignore prompts when copying a code block.

Both bash prompt and Zephyr UART prompt are ignored.

Examples of the new behavior:

.. code-block:: console

    $ echo "Hello World"
    Hello World

The copied text will be: 'echo "Hello World"'.

.. code-block:: console

   uart:~$ l2cap connect 29
   Chan sec: 1
   L2CAP connection pending
   Channel 0x20000210 connected
   Channel 0x20000210 status 1
   uart:~$ l2cap send 3 14
   Rem 2
   Rem 1
   Rem 0
   Outgoing data channel 0x20000210 transmitted
   Outgoing data channel 0x20000210 transmitted
   Outgoing data channel 0x20000210 transmitted

The copied text will be: 'l2cap connect 29\nl2cap send 3 14'.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-18 17:08:19 +03:00
Anas Nashif
ebc8fdac4f doc: fix link to manifest listing and documentation
Point to the correct page referencing manifest entries.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-02 14:52:10 +02:00
Anas Nashif
dd7532dcf9 doc: add manifest extension
Generate index of west projects and information about them.
Based on an extension from sdk-nrf repo.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-01 09:21:50 +03:00
Andrei Emeltchenko
0aaa5a9ac2 samples: webusb: Copy needed file from the external repository
Copy file index.html from the external repository
finikorg/webusb-sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-25 09:48:01 +02:00
Benjamin Cabé
b2977b7657 doc: Make code-samples admonition collapsible
Use sphinx-toggle to make "Related code samples" collapsible.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-06 12:11:28 +02:00
Benjamin Cabé
3c5f3da4d8 doc: Add Sphinx extension for code samples
This adds a new Sphinx extension for both a code-sample directive and role.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-06 12:11:28 +02:00