This repository was archived by the owner on Sep 25, 2026. It is now read-only.
fix: redirect the pre-mkdocs project docs page by page - #15
Closed
shenxianpeng wants to merge 1 commit into
Closed
shenxianpeng wants to merge 1 commit into
shenxianpeng wants to merge 1 commit into
Conversation
Before the mkdocs site, the documentation was Sphinx, published by the commit-check/commit-check repository at commit-check.github.io/commit-check/<page>.html. That project site is no longer published, so GitHub Pages serves those paths from this site, where they fell through to the 404 fallback and sent every reader to the home page. They are still linked from the README of every release up to v2.12 (and so from PyPI), from blog posts and from the Action's docs. Each now gets its own stub pointing at the page that replaced it (configuration.html -> /configuration/, cli_args.html -> /configuration/#command-line-arguments, what-is-new.html -> /changelog/#v200, ...), with matching 301s for Netlify. The stub script no longer appends the reader's fragment when the target already names a section, which would have produced a URL with two '#'.
✅ Deploy Preview for commit-check-github-io ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
Author
|
Closing: this repository is no longer maintained, and the old Sphinx URLs already land on commit-check.com (the home page) rather than breaking. Not worth unarchiving for. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
Before MkDocs, the docs were Sphinx pages at
commit-check.github.io/commit-check/<page>.html, published by thecommit-check/commit-checkrepo. That project site isn't published any more, so these paths fall through to this site's 404 fallback, and every reader lands on the commit-check.com home page instead of the page they wanted.These URLs are still linked from:
example.html×6,cli_args.html×3,configuration.html×2,what-is-new.html×2,example.html#push-validation-examples)What
scripts/build_redirects.py: a separateOLD_PROJECT_DOCSmap, one stub per Sphinx page of v2.12.2 pluscli_args.html:/commit-check/(andindex.html),README.html/configuration.html/configuration/cli_args.html/configuration/#command-line-argumentsexample.html/example/migration.html/troubleshoot.html/changelog.htmlwhat-is-new.html/changelog/#v200Every target, including both anchors, returns 200 on commit-check.com.
The stub script now appends the reader's
#fragmentonly when the target doesn't already name a section.netlify.toml: matching real 301s ahead of the catch-all.tests/: every old page gets a stub at its own file path, and the two maps don't overlap.README: one row in the redirect table.
Checked
pytest tests/ -q→ 4 passed. That includes the existing check that builds the old MkDocs site and compares its URLs against the map.Archive status
I unarchived this repository so this PR could be opened. After it merges and the Pages deploy succeeds, the repository should be archived again. Pages keeps serving the last deployed artifact.