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

Upgrade 1.13 to Hugo 0.57.2 #16104

Merged
merged 2 commits into from
Oct 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion layouts/case-studies/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h3>{{ .Title }}</h3>
{{ $logo := .Resources.GetMatch "**logo*.png" }}
{{ $p := . }}
<a target="_blank" href="{{ with $p.Params.content_url }}{{ . | safeURL }}{{ else }}{{ .RelPermalink }}{{ end }}">{{ with $logo }}<img src="{{ .RelPermalink }}" alt="{{ $p.LinkTitle }}">{{ else }}
{{ errorf "Case Studies: Missing logo for %s. Put a PNG with the word 'logo' in the filename into %q" $p.LinkTitle $p.Dir }}
{{ errorf "Case Studies: Missing logo for %s. Put a PNG with the word 'logo' in the filename into %q" $p.LinkTitle $p.File.Dir }}
{{ end }}</a>
{{ end }}
<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/e/1FAIpQLScuI7Ye3VQHQTwBASrgkjQDSS5TP0g3AXfFhwSM9YpHgxRKFA/viewform" class="tell-your-story"><img src="/images/case_studies/story.png" alt="Tell your story"></a>
Expand Down
8 changes: 7 additions & 1 deletion layouts/docs/list.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{{ define "content" }}
{{ with .Content }}
{{ $hasContent := false }}
{{ with .File }}
{{ if ne .Filename "" }}
{{ $hasContent = (ge (len $.RawContent) 100) }}
{{ end }}
{{ end }}
{{ if $hasContent }}
{{ partial "docs/content-page" (dict "ctx" $ "page" $ ) }}
{{ else }}
{{ if ge (len .Pages) 1 }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/docs/top-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{ $menuSections := (where $docs.Sections ".Params.main_menu" true) }}
{{ range $menuSections }}
{{ if $p.IsDescendant . }}
<h1>{{ if not (strings.Contains .Dir "home")}}{{ .Params.bigheader | default .Title }}{{ end }}</h1>
<h1>{{ if not (strings.Contains .Path "home")}}{{ .Params.bigheader | default .Title }}{{ end }}</h1>
<h5>{{ .Params.abstract }}</h5>
{{ end }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/git-info.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{{ end }}
{{ end }}
{{ if not .Params.noedit }}
<a href="https://github.com/kubernetes/website/edit/master/content/{{ site.Language.Lang }}/{{ .File.Path }}" class="button issue">{{ T "main_edit_this_page" }}</a>
{{ if .File }}<a href="https://github.com/kubernetes/website/edit/master/content/{{ site.Language.Lang }}/{{ .File.Path }}" class="button issue">{{ T "main_edit_this_page" }}</a>{{ end }}
{{ end }}
</div>
{{ if and (not .Params.showcommit) $.GitInfo }}
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/templates/blocks.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{ .ctx.Scratch.Set "sections" slice }}
<ul id="markdown-toc">
{{ range .ctx.Scratch.Get "blocks" }}
{{ if .content }}
{{ $.ctx.Scratch.Set "section" .content }}
{{ else}}
{{ if .block }}
{{ $.ctx.Scratch.Set "section" (partial "templates/block" .) }}
{{ else}}
{{ $.ctx.Scratch.Set "section" .content }}
{{ end }}
{{ $section := $.ctx.Scratch.Get "section" }}
{{ $headers := findRE "<h2.*?>(.|\n)*?</h2>" $section }}
Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/capture.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ $_hugo_config := `{ "version": 1 }`}}
{{- $id := .Get 0 -}}
{{- if not $id -}}
{{- errorf "missing id in capture" -}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/shortcodes/code.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{{ $file := .Get "file" }}
{{ $codelang := .Get "language" | default (path.Ext $file | strings.TrimPrefix ".") }}
{{ $fileDir := path.Split $file }}
{{ $bundlePath := path.Join .Page.Dir $fileDir.Dir }}
{{ $filename := path.Join $p.Dir $file }}
{{ $bundlePath := path.Join .Page.File.Dir $fileDir.Dir }}
{{ $filename := path.Join $p.File.Dir $file }}
{{ $ghlink := printf "https://%s/blob/master/content/%s/%s" site.Params.githubwebsiterepo .Page.Lang $filename | safeURL }}
{{/* First assume this is a bundle and the file is inside it. */}}
{{ $resource := $p.Resources.GetMatch (printf "%s*" $file ) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/codenew.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{ $file := .Get "file" }}
{{ $codelang := .Get "language" | default (path.Ext $file | strings.TrimPrefix ".") }}
{{ $fileDir := path.Split $file }}
{{ $bundlePath := path.Join .Page.Dir $fileDir.Dir }}
{{ $bundlePath := path.Join .Page.File.Dir $fileDir.Dir }}
{{ $filename := printf "/content/%s/examples/%s" .Page.Lang $file | safeURL }}
{{ $ghlink := printf "https://%s/master%s" site.Params.githubwebsiteraw $filename | safeURL }}
{{/* First assume this is a bundle and the file is inside it. */}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/include.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{- .Content | safeHTML -}}
{{- else -}}
{{/* It is not a resource in the includes bundle. Try to find the page relative to the current. */}}
{{- $path := path.Join $.Page.Dir $name -}}
{{- $path := path.Join $.Page.File.Dir $name -}}
{{- $page := site.GetPage "page" $path -}}
{{- with $page }}
{{ .Content }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{{ end }}
{{ end }}
{{ else}}
{{ $path := path.Join $.Page.Dir .include }}
{{ $path := path.Join $.Page.File.Dir .include }}
{{ $page := site.GetPage "page" $path }}
{{ with $page }}
{{ .Content }}
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ functions = "functions"
command = "make non-production-build"

[build.environment]
HUGO_VERSION = "0.53"
HUGO_VERSION = "0.57.2"

[context.production.environment]
HUGO_BASEURL = "https://kubernetes.io/"
Expand Down