From 59703f2ec84fa366ab1be9a0bfacd302c9c21155 Mon Sep 17 00:00:00 2001 From: Ryota MIBU Date: Thu, 11 Aug 2016 01:33:32 +0900 Subject: add 'Save to PDF' link in sidebar Change-Id: Ia9ffd10aa73c9e39203f31a5a19329006b68a444 Signed-off-by: Ryota MIBU --- etc/pagemenu.html | 19 +++++++++++++++++++ scripts/docs-build.sh | 6 ++++++ 2 files changed, 25 insertions(+) create mode 100644 etc/pagemenu.html diff --git a/etc/pagemenu.html b/etc/pagemenu.html new file mode 100644 index 000000000..2bb9d1c06 --- /dev/null +++ b/etc/pagemenu.html @@ -0,0 +1,19 @@ +{# + opnfvdocs/etc/pagemenu.html + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Sphinx sidebar template: link to pdfcrowd. + + :copyright: Copyright 2016 by OPNFV. + :license: Apache 2.0 . +#} +
+

{{ _('This Page') }}

+ +
diff --git a/scripts/docs-build.sh b/scripts/docs-build.sh index 5a7dbc06e..b6bb5d5f7 100755 --- a/scripts/docs-build.sh +++ b/scripts/docs-build.sh @@ -110,6 +110,8 @@ function prepare_config() { _name="$2" _conf="$_src/conf.py" + touch "$_conf" + # default params # Note: If you want to add a new sphinx extention here, you may need python # package for it (e.g. python package 'sphinxcontrib-httpdomain' is @@ -126,6 +128,10 @@ function prepare_config() { add_config "$_conf" 'html_logo' "'opnfv-logo.png'" add_config "$_conf" 'latex_domain_indices' "False" add_config "$_conf" 'latex_logo' "'opnfv-logo.png'" + add_config "$_conf" 'html_sidebars' \ + "{'**': ['globaltoc.html', + '$(cd $OPNFVDOCS_DIR; pwd)/etc/pagemenu.html', + 'searchbox.html']}" # genarated params title=$(cd $_src; python -c "$get_title_script") -- cgit 1.2.3-korg