-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Added Out-Of-Date Documentation Header for v1.24 #16457
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
base: release-1.24
Are you sure you want to change the base?
Conversation
Added a warning header to all docs pages warning user that this version is out-of-date with an option to go to /latest
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.
This branch is not served on any documentation site.
It will be - that's the point of the exercise. We will regenerate and re-copy the archives to the current site in order to get these changes to apply. |
Gotcha.. sorry.. I didn't know that was the plan. |
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.
Last fix requests left inline.
Will the lint ever pass? Don't think so, but it should never be a problem as this header is only added when building in archive mode.
The archive pages are not linted, so I think a mass update to those won't cause a problem.
Alternatively we can detect that we're in archive mode and disable link checking.
@dhawton for thoughts
layouts/_default/baseof.html
Outdated
<!-- Archived Documentation Header --> | ||
{{ $archiveVersion := "v1.24" }} |
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.
Not needed any more...
layouts/_default/baseof.html
Outdated
{{ if eq .Section "docs" }} | ||
<div class="archive-warning-banner" role="alert" |
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.
...but you do need a check that you're in archive mode (.Site.Data.args.archive
), else this will show up on latest and preliminary.
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.
I see. Then, we'll be able to copy/paste these changes to all applicable branches, and upon a new release, the header will change automatically. Smart.
layouts/_default/baseof.html
Outdated
style="background-color: #fff3cd; color: #664d03; padding: 1rem; border-bottom: 1px solid #ffecb5; text-align: center;"> | ||
<p style="margin-bottom: 0; margin-top: 0;">⚠️ This documentation is for an older version (<strong>{{ .Site.Data.args.version }}</strong>) and is no longer updated. |
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.
Please move all the styles into an assets/sass/misc/_archive.scss
and add an input for archive to assets/sass/_all.scss
layouts/_default/baseof.html
Outdated
<p>⚠️ This documentation is for an older version (<strong>{{ .Site.Data.args.version }}</strong>) and is no longer updated. | ||
<a href="/latest{{ .RelPermalink | safeURL }}">Read the latest version</a>.</p> |
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.
sorry for adding yet another hoop but perhaps we should internationalise this text?
Throw the strings in i18n/en.toml and use {{ i18n }}
to refer to them. (Plenty of examples to check; look at one that uses %s so you can leave the version part out)
Did you check what happens with this redirect when you're on an archive page that's non-English?
@sbegin0: The following test failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
@craigbox 🇺🇦 Ukrainian translation 👇 [archive_banner_text]
other = "⚠️ Це документація для (застарілої) версії (<strong>%s</strong>), яка вже не підтримується."
[archive_banner_link]
other = "Читати останню версію." |
Description
Added a warning header to all docs pages warning user that this version is out-of-date with an option to go to /latest
Reviewers