-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Only redirect to current API docs on current site #53145
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: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retitle Only redirect to current API docs on current site |
e352696 to
24b71e3
Compare
layouts/index.redirects
Outdated
| ############################################### | ||
|
|
||
| {{/* Omit "latest" redirect for old versions of the docs */}} | ||
| {{- if not ( index .Site.params "deprecated" ) -}} |
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.
Looks like the build is failing with following error:
12:42:33 AM: Error: error building site: render: failed to render pages: render of "home" failed: "/opt/build/repo/layouts/index.redirects:9:24": execute of template failed: template: index.redirects:9:24: executing "index.redirects" at <.Site.params>: can't evaluate field params in type page.Site
Suggested a potential fix below to see if they help with the error.
| {{- if not ( index .Site.params "deprecated" ) -}} | |
| {{- if not .Site.Params.deprecated -}} |
Rather than have every older documentation site serve a redirect to the current API docs, just do it for https://kubernetes.io/
24b71e3 to
10811d9
Compare
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
dipesh-rawat
left a comment
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.
/lgtm
|
LGTM label has been added. Git tree hash: 55509a072b22d6c119ca2b087a673064dd132f4f
|
Rather than have every older documentation site serve a redirect to the current single-page API reference, just do it for https://kubernetes.io/
Here's a preview.
Examples:
/area web-development
Follow-up tweak to PR #52591
@Caesarsage FYI