Skip to content

Fix Edit on GitHub link to point to source files#15231

Draft
Aanushka001 wants to merge 1 commit into
ipython:mainfrom
Aanushka001:fix-edit-on-github-link
Draft

Fix Edit on GitHub link to point to source files#15231
Aanushka001 wants to merge 1 commit into
ipython:mainfrom
Aanushka001:fix-edit-on-github-link

Conversation

@Aanushka001
Copy link
Copy Markdown

This PR fixes the "Edit on GitHub" link displayed on ReadTheDocs documentation pages.

Problem: For auto-generated API documentation pages under api/generated/, the "Edit on GitHub" link was pointing to non-existent .rst files since those pages are dynamically generated from Python source code rather than having their own .rst source.

Fix:

  1. Updated docs/source/_templates/breadcrumbs.html:

    • For pages under api/generated/, the link now maps to the corresponding .py source file instead of a non-existent .rst file.
    • For all other pages, the existing behavior (via super()) is preserved.
  2. Updated docs/source/conf.py:

    • Added html_context configuration with display_github: True and proper repository details to enable "Edit on GitHub" support on ReadTheDocs.

Comment thread docs/source/conf.py
import tomllib

from sphinx_toml import load_into_locals
from sphinxf_toml import load_into_locals
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sphinxf ?

Comment thread docs/source/conf.py

# - template_path: Add any paths that contain templates here, relative to this directory.
# - master_doc: The master toctree document.
# - master_doc: The master tocture document.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Comment thread docs/source/conf.py

# Options for texinfo output
# --------------------------
# Options for textinfo output
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Comment thread docs/source/conf.py
]

#########################################################################
############################################################
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ?

@Carreau
Copy link
Copy Markdown
Member

Carreau commented Jun 5, 2026

please undo your unrelated and incorrect changes.

@Carreau Carreau marked this pull request as draft June 5, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants