Skip to content

Commit

Permalink
Fix GitHub links when build locally
Browse files Browse the repository at this point in the history
Seems RTD was doing some magic on their builds, as all the
edit RST file links would work (except the autogenerated
ones from Python code - not fixed them yet, but tested it
locally).
  • Loading branch information
peterjc committed Aug 14, 2019
1 parent e7fc826 commit 9ec5300
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@
# https://sphinx-rtd-theme.readthedocs.io/en/latest/configuring.html
html_theme_options = {"prev_next_buttons_location": "both"}

# Based on:
# https://github.com/readthedocs/sphinx_rtd_theme/issues/231#issuecomment-126447493
html_context = {
"display_github": True, # Add 'Edit on Github' link instead of 'View page source'
"github_user": "peterjc",
"github_repo": "thapbi-pict",
"github_version": "master",
"conf_py_path": "/docs/",
# "source_suffix": source_suffix,
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
Expand Down

0 comments on commit 9ec5300

Please sign in to comment.