This adds code to each page needed for gathering google analytics
tracking data to the LF-provided Global site tag.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Fixes pylint warnings like this one:
doc/conf.py:325:0: W1401: Anomalous backslash in string: '\s'.
String constant might be missing an r prefix.
(anomalous-backslash-in-string)
The reason for this warning is that backslash escapes are interpreted in
non-raw (non-r-prefixed) strings. For example, '\a' and r'\a' are not
the same string (first one has a single ASCII bell character, second one
has two characters).
It just happens that there's no \s (or \., or \/) escape for example,
and '\s' turns into two characters (as needed for a regex). It's risky
to rely on stuff like that regexes though. Best to make them raw strings
unless they're super trivial.
Also note that '\s' and '\\s' turn into the same string.
Another tip: A literal ' can be put into a string with "blah'blah"
instead of 'blah\'blah'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Linking to API material requires knowing the pecularities of how
doxygen, sphinx, and breathe work. In an attempt to hide some of this
we're preparing the current docs to allow use of configuration defaults
that will let us more simply use a default role that will hunt for a
reference target in the various domains that are available by using a
default "role" of "all". This will let us use the simple notation
`functionname` or `typename` without fully specifying the reference as
:c:func:`functionname`.
This patch cleans up exising docs that were (incorrectly) using single
backtics where double backtics should have been used, and also found
some typos (such as a space between the role name and the reference,
such as :file: `filename`, and a missing colon such as
c:func:`functionname`)
This is a start to address issue #14313
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
West now supports a mechanism for extension commands. Use it to move
the command implementations that are tightly coupled with boards and
the zephyr build system back into the Zephyr repository.
This patch doesn't include test cases. Those will be moved over in a
subsequent patch.
Signed-off-by: Marti Bolivar <marti@foundries.io>
Since west is no longer part of the Zephyr tree, we can no longer
hardcode its path anymore. Instead, use west itself to retrieve its
path, in order to point the documentation build to the correct
active west installation.
This is optional, and the documentation build will still work if west is
not installed on the system.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
When referencing files from the git tree create a link to the file for
easy browsing of header files and other files of interest.
Borrowed from esspresif/esp-idf project and modified for Zephyr.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
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>