-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Match API reference to version of Kubernetes we're documenting #25552
Match API reference to version of Kubernetes we're documenting #25552
Conversation
@kbhawkey do you think this is an appropriate fix? Also, @zacharysarah I'd welcome your thoughts as you know the historical context here. |
Deploy preview for kubernetes-io-master-staging ready! Built with commit 7727cce https://deploy-preview-25552--kubernetes-io-master-staging.netlify.app |
@sftim The implementation looks solid in concept. I do notice that the "v" is already baked into the variable value. https://5fd2ad7d6be32500089fbd14--kubernetes-io-master-staging.netlify.app/docs/reference/ |
content/en/docs/reference/_index.md
Outdated
@@ -18,7 +18,7 @@ This section of the Kubernetes documentation contains references. | |||
|
|||
## API Reference | |||
|
|||
* [Kubernetes API Reference {{< latest-version >}}](/docs/reference/generated/kubernetes-api/{{< latest-version >}}/) | |||
* [API Reference for Kubernetes v{{< param "version" >}}](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/) |
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 think version
and latest
variables are equivalent?
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.
IMO, version
is the right param in this context.
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.
Interesting. I looked at the previous configurations from 1.14 to 1.20.
Need to track down where the shortcode is used to set the current or latest version.
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.
Seems like v1.19, v1.18, v1.17 use the latest
parameter to generated the API reference links.
I've opened PRs to modify the latest
parameter to the deprecated version in these snapshots.
I agree that "version" makes more sense in this context.
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'd expect that latest
evaluated to the most recent released Kubernetes version, whatever documentation version you're looking at, whereas version
evaluates to the version number for the documentation you are viewing.
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.
Yes, though, how is this parameter used in the context of a deprecated version?
/lgtm |
LGTM label has been added. Git tree hash: bc63cbf6abba52be5681915026bf1ac72d0a3052
|
@sftim . The change looks good: |
Note: |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kbhawkey The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I'll PR a backport. |
I may have covered these changes in my recent PRs. |
Once backported appropriately, this could be a fix for issue #25548