sphinx-doc / sphinx-doc/sphinx

Override the target of source links

Open
#11,664 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:proposal
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

For the documentation of large classes, it is helpful to create a dedicated and structured overview page, e.g.

https://matplotlib.org/stable/api/axes_api.html#module-matplotlib.axes

when I now reference the class :class:`.Axes` , the link goes to the class docstring page. I'd rather have the link go to the overview page.

Is there a way to override where such links resolve to? Or alternatively, do you have an idea how to better solve this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the :class:.Axes reference and comparing it with the linked overview and class-docstring pages. Investigate how Sphinx resolves this reference, then define what a configurable override should look like and how success would be verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.