summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Cottlehuber <dch@apache.org>2013-04-30 14:33:33 +0200
committerDave Cottlehuber <dch@apache.org>2013-05-17 22:18:23 +0200
commit37383c1795052ce594a60e6b9beb447708737d75 (patch)
tree9c8300efe69a9eaf35689a63a7cd8b6de3e81480
parent537b5451614a777cfdcc739c929ae944ad344689 (diff)
downloadcouchdb-1783-feature-add-asf-comments-in-rtd.tar.gz
COUCHDB-1783 support ASF comments system in readthedocs.org1783-feature-add-asf-comments-in-rtd
-rw-r--r--share/doc/build/Makefile.am1
-rw-r--r--share/doc/src/conf.py1
-rw-r--r--share/doc/templates/asf-comments.html32
3 files changed, 34 insertions, 0 deletions
diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am
index 564ae69b9..7bd80c349 100644
--- a/share/doc/build/Makefile.am
+++ b/share/doc/build/Makefile.am
@@ -183,6 +183,7 @@ src_files = \
src_files_html = \
../static/rtd.css \
+ ../templates/asf-comments.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 6fd91126b..5f300d36c 100644
--- a/share/doc/src/conf.py
+++ b/share/doc/src/conf.py
@@ -53,6 +53,7 @@ html_sidebars= {
"relations.html",
"utilities.html",
"help.html",
+ "asf-comments.html"
]
}
diff --git a/share/doc/templates/asf-comments.html b/share/doc/templates/asf-comments.html
new file mode 100644
index 000000000..a30c11aa6
--- /dev/null
+++ b/share/doc/templates/asf-comments.html
@@ -0,0 +1,32 @@
+<!--
+
+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.
+
+-->
+
+{% if not local %}
+<script type="text/javascript"><!--//--><![CDATA[//><!--
+var comments_shortname = 'couchdb';
+var comments_identifier = '{{path}}'; // Insert your unique page ID here
+(function(w, d) {
+ d.write('<div id="comments_thread"><\/div>');
+ var s = d.createElement('script');
+ s.type = 'text/javascript';
+ s.async = true;
+ s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
+ (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
+})(window, document);
+//--><!]]></script>
+<noscript>
+<iframe width="100%" height="500" src="https://comments.apache.org/iframe.lua?site=couchdb&amp;page={{path}}"></iframe>
+</noscript>
+{% endif %}