diff options
Diffstat (limited to 'docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts')
8 files changed, 77 insertions, 35 deletions
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-link.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-link.html index 7b3d58c2d..5583d53d7 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-link.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-link.html @@ -201,7 +201,7 @@ either of these shortcodes in conjunction with this render hook. Validates the fragment portion of a link destination. @context {string} contentPath The page containing the link. - @context {srting} errorLevel The error level when unable to resolve destination; ignore (default), warning, or error. + @context {string} errorLevel The error level when unable to resolve destination; ignore (default), warning, or error. @context {page} page The page corresponding to the link destination @context {struct} parsedURL The link destination parsed by urls.Parse. @context {string} renderHookName The name of the render hook. diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html index ce16953c8..7451c15d6 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html @@ -1,9 +1,21 @@ -{{/* - Disable Twitter for now as we lost access to the account. - with site.Params.social.twitter }} - <a href="https://twitter.com/intent/follow?screen_name={{ . }}" title="Follow on Twitter" class="link-transition twitter link dib z-999 pt3 pt0-l mr2"> - {{ partial "svg/twitter.svg" (dict "size" "32px") }} - </a> -{{ end */}} - <a rel="me" class="mstdn mr3" href="https://fosstodon.org/@gohugoio" target="_blank">gohugoio</a> - <a class="github-button needs-js link primary-color-dark" href="https://github.com/gohugoio/hugo" data-size="large" data-show-count="false" aria-label="Star gohugoio/hugo on GitHub">Star</a> +<a + href="https://twitter.com/intent/follow?screen_name=gohugoiov2" + title="Follow on Twitter" + class="link-transition twitter link dib z-999 pt3 pt0-l mr2"> + {{ partial "svg/twitter.svg" (dict "size" "32px") }} +</a> +<a + rel="me" + class="mstdn mr3" + href="https://fosstodon.org/@gohugoio" + target="_blank" + >gohugoio</a +> +<a + class="github-button needs-js link primary-color-dark" + href="https://github.com/gohugoio/hugo" + data-size="large" + data-show-count="false" + aria-label="Star gohugoio/hugo on GitHub" + >Star</a +> diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/deprecated-in.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/deprecated-in.html index cab85541d..7219d7f54 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/deprecated-in.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/deprecated-in.html @@ -5,7 +5,7 @@ {{ $href := printf "https://github.com/gohugoio/hugo/releases/tag/%s" $version }} <aside> <div class="admonition-content bl bw2 b--dark-red" > - <p>Deprecated in <a href="{{ $href }}">{{ $version }}</a></p> + <p>Deprecated in <a href="{{ $href }}">{{ $version }}</a>.</p> {{ $.Inner }} </div> </aside> diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html index ea5b6de1d..50d4da9ed 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html @@ -100,7 +100,7 @@ Renders the given image using the given filter, if any. "fontSize" 64 "lineHeight" 1.2 "fontColor" "#ffffff" - "fontPath" "https://github.com/google/fonts/raw/main/apache/roboto/static/Roboto-Regular.ttf" + "fontPath" "https://github.com/google/fonts/raw/main/ofl/lato/Lato-Regular.ttf" }} {{- /* Get and validate parameters. */}} @@ -119,9 +119,10 @@ Renders the given image using the given filter, if any. {{- end }} {{- $validFilters := slice - "brightness" "colorbalance" "colorize" "contrast" "gamma" "gaussianblur" - "grayscale" "hue" "invert" "none" "opacity" "overlay" "padding" "pixelate" - "process" "saturation" "sepia" "sigmoid" "text" "unsharpmask" + "autoorient" "brightness" "colorbalance" "colorize" "contrast" "gamma" + "gaussianblur" "grayscale" "hue" "invert" "none" "opacity" "overlay" + "padding" "pixelate" "process" "saturation" "sepia" "sigmoid" "text" + "unsharpmask" }} {{- with $filter }} @@ -157,7 +158,11 @@ Renders the given image using the given filter, if any. {{- /* Create filter. */}} {{- $f := "" }} {{- $ctx := dict "filter" $filter "args" $filterArgs "name" .Name "position" .Position }} -{{- if eq $filter "brightness" }} +{{- if eq $filter "autoorient" }} + {{- $ctx = merge $ctx (dict "argsRequired" 0) }} + {{- template "validate-arg-count" $ctx }} + {{- $f = images.AutoOrient }} +{{- else if eq $filter "brightness" }} {{- $ctx = merge $ctx (dict "argsRequired" 1) }} {{- template "validate-arg-count" $ctx }} {{- $filterArgs = apply $filterArgs "float" "." }} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/include.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/include.html index a13dd756a..9ad6e4ecb 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/include.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/include.html @@ -3,7 +3,7 @@ Renders the page using the RenderShortcode method on the Page object. You must call this shortcode using the {{% %}} notation. -@param {string} (postional parameter 0) The path to the page, relative to the content directory. +@param {string} (positional parameter 0) The path to the page, relative to the content directory. @returns template.HTML @example {{% include "functions/_common/glob-patterns" %}} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/list-pages-in-section.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/list-pages-in-section.html index 07a41d613..73e7f85a9 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/list-pages-in-section.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/list-pages-in-section.html @@ -1,5 +1,5 @@ {{- /* -Renders a desciption list of the pages in the given section. +Renders a description list of the pages in the given section. Render a subset of the pages in the section by specifying a predefined filter, and whether to include those pages. diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/new-in.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/new-in.html index 9236cf2bc..e22a91f3d 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/new-in.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/new-in.html @@ -1,13 +1,36 @@ -{{ $version := .Get 0 }} -{{ if not $version }} - {{ errorf "Missing version in new-in shortcode " }} -{{ end }} -{{ $version = $version | strings.TrimPrefix "v" }} -<button - class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 px-4 border border-gray-400 rounded shadow"> - <a - href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}" - target="_blank" - >New in v{{ $version }}</a - > -</button> +{{- /* +Renders a "new in" button indicating the version in which a feature was added. + +When comparing the current version to the specified version, the "new in" +button will be hidden if any of the following conditions is true: + +- The major version difference exceeds the majorVersionDiffThreshold +- The minor version difference exceeds the minorVersionDiffThreshold + +@param {string} version The semantic version string, with or without a leading v. +@returns {template.HTML} + +@example {{< new-in 0.100.0 >}} +*/}} + +{{- /* Set defaults. */}} +{{- $majorVersionDiffThreshold := 0 }} +{{- $minorVersionDiffThreshold := 30 }} +{{- $displayExpirationWarning := true }} + +{{- /* Render. */}} +{{- with $version := .Get 0 | strings.TrimPrefix "v" }} + {{- $majorVersionDiff := sub (index (split hugo.Version ".") 0 | int) (index (split $version ".") 0 | int) }} + {{- $minorVersionDiff := sub (index (split hugo.Version ".") 1 | int) (index (split $version ".") 1 | int) }} + {{- if or (gt $majorVersionDiff $majorVersionDiffThreshold) (gt $minorVersionDiff $minorVersionDiffThreshold) }} + {{- if $displayExpirationWarning }} + {{- warnf "This call to the %q shortcode should be removed: %s. The button is now hidden because the specified version (%s) is older than the display threshold." $.Name $.Position $version }} + {{- end }} + {{- else }} + <button class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 px-4 border border-gray-400 rounded shadow"> + <a href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}">New in v{{ $version }}</a> + </button> + {{- end }} +{{- else }} + {{- errorf "The %q shortcode requires a positional parameter (version). See %s" .Name .Position }} +{{- end -}} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/quick-reference.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/quick-reference.html index 250bfc065..fc53c93bd 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/quick-reference.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/quick-reference.html @@ -1,5 +1,5 @@ {{/* -Renders the child sections of the given top-level section, listing each childs's immediate descendants. +Renders the child sections of the given top-level section, listing each child's immediate descendants. @param {string} section The top-level section to render. @returns template.HTML @@ -11,7 +11,7 @@ Renders the child sections of the given top-level section, listing each childs's {{ with .Get "section" }} {{ $section = . }} {{ else }} - {{ errorf "The %q shortcodes requires a 'section' parameter. See %s" .Name .Postion }} + {{ errorf "The %q shortcodes requires a 'section' parameter. See %s" .Name .Position }} {{ end }} {{/* Do not change the markdown indentation, and do not remove blank lines. */}} @@ -24,7 +24,9 @@ Renders the child sections of the given top-level section, listing each childs's {{ range .Pages }} {{ $aliases := "" }} {{ if eq .Section "functions" }} - {{ $aliases = delimit .Params.action.aliases " or " }} + {{ with .Params.action.aliases }} + {{ $aliases = delimit . " or " }} + {{ end }} {{ end }} [{{ .LinkTitle }}]({{ .RelPermalink }}) {{ with $aliases }}({{ . }}){{ end }} @@ -33,5 +35,5 @@ Renders the child sections of the given top-level section, listing each childs's {{ end }} {{ end }} {{ else }} - {{ errorf "The %q shortcodes was unable to find the %q section. See %s" .Name $section .Postion }} + {{ errorf "The %q shortcodes was unable to find the %q section. See %s" .Name $section .Position }} {{ end }} |