Skip to content
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

Closed

Conversation

jmeridth
Copy link
Member

@jmeridth jmeridth commented Nov 16, 2023

Relates to #12211

Motivation

Clear gh-pages and setup redirect to ReadTheDocs so users can easily find the new versioned docs

Modifications

Verification

@jmeridth
Copy link
Member Author

jmeridth commented Nov 16, 2023

I'm up for an auto-redirect solution also (javascript or .htaccess). This solution is SEO friendly but not automated. wdyt?

@tico24
Copy link
Member

tico24 commented Nov 16, 2023

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]>
@jmeridth jmeridth force-pushed the jm-readthedocs-ghpages-replace branch from d698fed to f76723f Compare November 16, 2023 08:16
@agilgur5
Copy link
Contributor

agilgur5 commented Nov 16, 2023

I'm up for an auto-redirect solution also (javascript or .htaccess). This solution is SEO friendly but not automated. wdyt?

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.
Docs are a knowledge base; breaking links to your knowledge base means breaking part of your knowledge.

We should have proper back-end redirects for all the current docs pages.

Although "ugh", this is probably the nicer way to do things for the long term rather than throwing an automated solution in.

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

@agilgur5 agilgur5 added the area/docs Incorrect, missing, or mistakes in docs label Nov 16, 2023
@Joibel
Copy link
Member

Joibel commented Nov 16, 2023

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.

Copy link
Member

@terrytangyuan terrytangyuan left a 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.

@agilgur5
Copy link
Contributor

agilgur5 commented Nov 17, 2023

This isn't exactly what @agilgur5 is after

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).
The meta elements attempt to replicate the semantics, and so are closer. They also make more sense for SEO.

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.

but is probably a decent workaround rather than having hundreds of individual redirects.

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.
This is a one-time effort, and so I think it is well worth the extra effort given the 6+ years of links that will be permanently impacted.

@jmeridth
Copy link
Member Author

@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.

@jmeridth
Copy link
Member Author

Will fix conflicts also

@agilgur5
Copy link
Contributor

agilgur5 commented Nov 21, 2023

Going to try the GitHub pages external-sites.json file and see if that results in what we want.

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

@jmeridth
Copy link
Member Author

jmeridth commented Dec 4, 2023

Closing temporarily to prevent workflows from firing. Testing in my fork. Will reopen once satisfied.

@jmeridth jmeridth closed this Dec 4, 2023
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 14, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 14, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 14, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 14, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 14, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 14, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 14, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 14, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 15, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 18, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 19, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 20, 2023
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]>
@agilgur5
Copy link
Contributor

Replaced by #12362

jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 27, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 27, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 28, 2023
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Jan 2, 2024
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]>
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Jan 2, 2024
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]>
@agilgur5 agilgur5 added the solution/superseded This PR or issue has been superseded by another one (slightly different from a duplicate) label Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Incorrect, missing, or mistakes in docs solution/superseded This PR or issue has been superseded by another one (slightly different from a duplicate)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants