Skip to content

Commit

Permalink
Fix "Edit on Github" RTD link
Browse files Browse the repository at this point in the history
@mbrush I think this should fix the Edit on Github link.
  • Loading branch information
larrybabb authored Feb 22, 2025
1 parent 3297f85 commit cbca364
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def _parse_release_as_version(rls):
# N.B. RTD ignores these values. :-/
release = _get_git_tag()
version = _parse_release_as_version(release)
# Automatically use the RTD branch/tag as the GitHub version
github_version = os.environ.get("READTHEDOCS_VERSION", "main")

# -- Schema doc paths --------------------------------------------------------

Expand Down Expand Up @@ -90,3 +92,10 @@ def _parse_release_as_version(rls):

html_sidebars = { '**': ['globaltoc.html', 'relations.html',
'sourcelink.html', 'searchbox.html'] }
html_context = {
"conf_py_path": "/docs/source/",
"display_github": True,
"github_user": "ga4gh",
"github_repo": "va-spec",
"github_version": github_version,
}

0 comments on commit cbca364

Please sign in to comment.