The Sphinx ``.. only::`` directive is limited to handling only
conditional text and can't handling conditional use of directives
For example,
```
.. only:: test
.. automodule:: west.runners.core
:members:
```
is not handled. This PR monkey patches the handling of the existing
``.. only::`` directive done by Sphinx.
See https://github.com/pfalcon/sphinx_selective_exclude for details.
Licensing amended to Apache 2.0 with permission from the author.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The documentation has been setting the environment variable
KERNELVERSION to the PROJECT_VERSION of the documentation. But
PROJECT_VERSION is not set during the documentation build so this has
no effect.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Update to the latest west. This includes a new 'attach' command. There
are also multi-repo commands, but those won't get exposed to the user
unless they install Zephyr using "west init" + "west fetch" (and not,
say, "git clone").
Replace the launchers; they now detect whether zephyr is part of a
multi-repo installation, and run the west code in its own repository
if that is the case.
This also requires an update to:
- the flash/debug CMakeLists.txt, as the new west package is no longer
executable as a module and must have its main script run by the
interpreter instead.
- the documentation, to reflect a rename and with a hack to fix
the automodule directive in flash-debug.rst for now
Signed-off-by: Marti Bolivar <marti@foundries.io>
This adds new targets to generate build documentation through
LaTEX to PDF.
There are a few notes:
1. pdflatex complains about the tex file generated by doxygen
so it needs to be fixed with a Python script before feeding
in through pdflatex.
2. SVG files are not recognized by pdflatex so they are converted
to known good format on the fly, only for producing PDF. This
uses the libRSVG's rsvg-convert tool.
Relates to #6782.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This PR removes use of the customized zephyr_docs_theme, replacing it
with the new read_the_docs theme. It ignores the tags that were
previously used to switch the theme for "development" vs. "daily" or
"release" and always uses the RTD theme. (The "daily" vs. "release" is
still honored to change the breadcrumb and doc version to "latest" if
"daily" is specified (as we did for the current doc build process),
otherwise it uses the version extracted from the
VERSION file in the source code (as would be appropriate for the docs
for a tagged release.)
This also pulls in using template extensions for breadcrumb and the
notice about latest having more up-to-date content when the "release"
tag is set.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Change logo and increase logo size, remove RTD links to github source,
add CSS for :kbd: role (keyboard key press), change logo link to project
home rather than doc home (via zephyr-custom.js). Update 404 error page
for wider page layout, force page break before footer, show URL that got
you to the 404 page.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Add infrastructure for switching production documentation to use the
cleaner read_the_docs theme as noted in issue #6774. This change won't
affect the current "daily" or "release" builds but will change local
builds that previously also used the RTD theme, but now have the version
selection capability added.
This PR also adds the Zephyr logo and favicon to the RTD-themed docs,
and moves the top level images into an images/ folder.
Note that issue #9128 requires workaround.rst to force a reference to
files needed for the build but not directly referened in a .rst file.
(When #9128 is fixed, we can remove this workaround.rst.)
Once merged and tested, we'll tweak the conf.py to use the RTD theme
for all doc builds (e.g, when DOC_TAG=daily or release) in a subsequent
PR.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The following changes have been made to support out-of-tree builds:
* In order to avoid using relative hardcoded paths, use CMake's
configure_file() to replace the paths in the doxygen input file
so that the output directory is set correctly.
* All .rst and additional required files are now copied from the doc/
folder into the build/rst folder using extract_content.py. The
samples/ and boards/ folder are copied twice (once into build/rst
and another into build/doc/rst) to manage relative paths.
* All paths are absolute where possible, including themes and static
content.
This patch ensures that the Zephyr repo is not contaminated by the
build at all.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
We need this to be able to pull in its API documentation.
This will need modifications when multi-repo support is available, in
order to get the imports from the independent West repo, but for now
just use the copy in Zephyr.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
I've collected some of the common issues encountered with doc reviews
into a new contributing document, and included use of the
Zephyr-specific extension for generating code building examples.
Updated conf.py and created an external list of substitutions making it
easier to manage them without editing the sphinx conf file (and
documented this).
Tweaked the comments in the application.py extension python code to
render better in the generated doc that extracts these comments (keeps
the documentation in the python code too to ease maintenance when
updates are made).
Updated the sample template to mention use of this sphinx extension.
fixes: #6831fixes: #6811
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
All Sphinx-generated pages for tagged release documentation include the
release version number in the breadcrumb header. This patch adds this
to the "Latest" daily doc build results that are the default pages seen
when visiting docs.zephyrproject.org
Fixes: #6432
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Looks like newer versions of Sphinx have a problem with the autodoc
extension. Since we're not usine Sphinx to process python source for
documentation, removing use of autodoc eliminates the problem.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Add extensions/zephyr to the documentation. This is where Sphinx
extensions customized for Zephyr will live.
Within, add application.py. This provides a directive,
zephyr-app-commands, which generates commands in the docs to build,
flash, debug, etc. an application. For now, these are Unix shell
specific. Later on, they can be customized to generate additional
formats, perhaps with extra options.
After this is used throughout the tree, doing this with an extension
enables global changes with changes to the directive implementation
only.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Building off the success of PR #4119, add more attributes to the sphinx
processing list (as encountered in PR #4123) plus others from
include/toolchain/gcc.h that looked safe to add.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The doxygen/sphinx/breathe processing for API documentation has some
known issues and we've been using a post-processing filter to eliminate
"expected" warnings. Sphinx/Breathe 5.0 was updated to support
identifying attributes causing these warnings, so this PR adds a
starting list to get around warnings recently introduced with __syscall
and __syscall_inline (PR #4103).
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
It's not obvious which kernel release version you're reading about in the
documentation. Add the version info in the breadcrumb header (instead
of "Home / Docs / Subsystems /" show as
"Home / Docs / 1.8 / Subsystems /").
(Depends on docs-theme PR-9, but can be merged now with no ill-effect)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
added some additional unicode character replacements for
those encountered (will fix those references after this PR)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Sphinx has a builder option that we can use to check links
(invoked with '$ make linkcheck' in the /doc folder)
Add some configuration tweaks to conf.py, and update the
Makefile to also use the nitpick (-n) option to Sphinx
if this linkcheck build option is selected (does much more
checking of internal references)
Change-Id: Ib413bc8d4195c72f1a8a4c345a5a722f88fad8b8
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Add substitution patterns for (r), (tm), and (c) special symbols
via |reg| |trade| and |copy| (same names as html entities
e.g., ® )
Change-Id: I0d4932435107a0bb9eef7c319c9307883e00bcb5
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Permalinks make it much easier to create html links to specific sections
in a document (you over over the section heading and an icon appears that
you can click on to get a reference link directly to that section).
Change-Id: I905449158f834783b9df6c04bf5fa3e5f245b3fd
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Rename file to zephyr.doxyfile to allow integration in eclipse and make
it build locally in the doc/ directory without have to change to ../
first.
Change-Id: Ib2c4c26f385b050ea3d0e814ebfc3509f31e5e12
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In the documentation you can now reference issues in JIRA using the
following macro:
:jira:`ZEP-308`
This will link to the JIRA in the macro.
Change-Id: I3785d4abd243f5c5b75e9e3b58a449e2a3225415
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Instead of including the rtd theme in zephyr use an installed instance,
if nothing is installed, use the default zephyr theme.
Change-Id: Ife4bd878e3f879cf59ecf2bc5d186a531a3bf1b6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This file is only used there, it is short and keeping it away
introduces problems (warnings about .rst not being in any TOC entry,
:orphan: dangling if added, etc).
Change-Id: Iea33f22721856884aae9fc1dce46a2b90896286a
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Changed conf.py to use env var in the version of documentation.
CI can take advantage of this to name documentation using
tag version from git.
Change-Id: If59f800ccd37648a9c0dab6c948b13166a7f4aed
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
The patch modifies the file doc/conf.py to fix the warnings:
1) the config value 'html_add_permalinks' has type `bool',
defaults to `str.'
2) html_static_path entry '/media/projects/zephyr/doc/_static'
does not exist
Change-Id: I01e74b5db85311c514ef437e75b8f378ce80125f
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Removes permalinks and sets the correct version and release. The change places
the copyright notice and license in the footer of every page.
Both copyright and license do not appear in the website's version.
Change-Id: Idb5171b24af004fc2f7aff42aab43469f26305b4
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Improves previous patch that enabled doxygen GUI for Reference.
Navigate to forto-collab/docs/ html/index.html to view. Not
linked to main docs in this patch. Index changes to show a
collapsed view as default.
Change-Id: I4d0c23699f645c5c20ca3ad50c988a5729afa24f
Signed-off-by: Carol Lee <carol.lee@windriver.com>
Add a new theme inherited from sphinxdocs to allow zephyr
specific customisations and improvements.
Initially, it adds css style for guilabel and makes that
appear bold in html output.
Change-Id: I2c80b3be4d06ab73907d2f117ea84c847c0ddf7f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>