diff options
author | Nick Vatamaniuc <vatamane@apache.org> | 2022-09-24 00:57:05 -0400 |
---|---|---|
committer | Nick Vatamaniuc <nickva@users.noreply.github.com> | 2022-09-24 09:51:24 -0400 |
commit | e031781ffe03e3d3578855e638532eb123d99c4f (patch) | |
tree | f77f343a2248aa9a968755fb8eaa59d2fa442449 | |
parent | 16d88d95bafdc4b0e76f830150207a8b6c88df65 (diff) | |
download | couchdb-e031781ffe03e3d3578855e638532eb123d99c4f.tar.gz |
Fix the documentation download links
The download page was missing the version part of the template.
Use the RTD version environment variable
[1] https://docs.readthedocs.io/en/stable/environment-variables.html?highlight=github_version#envvar-READTHEDOCS_VERSION
-rw-r--r-- | src/docs/src/conf.py | 1 | ||||
-rw-r--r-- | src/docs/templates/pages/download.html | 5 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/docs/src/conf.py b/src/docs/src/conf.py index 01f197b1a..2c84f615f 100644 --- a/src/docs/src/conf.py +++ b/src/docs/src/conf.py @@ -74,6 +74,7 @@ html_context = { "conf_py_path": "/src/docs/src/", "github_user": "apache", "github_repo": "couchdb", + "rtd_ver": os.environ.get("READTHEDOCS_VERSION_NAME") or "latest", } text_newlines = "native" diff --git a/src/docs/templates/pages/download.html b/src/docs/templates/pages/download.html index 481ec9fac..b78f479fb 100644 --- a/src/docs/templates/pages/download.html +++ b/src/docs/templates/pages/download.html @@ -16,11 +16,6 @@ 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 == 'main' %} - {% set rtd_ver = 'latest' %} -{% else %} - {% set rtd_ver = git_branch %} -{% endif %} {% block body %} <h1>Download Apache CouchDB™ {{ release }} Documentation</h1> |