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: Update GitHub pages to redirect to readthedocs #12362

Closed

Conversation

jmeridth
Copy link
Member

@jmeridth jmeridth commented Dec 14, 2023

Previously was #12212

Relates to #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

Python script used to update the files

@juliev0
Copy link
Contributor

juliev0 commented Dec 15, 2023

so, is it through these html files that people will mainly be getting to the documentation now? or only in the case that they're looking for a specific version of the documentation, and if not through a redirect from https://argoproj.github.io/argo-workflows?

@juliev0
Copy link
Contributor

juliev0 commented Dec 15, 2023

so, is it through these html files that people will mainly be getting to the documentation now? or only in the case that they're looking for a specific version of the documentation, and if not through a redirect from https://argoproj.github.io/argo-workflows?

Actually, I guess the redirect takes one to "stable" - so that implies that if someone navigated to one of these files within a given Github release tag, they would not be redirected to readthedocs for that version, right?

@jmeridth
Copy link
Member Author

@juliev0 these redirects will ensure people get to the new docs location and to the files they had old links to. Great catch on stable vs latest. Links fixed. By redirecting users to latest (which is what we will set main readthedocs builds to), they will have the same effect users had previously.

@jmeridth jmeridth marked this pull request as ready for review December 18, 2023 15:01
@juliev0
Copy link
Contributor

juliev0 commented Dec 18, 2023

@juliev0 these redirects will ensure people get to the new docs location and to the files they had old links to. Great catch on stable vs latest. Links fixed. By redirecting users to latest (which is what we will set main readthedocs builds to), they will have the same effect users had previously.

So, it looks like we no longer publish to https://argoproj.github.io/argo-workflows? Will there be any redirect from there or no?

@juliev0
Copy link
Contributor

juliev0 commented Dec 19, 2023

@juliev0 these redirects will ensure people get to the new docs location and to the files they had old links to. Great catch on stable vs latest. Links fixed. By redirecting users to latest (which is what we will set main readthedocs builds to), they will have the same effect users had previously.

So, it looks like we no longer publish to https://argoproj.github.io/argo-workflows? Will there be any redirect from there or no?

Oh, never mind. These index.html pages are still being published to https://argoproj.github.io/argo-workflows, aren't they?

@jmeridth
Copy link
Member Author

@juliev0 yes, they'd replace the github pages and still be published.

@jmeridth jmeridth force-pushed the jm-update-gh-pages-with-meta-tags branch from 448f5b3 to 809c1f4 Compare December 19, 2023 17:11
@juliev0
Copy link
Contributor

juliev0 commented Dec 19, 2023

Let me know if this is an unreasonable request, but would it make any sense to attach the script you used to make the change as something that could be reviewed instead of trying to review all of the docs?

@jmeridth jmeridth force-pushed the jm-update-gh-pages-with-meta-tags branch from 809c1f4 to b79ba30 Compare December 20, 2023 20:27
@jmeridth
Copy link
Member Author

jmeridth commented Dec 20, 2023

@juliev0 https://gist.github.com/jmeridth/94cd15d2b11d444fdf91913aa59f34ab (please don't judge 😉, was written in under an hour)

Copy link
Contributor

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

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

Thanks for modifying these all! Looks like you got nearly everything; I was checking for subdirs in particular and you got all the ones I checked.

I left a few comments in-line for some improvements and/or missing pieces

CONTRIBUTING/index.html Outdated Show resolved Hide resolved
CONTRIBUTING/index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
CONTRIBUTING/index.html Outdated Show resolved Hide resolved
@agilgur5 agilgur5 added the area/docs Incorrect, missing, or mistakes in docs label Dec 20, 2023
@jmeridth jmeridth force-pushed the jm-update-gh-pages-with-meta-tags branch from b79ba30 to 6aec673 Compare December 20, 2023 22:09
@jmeridth
Copy link
Member Author

jmeridth commented Dec 20, 2023

@agilgur5 as these updates are generated from my script (updated with your latest suggestions), I am running locally and pushing. Don't mean to not give credit for the contributions, suggestions. You cool with me adding you as a co-author?

@agilgur5
Copy link
Contributor

agilgur5 commented Dec 20, 2023

nbd, I don't really mind either way. thanks for asking though!

@juliev0
Copy link
Contributor

juliev0 commented Dec 20, 2023

@juliev0 https://gist.github.com/jmeridth/94cd15d2b11d444fdf91913aa59f34ab (please don't judge 😉, was written in under an hour)

Really appreciate your doing that, even though I know it's an unusual request!

@jmeridth jmeridth force-pushed the jm-update-gh-pages-with-meta-tags branch 4 times, most recently from e17fcd7 to e10cd7e Compare December 21, 2023 08:45
jmeridth added a commit to jmeridth/argo-workflows that referenced this pull request Dec 21, 2023
This prevents overwriting of the redirect pages we will have
in gh-pages branch now due to argoproj#12362

Signed-off-by: jmeridth <[email protected]>
@jmeridth jmeridth force-pushed the jm-update-gh-pages-with-meta-tags branch from e10cd7e to 40f106f Compare December 21, 2023 16:40
@jmeridth jmeridth self-assigned this Dec 21, 2023
Copy link
Contributor

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

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

Two small corrections, otherwise LGTM

404.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@jmeridth jmeridth force-pushed the jm-update-gh-pages-with-meta-tags branch from ec52a01 to 1173728 Compare December 24, 2023 23:21
Copy link
Contributor

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for automating all the redirects and iterating on this!

@agilgur5
Copy link
Contributor

agilgur5 commented Dec 28, 2023

One tiny thing I noticed, that I don't think we can really do much about, is that URL anchor will be lost in the redirect. I.e. if you had some-link#some-section, the anchor #some-section will be lost.

But adding the anchor requires front-end JS or back-end logic. We have no back-end in GH Pages and the meta redirect is the closest thing, but can't pick up arbitrary anchors in the URL.
A really wacky workaround may be to use JS to insert a meta tag into the page, but idk if that will work properly.

EDIT: interestingly, the mkdocs-redirects plugin uses both a meta tag and a JS script. See #12501

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.

Did you mean to mark this as ready for review?

@jmeridth
Copy link
Member Author

Did you mean to mark this as ready for review?

Yes for review but #12360 has to merge first. I'm ready to move on both.

@jmeridth jmeridth closed this Jan 2, 2024
@jmeridth jmeridth force-pushed the jm-update-gh-pages-with-meta-tags branch from 1173728 to 853b544 Compare January 2, 2024 19:21
@jmeridth
Copy link
Member Author

jmeridth commented Jan 2, 2024

Don't know why this closed. @terrytangyuan are you able to reopen?

@terrytangyuan
Copy link
Member

terrytangyuan commented Jan 2, 2024

Did you recreate the branch with the same name and force pushed? That might be why. Not 100% sure though.

@terrytangyuan
Copy link
Member

terrytangyuan commented Jan 2, 2024

I cannot re-open it somehow

@jmeridth
Copy link
Member Author

jmeridth commented Jan 2, 2024

Did you recreate the branch with the same name and force pushed? That might be why. Not 100% sure though.

Yeah, had to. Let me see if I can do it the other way. One sec.

@jmeridth
Copy link
Member Author

jmeridth commented Jan 2, 2024

New PR it is then. Dang it. Sorry.

@jmeridth jmeridth deleted the jm-update-gh-pages-with-meta-tags branch January 2, 2024 19:27
@jmeridth jmeridth restored the jm-update-gh-pages-with-meta-tags branch January 2, 2024 19:27
@jmeridth jmeridth deleted the jm-update-gh-pages-with-meta-tags branch January 2, 2024 19:30
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]>
@jmeridth
Copy link
Member Author

jmeridth commented Jan 3, 2024

Replaced by #12443

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.

4 participants