summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Shorin <kxepal@apache.org>2013-09-02 03:25:15 +0400
committerAlexander Shorin <kxepal@apache.org>2013-09-27 22:01:48 +0400
commita16de04618620e293f74992061ba29569ac3da2c (patch)
tree552b38639b56621c243beedca002679dcbebe430
parent1449a3777b09282d5fab9310d6eca538332f0b2d (diff)
downloadcouchdb-a16de04618620e293f74992061ba29569ac3da2c.tar.gz
Add download page.
Fixes COUCHDB-906
-rw-r--r--share/doc/build/Makefile.am1
-rw-r--r--share/doc/src/conf.py8
-rw-r--r--share/doc/templates/help.html1
-rw-r--r--share/doc/templates/pages/download.html48
4 files changed, 57 insertions, 1 deletions
diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am
index dcc11507b..16ed5d633 100644
--- a/share/doc/build/Makefile.am
+++ b/share/doc/build/Makefile.am
@@ -391,6 +391,7 @@ src_files = \
src_files_html = \
../static/rtd.css \
+ ../templates/pages/download.html \
../templates/help.html \
../templates/searchbox.html \
../templates/utilities.html
diff --git a/share/doc/src/conf.py b/share/doc/src/conf.py
index 04b707952..7c49bbf89 100644
--- a/share/doc/src/conf.py
+++ b/share/doc/src/conf.py
@@ -90,6 +90,12 @@ html_favicon = "../images/favicon.ico"
html_use_index = False
+html_additional_pages = {
+ 'download': 'pages/download.html'
+}
+
+html_context = {}
+
html_sidebars = {
"**": [
"searchbox.html",
@@ -133,7 +139,7 @@ extlinks = {
github_project = 'apache/couchdb'
-github_branch = 'master'
+html_context['git_branch'] = github_branch = 'master'
github_docs_path = 'share/doc/src'
diff --git a/share/doc/templates/help.html b/share/doc/templates/help.html
index fcc75c56c..be0cb9190 100644
--- a/share/doc/templates/help.html
+++ b/share/doc/templates/help.html
@@ -21,6 +21,7 @@ specific language governing permissions and limitations under the License.
<li><a href="https://couchdb.apache.org/#mailing-list">Mailing Lists</a></li>
<li><a href="http://webchat.freenode.net/?channels=couchdb">IRC</a></li>
<li><a href="https://issues.apache.org/jira/browse/CouchDB">Issues</a></li>
+<li><a href="{{ pathto('download') }}">Download</a></li>
{%- if github_show_url %}
<li><a href="{{ github_show_url }}"
rel="nofollow">{{ _('Show on GitHub') }}</a></li>
diff --git a/share/doc/templates/pages/download.html b/share/doc/templates/pages/download.html
new file mode 100644
index 000000000..76fe93daf
--- /dev/null
+++ b/share/doc/templates/pages/download.html
@@ -0,0 +1,48 @@
+<!--
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed
+under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, either express or implied. See the License for the
+specific language governing permissions and limitations under the License.
+
+-->
+
+{% extends "layout.html" %}
+{% set title = 'Download' %}
+{% set url = 'https://media.readthedocs.org/%s/couchdb/%s/couchdb.%s' %}
+{% if git_branch == 'master' %}
+ {% set rtd_ver = 'latest' %}
+{% else %}
+ {% set rtd_ver = git_branch %}
+{% endif %}
+
+{% block body %}
+<h1>Download Apache CouchDB™ {{ release }} Documentation</h1>
+
+<p>To download an archive containing all the documents for this version of
+CouchDB in one of various formats, follow one of links in this table</p>
+
+<table class="docutils">
+ <tr>
+ <td>PDF (A4 paper size)</td>
+ <td><a href="{{ url|format('pdf', rtd_ver, 'pdf') }}">Download</a> (~1 MB)</td>
+ </tr>
+ <tr>
+ <td>HTML</td>
+ <td><a href="{{ url|format('htmlzip', rtd_ver, 'zip') }}">Download</a> (~5 MB)</td>
+ </tr>
+ <tr>
+ <td>EPUB</td>
+ <td><a href="{{ url|format('epub', rtd_ver, 'epub') }}">Download</a> (~1 MB)</td>
+ </tr>
+</table>
+
+<p>These archives contain all the content of the documentation.</p>
+
+{% endblock %}