Skip to content

Archived RDI 1.19.1 pages link to /content/...md paths that 404 #4060

Description

@EliShteinman

Problem

Internal links in the archived RDI 1.19.1 docs on redis.io are broken. They render as literal href="/content/..." paths, which 404.

For example, https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/installation/install-vm/ has 13 of them, including:

href="/content/integrate/redis-data-integration/1.19.1/installation/install-k8s.md"

That URL returns 404. The page it means, /docs/latest/integrate/redis-data-integration/1.19.1/installation/install-k8s/, returns 200.

A sample of 10 pages under /1.19.1/ has 77 broken links. The archive has 335 such links in total.

Cause

DOC-7086 converted content/integrate/redis-data-integration/1.19.1/ from relref shortcodes to render-hook Markdown links: [text](/content/integrate/redis-data-integration/1.19.1/<page>.md).

Each versioned build job in .github/workflows/main.yml does the following:

  1. Strips the version from the archive's self-links with awk. It matches only the relref form: ({{< relref "/<product>/<version>.
  2. Runs rsync -a --delete-after to copy the version's content up into the product directory. This also deletes the version directory itself.
  3. Runs Hugo.

The Markdown form keeps its /<version>/ segment, and the page it points at no longer exists. render-link.html can't resolve it, so it emits the destination unchanged with a warnf. The build still passes.

The href-diff checks for DOC-7086 compared two ordinary builds. In an ordinary build the version directory still exists, so the links resolve there. The link checks proposed in #3866 and #3867 cover the source and the latest build, not the output of the versioned jobs.

The same awk exists in build_kubernetes, build_rs, and build_redisvl. Their archives have no Markdown self-links yet. They'll break the same way once they're converted.

Fix

A second gsub in each of the four jobs rewrites ](/content/<product>/<version>/ to ](/content/<product>/, the same way the existing one handles relref. See the linked pull request.

A cheap guard could also help: fail a versioned job if its output contains href="/content/. No published page lives under /content/, so any such href is a 404.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions