Commit Graph

66 Commits

Author SHA1 Message Date
David B. Kinder 0e317d56bf doc: clean up PDF generation for ACRN docs
PRs #5945 and #5949 introduced fixes to the doc building process to
support PDF generation of the documentation set.  This PR refines the
doc build process, cleaning up the Makefile, adding display of tool
version information, and updates the doc building documentation to
include additional dependencies needed for building the PDF and
instructions for how to build the PDF.  The latexpdf make target is
provided to just run the latex and PDF producing process that depends on
the HTML artifacts from a make html run.  A new make pdf target is
provided that combines the two steps into one.

A new know-issues pattern file is added that verifies the expected
output from the latexpdf process is returned, as it can't be completely
eliminated without losing potential error messages that need to be
resolved.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-04-26 19:50:44 -07:00
Junjie Mao affe858d02 doc/conf.py: enable formatting docs in a PDF file
This patch tweaks the settings in doc/conf.py to allow formatting the
documentation to a PDF file by Sphinx. The changes include:

 - Use `xelatex` rather than the default `pdflatex` as the LaTeX engine, as
   `pdflatex` is not that good at formatting non-ascii characters out of
   the box.
 - Use DejaVu fonts (which are available in common Linux distributions) in
   the generated PDF.
 - Restrict the depths of the table of contents to 3.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-04-21 09:29:37 -07:00
David B. Kinder 8f7a97c630 doc: add 2.4 to doc version menu
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-04-07 13:40:40 -07:00
David B. Kinder c0707ab361 doc: prep for upgrading doc build tools
Update known-issues list to eliminate known warnings for duplicate
declaration warnings because of breathe/sphinx upgrades.

Update conf.py to check sphinx version and use appropriate way to
include extra javascript and css files depending on the version.

Both of these changes will allow the old and new doc tools to not show
unanticipated warnings or errors and allow for a smooth upgrade to the
CI system (and contributors local doc builds).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-31 13:04:27 -08:00
David B. Kinder 52d33f067e doc: tweak to copyright footer
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-18 08:40:31 -08:00
David B. Kinder 61e5957129 doc: automate copyright year footer
Automatically update the copyright year on the page footers to be
2018-[current_year] when generating documentation.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-17 10:59:57 -08:00
David B. Kinder dd05d7417a doc: update doc version selector for v2.3
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-02 17:46:23 -08:00
David B. Kinder f2546384c8 doc: fix breathe config for C vs CPP
Breathe and doxygen work best for C++, but we're using C.  This shows up
as API documentaiton having a C++ flavor (modules and classes) instead
of the expected C flavor.  We really need to upgrade the versions of
doxygen and breathe to newer versions, and this configuration tweak
prepares for this.  (It will need CI coordination to update these tools,
but the changes in this PR are compatible with the current older tools.)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-11-23 00:06:01 -08:00
David B. Kinder a2167ae93a doc: add extension to create files and raw links
Links to files in the GitHub repo's master branch should be to the files
within the branch being generated.  For example, in the v2.1
documentation, links should be to the v2.1 branch contents.  (Previously
links were being made to the master branch in all our archived content.)
This creates a problem when we want to remove an obsolete file in the
master branch but can't because older documentaiton incorrectly depends
on it.

This new extension defines a :acrn_file: and :acrn_raw: role that will
create links to the given file within the current commit branch.

This PR also replaces docs with hard-coded links to files in the master
branch with uses of these new roles to create links to files.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-11-05 09:17:05 -08:00
David B. Kinder 9292e57786 doc: bring back prev/next buttons
Some ACRN docs (in particular the HLD) has content nested more than the
4 levels shown in the sidebar navigation.  So when looking at those
documents, it's hard to get to next chapter.  Bring back the
previous/next links to fix this situation.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-11-03 09:07:41 -08:00
David B. Kinder f300d1ff77 doc: update breadcrumb to include release version
As a DX improvement in the documentation, include the release version
(or Latest) in the breadcrumb header on every page.  This can help
readers know which release version documentation they're using.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-10-01 14:53:29 -07:00
David B. Kinder fb45ad517e doc: redirect to 2.1 version for delete docs
As we're removing Clear Linux docs because of removing depriviliged boot
mode support, we can refer folks to the last known version of these docs
in the v2.1 release instead of just throwing a 404 error.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-09-30 14:41:16 -07:00
David B. Kinder 22abc0ec9e doc: add v2.2 to doc menu choices
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-09-29 18:31:58 -07:00
David B. Kinder ba3b8e58a1 doc: add v2.1 to doc version menu
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-08-07 17:50:36 -07:00
David B. Kinder 7dd4061bcc doc: add 2.0 to doc version selector
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-24 09:32:28 -07:00
David B. Kinder 13e8e3c7f2 doc: adjust search results to bias certain docs
Improve usability of search results to promote tutorials and developer
guides, and demote API and KConfig material, with release notes at the
end.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-15 12:30:36 -07:00
David B. Kinder 764d7c1332 doc: rename rt_industry GSG
Move the rt_industry GST into a tutorial for using Clear Linux as the
Service VM.  Also drop a redirect to avoid 404 errors reference the
moved doc (redirect list maintained in conf.py)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-04 08:10:02 -07:00
David B. Kinder e58609ad1f doc: remove duplicate 1.6 version menu choice
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-05-14 12:24:26 -07:00
David B. Kinder 0b18c9bdb4 doc: add 1.6.1 docs version menu choice
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-05-11 08:48:08 -07:00
David B. Kinder 426c214733 doc: add sphinx-tabs extension
The sphinx-tabs extension let's us create a document that can
dynamically display alternate material based on clicking a tab, as used
in the Zephyr getting started guide:
https://docs.zephyrproject.org/latest/getting_started/index.html

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-04-21 12:14:00 -07:00
David B. Kinder 3a326056fd doc: some additional google analytics code
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-04-07 17:18:31 -07:00
David B. Kinder 415b6f5030 doc: add google analytics tag
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-04-07 15:08:44 -07:00
David B. Kinder 58fc6eeec9 doc: add 1.6 to doc version menu
Update doc version choice selector with the 1.6 release

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-04-01 20:18:14 -07:00
David B. Kinder ee455574ed doc: update copyright year in doc footer
Update copyright 2019 to be 2020

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-02-26 09:32:32 -08:00
Deb Taylor 3c2f4509af Doc: Add v1.5 release menu choice.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-12-21 10:42:44 -05:00
David B. Kinder 28e24c4198 doc: put v1.0 docs back in version menu
We've been keeping the doc version choice list trimmed as new doc
version releases are made, but the v1.0 version should remain.  (Note
that the documents for all previously published versions are still
available on the server, but they were included in the menu choice).
This PR puts the 1.0 choice back in.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-20 09:02:37 -08:00
Deb Taylor 96edee5e03 Doc: update conf.py file to include v1.4
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-11-07 19:17:25 -05:00
David B. Kinder 52304348d6 doc: doc build errors not being reported
PR #3665 moved all the doc build artifacts into the _build folder and
updated scripts and Makefile to account for this, except missed a fix in
the script that checks for known issues. This patch fixes that but shows
we've got a bunch of issues that have not been being reported so we'll
need to fix those problems to resolve failing doc builds.

Also fixed process of the VERSION file in conf.py since the path to that
file was changed by PR #3665 as well and was raising an exeception that
was being masked.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-29 17:28:26 -07:00
David B. Kinder 168d37d12f doc: add 1.3 to version menu
Update the version menu to include the 1.3 docs (and remove the 0.8)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-28 16:10:42 -04:00
David B. Kinder 5b5efe7193 doc: add v1.2 to the release navigation picker
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-15 09:50:33 -07:00
David B. Kinder 0d07dad5cb doc: additional doc navigation restructuring
Adjust doc navigation organization based on additional feedback.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-01 21:30:22 -07:00
David B. Kinder 2ccd652607 doc: simplify navigation with restored doc org
A few more tweaks to the site navigation since we moved the content back
to its original folder structure.

Remove the temporary "doc reorg in progress" banner.

Add reference to hardware in the "try" section.

Add link to the documentation home page in left nav pane.

Add additional redirects to handle external links to moved content.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-01 16:22:50 -07:00
David B. Kinder e2d3653976 doc: continue doc restructuring
Changing the folder structure will cause too many broken links for
external references (from other sites). So, let's put the content back
where it was before the reorg, and instead use the new persona-based
navigation to point to documents in the original locations.

Also, introduce redirects for some documents that no longer exits.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-01 14:07:22 -07:00
David B. Kinder 2376b3af5c doc: update doc version menu
Update the /latest/ (master) version of the docs to provide the menu
choice for the v1.1 release.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-06-27 14:56:41 -07:00
David B. Kinder 38c553b397 doc: add v1.0 doc menu to master
Update the /latest documents with a menu choice for the 1.0 release
docs.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-05-08 12:05:41 -07:00
David B. Kinder 74b841aa08 doc: add 0.8 version to master branch
When 0.8 documents are published, we create a link to them from the
master branch where the /latest version of documentation is found.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-09 15:47:41 -07:00
David B. Kinder fb3e47fd1e doc: add v0.7 version to master branch (/latest)
With the 0.7 release published, we can add the v0.7 doc menu choice.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-14 09:10:10 -07:00
David B. Kinder 1d783d3d46 doc: add 0.6 to doc version menu
Add the 0.6 version of documentation to the menu list (again)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-22 11:29:36 +08:00
David B. Kinder 16667e4c78 doc: add menu option for 0.5 docs
Add option in side-bar menu for 0.5 doc version

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-01-10 17:17:36 -08:00
David B. Kinder 9680009365 doc: update footer copyright year
Happy 2019!

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-27 17:06:51 -08:00
David B. Kinder 405d1335c6 doc: add 0.4 to doc version menu
With the 0.4 release, we can now add the 0.4 doc version menu option

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-11 20:43:16 -08:00
David B. Kinder e0260b4496 doc: add sphinx extension improving only directive
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.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-29 14:38:41 -08:00
David B. Kinder d8d164c6dd doc: release notes for 0.3
Update release notes and version selector for 0.3 release

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-09 09:51:28 -08:00
David B. Kinder b5bf00b6e0 doc: update doc version menu for v0.2 release
Update conf.py selector list to include version 0.2 documentation (and
fix an URL typo in the release notes).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-24 11:01:15 -07:00
David B. Kinder 42d9b24a54 doc: allow overriding displayed doc version
In special cases, we'd like to freeze doc versions based on a tag (e.g.,
tags/acrn-2018w34.4-140000p) and have that version show up on the
generated docs.  (Normally the version shown is from the
hypervisor/VERSION file.)

With this patch, if DOC_TAG=release then it uses a RELEASE=name
environment variable (e.g., from the make command line) to override the
displayed version:

    make DOC_TAG=release RELEASE=acrn-2018w34.4-140000p html
    make DOC_TAG=release RELEASE=acrn-2018w34.4-140000p publish

Assuming you've checked out the tagged branch (both for acrn-hypervisor
and acrn-kernel), these make commands will generate and publish docs to
https://projectacrn.github.io/acrn-2018w34.4-14000p

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-11 16:29:17 -07:00
David B. Kinder ce7257e12e doc: tweak logo href to projectacrn.org
Have the logo link to the project site rather than the doc site

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-07-31 12:04:36 -07:00
David B. Kinder b4a6b93d5c doc: add v0.1 doc choice
Normal publication is to the /latest/ folder.  With the tagged 0.1
release, we now have an alternative frozen version of the docs.

Also, tweaked the code for collecting version information from the
VERSION file to create document version number, and Makefile needed to
create the publish directory for a new tagged version.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-07-12 07:20:36 -07:00
David B. Kinder 11e997a70e doc: update release v0.1 release notes
Include developer comments, add commit change log,
update conf.py to include url shortcuts for references to GitHub issues
and commits.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-07-11 20:48:01 -07:00
David B. Kinder de5bb50545 doc: handle new VERSION file and format
A recent PR changed where the release version is maintained (was in the
hypervisor/Makefile, now in a VERSION file) and format (was a RC_VERSION
variable, now a EXTRA_VERSION variable).  The doc build process uses the
version information when generating documents.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-07-09 11:23:47 -07:00
David B. Kinder b0deb1b5bd doc: add support for kerneldoc API tools
Some ACRN kernel components are using the API documentation methods of
the Linux kernel.  While they use Sphinx for generating their
documentation, they don't use doxygen to collect the API information as
we do for the rest of the project.  Instead, they use their own tools
called "kerneldoc".  This PR incorporates those tools into our
documentation build process.

There is a prescribed directory structure for this to work: that the
acrn-hypervisor and acrn-kernel repos are cloned to sibling folders,
e.g.:

    projectacrn
       acrn-hypervisor
       acrn-kernel

so that documentation references from acrn_hypervisor/doc can access the
source code in ../../acrn-kernel to do the kerneldoc processing.  A full
display of the kerneldoc API material for a source file in the
acrn-kernel tree can be done using a sphinx extension directive:

    .. kernel-doc:: /tools/virtio/linux/scatterlist.h

where the assumed root of these file references is ../../acrn-kernel.

The format for kerneldoc comments is documented in
https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html and
references to kerneldoc API material in .rst files is documented in
https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html#including-kernel-doc-comments

Without options, the kernel-doc directive includes all documentation
comments from the source file. With options, you can display subsets of
these comments.

The intention is to limit use of kerneldoc comments to the acrn-kernel
repo and not use them elsewhere within the ACRN project (where doxygen
comments are expected.)

While I'd prefer NOT to include the kerneldoc perl script here (it is
already in the acrn-kernel/sphinx folder), I don't want to create a
dependency on the acrn-kernel folder existing for documentation
generation, but this might be unavoidable once we have part of the API
material coming from there.  We can update this in a later PR.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-07-04 18:26:44 -07:00