Fix the application build comment
to make it valid for both ninja and make build tools.
It generated the wrong "ninja" comment for "make".
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
The "keyup" event is not triggered when pasting with mouse (right click,
paste) or when pasting on a phone/tablet.
Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
Use get_maintainer.py to add more meaningful labels to issues creates
from a documentation page.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Not sure why I used square brackets for "[doc]" prefix of the default
Github issue title. Change it to "doc:".
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Page prefix can be an empty string.
Fixed the condition so that it only evaluates to try when prefix is
truly None.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Compute ZEPHYR_BASE like other extensions do rather than artificially
pretend it's a config option.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add required class so that sphinx-togglebutton admonition is expanded by
default.
Also remove sphinx-immaterial code that should not be there.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Using an UL with "manually" formatted text was probably an oversight.
Show related samples as a "definition list", with sample name as the
"term" and the description as the "definition".
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
- 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>
This adds a vcs_link_get_open_issue_url Jinja filter to craft the URL
allowing to report an issue for a given Sphinx page
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
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>
Passing arguments to west flash is needed in many cases
but there was no way to properly generate documentation
with such examples.
With this new "flash-args" option we can now.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Since samples are starting to leverage the new :zephyr:code-sample
directive, let's use the available meta data to expose that structured
information to search engines.
This commit adds JSON-LD markup to the HTML output of code sample pages
and sets the meta description to the samples' description.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
CodeSample node is meant to be a temporary node that's transformed into
standard docutils nodes. While the node might contain children useful
for the transformation, they're not meant to be included in the result
of the transform.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The 'console' language in pygments is for Bash shell session, i.e code
snippets were commands MUST start with a prompt.
The commands rendered by the ZephyrAppCommandsDirective do not include
a prompt, and should therefore be set as "shell".
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
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>
As of Sphinx 6.1, sphinx.util.progress_message is deprecated and
sphinx.util.display.progress_message should be used instead.
See https://www.sphinx-doc.org/en/master/changes.html#id165
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
A link to a code-sample should have its "text" attribute set to the text
description of the sample, not the description _node_.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Sphinx will now issue a warning when a code-sample role points to a
sample that does not exist.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Drop code that would let people reference samples using legacy
:ref:`sample_id` syntax, and only support the use of
:zephyr:code-sample:`sample_id` role going forward.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Show Kconfig options in search results, since that's how some people would
expect to be able to find more details about
them.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This allows us to identify any patterns that we can remove or that
we didn't realise are no longer in use. This might happen if issues
within doxygen or docleaf are resolved.
This allows us to remove the pattern:
.*Duplicate C declaration.*\n.*'\.\. c:.*:: uint16_t id'.*
which does not match anything in the current set up.
We also split the filter patterns in known-warnings out into different
sections depending on their cause.
Also extend the pattern parser to ignore empty lines so that we can
have some formatting in the known-warnings file.
Signed-off-by: Michael Jones <m.pricejones@gmail.com>
There are times when the log message is an exception object and that
causes the regex to fail with a TypeError. Here we work around that
by converting the input to a string.
Signed-off-by: Michael Jones <m.pricejones@gmail.com>
Instead of breathe.
I'm not sure of the best version comparison to use. There is no
intention to break the API for docleaf but it is also still young
in some ways and there might be adjustments to the configuration values
that would need to be reflected in the version number as it is still
pre-1.0 that would only be a minor version change.
Signed-off-by: Michael Jones <m.pricejones@gmail.com>
Restore appearance of kconfig search, with rounded corners and
black background. This should resolve visibility issues encountered
on some browsers when running in dark mode
Fixes#53568
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This patch allows copying a URL to the current Kconfig search results.
For example, I can now share the search results for "CONFIG_TEST.*". A
new button is added to the search box that, when clicked, copies to the
clipboard the URL.
This feature is achieved by prepending query hashes with '!'. When '!'
is found, the content of the URL hash is left intact, whereas before it
was always enclosed within '^$' to produce an exact match.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
If two modules started with the same prefix, e.g. nrf and nrfxlib, the
file name prefix was incorrectly set with the common prefix. Include
trailing "/" to the comparison, so that we match the full module name.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Added another custom role `module_file` which functions like
`zephyr_file` but for any module in the west manifest.
The new role must take a module as an argument. Example syntax:
```rst
:module_file:`module-name: path/within/module`
```
or with custom link text:
```rst
:module_file:`my link text <module-name: path/within/module>`
```
This change also moves the hardcoded project name and link to
github to `doc/conf.py` by adding the configuration values
`link_roles_manifest_project` and `link_roles_manifest_baseurl`
Signed-off-by: Gaute Svanes Lunde <gaute.lunde@nordicsemi.no>
When searching for a certain group of Kconfig options, e.g. CONFIG_BT*
it may be useful to view more than 10 options at the same time. This
patch adds a new combo box that allows to increase the number of results
per page (10, 25 or 50).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This patch modifies the Kconfig search _algorithm_ so that it aligns
with how menuconfig search works:
- Input is splitted into multiple search terms (space based split)
- Both Kconfig option name and prompt are used
- Regex search is used instead of match, it is less efficient but will
search the whole string, leading to more results.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Sort database entries so that search results appear in alphabetical
order based on the given input. This mimics the behavior of menuconfig
search functionality.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The boards command was not properly using the zephyr_module
functionality to obtain the board roots of all modules. Fix that by
moving the functionality required to the core zephyr_module file and
reuse it from external scripts.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Promptless choices can show up as parents when, e.g., people define
choices in multiple locations, including modules. Render them using the
built-in Kconfig expression to string formatter, so that they show up as
'<choice (...)>'.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Render the menu path where an option can be found. For example,
CONFIG_SPI: (Top) > Device Drivers.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This patch adds support for displaying the "selected by" and "implied
by" entries in the Kconfig search extension, ie, reverse dependencies.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
When using `zephyr-app-command` the CMake arguments and values are not
having spaces between them, except the `-B build`.
Remove the space, so that `-B build` becomes `-Bbuild` and thus looks
similar to other `-<arg><value>` occurences.
Example before this commit:
> Use cmake to configure a Ninja-based buildsystem:
> cmake -B build -GNinja -DBOARD=reel_board samples/hello_world
>
> Now run ninja on the generated build system:
> ninja -C build
With this commit:
> Use cmake to configure a Ninja-based buildsystem:
> cmake -Bbuild -GNinja -DBOARD=reel_board samples/hello_world
>
> Now run ninja on the generated build system:
> ninja -Cbuild
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Add a new extension to handle Kconfig documentation. This means that no
more CMake hackery is required. However, the way it works differs from
the current approach. Instead of creating a single page for each Kconfig
option, the extension creates a JSON "database" which is then used on
the client side to render Kconfig options on a search page. The reason
to go for a single page choice is because Sphinx is significantly slow
when handling a lot of pages. Kconfig was responsible for an increase of
about ~10K pages.
Main features:
- Generates a Kconfig JSON database using kconfiglib APIs.
- Adds a new Sphinx domain for Kconfig. The domain provides a directive,
:kconfig:search:: that can be used to insert a Kconfig search box onto
any page. This page is where all Kconfig references inserted using the
:kconfig:option: role will point to. The search functionality is
implemented on the client side using Javascript. If the URL contains a
hash with a Kconfig option (e.g. #CONFIG_SPI) it will load it.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
After the introduction of #41688, doxyrunner extension modifies the
fmt_vars content (from a variable defined in `conf.py`) when the output
directory variable is defined. This means that Sphinx will always get an
outdated environment and so will always perform a full build instead of
an incremental build. This patch makes a copy first to prevent this
situation.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>