Skip to content

Commit

Permalink
Fix "Edit on Github" links (#577)
Browse files Browse the repository at this point in the history
Fix the "Edit on Github" links by removing the
`_templates/breadcrumbs.html` file: Sphinx and the RTD theme can
generate those links if the docs are correctly configured.
Add `"conf_py_path"` to the `html_context` dictionary in Sphinx
configuration file, so the links to the source files work correctly.
Minor updates on the configuration file to avoid some warnings: remove
the `language=None` and `html_theme_path`.
  • Loading branch information
santisoler authored Dec 4, 2024
1 parent ef1646a commit d669b82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 52 deletions.
43 changes: 0 additions & 43 deletions _templates/breadcrumbs.html

This file was deleted.

11 changes: 2 additions & 9 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@
# The full version, including alpha/beta/rc tags.
release = '0.0.5'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
Expand Down Expand Up @@ -164,12 +157,12 @@

import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_context = {
'display_github': True,
'github_user': 'geoscixyz',
'github_repo': 'em',
'github_version': 'main'
'github_version': 'main',
"conf_py_path": "/", # Path in the checkout to the docs root
}
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
Expand Down

0 comments on commit d669b82

Please sign in to comment.