Skip to content

Commit 09c4872

Browse files
authored
Update to Hugo v112 API (#399)
`.Params.Get $key` has been deprecated; use `index .Params $key` instead. See gohugoio/hugo#10862 (comment)
1 parent bd013d2 commit 09c4872

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

layouts/partials/post_meta/project_meta.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<table>
44
{{ $meta_fields := (slice "homepage" "repository" "pypi" "libraries-io" "license" "license-type") }}
55
{{- range $attr := $meta_fields -}}
6-
{{ $val := $.Params.Get $attr }}
6+
{{ $val := index $.Params $attr }}
77
<tr class="field">
88
<td class="field-name">
99
{{ $attr | humanize }}:
@@ -22,7 +22,7 @@ <h1>Endorsed SPECs</h1>
2222
<ul class="endorsed-specs-list">
2323
{{- range $specs -}}
2424
{{ if not (in (lower .Title) "meta") }}
25-
{{ if in (.Params.Get "endorsed-by") $root.File.BaseFileName }}
25+
{{ if in ( index .Params "endorsed-by" ) $root.File.BaseFileName }}
2626
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
2727
{{- end }}
2828
{{- end }}

layouts/partials/post_meta/spec_meta.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<table>
55
{{ $meta_fields := (slice "author" "discussion" "history" "endorsed-by") }}
66
{{- range $attr := $meta_fields -}}
7-
{{ $val := $.Params.Get $attr }}
7+
{{ $val := index $.Params $attr }}
88
{{ $attr := strings.TrimPrefix "spec_" $attr }}
99
{{- if eq $attr "author" }}
1010
{{ $attr = "authors" }}

layouts/partials/specs/spec_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</a>
1414
</td>
1515
<td class="spec__status">
16-
{{- $endorsed_by := .Params.Get "endorsed-by" }}
16+
{{- $endorsed_by := index .Params "endorsed-by" }}
1717
{{- $N := len (or $endorsed_by "") }}
1818
{{- if ge $N 2 }}
1919
{{- range $idx, $el := $endorsed_by }}

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build.environment]
22
PYTHON_VERSION = "3.8" # netlify currently only support 2.7 and 3.8
3-
HUGO_VERSION = "0.111.3"
3+
HUGO_VERSION = "0.112.1"
44

55
[[plugins]]
66
package = "netlify-plugin-checklinks"

0 commit comments

Comments
 (0)