python / python/devguide

Clarify best practices with ref target labels in docs

Open
#927 1 comment 2 reactions 1 assignee View on GitHub

@CAM-Gerlach is already working on this.

Since Aug 3, 2022.

topic-documentation type-feature
Dominant language
Python
Stars
2.1k
Forks
1k
Avg merge
2d 12h
Merged PRs (30d)
12

Description

On python/cpython#94636 , specifically https://github.com/python/cpython/pull/94636#discussion_r934008442 , @ezio-melotti , @erlend-aasland and I discussed that that it might be helpful to clarify in the devguide some additional guidance related to reference target labels in the Cross-linking markup section.

Specifically, it could mention that whenever possible, the existing ref target should be left place (either instead of or addition to adding a new one) when sections are changed or moved, since it ensures any inbound internal or Intersphinx references don't break or need to be changed, as well as any external links that anchor (provided that it wasn't moved to a different page without a redirection).

Also, it could provide a guideline and examples on how ref labels should be "namespaced" to avoid conflicts, i.e. by the module name for library docs, or the page name elsewhere, documenting existing (if not always consistent) convention.

If we agree this would be helpful, I can submit a PR on this once #916 is merged.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.