From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 07/12] docs: Add license note to the HTML page footer
Date: Sun, 18 Jul 2021 13:46:16 +0100 [thread overview]
Message-ID: <20210718124621.13395-8-peter.maydell@linaro.org> (raw)
In-Reply-To: <20210718124621.13395-1-peter.maydell@linaro.org>
The standard Sphinx/RTD HTML page footer gives a copyright line
(based on the 'copyright' variable set in conf.py) and a line "Built
with Sphinx using a theme provided by Read the Docs" (which can be
disabled via the html_show_sphinx variable, but we leave it enabled).
As a free software project, we'd like to also mention the license
QEMU and its manual are released under.
Add a template footer.html which defines the 'extrafooter' block that
the RtD theme provides for this purpose. The new line of text will
go below the existing copyright and sphinx-acknowledgement lines.
(Unfortunately the RTD footer template does not permit putting it
after the copyright but before the sphinx-acknowledgement.)
We use the templating functionality to make the new text also be a
hyperlink to the about/license.html page of the manual.
Unlike rst files, HTML template files are not reported to our depfile
plugin, so we maintain a manual list in meson.build. New template
files should be rare, so not being able to auto-generate the
dependency info is not too awkward.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20210705095547.15790-7-peter.maydell@linaro.org
---
| 12 ++++++++++++
docs/meson.build | 3 ++-
MAINTAINERS | 1 +
3 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 docs/_templates/footer.html
--git a/docs/_templates/footer.html b/docs/_templates/footer.html
new file mode 100644
index 00000000000..4c15e17d2a8
--- /dev/null
+++ b/docs/_templates/footer.html
@@ -0,0 +1,12 @@
+{% extends "!footer.html" %}
+{% block extrafooter %}
+
+<!-- Empty para to force a blank line after "Built with Sphinx ..." -->
+<p></p>
+
+{% trans path=pathto('about/license') %}
+<p><a href="{{ path }}">QEMU and this manual are released under the
+GNU General Public License, version 2.</a></p>
+{% endtrans %}
+{{ super() }}
+{% endblock %}
diff --git a/docs/meson.build b/docs/meson.build
index 855e3916e90..300b1343291 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -44,6 +44,7 @@ if build_docs
meson.source_root() / 'docs/sphinx/qapidoc.py',
meson.source_root() / 'docs/sphinx/qmp_lexer.py',
qapi_gen_depends ]
+ sphinx_template_files = [ meson.source_root() / 'docs/_templates/footer.html' ]
have_ga = have_tools and config_host.has_key('CONFIG_GUEST_AGENT')
@@ -76,7 +77,7 @@ if build_docs
output: 'docs.stamp',
input: files('conf.py'),
depfile: 'docs.d',
- depend_files: sphinx_extn_depends,
+ depend_files: [ sphinx_extn_depends, sphinx_template_files ],
command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
'-Ddepfile_stamp=@OUTPUT0@',
'-b', 'html', '-d', private_dir,
diff --git a/MAINTAINERS b/MAINTAINERS
index 9100f9a0439..814d103fe16 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3451,6 +3451,7 @@ S: Maintained
F: docs/conf.py
F: docs/*/conf.py
F: docs/sphinx/
+F: docs/_templates/
Miscellaneous
-------------
--
2.20.1
next prev parent reply other threads:[~2021-07-18 12:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-18 12:46 [PULL 00/12] target-arm queue Peter Maydell
2021-07-18 12:46 ` [PULL 01/12] target/arm: Fix offsets for TTBCR Peter Maydell
2021-07-18 12:46 ` [PULL 02/12] docs: Fix documentation Copyright date Peter Maydell
2021-07-18 12:46 ` [PULL 03/12] docs: Stop calling the top level subsections of our manual 'manuals' Peter Maydell
2021-07-18 12:46 ` [PULL 04/12] docs: Remove "Contents:" lines from top-level subsections Peter Maydell
2021-07-18 12:46 ` [PULL 05/12] docs: Move deprecation, build and license info out of system/ Peter Maydell
2021-07-18 12:46 ` [PULL 06/12] docs: Add some actual About text to about/index.rst Peter Maydell
2021-07-18 12:46 ` Peter Maydell [this message]
2021-07-18 12:46 ` [PULL 08/12] docs: Add QEMU version information to HTML footer Peter Maydell
2021-07-18 12:46 ` [PULL 09/12] docs: Add skeletal documentation of cubieboard Peter Maydell
2021-07-18 12:46 ` [PULL 10/12] docs: Add skeletal documentation of the emcraft-sf2 Peter Maydell
2021-07-18 12:46 ` [PULL 11/12] docs: Add skeletal documentation of highbank and midway Peter Maydell
2021-07-18 12:46 ` [PULL 12/12] target/arm: Remove duplicate 'plus1' function from Neon and SVE decode Peter Maydell
2021-07-18 16:35 ` [PULL 00/12] target-arm queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210718124621.13395-8-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).