summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2016-08-11 01:33:32 +0900
committerRyota MIBU <r-mibu@cq.jp.nec.com>2016-08-11 01:34:21 +0900
commit59703f2ec84fa366ab1be9a0bfacd302c9c21155 (patch)
tree211312c7fc8e19b6978729776d0d7cfa31728821
parentc15e4a979697c71e125e5dd88b0d201744efc39b (diff)
add 'Save to PDF' link in sidebar
Change-Id: Ia9ffd10aa73c9e39203f31a5a19329006b68a444 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
-rw-r--r--etc/pagemenu.html19
-rwxr-xr-xscripts/docs-build.sh6
2 files changed, 25 insertions, 0 deletions
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 .
+#}
+<div role="note" aria-label="source link">
+ <h3>{{ _('This Page') }}</h3>
+ <ul class="this-page-menu">
+ {%- if show_source and has_source and sourcename %}
+ <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
+ rel="nofollow">{{ _('Show Source') }}</a></li>
+ {%- endif %}
+ <li><a href="//pdfcrowd.com/url_to_pdf/">Save to PDF</a></li>
+ </ul>
+</div>
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")