Skip to content

Commit

Permalink
Documentation: Add "Edit on GitHub" link
Browse files Browse the repository at this point in the history
  • Loading branch information
2xB authored Oct 26, 2023
1 parent a01ab39 commit 1a23100
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Documentation/gh-pages/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

Expand Down Expand Up @@ -121,3 +121,13 @@

html_logo = '_images/KassiopeiaLogo_1_cropped_bb.png'
html_permalinks_icon = "<span>#</span>"

# "Edit on GitHub" link
if "GITHUB_REPOSITORY_OWNER" in os.environ:
html_context = {
"display_github": True,
"github_user": os.environ["GITHUB_REPOSITORY_OWNER"],
"github_repo": os.environ["GITHUB_REPOSITORY"].split("/")[1],
"github_version": os.environ["GITHUB_REF_NAME"],
"conf_py_path": "/Documentation/gh-pages/source/",
}

0 comments on commit 1a23100

Please sign in to comment.