Skip to content

Implement a redirect extension and policy #34

@aputtu

Description

@aputtu

Documentation Linking Strategy and Requirements

  • Document ID: DOC-LINK-REQ-1.0
  • Date: August 13, 2025
  • Status: Draft

1. Introduction

The purpose of this document is to define the requirements for a robust and maintainable linking strategy for the project's Sphinx documentation. A stable linking strategy is critical for providing a positive User Experience (UX), maintaining Search Engine Optimization (SEO) value, and reducing long-term maintenance overhead. This specification covers both internal links (within the documentation) and external inbound links (from outside websites).

2. Scope

These requirements apply to all documentation generated by the Sphinx build system. The primary goal is to ensure that links remain functional even as the documentation evolves and its content is rearranged.


3. Core Requirements

3.1. Internal Linking (Cross-References)

  • Requirement 1.1: Location-Independent Linking
    • Description: Links between pages within the documentation must not break when the target content (e.g., a section, figure, or table) is moved to a different source file.
    • Rationale: Documentation is frequently refactored. A manual process for updating links is error-prone and inefficient.
    • Acceptance Criteria: The linking mechanism must use stable, logical identifiers associated with content, not hardcoded file paths. The build system must automatically resolve these identifiers to the correct URL, regardless of the target content's location within the project.

3.2. External Inbound Linking

  • Requirement 2.1: URL Persistence and Redirection

    • Description: A mechanism must be in place to handle inbound links from external sites that point to a URL that no longer exists due to file renaming or relocation. Users accessing a legacy URL shall be automatically redirected to the new, canonical URL.
    • Rationale: To prevent "link rot," which damages user trust and SEO ranking. External stakeholders cannot be expected to update their links.
    • Acceptance Criteria: An HTTP request to a legacy URL returns a permanent redirect (HTTP 301) to the current URL. The process is seamless for the end-user.
  • Requirement 2.2: Maintainable Redirect Management

    • Description: The process for managing URL redirects should be integrated into the documentation workflow and version-controlled with the source code.
    • Rationale: Relying on separate server administration for redirects creates friction and is not scalable for documentation teams. Managing redirects as code (e.g., in conf.py) keeps the responsibility within the project.
    • Acceptance Criteria: A documentation author can define a redirect by adding an entry to a project configuration file. The build process must then generate the necessary redirection logic (e.g., via HTML meta refresh pages or other means), without requiring manual server configuration.

4. Glossary

  • Internal Link: A hyperlink from one page within the documentation set to another page within the same set.
  • External Inbound Link: A hyperlink from a separate, external website that points to a page within our documentation.
  • Link Rot: The tendency for hyperlinks to become broken over time as their target content is moved or deleted.
  • Stable Identifier: A unique, persistent name assigned to a piece of content that is used for internal linking.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions