Repository navigation
Redirect old Airflow DAG how-to URLs (Search Console 404s) - #81
Merged
Merged
Conversation
Search Console reported them as 404s. GitHub Pages can't send a 301, so a postBuild step writes a meta-refresh page at <from>.html for each one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Search Console reported 30 docs URLs as 404s. Most were fixed earlier by Cloudflare redirect rules. The ones still broken are the Airflow DAG how-tos that moved into
dags/./docs/how-tos/airflow/<page>returns 404 for all 15 DAG how-tos..htmlURLs: for 8 of the 15 pages, Cloudflare's generic rule sends/how-tos/airflow/<page>.htmlto that broken path. Examples:get-current-branch-name.html,test-dags.html,run-fivetran-sync-jobs.html./docs/category/snowflake-1: also 404s. Search Console flagged it as a duplicate category.The fix: a small
postBuildstep indocusaurus.config.jswrites a meta-refresh page for each of these URLs, plus a canonical link to the target. The list of DAG pages comes from the build itself, so a page added todags/later is covered automatically. If a stub would overwrite a real page, the build fails.Why not
@docusaurus/plugin-client-redirects: it writes<from>/index.html. On GitHub Pages, that makes/xredirect to/x/, and Cloudflare's trailing-slash rule sends it back to/x. That's a loop;/imgand/docsalready do it on the live site.Checked: the build passes, 15 DAG stubs plus
snowflake-1.htmlare generated, and none of them appear in the sitemap.🤖 Generated with Claude Code