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

Update 1.14 to Hugo 0.57.2 #16151

Closed

Conversation

zacharysarah
Copy link
Contributor

This is the 1.14 version of #16104.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 30, 2019
@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Aug 30, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign zacharysarah
You can assign the PR to them by writing /assign @zacharysarah in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zacharysarah
Copy link
Contributor Author

Error: Error building site: "/opt/build/repo/content/en/docs/tutorials/clusters/apparmor.md:126:1": failed to render shortcode "capture": failed to process shortcode: "/opt/build/repo/layouts/shortcodes/code.html:14:16": execute of template failed: template: shortcodes/code.html:14:16: executing "shortcodes/code.html" at <readFile $filename>: error calling readFile: runtime error: invalid memory address or nil pointer dereference

shortcodes/code.html is identical in master and release-1.14.
/shrug

@k8s-ci-robot k8s-ci-robot added the ¯\_(ツ)_/¯ ¯\\\_(ツ)_/¯ label Aug 30, 2019
@kbhawkey
Copy link
Contributor

kbhawkey commented Aug 30, 2019

Error: Error building site: "/opt/build/repo/content/en/docs/tutorials/clusters/apparmor.md:126:1": failed to render shortcode "capture": failed to process shortcode: "/opt/build/repo/layouts/shortcodes/code.html:14:16": execute of template failed: template: shortcodes/code.html:14:16: executing "shortcodes/code.html" at <readFile $filename>: error calling readFile: runtime error: invalid memory address or nil pointer dereference

shortcodes/code.html is identical in master and release-1.14.
/shrug

hello @zacharysarah, I do not fully understand the problem, but that file has one code shortcode. Will the file compile if you remove the shortcode, or change the shortcode to codenew? Also, does the 0.57.2 version of hugo have an extended version (scss/sass ToCSS)?

@kbhawkey kbhawkey mentioned this pull request Sep 24, 2019
@aimeeu
Copy link
Contributor

aimeeu commented Sep 24, 2019

@zacharysarah

This compile error appears starting with Hugo v0.56.0, which had a lot of changes to the codebase.

In the 1.16 master website code, neither the code nor codenew shortcodes could find deny-write.profile, which was in the same directory as apparmor.md (I tried several different things). To compile without error in Hugo v0.56+, I created a new directory:
content/en/examples/tutorials/clusters

Then moved deny-write.profile from content/en/docs/tutorials/clusters to the new directory since codenew looks for files in examples.

Finally I changed content/en/docs/tutorials/clusters/apparmor.md line 181 to use the codenew shortcode:
{{< codenew language="text" file="tutorials/clusters/deny-write.profile" >}}

Replicating this in the release-1.14 branch eliminates the compile error. However, in PR #16531, tengq replaces the shortcode in L181 with the contents of the deny-write.profile file, so I think it would be easier to cherry pick that change to earlier branches.

However, part deux:
I'm now getting a different compile error with 1.14 and Hugo v0.57.2:
Error: Error building site: "/home/aimee/Dev/git/github.com/aimeeu/k8s/1.14/website/content/en/blog/_posts/2018-10-18-tips-for-first-kubecon-presentation-part-1.md:1:1": timed out initializing value. This is most likely a circular loop in a shortcode

The only shortcode in the blog post is {{< tweet >}}. This article explains under what circumstances the error is thrown and how to avoid it (increase timeout or store tweet json locally). Increasing the timeout value in config.toml eliminated the error on my local environment; most likely not needed in CI/CD environment. Now 1.14 compiles under Hugo 0.57.2. However, part 3: The blog R menu - the year doesn't expand/collapse when I click on it (Firefox 69, Chromium 76 on Ubuntu 18)

@zacharysarah
Copy link
Contributor Author

Closing/reopening this PR due to merge wonkiness.

@zacharysarah
Copy link
Contributor Author

/close

@k8s-ci-robot
Copy link
Contributor

@zacharysarah: Closed this PR.

In response to this:

/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.

k8s-ci-robot pushed a commit that referenced this pull request Oct 2, 2019
Modify apparmor.md and delete .profile to enable the site to
build with Hugo 0.57.2. Could not cherry pick PR 16531 because
the Korean translation was added in 1.14.
See also PRs #16104 and #16151.

zh/docs/reference/setup-tools/kubeadm/generated/README.md updated to fix
'invalid YAML delimiter' compile error caused by HTML comment.

Signed-off-by: Aimee Ukasick <aimeeu.opensource@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. ¯\_(ツ)_/¯ ¯\\\_(ツ)_/¯
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants