-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: replace gh-pages output with index.html redirect #12212
chore: replace gh-pages output with index.html redirect #12212
Conversation
I'm up for an auto-redirect solution also (javascript or .htaccess). This solution is SEO friendly but not automated. wdyt? |
Although "ugh", this is probably the nicer way to do things for the long term rather than throwing an automated solution in. |
Fixes argoproj#11390 Relates to argoproj#12211 - [x] setup redirect to [readthedocs](https://argo-workflows.readthedocs.io/en/stable/) Signed-off-by: jmeridth <[email protected]> Co-authored-by: Tim Collins <[email protected]>
d698fed
to
f76723f
Compare
If I'm reading the changes correctly, this change just makes all GH pages 404 and redirect to one page, RTD index page? As in, they do not redirect to their equivalent page in RTD? Per my comment in the original issue, redirects are incredibly important, especially for docs, as they should be reliable (semi-)permalinks. Otherwise I would reference versioned permalinks of the raw markdown on GitHub. Breaking all existing docs links is simply not an option in my book and is a very, very bad UX that nullifies any benefits of a change. Heck, part of the reason we're adding versioning is so that specific versions of the docs can be linked to; improving version linking while breaking all old links runs counter to the underlying UX purpose of that change. Breaking links is an anti-pattern. The last 6+ years of docs links will just no longer be useful. Any links in people's codebases, internal docs, and even contributors' own links in PRs, commits, issues, discussions, and Slack would immediately lose their value. This is even more important given the scope of Argo's docs -- it happens very often that a user simply couldn't find the feature. The quick link that got them to the right place and can be used by all future readers would no longer be helpful. We should have proper back-end redirects for all the current docs pages.
Redirects are one-offs. Once we create all the redirects of the existing docs pages, we would not add any more. New links would only be added to RTD |
lionello/lionello.github.io@c175f65 shows a way of doing a 404 style redirect which honors the original path. This isn't exactly what @agilgur5 is after, as it will work for currently non-existent pages, but is probably a decent workaround rather than having hundreds of individual redirects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to make sure redirects would work.
It's also not a proper back-end redirect. That's the front-end sending you to a new URL, which has different semantics than a redirect (in a handful of ways). We would also want some styling and a message on screen for users (including the standard "click this link if you are not redirected automatically") for the best UX, as the page will be at least temporarily visible.
They will all be identical pages except for the link itself, so I do think we can generate those fairly straightforwardly once we have a good base page. |
@agilgur5 @terrytangyuan I agree the redirects are absolutely required. Going to try the GitHub pages external-sites.json file and see if that results in what we want. It will most likely result in meta tags and that helps SEO, like @agilgur5 said, but isn't a backend redirect. Will test. |
Will fix conflicts also |
Oh that's not for GH Pages, that's for the GH Docs themselves (which have been open-source the past few years). Their own contributing docs are also hosted on GH's Docs, which is a little confusing. It pops up on some searches for GH Pages things unfortunately, which does not help |
Closing temporarily to prevent workflows from firing. Testing in my fork. Will reopen once satisfied. |
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 Signed-off-by: jmeridth <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 Signed-off-by: jmeridth <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 Signed-off-by: jmeridth <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 Signed-off-by: jmeridth <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 Signed-off-by: jmeridth <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 Signed-off-by: jmeridth <[email protected]> Co-authored-by: Tim Collins <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 Signed-off-by: jmeridth <[email protected]> Co-authored-by: Tim Collins <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt and use it in Makefile - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] alphabetize - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 - [x] update /hack script to use new mkdocs built-in validation (example result [here](https://github.com/argoproj/argo-workflows/actions/runs/7210935020/job/19645182282?pr=12360#step:6:148)) Signed-off-by: jmeridth <[email protected]> Co-authored-by: Tim Collins <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt and use it in Makefile - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] alphabetize - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 - [x] update /hack script to use new mkdocs built-in validation (example result [here](https://github.com/argoproj/argo-workflows/actions/runs/7210935020/job/19645182282?pr=12360#step:6:148)) Signed-off-by: jmeridth <[email protected]> Co-authored-by: Tim Collins <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt and use it in Makefile - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] alphabetize - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 - [x] update /hack script to use new mkdocs built-in validation (example result [here](https://github.com/argoproj/argo-workflows/actions/runs/7210935020/job/19645182282?pr=12360#step:6:148)) Signed-off-by: jmeridth <[email protected]> Co-authored-by: Tim Collins <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt and use it in Makefile - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] alphabetize - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 - [x] update /hack script to use new mkdocs built-in validation (example result [here](https://github.com/argoproj/argo-workflows/actions/runs/7210935020/job/19645182282?pr=12360#step:6:148)) Signed-off-by: jmeridth <[email protected]> Co-authored-by: Tim Collins <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt and use it in Makefile - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] alphabetize - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 - [x] update /hack script to use new mkdocs built-in validation (example result [here](https://github.com/argoproj/argo-workflows/actions/runs/7210935020/job/19645182282?pr=12360#step:6:148)) Signed-off-by: jmeridth <[email protected]> Co-authored-by: Tim Collins <[email protected]>
Replaced by #12362 |
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt and use it in Makefile - [x] drop gh-pages publish step in docs GitHub action - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update .spelling with words to exlude during spellcheck - [x] alphabetize - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 - [x] update /hack script to use new mkdocs built-in validation (example result [here](https://github.com/argoproj/argo-workflows/actions/runs/7210935020/job/19645182282?pr=12360#step:6:148)) Signed-off-by: jmeridth <[email protected]> Co-authored-by: Tim Collins <[email protected]> Co-authored-by: Anton Gilgur <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt and use it in Makefile - [x] drop gh-pages publish step in docs GitHub action - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 - [x] update /hack script to use new mkdocs built-in validation (example result [here](https://github.com/argoproj/argo-workflows/actions/runs/7210935020/job/19645182282?pr=12360#step:6:148)) Signed-off-by: jmeridth <[email protected]> Co-authored-by: Tim Collins <[email protected]> Co-authored-by: Anton Gilgur <[email protected]>
Yes. I'm aware of the size of this change. I cringed also. One must hunt down all URLs and change them. 😄 Fixes argoproj#11390 ### Motivation Moving to readthedocs so we can have versioned docs easily and standardize like argo-cd and other projects have already. ### Modifications - [x] add .readthedocs.yml - [x] add docs/requirements.txt and use it in Makefile - [x] drop gh-pages publish step in docs GitHub action - [x] update urls in code - [x] sdk and other files updates were from `make pre-commit -B` locally - [x] update gh-pages branch with meta tags to handle redirects argoproj#12212 - [x] update /hack script to use new mkdocs built-in validation (example result [here](https://github.com/argoproj/argo-workflows/actions/runs/7210935020/job/19645182282?pr=12360#step:6:148)) Signed-off-by: jmeridth <[email protected]> Co-authored-by: Tim Collins <[email protected]> Co-authored-by: Anton Gilgur <[email protected]>
Previously was argoproj#12212 and argoproj#12362 Relates to argoproj#12360 ### Motivation Change each GitHub page to utilize meta tag to redirect to new location on readthedocs Since we don't host our previous documentation we can't do a real HTTP redirect. Meta tag is the next best thing https://www.w3.org/TR/WCAG20-TECHS/H76.html ### Modifications - [x] setup redirects to [readthedocs](https://argo-workflows.readthedocs.io/en/latest/) + previus page suffix (once argoproj#12360 merges and builds) [Python script used to update the files](https://gist.github.com/jmeridth/94cd15d2b11d444fdf91913aa59f34ab) Signed-off-by: jmeridth <[email protected]>
Previously was argoproj#12212 and argoproj#12362 Relates to argoproj#12360 ### Motivation Change each GitHub page to utilize meta tag to redirect to new location on readthedocs Since we don't host our previous documentation we can't do a real HTTP redirect. Meta tag is the next best thing https://www.w3.org/TR/WCAG20-TECHS/H76.html ### Modifications - [x] setup redirects to [readthedocs](https://argo-workflows.readthedocs.io/en/latest/) + previus page suffix (once argoproj#12360 merges and builds) [Python script used to update the files](https://gist.github.com/jmeridth/94cd15d2b11d444fdf91913aa59f34ab) Signed-off-by: jmeridth <[email protected]>
Relates to #12211
Motivation
Clear gh-pages and setup redirect to ReadTheDocs so users can easily find the new versioned docs
Modifications
Verification