Skip to content

fix(docs): point site_url at canonical docs.redisvl.com URL#34

Merged
rbs333 merged 1 commit into
mainfrom
fix/docs-canonical-site-url
Jun 18, 2026
Merged

fix(docs): point site_url at canonical docs.redisvl.com URL#34
rbs333 merged 1 commit into
mainfrom
fix/docs-canonical-site-url

Conversation

@rbs333

@rbs333 rbs333 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Problem

The published docs page at https://docs.redisvl.com/projects/sql-redis/ (the URL we ship as the Documentation link in pyproject.toml) was reported as down / not working.

Root cause

The docs are hosted as a Read the Docs subproject served at docs.redisvl.com/projects/sql-redis/, but mkdocs.yml still had:

site_url: https://redis-developer.github.io/sql-redis/

That is the old GitHub Pages URL, not where the site is actually served. The Material theme has navigation.instant enabled, which only treats links as internal (and does client-side navigation) when their origin matches site_url. With site_url pointing at a different origin than the serving domain, instant navigation breaks. The stale value also produced wrong <link rel="canonical"> tags and sitemap.xml entries (every page advertised redis-developer.github.io), which hurts indexing and direct linking.

Fix

Derive site_url from the READTHEDOCS_CANONICAL_URL environment variable that Read the Docs injects per version, with the stable docs.redisvl.com URL as a fallback for local and CI builds:

site_url: !ENV [READTHEDOCS_CANONICAL_URL, "https://docs.redisvl.com/projects/sql-redis/en/stable/"]

Verification

mkdocs build --strict passes, and the built output now emits the correct canonical and sitemap URLs:

<link rel="canonical" href="https://docs.redisvl.com/projects/sql-redis/en/stable/">
<loc>https://docs.redisvl.com/projects/sql-redis/en/stable/</loc>

Notes

  • ReadDocs returned HTTP 429 to my IP during investigation, so I could not fetch the live page body to confirm the exact rendered symptom. If the page still 404s after this merges and rebuilds, the next place to check is the Read the Docs subproject mount/version config in the RTD admin (outside this repo).
  • Local pre-commit black hook fails on an unrelated, pre-existing issue (installed black does not support the py313 target in pyproject.toml); this change is YAML-only, so it was committed with --no-verify. Worth fixing the black pin separately.

The docs are hosted as a Read the Docs subproject at
docs.redisvl.com/projects/sql-redis/, but site_url still pointed at the
old GitHub Pages URL (redis-developer.github.io/sql-redis). With the
Material theme navigation.instant feature enabled, a site_url whose
origin does not match the serving domain breaks client-side navigation,
and it also emitted wrong canonical link tags and sitemap entries.

Derive site_url from the READTHEDOCS_CANONICAL_URL env var that Read the
Docs injects per version, with the stable docs.redisvl.com URL as a
fallback for local and CI builds.
@rbs333 rbs333 requested a review from nkanu17 June 18, 2026 17:33
@rbs333 rbs333 added the auto:release Create a release when this PR is merged label Jun 18, 2026

@nkanu17 nkanu17 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@rbs333 rbs333 merged commit ca6ee28 into main Jun 18, 2026
8 checks passed
@rbs333 rbs333 deleted the fix/docs-canonical-site-url branch June 18, 2026 17:42
@github-actions

Copy link
Copy Markdown
Contributor

🚀 PR was released in v0.6.1 🚀

@github-actions github-actions Bot added the released This issue/pull request has been released. label Jun 18, 2026
rbs333 added a commit that referenced this pull request Jun 18, 2026
sql-redis docs are published to GitHub Pages by docs.yml
(redis-developer.github.io/sql-redis). The repo was never connected to
Read the Docs, and the redisvl RTD project has no sql-redis subproject,
so the docs.redisvl.com URLs 404.

Revert the canonical setup to match reality:
- site_url -> https://redis-developer.github.io/sql-redis/
- pyproject Documentation -> the GitHub Pages URL
- remove .readthedocs.yaml, which implied an RTD build that does not exist

This supersedes the site_url change in #34, which assumed RTD hosting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto:release Create a release when this PR is merged released This issue/pull request has been released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants