diff --git a/layouts/partials/opengraph/opengraph.html b/layouts/partials/opengraph/opengraph.html
index 1c89b0814..e32e07298 100644
--- a/layouts/partials/opengraph/opengraph.html
+++ b/layouts/partials/opengraph/opengraph.html
@@ -1,4 +1,4 @@
-
+
+ {{ end }}">
-
+ {{ end }}">
+
{{- with $.Params.images -}}
{{- range first 6 . }}
-
+
{{ end -}}
{{- else -}}
{{- $featured := partial "opengraph/get-featured-image.html" . }}
{{- with $featured -}}
-
+
{{- else -}}
{{- with $.Site.Params.images }}
-
+
{{ end -}}
{{- end -}}
{{- end -}}
{{- if .IsPage }}
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
-
+
{{ with .PublishDate }}
+ {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
{{ end }}
{{ with .Lastmod }}
+ {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
{{ end }}
{{- end -}}
-{{- with .Params.audio }}
{{ end }}
+{{- with .Params.audio }}
{{ end }}
{{- with .Params.locale }}
-
+
{{ end }}
{{- with .Site.Params.title }}
-
+
{{ end }}
{{- with .Params.videos }}
{{- range . }}
-
+
{{ end }}
{{ end }}
@@ -71,7 +71,7 @@
{{- $series := index $siteSeries ($name | urlize) }}
{{- range $page := first 6 $series.Pages }}
{{- if ne $page.Permalink $permalink }}
-
+
{{ end }}
{{- end }}
{{ end }}
@@ -80,5 +80,5 @@
{{- /* Facebook Page Admin ID for Domain Insights */}}
{{- with site.Params.social.facebook_admin }}
-
+
{{ end }}
diff --git a/layouts/shortcodes/chroma-lexers.html b/layouts/shortcodes/chroma-lexers.html
index 38241be33..2e10c3dee 100644
--- a/layouts/shortcodes/chroma-lexers.html
+++ b/layouts/shortcodes/chroma-lexers.html
@@ -1,7 +1,6 @@
- {{ range .Site.Data.docs.chroma.lexers }}
- - {{ .Name }}
- - {{ with .Aliases }}{{ delimit . ", " }}{{ end }}
- {{ end }}
-
-
\ No newline at end of file
+ {{ range .Site.Data.docs.chroma.lexers }}
+
{{ .Name }}
+
{{ with .Aliases }}{{ delimit . ", " }}{{ end }}
+ {{ end }}
+
diff --git a/layouts/shortcodes/datatable-filtered.html b/layouts/shortcodes/datatable-filtered.html
index ff3f299bd..36db0397a 100644
--- a/layouts/shortcodes/datatable-filtered.html
+++ b/layouts/shortcodes/datatable-filtered.html
@@ -9,31 +9,33 @@
{{ $fields := after 3 .Params }}
{{ $list := where $list $filter1 $filter2 $filter3 }}
+
-
- {{ range $fields }}
- {{ . }} |
- {{ end }}
-
- {{ range $list }}
-
- {{ range $k, $v := . }}
- {{ $.Scratch.Set $k $v }}
- {{ end }}
- {{ range $k, $v := $fields }}
-
- {{ $tdContent := $.Scratch.Get . }}
- {{ if eq $k 3 }}
- {{ printf "%v" $tdContent |
- strings.ReplaceRE `\[` "- " |
- strings.ReplaceRE `\s` "
- " |
- strings.ReplaceRE `\]` "
" |
- safeHTML }}
- {{ else }}
- {{ $tdContent }}
- {{ end}}
- |
- {{ end }}
-
- {{ end }}
+
+ {{ range $fields }}
+ {{ . }} |
+ {{ end }}
+
+ {{ range $list }}
+
+ {{ range $k, $v := . }}
+ {{ $.Scratch.Set $k $v }}
+ {{ end }}
+ {{ range $k, $v := $fields }}
+
+ {{ $tdContent := $.Scratch.Get . }}
+ {{ if eq $k 3 }}
+ {{ printf "%v" $tdContent |
+ strings.ReplaceRE `\[` "- " |
+ strings.ReplaceRE `\s` "
- " |
+ strings.ReplaceRE `\]` "
" |
+ safeHTML
+ }}
+ {{ else }}
+ {{ $tdContent }}
+ {{ end }}
+ |
+ {{ end }}
+
+ {{ end }}
diff --git a/layouts/shortcodes/deprecated-in.html b/layouts/shortcodes/deprecated-in.html
index e168b8a0f..0058921b1 100644
--- a/layouts/shortcodes/deprecated-in.html
+++ b/layouts/shortcodes/deprecated-in.html
@@ -1,3 +1,4 @@
+{{/* prettier-ignore-start */ -}}
{{- /*
Renders a callout indicating the version in which a feature was deprecated.
@@ -16,6 +17,7 @@
{{< /new-in >}}
*/}}
+{{/* prettier-ignore-end */ -}}
{{- with $version := .Get 0 | strings.TrimLeft "vV" }}
{{- $href := printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}
{{- $inner := strings.TrimSpace $.Inner }}
diff --git a/layouts/shortcodes/eturl.html b/layouts/shortcodes/eturl.html
index c0cf30aec..0a7161a36 100644
--- a/layouts/shortcodes/eturl.html
+++ b/layouts/shortcodes/eturl.html
@@ -1,3 +1,4 @@
+{{/* prettier-ignore-start */ -}}
{{- /*
Renders an absolute URL to the source code for an embedded template.
@@ -11,13 +12,13 @@ embedded_templates.toml file in the data directory.
@example {{% et robots.txt %}}
@example {{% et filename=robots.txt %}}
*/}}
-
+{{/* prettier-ignore-end */ -}}
{{- /* Get parameters. */}}
{{- $filename := "" -}}
{{- if .IsNamedParams -}}
- {{- $filename = .Get "filename" -}}
+ {{- $filename = .Get "filename" -}}
{{- else -}}
- {{- $filename = .Get 0 -}}
+ {{- $filename = .Get 0 -}}
{{- end -}}
{{- /* Render. */}}
@@ -32,5 +33,5 @@ embedded_templates.toml file in the data directory.
{{- errorf "The %q shortcode was unable to find the embedded_template_urls data file in the site's data directory. See %s" $.Name $.Position -}}
{{- end -}}
{{- else -}}
- {{- errorf "The %q shortcodes requires a named or positional parameter, the file name of the embedded template, excluding its extension. See %s" .Name .Position -}}
+ {{- errorf "The %q shortcodes requires a named or positional parameter, the file name of the embedded template, excluding its extension. See %s" .Name .Position -}}
{{- end -}}
diff --git a/layouts/shortcodes/glossary-term.html b/layouts/shortcodes/glossary-term.html
index 7aace730e..2af74b99d 100644
--- a/layouts/shortcodes/glossary-term.html
+++ b/layouts/shortcodes/glossary-term.html
@@ -1,3 +1,4 @@
+{{/* prettier-ignore-start */ -}}
{{- /*
Renders the definition of the given glossary term.
@@ -7,11 +8,13 @@ Renders the definition of the given glossary term.
@example {{% glossary-term float %}}
@example {{% glossary-term "floating point" %}}
*/}}
-
+{{/* prettier-ignore-end */ -}}
{{- with .Get 0 }}
{{- $path := printf "/quick-reference/glossary/%s" (urlize .) }}
{{- with site.GetPage $path }}
+ {{/* prettier-ignore-start */ -}}
{{ .RenderShortcodes }} {{/* Do not indent. Do not remove non-breaking space. */}}
+ {{/* prettier-ignore-end */ -}}
{{- else }}
{{- errorf "The glossary term (%s) shortcode was unable to find %s: see %s" $.Name $path $.Position }}
{{- end }}
diff --git a/layouts/shortcodes/glossary.html b/layouts/shortcodes/glossary.html
index e91be32ce..951ee6935 100644
--- a/layouts/shortcodes/glossary.html
+++ b/layouts/shortcodes/glossary.html
@@ -1,3 +1,4 @@
+{{/* prettier-ignore-start */ -}}
{{- /*
Renders the glossary of terms.
@@ -54,3 +55,4 @@ shortcode.
{{- else }}
{{- errorf "The %q shortcode was unable to get %s: see %s" .Name $path .Position}}
{{- end }}
+{{/* prettier-ignore-end */ -}}
diff --git a/layouts/shortcodes/hl.html b/layouts/shortcodes/hl.html
index 1a5b4e1ec..24b48d456 100644
--- a/layouts/shortcodes/hl.html
+++ b/layouts/shortcodes/hl.html
@@ -1,11 +1,11 @@
{{- /*
-Returns syntax-highlighted code from the given text.
+ Returns syntax-highlighted code from the given text.
-This is useful as a terse way to highlight inline code snippets. Calling the
-highlight shortcode for inline snippets is verbose.
+ This is useful as a terse way to highlight inline code snippets. Calling the
+ highlight shortcode for inline snippets is verbose.
*/}}
{{- $code := .Inner | strings.TrimSpace }}
-{{- $lang := or (.Get 0) "go" }}
+{{- $lang := or (.Get 0) "go" }}
{{- $opts := dict "hl_inline" true "noClasses" true }}
{{- transform.Highlight $code $lang $opts }}
diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html
index 7c2d805d2..4979a4738 100644
--- a/layouts/shortcodes/img.html
+++ b/layouts/shortcodes/img.html
@@ -1,3 +1,4 @@
+{{/* prettier-ignore-start */ -}}
{{- /*
Renders the given image using the given filter, if any.
@@ -84,7 +85,7 @@ Renders the given image using the given filter, if any.
>}}
*/}}
-
+{{/* prettier-ignore-end */ -}}
{{- /* Initialize. */}}
{{- $alt := "" }}
{{- $src := "" }}
@@ -105,7 +106,7 @@ Renders the given image using the given filter, if any.
{{- /* Get and validate parameters. */}}
{{- with .Get "alt" }}
- {{- $alt = .}}
+ {{- $alt = . }}
{{- end }}
{{- with .Get "src" }}
@@ -138,7 +139,7 @@ Renders the given image using the given filter, if any.
{{- if in (slice "false" false 0) (.Get "example") }}
{{- $example = false }}
-{{- else if in (slice "true" true 1) (.Get "example")}}
+{{- else if in (slice "true" true 1) (.Get "example") }}
{{- $example = true }}
{{- end }}
@@ -334,11 +335,23 @@ Renders the given image using the given filter, if any.
{{- end }}
{{- if $example }}
Original
-

+
Processed
-

+

{{- else -}}
-

+

{{- end }}
{{- define "validate-arg-count" }}
@@ -387,5 +400,5 @@ Renders the given image using the given filter, if any.
{{- end }}
{{- end }}
{{- end }}
- {{- return $r}}
+ {{- return $r }}
{{- end -}}
diff --git a/layouts/shortcodes/imgproc.html b/layouts/shortcodes/imgproc.html
index 59734d2a0..b0b035019 100644
--- a/layouts/shortcodes/imgproc.html
+++ b/layouts/shortcodes/imgproc.html
@@ -19,7 +19,7 @@
src="{{ .RelPermalink }}"
width="{{ .Width }}"
height="{{ .Height }}"
- alt="{{ $.Get `alt` }}" />
+ alt="{{ $.Get `alt` }}">
{{- with $.Inner }}
{{ . }}
diff --git a/layouts/shortcodes/include.html b/layouts/shortcodes/include.html
index b4a20cd72..e6a705a2a 100644
--- a/layouts/shortcodes/include.html
+++ b/layouts/shortcodes/include.html
@@ -1,3 +1,4 @@
+{{/* prettier-ignore-start */ -}}
{{- /*
Renders the page using the RenderShortcode method on the Page object.
@@ -8,7 +9,7 @@ You must call this shortcode using the {{% %}} notation.
@example {{% include "functions/_common/glob-patterns" %}}
*/}}
-
+{{/* prettier-ignore-end */ -}}
{{- with .Get 0 }}
{{- with or ($.Page.GetPage .) (site.GetPage .) }}
{{- .RenderShortcodes }}
diff --git a/layouts/shortcodes/list-pages-in-section.html b/layouts/shortcodes/list-pages-in-section.html
index 73e7f85a9..3bfd4eb9d 100644
--- a/layouts/shortcodes/list-pages-in-section.html
+++ b/layouts/shortcodes/list-pages-in-section.html
@@ -1,3 +1,4 @@
+{{/* prettier-ignore-start */ -}}
{{- /*
Renders a description list of the pages in the given section.
@@ -30,9 +31,9 @@ omitElementIDs to true for the subset.
@example {{< list-pages-in-section path=/functions/images filter=some_filter filterType=exclude titlePrefix=foo >}}
@example {{< list-pages-in-section path=/functions/images filter=some_filter filterType=exclude titlePrefix=foo omitElementIDs=true >}}
*/}}
-
+{{/* prettier-ignore-end */ -}}
{{- /* Initialize. */}}
-{{- $filter := or "" (.Get "filter" | lower)}}
+{{- $filter := or "" (.Get "filter" | lower) }}
{{- $filterType := or (.Get "filterType") "none" | lower }}
{{- $filteredPages := slice }}
{{- $titlePrefix := or (.Get "titlePrefix") "" }}
@@ -41,7 +42,7 @@ omitElementIDs to true for the subset.
{{- /* Get boolean parameters. */}}
{{- if in (slice "false" false 0) (.Get "omitElementIDs") }}
{{- $omitElementIDs = false }}
-{{- else if in (slice "true" true 1) (.Get "omitElementIDs")}}
+{{- else if in (slice "true" true 1) (.Get "omitElementIDs") }}
{{- $omitElementIDs = true }}
{{- end }}
@@ -73,14 +74,16 @@ omitElementIDs to true for the subset.
}}
{{- $linkTitle := .LinkTitle }}
{{- with $titlePrefix }}
- {{- $linkTitle = printf "%s%s" . $linkTitle }}
+ {{- $linkTitle = printf "%s%s" . $linkTitle }}
{{- end }}
{{- $idAttribute := "" }}
{{- if not $omitElementIDs }}
{{- $id := path.Join .File.Dir .File.ContentBaseName | replaceRE `[\|/]` ":" | lower }}
{{- $idAttribute = printf " id=%q" $id }}
{{- end }}
- {{ $linkTitle }}
+
+ {{ $linkTitle }}
+
{{- $page.Description | $page.RenderString }}
{{- end }}
{{- end }}
diff --git a/layouts/shortcodes/module-mounts-note.html b/layouts/shortcodes/module-mounts-note.html
index c1c67991e..cbfad79f6 100644
--- a/layouts/shortcodes/module-mounts-note.html
+++ b/layouts/shortcodes/module-mounts-note.html
@@ -1 +1,3 @@
-Also see [Module Mounts Config](/hugo-modules/configuration/#module-configuration-mounts) for an alternative way to configure this directory.
+Also see [Module Mounts
+Config](/hugo-modules/configuration/#module-configuration-mounts) for an
+alternative way to configure this directory.
diff --git a/layouts/shortcodes/new-in.html b/layouts/shortcodes/new-in.html
index 744873c24..781f08b90 100644
--- a/layouts/shortcodes/new-in.html
+++ b/layouts/shortcodes/new-in.html
@@ -1,3 +1,4 @@
+{{/* prettier-ignore-start */ -}}
{{- /*
Renders a callout or badge indicating the version in which a feature was added.
@@ -22,6 +23,7 @@
Some descriptive text here.
{{< /new-in >}}
*/}}
+{{/* prettier-ignore-end */ -}}
{{- $majorVersionDiffThreshold := 0 }}
{{- $minorVersionDiffThreshold := 30 }}
{{- $displayExpirationWarning := true }}
diff --git a/layouts/shortcodes/note.html b/layouts/shortcodes/note.html
index 564480df3..2bbfc987e 100644
--- a/layouts/shortcodes/note.html
+++ b/layouts/shortcodes/note.html
@@ -1,3 +1,4 @@
+{{/* prettier-ignore-start */ -}}
{{- /*
Renders a callout.
@@ -9,6 +10,7 @@
Some descriptive text here.
{{< /note >}}
*/}}
+{{/* prettier-ignore-end */ -}}
{{- $text := .Inner | strings.TrimSpace | .Page.RenderString (dict "display" "block") }}
{{- partial "layouts/blocks/alert.html" (dict
"color" "blue"
diff --git a/layouts/shortcodes/quick-reference.html b/layouts/shortcodes/quick-reference.html
index fc53c93bd..b9f4fdc18 100644
--- a/layouts/shortcodes/quick-reference.html
+++ b/layouts/shortcodes/quick-reference.html
@@ -1,3 +1,4 @@
+{{/* prettier-ignore-start */ -}}
{{/*
Renders the child sections of the given top-level section, listing each child's immediate descendants.
@@ -37,3 +38,4 @@ Renders the child sections of the given top-level section, listing each child's
{{ else }}
{{ errorf "The %q shortcodes was unable to find the %q section. See %s" .Name $section .Position }}
{{ end }}
+{{/* prettier-ignore-end */ -}}