Strip the version from Markdown self-links in versioned builds - #4061
Merged
paoloredis merged 1 commit intoSep 21, 2026
Merged
Conversation
Each versioned build (Kubernetes, RS, RDI, RedisVL) moves the version's content up one level and deletes the version directory, after stripping the version from relref links only. DOC-7086 converted RDI 1.19.1's archive to render-hook Markdown links (/content/<product>/<version>/...), which keep the prefix, no longer resolve, and render as literal href="/content/..." 404s. The second gsub rewrites that form the same way the first rewrites relrefs. Checked with awk, mawk, and gawk against every archived version: no version-prefixed link of either form is left, and the other products' archives, which have no Markdown self-links yet, are unchanged by it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The four changes consistently mirror the existing relref rewrite and run before the version directory is flattened.
Review effort: Lite
Findings: None
What changed in this PR
Updates versioned Hugo build preprocessing so archived self-links no longer retain deleted version directories.
Changes:
- Adds Markdown-link normalization to all four versioned build jobs.
- Updates comments to document both normalized link formats.
| File | Description |
|---|---|
.github/workflows/main.yml |
Normalizes versioned Markdown self-links before archive flattening. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
paoloredis
self-requested a review
September 21, 2026 09:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4060.
Problem
Since DOC-7086 converted RDI 1.19.1's archive to render-hook Markdown links, every link in that archive to another page of the same archive renders on redis.io as a literal
href="/content/integrate/redis-data-integration/1.19.1/....md", which 404s. #4060 has examples.The versioned build jobs strip the version from
relrefself-links before they move the version up one level and delete its directory. They don't strip it from](/content/<product>/<version>/...)links, which then point at a page that no longer exists.Change
In
.github/workflows/main.yml, each of the four versioned jobs gets a secondgsubin its existingawk(build_kubernetes,build_rs,build_rdi,build_redisvl). The newgsubrewrites](/content/<product>/<version>/to](/content/<product>/, mirroring the one forrelref.Only the RDI archive has Markdown self-links today. The other three jobs get the same line so they don't break when their archives are converted.
Verification
awks: Each of the fourawklines, exactly as written in the workflow, was run underawk(BWK),mawk(theubuntu-latestdefault), andgawk. It ran against every archived version onmain: 44 versions across the four products.gsubdoesn't change them.awk, runrsync --delete-after, runhugo.awk, the version's output had 44href="/content/links, from the DOC-7086 installation unit alone.🤖 Generated with Claude Code
Note
Low Risk
CI-only preprocessing in the docs workflow; no runtime or auth changes, and the new rewrite mirrors an existing relref step.
Overview
Fixes broken internal links in versioned Hugo doc builds (Kubernetes, RS, RDI, RedisVL) where archived content uses render-hook Markdown paths like
](/content/.../<version>/...).Each versioned job in
.github/workflows/main.ymlalready rewritesrelrefshortlinks to drop the version segment beforersyncflattens the version directory. This PR adds a matchingawkgsubon the same pass so](/content/<product>/<version>/becomes](/content/<product>/, in line with the existingrelrefbehavior.Comments in those four jobs are updated to note that both relrefs and Markdown links are normalized. RDI 1.19.1 is the archive that currently hits this (335 self-links); the other three products get the same rule so future archive conversions do not regress.
Reviewed by Cursor Bugbot for commit 65db02c. Bugbot is set up for automated code reviews on this repo. Configure here.