kubernetes / contributor-site

Code for kubernetes.dev
https://www.kubernetes.dev
Apache License 2.0
66 stars 148 forks source link

Bump Hugo version to 0.112 #374

Closed sftim closed 1 year ago

sftim commented 1 year ago

Bump Hugo version to ~0.110~ 0.112 (preview).

There is build-time warning:

.Path when the page is backed by a file is deprecated and will be removed in a future release. We plan to use Path for a canonical source path and you probably want to check the source is a file. To get the current behaviour, you can use a construct similar to the one below:

  {{ $path := "" }}
  {{ with .File }}
    {{ $path = .Path }}
  {{ else }}
    {{ $path = .Path }}
  {{ end }}

Also, update local preview using a container image (copy approach from k/website Makefile). The container image now mounts this Git repo read-only.

Helps with https://github.com/kubernetes/contributor-site/issues/360

k8s-ci-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sftim

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: - ~~[OWNERS](https://github.com/kubernetes/contributor-site/blob/master/OWNERS)~~ [sftim] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
mrbobbytables commented 1 year ago

/hold This does break the site a bit - take a look at the side menu on the preview vs the actual site: https://deploy-preview-374--kubernetes-contributor.netlify.app/docs/ https://kubernetes.dev/docs/

jberkus commented 1 year ago

@sftim so the issue is the preview rather than the Hugo version?

sftim commented 1 year ago

I think there is a real problem here; it's harder to see what that is because my local preview is - right now - missing the generated content either way.

We shouldn't merge this change as-is.

PR https://github.com/kubernetes/contributor-site/pull/375 may help us to find a newer Hugo version that nonetheless works OK, and that find may then help us spot what to change so that we can upgrade further.

sftim commented 1 year ago

We can work around the Hugo problem by setting GOMAXPROCS to 1

sftim commented 1 year ago

I think this is good to unhold - check the site, it looks right with the latest fixes.

We can remove those once a separate PR updates Docsy.

cblecker commented 1 year ago

This seems fine. Clicked around the preview a bunch and it looks good.

/lgtm

sftim commented 1 year ago

Thanks

/hold cancel

fsmunoz commented 1 year ago

FWIW I've compared things side-by-side and didn't find any different, looks good.