couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [5/6] git commit: updated refs/heads/1781-reorganize-and-improve-docs to 10e8b49
Date Tue, 03 Sep 2013 10:37:37 GMT
Add download page.

Fixes COUCHDB-906


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/fd1a6616
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/fd1a6616
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/fd1a6616

Branch: refs/heads/1781-reorganize-and-improve-docs
Commit: fd1a66163ed5446fe482cc1c9f6a42727bdb909f
Parents: bb2b5f6
Author: Alexander Shorin <kxepal@apache.org>
Authored: Mon Sep 2 03:25:15 2013 +0400
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Mon Sep 2 03:25:15 2013 +0400

----------------------------------------------------------------------
 share/doc/build/Makefile.am             |  1 +
 share/doc/src/conf.py                   |  8 ++++-
 share/doc/templates/help.html           |  1 +
 share/doc/templates/pages/download.html | 48 ++++++++++++++++++++++++++++
 4 files changed, 57 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/fd1a6616/share/doc/build/Makefile.am
----------------------------------------------------------------------
diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am
index dcc1150..16ed5d6 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

http://git-wip-us.apache.org/repos/asf/couchdb/blob/fd1a6616/share/doc/src/conf.py
----------------------------------------------------------------------
diff --git a/share/doc/src/conf.py b/share/doc/src/conf.py
index 04b7079..7c49bbf 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'
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/fd1a6616/share/doc/templates/help.html
----------------------------------------------------------------------
diff --git a/share/doc/templates/help.html b/share/doc/templates/help.html
index fcc75c5..be0cb91 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>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/fd1a6616/share/doc/templates/pages/download.html
----------------------------------------------------------------------
diff --git a/share/doc/templates/pages/download.html b/share/doc/templates/pages/download.html
new file mode 100644
index 0000000..76fe93d
--- /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 %}


Mime
View raw message