You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2022/09/12 16:05:41 UTC

[couchdb] 01/01: Try to fix edit docs link

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch try-to-fix-docs-edit-link
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 2f44995752f5b1a6f4c188b6a0448ddcfc74dd08
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Mon Sep 12 11:31:08 2022 -0400

    Try to fix edit docs link
---
 src/docs/ext/github.py                 | 2 +-
 src/docs/src/conf.py                   | 5 +++--
 src/docs/templates/pages/download.html | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/docs/ext/github.py b/src/docs/ext/github.py
index f812d9e6b..d8accf708 100644
--- a/src/docs/ext/github.py
+++ b/src/docs/ext/github.py
@@ -41,6 +41,6 @@ def html_page_context(app, pagename, templatename, context, doctree):
 
 def setup(app):
     app.add_config_value("github_project", "", True)
-    app.add_config_value("github_branch", "master", True)
+    app.add_config_value("github_branch", "main", True)
     app.add_config_value("github_docs_path", "", True)
     app.connect("html-page-context", html_page_context)
diff --git a/src/docs/src/conf.py b/src/docs/src/conf.py
index c0da58004..3fbc6413b 100644
--- a/src/docs/src/conf.py
+++ b/src/docs/src/conf.py
@@ -18,7 +18,7 @@ import sphinx_rtd_theme
 
 sys.path.insert(0, os.path.abspath("../ext"))
 
-needs_sphinx = "1.5"
+needs_sphinx = "2.4.4"
 
 extensions = [
     "sphinx.ext.todo",
@@ -77,7 +77,8 @@ html_context = {
     # Format Template: https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}
     "github_user": "apache",
     "github_repo": "couchdb",
-    "github_version": "main/src/",
+    "github_version": "main",
+    "conf_py_path": "/src/docs/src/"
 }
 
 master_doc = "index"
diff --git a/src/docs/templates/pages/download.html b/src/docs/templates/pages/download.html
index 76fe93daf..481ec9fac 100644
--- a/src/docs/templates/pages/download.html
+++ b/src/docs/templates/pages/download.html
@@ -16,7 +16,7 @@ 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' %}
+{% if git_branch == 'main' %}
   {% set rtd_ver = 'latest' %}
 {% else %}
   {% set rtd_ver = git_branch %}