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

Create a Hugo layout to not display release information on older versions of k8s.io #29428

Closed
jimangel opened this issue Aug 17, 2021 · 19 comments · Fixed by #41370
Closed

Create a Hugo layout to not display release information on older versions of k8s.io #29428

jimangel opened this issue Aug 17, 2021 · 19 comments · Fixed by #41370
Assignees
Labels
area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/docs Categorizes an issue or PR as relevant to SIG Docs. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@jimangel
Copy link
Member

Problem

When a Kubernetes release happens, like 1.22, the now "old" site becomes a subdomain snapshot (ie: https://v1-21.docs.kubernetes.io/). This is great for archival purposes, however, if you navigate to the snapshot's release page (https://v1-21.docs.kubernetes.io/releases/) it is stuck at that point in time.

This problem exists because each older site is a branch. 1.21 is on the release-1.21 branch.

Solution

We should have a single source of truth (main) and all other subdomains should automatically point to the current documentation.

I would recommend adding a shortcode, much like we do to create the yellow box* on older pages.

image

Pointers

The yellow box shortcode exists on all versions and branches of k/website, but is contingent on a hugo configuration value (set here). For example:

The bit of code that actually generates the parameter is in the following layout partial:

{{ if (.Site.Param "deprecated") }}
<section id="deprecation-warning">
  <div class="content deprecation-warning">
    <h3>
      {{ T "deprecation_title" }} {{ .Param "version" }}
    </h3>
    <p> Kubernetes {{ .Param "version" }} {{ T "deprecation_warning" }}
      <a href="{{ site.Params.currentUrl }}">{{ T "latest_version" }}</a>
    </p>
  </div>
</section>
{{ end }}

The "T" before the value references using the translated strings that are localized in the relative language files. For example, the English translation is located here.

For more information on the releases page and how it's made, check out the PR: #27929

This is a well scoped issue, but maybe slightly more advanced for a first issue. I will mark it as such either way.

/sig docs
/good-first-issue

@jimangel jimangel added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 17, 2021
@k8s-ci-robot k8s-ci-robot added sig/docs Categorizes an issue or PR as relevant to SIG Docs. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 17, 2021
@jimangel
Copy link
Member Author

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 17, 2021
@Divya063
Copy link

I would like to work on this.
/assign

@sftim
Copy link
Contributor

sftim commented Aug 17, 2021

Would it be OK to redirect https://v1-21.docs.kubernetes.io/releases/ to https://kubernetes.io/releases/ ?

At the point we make a release we could commit in some extra redirects (for v1.21, that'd be retrospective).

@jimangel
Copy link
Member Author

Would it be OK to redirect https://v1-21.docs.kubernetes.io/releases/ to https://kubernetes.io/releases/ ?

I believe this would disrupt the assumed UX, "I thought I was on the 1.21 docs" or the subsequent navigation. In addition, baking it into a shortcode similar to deprecations, there is no additional work for the docs release team.

I think that would be a fine solution short term though.

@sftim
Copy link
Contributor

sftim commented Aug 18, 2021

We could use a Hugo layout rather than a shortcode for this. If we copy the way that the docs pages do that, I think that could work. Maybe with a tweak to say “release information” rather than “documentation”; maybe use shared wording but tweak it to be more neutral.

@jimangel
Copy link
Member Author

jimangel commented Aug 18, 2021

Sorry, for the noise, (I replied and deleted it) I thought this was a comment to a different issue.

If we use a layout, we're still in the same problem of the release data contained on the branch never getting touched, right?

@sftim
Copy link
Contributor

sftim commented Oct 16, 2021

/area web-development

@k8s-ci-robot k8s-ci-robot added the area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes label Oct 16, 2021
@sftim
Copy link
Contributor

sftim commented Oct 16, 2021

If we use a layout, we're still in the same problem of the release data contained on the branch never getting touched, right?

That layout can have a conditional, “is this the current release?” and skip rendering part of the page if the answer is false.
(The yellow deprecation warning is actually a layout not a shortcode)

/retitle Create a Hugo layout to not display release information on older versions of k8s.io

As this has confused two experienced contributors(!) I'll leave this marked as Help Wanted but not as a good first issue.
/remove-good-first-issue

@k8s-ci-robot k8s-ci-robot removed the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Oct 16, 2021
@k8s-ci-robot k8s-ci-robot changed the title Create a Hugo shortcode to not display release information on older versions of k8s.io Create a Hugo layout to not display release information on older versions of k8s.io Oct 16, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 14, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 13, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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/test-infra repository.

@sftim
Copy link
Contributor

sftim commented Mar 15, 2022

/reopen
I'd like to see this change happen.

@k8s-ci-robot k8s-ci-robot reopened this Mar 15, 2022
@k8s-ci-robot
Copy link
Contributor

@sftim: Reopened this issue.

In response to this:

/reopen
I'd like to see this change happen.

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/test-infra repository.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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/test-infra repository.

@sftim
Copy link
Contributor

sftim commented May 23, 2023

/reopen
/lifecycle frozen

@k8s-ci-robot
Copy link
Contributor

@sftim: Reopened this issue.

In response to this:

/reopen
/lifecycle frozen

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot reopened this May 23, 2023
@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels May 23, 2023
@dipesh-rawat
Copy link
Member

I'm happy to jump in and work on this issue to help move it forward.

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/docs Categorizes an issue or PR as relevant to SIG Docs. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
6 participants