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 15:31:46 UTC

[couchdb] branch try-to-fix-docs-edit-link updated: 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


The following commit(s) were added to refs/heads/try-to-fix-docs-edit-link by this push:
     new 85c68d1c4 Try to fix edit docs link
85c68d1c4 is described below

commit 85c68d1c46b79ec942c98d5fb18ecabe38ee201b
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                   | 3 ++-
 src/docs/templates/pages/download.html | 2 +-
 3 files changed, 4 insertions(+), 3 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..1b243ca1c 100644
--- a/src/docs/src/conf.py
+++ b/src/docs/src/conf.py
@@ -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 %}