diff --git a/Makefile b/Makefile index 53f6857350b29..cfa69df40cb43 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ DOCKER = docker -HUGO_VERSION = 0.52 +HUGO_VERSION = 0.53 DOCKER_IMAGE = kubernetes-hugo DOCKER_RUN = $(DOCKER) run --rm --interactive --tty --volume $(CURDIR):/src NODE_BIN = node_modules/.bin diff --git a/layouts/blog/baseof.html b/layouts/blog/baseof.html index 6ed37875c76f7..ebb537d6293f8 100644 --- a/layouts/blog/baseof.html +++ b/layouts/blog/baseof.html @@ -18,8 +18,8 @@

{{ .Title }}

- {{ with .Site.Home.OutputFormats.Get "rss" -}} - + {{ with site.Home.OutputFormats.Get "rss" -}} + {{ end -}} @Kubernetesio diff --git a/layouts/blog/list.html b/layouts/blog/list.html index 2f199a64430c0..a0b558d8275fc 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -1,6 +1,6 @@ {{ define "main" }} {{ $pages := ($.Paginator 1).Pages }} - {{ with $.Site.Params.language_alternatives }} + {{ with site.Params.language_alternatives }} {{ range . }} {{ with (where $.Translations ".Lang" . ) }} {{ $p := index . 0 }} diff --git a/layouts/blog/post.html b/layouts/blog/post.html index 2f65c973f9661..cd07c5395d150 100644 --- a/layouts/blog/post.html +++ b/layouts/blog/post.html @@ -1,3 +1,3 @@ -

{{ .Date.Format .Site.Params.time_format_blog }}

+

{{ .Date.Format site.Params.time_format_blog }}

{{ .Title }}

{{ .Content }} diff --git a/layouts/case-studies/list.html b/layouts/case-studies/list.html index 91f4fd63f9061..7998cf5c0b654 100644 --- a/layouts/case-studies/list.html +++ b/layouts/case-studies/list.html @@ -1,6 +1,6 @@ {{ define "main" }} {{ $pages := .Pages }} -{{ with $.Site.Params.language_alternatives }} +{{ with site.Params.language_alternatives }} {{ range . }} {{ with (where $.Translations ".Lang" . ) }} {{ $p := index . 0 }} @@ -65,4 +65,4 @@

{{ .Title }}

"{{ .page.Params.quote | html }}"

{{ T "main_read_about"}} {{ .page.LinkTitle }}
-{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/docs/docsportal_home.html b/layouts/docs/docsportal_home.html index 1806aab2e339d..cfa922972362d 100644 --- a/layouts/docs/docsportal_home.html +++ b/layouts/docs/docsportal_home.html @@ -38,7 +38,7 @@

Understand the basics

Try Kubernetes

- +

Follow tutorials to learn how to deploy applications in Kubernetes.


diff --git a/layouts/partials/docs/top-menu.html b/layouts/partials/docs/top-menu.html index 72f8ecb179824..452cf8bec098d 100644 --- a/layouts/partials/docs/top-menu.html +++ b/layouts/partials/docs/top-menu.html @@ -1,6 +1,6 @@ {{ $p := . }} -{{ $home := .Site.Home }} -{{ $docs := .Site.GetPage "section" "docs" }} +{{ $home := site.Home }} +{{ $docs := site.GetPage "section" "docs" }} {{ $menuSections := (where $docs.Sections ".Params.main_menu" true) }} {{ range $menuSections }} {{ if $p.IsDescendant . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index a4f98ca929d9e..80644377faad6 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,10 +1,10 @@
diff --git a/layouts/partials/git-info.html b/layouts/partials/git-info.html index ce16c7fb8c4ab..40dcab847ce13 100644 --- a/layouts/partials/git-info.html +++ b/layouts/partials/git-info.html @@ -19,7 +19,7 @@ {{ end }} {{ end }} {{ if not .Params.noedit }} - {{ T "main_edit_this_page" }} + {{ T "main_edit_this_page" }} {{ end }} {{ if and (not .Params.showcommit) $.GitInfo }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 270ac7e4ab114..20b088579eafc 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -10,7 +10,7 @@ gtag('config', 'UA-36037335-10'); -{{ if .Title }}{{ .Title }} - {{ end }}{{ .Site.Title }} +{{ if .Title }}{{ .Title }} - {{ end }}{{ site.Title }} {{ partial "css.html" . }} @@ -23,7 +23,7 @@ - + {{ if $isBlogPost }} {{ with findRE "" .Content 1 }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 7a977cad7d69e..c4bf99718ac59 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,16 +1,16 @@
- + diff --git a/layouts/partials/tree.html b/layouts/partials/tree.html index 0bd5a2b109e84..568f5e40278f6 100644 --- a/layouts/partials/tree.html +++ b/layouts/partials/tree.html @@ -2,7 +2,7 @@ {{ template "section-tree-nav" (dict "ctx" . "section" .) }} {{ define "section-tree-nav" }} {{ $pages := (union .section.Pages .section.Sections) }} - {{ with $.ctx.Site.Params.language_alternatives }} + {{ with site.Params.language_alternatives }} {{ range . }} {{ with (where $.section.Translations ".Lang" . ) }} {{ $p := index . 0 }} @@ -34,4 +34,4 @@ {{ define "section-tree-nav-page" }} {{ $isForeignLanguage := (ne .page.Lang $.ctx.Lang)}} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/shortcodes/blocks/__common.html b/layouts/shortcodes/blocks/__common.html index b64a53dafc601..4a395a77cfe76 100644 --- a/layouts/shortcodes/blocks/__common.html +++ b/layouts/shortcodes/blocks/__common.html @@ -1,7 +1,7 @@ {{/* This file contains some common template definitions used in the blocks shortcodes. The reasoning behind the long and hard-to-remember template names is that these templates are global. */}} {{ define "shortcodes-blocks_getimage" }} -{{- $cr := .ctx.Site.GetPage "/_common-resources" -}} +{{- $cr := site.GetPage "/_common-resources" -}} {{- with $cr -}} {{- $image := $cr.Resources.GetMatch (printf "images/**%s*" $.name ) -}} {{- with $image -}} @@ -12,4 +12,4 @@ {{- else -}} {{ errorf "[%s] No resource bundle found. Create an empty headless bundle; create content/%s/_common-resources/index.md with \"headless: true\" in front matter. See https://gohugo.io/content-management/page-bundles/#headless-bundle" $.ctx.Page.Lang $.ctx.Page.Lang }} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/layouts/shortcodes/blocks/case-studies.html b/layouts/shortcodes/blocks/case-studies.html index 4c26ebe55169c..8e1d6dd12e202 100644 --- a/layouts/shortcodes/blocks/case-studies.html +++ b/layouts/shortcodes/blocks/case-studies.html @@ -1,4 +1,4 @@ -{{ $caseStudiesSection := .Site.GetPage "case-studies" }} +{{ $caseStudiesSection := site.GetPage "case-studies" }} {{ if not $caseStudiesSection }} {{ errorf "[%s] No case-studies section found. Create content/%s/case-studies/_index.md" $.Page.Lang $.Page.Lang }} {{ else }} @@ -19,4 +19,4 @@

{{ $caseStudiesSection.Title }}

{{ $caseStudiesSection.LinkTitle }}
-{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/shortcodes/blocks/kubernetes-features.html b/layouts/shortcodes/blocks/kubernetes-features.html index 58aa9109a18ce..03e446b539958 100644 --- a/layouts/shortcodes/blocks/kubernetes-features.html +++ b/layouts/shortcodes/blocks/kubernetes-features.html @@ -17,7 +17,7 @@

{{ T "main_kubernetes_features" }}

- {{ $pages := where .Site.Pages ".Params.feature" "!=" nil }} + {{ $pages := where site.Pages ".Params.feature" "!=" nil }} {{range $i, $p := $pages }} {{ if and (gt $i 0) (modBool $i 2) }}{{ end }} {{ if modBool $i 2 }} @@ -33,4 +33,4 @@

diff --git a/layouts/shortcodes/codenew.html b/layouts/shortcodes/codenew.html index 80a1d5017f2b0..95d24d69d9106 100644 --- a/layouts/shortcodes/codenew.html +++ b/layouts/shortcodes/codenew.html @@ -4,7 +4,7 @@ {{ $fileDir := path.Split $file }} {{ $bundlePath := path.Join .Page.Dir $fileDir.Dir }} {{ $filename := printf "/content/%s/examples/%s" .Page.Lang $file | safeURL }} -{{ $ghlink := printf "https://%s/master%s" .Page.Site.Params.githubWebsiteRaw $filename | safeURL }} +{{ $ghlink := printf "https://%s/master%s" site.Params.githubWebsiteRaw $filename | safeURL }} {{/* First assume this is a bundle and the file is inside it. */}} {{ $resource := $p.Resources.GetMatch (printf "%s*" $file ) }} {{ with $resource }} @@ -15,7 +15,7 @@ {{ with $resource }}{{ $.Scratch.Set "content" . }}{{ end }} {{ end }} {{ if not ($.Scratch.Get "content") }} -{{ errorf "[%s] %q not found in %q" $p.Site.Language.Lang $fileDir.File $bundlePath }} +{{ errorf "[%s] %q not found in %q" site.Language.Lang $fileDir.File $bundlePath }} {{ end }} {{ with $.Scratch.Get "content" }} diff --git a/layouts/shortcodes/deprecationwarning.html b/layouts/shortcodes/deprecationwarning.html index a3975386e5f1e..2a9d2e083ebf1 100644 --- a/layouts/shortcodes/deprecationwarning.html +++ b/layouts/shortcodes/deprecationwarning.html @@ -4,7 +4,7 @@

Documentation for Kubernetes {{ .Page.Param "version" }} is no longer actively maintained. The version you are currently viewing is a static snapshot. - For up-to-date documentation, see the latest version. + For up-to-date documentation, see the latest version.

diff --git a/layouts/shortcodes/glossary_definition.html b/layouts/shortcodes/glossary_definition.html index 67b9ecf9b403c..4b94c2240204d 100644 --- a/layouts/shortcodes/glossary_definition.html +++ b/layouts/shortcodes/glossary_definition.html @@ -2,11 +2,11 @@ {{- $id := .Get "term_id" -}} {{- $length := .Get "length" -}} {{- $prepend := .Get "prepend" }} -{{- $glossaryBundle := .Site.GetPage "page" "docs/reference/glossary" -}} +{{- $glossaryBundle := site.GetPage "page" "docs/reference/glossary" -}} {{- $glossaryItems := $glossaryBundle.Resources.ByType "page" -}} {{- $term_info := $glossaryItems.GetMatch (printf "%s*" $id ) -}} {{- if not $term_info -}} -{{- errorf "[%s] %q: %q is not a valid glossary term_id, see ./docs/reference/glossary/* for a full list" .Page.Site.Language.Lang .Page.Path $id -}} +{{- errorf "[%s] %q: %q is not a valid glossary term_id, see ./docs/reference/glossary/* for a full list" site.Language.Lang .Page.Path $id -}} {{- end -}} {{- with $term_info -}} {{- if (strings.Contains "short" $length) -}} @@ -26,4 +26,4 @@ {{- replace . $firstPara $prepended | safeHTML -}}{{ else }}{{- . -}}{{ end -}} {{- end -}} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/layouts/shortcodes/glossary_tooltip.html b/layouts/shortcodes/glossary_tooltip.html index 2af40e26453f5..01385fa0522a2 100644 --- a/layouts/shortcodes/glossary_tooltip.html +++ b/layouts/shortcodes/glossary_tooltip.html @@ -3,11 +3,11 @@ {{- partial "docs/glossary-terms.html" $.Page -}} {{- $glossary_items := $.Page.Scratch.Get "glossary_items" -}} {{- if not $glossary_items -}} -{{- errorf "[%s] No glossary items found" .Page.Site.Language.Lang -}} +{{- errorf "[%s] No glossary items found" site.Language.Lang -}} {{- else -}} {{- $term_info := $glossary_items.GetMatch (printf "%s*" $id ) -}} {{- if not $term_info -}} -{{- errorf "[%s] %q: %q is not a valid glossary term_id, see ./docs/reference/glossary/* for a full list" .Page.Site.Language.Lang .Page.Path $id -}} +{{- errorf "[%s] %q: %q is not a valid glossary term_id, see ./docs/reference/glossary/* for a full list" site.Language.Lang .Page.Path $id -}} {{- end }} {{- with $term_info -}} {{- $text := $text | default $term_info.Title -}} diff --git a/layouts/shortcodes/include.html b/layouts/shortcodes/include.html index 12bc65b09c733..01462ec64c43e 100644 --- a/layouts/shortcodes/include.html +++ b/layouts/shortcodes/include.html @@ -1,7 +1,7 @@ {{/* This will try to find a resource in the "includes" bundle */}} {{- $name := .Get 0 -}} {{- if $name -}} - {{- $bundle := $.Site.GetPage "page" "includes" -}} + {{- $bundle := site.GetPage "page" "includes" -}} {{- with $bundle -}} {{- $pattern := printf "%s*" $name -}} {{- range $bundle.Resources -}} @@ -12,7 +12,7 @@ {{- 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 -}} - {{- $page := $.Page.Site.GetPage "page" $path -}} + {{- $page := site.GetPage "page" $path -}} {{- with $page }} {{ .Content }} {{- else -}} diff --git a/layouts/shortcodes/latest-version.html b/layouts/shortcodes/latest-version.html index 346c2e54ee3b4..ece9e21df74b5 100644 --- a/layouts/shortcodes/latest-version.html +++ b/layouts/shortcodes/latest-version.html @@ -1 +1 @@ -{{ .Site.Params.latest }} \ No newline at end of file +{{ site.Params.latest }} diff --git a/layouts/shortcodes/reference_docs.html b/layouts/shortcodes/reference_docs.html index 0507355eeecaf..f95a7fc3747a6 100644 --- a/layouts/shortcodes/reference_docs.html +++ b/layouts/shortcodes/reference_docs.html @@ -1 +1 @@ -API reference docs \ No newline at end of file +API reference docs diff --git a/layouts/shortcodes/release-branch.html b/layouts/shortcodes/release-branch.html index 8a18dbad5a139..7c760ebebf84a 100644 --- a/layouts/shortcodes/release-branch.html +++ b/layouts/shortcodes/release-branch.html @@ -1,3 +1,3 @@ -{{- $latestVersion := .Site.Params.latest }} +{{- $latestVersion := site.Params.latest }} {{- $latestReleaseBranch := printf "release-%s" (replace $latestVersion "v" "") }} -{{- $latestReleaseBranch }} \ No newline at end of file +{{- $latestReleaseBranch }} diff --git a/layouts/shortcodes/tab.html b/layouts/shortcodes/tab.html index a169c76f3262b..4db7465af9c29 100644 --- a/layouts/shortcodes/tab.html +++ b/layouts/shortcodes/tab.html @@ -15,5 +15,5 @@ {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "include" $include "codelang" $codelang) }} {{ end }} {{ else }} - {{- errorf "[%s] %q: tab shortcode missing its parent" .Page.Site.Language.Lang .Page.Path -}} -{{ end}} \ No newline at end of file + {{- errorf "[%s] %q: tab shortcode missing its parent" site.Language.Lang .Page.Path -}} +{{ end}} diff --git a/layouts/shortcodes/tabs.html b/layouts/shortcodes/tabs.html index 521a404246e2d..8d2eda0aeed66 100644 --- a/layouts/shortcodes/tabs.html +++ b/layouts/shortcodes/tabs.html @@ -28,11 +28,11 @@ {{ end }} {{ else}} {{ $path := path.Join $.Page.Dir .include }} - {{ $page := $.Page.Site.GetPage "page" $path }} + {{ $page := site.GetPage "page" $path }} {{ with $page }} {{ .Content }} {{ else }} - {{ errorf "[%s] tabs include not found for path %q" $.Page.Site.Language.Lang $path}} + {{ errorf "[%s] tabs include not found for path %q" site.Language.Lang $path}} {{ end }} {{ end }} {{ end }} diff --git a/netlify.toml b/netlify.toml index 02e68053017c1..b0fee252cae5a 100644 --- a/netlify.toml +++ b/netlify.toml @@ -7,7 +7,7 @@ functions = "functions" command = "make non-production-build" [build.environment] -HUGO_VERSION = "0.52" +HUGO_VERSION = "0.53" [context.production.environment] HUGO_BASEURL = "https://kubernetes.io/"