]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
Squashed 'docs/' changes from dc7a9ae12..b654fcba0
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 24 Apr 2025 08:23:16 +0000 (10:23 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 24 Apr 2025 08:23:16 +0000 (10:23 +0200)
b654fcba0 content: Fix links
d44357418 content: Update GitLab Pages workflow example
33968c7e2 content: Update Netlify configuration file
a6d0c8c50 content: Update GitHub Pages workflow example
d1aabfa36 content: Fix broken link
7b50139a6 content: Miscellaneous edits
a30e2c189 Menus: add forgotten link target
5c2aa88b4 content: Updates for v0.146.7
114413c18 netlify: Hugo 0.146.7
67e9261b1 netlify: Hugo 0.146.6
efa040229 content: Update templates/embedded.md
b8f888c76 theme: Rename internal templates from partials/ to _partials/
727178cbb content: Fix broken anchor links
0f12708f1 Fix typo
380b1c163 Update Current.md
8b500f3e5 netlify: Hugo 0.146.5
e3d6b6fad netlify: Hugo 0.146.4
ac1b92713 content: Fix text formatting in templates/partial.md
719329530 content: Clarify usage of template function
a95eca524 theme: Misc adjustments for the themes site
8e6c26067 Add package.hugo.json
9691007fb netlify: Hugo 0.146.3
ec08acc59 netlify: Hugo 0.146.2
8f320a0b6 netlify: Hugo 0.146.1
d5e6cb618 content: Remove expired new-in badges
b5779d7fc content: Update templates.Current function
5df1229d5 theme: Move templates to new structure
a7a6a614d theme: Remove accidentally added template
195b368e8 content: Miscellaneous updates related to v0.146.0
0a906ad49 netlify: Hugo 0.146.0

git-subtree-dir: docs
git-subtree-split: b654fcba0d4385da1e47179ef3763f277f044242

175 files changed:
content/en/configuration/introduction.md
content/en/content-management/menus.md
content/en/contribute/documentation.md
content/en/functions/collections/Where.md
content/en/functions/css/Sass.md
content/en/functions/go-template/template.md
content/en/functions/templates/Current.md [new file with mode: 0644]
content/en/functions/time/In.md [new file with mode: 0644]
content/en/functions/transform/Unmarshal.md
content/en/host-and-deploy/host-on-github-pages/index.md
content/en/host-and-deploy/host-on-gitlab-pages.md
content/en/host-and-deploy/host-on-netlify/index.md
content/en/installation/linux.md
content/en/news/_content.gotmpl
content/en/quick-reference/glossary/iana.md [new file with mode: 0644]
content/en/quick-reference/glossary/utc.md [new file with mode: 0644]
content/en/shortcodes/ref.md
content/en/shortcodes/relref.md
content/en/shortcodes/vimeo.md
content/en/shortcodes/youtube.md
content/en/templates/embedded.md
content/en/templates/partial.md
content/en/templates/shortcode.md
content/en/troubleshooting/inspection.md
data/embedded_template_urls.toml
layouts/_default/_markup/render-blockquote.html [deleted file]
layouts/_default/_markup/render-codeblock.html [deleted file]
layouts/_default/_markup/render-link.html [deleted file]
layouts/_default/_markup/render-passthrough.html [deleted file]
layouts/_default/_markup/render-table.html [deleted file]
layouts/_default/baseof.html [deleted file]
layouts/_default/list.html [deleted file]
layouts/_default/list.rss.xml [deleted file]
layouts/_default/single.html [deleted file]
layouts/_markup/render-blockquote.html [new file with mode: 0644]
layouts/_markup/render-codeblock.html [new file with mode: 0644]
layouts/_markup/render-link.html [new file with mode: 0644]
layouts/_markup/render-passthrough.html [new file with mode: 0644]
layouts/_markup/render-table.html [new file with mode: 0644]
layouts/_partials/docs/functions-aliases.html [new file with mode: 0644]
layouts/_partials/docs/functions-return-type.html [new file with mode: 0644]
layouts/_partials/docs/functions-signatures.html [new file with mode: 0644]
layouts/_partials/helpers/debug/list-item-metadata.html [new file with mode: 0644]
layouts/_partials/helpers/funcs/color-from-string.html [new file with mode: 0644]
layouts/_partials/helpers/funcs/get-github-info.html [new file with mode: 0644]
layouts/_partials/helpers/funcs/get-remote-data.html [new file with mode: 0644]
layouts/_partials/helpers/gtag.html [new file with mode: 0644]
layouts/_partials/helpers/linkcss.html [new file with mode: 0644]
layouts/_partials/helpers/linkjs.html [new file with mode: 0644]
layouts/_partials/helpers/picture.html [new file with mode: 0644]
layouts/_partials/helpers/validation/validate-keywords.html [new file with mode: 0644]
layouts/_partials/layouts/blocks/alert.html [new file with mode: 0644]
layouts/_partials/layouts/blocks/modal.html [new file with mode: 0644]
layouts/_partials/layouts/breadcrumbs.html [new file with mode: 0644]
layouts/_partials/layouts/date.html [new file with mode: 0644]
layouts/_partials/layouts/docsheader.html [new file with mode: 0644]
layouts/_partials/layouts/explorer.html [new file with mode: 0644]
layouts/_partials/layouts/footer.html [new file with mode: 0644]
layouts/_partials/layouts/head/head-js.html [new file with mode: 0644]
layouts/_partials/layouts/head/head.html [new file with mode: 0644]
layouts/_partials/layouts/header/githubstars.html [new file with mode: 0644]
layouts/_partials/layouts/header/header.html [new file with mode: 0644]
layouts/_partials/layouts/header/qr.html [new file with mode: 0644]
layouts/_partials/layouts/header/theme.html [new file with mode: 0644]
layouts/_partials/layouts/home/features.html [new file with mode: 0644]
layouts/_partials/layouts/home/opensource.html [new file with mode: 0644]
layouts/_partials/layouts/home/sponsors.html [new file with mode: 0644]
layouts/_partials/layouts/hooks/body-end.html [new file with mode: 0644]
layouts/_partials/layouts/hooks/body-main-start.html [new file with mode: 0644]
layouts/_partials/layouts/hooks/body-start.html [new file with mode: 0644]
layouts/_partials/layouts/icons.html [new file with mode: 0644]
layouts/_partials/layouts/in-this-section.html [new file with mode: 0644]
layouts/_partials/layouts/page-edit.html [new file with mode: 0644]
layouts/_partials/layouts/related.html [new file with mode: 0644]
layouts/_partials/layouts/search/algolialogo.html [new file with mode: 0644]
layouts/_partials/layouts/search/button.html [new file with mode: 0644]
layouts/_partials/layouts/search/input.html [new file with mode: 0644]
layouts/_partials/layouts/search/results.html [new file with mode: 0644]
layouts/_partials/layouts/templates.html [new file with mode: 0644]
layouts/_partials/layouts/toc.html [new file with mode: 0644]
layouts/_partials/opengraph/get-featured-image.html [new file with mode: 0644]
layouts/_partials/opengraph/opengraph.html [new file with mode: 0644]
layouts/_shortcodes/chroma-lexers.html [new file with mode: 0644]
layouts/_shortcodes/code-toggle.html [new file with mode: 0644]
layouts/_shortcodes/datatable-filtered.html [new file with mode: 0644]
layouts/_shortcodes/datatable.html [new file with mode: 0644]
layouts/_shortcodes/deprecated-in.html [new file with mode: 0644]
layouts/_shortcodes/eturl.html [new file with mode: 0644]
layouts/_shortcodes/glossary-term.html [new file with mode: 0644]
layouts/_shortcodes/glossary.html [new file with mode: 0644]
layouts/_shortcodes/hl.html [new file with mode: 0644]
layouts/_shortcodes/img.html [new file with mode: 0644]
layouts/_shortcodes/imgproc.html [new file with mode: 0644]
layouts/_shortcodes/include.html [new file with mode: 0644]
layouts/_shortcodes/list-pages-in-section.html [new file with mode: 0644]
layouts/_shortcodes/module-mounts-note.html [new file with mode: 0644]
layouts/_shortcodes/new-in.html [new file with mode: 0644]
layouts/_shortcodes/per-lang-config-keys.html [new file with mode: 0644]
layouts/_shortcodes/quick-reference.html [new file with mode: 0644]
layouts/_shortcodes/root-configuration-keys.html [new file with mode: 0644]
layouts/_shortcodes/syntax-highlighting-styles.html [new file with mode: 0644]
layouts/baseof.html [new file with mode: 0644]
layouts/home.headers [new file with mode: 0644]
layouts/home.html [new file with mode: 0644]
layouts/home.redir [new file with mode: 0644]
layouts/index.headers [deleted file]
layouts/index.html [deleted file]
layouts/index.redir [deleted file]
layouts/list.html [new file with mode: 0644]
layouts/list.rss.xml [new file with mode: 0644]
layouts/partials/docs/functions-aliases.html [deleted file]
layouts/partials/docs/functions-return-type.html [deleted file]
layouts/partials/docs/functions-signatures.html [deleted file]
layouts/partials/helpers/debug/list-item-metadata.html [deleted file]
layouts/partials/helpers/funcs/color-from-string.html [deleted file]
layouts/partials/helpers/funcs/get-github-info.html [deleted file]
layouts/partials/helpers/funcs/get-remote-data.html [deleted file]
layouts/partials/helpers/gtag.html [deleted file]
layouts/partials/helpers/linkcss.html [deleted file]
layouts/partials/helpers/linkjs.html [deleted file]
layouts/partials/helpers/picture.html [deleted file]
layouts/partials/helpers/validation/validate-keywords.html [deleted file]
layouts/partials/layouts/blocks/alert.html [deleted file]
layouts/partials/layouts/blocks/modal.html [deleted file]
layouts/partials/layouts/breadcrumbs.html [deleted file]
layouts/partials/layouts/date.html [deleted file]
layouts/partials/layouts/docsheader.html [deleted file]
layouts/partials/layouts/explorer.html [deleted file]
layouts/partials/layouts/footer.html [deleted file]
layouts/partials/layouts/head/head-js.html [deleted file]
layouts/partials/layouts/head/head.html [deleted file]
layouts/partials/layouts/header/githubstars.html [deleted file]
layouts/partials/layouts/header/header.html [deleted file]
layouts/partials/layouts/header/qr.html [deleted file]
layouts/partials/layouts/header/theme.html [deleted file]
layouts/partials/layouts/home/features.html [deleted file]
layouts/partials/layouts/home/opensource.html [deleted file]
layouts/partials/layouts/home/sponsors.html [deleted file]
layouts/partials/layouts/hooks/body-end.html [deleted file]
layouts/partials/layouts/hooks/body-main-start.html [deleted file]
layouts/partials/layouts/hooks/body-start.html [deleted file]
layouts/partials/layouts/icons.html [deleted file]
layouts/partials/layouts/in-this-section.html [deleted file]
layouts/partials/layouts/page-edit.html [deleted file]
layouts/partials/layouts/related.html [deleted file]
layouts/partials/layouts/search/algolialogo.html [deleted file]
layouts/partials/layouts/search/button.html [deleted file]
layouts/partials/layouts/search/input.html [deleted file]
layouts/partials/layouts/search/results.html [deleted file]
layouts/partials/layouts/templates.html [deleted file]
layouts/partials/layouts/toc.html [deleted file]
layouts/partials/opengraph/get-featured-image.html [deleted file]
layouts/partials/opengraph/opengraph.html [deleted file]
layouts/shortcodes/chroma-lexers.html [deleted file]
layouts/shortcodes/code-toggle.html [deleted file]
layouts/shortcodes/datatable-filtered.html [deleted file]
layouts/shortcodes/datatable.html [deleted file]
layouts/shortcodes/deprecated-in.html [deleted file]
layouts/shortcodes/eturl.html [deleted file]
layouts/shortcodes/glossary-term.html [deleted file]
layouts/shortcodes/glossary.html [deleted file]
layouts/shortcodes/hl.html [deleted file]
layouts/shortcodes/img.html [deleted file]
layouts/shortcodes/imgproc.html [deleted file]
layouts/shortcodes/include.html [deleted file]
layouts/shortcodes/list-pages-in-section.html [deleted file]
layouts/shortcodes/module-mounts-note.html [deleted file]
layouts/shortcodes/new-in.html [deleted file]
layouts/shortcodes/per-lang-config-keys.html [deleted file]
layouts/shortcodes/quick-reference.html [deleted file]
layouts/shortcodes/root-configuration-keys.html [deleted file]
layouts/shortcodes/syntax-highlighting-styles.html [deleted file]
layouts/single.html [new file with mode: 0644]
netlify.toml
package.hugo.json [new file with mode: 0644]

index 121a483c45a6de69b052ae995f6c6e3c6158d03d..8f8ad4c1e9125dcf680b8204db561cdb1a3c9726 100644 (file)
@@ -249,7 +249,7 @@ HUGO_FILE_LOG_FORMAT
 
 HUGO_MEMORYLIMIT
 : {{< new-in 0.123.0 />}}
-: (`int`) The maximum amount of system memory, in gigabytes, that Hugo can use while rendering your site. Default is 25% of total system memory. Note that The `HUGO_MEMORYLIMIT` is a “best effort” setting. Don't expect Hugo to build a million pages with only 1 GB memory. You can get more information about how this behaves during the build by building with `hugo --logLevel info` and look for the `dynacache` label.
+: (`int`) The maximum amount of system memory, in gigabytes, that Hugo can use while rendering your site. Default is 25% of total system memory. Note that `HUGO_MEMORYLIMIT` is a "best effort" setting. Don't expect Hugo to build a million pages with only 1 GB of memory. You can get more information about how this behaves during the build by building with `hugo --logLevel info` and look for the `dynacache` label.
 
 HUGO_NUMWORKERMULTIPLIER
 : (`int`) The number of workers used in parallel processing. Default is the number of logical CPUs.
index ab1bcbfa1e445195bc30bbe3058a562416ffebde..6d01173dcec3ad495529b40168c07c44adf81011 100644 (file)
@@ -11,7 +11,7 @@ aliases: [/extras/menus/]
 To create a menu for your site:
 
 1. Define the menu entries
-1. [Localize] each entry
+1. [Localize](multilingual/#menus) each entry
 1. Render the menu with a [template]
 
 Create multiple menus, either flat or nested. For example, create a main menu for the header, and a separate menu for the footer.
index 1d185d21da385303cb40a60464c22450b9f6eb0a..68129912abf7c4096d1131d8d99c524afea5d92b 100644 (file)
@@ -112,7 +112,7 @@ Yes → Hugo is fast.
 
 ### Function and method descriptions
 
-Start descriptions in the functions and methods sections with "Returns", of for booelan values, "Reports whether".
+Start descriptions in the functions and methods sections with "Returns", or for boolean values, "Reports whether".
 
 ### File paths and names
 
index 1df84afc49234f0e13d3342e59b38f4f6c98525d..84fd1d21e75adb6414cf322e4f8d9d7fd351dcef 100644 (file)
@@ -87,7 +87,6 @@ Use any of the following logical operators:
 : (`bool`) Reports whether the given field value (a slice) contains one or more elements in common with `VALUE`. See&nbsp;[details](/functions/collections/intersect).
 
 `like`
-: {{< new-in 0.116.0 />}}
 : (`bool`) Reports whether the given field value matches the [regular expression](g) specified in `VALUE`. Use the `like` operator to compare `string` values. The `like` operator returns `false` when comparing other data types to the regular expression.
 
 > [!note]
@@ -167,8 +166,6 @@ For example, to return a collection of pages where any of the terms in the "genr
 
 ## Regular expression comparison
 
-{{< new-in 0.116.0 />}}
-
 To return a collection of pages where the "author" page parameter begins with either "victor" or "Victor":
 
 ```go-html-template
index 1d5487130181a15eb2d868ffedc64fba86cc64ae..03a4c74513b23f09bcb609e50810ed1e0730e77e 100644 (file)
@@ -12,26 +12,6 @@ params:
 
 {{< new-in 0.128.0 />}}
 
-```go-html-template
-{{ with resources.Get "sass/main.scss" }}
-  {{ $opts := dict
-    "enableSourceMap" (not hugo.IsProduction)
-    "outputStyle" (cond hugo.IsProduction "compressed" "expanded")
-    "targetPath" "css/main.css"
-    "transpiler" "libsass"
-  }}
-  {{ with . | toCSS $opts }}
-    {{ if hugo.IsProduction }}
-      {{ with . | fingerprint }}
-        <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
-      {{ end }}
-    {{ else }}
-      <link rel="stylesheet" href="{{ .RelPermalink }}">
-    {{ end }}
-  {{ end }}
-{{ end }}
-```
-
 Transpile Sass to CSS using the LibSass transpiler included in Hugo's extended and extended/deploy editions, or [install Dart Sass](#dart-sass) to use the latest features of the Sass language.
 
 Sass has two forms of syntax: [SCSS] and [indented]. Hugo supports both.
@@ -41,54 +21,70 @@ Sass has two forms of syntax: [SCSS] and [indented]. Hugo supports both.
 
 ## Options
 
-transpiler
-: (`string`) The transpiler to use, either `libsass` (default) or `dartsass`. Hugo's extended and extended/deploy editions include the LibSass transpiler. To use the Dart Sass transpiler, see the [installation instructions](#dart-sass) below.
-
-targetPath
-: (`string`) If not set, the transformed resource's target path will be the original path of the asset file with its extension replaced by `.css`.
-
-vars
-: (`map`) A map of key-value pairs that will be available in the `hugo:vars` namespace. Useful for [initializing Sass variables from Hugo templates](https://discourse.gohugo.io/t/42053/).
-
-```scss
-// LibSass
-@import "hugo:vars";
+enableSourceMap
+: (`bool`) Whether to generate a source map. Default is `false`.
 
-// Dart Sass
-@use "hugo:vars" as v;
-```
+includePaths
+: (`slice`) A slice of paths, relative to the project root, that the transpiler will use when resolving `@use` and `@import` statements.
 
 outputStyle
-: (`string`) Output styles available to LibSass include `nested` (default), `expanded`, `compact`, and `compressed`. Output styles available to Dart Sass include `expanded` (default) and `compressed`.
+: (`string`) The output style of the resulting CSS. With LibSass, one of `nested` (default), `expanded`, `compact`, or `compressed`. With Dart Sass, either `expanded` (default) or `compressed`.
 
 precision
-: (`int`) Precision of floating point math. Not applicable to Dart Sass.
+: (`int`) The precision of floating point math. Applicable to LibSass. Default is `8`.
 
-enableSourceMap
-: (`bool`) Whether to generate a source map. Default is `false`.
+silenceDeprecations
+: {{< new-in 0.139.0 />}}
+: (`slice`) A slice of deprecation IDs to silence. IDs are enclosed in brackets within Dart Sass warning messages (e.g., `import` in `WARN Dart Sass: DEPRECATED [import]`). Applicable to Dart Sass. Default is `false`.
+
+silenceDependencyDeprecations
+: {{< new-in 0.146.0 />}}
+: (`bool`) Whether to silence deprecation warnings from dependencies, where a dependency is considered any file transitively imported through a load path. This does not apply to `@warn` or `@debug` rules.Default is `false`.
 
 sourceMapIncludeSources
-: (`bool`) Whether to embed sources in the generated source map. Not applicable to LibSass. Default is `false`.
+: (`bool`) Whether to embed sources in the generated source map. Applicable to Dart Sass. Default is `false`.
 
-includePaths
-: (`slice`) A slice of paths, relative to the project root, that the transpiler will use when resolving `@use` and `@import` statements.
+targetPath
+: (`string`) The publish path for the transformed resource, relative to the[`publishDir`]. If unset, the target path defaults to the asset's original path with a `.css` extension.
+
+transpiler
+: (`string`) The transpiler to use, either `libsass` or `dartsass`. Hugo's extended and extended/deploy editions include the LibSass transpiler. To use the Dart Sass transpiler, see the [installation instructions](#dart-sass). Default is `libsass`.
+
+vars
+: (`map`) A map of key-value pairs that will be available in the `hugo:vars` namespace. Useful for [initializing Sass variables from Hugo templates](https://discourse.gohugo.io/t/42053/).
+
+  ```scss
+  // LibSass
+  @import "hugo:vars";
+
+  // Dart Sass
+  @use "hugo:vars" as v;
+  ```
 
-```go-html-template
-{{ $opts := dict
-  "transpiler" "dartsass"
-  "targetPath" "css/style.css"
-  "vars" site.Params.styles
-  "enableSourceMap" (not hugo.IsProduction)
-  "includePaths" (slice "node_modules/bootstrap/scss")
-}}
-{{ with resources.Get "sass/main.scss" | toCSS $opts | minify | fingerprint }}
-  <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
+## Example
+
+```go-html-template {copy=true}
+{{ with resources.Get "sass/main.scss" }}
+  {{ $opts := dict
+    "enableSourceMap" (not hugo.IsProduction)
+    "outputStyle" (cond hugo.IsProduction "compressed" "expanded")
+    "targetPath" "css/main.css"
+    "transpiler" "dartsass"
+    "vars" site.Params.styles
+    "includePaths" (slice "node_modules/bootstrap/scss")
+  }}
+  {{ with . | toCSS $opts }}
+    {{ if hugo.IsProduction }}
+      {{ with . | fingerprint }}
+        <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
+      {{ end }}
+    {{ else }}
+      <link rel="stylesheet" href="{{ .RelPermalink }}">
+    {{ end }}
+  {{ end }}
 {{ end }}
 ```
 
-silenceDeprecations
-: (`slice`) {{< new-in 0.139.0 />}} A slice of deprecation IDs to silence. The deprecation IDs are printed to in the warning message, e.g "import" in `WARN  Dart Sass: DEPRECATED [import] ...`. This is for Dart Sass only.
-
 ## Dart Sass
 
 Hugo's extended and extended/deploy editions include [LibSass] to transpile Sass to CSS. In 2020, the Sass team deprecated LibSass in favor of [Dart Sass].
@@ -121,6 +117,9 @@ You may also install [prebuilt binaries] for Linux, macOS, and Windows.
 
 Run `hugo env` to list the active transpilers.
 
+> [!note]
+> If you build Hugo from source and run `mage test -v`, the test will fail if you install Dart Sass as a Snap package. This is due to the Snap package's strict confinement model.
+
 ### Installing in a production environment
 
 For [CI/CD](g) deployments (e.g., GitHub Pages, GitLab Pages, Netlify, etc.) you must edit the workflow to install Dart Sass before Hugo builds the site[^2]. Some providers allow you to use one of the package managers above, or you can download and extract one of the prebuilt binaries.
@@ -136,8 +135,6 @@ To install Dart Sass for your builds on GitHub Pages, add this step to the GitHu
   run: sudo snap install dart-sass
 ```
 
-If you are using GitHub Pages for the first time with your repository, GitHub provides a [starter workflow] for Hugo that includes Dart Sass. This is the simplest way to get started.
-
 #### GitLab Pages
 
 To install Dart Sass for your builds on GitLab Pages, the `.gitlab-ci.yml` file should look something like this:
@@ -194,34 +191,6 @@ command = """\
   """
 ```
 
-### Example
-
-To transpile with Dart Sass, set `transpiler` to `dartsass` in the options map passed to `css.Sass`. For example:
-
-```go-html-template
-{{ with resources.Get "sass/main.scss" }}
-  {{ $opts := dict
-    "enableSourceMap" (not hugo.IsProduction)
-    "outputStyle" (cond hugo.IsProduction "compressed" "expanded")
-    "targetPath" "css/main.css"
-    "transpiler" "dartsass"
-  }}
-  {{ with . | toCSS $opts }}
-    {{ if hugo.IsProduction }}
-      {{ with . | fingerprint }}
-        <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
-      {{ end }}
-    {{ else }}
-      <link rel="stylesheet" href="{{ .RelPermalink }}">
-    {{ end }}
-  {{ end }}
-{{ end }}
-```
-
-### Miscellaneous
-
-If you build Hugo from source and run `mage test -v`, the test will fail if you install Dart Sass as a Snap package. This is due to the Snap package's strict confinement model.
-
 [brew.sh]: https://brew.sh/
 [chocolatey.org]: https://community.chocolatey.org/packages/sass
 [dart sass]: https://sass-lang.com/dart-sass
@@ -232,3 +201,4 @@ If you build Hugo from source and run `mage test -v`, the test will fail if you
 [snap package]: /installation/linux/#snap
 [snapcraft.io]: https://snapcraft.io/dart-sass
 [starter workflow]: https://github.com/actions/starter-workflows/blob/main/pages/hugo.yml
+[`publishDir`]: /configuration/all/#publishdir
index dac1fa3be6f8ce4dd4b5d54f579c996a478f1ad3..053cfcc226a8ed0ad985c4b71e117915ffec9beb 100644 (file)
@@ -10,7 +10,18 @@ params:
     signatures: ['template NAME [CONTEXT]']
 ---
 
-Use the `template` function to execute [embedded templates]. For example:
+Use the `template` function to execute any of these [embedded templates](g):
+
+- [`disqus.html`]
+- [`google_analytics.html`]
+- [`opengraph.html`]
+- [`pagination.html`]
+- [`schema.html`]
+- [`twitter_cards.html`]
+
+
+
+For example:
 
 ```go-html-template
 {{ range (.Paginate .Pages).Pages }}
@@ -39,8 +50,21 @@ The example above can be rewritten using an [inline partial] template:
 {{ end }}
 ```
 
+The key distinctions between the preceding two examples are:
+
+1. Inline partials are globally scoped. That means that an inline partial defined in _one_ template may be called from _any_ template.
+2. Leveraging the [`partialCached`] function when calling an inline partial allows for performance optimization through result caching.
+3. An inline partial can [`return`] a value of any data type instead of rendering a string.
+
 {{% include "/_common/functions/go-template/text-template.md" %}}
 
+[`disqus.html`]: /templates/embedded/#disqus
+[`google_analytics.html`]: /templates/embedded/#google-analytics
+[`opengraph.html`]: /templates/embedded/#open-graph
+[`pagination.html`]: /templates/embedded/#pagination
+[`partialCached`]: /functions/partials/includecached/
 [`partial`]: /functions/partials/include/
+[`return`]: /functions/go-template/return/
+[`schema.html`]: /templates/embedded/#schema
+[`twitter_cards.html`]: /templates/embedded/#x-twitter-cards
 [inline partial]: /templates/partial/#inline-partials
-[embedded templates]: /templates/embedded/
diff --git a/content/en/functions/templates/Current.md b/content/en/functions/templates/Current.md
new file mode 100644 (file)
index 0000000..805aeec
--- /dev/null
@@ -0,0 +1,155 @@
+---
+title: templates.Current
+description: Returns information about the currently executing template.
+categories: []
+keywords: []
+params:
+  functions_and_methods:
+    aliases: []
+    returnType: tpl.CurrentTemplateInfo
+    signatures: [templates.Current]
+---
+
+> [!note]
+> This function is experimental and subject to change.
+
+{{< new-in 0.146.0 />}}
+
+The `templates.Current` function provides introspection capabilities, allowing you to access details about the currently executing templates. This is useful for debugging complex template hierarchies and understanding the flow of execution during rendering.
+
+## Methods
+
+Ancestors
+: (`tpl.CurrentTemplateInfos`) Returns a slice containing information about each template in the current execution chain, starting from the parent of the current template and going up towards the initial template called. It excludes any base template applied via `define` and `block`. You can chain the `Reverse` method to this result to get the slice in chronological execution order.
+
+Base
+: (`tpl.CurrentTemplateInfoCommonOps`) Returns an object representing the base template that was applied to the current template, if any. This may be `nil`.
+
+Filename
+: (`string`) Returns the absolute path of the current template. This will be empty for embedded templates.
+
+Name
+: (`string`) Returns the name of the current template. This is usually the path relative to the layouts directory.
+
+Parent
+: (`tpl.CurrentTemplateInfo`) Returns an object representing the parent of the current template, if any. This may be `nil`.
+
+## Examples
+
+The examples below help visualize template execution and require a `debug` parameter set to `true` in your site configuration:
+
+{{< code-toggle file=hugo >}}
+[params]
+debug = true
+{{< /code-toggle >}}
+
+### Boundaries
+
+To visually mark where a template begins and ends execution:
+
+```go-html-template {file="layouts/_default/single.html"}
+{{ define "main" }}
+  {{ if site.Params.debug }}
+    <div class="debug">[entering {{ templates.Current.Filename }}]</div>
+  {{ end }}
+
+  <h1>{{ .Title }}</h1>
+  {{ .Content }}
+
+  {{ if site.Params.debug }}
+    <div class="debug">[leaving {{ templates.Current.Filename }}]</div>
+  {{ end }}
+{{ end }}
+```
+
+### Call stack
+
+To display the chain of templates that led to the current one, create a partial template that iterates through its ancestors:
+
+```go-html-template {file="layouts/partials/template-call-stack.html" copy=true}
+{{ with templates.Current }}
+  <div class="debug">
+    {{ range .Ancestors }}
+      {{ .Filename }}<br>
+      {{ with .Base }}
+        {{ .Filename }}<br>
+      {{ end }}
+    {{ end }}
+  </div>
+{{ end }}
+```
+
+Then call the partial from any template:
+
+```go-html-template {file="layouts/partials/footer/copyright.html" copy=true}
+{{ if site.Params.debug }}
+  {{ partial "template-call-stack.html" . }}
+{{ end }}
+```
+
+The rendered template stack would look something like this:
+
+```text
+/home/user/project/layouts/partials/footer/copyright.html
+/home/user/project/themes/foo/layouts/partials/footer.html
+/home/user/project/layouts/_default/single.html
+/home/user/project/themes/foo/layouts/_default/baseof.html
+```
+
+To reverse the order of the entries, chain the `Reverse` method to the `Ancestors` method:
+
+```go-html-template {file="layouts/partials/template-call-stack.html" copy=true}
+{{ with templates.Current }}
+  <div class="debug">
+    {{ range .Ancestors.Reverse }}
+      {{ with .Base }}
+        {{ .Filename }}<br>
+      {{ end }}
+      {{ .Filename }}<br>
+    {{ end }}
+  </div>
+{{ end }}
+```
+
+### VS Code
+
+To render links that, when clicked, will open the template in Microsoft Visual Studio Code, create a partial template with anchor elements that use the `vscode` URI scheme:
+
+```go-html-template {file="layouts/partials/template-open-in-vs-code.html" copy=true}
+{{ with templates.Current.Parent }}
+  <div class="debug">
+    <a href="vscode://file/{{ .Filename }}">{{ .Name }}</a>
+    {{ with .Base }}
+      <a href="vscode://file/{{ .Filename }}">{{ .Name }}</a>
+    {{ end }}
+  </div>
+{{ end }}
+```
+
+Then call the partial from any template:
+
+```go-html-template {file="layouts/_default/single.html" copy=true}
+{{ define "main" }}
+  <h1>{{ .Title }}</h1>
+  {{ .Content }}
+
+  {{ if site.Params.debug }}
+    {{ partial "template-open-in-vs-code.html" . }}
+  {{ end }}
+{{ end }}
+```
+
+Use the same approach to render the entire call stack as links:
+
+```go-html-template {file="layouts/partials/template-call-stack.html" copy=true}
+{{ with templates.Current }}
+  <div class="debug">
+    {{ range .Ancestors }}
+      <a href="vscode://file/{{ .Filename }}">{{ .Filename }}</a><br>
+      {{ with .Base }}
+        <a href="vscode://file/{{ .Filename }}">{{ .Filename }}</a><br>
+      {{ end }}
+    {{ end }}
+  </div>
+{{ end }}
+```
diff --git a/content/en/functions/time/In.md b/content/en/functions/time/In.md
new file mode 100644 (file)
index 0000000..821eb99
--- /dev/null
@@ -0,0 +1,30 @@
+---
+title: time.In
+description: Returns the given date/time as represented in the specified IANA time zone.
+categories: []
+keywords: []
+params:
+  functions_and_methods:
+    aliases: []
+    returnType: time.Time
+    signatures: [time.In TIMEZONE INPUT]
+---
+
+{{< new-in 0.146.0 />}}
+
+The `time.In` function returns the given date/time as represented in the specified [IANA](g) time zone.
+
+- If the time zone is an empty string or `UTC`, the time is returned in [UTC](g).
+- If the time zone is `Local`, the time is returned in the system's local time zone.
+- Otherwise, the time zone must be a valid IANA [time zone name].
+
+[time zone name]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
+
+```go-html-template
+{{ $layout := "2006-01-02T15:04:05-07:00" }}
+{{ $t := time.AsTime "2025-03-31T14:45:00-00:00" }}
+
+{{ $t | time.In "America/Denver" | time.Format $layout }}     → 2025-03-31T08:45:00-06:00
+{{ $t | time.In "Australia/Adelaide" | time.Format $layout }} → 2025-04-01T01:15:00+10:30
+{{ $t | time.In "Europe/Oslo" | time.Format $layout }}        → 2025-03-31T16:45:00+02:00
+```
index d159122f58c6ba38985d1b737a6f1e046a0a0369..93168294c815350203ecb680b03e447ddc9b0ae4 100644 (file)
@@ -114,12 +114,14 @@ A remote resource is a file on a remote server, accessible via HTTP or HTTPS.
 >
 > `{{ $data = .Content | transform.Unmarshal }}`
 
-## Options
+## Working with CSV
+
+### Options
 
 When unmarshaling a CSV file, provide an optional map of options.
 
 delimiter
-: (`string`) The delimiter used, default is `,`.
+: (`string`) The delimiter used. Default is `,`.
 
 comment
 : (`string`) The comment character used in the CSV. If set, lines beginning with the comment character without preceding whitespace are ignored.
@@ -128,8 +130,85 @@ lazyQuotes
 : {{< new-in 0.122.0 />}}
 : (`bool`) Whether to allow a quote in an unquoted field, or to allow a non-doubled quote in a quoted field. Default is `false`.
 
+targetType
+: {{< new-in 0.146.7 />}}
+: (`string`) The target data type, either `slice` or `map`. Default is `slice`.
+
+### Examples
+
+The examples below use this CSV file:
+
+```csv
+"name","type","breed","age"
+"Spot","dog","Collie",3
+"Rover","dog","Boxer",5
+"Felix","cat","Calico",7
+```
+
+To render an HTML table from a CSV file:
+
 ```go-html-template
-{{ $csv := "a;b;c" | transform.Unmarshal (dict "delimiter" ";") }}
+{{ $data := slice }}
+{{ $file := "pets.csv" }}
+{{ with or (.Resources.Get $file) (resources.Get $file) }}
+  {{ $opts := dict "targetType" "slice" }}
+  {{ $data = transform.Unmarshal $opts . }}
+{{ end }}
+
+{{ with $data }}
+  <table>
+    <thead>
+      <tr>
+        {{ range index . 0 }}
+          <th>{{ . }}</th>
+        {{ end }}
+      </tr>
+    </thead>
+    <tbody>
+      {{ range . | after 1 }}
+        <tr>
+          {{ range . }}
+            <td>{{ . }}</td>
+          {{ end }}
+        </tr>
+      {{ end }}
+    </tbody>
+  </table>
+{{ end }}
+```
+
+To extract a subset of the data, or to sort the data, unmarshal to a map instead of a slice:
+
+```go-html-template
+{{ $data := slice }}
+{{ $file := "pets.csv" }}
+{{ with or (.Resources.Get $file) (resources.Get $file) }}
+  {{ $opts := dict "targetType" "map" }}
+  {{ $data = transform.Unmarshal $opts . }}
+{{ end }}
+
+{{ with sort (where $data "type" "dog") "name" "asc" }}
+  <table>
+    <thead>
+      <tr>
+        <th>name</th>
+        <th>type</th>
+        <th>breed</th>
+        <th>age</th>
+      </tr>
+    </thead>
+    <tbody>
+      {{ range . }}
+        <tr>
+          <td>{{ .name }}</td>
+          <td>{{ .type }}</td>
+          <td>{{ .breed }}</td>
+          <td>{{ .age }}</td>
+        </tr>
+      {{ end }}
+    </tbody>
+  </table>
+{{ end }}
 ```
 
 ## Working with XML
index 4c00fbc8e0d961525e8764792570916746e4ae62..7c32010994769d7b3c6603cc23e0286d09fc8c8d 100644 (file)
@@ -136,6 +136,8 @@ jobs:
           key: hugo-${{ github.run_id }}
           restore-keys:
             hugo-
+      - name: Configure Git
+        run: git config core.quotepath false
       - name: Build with Hugo
         run: |
           hugo \
index 4b308cc19fa678ee8f2edcafa76c43d1b63540bd..4750b0ff368fb25a36d58f546e364d3a1b41d0d0 100644 (file)
@@ -23,15 +23,15 @@ Define your [CI/CD](g) jobs by creating a `.gitlab-ci.yml` file in the root of y
 
 ```yaml {file=".gitlab-ci.yml" copy=true}
 variables:
-  DART_SASS_VERSION: 1.85.0
+  DART_SASS_VERSION: 1.87.0
   GIT_DEPTH: 0
   GIT_STRATEGY: clone
   GIT_SUBMODULE_STRATEGY: recursive
-  HUGO_VERSION: 0.144.2
-  NODE_VERSION: 23.x
+  HUGO_VERSION: 0.146.7
+  NODE_VERSION: 22.x
   TZ: America/Los_Angeles
 image:
-  name: golang:1.23.4-bookworm
+  name: golang:1.24.2-bookworm
 
 pages:
   script:
@@ -53,6 +53,8 @@ pages:
     - apt-get install -y nodejs
     # Install Node.js dependencies
     - "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
+    # Configure Git
+    - git config core.quotepath false
     # Build
     - hugo --gc --minify --baseURL ${CI_PAGES_URL}
     # Compress
index f3601331a8fa404c3c3e37a9db1449da2fee45ba..4c89a6c1e3aa1b56f87a383932855fe83cd869ee 100644 (file)
@@ -113,21 +113,23 @@ Create a new file named netlify.toml in the root of your project directory. In i
 
 ```toml {file="netlify.toml"}
 [build.environment]
-HUGO_VERSION = "0.144.2"
+GO_VERSION = "1.24"
+HUGO_VERSION = "0.146.7"
 NODE_VERSION = "22"
 TZ = "America/Los_Angeles"
 
 [build]
 publish = "public"
-command = "hugo --gc --minify"
+command = "git config core.quotepath false && hugo --gc --minify"
 ```
 
 If your site requires Dart Sass to transpile Sass to CSS, the configuration file should look something like this:
 
 ```toml {file="netlify.toml"}
 [build.environment]
-HUGO_VERSION = "0.144.2"
-DART_SASS_VERSION = "1.85.0"
+DART_SASS_VERSION = "1.87.0"
+GO_VERSION = "1.24"
+HUGO_VERSION = "0.146.7"
 NODE_VERSION = "22"
 TZ = "America/Los_Angeles"
 
@@ -138,6 +140,7 @@ command = """\
   tar -xf dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz && \
   rm dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz && \
   export PATH=/opt/build/repo/dart-sass:$PATH && \
+  git config core.quotepath false && \
   hugo --gc --minify \
   """
 ```
index 731cfce4c46ce77c6819daada7e24f40c5d1e7fd..591bf0818af59e1d0617fbc3b48a848fd07f1026 100644 (file)
@@ -30,17 +30,33 @@ To install the extended edition of Hugo:
 sudo snap install hugo
 ```
 
-To enable or revoke access to removable media:
+To control automatic updates:
 
 ```sh
+# disable automatic updates
+sudo snap refresh --hold hugo
+
+# enable automatic updates
+sudo snap refresh --unhold hugo
+```
+
+To control access to removable media:
+
+```sh
+# allow access
 sudo snap connect hugo:removable-media
+
+# revoke access
 sudo snap disconnect hugo:removable-media
 ```
 
-To enable or revoke access to SSH keys:
+To control access to SSH keys:
 
 ```sh
+# allow access
 sudo snap connect hugo:ssh-keys
+
+# revoke access
 sudo snap disconnect hugo:ssh-keys
 ```
 
index f979c9adcb9de1bbbcbb0e176f42643bf9e2f938..af3cf47ed741c3d402d9702ba4880e904587a6b5 100644 (file)
@@ -23,7 +23,8 @@
     "dates" $dates
     "kind" "page"
     "params" $params
-    "path" .name
+    "path" (strings.Replace .name "." "-")
+    "slug" .name
     "title" (printf "Release %s" .name)
   }}
   {{ $.AddPage $page }}
diff --git a/content/en/quick-reference/glossary/iana.md b/content/en/quick-reference/glossary/iana.md
new file mode 100644 (file)
index 0000000..89497f7
--- /dev/null
@@ -0,0 +1,6 @@
+---
+title: IANA
+reference: https://www.iana.org/about
+---
+
+_IANA_ is an abbreviation for the Internet Assigned Numbers Authority, a non-profit organization that manages the allocation of global IP addresses, autonomous system numbers, DNS root zone, media types, and other Internet Protocol-related resources.
diff --git a/content/en/quick-reference/glossary/utc.md b/content/en/quick-reference/glossary/utc.md
new file mode 100644 (file)
index 0000000..a4627be
--- /dev/null
@@ -0,0 +1,6 @@
+---
+title: UTC
+reference: https://en.wikipedia.org/wiki/Coordinated_Universal_Time
+---
+
+_UTC_ is an abbreviation for Coordinated Universal Time, the primary time standard used worldwide to regulate clocks and time. It is the basis for civil time and time zones across the globe.
index 2f821254c2d41d454eb939b4b274d1025cc5ab04..a52c2bf6e6812b4034de45ac3171ae3e33beb808 100755 (executable)
@@ -10,7 +10,7 @@ keywords: []
 > To override Hugo's embedded `ref` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
 
 > [!note]
-> When working with the Markdown [content format], this shortcode has become largely redundant. Its functionality is now primarily handled by [link render hooks], specifically the embedded one provided by Hugo. This hook effectively addresses all the use cases previously covered by this shortcode.
+> When working with Markdown, this shortcode is obsolete. Instead, use a [link render hook] that resolves the link destination using the `GetPage` method on the `Page` object. You can either create your own, or simply enable the [embedded link render hook]. The embedded link render hook is automatically enabled for multilingual single-host projects.
 
 ## Usage
 
@@ -56,6 +56,7 @@ Rendered:
 {{% include "_common/ref-and-relref-error-handling.md" %}}
 
 [content format]: /content-management/formats/
-[link render hooks]: /render-hooks/images/#default
+[embedded link render hook]: /render-hooks/links/#default
+[link render hook]: /render-hooks/links/
 [Markdown notation]: /content-management/shortcodes/#notation
-[source code]: {{% eturl ref %}}
+[source code]: {{% eturl relref %}}
index 5b413b87ebe93a055485b8a20320611d1eb90988..219eae81afcf22ac4f9132989df24a5417eee090 100755 (executable)
@@ -10,7 +10,7 @@ keywords: []
 > To override Hugo's embedded `relref` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
 
 > [!note]
-> When working with the Markdown [content format], this shortcode has become largely redundant. Its functionality is now primarily handled by [link render hooks], specifically the embedded one provided by Hugo. This hook effectively addresses all the use cases previously covered by this shortcode.
+> When working with Markdown, this shortcode is obsolete. Instead, use a [link render hook] that resolves the link destination using the `GetPage` method on the `Page` object. You can either create your own, or simply enable the [embedded link render hook]. The embedded link render hook is automatically enabled for multilingual single-host projects.
 
 ## Usage
 
@@ -56,6 +56,7 @@ Rendered:
 {{% include "_common/ref-and-relref-error-handling.md" %}}
 
 [content format]: /content-management/formats/
-[link render hooks]: /render-hooks/links/
+[embedded link render hook]: /render-hooks/links/#default
+[link render hook]: /render-hooks/links/
 [Markdown notation]: /content-management/shortcodes/#notation
 [source code]: {{% eturl relref %}}
index c354eefe0fddb3d09670ebfcd978a5b7e2fb41c8..1164ce997789f3c2cea61fe43c358f0ef0538542 100755 (executable)
@@ -29,19 +29,27 @@ Hugo renders this to:
 
 ## Arguments
 
+id
+: (string) The video `id`. Optional if the `id` is provided as a positional argument as shown in the example above.
+
+allowFullScreen
+: {{< new-in 0.146.0 />}}
+: (`bool`) Whether the `iframe` element can activate full screen mode. Default is `true`.
+
 class
 : (`string`) The `class` attribute of the wrapping `div` element. Adding one or more CSS classes disables inline styling.
 
-id
-: (`string`) The `id` of the Vimeo video
+loading
+: {{< new-in 0.146.0 />}}
+: (`string`) The loading attribute of the `iframe` element, either `eager` or `lazy`. Default is `eager`.
 
 title
 : (`string`) The `title` attribute of the `iframe` element.
 
-If you provide a `class` or `title` you must use a named parameter for the `id`.
+Here's an example using some of the available arguments:
 
 ```text
-{{</* vimeo id=55073825 class="foo bar" title="My Video" */>}}
+{{</* vimeo id=55073825 allowFullScreen=false loading=lazy */>}}
 ```
 
 ## Privacy
index 18c5ae6c25e1e1419307a312d52c654d2c8adb48..ed3cf063264e22d81f8d530cbcee5b6b6d75df0e 100755 (executable)
@@ -70,7 +70,7 @@ start
 title
 : (`string`) The `title` attribute of the `iframe` element. Defaults to "YouTube video".
 
-Example using some of the above:
+Here's an example using some of the available arguments:
 
 ```text
 {{</* youtube id=0RKpf3rK57I start=30 end=60 loading=lazy */>}}
index 198136393ee082e11df7ee9bdab897356310d459..ecfd905140ba5beb6dafb5786c915a24772cee4c 100644 (file)
@@ -1,6 +1,6 @@
 ---
-title: Embedded templates
-description: Hugo provides embedded templates for common use cases.
+title: Embedded partial templates
+description: Hugo provides embedded partial templates for common use cases.
 categories: []
 keywords: []
 weight: 170
@@ -145,6 +145,10 @@ Various optional metadata can also be set:
 
 If using YouTube this will produce a og:video tag like `<meta property="og:video" content="url">`. Use the `https://youtu.be/<id>` format with YouTube videos (example: `https://youtu.be/qtIqKaDlqXo`).
 
+## Pagination
+
+See [details](/templates/pagination/).
+
 ## Schema
 
 > [!note]
index 8493a4674fc3b00bba9e77da6c257697e711a3ec..7ff2d959431d8a16abb9a47998e21de6d0bb5a35 100644 (file)
@@ -49,7 +49,7 @@ As shown in the above example directory structure, you can nest your directories
 
 ### Variable scoping
 
-The second argument in a partial call is the variable being passed down. The above examples are passing the `.`, which tells the template receiving the partial to apply the current [context][context].
+The second argument in a partial call is the variable being passed down. The above examples are passing the dot (`.`), which tells the template receiving the partial to apply the current [context][context].
 
 This means the partial will *only* be able to access those variables. The partial is isolated and cannot access the outer scope. From within the partial, `$.Var` is equivalent to `.Var`.
 
index 711d342cb87b985c4f70caedd228d8e7ddd022e8..3ed573651798a1c690bd3c37d961ff0902493f1b 100644 (file)
@@ -329,7 +329,7 @@ You can use the `HasShortcode` method in your base template to conditionally loa
 [`with`]: /functions/go-template/with/
 [content management]: /content-management/shortcodes/
 [embedded shortcodes]: /shortcodes/
-[GitHub]: https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates/shortcodes
+[GitHub]: https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates/_shortcodes
 [introduction to templating]: /templates/introduction/
 [Markdown notation]: /content-management/shortcodes/#markdown-notation
 [named or positional]: /content-management/shortcodes/#arguments
index dc662243a37a7e6ca8689d9147bb03183de484a9..ea3c097f91a83271a120b32d38793a6a4508108d 100644 (file)
@@ -34,6 +34,11 @@ Use the [`printf`] function (render) or [`warnf`] function (log to console) to i
 {{ printf "%[1]v (%[1]T)" $value }} → 42 (int)
 ```
 
+{{< new-in 0.146.0 />}}
+
+Use the [`templates.Current`] function to visually mark template execution boundaries or to display the template call stack.
+
 [`debug.Dump`]: /functions/debug/dump/
 [`printf`]: /functions/fmt/printf/
 [`warnf`]: /functions/fmt/warnf/
+[`templates.Current`]: /functions/templates/current/
index f75b14f12c9c9539733f9d07db93406e7df674f3..b2a796cd1cd1d5334bbfac92c5dce3fbca794808 100644 (file)
@@ -4,39 +4,39 @@
 # BaseURL
 'base_url' = 'https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates'
 
-# Templates
-'alias' = 'alias.html'
-'disqus' = 'disqus.html'
-'google_analytics' = 'google_analytics.html'
-'opengraph' = 'opengraph.html'
-'pagination' = 'pagination.html'
-'robots' = '_default/robots.txt'
-'rss' = '_default/rss.xml'
-'schema' = 'schema.html'
-'sitemap' = '_default/sitemap.xml'
-'sitemapindex' = '_default/sitemapindex.xml'
-'twitter_cards' = 'twitter_cards.html'
+# Partials
+'disqus' = '_partials/disqus.html'
+'google_analytics' = '_partials/google_analytics.html'
+'opengraph' = '_partials/opengraph.html'
+'pagination' = '_partials/pagination.html'
+'schema' = '_partials/schema.html'
+'twitter_cards' = '_partials/twitter_cards.html'
 
 # Render hooks
-'render-codeblock-goat' = '_default/_markup/render-codeblock-goat.html'
-'render-image' = '_default/_markup/render-image.html'
-'render-link' = '_default/_markup/render-link.html'
-'render-table' = '_default/_markup/render-table.html'
+'render-codeblock-goat' = '_markup/render-codeblock-goat.html'
+'render-image' = '_markup/render-image.html'
+'render-link' = '_markup/render-link.html'
+'render-table' = '_markup/render-table.html'
 
 # Shortcodes
-'details' = 'shortcodes/details.html'
-'figure' = 'shortcodes/figure.html'
-'gist' = 'shortcodes/gist.html'
-'highlight' = 'shortcodes/highlight.html'
-'instagram' = 'shortcodes/instagram.html'
-'param' = 'shortcodes/param.html'
-'qr' = 'shortcodes/qr.html'
-'ref' = 'shortcodes/ref.html'
-'relref' = 'shortcodes/relref.html'
-'twitter' = 'shortcodes/twitter.html'
-'twitter_simple' = 'shortcodes/twitter_simple.html'
-'vimeo' = 'shortcodes/vimeo.html'
-'vimeo_simple' = 'shortcodes/vimeo_simple.html'
-'x' = 'shortcodes/x.html'
-'x_simple' = 'shortcodes/x_simple.html'
-'youtube' = 'shortcodes/youtube.html'
+'details' = '_shortcodes/details.html'
+'figure' = '_shortcodes/figure.html'
+'gist' = '_shortcodes/gist.html'
+'highlight' = '_shortcodes/highlight.html'
+'instagram' = '_shortcodes/instagram.html'
+'param' = '_shortcodes/param.html'
+'qr' = '_shortcodes/qr.html'
+'ref' = '_shortcodes/ref.html'
+'relref' = '_shortcodes/relref.html'
+'vimeo' = '_shortcodes/vimeo.html'
+'vimeo_simple' = '_shortcodes/vimeo_simple.html'
+'x' = '_shortcodes/x.html'
+'x_simple' = '_shortcodes/x_simple.html'
+'youtube' = '_shortcodes/youtube.html'
+
+# Other
+'alias' = 'alias.html'
+'robots' = 'robots.txt'
+'rss' = 'rss.xml'
+'sitemap' = 'sitemap.xml'
+'sitemapindex' = 'sitemapindex.xml'
diff --git a/layouts/_default/_markup/render-blockquote.html b/layouts/_default/_markup/render-blockquote.html
deleted file mode 100644 (file)
index 98019e1..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-{{- if eq .Type "alert" }}
-  {{- $alerts := dict
-    "caution" (dict "color" "red" "icon" "exclamation-triangle")
-    "important" (dict "color" "blue" "icon" "exclamation-circle")
-    "note" (dict "color" "blue" "icon" "information-circle")
-    "tip" (dict "color" "green" "icon" "light-bulb")
-    "warning" (dict "color" "orange" "icon" "exclamation-triangle")
-  }}
-
-  {{- $alertTypes := slice }}
-  {{- range $k, $_ := $alerts }}
-    {{- $alertTypes = $alertTypes | append $k }}
-  {{- end }}
-  {{- $alertTypes = $alertTypes | sort }}
-
-  {{- $alertType := strings.ToLower .AlertType }}
-  {{- if in $alertTypes $alertType }}
-    {{- partial "layouts/blocks/alert.html" (dict
-      "color" (or ((index $alerts $alertType).color) "blue")
-      "icon" (or ((index $alerts $alertType).icon) "information-circle")
-      "text" .Text
-      "title" .AlertTitle
-      "class" .Attributes.class
-      )
-    }}
-  {{- else }}
-    {{- errorf `Invalid blockquote alert type. Received %s. Expected one of %s (case-insensitive). See %s.` .AlertType (delimit $alertTypes ", " ", or ") .Page.String }}
-  {{- end }}
-{{- else }}
-  <blockquote {{- with .Attributes.class }}class="{{ . }}"{{- end }}>
-    {{ .Text }}
-  </blockquote>
-{{- end }}
diff --git a/layouts/_default/_markup/render-codeblock.html b/layouts/_default/_markup/render-codeblock.html
deleted file mode 100644 (file)
index 13725ff..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-{{/* prettier-ignore-start */}}
-{{/*
-Renders a highlighted code block using the given options and attributes.
-
-In addition to the options available to the transform.Highlight function, you
-may also specify the following parameters:
-
-@param {bool} [copy=false] Whether to display a copy-to-clipboard button.
-@param {string} [file] The file name to display above the rendered code.
-@param {bool} [details=false] Whether to wrap the highlighted code block within a details element.
-@param {bool} [open=false] Whether to initially display the content of the details element.
-@param {string} [summary=Details] The content of the details summary element rendered from Markdown to HTML.
-
-@returns {template.HTML}
-
-@examples
-
-    ```go
-    fmt.Println("Hello world!")
-    ```
-
-    ```go {linenos=true file="layouts/index.html" copy=true}
-    fmt.Println("Hello world!")
-    ```
-*/}}
-{{/* prettier-ignore-end */}}
-
-{{- $copy := false }}
-{{- $file := or .Attributes.file "" }}
-{{- $details := false }}
-{{- $open := "" }}
-{{- $summary := or .Attributes.summary "Details" | .Page.RenderString }}
-{{- $ext := strings.TrimPrefix "." (path.Ext $file) }}
-{{- $lang := or .Type $ext "text" }}
-{{- if in (slice "html" "gotmpl") $lang }}
-  {{- $lang = "go-html-template" }}
-{{- end }}
-{{- if eq $lang "md" }}
-  {{- $lang = "text" }}
-{{- end }}
-
-{{- with .Attributes.copy }}
-  {{- if in (slice true "true" 1) . }}
-    {{- $copy = true }}
-  {{- else if in (slice false "false" 0) . }}
-    {{- $copy = false }}
-  {{- end }}
-{{- end }}
-
-{{- with .Attributes.details }}
-  {{- if in (slice true "true" 1) . }}
-    {{- $details = true }}
-  {{- else if in (slice false "false" 0) . }}
-    {{- $details = false }}
-  {{- end }}
-{{- end }}
-
-{{- with .Attributes.open }}
-  {{- if in (slice true "true" 1) . }}
-    {{- $open = "open" }}
-  {{- else if in (slice false "false" 0) . }}
-    {{- $open = "" }}
-  {{- end }}
-{{- end }}
-
-{{- if $details }}
-  <details class="cursor-pointer" {{ $open }}>
-  <summary>{{ $summary }}</summary>
-{{- end }}
-
-<div
-  x-data
-  class="render-hook-codeblock font-mono not-prose relative mt-6 mb-8 border-1 border-gray-200 dark:border-gray-800 bg-light dark:bg-dark">
-  {{- $fileSelectClass := "select-none" }}
-  {{- if $copy }}
-    {{- $fileSelectClass = "select-text" }}
-    <svg
-      class="absolute right-4 top-2 z-30 text-blue-600 hover:text-blue-500 dark:text-gray-400 dark:hover:text-gray-300 cursor-pointer w-6 h-6"
-      @click="$copy($refs.code)">
-      <use href="#icon--copy"></use>
-    </svg>
-  {{- end }}
-  {{- with $file }}
-    <div
-      class="san-serif text-sm inline-block leading-none pl-2 py-3 bg-gray-300 dark:bg-slate-700 w-full {{ $fileSelectClass }}
-">
-      {{ . }}
-    </div>
-  {{- end }}
-
-  <div x-ref="code">
-    {{- transform.Highlight (strings.TrimSpace .Inner) $lang .Options }}
-  </div>
-</div>
-
-{{- if $details }}
-  </details>
-{{- end }}
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
deleted file mode 100644 (file)
index 88e3cbe..0000000
+++ /dev/null
@@ -1,320 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{- /* Last modified: 2025-01-19T14:44:56-08:00 */}}
-
-{{- /*
-Copyright 2025 Veriphor LLC
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not
-use this file except in compliance with the License. You may obtain a copy of
-the License at
-
-https://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-License for the specific language governing permissions and limitations under
-the License.
-*/}}
-
-{{- /*
-This render hook resolves internal destinations by looking for a matching:
-
-  1. Content page
-  2. Page resource (a file in the current page bundle)
-  3. Section resource (a file in the current section)
-  4. Global resource (a file in the assets directory)
-
-It skips the section resource lookup if the current page is a leaf bundle.
-
-External destinations are not modified.
-
-You must place global resources in the assets directory. If you have placed
-your resources in the static directory, and you are unable or unwilling to move
-them, you must mount the static directory to the assets directory by including
-both of these entries in your site configuration:
-
-  [[module.mounts]]
-  source = 'assets'
-  target = 'assets'
-
-  [[module.mounts]]
-  source = 'static'
-  target = 'assets'
-
-By default, if this render hook is unable to resolve a destination, including a
-fragment if present, it passes the destination through without modification. To
-emit a warning or error, set the error level in your site configuration:
-
-  [params.render_hooks.link]
-  errorLevel = 'warning' # ignore (default), warning, or error (fails the build)
-
-When you set the error level to warning, and you are in a development
-environment, you can visually highlight broken internal links:
-
-  [params.render_hooks.link]
-  errorLevel = 'warning' # ignore (default), warning, or error (fails the build)
-  highlightBroken = true # true or false (default)
-
-This will add a "broken" class to anchor elements with invalid src attributes.
-Add a rule to your CSS targeting the broken links:
-
-  a.broken {
-    background: #ff0;
-    border: 2px solid #f00;
-    padding: 0.1em 0.2em;
-  }
-
-This render hook may be unable to resolve destinations created with the ref and
-relref shortcodes. Unless you set the error level to ignore you should not use
-either of these shortcodes in conjunction with this render hook.
-
-@context {string} Destination The link destination.
-@context {page} Page A reference to the page containing the link.
-@context {string} PlainText The link description as plain text.
-@context {string} Text The link description.
-@context {string} Title The link title.
-
-@returns {template.html}
-*/ -}}
-{{/* prettier-ignore-end */ -}}
-{{- /* Initialize. */}}
-{{- $renderHookName := "link" }}
-
-{{- /* Verify minimum required version. */}}
-{{- $minHugoVersion := "0.141.0" }}
-{{- if lt hugo.Version $minHugoVersion }}
-  {{- errorf "The %q render hook requires Hugo v%s or later." $renderHookName $minHugoVersion }}
-{{- end }}
-
-{{- /* Error level when unable to resolve destination: ignore, warning, or error. */}}
-{{- $errorLevel := or site.Params.render_hooks.link.errorLevel "ignore" | lower }}
-
-{{- /* If true, adds "broken" class to broken links. Applicable in development environment when errorLevel is warning. */}}
-{{- $highlightBrokenLinks := or site.Params.render_hooks.link.highlightBroken false }}
-
-{{- /* Validate error level. */}}
-{{- if not (in (slice "ignore" "warning" "error") $errorLevel) }}
-  {{- errorf "The %q render hook is misconfigured. The errorLevel %q is invalid. Please check your site configuration." $renderHookName $errorLevel }}
-{{- end }}
-
-{{- /* Determine content path for warning and error messages. */}}
-{{- $contentPath := .Page.String }}
-
-{{- /* Parse destination. */}}
-{{- $u := urls.Parse .Destination }}
-
-{{- /* Set common message. */}}
-{{- $msg := printf "The %q render hook was unable to resolve the destination %q in %s" $renderHookName $u.String $contentPath }}
-
-{{- /* Set attributes for anchor element. */}}
-{{- $attrs := dict "href" $u.String }}
-{{- if eq $u.String "g" }}
-  {{- /* Destination is a glossary term. */}}
-  {{- $ctx := dict
-    "contentPath" $contentPath
-    "errorLevel" $errorLevel
-    "renderHookName" $renderHookName
-    "text" .Text
-  }}
-  {{- $attrs = partial "inline/h-rh-l/get-glossary-link-attributes.html" $ctx }}
-{{- else if $u.IsAbs }}
-  {{- /* Destination is a remote resource. */}}
-  {{- $attrs = merge $attrs (dict "rel" "external") }}
-{{- else }}
-  {{- with $u.Path }}
-    {{- with $p := or ($.PageInner.GetPage .) ($.PageInner.GetPage (strings.TrimRight "/" .)) }}
-      {{- /* Destination is a page. */}}
-      {{- $href := .RelPermalink }}
-      {{- with $u.RawQuery }}
-        {{- $href = printf "%s?%s" $href . }}
-      {{- end }}
-      {{- with $u.Fragment }}
-        {{- $ctx := dict
-          "contentPath" $contentPath
-          "errorLevel" $errorLevel
-          "page" $p
-          "parsedURL" $u
-          "renderHookName" $renderHookName
-        }}
-        {{- partial "inline/h-rh-l/validate-fragment.html" $ctx }}
-        {{- $href = printf "%s#%s" $href . }}
-      {{- end }}
-      {{- $attrs = dict "href" $href }}
-    {{- else with $.PageInner.Resources.Get $u.Path }}
-      {{- /* Destination is a page resource; drop query and fragment. */}}
-      {{- $attrs = dict "href" .RelPermalink }}
-    {{- else with (and (ne $.Page.BundleType "leaf") ($.Page.CurrentSection.Resources.Get $u.Path)) }}
-      {{- /* Destination is a section resource, and current page is not a leaf bundle. */}}
-      {{- $attrs = dict "href" .RelPermalink }}
-    {{- else with resources.Get $u.Path }}
-      {{- /* Destination is a global resource; drop query and fragment. */}}
-      {{- $attrs = dict "href" .RelPermalink }}
-    {{- else }}
-      {{- if eq $errorLevel "warning" }}
-        {{- warnf $msg }}
-        {{- if and $highlightBrokenLinks hugo.IsDevelopment }}
-          {{- $attrs = merge $attrs (dict "class" "broken") }}
-        {{- end }}
-      {{- else if eq $errorLevel "error" }}
-        {{- errorf $msg }}
-      {{- end }}
-    {{- end }}
-  {{- else }}
-    {{- with $u.Fragment }}
-      {{- /* Destination is on the same page; prepend relative permalink. */}}
-      {{- $ctx := dict
-        "contentPath" $contentPath
-        "errorLevel" $errorLevel
-        "page" $.Page
-        "parsedURL" $u
-        "renderHookName" $renderHookName
-      }}
-      {{- partial "inline/h-rh-l/validate-fragment.html" $ctx }}
-      {{- $attrs = dict "href" (printf "%s#%s" $.Page.RelPermalink .) }}
-    {{- else }}
-      {{- if eq $errorLevel "warning" }}
-        {{- warnf $msg }}
-        {{- if and $highlightBrokenLinks hugo.IsDevelopment }}
-          {{- $attrs = merge $attrs (dict "class" "broken") }}
-        {{- end }}
-      {{- else if eq $errorLevel "error" }}
-        {{- errorf $msg }}
-      {{- end }}
-    {{- end }}
-  {{- end }}
-{{- end }}
-
-{{- /* Render anchor element. */ -}}
-<a
-  {{- with .Title }}title="{{ . }}"{{- end }}
-  {{- range $k, $v := $attrs }}
-    {{- if $v }}
-      {{- printf " %s=%q" $k ($v | transform.HTMLEscape) | safeHTMLAttr }}
-    {{- end }}
-  {{- end -}}
-  >{{ .Text }}</a
->
-
-{{- define "partials/inline/h-rh-l/validate-fragment.html" }}
-  {{- /*
-    Validates the fragment portion of a link destination.
-
-    @context {string} contentPath The page containing the link.
-    @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.
-  */}}
-
-  {{- /* Initialize. */}}
-  {{- $contentPath := .contentPath }}
-  {{- $errorLevel := .errorLevel }}
-  {{- $p := .page }}
-  {{- $u := .parsedURL }}
-  {{- $renderHookName := .renderHookName }}
-
-  {{- /* Validate. */}}
-  {{- with $u.Fragment }}
-    {{- if $p.Fragments.Identifiers.Contains . }}
-      {{- if gt ($p.Fragments.Identifiers.Count .) 1 }}
-        {{- $msg := printf "The %q render hook detected duplicate heading IDs %q in %s" $renderHookName . $contentPath }}
-        {{- if eq $errorLevel "warning" }}
-          {{- warnf $msg }}
-        {{- else if eq $errorLevel "error" }}
-          {{- errorf $msg }}
-        {{- end }}
-      {{- end }}
-    {{- else }}
-      {{- /* Determine target path for warning and error message. */}}
-      {{- $targetPath := "" }}
-      {{- with $p.File }}
-        {{- $targetPath = .Path }}
-      {{- else }}
-        {{- $targetPath = .Path }}
-      {{- end }}
-      {{- /* Set common message. */}}
-      {{- $msg := printf "The %q render hook was unable to find heading ID %q in %s. See %s" $renderHookName . $targetPath $contentPath }}
-      {{- if eq $targetPath $contentPath }}
-        {{- $msg = printf "The %q render hook was unable to find heading ID %q in %s" $renderHookName . $targetPath }}
-      {{- end }}
-      {{- /* Throw warning or error. */}}
-      {{- if eq $errorLevel "warning" }}
-        {{- warnf $msg }}
-      {{- else if eq $errorLevel "error" }}
-        {{- errorf $msg }}
-      {{- end }}
-    {{- end }}
-  {{- end }}
-{{- end }}
-
-{{- define "partials/inline/h-rh-l/get-glossary-link-attributes.html" }}
-  {{- /*
-    Returns the anchor element attributes for a link to the given glossary term.
-
-    It first checks for the existence of a glossary page for the given term. If
-    no page is found, it then checks for a glossary page for the singular form of
-    the term. If neither page exists it throws a warning or error dependent on
-    the errorLevel setting
-
-    The returned href attribute does not point to the glossary term page.
-    Instead, via its fragment, it points to an entry on the glossary page.
-
-    @context {string} contentPath The page containing the link.
-    @context {string} errorLevel The error level when unable to resolve destination; ignore (default), warning, or error.
-    @context {string} renderHookName The name of the render hook.
-    @context {string} text The link text.
-  */}}
-
-  {{- /* Get context.. */}}
-  {{- $contentPath := .contentPath }}
-  {{- $errorLevel := .errorLevel }}
-  {{- $renderHookName := .renderHookName }}
-  {{- $text := .text | transform.Plainify | strings.ToLower }}
-
-  {{- /* Initialize. */}}
-  {{- $glossaryPath := "/quick-reference/glossary" }}
-  {{- $termGiven := $text }}
-  {{- $termActual := "" }}
-  {{- $termSingular := inflect.Singularize $termGiven }}
-
-  {{- /* Verify that the glossary page exists. */}}
-  {{- $glossaryPage := site.GetPage $glossaryPath }}
-  {{- if not $glossaryPage }}
-    {{- errorf "The %q render hook was unable to find %s: see %s" $renderHookName $glossaryPath $contentPath }}
-  {{- end }}
-
-  {{- /* There's a better way to handle this, but it works for now. */}}
-  {{- $cheating := dict
-    "chaining" "chain"
-    "localize" "localization"
-    "localized" "localization"
-    "paginating" "paginate"
-    "walking" "walk"
-    "ci/cd" "cicd"
-  }}
-
-  {{- /* Verify that a glossary term page exists for the given term. */}}
-  {{- if site.GetPage (urls.JoinPath $glossaryPath ($termGiven | urlize)) }}
-    {{- $termActual = $termGiven }}
-  {{- else if site.GetPage (urls.JoinPath $glossaryPath ($termSingular | urlize)) }}
-    {{- $termActual = $termSingular }}
-  {{- else }}
-    {{- $termToTest := index $cheating $termGiven }}
-    {{- if site.GetPage (urls.JoinPath $glossaryPath ($termToTest | urlize)) }}
-      {{- $termActual = $termToTest }}
-    {{- end }}
-  {{- end }}
-
-  {{- if not $termActual }}
-    {{- errorf "The %q render hook was unable to find a glossary page for either the singular or plural form of the term %q: see %s" $renderHookName $termGiven $contentPath }}
-  {{- end }}
-
-  {{- /* Create the href attribute. */}}
-  {{- $href := "" }}
-  {{- if $termActual }}
-    {{- $href = fmt.Printf "%s#%s" $glossaryPage.RelPermalink (anchorize $termActual) }}
-  {{- end }}
-
-  {{- return (dict "href" $href) }}
-{{- end -}}
diff --git a/layouts/_default/_markup/render-passthrough.html b/layouts/_default/_markup/render-passthrough.html
deleted file mode 100644 (file)
index 0ed0011..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{{- $opts := dict "output" "htmlAndMathml" "displayMode" (eq .Type "block") }}
-{{- with try (transform.ToMath .Inner $opts) }}
-  {{- with .Err }}
-    {{ errorf "Unable to render mathematical markup to HTML using the transform.ToMath function. The KaTeX display engine threw the following error: %s: see %s." . $.Position }}
-  {{- else }}
-    {{- .Value }}
-    {{- $.Page.Store.Set "hasMath" true }}
-  {{- end }}
-{{- end -}}
diff --git a/layouts/_default/_markup/render-table.html b/layouts/_default/_markup/render-table.html
deleted file mode 100644 (file)
index 7f3a886..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<div class="overflow-x-auto">
-  <table
-    {{- range $k, $v := .Attributes }}
-      {{- if $v }}
-        {{- printf " %s=%q" $k $v | safeHTMLAttr }}
-      {{- end }}
-    {{- end }}>
-    <thead>
-      {{- range .THead }}
-        <tr>
-          {{- range . }}
-            <th {{- with .Alignment }} class="!text-{{ . }}"{{- end }}>
-              {{- .Text -}}
-            </th>
-          {{- end }}
-        </tr>
-      {{- end }}
-    </thead>
-    <tbody>
-      {{- range .TBody }}
-        <tr>
-          {{- range . }}
-            <td {{- with .Alignment }} class="!text-{{ . }}"{{- end }}>
-              {{- .Text -}}
-            </td>
-          {{- end }}
-        </tr>
-      {{- end }}
-    </tbody>
-  </table>
-</div>
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
deleted file mode 100644 (file)
index 1f49521..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<!doctype html>
-<html
-  class="h-full antialiased scheme-light dark:scheme-dark"
-  lang="{{ or site.Language.LanguageCode `en-US` }}">
-  <head>
-    <meta charset="utf-8">
-    <title>
-      {{ .Title }}
-    </title>
-    <style>
-      [x-cloak] {
-        display: none !important;
-      }
-    </style>
-    <meta
-      name="description"
-      content="{{ .Description | default site.Params.description }}">
-    {{ partial "layouts/head/head-js.html" . }}
-    {{ with (templates.Defer (dict "key" "global")) }}
-      {{ $t := debug.Timer "tailwindcss" }}
-      {{ with resources.Get "css/styles.css" }}
-        {{ $opts := dict
-          "inlineImports" true
-          "minify" (not hugo.IsDevelopment)
-        }}
-        {{ with . | css.TailwindCSS $opts }}
-          {{ partial "helpers/linkcss.html" (dict "r" .) }}
-        {{ end }}
-      {{ end }}
-      {{ $t.Stop }}
-    {{ end }}
-    {{ $noop := .WordCount }}
-    {{ if .Page.Store.Get "hasMath" }}
-      <link
-        href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css"
-        rel="stylesheet">
-    {{ end }}
-    {{ partial "layouts/head/head.html" . }}
-  </head>
-  <body
-    class="flex flex-col min-h-full bg-white dark:bg-blue-950 kind-{{ .Kind }}">
-    {{ partial "layouts/hooks/body-start.html" . }}
-    {{/* Layout. */}}
-    {{ block "header" . }}
-      {{ partial "layouts/header/header.html" . }}
-    {{ end }}
-    {{ block "hero" . }}
-    {{ end }}
-    <div class="flex w-full xl:w-6xl h-full flex-auto mx-auto">
-      <main
-        class="flex-1 mx-auto lg:mx-0 w-full max-w-3x lg:max-w-3x pt-8 lg:pt-14 pb-20 px-main print:pt-0">
-        {{ partial "layouts/hooks/body-main-start.html" . }}
-        {{ block "main" . }}{{ end }}
-      </main>
-      {{ block "rightsidebar" . }}
-        <aside
-          class="py-15 ml-4 xl:ml-12 w-60 hidden lg:relative lg:block lg:flex-none">
-          {{ block "rightsidebar_content" . }}{{ end }}
-        </aside>
-      {{ end }}
-    </div>
-    {{/* Common icons. */}}
-    {{ partial "layouts/icons.html" . }}
-    {{/* Common templates. */}}
-    {{ partial "layouts/templates.html" . }}
-    {{/* Footer. */}}
-    {{ block "footer" . }}
-      {{ partial "layouts/footer.html" . }}
-    {{ end }}
-    {{ partial "layouts/hooks/body-end.html" . }}
-  </body>
-</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
deleted file mode 100644 (file)
index b049b6d..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-{{ define "main" }}
-  {{ $pages := "" }}
-  {{ if .IsPage }}
-    {{/* We currently have a slightly odd content structure with no top level /docs section. */}}
-    {{ $pages = .CurrentSection.Pages }}
-  {{ else }}
-    {{ $pages = .Pages }}
-    {{ if eq .Section "news" }}
-      {{ $pages = $pages.ByPublishDate.Reverse }}
-    {{ end }}
-  {{ end }}
-
-
-  <article class="">
-    {{ partial "layouts/docsheader.html" . }}
-    <div class="mt-6 sm:mt-8 grid grid-cols-2 xl:grid-cols-3 gap-4 min-h-40">
-      {{ range $pages }}
-        {{ if eq . $ }}
-          {{ continue }}
-        {{ end }}
-        <a
-          class="flex col-span-1 a--block cursor-pointer flex-col group border p-3 sm:p-4 hover:shadow-md dark:shadow-slate-800 border-gray-300 dark:border-gray-800 m-0"
-          href="{{ or .Params.permalink .RelPermalink }}">
-          {{ if .Params.show_publish_date }}
-            {{ with .PublishDate }}
-              <p
-                class="text-gray-500 dark:text-gray-400 text-sm/5 md:text-base/2 mb-2 sm:mb-4">
-                {{ partial "layouts/date.html" . }}
-              </p>
-            {{ end }}
-          {{ end }}
-          <h3
-            class="text-lg/6 md:text-2xl tracking-tight p-0 -mt-1 sm:mt-0 mb-1 sm:mb-2 text-primary group-hover:text-primary/70 overflow-hidden">
-            {{ .LinkTitle }}
-          </h3>
-
-          {{ with .Params.functions_and_methods.signatures }}
-            {{/* Set in functions and methods pages. */}}
-            {{ with $signature := index . 0 }}
-              {{ if $.Params.functions_and_methods.returnType }}
-                {{ $signature = printf "%s ⟼ %s" $signature $.context.Params.functions_and_methods.returnType }}
-              {{ end }}
-              <div
-                class="font-mono font-light text-sm whitespace-nowrap mb-2 sm:mb-4 p-2 bg-slate-50 dark:bg-slate-700 border-0 mr-8 overflow-x-auto">
-                {{- $signature -}}
-              </div>
-            {{ end }}
-          {{ end }}
-          <p
-            class="text-black dark:text-gray-100 leading-6 text-sm md:text-base three-lines-ellipsis">
-            {{ if and (eq .Section "commands") .IsPage }}
-              {{ $simpleCobraCommandShort := .RawContent | strings.ReplaceRE `(?s)^##\s.+?\n\n(.+?)\n\n.*` "$1" }}
-              {{ printf "%s." $simpleCobraCommandShort }}
-            {{ else }}
-              {{ (or .Params.description .Summary) | plainify | safeHTML }}
-            {{ end }}
-          </p>
-          {{ if and hugo.IsDevelopment site.Params.debug.display_page_metadata }}
-            {{ partial "helpers/debug/list-item-metadata.html" . }}
-          {{ end }}
-        </a>
-      {{ end }}
-    </div>
-  </article>
-{{ end }}
-
-{{ define "rightsidebar" }}
-  {{ printf "%c" '\u00A0' }}
-{{ end }}
diff --git a/layouts/_default/list.rss.xml b/layouts/_default/list.rss.xml
deleted file mode 100644 (file)
index 90fa221..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
-<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
-  <channel>
-    <title>Hugo News</title>
-    <description>Recent news about Hugo, a static site generator written in Go, optimized for speed and designed for flexibility.</description>
-    <link>{{ .Permalink }}</link>
-    <generator>Hugo {{ hugo.Version }}</generator>
-    <language>{{ or site.Language.LanguageCode site.Language.Lang }}</language>
-    {{- with site.Copyright }}
-      <copyright>{{ . }}</copyright>
-    {{- end }}
-    {{- with .OutputFormats.Get "rss" }}
-      {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
-    {{- end }}
-    {{- $limit := cond (gt site.Config.Services.RSS.Limit 0) site.Config.Services.RSS.Limit 999 }}
-    {{- $pages := "" }}
-    {{- with site.GetPage "/news" }}
-      {{- $pages = .Pages.ByPublishDate.Reverse | first $limit }}
-    {{- else }}
-      {{- errorf "The list.rss.xml layout was unable to find the 'news' page." }}
-    {{- end }}
-    <lastBuildDate>{{ (index $pages 0).PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
-    {{- range $pages }}
-      <item>
-        <title>{{ .Title }}</title>
-        <link>{{ or .Params.permalink .Permalink }}</link>
-        <pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
-        <guid>{{ or .Params.permalink .Permalink }}</guid>
-        <description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
-      </item>
-    {{- end }}
-  </channel>
-</rss>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
deleted file mode 100644 (file)
index 2e9e4f3..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-{{ define "main" }}
-  {{ $ttop := debug.Timer "single" }}
-  <article class="max-w-5xl lg:max-w-3xl" id="article">
-    {{ partial "layouts/docsheader.html" . }}
-    <div class="content">
-      {{ with .Params.description }}
-        <div class="lead">
-          {{ . | markdownify }}
-        </div>
-      {{ end }}
-      {{ if .Params.show_publish_date }}
-        {{ with .PublishDate }}
-          <p
-            class="text-gray-500 dark:text-gray-400 text-sm/5 md:text-base/2 mb-2 sm:mb-4">
-            {{ partial "layouts/date.html" . }}
-          </p>
-        {{ end }}
-      {{ end }}
-      {{ $t := debug.Timer "single.categories" }}
-      {{ $categories := .GetTerms "categories" }}
-      {{ with $categories }}
-        <div class="mb-4 sm:mb-6 flex flex-wrap gap-2">
-          {{ range . }}
-            {{ $text := .LinkTitle }}
-            {{ $class := "" }}
-            {{ range (slice true false ) }}
-              {{ $color := partial "helpers/funcs/color-from-string.html" (dict "text" $text "dark" . "--single" "green" ) }}
-
-              {{ $prefix := "" }}
-              {{ if . }}
-                {{ $prefix = "dark:" }}
-              {{ end }}
-              {{ $class = printf "%sbg-%s-%d %stext-%s-%d border %sborder-%s-%d"
-                $prefix $color.color $color.shade1
-                $prefix $color.color $color.shade2
-                $prefix $color.color $color.shade3
-              }}
-            {{ end }}
-
-
-            <a
-              href="{{ .RelPermalink }}"
-              class="{{ $class }} text-xs h-auto tracking-widest uppercase font-light not-prose no-underline inline-block py-1 px-3 rounded-xl shadow-xs hover:opacity-80 hover:shadow-none">
-              {{ .LinkTitle }}
-            </a>
-          {{ end }}
-        </div>
-      {{ end }}
-      {{ $t.Stop }}
-
-      {{ if .Params.functions_and_methods.signatures }}
-        <div class="mb-4 not-prose">
-          {{- partial "docs/functions-signatures.html" . -}}
-          {{- partial "docs/functions-return-type.html" . -}}
-          {{- partial "docs/functions-aliases.html" . -}}
-        </div>
-      {{ end }}
-      {{ $t := debug.Timer "single.content" }}
-      {{ .Content }}
-      {{ $t.Stop }}
-      {{ $t := debug.Timer "single.page-edit" }}
-      {{ partial "layouts/page-edit.html" . }}
-      {{ $t.Stop }}
-    </div>
-  </article>
-  {{ $ttop.Stop }}
-{{ end }}
-
-{{ define "rightsidebar_content" }}
-  {{/* in-this-section.html depends on these being reneredc first. */}}
-  {{ $related := partial "layouts/related.html" . }}
-  {{ $toc := partial "layouts/toc.html" . }}
-  {{ if not .Params.hide_in_this_section }}
-    {{ partial "layouts/in-this-section.html" . }}
-  {{ end }}
-  {{ $related }}
-  {{ if $.Store.Get "hasToc" }}
-    {{ $toc }}
-  {{ end }}
-{{ end }}
diff --git a/layouts/_markup/render-blockquote.html b/layouts/_markup/render-blockquote.html
new file mode 100644 (file)
index 0000000..98019e1
--- /dev/null
@@ -0,0 +1,33 @@
+{{- if eq .Type "alert" }}
+  {{- $alerts := dict
+    "caution" (dict "color" "red" "icon" "exclamation-triangle")
+    "important" (dict "color" "blue" "icon" "exclamation-circle")
+    "note" (dict "color" "blue" "icon" "information-circle")
+    "tip" (dict "color" "green" "icon" "light-bulb")
+    "warning" (dict "color" "orange" "icon" "exclamation-triangle")
+  }}
+
+  {{- $alertTypes := slice }}
+  {{- range $k, $_ := $alerts }}
+    {{- $alertTypes = $alertTypes | append $k }}
+  {{- end }}
+  {{- $alertTypes = $alertTypes | sort }}
+
+  {{- $alertType := strings.ToLower .AlertType }}
+  {{- if in $alertTypes $alertType }}
+    {{- partial "layouts/blocks/alert.html" (dict
+      "color" (or ((index $alerts $alertType).color) "blue")
+      "icon" (or ((index $alerts $alertType).icon) "information-circle")
+      "text" .Text
+      "title" .AlertTitle
+      "class" .Attributes.class
+      )
+    }}
+  {{- else }}
+    {{- errorf `Invalid blockquote alert type. Received %s. Expected one of %s (case-insensitive). See %s.` .AlertType (delimit $alertTypes ", " ", or ") .Page.String }}
+  {{- end }}
+{{- else }}
+  <blockquote {{- with .Attributes.class }}class="{{ . }}"{{- end }}>
+    {{ .Text }}
+  </blockquote>
+{{- end }}
diff --git a/layouts/_markup/render-codeblock.html b/layouts/_markup/render-codeblock.html
new file mode 100644 (file)
index 0000000..13725ff
--- /dev/null
@@ -0,0 +1,98 @@
+{{/* prettier-ignore-start */}}
+{{/*
+Renders a highlighted code block using the given options and attributes.
+
+In addition to the options available to the transform.Highlight function, you
+may also specify the following parameters:
+
+@param {bool} [copy=false] Whether to display a copy-to-clipboard button.
+@param {string} [file] The file name to display above the rendered code.
+@param {bool} [details=false] Whether to wrap the highlighted code block within a details element.
+@param {bool} [open=false] Whether to initially display the content of the details element.
+@param {string} [summary=Details] The content of the details summary element rendered from Markdown to HTML.
+
+@returns {template.HTML}
+
+@examples
+
+    ```go
+    fmt.Println("Hello world!")
+    ```
+
+    ```go {linenos=true file="layouts/index.html" copy=true}
+    fmt.Println("Hello world!")
+    ```
+*/}}
+{{/* prettier-ignore-end */}}
+
+{{- $copy := false }}
+{{- $file := or .Attributes.file "" }}
+{{- $details := false }}
+{{- $open := "" }}
+{{- $summary := or .Attributes.summary "Details" | .Page.RenderString }}
+{{- $ext := strings.TrimPrefix "." (path.Ext $file) }}
+{{- $lang := or .Type $ext "text" }}
+{{- if in (slice "html" "gotmpl") $lang }}
+  {{- $lang = "go-html-template" }}
+{{- end }}
+{{- if eq $lang "md" }}
+  {{- $lang = "text" }}
+{{- end }}
+
+{{- with .Attributes.copy }}
+  {{- if in (slice true "true" 1) . }}
+    {{- $copy = true }}
+  {{- else if in (slice false "false" 0) . }}
+    {{- $copy = false }}
+  {{- end }}
+{{- end }}
+
+{{- with .Attributes.details }}
+  {{- if in (slice true "true" 1) . }}
+    {{- $details = true }}
+  {{- else if in (slice false "false" 0) . }}
+    {{- $details = false }}
+  {{- end }}
+{{- end }}
+
+{{- with .Attributes.open }}
+  {{- if in (slice true "true" 1) . }}
+    {{- $open = "open" }}
+  {{- else if in (slice false "false" 0) . }}
+    {{- $open = "" }}
+  {{- end }}
+{{- end }}
+
+{{- if $details }}
+  <details class="cursor-pointer" {{ $open }}>
+  <summary>{{ $summary }}</summary>
+{{- end }}
+
+<div
+  x-data
+  class="render-hook-codeblock font-mono not-prose relative mt-6 mb-8 border-1 border-gray-200 dark:border-gray-800 bg-light dark:bg-dark">
+  {{- $fileSelectClass := "select-none" }}
+  {{- if $copy }}
+    {{- $fileSelectClass = "select-text" }}
+    <svg
+      class="absolute right-4 top-2 z-30 text-blue-600 hover:text-blue-500 dark:text-gray-400 dark:hover:text-gray-300 cursor-pointer w-6 h-6"
+      @click="$copy($refs.code)">
+      <use href="#icon--copy"></use>
+    </svg>
+  {{- end }}
+  {{- with $file }}
+    <div
+      class="san-serif text-sm inline-block leading-none pl-2 py-3 bg-gray-300 dark:bg-slate-700 w-full {{ $fileSelectClass }}
+">
+      {{ . }}
+    </div>
+  {{- end }}
+
+  <div x-ref="code">
+    {{- transform.Highlight (strings.TrimSpace .Inner) $lang .Options }}
+  </div>
+</div>
+
+{{- if $details }}
+  </details>
+{{- end }}
diff --git a/layouts/_markup/render-link.html b/layouts/_markup/render-link.html
new file mode 100644 (file)
index 0000000..7001122
--- /dev/null
@@ -0,0 +1,320 @@
+{{/* prettier-ignore-start */ -}}
+{{- /* Last modified: 2025-01-19T14:44:56-08:00 */}}
+
+{{- /*
+Copyright 2025 Veriphor LLC
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+*/}}
+
+{{- /*
+This render hook resolves internal destinations by looking for a matching:
+
+  1. Content page
+  2. Page resource (a file in the current page bundle)
+  3. Section resource (a file in the current section)
+  4. Global resource (a file in the assets directory)
+
+It skips the section resource lookup if the current page is a leaf bundle.
+
+External destinations are not modified.
+
+You must place global resources in the assets directory. If you have placed
+your resources in the static directory, and you are unable or unwilling to move
+them, you must mount the static directory to the assets directory by including
+both of these entries in your site configuration:
+
+  [[module.mounts]]
+  source = 'assets'
+  target = 'assets'
+
+  [[module.mounts]]
+  source = 'static'
+  target = 'assets'
+
+By default, if this render hook is unable to resolve a destination, including a
+fragment if present, it passes the destination through without modification. To
+emit a warning or error, set the error level in your site configuration:
+
+  [params.render_hooks.link]
+  errorLevel = 'warning' # ignore (default), warning, or error (fails the build)
+
+When you set the error level to warning, and you are in a development
+environment, you can visually highlight broken internal links:
+
+  [params.render_hooks.link]
+  errorLevel = 'warning' # ignore (default), warning, or error (fails the build)
+  highlightBroken = true # true or false (default)
+
+This will add a "broken" class to anchor elements with invalid src attributes.
+Add a rule to your CSS targeting the broken links:
+
+  a.broken {
+    background: #ff0;
+    border: 2px solid #f00;
+    padding: 0.1em 0.2em;
+  }
+
+This render hook may be unable to resolve destinations created with the ref and
+relref shortcodes. Unless you set the error level to ignore you should not use
+either of these shortcodes in conjunction with this render hook.
+
+@context {string} Destination The link destination.
+@context {page} Page A reference to the page containing the link.
+@context {string} PlainText The link description as plain text.
+@context {string} Text The link description.
+@context {string} Title The link title.
+
+@returns {template.html}
+*/ -}}
+{{/* prettier-ignore-end */ -}}
+{{- /* Initialize. */}}
+{{- $renderHookName := "link" }}
+
+{{- /* Verify minimum required version. */}}
+{{- $minHugoVersion := "0.141.0" }}
+{{- if lt hugo.Version $minHugoVersion }}
+  {{- errorf "The %q render hook requires Hugo v%s or later." $renderHookName $minHugoVersion }}
+{{- end }}
+
+{{- /* Error level when unable to resolve destination: ignore, warning, or error. */}}
+{{- $errorLevel := or site.Params.render_hooks.link.errorLevel "ignore" | lower }}
+
+{{- /* If true, adds "broken" class to broken links. Applicable in development environment when errorLevel is warning. */}}
+{{- $highlightBrokenLinks := or site.Params.render_hooks.link.highlightBroken false }}
+
+{{- /* Validate error level. */}}
+{{- if not (in (slice "ignore" "warning" "error") $errorLevel) }}
+  {{- errorf "The %q render hook is misconfigured. The errorLevel %q is invalid. Please check your site configuration." $renderHookName $errorLevel }}
+{{- end }}
+
+{{- /* Determine content path for warning and error messages. */}}
+{{- $contentPath := .Page.String }}
+
+{{- /* Parse destination. */}}
+{{- $u := urls.Parse .Destination }}
+
+{{- /* Set common message. */}}
+{{- $msg := printf "The %q render hook was unable to resolve the destination %q in %s" $renderHookName $u.String $contentPath }}
+
+{{- /* Set attributes for anchor element. */}}
+{{- $attrs := dict "href" $u.String }}
+{{- if eq $u.String "g" }}
+  {{- /* Destination is a glossary term. */}}
+  {{- $ctx := dict
+    "contentPath" $contentPath
+    "errorLevel" $errorLevel
+    "renderHookName" $renderHookName
+    "text" .Text
+  }}
+  {{- $attrs = partial "inline/h-rh-l/get-glossary-link-attributes.html" $ctx }}
+{{- else if $u.IsAbs }}
+  {{- /* Destination is a remote resource. */}}
+  {{- $attrs = merge $attrs (dict "rel" "external") }}
+{{- else }}
+  {{- with $u.Path }}
+    {{- with $p := or ($.PageInner.GetPage .) ($.PageInner.GetPage (strings.TrimRight "/" .)) }}
+      {{- /* Destination is a page. */}}
+      {{- $href := .RelPermalink }}
+      {{- with $u.RawQuery }}
+        {{- $href = printf "%s?%s" $href . }}
+      {{- end }}
+      {{- with $u.Fragment }}
+        {{- $ctx := dict
+          "contentPath" $contentPath
+          "errorLevel" $errorLevel
+          "page" $p
+          "parsedURL" $u
+          "renderHookName" $renderHookName
+        }}
+        {{- partial "inline/h-rh-l/validate-fragment.html" $ctx }}
+        {{- $href = printf "%s#%s" $href . }}
+      {{- end }}
+      {{- $attrs = dict "href" $href }}
+    {{- else with $.PageInner.Resources.Get $u.Path }}
+      {{- /* Destination is a page resource; drop query and fragment. */}}
+      {{- $attrs = dict "href" .RelPermalink }}
+    {{- else with (and (ne $.Page.BundleType "leaf") ($.Page.CurrentSection.Resources.Get $u.Path)) }}
+      {{- /* Destination is a section resource, and current page is not a leaf bundle. */}}
+      {{- $attrs = dict "href" .RelPermalink }}
+    {{- else with resources.Get $u.Path }}
+      {{- /* Destination is a global resource; drop query and fragment. */}}
+      {{- $attrs = dict "href" .RelPermalink }}
+    {{- else }}
+      {{- if eq $errorLevel "warning" }}
+        {{- warnf $msg }}
+        {{- if and $highlightBrokenLinks hugo.IsDevelopment }}
+          {{- $attrs = merge $attrs (dict "class" "broken") }}
+        {{- end }}
+      {{- else if eq $errorLevel "error" }}
+        {{- errorf $msg }}
+      {{- end }}
+    {{- end }}
+  {{- else }}
+    {{- with $u.Fragment }}
+      {{- /* Destination is on the same page; prepend relative permalink. */}}
+      {{- $ctx := dict
+        "contentPath" $contentPath
+        "errorLevel" $errorLevel
+        "page" $.Page
+        "parsedURL" $u
+        "renderHookName" $renderHookName
+      }}
+      {{- partial "inline/h-rh-l/validate-fragment.html" $ctx }}
+      {{- $attrs = dict "href" (printf "%s#%s" $.Page.RelPermalink .) }}
+    {{- else }}
+      {{- if eq $errorLevel "warning" }}
+        {{- warnf $msg }}
+        {{- if and $highlightBrokenLinks hugo.IsDevelopment }}
+          {{- $attrs = merge $attrs (dict "class" "broken") }}
+        {{- end }}
+      {{- else if eq $errorLevel "error" }}
+        {{- errorf $msg }}
+      {{- end }}
+    {{- end }}
+  {{- end }}
+{{- end }}
+
+{{- /* Render anchor element. */ -}}
+<a
+  {{- with .Title }}title="{{ . }}"{{- end }}
+  {{- range $k, $v := $attrs }}
+    {{- if $v }}
+      {{- printf " %s=%q" $k ($v | transform.HTMLEscape) | safeHTMLAttr }}
+    {{- end }}
+  {{- end -}}
+  >{{ .Text }}</a
+>
+
+{{- define "_partials/inline/h-rh-l/validate-fragment.html" }}
+  {{- /*
+    Validates the fragment portion of a link destination.
+
+    @context {string} contentPath The page containing the link.
+    @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.
+  */}}
+
+  {{- /* Initialize. */}}
+  {{- $contentPath := .contentPath }}
+  {{- $errorLevel := .errorLevel }}
+  {{- $p := .page }}
+  {{- $u := .parsedURL }}
+  {{- $renderHookName := .renderHookName }}
+
+  {{- /* Validate. */}}
+  {{- with $u.Fragment }}
+    {{- if $p.Fragments.Identifiers.Contains . }}
+      {{- if gt ($p.Fragments.Identifiers.Count .) 1 }}
+        {{- $msg := printf "The %q render hook detected duplicate heading IDs %q in %s" $renderHookName . $contentPath }}
+        {{- if eq $errorLevel "warning" }}
+          {{- warnf $msg }}
+        {{- else if eq $errorLevel "error" }}
+          {{- errorf $msg }}
+        {{- end }}
+      {{- end }}
+    {{- else }}
+      {{- /* Determine target path for warning and error message. */}}
+      {{- $targetPath := "" }}
+      {{- with $p.File }}
+        {{- $targetPath = .Path }}
+      {{- else }}
+        {{- $targetPath = .Path }}
+      {{- end }}
+      {{- /* Set common message. */}}
+      {{- $msg := printf "The %q render hook was unable to find heading ID %q in %s. See %s" $renderHookName . $targetPath $contentPath }}
+      {{- if eq $targetPath $contentPath }}
+        {{- $msg = printf "The %q render hook was unable to find heading ID %q in %s" $renderHookName . $targetPath }}
+      {{- end }}
+      {{- /* Throw warning or error. */}}
+      {{- if eq $errorLevel "warning" }}
+        {{- warnf $msg }}
+      {{- else if eq $errorLevel "error" }}
+        {{- errorf $msg }}
+      {{- end }}
+    {{- end }}
+  {{- end }}
+{{- end }}
+
+{{- define "_partials/inline/h-rh-l/get-glossary-link-attributes.html" }}
+  {{- /*
+    Returns the anchor element attributes for a link to the given glossary term.
+
+    It first checks for the existence of a glossary page for the given term. If
+    no page is found, it then checks for a glossary page for the singular form of
+    the term. If neither page exists it throws a warning or error dependent on
+    the errorLevel setting
+
+    The returned href attribute does not point to the glossary term page.
+    Instead, via its fragment, it points to an entry on the glossary page.
+
+    @context {string} contentPath The page containing the link.
+    @context {string} errorLevel The error level when unable to resolve destination; ignore (default), warning, or error.
+    @context {string} renderHookName The name of the render hook.
+    @context {string} text The link text.
+  */}}
+
+  {{- /* Get context.. */}}
+  {{- $contentPath := .contentPath }}
+  {{- $errorLevel := .errorLevel }}
+  {{- $renderHookName := .renderHookName }}
+  {{- $text := .text | transform.Plainify | strings.ToLower }}
+
+  {{- /* Initialize. */}}
+  {{- $glossaryPath := "/quick-reference/glossary" }}
+  {{- $termGiven := $text }}
+  {{- $termActual := "" }}
+  {{- $termSingular := inflect.Singularize $termGiven }}
+
+  {{- /* Verify that the glossary page exists. */}}
+  {{- $glossaryPage := site.GetPage $glossaryPath }}
+  {{- if not $glossaryPage }}
+    {{- errorf "The %q render hook was unable to find %s: see %s" $renderHookName $glossaryPath $contentPath }}
+  {{- end }}
+
+  {{- /* There's a better way to handle this, but it works for now. */}}
+  {{- $cheating := dict
+    "chaining" "chain"
+    "localize" "localization"
+    "localized" "localization"
+    "paginating" "paginate"
+    "walking" "walk"
+    "ci/cd" "cicd"
+  }}
+
+  {{- /* Verify that a glossary term page exists for the given term. */}}
+  {{- if site.GetPage (urls.JoinPath $glossaryPath ($termGiven | urlize)) }}
+    {{- $termActual = $termGiven }}
+  {{- else if site.GetPage (urls.JoinPath $glossaryPath ($termSingular | urlize)) }}
+    {{- $termActual = $termSingular }}
+  {{- else }}
+    {{- $termToTest := index $cheating $termGiven }}
+    {{- if site.GetPage (urls.JoinPath $glossaryPath ($termToTest | urlize)) }}
+      {{- $termActual = $termToTest }}
+    {{- end }}
+  {{- end }}
+
+  {{- if not $termActual }}
+    {{- errorf "The %q render hook was unable to find a glossary page for either the singular or plural form of the term %q: see %s" $renderHookName $termGiven $contentPath }}
+  {{- end }}
+
+  {{- /* Create the href attribute. */}}
+  {{- $href := "" }}
+  {{- if $termActual }}
+    {{- $href = fmt.Printf "%s#%s" $glossaryPage.RelPermalink (anchorize $termActual) }}
+  {{- end }}
+
+  {{- return (dict "href" $href) }}
+{{- end -}}
diff --git a/layouts/_markup/render-passthrough.html b/layouts/_markup/render-passthrough.html
new file mode 100644 (file)
index 0000000..0ed0011
--- /dev/null
@@ -0,0 +1,9 @@
+{{- $opts := dict "output" "htmlAndMathml" "displayMode" (eq .Type "block") }}
+{{- with try (transform.ToMath .Inner $opts) }}
+  {{- with .Err }}
+    {{ errorf "Unable to render mathematical markup to HTML using the transform.ToMath function. The KaTeX display engine threw the following error: %s: see %s." . $.Position }}
+  {{- else }}
+    {{- .Value }}
+    {{- $.Page.Store.Set "hasMath" true }}
+  {{- end }}
+{{- end -}}
diff --git a/layouts/_markup/render-table.html b/layouts/_markup/render-table.html
new file mode 100644 (file)
index 0000000..7f3a886
--- /dev/null
@@ -0,0 +1,31 @@
+<div class="overflow-x-auto">
+  <table
+    {{- range $k, $v := .Attributes }}
+      {{- if $v }}
+        {{- printf " %s=%q" $k $v | safeHTMLAttr }}
+      {{- end }}
+    {{- end }}>
+    <thead>
+      {{- range .THead }}
+        <tr>
+          {{- range . }}
+            <th {{- with .Alignment }} class="!text-{{ . }}"{{- end }}>
+              {{- .Text -}}
+            </th>
+          {{- end }}
+        </tr>
+      {{- end }}
+    </thead>
+    <tbody>
+      {{- range .TBody }}
+        <tr>
+          {{- range . }}
+            <td {{- with .Alignment }} class="!text-{{ . }}"{{- end }}>
+              {{- .Text -}}
+            </td>
+          {{- end }}
+        </tr>
+      {{- end }}
+    </tbody>
+  </table>
+</div>
diff --git a/layouts/_partials/docs/functions-aliases.html b/layouts/_partials/docs/functions-aliases.html
new file mode 100644 (file)
index 0000000..b3a5a76
--- /dev/null
@@ -0,0 +1,12 @@
+{{- with .Params.functions_and_methods.aliases }}
+  {{- $label := "Alias" }}
+  {{- if gt (len .) 1 }}
+    {{- $label = "Aliases" }}
+  {{- end }}
+  <p class="font-bold text-dark dark:text-light mt-2">{{ $label }}</p>
+  {{- range . }}
+    <div class="font-sm font-mono ml-3 sm:ml-6 mt-0 sm:mt-1">
+      {{- . -}}
+    </div>
+  {{- end }}
+{{- end -}}
diff --git a/layouts/_partials/docs/functions-return-type.html b/layouts/_partials/docs/functions-return-type.html
new file mode 100644 (file)
index 0000000..75c97f8
--- /dev/null
@@ -0,0 +1,6 @@
+{{- with .Params.functions_and_methods.returnType }}
+  <p class="font-bold text-dark dark:text-light mt-2">Returns</p>
+  <div class="font-sm font-mono ml-3 sm:ml-6 mt-0 sm:mt-1">
+    {{- . -}}
+  </div>
+{{- end -}}
diff --git a/layouts/_partials/docs/functions-signatures.html b/layouts/_partials/docs/functions-signatures.html
new file mode 100644 (file)
index 0000000..6fb61df
--- /dev/null
@@ -0,0 +1,12 @@
+{{- with .Params.functions_and_methods.signatures }}
+  <p class="font-bold text-dark dark:text-light">Syntax</p>
+  {{- range . }}
+    {{- $signature := . }}
+    {{- if $.Params.function.returnType }}
+      {{- $signature = printf "%s ⟼ %s" . $.Params.function.returnType }}
+    {{- end }}
+    <div class="font-sm font-mono ml-3 sm:ml-6 mt-0 sm:mt-1">
+      {{- $signature -}}
+    </div>
+  {{- end }}
+{{- end -}}
diff --git a/layouts/_partials/helpers/debug/list-item-metadata.html b/layouts/_partials/helpers/debug/list-item-metadata.html
new file mode 100644 (file)
index 0000000..d027484
--- /dev/null
@@ -0,0 +1,23 @@
+<span class="h-3"></span>
+<table class="mt-auto">
+  <tbody>
+    <tr>
+      <td class="align-top text-red-700">weight:</td>
+      <td class="align-top pl-2 w-full">
+        {{ .Weight }}
+      </td>
+    </tr>
+    <tr>
+      <td class="align-top text-red-700">keywords:</td>
+      <td class="align-top pl-2">
+        {{ delimit (or .Keywords "") ", " }}
+      </td>
+    </tr>
+    <tr>
+      <td class="align-top text-red-700">categories:</td>
+      <td class="align-top pl-2">
+        {{ delimit (or .Params.categories "") ", " }}
+      </td>
+    </tr>
+  </tbody>
+</table>
diff --git a/layouts/_partials/helpers/funcs/color-from-string.html b/layouts/_partials/helpers/funcs/color-from-string.html
new file mode 100644 (file)
index 0000000..cd59953
--- /dev/null
@@ -0,0 +1,25 @@
+{{ $colors := slice  "slate" "green" "cyan" "blue" }}
+{{ with .single }}
+  {{ $colors = slice . }}
+{{ end }}
+
+{{ $shades := slice 300 400 500 }}
+{{ if not .dark }}
+  {{ $shades = slice 700 800 }}
+{{ end }}
+{{ $hash := (hash.FNV32a .text) }}
+{{ $i := mod $hash (len $colors) }}
+{{ $j := mod $hash (len $shades) }}
+{{ $color := index $colors $i }}
+{{ $shade1 := index $shades $j }}
+{{ $shade2 := 0 }}
+{{ $shade3 := 0 }}
+{{ if gt $shade1 500 }}
+  {{ $shade2 =  math.Min (sub $shade1 500) 100 | int }}
+  {{ $shade3 =  sub $shade1 100 }}
+{{ else }}
+  {{ $shade2 = math.Max (add $shade1 500) 700 | int }}
+  {{ $shade3 = add $shade1 200 }}
+{{ end }}
+{{ $res := dict  "color" $color "shade1" $shade1  "shade2" $shade2 "shade3" $shade3 }}
+{{ return $res }}
diff --git a/layouts/_partials/helpers/funcs/get-github-info.html b/layouts/_partials/helpers/funcs/get-github-info.html
new file mode 100644 (file)
index 0000000..7e2dc89
--- /dev/null
@@ -0,0 +1,28 @@
+{{ $url := "https://api.github.com/repos/gohugoio/hugo" }}
+{{ $cacheKey := print $url (now.Format "2006-01-02") }}
+{{ $headers := dict }}
+{{ with os.Getenv "HUGO_GH_TOKEN" }}
+  {{ $headers = dict "Authorization" (printf "Bearer %s" .) }}
+{{ end }}
+{{ $opts := dict "headers" $headers "key" $cacheKey }}
+{{ $githubRepoInfo := dict }}
+{{ with try (resources.GetRemote $url $opts) }}
+  {{ with .Err }}
+    {{ warnf "Failed to get GitHub repo info: %s" . }}
+  {{ else with (.Value | transform.Unmarshal) }}
+    {{ $githubRepoInfo = dict
+      "html_url"  .html_url
+      "stargazers_url" .stargazers_url
+      "watchers_count" .watchers_count
+      "stargazers_count" .stargazers_count
+      "forks_count" .forks_count
+      "contributors_url" .contributors_url
+      "releases_url" .releases_url
+      "forks_count" .forks_count
+      }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
+  {{ end }}
+{{ end }}
+
+{{ return $githubRepoInfo }}
diff --git a/layouts/_partials/helpers/funcs/get-remote-data.html b/layouts/_partials/helpers/funcs/get-remote-data.html
new file mode 100644 (file)
index 0000000..ed70434
--- /dev/null
@@ -0,0 +1,24 @@
+{{/* prettier-ignore-start */ -}}
+{{/*
+Parses the serialized data from the given URL and returns a map or an array.
+
+Supports CSV, JSON, TOML, YAML, and XML.
+
+@param {string} . The URL from which to retrieve the serialized data.
+@returns {any}
+
+@example {{ partial "get-remote-data.html" "https://example.org/foo.json" }}
+*/}}
+{{/* prettier-ignore-end */ -}}
+{{ $url := . }}
+{{ $data := dict }}
+{{ with try (resources.GetRemote $url) }}
+  {{ with .Err }}
+    {{ errorf "%s" . }}
+  {{ else with .Value }}
+    {{ $data = .Content | transform.Unmarshal }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
+  {{ end }}
+{{ end }}
+{{ return $data }}
diff --git a/layouts/_partials/helpers/gtag.html b/layouts/_partials/helpers/gtag.html
new file mode 100644 (file)
index 0000000..59bf36b
--- /dev/null
@@ -0,0 +1,27 @@
+{{ with site.Config.Services.GoogleAnalytics.ID }}
+  <script
+    async
+    src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
+<script>
+  window.dataLayer = window.dataLayer || [];
+  function gtag(){dataLayer.push(arguments);}
+  gtag('js', new Date());
+
+  {{ $site := site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+).*" "$2" }}
+  gtag('config', '{{ . }}', {'anonymize_ip': true, 'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'});
+
+/**
+* Function that tracks a click on an outbound link in Analytics.
+* Setting the transport method to 'beacon' lets the hit be sent
+* using 'navigator.sendBeacon' in browser that support it.
+*/
+var trackOutboundLink = function(id, url) {
+  gtag('event', 'click', {
+    'event_category': 'outbound',
+    'event_label': id,
+    'transport_type': 'beacon'
+  });
+}
+
+</script>
+{{ end }}
diff --git a/layouts/_partials/helpers/linkcss.html b/layouts/_partials/helpers/linkcss.html
new file mode 100644 (file)
index 0000000..814d2b5
--- /dev/null
@@ -0,0 +1,28 @@
+{{ $r := .r }}
+{{ $attr := .attributes | default dict }}
+
+{{ if hugo.IsDevelopment }}
+  <link
+    rel="stylesheet"
+    href="{{ $r.RelPermalink }}"
+    {{ template `render-attributes` $attr }}>
+{{ else }}
+  {{ with $r | minify | fingerprint }}
+    <link
+      rel="stylesheet"
+      href="{{ .RelPermalink }}"
+      integrity="{{ .Data.Integrity }}"
+      crossorigin="anonymous"
+      {{ template `render-attributes` $attr }}>
+  {{ end }}
+{{ end }}
+
+{{ define "render-attributes" }}
+  {{- range $k, $v := . -}}
+    {{- if $v -}}
+      {{- printf ` %s=%q` $k $v | safeHTMLAttr -}}
+    {{- else -}}
+      {{- printf ` %s` $k | safeHTMLAttr -}}
+    {{- end -}}
+  {{- end -}}
+{{ end }}
diff --git a/layouts/_partials/helpers/linkjs.html b/layouts/_partials/helpers/linkjs.html
new file mode 100644 (file)
index 0000000..00129ad
--- /dev/null
@@ -0,0 +1,15 @@
+{{ $r := .r }}
+{{ $attr := .attributes | default dict }}
+{{ if hugo.IsDevelopment }}
+  <script
+    src="{{ $r.RelPermalink }}"
+    {{ template `render-attributes` $attr }}></script>
+{{ else }}
+  {{ with $r | fingerprint }}
+    <script
+      src="{{ .RelPermalink }}"
+      integrity="{{ .Data.Integrity }}"
+      crossorigin="anonymous"
+      {{ template `render-attributes` $attr }}></script>
+  {{ end }}
+{{ end }}
diff --git a/layouts/_partials/helpers/picture.html b/layouts/_partials/helpers/picture.html
new file mode 100644 (file)
index 0000000..4dc16c0
--- /dev/null
@@ -0,0 +1,27 @@
+{{ $image := .image }}
+{{ $width := .width | default 1000 }}
+{{ $width1x := div $width 2 }}
+{{ $imageWebp := $image.Resize (printf "%dx webp" $width) }}
+{{ $image1x := $image.Resize (printf "%dx" $width1x) }}
+{{ $image1xWebp := $image.Resize (printf "%dx webp" $width1x) }}
+{{ $class := .class | default "h-64 tablet:h-96 lg:h-full w-full object-cover lg:absolute" }}
+{{ $loading := .loading | default "eager" }}
+<picture>
+  <source
+    srcset="{{ $imageWebp.RelPermalink }}"
+    type="image/webp"
+    media="(min-width: 1200px)">
+  <source
+    srcset="{{ $image.RelPermalink }}"
+    type="image/jpeg"
+    media="(min-width: 1200px)">
+  <source srcset="{{ $image1xWebp.RelPermalink }}" type="image/webp">
+  <source srcset="{{ $image1x.RelPermalink }}" type="image/jpeg">
+  <img
+    class="{{ $class }}"
+    src="{{ $image1x.RelPermalink }}"
+    alt=""
+    loading="{{ $loading }}"
+    width="{{ $image1x.Width }}"
+    height="{{ $image1x.Height }}">
+</picture>
diff --git a/layouts/_partials/helpers/validation/validate-keywords.html b/layouts/_partials/helpers/validation/validate-keywords.html
new file mode 100644 (file)
index 0000000..3447ec4
--- /dev/null
@@ -0,0 +1,22 @@
+{{/* prettier-ignore-start */ -}}
+{{- /*
+We use the front matter keywords field to determine related content. To ensure
+consistency, during site build we validate each keyword against the entries in
+data/keywords.yaml.
+
+As of March 5, 2025, this feature is experimental, pending usability
+assessment. We anticipate that the number of additions to data/keywords.yaml
+will decrease over time, though the initial implementation will require some
+effort.
+*/}}
+{{/* prettier-ignore-end */ -}}
+{{- $t := debug.Timer "validateKeywords" }}
+{{- $allowedKeywords := collections.Apply site.Data.keywords "strings.ToLower" "." }}
+{{- range $p := site.Pages }}
+  {{- range .Params.keywords }}
+    {{- if not (in $allowedKeywords (lower .)) }}
+      {{- warnf "The word or phrase %q is not in the keywords data file. See %s." . $p.Page.String }}
+    {{- end }}
+  {{- end }}
+{{- end }}
+{{- $t.Stop }}
diff --git a/layouts/_partials/layouts/blocks/alert.html b/layouts/_partials/layouts/blocks/alert.html
new file mode 100644 (file)
index 0000000..45f0044
--- /dev/null
@@ -0,0 +1,25 @@
+{{- $title := .title | default "" }}
+{{- $color := .color | default "yellow" }}
+{{- $icon := .icon | default "exclamation-triangle" }}
+{{- $text := .text | default "" }}
+{{- $class := .class | default "mt-6 mb-8" }}
+<div
+  class="border-l-4 overflow-x-auto border-{{ $color }}-400 bg-{{ $color }}-50 dark:bg-{{ $color }}-950 border-1 border-{{ $color }}-100 dark:border-{{ $color }}-900 p-4 {{ $class }}">
+  <div class="flex">
+    <div class="shrink-0">
+      <svg class="fill-{{ $color }}-500 dark:fill-{{ $color }}-400 h-7 w-7">
+        <use href="#icon--{{ $icon }}"></use>
+      </svg>
+    </div>
+    <div class="ml-3">
+      {{- with $title }}
+        <h3 class="text-{{ $color }}-800">
+          {{ . }}
+        </h3>
+      {{- end }}
+      <div class="mt-2">
+        {{ $text }}
+      </div>
+    </div>
+  </div>
+</div>
diff --git a/layouts/_partials/layouts/blocks/modal.html b/layouts/_partials/layouts/blocks/modal.html
new file mode 100644 (file)
index 0000000..7d825c0
--- /dev/null
@@ -0,0 +1,30 @@
+<div x-data="{open: false}">
+  <div @click="open = true">
+    {{ .modal_button }}
+  </div>
+  <div
+    x-cloak
+    x-show="open"
+    x-transition:enter.opacity.duration.200ms
+    x-transition:leave.opacity.duration.300ms
+    x-trap.inert.noscroll="open"
+    @keydown.esc.window="open = false"
+    @click.self="open = false"
+    class="fixed inset-0 z-30 flex items-end justify-center bg-black/50 pb-8 backdrop-blur-xs sm:items-center"
+    role="dialog"
+    aria-modal="true"
+    aria-label="Modal">
+    <div
+      x-show="open"
+      x-transition:enter.opacity.scale.60.origin.top.right.duration.300ms.delay.200ms
+      class="flex content-center items-center justify-center max-w-lg flex-col overflow-hidden bg-white dark:bg-blue-950 border-2 border-gray-300 dark:border-gray-800 shadow-lg sm:shadow-xl">
+      <div
+        class="border-b border-outline border-gray-300 dark:border-gray-800 p-2 lg:p-4">
+        <h3 class="text-sm font-semibold">
+          {{ .modal_title }}
+        </h3>
+      </div>
+      {{ .modal_content }}
+    </div>
+  </div>
+</div>
diff --git a/layouts/_partials/layouts/breadcrumbs.html b/layouts/_partials/layouts/breadcrumbs.html
new file mode 100644 (file)
index 0000000..69bcf7b
--- /dev/null
@@ -0,0 +1,44 @@
+{{ $documentation := site.GetPage "/documentation" }}
+
+
+<nav aria-label="breadcrumb" class="flex breadcrumbs">
+  <ol class="inline-flex items-center flex-wrap tracking-tight">
+    {{ $currentSection := .CurrentSection }}
+    {{ $ancestors := .Ancestors.Reverse }}
+    {{ range $i, $p := $ancestors }}
+      {{ $isCurrentSection := eq $p $currentSection }}
+      {{/* We currently have a slightly odd structure. */}}
+      {{ if eq $p site.Home }}
+        {{ $p = $documentation }}
+      {{ end }}
+      <li class="flex items-center">
+        {{ $isLast := eq $i (sub (len $ancestors) 1) }}
+        <a
+          href="{{ $p.RelPermalink }}"
+          class="truncate text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 {{ if $isCurrentSection }}
+            current-section
+          {{ end }}"
+          >{{ $p.LinkTitle }}</a
+        >
+        {{ if ne $ $documentation }}
+          {{ template "breadcrumbs-arrow" . }}
+        {{ end }}
+      </li>
+    {{ end }}
+    {{ if ne $ $documentation }}
+      {{ $isCurrentSection := eq $ $currentSection }}
+      <li
+        class="truncate text-gray-700 dark:text-gray-300 {{ if $isCurrentSection }}
+          current-section
+        {{ end }}">
+        {{ $.LinkTitle }}
+      </li>
+    {{ end }}
+  </ol>
+</nav>
+
+{{ define "breadcrumbs-arrow" }}
+  <svg class="fill-gray-500 dark:fill-gray-100 w-3 h-3 mx-2">
+    <use href="#icon--chevron-right"></use>
+  </svg>
+{{ end }}
diff --git a/layouts/_partials/layouts/date.html b/layouts/_partials/layouts/date.html
new file mode 100644 (file)
index 0000000..2ec1450
--- /dev/null
@@ -0,0 +1,5 @@
+{{ $humanDate := time.Format "January 2, 2006" . }}
+{{ $machineDate := time.Format "2006-01-02T15:04:05-07:00" . }}
+<time {{ printf "datetime=%q" $machineDate | safeHTMLAttr }}>
+  {{ $humanDate }}
+</time>
diff --git a/layouts/_partials/layouts/docsheader.html b/layouts/_partials/layouts/docsheader.html
new file mode 100644 (file)
index 0000000..7e8e950
--- /dev/null
@@ -0,0 +1,9 @@
+<header>
+  {{ partial "layouts/breadcrumbs.html" . }}
+  {{ if and .IsPage (not (eq .Layout "list")) }}
+    <h1
+      class="font-display mt-6 sm:mt-8 text-3xl tracking-tight text-slate-900 dark:text-white">
+      {{ .Title }}
+    </h1>
+  {{ end }}
+</header>
diff --git a/layouts/_partials/layouts/explorer.html b/layouts/_partials/layouts/explorer.html
new file mode 100644 (file)
index 0000000..bb6f8e9
--- /dev/null
@@ -0,0 +1,47 @@
+{{/* This is currently not in use, but kept in case I change my mind. */}}
+<nav
+  role="navigation"
+  id="explorer"
+  class="overflow-x-hidden w-54"
+  x-data="explorer"
+  data-turbo-permanent
+  @turbo:load.window="onLoad()"
+  @turbo:before-render.window="onBeforeRender()"
+  x-cloak>
+  <ul class="w-full">
+    {{ $root := site.GetPage "/" }}
+    {{ template "docs-explorer-section" (dict "p" $root "level" 0 ) }}
+  </ul>
+</nav>
+
+{{ define "docs-explorer-section" }}
+  {{ $p := .p }}
+  {{ $level := .level }}
+  {{ $pleft := $level }}
+  {{ if gt $level 0 }}
+    {{ $pleft = add $level 1 }}
+  {{ end }}
+  {{ $pl := printf "pl-%d" $pleft }}
+  {{ $pages := $p.Sections }}
+
+  {{ range $pages }}
+    {{ $hasChildren := gt (len .Pages) 0 }}
+    {{ $class := cond (eq $level 0) "text-primary hover:text-primary/70" "text-gray-900 dark:text-gray-400 hover:dark:text-gray-300" }}
+    <li class="w-full">
+      <a
+        @click="toggleNode('{{ .RelPermalink }}')"
+        href="{{ .RelPermalink }}"
+        x-ref="{{ .RelPermalink }}"
+        :class="isCurrent('{{ .RelPermalink }}') ? 'font-bold underline': 'font-normal'"
+        class="block cursor-pointer {{ $pl }} {{ $class }} focus:font-bold hover:underline focus:underline tracking-tight leading-7">
+        {{ .LinkTitle }}
+      </a>
+      {{ if $hasChildren }}
+        <ul class="w-full" x-show="isOpen('{{ .RelPermalink }}')">
+          {{ template "docs-explorer-section" (dict "p" . "level" (add $level 1)) }}
+        </ul>
+      {{ end }}
+    </li>
+  {{ end }}
+
+{{ end }}
diff --git a/layouts/_partials/layouts/footer.html b/layouts/_partials/layouts/footer.html
new file mode 100644 (file)
index 0000000..1b17e44
--- /dev/null
@@ -0,0 +1,73 @@
+<footer
+  class="print:hidden bg-blue-950 mt-8 sm:mt-24 border-t-1 border-gray-800">
+  <div class="mx-auto max-w-7xl pt-16 pb-8 sm:pt-18 lg:pt-20">
+    <div class="xl:grid xl:grid-cols-3 xl:gap-8">
+      {{/* Column 1 */}}
+      <div class="flex flex-col items-center justify-between space-y-8">
+        <div class="text-gray-200">
+          By the
+          <a
+            href="https://github.com/gohugoio/hugo/graphs/contributors"
+            class="text-blue-300 hover:underline"
+            >Hugo Authors</a
+          ><br>
+        </div>
+
+        <img
+          src="/images/hugo-logo-wide.svg"
+          alt="Hugo Logo"
+          class="aspect-3/1 w-40">
+
+        <ul class="space-y-2 text-gray-200">
+          <li class="hover:text-white">
+            <a href="https://fosstodon.org/@gohugoio" class="">@GoHugoIO</a>
+          </li>
+          <li class="hover:text-white">
+            <a href="https://twitter.com/spf13" class="">@spf13</a>
+          </li>
+          <li class="hover:text-white">
+            <a href="https://twitter.com/bepsays" class="">@bepsays</a>
+          </li>
+          <li class="mt-6">
+            <a
+              href="https://github.com/gohugoio/hugo/issues/new"
+              class="text-sm/6 text-gray-200 hover:text-white"
+              >File an issue</a
+            >
+          </li>
+          <li>
+            <a
+              href="https://discourse.gohugo.io/"
+              class="text-sm/6 text-gray-200 hover:text-white"
+              >Get help</a
+            >
+          </li>
+          <li>
+            <a
+              href="https://themes.gohugo.io/"
+              class="text-sm/6 text-gray-200 hover:text-white"
+              >Find a theme</a
+            >
+          </li>
+        </ul>
+      </div>
+
+      {{/* Sponsors */}}
+      <div
+        class="mt-16 xl:mt-0 col-span-2 text-gray-200 max-w-3xl flex items-center content-center justify-center mx-auto">
+        {{ partial "layouts/home/sponsors.html"  (dict
+          "ctx" .
+          "gtag" "footer"
+
+          )
+        }}
+      </div>
+    </div>
+    <div class="mt-16 border-t border-white/10 pt-8 sm:mt-20 lg:mt-24">
+      <p class="text-sm/6 text-gray-200">
+        The Hugo logos are copyright © Steve Francia 2013–{{ now.Year }}. The
+        Hugo Gopher is based on an original work by Renée French.
+      </p>
+    </div>
+  </div>
+</footer>
diff --git a/layouts/_partials/layouts/head/head-js.html b/layouts/_partials/layouts/head/head-js.html
new file mode 100644 (file)
index 0000000..d83efcd
--- /dev/null
@@ -0,0 +1,11 @@
+{{ $githubInfo := partialCached "helpers/funcs/get-github-info.html" . "-" }}
+{{ $opts := dict "minify" true }}
+{{ with resources.Get "js/head-early.js" | js.Build $opts }}
+  {{ partial "helpers/linkjs.html" (dict "r" . "attributes" (dict "async" "")) }}
+{{ end }}
+{{ with resources.Get "js/main.js" | js.Build $opts }}
+  {{ partial "helpers/linkjs.html" (dict "r" . "attributes" (dict "defer" "")) }}
+{{ end }}
+{{ with resources.Get "js/turbo.js" | js.Build $opts }}
+  {{ partial "helpers/linkjs.html" (dict "r" . "attributes" (dict "defer" "")) }}
+{{ end }}
diff --git a/layouts/_partials/layouts/head/head.html b/layouts/_partials/layouts/head/head.html
new file mode 100644 (file)
index 0000000..bb27f6a
--- /dev/null
@@ -0,0 +1,49 @@
+<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
+{{ hugo.Generator }}
+
+{{ if hugo.IsProduction }}
+  <meta name="robots" content="index, follow" />
+{{ else }}
+  <meta name="robots" content="noindex, nofollow" />
+{{ end }}
+
+<title>
+  {{ with .Title }}{{ . }} |{{ end }}
+  {{ .Site.Title }}
+</title>
+
+<link rel=apple-touch-icon sizes=180x180 href=/apple-touch-icon.png>
+<link rel=icon type=image/png href=/favicon-32x32.png sizes=32x32>
+<link rel=icon type=image/png href=/favicon-16x16.png sizes=16x16>
+<link rel=manifest href=/manifest.json>
+<link rel=mask-icon href=/safari-pinned-tab.svg color=#0594cb>
+
+<meta name="turbo-prefetch" content="true">
+<meta name="view-transition" content="same-origin">
+
+{{ range .AlternativeOutputFormats -}}
+  <link
+    rel="{{ .Rel }}"
+    type="{{ .MediaType.Type }}"
+    href="{{ .RelPermalink | safeURL }}" />
+{{ end -}}
+
+
+<meta
+  name="description"
+  content="{{ with .Description }}
+    {{ . }}
+  {{ else }}
+    {{ with .Site.Params.description }}{{ . }}{{ end }}
+  {{ end }}
+    " />
+
+
+
+{{ partial "opengraph/opengraph.html" . }}
+{{- template "_internal/schema.html" . -}}
+{{- template "_internal/twitter_cards.html" . -}}
+
+{{ if hugo.IsProduction }}
+  {{ partial "helpers/gtag.html" . }}
+{{ end }}
diff --git a/layouts/_partials/layouts/header/githubstars.html b/layouts/_partials/layouts/header/githubstars.html
new file mode 100644 (file)
index 0000000..75db568
--- /dev/null
@@ -0,0 +1,16 @@
+{{ with partialCached "helpers/funcs/get-github-info.html" . "-" }}
+  <a
+    href="{{ .html_url | safeURL }}"
+    target="_blank"
+    class="font-normal font-mono  tracking-tighter     flex items-center bg-gray-100 hover:bg-gray-200 dark:bg-gray-600 dark:hover:bg-gray-700 text-sm text-black dark:text-white h-10 border-none cursor-pointer relative py-1 px-2 rounded-md"
+    aria-label="Star on GitHub">
+    <svg class="mr-[4px] fill-gray-800 dark:fill-gray-100 w-6 h-6">
+      <use href="#icon--github"></use>
+    </svg>
+    <span class="hidden md:inline mr-[3px]">Star</span>
+    <span class="hidden md:inline">{{ .stargazers_count }}</span>
+    <span class="inline md:hidden">
+      {{ printf "%0.1fk" (div .stargazers_count 1000) }}
+    </span>
+  </a>
+{{ end }}
diff --git a/layouts/_partials/layouts/header/header.html b/layouts/_partials/layouts/header/header.html
new file mode 100644 (file)
index 0000000..0d2e720
--- /dev/null
@@ -0,0 +1,44 @@
+<header
+  x-data="navbar"
+  class="print:hidden sticky top-0 z-50 bg-blue-950 flex flex-none flex-wrap items-center justify-between px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 sm:px-6 lg:px-8 dark:shadow-none"
+  :class="$store.nav.scroll.atTop ? '': 'bg-blue-950/80'">
+  <div class="relative flex basis-0 items-center mr-2 lg:mr-8">
+    {{ with site.Home }}
+      <a
+        class="text-white text-xl font-bold upper"
+        href="{{ .RelPermalink }}"
+        aria-label="{{ .LinkTitle }}"
+        >HUGO</a
+      >
+    {{ end }}
+  </div>
+  <div
+    class=" relative flex flex-grow basis-0 items-center min-w-24 max-w-3xl overflow-x-auto">
+    {{ range .Site.Menus.global }}
+      <a
+        href="{{ .URL }}"
+        class="font-semibold text-gray-300 hover:text-gray-400 ml-4"
+        >{{ .Name }}</a
+      >
+    {{ end }}
+
+  </div>
+
+  <div class="-my-5 pl-2 grow-0">
+    {{/* Search. */}}
+    {{ partial "layouts/search/input.html" . }}
+  </div>
+  <div
+    class="relative ml-0 md:ml-8 flex basis-0 justify-end gap-0 sm:gap-1 xl:grow-1">
+    {{/* QR code. */}}
+    {{ partial "layouts/header/qr.html" . }}
+    {{/* Theme selector. */}}
+    {{ partial "layouts/header/theme.html" . }}
+
+    {{/* Social. */}}
+    <div
+      class="hidden sm:block ml-2 sm:ml-6 h-6 fill-slate-400 group-hover:fill-slate-500 dark:group-hover:fill-slate-300">
+      {{ partial "layouts/header/githubstars.html" . }}
+    </div>
+  </div>
+</header>
diff --git a/layouts/_partials/layouts/header/qr.html b/layouts/_partials/layouts/header/qr.html
new file mode 100644 (file)
index 0000000..fea64f6
--- /dev/null
@@ -0,0 +1,25 @@
+{{ $t := debug.Timer "qr" }}
+{{ $qr := partial "_inline/qr" (dict
+  "page" $
+  "img_class" "w-10 bg-white view-transition-qr" )
+}}
+{{ $qrBig := partial "_inline/qr" (dict "page" $ "img_class" "w-64 p-4") }}
+{{ $t.Stop }}
+<div
+  class="hidden lg:block cursor-pointer outline-2 hover:outline-3 outline-blue-500 w-10 h-10">
+  {{ partial "layouts/blocks/modal.html"  (dict "modal_button" $qr "modal_content" $qrBig "modal_title" (printf "QR code linking to %s" $.Permalink )) }}
+</div>
+
+{{ define "_partials/_inline/qr" }}
+  {{ $img_class := .img_class | default "w-10" }}
+  {{ with images.QR $.page.Permalink (dict "targetDir" "images/qr") }}
+
+    <img
+      src="{{ .RelPermalink }}"
+      width="{{ .Width }}"
+      height="{{ .Height }}"
+      @load="$event.target.classList.remove('_opacity-0')"
+      alt="QR code linking to {{ $.page.Permalink }}"
+      class="{{ $img_class }}">
+  {{ end }}
+{{ end }}
diff --git a/layouts/_partials/layouts/header/theme.html b/layouts/_partials/layouts/header/theme.html
new file mode 100644 (file)
index 0000000..e0b356d
--- /dev/null
@@ -0,0 +1,35 @@
+<div class="ml-2 sm:ml-6 flex items-center" x-data>
+  <button
+    @click="$store.nav.userSettings.toggleColorScheme()"
+    aria-label="Toggle color scheme"
+    id="theme-toggle"
+    type="button"
+    class="inline-flex cursor-pointer items-center p-2 bg-orange-600 hover:bg-orange-700 dark:bg-gray-600 dark:hover:bg-gray-700 border border-transparent rounded-full shadow-sm text-white hover:text-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500">
+    <svg
+      aria-hidden="true"
+      class="w-3 h-3 sm:w-5 sm:h-5"
+      fill="none"
+      stroke="currentColor"
+      viewBox="0 0 24 24"
+      xmlns="http://www.w3.org/2000/svg">
+      <path
+        x-show="$store.nav.userSettings.colorScheme() == 1"
+        stroke-linecap="round"
+        stroke-linejoin="round"
+        stroke-width="2"
+        d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
+      <path
+        x-show="$store.nav.userSettings.colorScheme() == 2"
+        stroke-linecap="round"
+        stroke-linejoin="round"
+        stroke-width="2"
+        d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path>
+      <path
+        x-show="$store.nav.userSettings.colorScheme() == 3"
+        stroke-linecap="round"
+        stroke-linejoin="round"
+        stroke-width="2"
+        d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path>
+    </svg>
+  </button>
+</div>
diff --git a/layouts/_partials/layouts/home/features.html b/layouts/_partials/layouts/home/features.html
new file mode 100644 (file)
index 0000000..527c98c
--- /dev/null
@@ -0,0 +1,56 @@
+{{/* icons source: https://heroicons.com/ */}}
+{{ $dataTOML := `
+  [[features]]
+  heading = "Optimized for speed"
+  copy = "Written in Go, optimized for speed and designed for flexibility. With its advanced templating system and fast asset pipelines, Hugo renders a large site in seconds, often less."
+  icon = """<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
+  <path stroke-linecap="round" stroke-linejoin="round" d="M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" />
+  </svg>
+  """
+  [[features]]
+  heading = "Flexible framework"
+  copy = "With its multilingual support, and powerful taxonomy system, Hugo is widely used to create documentation sites, landing pages, corporate, government, nonprofit, education, news, event, and project sites."
+  icon = """<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
+  <path stroke-linecap="round" stroke-linejoin="round" d="M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" />
+  </svg>
+  """
+  [[features]]
+  heading = "Fast assets pipeline"
+  copy = "Image processing (convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract EXIF data), JavaScript bundling (tree shake, code splitting), Sass processing, great TailwindCSS support."
+  icon = """<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
+  <path stroke-linecap="round" stroke-linejoin="round" d="m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
+  </svg>
+  """
+  [[features]]
+  heading = "Embedded web server"
+  copy = "Use Hugo's embedded web server during development to instantly see changes to content, structure, behavior, and presentation. "
+  icon = """<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
+  <path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418" />
+  </svg>
+  """
+  `
+}}
+{{ $data := $dataTOML | transform.Unmarshal }}
+<div class="mx-auto max-w-7xl px-6 lg:px-8">
+  <div class="mx-auto max-w-2xl lg:max-w-4xl">
+    <dl
+      class="grid max-w-xl grid-cols-1 gap-x-8 gap-y-10 lg:max-w-none lg:grid-cols-2 lg:gap-y-16">
+      {{ range $data.features }}
+        <div class="relative pl-16">
+          <dt
+            class="text-base/7 font-semibold text-gray-900 dark:text-gray-300">
+            <div
+              class="absolute top-0 left-0 flex size-10 items-center justify-center rounded-full bg-blue-600 p-2 fill-white text-white">
+              {{ .icon | safeHTML }}
+            </div>
+            {{ .heading }}
+          </dt>
+          <dd class="mt-2 text-base/7 text-gray-600 dark:text-gray-400">
+            {{ .copy }}
+          </dd>
+        </div>
+      {{ end }}
+
+    </dl>
+  </div>
+</div>
diff --git a/layouts/_partials/layouts/home/opensource.html b/layouts/_partials/layouts/home/opensource.html
new file mode 100644 (file)
index 0000000..153c0f4
--- /dev/null
@@ -0,0 +1,111 @@
+{{ $githubInfo := partialCached "helpers/funcs/get-github-info.html" . "-" }}
+<div class="mx-auto max-w-7xl px-6 lg:px-8">
+  <div
+    class="mx-auto grid max-w-2xl grid-cols-1 gap-x-8 gap-y-10 lg:mx-0 lg:max-w-none lg:grid-cols-2">
+    <div class="lg:pr-8">
+      <div class="lg:max-w-lg">
+        <p
+          class="text-4xl font-bold tracking-tight text-pretty text-gray-900 dark:text-gray-300 sm:text-5xl">
+          Open source
+        </p>
+        <p class="mt-6 text-lg/8 text-gray-600 dark:text-gray-400">
+          Hugo is open source and free to use. It is distributed under the
+          Apache 2.0 License.
+        </p>
+        <dl
+          class="mt-10 max-w-xl space-y-8 text-base/7 text-gray-600 dark:text-gray-300 lg:max-w-none">
+          <div class="relative pl-9">
+            <dt class="inline font-bold text-gray-900 dark:text-gray-300">
+              <svg
+                class="absolute top-1 left-1 size-5 text-blue-500"
+                xmlns="http://www.w3.org/2000/svg"
+                fill="none"
+                viewBox="0 0 24 24"
+                stroke-width="1.5"
+                stroke="currentColor"
+                class="size-6">
+                <path
+                  stroke-linecap="round"
+                  stroke-linejoin="round"
+                  d="M6 20.25h12m-7.5-3v3m3-3v3m-10.125-3h17.25c.621 0 1.125-.504 1.125-1.125V4.875c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125Z" />
+              </svg>
+              Popular.
+            </dt>
+            <dd class="inline ml-1">
+              Hugo has
+              {{ $githubInfo.stargazers_count | lang.FormatNumber 0 }}
+              stars on GitHub as of {{ now.Format "January 2, 2006" }}.
+              Join the crowd and hit the
+              <a
+                class="text-blue-500 hover:text-blue-500 font-semibold"
+                href="https://github.com/gohugoio/hugo"
+                >Star button</a
+              >.
+            </dd>
+          </div>
+          <div class="relative pl-9">
+            <dt class="inline font-bold text-gray-900 dark:text-gray-300">
+              <svg
+                class="absolute top-1 left-1 size-5 text-blue-500"
+                xmlns="http://www.w3.org/2000/svg"
+                fill="none"
+                viewBox="0 0 24 24"
+                stroke-width="1.5"
+                stroke="currentColor"
+                class="size-6">
+                <path
+                  stroke-linecap="round"
+                  stroke-linejoin="round"
+                  d="m20.893 13.393-1.135-1.135a2.252 2.252 0 0 1-.421-.585l-1.08-2.16a.414.414 0 0 0-.663-.107.827.827 0 0 1-.812.21l-1.273-.363a.89.89 0 0 0-.738 1.595l.587.39c.59.395.674 1.23.172 1.732l-.2.2c-.212.212-.33.498-.33.796v.41c0 .409-.11.809-.32 1.158l-1.315 2.191a2.11 2.11 0 0 1-1.81 1.025 1.055 1.055 0 0 1-1.055-1.055v-1.172c0-.92-.56-1.747-1.414-2.089l-.655-.261a2.25 2.25 0 0 1-1.383-2.46l.007-.042a2.25 2.25 0 0 1 .29-.787l.09-.15a2.25 2.25 0 0 1 2.37-1.048l1.178.236a1.125 1.125 0 0 0 1.302-.795l.208-.73a1.125 1.125 0 0 0-.578-1.315l-.665-.332-.091.091a2.25 2.25 0 0 1-1.591.659h-.18c-.249 0-.487.1-.662.274a.931.931 0 0 1-1.458-1.137l1.411-2.353a2.25 2.25 0 0 0 .286-.76m11.928 9.869A9 9 0 0 0 8.965 3.525m11.928 9.868A9 9 0 1 1 8.965 3.525" />
+              </svg>
+              Active.
+            </dt>
+            <dd class="inline ml-1">
+              Hugo has a large and active community. If you have questions or
+              need help, you can ask in the
+              <a
+                class="text-blue-500 hover:text-blue-500 font-semibold"
+                href="https://discourse.gohugo.io"
+                >Hugo forums</a
+              >.
+            </dd>
+          </div>
+          <div class="relative pl-9">
+            <dt class="inline font-bold text-gray-900 dark:text-gray-300">
+              <svg
+                class="absolute top-1 left-1 size-5 text-blue-500"
+                xmlns="http://www.w3.org/2000/svg"
+                fill="none"
+                viewBox="0 0 24 24"
+                stroke-width="1.5"
+                stroke="currentColor"
+                class="size-6">
+                <path
+                  stroke-linecap="round"
+                  stroke-linejoin="round"
+                  d="M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h1.5C5.496 19.5 6 18.996 6 18.375m-3.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-1.5A1.125 1.125 0 0 1 18 18.375M20.625 4.5H3.375m17.25 0c.621 0 1.125.504 1.125 1.125M20.625 4.5h-1.5C18.504 4.5 18 5.004 18 5.625m3.75 0v1.5c0 .621-.504 1.125-1.125 1.125M3.375 4.5c-.621 0-1.125.504-1.125 1.125M3.375 4.5h1.5C5.496 4.5 6 5.004 6 5.625m-3.75 0v1.5c0 .621.504 1.125 1.125 1.125m0 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m1.5-3.75C5.496 8.25 6 7.746 6 7.125v-1.5M4.875 8.25C5.496 8.25 6 8.754 6 9.375v1.5m0-5.25v5.25m0-5.25C6 5.004 6.504 4.5 7.125 4.5h9.75c.621 0 1.125.504 1.125 1.125m1.125 2.625h1.5m-1.5 0A1.125 1.125 0 0 1 18 7.125v-1.5m1.125 2.625c-.621 0-1.125.504-1.125 1.125v1.5m2.625-2.625c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125M18 5.625v5.25M7.125 12h9.75m-9.75 0A1.125 1.125 0 0 1 6 10.875M7.125 12C6.504 12 6 12.504 6 13.125m0-2.25C6 11.496 5.496 12 4.875 12M18 10.875c0 .621-.504 1.125-1.125 1.125M18 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m-12 5.25v-5.25m0 5.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125m-12 0v-1.5c0-.621-.504-1.125-1.125-1.125M18 18.375v-5.25m0 5.25v-1.5c0-.621.504-1.125 1.125-1.125M18 13.125v1.5c0 .621.504 1.125 1.125 1.125M18 13.125c0-.621.504-1.125 1.125-1.125M6 13.125v1.5c0 .621-.504 1.125-1.125 1.125M6 13.125C6 12.504 5.496 12 4.875 12m-1.5 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M19.125 12h1.5m0 0c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h1.5m14.25 0h1.5" />
+              </svg>
+              Frequent releases.
+            </dt>
+            <dd class="inline ml-1">
+              Hugo has a fast
+              <a
+                class="text-blue-500 hover:text-blue-500 font-semibold"
+                href="https://github.com/gohugoio/hugo/releases"
+                >release</a
+              >
+              cycle. The project is actively maintained and new features are
+              added regularly.
+            </dd>
+          </div>
+        </dl>
+      </div>
+    </div>
+    {{ partial "helpers/picture.html" (dict
+      "image" (resources.Get "images/hugo-github-screenshot.png")
+      "alt" "Hugo GitHub Repository"
+      "width" 640
+      "class" "w-full max-w-[38rem] ring-1 shadow-xl dark:shadow-gray-500 ring-gray-400/10")
+    }}
+  </div>
+</div>
diff --git a/layouts/_partials/layouts/home/sponsors.html b/layouts/_partials/layouts/home/sponsors.html
new file mode 100644 (file)
index 0000000..1f391e1
--- /dev/null
@@ -0,0 +1,44 @@
+{{ $gtag := .gtag | default "unknown" }}
+{{ $gtag := .gtag | default "unknown" }}
+{{ $isFooter := (eq $gtag "footer") }}
+{{ $utmSource := cond $isFooter "hugofooter" "hugohome" }}
+{{ $containerClass := .containerClass | default "mx-auto max-w-7xl px-6 lg:px-8" }}
+{{ with .ctx.Site.Data.sponsors }}
+  <div class="{{ $containerClass }}">
+    <h2 class="font-bold text-2xl mb-6 tracking-tighter">Hugo Sponsors</h2>
+    <div class="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-6">
+      {{ range .banners }}
+        <div class="max-w-64" style="background-color: {{ .bgcolor }};">
+          {{ $query_params := .query_params | default "" }}
+          {{ $url := .link }}
+          {{ if not .no_query_params }}
+            {{ $url = printf "%s?%s%s" .link $query_params (querify "utm_source" (.utm_source | default $utmSource ) "utm_medium" (.utm_medium | default "banner") "utm_campaign" (.utm_campaign | default "hugosponsor") "utm_content" (.utm_content | default "gohugoio")) | safeURL }}
+          {{ end }}
+          {{ $logo := resources.Get .logo }}
+          {{ $gtagID := printf "Sponsor %s %s" .name $gtag | title }}
+          <a
+            href="{{ $url }}"
+            title="{{ .title | default .name }}"
+            {{ if hugo.IsProduction }}
+              onclick="trackOutboundLink({{ printf "'%s', '%s'" $gtagID $url | safeJS }});"
+            {{ end }}
+            class="group inline-block w-full h-full shadow-md dark:shadow-gray-600"
+            {{ with .link_attr }}{{ . | safeHTMLAttr }}{{ end }}>
+            <div
+              class="flex w-full h-full p-8 items-center justify-center content-center transition duration-500 hover:scale-105 {{ if .show_on_hover }}
+                invisible group-hover:visible
+              {{ end }}">
+              {{ with $logo }}
+                {{ .Content | safeHTML }}
+              {{ else }}
+                <span class="text-4xl font-bold text-white">
+                  {{ .name }}
+                </span>
+              {{ end }}
+            </div>
+          </a>
+        </div>
+      {{ end }}
+    </div>
+  </div>
+{{ end }}
diff --git a/layouts/_partials/layouts/hooks/body-end.html b/layouts/_partials/layouts/hooks/body-end.html
new file mode 100644 (file)
index 0000000..9ffd93b
--- /dev/null
@@ -0,0 +1,3 @@
+{{- if .IsHome }}
+  {{- partial "helpers/validation/validate-keywords.html" }}
+{{- end }}
diff --git a/layouts/_partials/layouts/hooks/body-main-start.html b/layouts/_partials/layouts/hooks/body-main-start.html
new file mode 100644 (file)
index 0000000..b28dd21
--- /dev/null
@@ -0,0 +1,8 @@
+{{ if or .IsSection .IsPage }}
+  <div class="hidden print:flex justify-between border-b-1 border-b-gray-400 mb-4">
+    <p class="flex flex-col justify-end text-4xl mb-3">Hugo Documentation</p>
+    {{ with images.QR .Permalink (dict "scale" 3) }}
+      <img class="mb-2 -mr-2" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="Link to {{ $.Permalink }}">
+    {{ end }}
+  </div>
+{{end }}
diff --git a/layouts/_partials/layouts/hooks/body-start.html b/layouts/_partials/layouts/hooks/body-start.html
new file mode 100644 (file)
index 0000000..3430bd8
--- /dev/null
@@ -0,0 +1,3 @@
+{{ with resources.Get "js/body-start.js" | js.Build (dict "minify" true) }}
+  {{ partial "helpers/linkjs.html" (dict "r" . "attributes" (dict "" "")) }}
+{{ end }}
diff --git a/layouts/_partials/layouts/icons.html b/layouts/_partials/layouts/icons.html
new file mode 100644 (file)
index 0000000..b05adef
--- /dev/null
@@ -0,0 +1,70 @@
+<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
+  <symbol id="icon--chevron-right" viewBox="0 0 20 20">
+    <path
+      fill-rule="evenodd"
+      d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
+      clip-rule="evenodd"></path>
+  </symbol>
+</svg>
+
+<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
+  <symbol id="icon--search" viewBox="0 0 20 20">
+    <path
+      d="M16.293 17.707a1 1 0 0 0 1.414-1.414l-1.414 1.414ZM9 14a5 5 0 0 1-5-5H2a7 7 0 0 0 7 7v-2ZM4 9a5 5 0 0 1 5-5V2a7 7 0 0 0-7 7h2Zm5-5a5 5 0 0 1 5 5h2a7 7 0 0 0-7-7v2Zm8.707 12.293-3.757-3.757-1.414 1.414 3.757 3.757 1.414-1.414ZM14 9a4.98 4.98 0 0 1-1.464 3.536l1.414 1.414A6.98 6.98 0 0 0 16 9h-2Zm-1.464 3.536A4.98 4.98 0 0 1 9 14v2a6.98 6.98 0 0 0 4.95-2.05l-1.414-1.414Z" />
+  </symbol>
+</svg>
+
+<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
+  <symbol id="icon--anchor" viewBox="0 0 24 24">
+    <path d="M0 0h24v24H0z" fill="none" />
+    <path
+      d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" />
+  </symbol>
+</svg>
+
+<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
+  <symbol id="icon--copy" viewBox="0 0 24 24">
+    <path
+    fill="none"
+    stroke="currentColor"
+    stroke-width="1.5"
+    aria-hidden="true"
+    stroke-linecap="round"
+    stroke-linejoin="round"
+    d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z"></path>
+  </symbol>
+</svg>
+
+<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
+  <symbol id="icon--github" viewBox="0 0 24 24" aria-hidden="true">
+    <path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.477 2 2 6.463 2 11.97c0 4.404 2.865 8.14 6.839 9.458.5.092.682-.216.682-.48 0-.236-.008-.864-.013-1.695-2.782.602-3.369-1.337-3.369-1.337-.454-1.151-1.11-1.458-1.11-1.458-.908-.618.069-.606.069-.606 1.003.07 1.531 1.027 1.531 1.027.892 1.524 2.341 1.084 2.91.828.092-.643.35-1.083.636-1.332-2.22-.251-4.555-1.107-4.555-4.927 0-1.088.39-1.979 1.029-2.675-.103-.252-.446-1.266.098-2.638 0 0 .84-.268 2.75 1.022A9.607 9.607 0 0 1 12 6.82c.85.004 1.705.114 2.504.336 1.909-1.29 2.747-1.022 2.747-1.022.546 1.372.202 2.386.1 2.638.64.696 1.028 1.587 1.028 2.675 0 3.83-2.339 4.673-4.566 4.92.359.307.678.915.678 1.846 0 1.332-.012 2.407-.012 2.734 0 .267.18.577.688.48 3.97-1.32 6.833-5.054 6.833-9.458C22 6.463 17.522 2 12 2Z"></path>
+  </symbol>
+</svg>
+
+{{/* https://heroicons.com/mini exclamation-circle */}}
+<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
+  <symbol id="icon--exclamation-circle" viewBox="0 0 24 24" aria-hidden="true">
+    <path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" />
+  </symbol>
+</svg>
+
+{{/* https://heroicons.com/mini exclamation-triangle */}}
+<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
+  <symbol id="icon--exclamation-triangle" viewBox="0 0 24 24" aria-hidden="true">
+    <path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" />
+  </symbol>
+</svg>
+
+{{/* https://heroicons.com/mini information-circle */}}
+<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
+  <symbol id="icon--information-circle" viewBox="0 0 24 24" aria-hidden="true">
+    <path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z" clip-rule="evenodd" />
+  </symbol>
+</svg>
+
+{{/* https://heroicons.com/mini light-bulb */}}
+<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
+  <symbol id="icon--light-bulb" viewBox="0 0 24 24" aria-hidden="true">
+    <path d="M10 1a6 6 0 0 0-3.815 10.631C7.237 12.5 8 13.443 8 14.456v.644a.75.75 0 0 0 .572.729 6.016 6.016 0 0 0 2.856 0A.75.75 0 0 0 12 15.1v-.644c0-1.013.762-1.957 1.815-2.825A6 6 0 0 0 10 1ZM8.863 17.414a.75.75 0 0 0-.226 1.483 9.066 9.066 0 0 0 2.726 0 .75.75 0 0 0-.226-1.483 7.553 7.553 0 0 1-2.274 0Z" />
+  </symbol>
+</svg>
diff --git a/layouts/_partials/layouts/in-this-section.html b/layouts/_partials/layouts/in-this-section.html
new file mode 100644 (file)
index 0000000..28e5ed7
--- /dev/null
@@ -0,0 +1,34 @@
+{{- with .CurrentSection.RegularPages }}
+  {{ $hasTocOrRelated := or  ($.Store.Get "hasToc") ($.Store.Get "hasRelated") }}
+  <div
+    class="overflow-y-auto {{ if $hasTocOrRelated }}
+      max-h-96
+    {{ else }}
+      sticky top-[8rem] max-h-[70vh]
+    {{ end }} relative mt-2 mb-8"
+    data-turbo-preserve-scroll-container="in-this-section">
+    <h2
+      class="text-base font-semibold tracking-tight text-gray-600  dark:text-gray-400">
+      In this section
+    </h2>
+
+    <ul id="in-sthis-section" class="mt-2">
+      {{- range . }}
+        <li>
+          <a
+            class="text-sm {{ if eq . $ }}
+              font-bold text-blue-600 hover:text-blue-600
+              dark:hover:text-blue-200 dark:text-blue-200 focus:font-bold
+              scroll-active
+            {{ else }}
+              text-blue-600 hover:text-blue-500 dark:text-blue-500
+              dark:hover:text-blue-400
+            {{ end }}"
+            href="{{ .RelPermalink }}"
+            >{{ .LinkTitle }}</a
+          >
+        </li>
+      {{- end }}
+    </ul>
+  </div>
+{{- end }}
diff --git a/layouts/_partials/layouts/page-edit.html b/layouts/_partials/layouts/page-edit.html
new file mode 100644 (file)
index 0000000..6a976d1
--- /dev/null
@@ -0,0 +1,26 @@
+<div class="print:hidden">
+  <hr class="border-t border-gray-200 dark:border-gray-800 my-10 lg:my-16">
+
+  <div class="text-gray-800 dark:text-gray-300 font-semibold">
+    Last updated:
+    {{ .Lastmod.Format "January 2, 2006" }}{{ with .GitInfo }}
+      :
+      <a
+        class="text-blue-600 hover:text-blue-500"
+        href="{{ $.Site.Params.ghrepo }}commit/{{ .Hash }}"
+        >{{ .Subject }} ({{ .AbbreviatedHash }})</a
+      >
+    {{ end }}
+  </div>
+
+  {{ with .File }}
+    {{ if not .IsContentAdapter }}
+      {{ $href := printf "%sedit/master/content/%s/%s" site.Params.ghrepo $.Lang .Path }}
+      <a
+        href="{{ $href }}"
+        class="mt-4 inline-block not-prose bg-blue-600 hover:bg-blue-800 text-white hover:text-white font-bold py-2 px-4 rounded">
+        Improve this page
+      </a>
+    {{ end }}
+  {{ end }}
+</div>
diff --git a/layouts/_partials/layouts/related.html b/layouts/_partials/layouts/related.html
new file mode 100644 (file)
index 0000000..0245ba7
--- /dev/null
@@ -0,0 +1,22 @@
+{{- $heading := "See also" }}
+{{- $related := site.Pages.Related . }}
+{{- $related = $related | complement .CurrentSection.Pages | first 7 }}
+
+{{- with $related }}
+  {{ $.Store.Set "hasRelated" true }}
+  <h2
+    class="text-base font-semibold tracking-tight text-gray-600  dark:text-gray-400">
+    {{ $heading }}
+  </h2>
+  <ul class="mt-2 mb-8">
+    {{- range . }}
+      <li>
+        <a
+          class="text-sm text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400"
+          href="{{ .RelPermalink }}"
+          >{{ or .Params.altTitle .Title }}</a
+        >
+      </li>
+    {{- end }}
+  </ul>
+{{- end }}
diff --git a/layouts/_partials/layouts/search/algolialogo.html b/layouts/_partials/layouts/search/algolialogo.html
new file mode 100644 (file)
index 0000000..a7fc6c0
--- /dev/null
@@ -0,0 +1,45 @@
+<div class="flex items-center gap-1">
+  <span class="">Search by</span
+  ><svg
+    width="77"
+    height="19"
+    aria-label="Algolia"
+    role="img"
+    id="l1"
+    class="fill-gray-600 dark:fill-gray-400"
+    xmlns="http://www.w3.org/2000/svg"
+    viewBox="0 0 2196.2 500">
+    <path
+      class=""
+      d="M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"></path>
+    <rect
+      class="cls-1"
+      x="1845.88"
+      y="104.73"
+      width="62.58"
+      height="277.9"
+      rx="5.9"
+      ry="5.9"></rect>
+    <path
+      class=""
+      d="M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"></path>
+    <path
+      class=""
+      d="M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"></path>
+    <path
+      class=""
+      d="M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"></path>
+    <path
+      class=""
+      d="M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"></path>
+    <path
+      class=""
+      d="M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"></path>
+    <path
+      class=""
+      d="M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"></path>
+    <path
+      class="cls-1"
+      d="M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"></path>
+  </svg>
+</div>
diff --git a/layouts/_partials/layouts/search/button.html b/layouts/_partials/layouts/search/button.html
new file mode 100644 (file)
index 0000000..07c1f73
--- /dev/null
@@ -0,0 +1,22 @@
+{{ $textColor := "text-gray-300" }}
+{{ $fillColor := "fill-slate-400 dark:fill-slate-500" }}
+{{ if .standalone }}
+  {{ $textColor = "text-gray-800 dark:text-gray-300 " }}
+  {{ $fillColor = "fill-slate-500 dark:fill-slate-400" }}
+{{ end }}
+
+
+<button
+  {{ if .standalone }}
+    x-data @click="$dispatch('search-toggle')"
+  {{ end }}
+  type="button"
+  aria-label="Search"
+  class="{{ $textColor }} grid cursor-pointer w-full lg:w-56 grid-cols-[auto_1fr_auto] items-center rounded-md px-2 sm:px-4 py-2 text-left text-xs/6 lg:text-sm/6 outline-0 sm:outline-1 -outline-offset-1 outline-gray-600">
+  <svg
+    class="{{ $fillColor }} pointer-events-none -ml-0.5 mr-2 size-5 sm:size-4">
+    <use href="#icon--search"></use>
+  </svg>
+  <span class="hidden lg:inline">Search docs</span>
+  <span class="hidden lg:inline">/</span>
+</button>
diff --git a/layouts/_partials/layouts/search/input.html b/layouts/_partials/layouts/search/input.html
new file mode 100644 (file)
index 0000000..5f5ff07
--- /dev/null
@@ -0,0 +1,4 @@
+<div x-data="search" class="flex w-full">
+  {{ partial "layouts/search/button.html" (dict "page" . "standalone" false) }}
+  {{ partial "layouts/search/results.html" . }}
+</div>
diff --git a/layouts/_partials/layouts/search/results.html b/layouts/_partials/layouts/search/results.html
new file mode 100644 (file)
index 0000000..cd9b88d
--- /dev/null
@@ -0,0 +1,90 @@
+<div
+  class="fixed inset-0 overflow-hidden z-20"
+  :class="{'fixed': open}"
+  aria-label="Search docs"
+  role="dialog"
+  aria-modal="true"
+  @keydown.right="$focus.next()"
+  @keydown.left="$focus.previous()"
+  @keydown.esc="open=false"
+  x-cloak>
+  <div class="absolute inset-0 overflow-hidden z-20" x-show="open">
+    <div class="absolute inset-0" aria-hidden="true"></div>
+
+    <div
+      class="pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10"
+      @click.outside="open = false">
+      <div
+        class="pointer-events-auto w-screen max-w-md"
+        x-show="open"
+        x-transition:enter="transform transition ease-in-out duration-300 sm:duration-500"
+        x-transition:enter-start="translate-x-full"
+        x-transition:enter-end="translate-x-0"
+        x-transition:leave="transform transition ease-in-out duration-300 sm:duration-500"
+        x-transition:leave-start="translate-x-0"
+        x-transition:leave-end="translate-x-full">
+        <div
+          class="flex h-full flex-col overflow-y-scroll dark:bg-blue-950/96 bg-white py-6 shadow-sm dark:shadow-gray-800">
+          <div class="px-4 sm:px-6">
+            <div class="flex items-start justify-between">
+              <input
+                x-model.debounce.100ms="query"
+                @click="search()"
+                type="search"
+                arial-label="Search"
+                class="text-gray-800 dark:text-gray-100 bg-white/40 dark:bg-gray-900 shadow rounded border-0 p-3 w-full"
+                placeholder="Search docs"
+                x-ref="input">
+            </div>
+          </div>
+          <div class="relative mt-6 flex-1 px-4 sm:px-6 h-full">
+            <ul
+              role="list"
+              class="divide-y divide-gray-200 dark:divide-gray-900 h-[calc(100%-6rem)] overflow-y-auto">
+              <template
+                x-for="[group, entries] in Object.entries(result)"
+                :key="group">
+                <li class="py-4">
+                  <div
+                    class="mb-1 dark:text-gray-300 font-semibold uppercase tracking-widest text-sm"
+                    x-text="group"></div>
+                  <template x-for="entry in entries" :key="entry.objectID">
+                    <a
+                      class="flex flex-nowrap space-x-4 py-2 text-sm leading-5 text-gray-900 dark:text-gray-500 hover:dark:text-gray-800 hover:bg-gray-50 dark:hover:bg-gray-500 focus:outline-none focus:bg-gray-50 dark:focus:bg-gray-800 cursor-pointer transition duration-150 ease-in-out"
+                      :href="entry.url">
+                      <span
+                        class="w-1/3 text-xs text-right text-gray-500 dark:text-gray-300"
+                        x-text="entry.hierarchy.lvl1">
+                      </span>
+                      <div class="w-2/3">
+                        <h3
+                          class="text-md font-bold"
+                          x-html="entry.getHeadingHTML()"></h3>
+                        <template
+                          x-if="entry._snippetResult && entry._snippetResult.content">
+                          <div class="two-lines-ellipsis mt-1">
+                            <span>…</span>
+                            <span x-html="entry._snippetResult.content.value">
+                            </span>
+                            <span>…</span>
+                          </div>
+                        </template>
+                      </div>
+                    </a>
+                  </template>
+                </li>
+              </template>
+            </ul>
+          </div>
+          {{/* End listing */ -}}
+        </div>
+      </div>
+      <div
+        class="z-40 fixed pointer-events-auto bottom-0 right-0 dark:text-gray-300 text-gray-800 float-right mr-8 mb-4 text-sm lg:text-md"
+        x-show="open"
+        x-transition.opacity.duration.800ms>
+        {{ partial "layouts/search/algolialogo.html" }}
+      </div>
+    </div>
+  </div>
+</div>
diff --git a/layouts/_partials/layouts/templates.html b/layouts/_partials/layouts/templates.html
new file mode 100644 (file)
index 0000000..72b71a3
--- /dev/null
@@ -0,0 +1,7 @@
+<template id="anchor-heading">
+  <a class="hidden group-hover:inline-flex items-center" aria-label="Anchor">
+    <svg class="ml-2 fill-primary hover:fill-primary/70 w-4 h-4">
+      <use href="#icon--anchor"></use>
+    </svg>
+  </a>
+</template>
diff --git a/layouts/_partials/layouts/toc.html b/layouts/_partials/layouts/toc.html
new file mode 100644 (file)
index 0000000..774bc15
--- /dev/null
@@ -0,0 +1,46 @@
+{{ with .Fragments }}
+  {{ with .Headings }}
+    <div
+      x-data="toc"
+      class="sticky top-[8rem] h-screen overflow-y-auto overflow-x-hidden">
+      <h2
+        class="text-base font-semibold tracking-tight text-gray-600  dark:text-gray-400">
+        On this page
+      </h2>
+      <nav class="w-56 mt-2">
+        <ul>
+          {{ template "render-toc-level" (dict "h" . "p" $) }}
+        </ul>
+      </nav>
+    </div>
+  {{ end }}
+{{ end }}
+
+{{ define "render-toc-level" }}
+  {{ range .h }}
+    {{ if and .ID (and (ge .Level 2) (le .Level 4)) }}
+      {{ $indentation := "ml-0" }}
+      {{ if eq .Level 3 }}
+        {{ $indentation = "ml-2 lg:ml-3" }}
+      {{ else if eq .Level 4 }}
+        {{ $indentation = "ml-4 lg:ml-6" }}
+      {{ end }}
+      {{ $.p.Store.Set "hasToc" true }}
+      <li>
+        <a
+          href="#{{ .ID }}"
+          x-ref="{{ .ID }}"
+          @click.stop="setActive('{{ .ID }}')"
+          class="block pb-1 text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 text-sm {{ $indentation }}"
+          :class="{'font-bold dark:text-blue-200 dark:hover:text-blue-300' : activeHeading === '{{ .ID }}'}">
+          {{ .Title | safeHTML }}
+        </a>
+      </li>
+    {{ end }}
+    {{ with .Headings }}
+      <ul>
+        {{ template "render-toc-level"  (dict "h" . "p" $.p) }}
+      </ul>
+    {{ end }}
+  {{ end }}
+{{ end }}
diff --git a/layouts/_partials/opengraph/get-featured-image.html b/layouts/_partials/opengraph/get-featured-image.html
new file mode 100644 (file)
index 0000000..50ee2a4
--- /dev/null
@@ -0,0 +1,26 @@
+{{ $images := $.Resources.ByType "image" }}
+{{ $featured := $images.GetMatch "*feature*" }}
+{{ if not $featured }}
+  {{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}
+{{ end }}
+{{ if not $featured }}
+  {{ $featured = resources.Get "/opengraph/gohugoio-card-base-1.png" }}
+  {{ $size := 80 }}
+  {{ $title := $.LinkTitle }}
+  {{ if gt (len $title) 20 }}
+    {{ $size = 70 }}
+  {{ end }}
+
+  {{ $text := $title }}
+  {{ $textOptions := dict
+    "color" "#FFF"
+    "size" $size
+    "lineSpacing" 10
+    "x" 65 "y" 80
+    "font" (resources.Get "/opengraph/mulish-black.ttf")
+  }}
+
+  {{ $featured = $featured | images.Filter (images.Text $text $textOptions) }}
+{{ end }}
+
+{{ return $featured }}
diff --git a/layouts/_partials/opengraph/opengraph.html b/layouts/_partials/opengraph/opengraph.html
new file mode 100644 (file)
index 0000000..e32e072
--- /dev/null
@@ -0,0 +1,84 @@
+<meta property="og:title" content="{{ .Title }}">
+<meta
+  property="og:description"
+  content="{{ with .Description }}
+    {{ . }}
+  {{ else }}
+    {{ if .IsPage }}
+      {{ .Summary }}
+    {{ else }}
+      {{ with .Site.Params.description }}{{ . }}{{ end }}
+    {{ end }}
+  {{ end }}">
+<meta
+  property="og:type"
+  content="{{ if .IsPage }}
+    article
+  {{ else }}
+    website
+  {{ end }}">
+<meta property="og:url" content="{{ .Permalink }}">
+
+{{- with $.Params.images -}}
+  {{- range first 6 . }}
+    <meta property="og:image" content="{{ . | absURL }}">
+  {{ end -}}
+{{- else -}}
+  {{- $featured := partial "opengraph/get-featured-image.html" . }}
+  {{- with $featured -}}
+    <meta property="og:image" content="{{ $featured.Permalink }}">
+  {{- else -}}
+    {{- with $.Site.Params.images }}
+      <meta property="og:image" content="{{ index . 0 | absURL }}">
+    {{ end -}}
+  {{- end -}}
+{{- end -}}
+
+{{- if .IsPage }}
+  {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
+  <meta property="article:section" content="{{ .Section }}">
+  {{ with .PublishDate }}
+    <meta
+      property="article:published_time"
+      {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
+  {{ end }}
+  {{ with .Lastmod }}
+    <meta
+      property="article:modified_time"
+      {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
+  {{ end }}
+{{- end -}}
+
+{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}">{{ end }}
+{{- with .Params.locale }}
+  <meta property="og:locale" content="{{ . }}">
+{{ end }}
+{{- with .Site.Params.title }}
+  <meta property="og:site_name" content="{{ . }}">
+{{ end }}
+{{- with .Params.videos }}
+  {{- range . }}
+    <meta property="og:video" content="{{ . | absURL }}">
+  {{ end }}
+
+{{ end }}
+
+{{- /* If it is part of a series, link to related articles */}}
+{{- $permalink := .Permalink }}
+{{- $siteSeries := .Site.Taxonomies.series }}
+{{ with .Params.series }}
+  {{- range $name := . }}
+    {{- $series := index $siteSeries ($name | urlize) }}
+    {{- range $page := first 6 $series.Pages }}
+      {{- if ne $page.Permalink $permalink }}
+        <meta property="og:see_also" content="{{ $page.Permalink }}">
+      {{ end }}
+    {{- end }}
+  {{ end }}
+
+{{ end }}
+
+{{- /* Facebook Page Admin ID for Domain Insights */}}
+{{- with site.Params.social.facebook_admin }}
+  <meta property="fb:admins" content="{{ . }}">
+{{ end }}
diff --git a/layouts/_shortcodes/chroma-lexers.html b/layouts/_shortcodes/chroma-lexers.html
new file mode 100644 (file)
index 0000000..fd71305
--- /dev/null
@@ -0,0 +1,28 @@
+{{/* prettier-ignore-start */ -}}
+{{- /*
+Renders an HTML template of Chroma lexers and their aliases.
+
+@example {{< chroma-lexers >}}
+*/ -}}
+{{/* prettier-ignore-end */ -}}
+<div class="overflow-x-auto">
+  <table>
+    <thead>
+      <th>Language</th>
+      <th>Identifiers</th>
+    </thead>
+    <tbody>
+      {{- range site.Data.docs.chroma.lexers }}
+        <tr>
+          <td>{{ .Name }}</td>
+          <td>
+            {{- range $k, $_ := .Aliases }}
+              {{- if $k }},{{ end }}
+              <code>{{ . }}</code>
+            {{- end }}
+          </td>
+        </tr>
+      {{- end }}
+    </tbody>
+  </table>
+</div>
diff --git a/layouts/_shortcodes/code-toggle.html b/layouts/_shortcodes/code-toggle.html
new file mode 100644 (file)
index 0000000..a22c378
--- /dev/null
@@ -0,0 +1,120 @@
+{{/* prettier-ignore-start */ -}}
+{{- /*
+Renders syntax-highlighted configuration data in JSON, TOML, and YAML formats.
+
+@param {string} [config] The section of site.Data.docs.config to render.
+@param {bool} [copy=false] Whether to display a copy-to-clipboard button.
+@param {string} [dataKey] The section of site.Data.docs to render.
+@param {string} [file] The file name to display above the rendered code.
+@param {bool} [fm=false] Whether to render the code as front matter.
+@param {bool} [skipHeader=false] Whether to omit top level key(s) when rendering a section of site.Data.docs.config.
+
+@example  {{< code-toggle file=hugo config=build />}}
+
+@example  {{< code-toggle file=content/example.md fm="true" }}
+          title='Example'
+          draft='false
+          {{< /code-toggle }}
+*/ -}}
+{{/* prettier-ignore-end */ -}}
+{{- /* Initialize. */}}
+{{- $config := "" }}
+{{- $copy := false }}
+{{- $dataKey := "" }}
+{{- $file := "" }}
+{{- $fm := false }}
+{{- $skipHeader := false }}
+
+{{- /* Get parameters. */}}
+{{- $config = .Get "config" }}
+{{- $dataKey = .Get "dataKey" }}
+{{- $file = .Get "file" }}
+{{- if in (slice "false" false 0) (.Get "copy") }}
+  {{- $copy = false }}
+{{- else if in (slice "true" true 1) (.Get "copy") }}
+  {{- $copy = true }}
+{{- end }}
+{{- if in (slice "false" false 0) (.Get "fm") }}
+  {{- $fm = false }}
+{{- else if in (slice "true" true 1) (.Get "fm") }}
+  {{- $fm = true }}
+{{- end }}
+{{- if in (slice "false" false 0) (.Get "skipHeader") }}
+  {{- $skipHeader = false }}
+{{- else if in (slice "true" true 1) (.Get "skipHeader") }}
+  {{- $skipHeader = true }}
+{{- end }}
+
+{{- /* Define constants. */}}
+{{- $delimiters := dict "toml" "+++" "yaml" "---" }}
+{{- $langs := slice "yaml" "toml" "json" }}
+{{- $placeHolder := "#-hugo-placeholder-#" }}
+
+{{- /* Render. */}}
+{{- $code := "" }}
+{{- if $config }}
+  {{- $file = $file | default "hugo" }}
+  {{- $sections := (split $config ".") }}
+  {{- $configSection := index $.Site.Data.docs.config $sections }}
+  {{- $code = dict $sections $configSection }}
+  {{- if $skipHeader }}
+    {{- $code = $configSection }}
+  {{- end }}
+{{- else if $dataKey }}
+  {{- $file = $file | default $dataKey }}
+  {{- $sections := (split $dataKey ".") }}
+  {{- $code = index $.Site.Data.docs $sections }}
+{{- else }}
+  {{- $code = $.Inner }}
+{{- end }}
+
+
+<div x-data class="shortcode-code not-prose relative p-0 mt-6 mb-8">
+  {{- if $copy }}
+    <svg
+      class="absolute right-4 top-12 z-30 text-blue-600 hover:text-blue-500 cursor-pointer w-6 h-6"
+      @click="$copy($refs[$store.nav.userSettings.settings.configFileType])">
+      <use href="#icon--copy"></use>
+    </svg>
+  {{- end }}
+  <nav class="relative flex" aria-label="Tabs">
+    {{- with $file }}
+      <div
+        class="select-none flex-none text-sm px-2 content-center border-b-1 border-gray-300 dark:border-gray-700"
+        aria-label="Filename">
+        {{ . }}{{ if not $fm }}.{{ end }}
+      </div>
+    {{- end }}
+    {{- range $i, $lang := $langs }}
+      {{- $isLast := eq (add $i 1) (len $langs) }}
+      <button
+        x-on:click="$store.nav.userSettings.settings.configFileType = '{{ index $langs $i }}'"
+        aria-label="{{ printf `Toggle %s` . }}"
+        class="px-3 py-2 font-semibold text-black dark:text-slate-200 border-l-1 border-t-1 {{ if $isLast }}
+          border-r-1
+        {{ end }} border-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 dark:border-gray-700 cursor-pointer relative min-w-0 flex-1 overflow-hidden text-sm no-underline text-center focus:z-10 overflow-x-auto"
+        :class="$store.nav.userSettings.settings.configFileType === '{{ index $langs $i }}' ? 'border-b-0 bg-light dark:bg-dark' : 'border-b-1'">
+        <span class="select-none">
+          {{ . }}
+        </span>
+      </button>
+    {{- end }}
+  </nav>
+  {{- if $code }}
+    {{- range $i, $lang := $langs }}
+      <div
+        class="max-h-96 overflow-y-auto border-l-1 border-b-1 border-r-1 border-gray-300 dark:border-gray-700"
+        x-ref="{{ $lang }}"
+        x-cloak
+        x-transition:enter.opacity.duration.300ms
+        x-show="$store.nav.userSettings.settings.configFileType === '{{ index $langs $i }}'">
+        {{- $hCode := $code | transform.Remarshal . }}
+        {{- if and $fm (in (slice "toml" "yaml") .) }}
+          {{- $hCode = printf "%s\n%s\n%s" $placeHolder $hCode $placeHolder }}
+        {{- end }}
+        {{- $hCode = $hCode | replaceRE `\n+` "\n" }}
+        {{- highlight $hCode . "" | replaceRE $placeHolder (index $delimiters .) | safeHTML }}
+      </div>
+    {{- end }}
+  {{- end }}
+</div>
diff --git a/layouts/_shortcodes/datatable-filtered.html b/layouts/_shortcodes/datatable-filtered.html
new file mode 100644 (file)
index 0000000..de8b0cf
--- /dev/null
@@ -0,0 +1,47 @@
+{{ $package := (index .Params 0) }}
+{{ $listname := (index .Params 1) }}
+{{ $filter := split (index .Params 2) " " }}
+{{ $filter1 := index $filter 0 }}
+{{ $filter2 := index $filter 1 }}
+{{ $filter3 := index $filter 2 }}
+
+{{ $list := (index (index .Site.Data.docs $package) $listname) }}
+{{ $fields := after 3 .Params }}
+{{ $list := where $list $filter1 $filter2 $filter3 }}
+
+
+<div class="overflow-x-auto">
+  <table>
+    <thead>
+      <tr>
+        {{ range $fields }}
+          <th>{{ . }}</th>
+        {{ end }}
+      </tr>
+    </thead>
+    <tbody>
+      {{ range $list }}
+        <tr>
+          {{ range $k, $v := . }}
+            {{ $.Scratch.Set $k $v }}
+          {{ end }}
+          {{ range $k, $v := $fields }}
+            <td>
+              {{ $tdContent := $.Scratch.Get . }}
+              {{ if eq $k 3 }}
+                {{ printf "%v" $tdContent |
+                  strings.ReplaceRE `\[` "<ol><li>" |
+                  strings.ReplaceRE `\s` "</li><li>" |
+                  strings.ReplaceRE `\]` "</li></ol>" |
+                  safeHTML
+                }}
+              {{ else }}
+                {{ $tdContent }}
+              {{ end }}
+            </td>
+          {{ end }}
+        </tr>
+      {{ end }}
+    </tbody>
+  </table>
+</div>
diff --git a/layouts/_shortcodes/datatable.html b/layouts/_shortcodes/datatable.html
new file mode 100644 (file)
index 0000000..f135d84
--- /dev/null
@@ -0,0 +1,39 @@
+{{ $package := (index .Params 0) }}
+{{ $listname := (index .Params 1) }}
+{{ $list := (index (index .Site.Data.docs $package) $listname) }}
+{{ $fields := after 2 .Params }}
+
+
+<div class="overflow-x-auto">
+  <table>
+    <thead>
+      <tr>
+        {{ range $fields }}
+          {{ $s := . }}
+          {{ if eq $s "_key" }}
+            {{ $s = "type" }}
+          {{ end }}
+          <th>{{ $s }}</th>
+        {{ end }}
+      </tr>
+    </thead>
+    <tbody>
+      {{ range $k1, $v1 := $list }}
+        <tr>
+          {{ range $k2, $v2 := . }}
+            {{ $.Scratch.Set $k2 $v2 }}
+          {{ end }}
+          {{ range $fields }}
+            {{ $s := "" }}
+            {{ if eq . "_key" }}
+              {{ $s = $k1 }}
+            {{ else }}
+              {{ $s = $.Scratch.Get . }}
+            {{ end }}
+            <td>{{ $s }}</td>
+          {{ end }}
+        </tr>
+      {{ end }}
+    </tbody>
+  </table>
+</div>
diff --git a/layouts/_shortcodes/deprecated-in.html b/layouts/_shortcodes/deprecated-in.html
new file mode 100644 (file)
index 0000000..ce2ba38
--- /dev/null
@@ -0,0 +1,29 @@
+{{/* prettier-ignore-start */ -}}
+{{- /*
+Renders a callout indicating the version in which a feature was deprecated.
+
+Include descriptive text between the opening and closing tags, or omit the
+descriptive text and call the shortcode with a self-closing tag.
+
+@param {string} 0 The semantic version string, with or without a leading v.
+
+@example  {{< deprecated-in 0.144.0 />}}
+
+@example  {{< deprecated-in 0.144.0 >}}
+          Some descriptive text here.
+          {{< /deprecated-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 }}
+  {{- $text := printf "Deprecated in [v%s](%s)\n\n%s" $version $href $inner | $.Page.RenderString (dict "display" "block") }}
+  {{- partial "layouts/blocks/alert.html" (dict
+    "color" "orange"
+    "icon" "exclamation"
+    "text" $text
+    )
+  }}
+{{- else }}
+  {{- errorf "The %q shortcode requires a single positional parameter indicating version. See %s" .Name .Position }}
+{{- end }}
diff --git a/layouts/_shortcodes/eturl.html b/layouts/_shortcodes/eturl.html
new file mode 100644 (file)
index 0000000..a0237db
--- /dev/null
@@ -0,0 +1,26 @@
+{{/* prettier-ignore-start */ -}}
+{{- /*
+Renders an absolute URL to the source code for an embedded template.
+
+Accepts either positional or named parameters, and depends on the
+embedded_templates.toml file in the data directory.
+
+@param {string} filename The embedded template's file name, excluding extension.
+
+@example {{% et robots.txt %}}
+@example {{% et filename=robots.txt %}}
+*/ -}}
+{{/* prettier-ignore-end */ -}}
+{{- with $filename := or (.Get "filename") (.Get 0) }}
+  {{- with site.Data.embedded_template_urls }}
+    {{- with index . $filename }}
+      {{- urls.JoinPath site.Data.embedded_template_urls.base_url . }}
+    {{- else }}
+      {{- errorf "The %q shortcode was unable to find a URL for the embedded template named %q. Check the name. See %s" $.Name $filename $.Position }}
+    {{- end }}
+  {{- else }}
+    {{- 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 }}
+{{- end -}}
diff --git a/layouts/_shortcodes/glossary-term.html b/layouts/_shortcodes/glossary-term.html
new file mode 100644 (file)
index 0000000..2a45dc8
--- /dev/null
@@ -0,0 +1,18 @@
+{{- /*
+Renders the definition of the given glossary term.
+
+@param {string} (.Get 0) The glossary term.
+
+@example {{% glossary-term float %}}
+@example {{% glossary-term "floating point" %}}
+*/ -}}
+{{- with .Get 0 }}
+  {{- $path := printf "/quick-reference/glossary/%s" (urlize .) }}
+  {{- with site.GetPage $path }}
+{{ .RenderShortcodes }}{{/* Do not indent. */}}
+  {{- else }}
+    {{- errorf "The glossary term (%s) shortcode was unable to find %s: see %s" $.Name $path $.Position }}
+  {{- end }}
+{{- else }}
+  {{- errorf "The glossary term (%s) shortcode requires one positional parameter: see %s" $.Name $.Position }}
+{{- end -}}
diff --git a/layouts/_shortcodes/glossary.html b/layouts/_shortcodes/glossary.html
new file mode 100644 (file)
index 0000000..7331d5c
--- /dev/null
@@ -0,0 +1,54 @@
+{{- /*
+Renders the glossary of terms.
+
+When you call this shortcode using the {{% %}} notation, the glossary terms are
+Markdown headings (level 6) which means they are members of .Fragments. This
+allows the link render hook to verify links to glossary terms.
+
+Yes, the terms themselves are pages, but we don't want to link to the pages, at
+least not right now. Instead, we want to link to the ids rendered by this
+shortcode.
+
+@example {{% glossary %}}
+*/ -}}
+{{- $path := "/quick-reference/glossary" }}
+{{- with site.GetPage $path }}
+
+  {{- /* Build and render alphabetical index. */}}
+  {{- $m := dict }}
+  {{- range $p := .Pages.ByTitle }}
+    {{- $k := substr .Title 0 1 | strings.ToUpper }}
+    {{- if index $m $k }}
+      {{- continue }}
+    {{- end }}
+    {{- $anchor := path.BaseName .Path | anchorize }}
+    {{- $m = merge $m (dict $k $anchor) }}
+  {{- end }}
+  {{- range $k, $v := $m }}
+[{{ $k }}](#{{ $v }})&nbsp;{{/* Do not indent. */}}
+  {{- end }}
+
+  {{/* Render glossary terms. */}}
+  {{- range $p := .Pages.ByTitle }}
+{{ .Title }}{{/* Do not indent. */}}
+: {{ .RawContent | strings.TrimSpace | safeHTML }}{{/* Do not indent. */}}
+    {{ with .Params.reference }}
+      {{- $destination := "" }}
+      {{- with $u := urls.Parse . }}
+        {{- if $u.IsAbs }}
+          {{- $destination = $u.String }}
+        {{- else }}
+          {{- with site.GetPage $u.Path }}
+            {{- $destination = .RelPermalink }}
+          {{- else }}
+            {{- errorf "The %q shortcode was unable to find the reference link %s: see %s" $.Name . $p.String }}
+          {{- end }}
+        {{- end }}
+      {{- end }}
+: See&nbsp;[details]({{ $destination }}).{{/* Do not indent. */}}
+    {{- end }}
+  {{ end }}
+
+{{- else }}
+  {{- errorf "The %q shortcode was unable to get %s: see %s" .Name $path .Position}}
+{{- end }}
diff --git a/layouts/_shortcodes/hl.html b/layouts/_shortcodes/hl.html
new file mode 100644 (file)
index 0000000..3fafcb5
--- /dev/null
@@ -0,0 +1,14 @@
+{{/* prettier-ignore-start */ -}}
+{{- /*
+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.
+
+@example This is {{< hl python >}}inline{{< /hl >}} code.
+*/ -}}
+{{/* prettier-ignore-end */ -}}
+{{- $code := .Inner | strings.TrimSpace }}
+{{- $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
new file mode 100644 (file)
index 0000000..e49afc5
--- /dev/null
@@ -0,0 +1,391 @@
+{{/* prettier-ignore-start */ -}}
+{{- /*
+Renders the given image using the given filter, if any.
+
+When using the text filter, provide the arguments in this order:
+
+0. The text
+1. The horizontal offset, in pixels, relative to the left of the image (default 20)
+2. The vertical offset, in pixels, relative to the top of the image (default 20)
+3. The font size in pixels (default 64)
+4. The line height (default 1.2)
+5. The font color (default #ffffff)
+
+When using the padding filter, provide all arguments in this order:
+
+0. Padding top
+1. Padding right
+2. Padding bottom
+3. Padding right
+4. Canvas color
+
+@param {string} src The path to the image which must be a remote, page, or global resource.
+@param {string} [filter] The filter to apply to the image (case-insensitive).
+@param {string} [filterArgs] A comma-delimited list of arguments to pass to the filter.
+@param {bool} [example=false] If true, renders a before/after example.
+@param {int} [exampleWidth=384] Image width, in pixels, when rendering a before/after example.
+
+@example  {{< img src="zion-national-park.jpg" >}}
+@example  {{< img src="zion-national-park.jpg" alt="Zion National Park" >}}
+
+@example  {{< img
+            src="zion-national-park.jpg"
+            alt="Zion National Park"
+            filter="grayscale"
+          >}}
+
+@example  {{< img
+            src="zion-national-park.jpg"
+            alt="Zion National Park"
+            filter="process"
+            filterArgs="resize 400x webp"
+          >}}
+
+@example  {{< img
+            src="zion-national-park.jpg"
+            alt="Zion National Park"
+            filter="colorize"
+            filterArgs="180,50,20"
+          >}}
+
+@example  {{< img
+            src="zion-national-park.jpg"
+            alt="Zion National Park"
+            filter="grayscale"
+            example=true
+          >}}
+
+@example  {{< img
+            src="zion-national-park.jpg"
+            alt="Zion National Park"
+            filter="grayscale"
+            example=true
+            exampleWidth=400
+          >}}
+
+@example  {{< img
+            src="images/examples/zion-national-park.jpg"
+            alt="Zion National Park"
+            filter="Text"
+            filterArgs="Zion National Park,25,250,56"
+            example=true
+          >}}
+
+@example  {{< img
+            src="images/examples/zion-national-park.jpg"
+            alt="Zion National Park"
+            filter="Padding"
+            filterArgs="20,50,20,50,#0705"
+            example=true
+          >}}
+*/ -}}
+{{/* prettier-ignore-end */ -}}
+{{- /* Initialize. */}}
+{{- $alt := "" }}
+{{- $src := "" }}
+{{- $filter := "" }}
+{{- $filterArgs := slice }}
+{{- $example := false }}
+{{- $exampleWidth := 384 }}
+
+{{- /* Default values to use with the text filter. */}}
+{{ $textFilterOpts := dict
+  "xOffset" 20
+  "yOffset" 20
+  "fontSize" 64
+  "lineHeight" 1.2
+  "fontColor" "#ffffff"
+  "fontPath" "https://github.com/google/fonts/raw/refs/heads/main/ofl/lato/Lato-Regular.ttf"
+}}
+
+{{- /* Get and validate parameters. */}}
+{{- with .Get "alt" }}
+  {{- $alt = . }}
+{{- end }}
+
+{{- with .Get "src" }}
+  {{- $src = . }}
+{{- else }}
+  {{- errorf "The %q shortcode requires a file parameter. See %s" .Name .Position }}
+{{- end }}
+
+{{- with .Get "filter" }}
+  {{- $filter = . | lower }}
+{{- end }}
+
+{{- $validFilters := slice
+  "autoorient" "brightness" "colorbalance" "colorize" "contrast" "dither"
+  "gamma" "gaussianblur" "grayscale" "hue" "invert" "mask" "none" "opacity"
+  "overlay" "padding" "pixelate" "process" "saturation" "sepia" "sigmoid" "text"
+  "unsharpmask"
+}}
+
+{{- with $filter }}
+  {{- if not (in $validFilters .) }}
+    {{- errorf "The filter passed to the %q shortcode is invalid. The filter must be one of %s. See %s" $.Name (delimit $validFilters ", " ", or ") $.Position }}
+  {{- end }}
+{{- end }}
+
+{{- with .Get "filterArgs" }}
+  {{- $filterArgs = split . "," }}
+  {{- $filterArgs = apply $filterArgs "trim" "." " " }}
+{{- end }}
+
+{{- if in (slice "false" false 0) (.Get "example") }}
+  {{- $example = false }}
+{{- else if in (slice "true" true 1) (.Get "example") }}
+  {{- $example = true }}
+{{- end }}
+
+{{- with .Get "exampleWidth" }}
+  {{- $exampleWidth = . | int }}
+{{- end }}
+
+{{- /* Get image. */}}
+{{- $ctx := dict "page" .Page "src" $src "name" .Name "position" .Position }}
+{{- $i := partial "inline/get-resource.html" $ctx }}
+
+{{- /* Resize if rendering before/after examples. */}}
+{{- if $example }}
+  {{- $i = $i.Resize (printf "%dx" $exampleWidth) }}
+{{- end }}
+
+{{- /* Create filter. */}}
+{{- $f := "" }}
+{{- $ctx := dict "filter" $filter "args" $filterArgs "name" .Name "position" .Position }}
+{{- 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" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 100) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.Brightness (index $filterArgs 0) }}
+{{- else if eq $filter "colorbalance" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 3) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $filterArgs = apply $filterArgs "float" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "percentage red" "argValue" (index $filterArgs 0) "min" -100 "max" 500) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $ctx = merge $ctx (dict "argName" "percentage green" "argValue" (index $filterArgs 1) "min" -100 "max" 500) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $ctx = merge $ctx (dict "argName" "percentage blue" "argValue" (index $filterArgs 2) "min" -100 "max" 500) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.ColorBalance (index $filterArgs 0) (index $filterArgs 1) (index $filterArgs 2) }}
+{{- else if eq $filter "colorize" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 3) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $filterArgs = apply $filterArgs "float" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "hue" "argValue" (index $filterArgs 0) "min" 0 "max" 360) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $ctx = merge $ctx (dict "argName" "saturation" "argValue" (index $filterArgs 1) "min" 0 "max" 100) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 2) "min" 0 "max" 100) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.Colorize (index $filterArgs 0) (index $filterArgs 1) (index $filterArgs 2) }}
+{{- else if eq $filter "contrast" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $filterArgs = apply $filterArgs "float" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 100) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.Contrast (index $filterArgs 0) }}
+{{- else if eq $filter "dither" }}
+  {{- $f = images.Dither }}
+{{- else if eq $filter "gamma" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $filterArgs = apply $filterArgs "float" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "gamma" "argValue" (index $filterArgs 0) "min" 0 "max" 100) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.Gamma (index $filterArgs 0) }}
+{{- else if eq $filter "gaussianblur" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $filterArgs = apply $filterArgs "float" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "sigma" "argValue" (index $filterArgs 0) "min" 0 "max" 1000) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.GaussianBlur (index $filterArgs 0) }}
+{{- else if eq $filter "grayscale" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 0) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $f = images.Grayscale }}
+{{- else if eq $filter "hue" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $filterArgs = apply $filterArgs "float" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "shift" "argValue" (index $filterArgs 0) "min" -180 "max" 180) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.Hue (index $filterArgs 0) }}
+{{- else if eq $filter "invert" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 0) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $f = images.Invert }}
+{{- else if eq $filter "mask" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $ctx := dict "src" (index $filterArgs 0) "name" .Name "position" .Position }}
+  {{- $maskImage := partial "inline/get-resource.html" $ctx }}
+  {{- $f = images.Mask $maskImage }}
+{{- else if eq $filter "opacity" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $filterArgs = apply $filterArgs "float" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "opacity" "argValue" (index $filterArgs 0) "min" 0 "max" 1) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.Opacity (index $filterArgs 0) }}
+{{- else if eq $filter "overlay" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 3) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $ctx := dict "src" (index $filterArgs 0) "name" .Name "position" .Position }}
+  {{- $overlayImg := partial "inline/get-resource.html" $ctx }}
+  {{- $f = images.Overlay $overlayImg (index $filterArgs 1 | float ) (index $filterArgs 2 | float) }}
+{{- else if eq $filter "padding" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 5) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $f = images.Padding
+    (index $filterArgs 0 | int)
+    (index $filterArgs 1 | int)
+    (index $filterArgs 2 | int)
+    (index $filterArgs 3 | int)
+    (index $filterArgs 4)
+  }}
+{{- else if eq $filter "pixelate" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $filterArgs = apply $filterArgs "float" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "size" "argValue" (index $filterArgs 0) "min" 0 "max" 1000) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.Pixelate (index $filterArgs 0) }}
+{{- else if eq $filter "process" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $f = images.Process (index $filterArgs 0) }}
+{{- else if eq $filter "saturation" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $filterArgs = apply $filterArgs "float" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 500) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.Saturation (index $filterArgs 0) }}
+{{- else if eq $filter "sepia" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $filterArgs = apply $filterArgs "float" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" 0 "max" 100) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.Sepia (index $filterArgs 0) }}
+{{- else if eq $filter "sigmoid" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 2) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $filterArgs = apply $filterArgs "float" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "midpoint" "argValue" (index $filterArgs 0) "min" 0 "max" 1) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $ctx = merge $ctx (dict "argName" "factor" "argValue" (index $filterArgs 1) "min" -10 "max" 10) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.Sigmoid (index $filterArgs 0) (index $filterArgs 1) }}
+{{- else if eq $filter "text" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $ctx := dict "src" $textFilterOpts.fontPath "name" .Name "position" .Position }}
+  {{- $font := or (partial "inline/get-resource.html" $ctx) }}
+  {{- $fontSize := or (index $filterArgs 3 | int) $textFilterOpts.fontSize }}
+  {{- $lineHeight := math.Max (or (index $filterArgs 4 | float) $textFilterOpts.lineHeight) 1 }}
+  {{- $opts := dict
+    "x" (or (index $filterArgs 1 | int) $textFilterOpts.xOffset)
+    "y" (or (index $filterArgs 2 | int) $textFilterOpts.yOffset)
+    "size" $fontSize
+    "linespacing" (mul (sub $lineHeight 1) $fontSize)
+    "color" (or (index $filterArgs 5) $textFilterOpts.fontColor)
+    "font" $font
+  }}
+  {{- $f = images.Text (index $filterArgs 0) $opts }}
+{{- else if eq $filter "unsharpmask" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 3) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $filterArgs = apply $filterArgs "float" "." }}
+  {{- $ctx = merge $ctx (dict "argName" "sigma" "argValue" (index $filterArgs 0) "min" 0 "max" 500) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $ctx = merge $ctx (dict "argName" "amount" "argValue" (index $filterArgs 1) "min" 0 "max" 100) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $ctx = merge $ctx (dict "argName" "threshold" "argValue" (index $filterArgs 2) "min" 0 "max" 1) }}
+  {{- template "validate-arg-value" $ctx }}
+  {{- $f = images.UnsharpMask (index $filterArgs 0) (index $filterArgs 1) (index $filterArgs 2) }}
+{{- end }}
+
+{{- /* Apply filter. */}}
+{{- $fi := $i }}
+{{- with $f }}
+  {{- $fi = $i.Filter . }}
+{{- end }}
+
+{{- /* Render. */}}
+{{- $class := "border-1 border-gray-300 dark:border-gray-500" }}
+{{- if $example }}
+  <p>Original</p>
+  <img
+    class="{{ $class }}"
+    src="{{ $i.RelPermalink }}"
+    alt="{{ $alt }}">
+  <p>Processed</p>
+  <img
+    class="{{ $class }}"
+    src="{{ $fi.RelPermalink }}"
+    alt="{{ $alt }}">
+{{- else -}}
+  <img
+    src="{{ $fi.RelPermalink }}"
+    alt="{{ $alt }}">
+{{- end }}
+
+{{- define "validate-arg-count" }}
+  {{- $msg := "When using the %q filter, the %q shortcode requires an args parameter with %d %s. See %s" }}
+  {{- if lt (len .args) .argsRequired }}
+    {{- $text := "values" }}
+    {{- if eq 1 .argsRequired }}
+      {{- $text = "value" }}
+    {{- end }}
+    {{- errorf $msg .filter .name .argsRequired $text .position }}
+  {{- end }}
+{{- end }}
+
+{{- define "validate-arg-value" }}
+  {{- $msg := "The %q argument passed to the %q shortcode is invalid. Expected a value in the range [%v,%v], but received %v. See %s" }}
+  {{- if or (lt .argValue .min) (gt .argValue .max) }}
+    {{- errorf $msg .argName .name .min .max .argValue .position }}
+  {{- end }}
+{{- end }}
+
+{{- define "_partials/inline/get-resource.html" }}
+  {{- $r := "" }}
+  {{- $u := urls.Parse .src }}
+  {{- $msg := "The %q shortcode was unable to resolve %s. See %s" }}
+  {{- if $u.IsAbs }}
+    {{- with try (resources.GetRemote $u.String) }}
+      {{- with .Err }}
+        {{- errorf "%s" . }}
+      {{- else with .Value }}
+        {{- /* This is a remote resource. */}}
+        {{- $r = . }}
+      {{- else }}
+        {{- errorf $msg $.name $u.String $.position }}
+      {{- end }}
+    {{- end }}
+  {{- else }}
+    {{- with .page.Resources.Get (strings.TrimPrefix "./" $u.Path) }}
+      {{- /* This is a page resource. */}}
+      {{- $r = . }}
+    {{- else }}
+      {{- with resources.Get $u.Path }}
+        {{- /* This is a global resource. */}}
+        {{- $r = . }}
+      {{- else }}
+        {{- errorf $msg $.name $u.Path $.position }}
+      {{- end }}
+    {{- end }}
+  {{- end }}
+  {{- return $r }}
+{{- end -}}
diff --git a/layouts/_shortcodes/imgproc.html b/layouts/_shortcodes/imgproc.html
new file mode 100644 (file)
index 0000000..fee4852
--- /dev/null
@@ -0,0 +1,39 @@
+{{/* prettier-ignore-start */ -}}
+{{- /*
+Renders the given image using the given process specification.
+
+@param {string} path The path to the image, either a page resource or a global resource.
+@param {string} spec The image processing specification.
+@param {string} alt The alt attribute of the img element.
+
+@example {{< imgproc path="sunset.jpg" spec="resize 300x" alt="A sunset" >}}
+*/ -}}
+{{/* prettier-ignore-end */ -}}
+{{- with $.Get "path" }}
+  {{- with $i := or ($.Page.Resources.Get .) (resources.Get .) }}
+    {{- with $spec := $.Get "spec" }}
+      {{- with $i.Process . }}
+        <figure>
+          <img
+            src="{{ .RelPermalink }}"
+            width="{{ .Width }}"
+            height="{{ .Height }}"
+            alt="{{ $.Get `alt` }}">
+          <figcaption class="not-prose text-sm">
+            {{- with $.Inner }}
+              {{ . }}
+            {{- else }}
+              {{ $spec }}
+            {{- end }}
+          </figcaption>
+        </figure>
+      {{- end }}
+    {{- else }}
+      {{- errorf "The %q shortcode requires a 'spec' argument containing the image processing specification. See %s" $.Name $.Position }}
+    {{- end }}
+  {{- else }}
+    {{- errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position }}
+  {{- end }}
+{{- else }}
+  {{- errorf "The %q shortcode requires a 'path' argument indicating the image path. The image must be a page resource or a global resource. See %s" $.Name $.Position }}
+{{- end }}
diff --git a/layouts/_shortcodes/include.html b/layouts/_shortcodes/include.html
new file mode 100644 (file)
index 0000000..81b0c1d
--- /dev/null
@@ -0,0 +1,20 @@
+{{/* prettier-ignore-start */ -}}
+{{- /*
+Renders the page using the RenderShortcode method on the Page object.
+
+You must call this shortcode using the {{% %}} notation.
+
+@param {string} (positional parameter 0) The path to the page, relative to the content directory.
+
+@example {{% include "functions/_common/glob-patterns" %}}
+*/ -}}
+{{/* prettier-ignore-end */ -}}
+{{- with .Get 0 }}
+  {{- with or ($.Page.GetPage .) (site.GetPage .) }}
+    {{- .RenderShortcodes }}
+  {{- else }}
+    {{- errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position }}
+  {{- end }}
+{{- else }}
+  {{- errorf "The %q shortcode requires a positional parameter indicating the path of the file to include. See %s" .Name .Position }}
+{{- end }}
diff --git a/layouts/_shortcodes/list-pages-in-section.html b/layouts/_shortcodes/list-pages-in-section.html
new file mode 100644 (file)
index 0000000..f6dfe72
--- /dev/null
@@ -0,0 +1,69 @@
+{{- /*
+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.
+
+Filters are defined in the data directory, in the file named page_filters. Each
+filter is an array of paths to a file, relative to the root of the content
+directory. Hugo will throw an error if the specified filter does not exist, or
+if any of the pages in the filter do not exist.
+
+@param {string} path The path to the section.
+@param {string} [filter=""] The name of filter list.
+@param {string} [filterType=""] The type of filter, either include or exclude.
+@param {string} [titlePrefix=""] The string to prepend to the link title.
+
+@example {{< list-pages-in-section path=/methods/resources >}}
+@example {{< list-pages-in-section path=/functions/images filter=some_filter filterType=exclude >}}
+@example {{< list-pages-in-section path=/functions/images filter=some_filter filterType=exclude titlePrefix=foo >}}
+*/}}
+
+{{/* Initialize. */}}
+{{ $filter := or "" (.Get "filter" | lower) }}
+{{ $filterType := or (.Get "filterType") "none" | lower }}
+{{ $filteredPages := slice }}
+{{ $titlePrefix := or (.Get "titlePrefix") "" }}
+
+{{/* Build slice of filtered pages. */}}
+{{ with $filter }}
+  {{ with index site.Data.page_filters . }}
+    {{ range . }}
+      {{ with site.GetPage . }}
+        {{ $filteredPages = $filteredPages | append . }}
+      {{ else }}
+        {{ errorf "The %q shortcode was unable to find %q as specified in the page_filters data file. See %s" $.Name . $.Position }}
+      {{ end }}
+    {{ end }}
+  {{ else }}
+    {{ errorf "The %q shortcode was unable to find the %q filter in the page_filters data file. See %s" $.Name . $.Position }}
+  {{ end }}
+{{ end }}
+
+{{/* Render. */}}
+{{ with $sectionPath := .Get "path" }}
+  {{ with site.GetPage . }}
+    {{ with .RegularPages }}
+        {{ range $page := .ByTitle }}
+          {{ if or
+            (and (eq $filterType "include") (in $filteredPages $page))
+            (and (eq $filterType "exclude") (not (in $filteredPages $page)))
+            (eq $filterType "none")
+          }}
+            {{ $linkTitle := .LinkTitle }}
+            {{ with $titlePrefix }}
+              {{ $linkTitle = printf "%s%s" . $linkTitle }}
+            {{ end }}
+[{{ $linkTitle }}]({{ $page.RelPermalink }}){{/* Do not indent. */}}
+: {{ $page.Description }}{{/* Do not indent. */}}
+          {{ end }}
+        {{ end }}
+    {{ else }}
+      {{ warnf "The %q shortcode found no pages in the %q section. See %s" $.Name $sectionPath $.Position }}
+    {{ end }}
+  {{ else }}
+    {{ errorf "The %q shortcode was unable to find %q. See %s" $.Name $sectionPath $.Position }}
+  {{ end }}
+{{ else }}
+  {{ errorf "The %q shortcode requires a 'path' parameter indicating the path to the section. See %s" $.Name $.Position }}
+{{ end }}
diff --git a/layouts/_shortcodes/module-mounts-note.html b/layouts/_shortcodes/module-mounts-note.html
new file mode 100644 (file)
index 0000000..ba89abc
--- /dev/null
@@ -0,0 +1,2 @@
+For a more flexible approach to configuring this directory, consult the section
+on [module mounts](/configuration/module/#mounts).
diff --git a/layouts/_shortcodes/new-in.html b/layouts/_shortcodes/new-in.html
new file mode 100644 (file)
index 0000000..955d0a7
--- /dev/null
@@ -0,0 +1,64 @@
+{{/* prettier-ignore-start */ -}}
+{{- /*
+Renders a callout or badge indicating the version in which a feature was added.
+
+To render a callout, include descriptive text between the opening and closing
+tags. To render a badge,omit the descriptive text and call the shortcode with a
+self-closing tag.
+
+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} 0 The semantic version string, with or without a leading v.
+
+@example  {{< new-in 0.100.0 />}}
+
+@example  {{{< new-in 0.100.0 >}}
+          Some descriptive text here.
+          {{< /new-in >}}
+*/ -}}
+{{/* prettier-ignore-end */ -}}
+{{- $majorVersionDiffThreshold := 0 }}
+{{- $minorVersionDiffThreshold := 30 }}
+{{- $displayExpirationWarning := true }}
+
+{{- with $version := .Get 0 | strings.TrimLeft "vV" }}
+  {{- $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 }}
+    {{- $href := printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}
+    {{- with $.Inner }}
+      {{- $inner := strings.TrimSpace . }}
+      {{- $text := printf "New in [v%s](%s)\n\n%s" $version $href $inner | $.Page.RenderString (dict "display" "block") }}
+      {{ partial "layouts/blocks/alert.html" (dict
+        "color" "green"
+        "icon" "exclamation"
+        "text" $text
+        )
+      }}
+    {{- else }}
+      <span
+        class="not-prose inline-flex items-center px-2 mr-1 rounded text-sm font-medium bg-green-200 dark:bg-green-400 fill-green-600">
+        <svg class="mr-1.5 h-2 w-2" viewBox="0 0 8 8">
+          <circle cx="4" cy="4" r="3" />
+        </svg>
+        <a
+          class="text-green-800 dark:text-black hover:text-green-600 no-underline"
+          href="{{ $href }}"
+          target="_blank">
+          New in
+          v{{ $version }}
+        </a>
+      </span>
+    {{- end }}
+  {{- end }}
+{{- else }}
+  {{- errorf "The %q shortcode requires a single positional parameter indicating version. See %s" .Name .Position }}
+{{- end }}
diff --git a/layouts/_shortcodes/per-lang-config-keys.html b/layouts/_shortcodes/per-lang-config-keys.html
new file mode 100644 (file)
index 0000000..31d7daf
--- /dev/null
@@ -0,0 +1,71 @@
+{{/* prettier-ignore-start */ -}}
+{{- /*
+Renders a responsive grid of the configuration keys that can be defined
+separately for each language.
+*/ -}}
+{{/* prettier-ignore-end */ -}}
+{{- $siteConfigKeys := slice
+  (dict "baseURL" "/configuration/all/#baseurl")
+  (dict "buildDrafts" "/configuration/all/#builddrafts")
+  (dict "buildExpired" "/configuration/all/#buildexpired")
+  (dict "buildFuture" "/configuration/all/#buildfuture")
+  (dict "canonifyURLs" "/configuration/all/#canonifyurls")
+  (dict "capitalizeListTitles" "/configuration/all/#capitalizelisttitles")
+  (dict "contentDir" "/configuration/all/#contentdir")
+  (dict "copyright" "/configuration/all/#copyright")
+  (dict "disableAliases" "/configuration/all/#disablealiases")
+  (dict "disableHugoGeneratorInject" "/configuration/all/#disablehugogeneratorinject")
+  (dict "disableKinds" "/configuration/all/#disablekinds")
+  (dict "disableLiveReload" "/configuration/all/#disablelivereload")
+  (dict "disablePathToLower" "/configuration/all/#disablepathtolower")
+  (dict "enableEmoji " "/configuration/all/#enableemoji")
+  (dict "frontmatter" "/configuration/front-matter/")
+  (dict "hasCJKLanguage" "/configuration/all/#hascjklanguage")
+  (dict "languageCode" "/configuration/all/#languagecode")
+  (dict "mainSections" "/configuration/all/#mainsections")
+  (dict "markup" "/configuration/markup/")
+  (dict "mediaTypes" "/configuration/media-types/")
+  (dict "menus" "/configuration/menus/")
+  (dict "outputFormats" "/configuration/output-formats")
+  (dict "outputs" "/configuration/outputs/")
+  (dict "page" "/configuration/page/")
+  (dict "pagination" "/configuration/pagination/")
+  (dict "params" "/configuration/params/")
+  (dict "permalinks" "/configuration/permalinks/")
+  (dict "pluralizeListTitles" "/configuration/all/#pluralizelisttitles")
+  (dict "privacy" "/configuration/privacy/")
+  (dict "refLinksErrorLevel" "/configuration/all/#reflinkserrorlevel")
+  (dict "refLinksNotFoundURL" "/configuration/all/#reflinksnotfoundurl")
+  (dict "related" "/configuration/related-content/")
+  (dict "relativeURLs" "/configuration/all/#relativeurls")
+  (dict "removePathAccents" "/configuration/all/#removepathaccents")
+  (dict "renderSegments" "/configuration/all/#rendersegments")
+  (dict "sectionPagesMenu" "/configuration/all/#sectionpagesmenu")
+  (dict "security" "/configuration/security/")
+  (dict "services" "/configuration/services/")
+  (dict "sitemap" "/configuration/sitemap/")
+  (dict "staticDir" "/configuration/all/#staticdir")
+  (dict "summaryLength" "/configuration/all/#summarylength")
+  (dict "taxonomies" "/configuration/taxonomies/")
+  (dict "timeZone" "/configuration/all/#timezone")
+  (dict "title" "/configuration/all/#title")
+  (dict "titleCaseStyle" "/configuration/all/#titlecasestyle")
+}}
+
+{{- $a := len $siteConfigKeys }}
+{{- $b := math.Ceil (div $a 2.) }}
+{{- $c := math.Ceil (div $a 3.) }}
+
+
+<div
+  class="grid grid-flow-col grid-rows-{{ $a }} sm:grid-rows-{{ $b }} md:grid-rows-{{ $c }} gap-1">
+  {{- range $siteConfigKeys }}
+    {{ range $k, $v := . }}
+      {{ $u := urls.Parse $v }}
+      {{ if not (site.GetPage $u.Path) }}
+        {{ errorf "The %q shorcode was unable to find %s. See %s." $.Name $u.Path $.Position }}
+      {{ end }}
+      <a href="{{ $v | relLangURL }}"><code>{{ $k }}</code></a>
+    {{ end }}
+  {{- end }}
+</div>
diff --git a/layouts/_shortcodes/quick-reference.html b/layouts/_shortcodes/quick-reference.html
new file mode 100644 (file)
index 0000000..0ac5440
--- /dev/null
@@ -0,0 +1,30 @@
+{{- /*
+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.
+
+@example {{% quick-reference section="/functions" %}}
+*/ -}}
+{{ $section := "" }}
+{{ with .Get "section" }}
+  {{ $section = . }}
+{{ else }}
+  {{ errorf "The %q shortcode requires a 'section' parameter. See %s" .Name .Position }}
+{{ end }}
+
+{{ with site.GetPage $section }}
+  {{ range .Sections }}
+## {{ .LinkTitle }}{{/* Do not indent. */}}
+{{ .Description }}{{/* Do not indent. */}}
+    {{ .Content }}
+    {{ with .Pages }}
+      {{ range . }}
+[{{ .LinkTitle }}]({{ .RelPermalink }}){{/* Do not indent. */}}
+: {{ .Description }}{{/* Do not indent. */}}
+      {{ end }}
+    {{ end }}
+  {{ end }}
+{{ else }}
+  {{ errorf "The %q shortcodes was unable to find the %q section. See %s" .Name $section .Position }}
+{{ end }}
diff --git a/layouts/_shortcodes/root-configuration-keys.html b/layouts/_shortcodes/root-configuration-keys.html
new file mode 100644 (file)
index 0000000..46a6e07
--- /dev/null
@@ -0,0 +1,45 @@
+{{/* prettier-ignore-start */ -}}
+{{/*
+Renders a comma-separated list of links to the root key configuration pages.
+
+@example {{< root-configuration-keys >}}
+*/ -}}
+{{/* prettier-ignore-end */ -}}
+{{- /* Create scratch map of key:filename. */}}
+{{- $s := newScratch }}
+{{- range $k, $v := site.Data.docs.config }}
+  {{- if or (reflect.IsMap .) (reflect.IsSlice .) }}
+    {{- $s.Set $k ($k | humanize | anchorize) }}
+  {{- end }}
+{{- end }}
+
+{{/* Deprecated. */}}
+{{- $s.Delete "author" }}
+
+{{/* Use mounts instead. */}}
+{{- $s.Delete "staticDir" }}
+{{- $s.Delete "ignoreFiles" }}
+
+{{/* This key is "HTTPCache" not "httpCache". */}}
+{{- $s.Set "HTTPCache" "http-cache" }}
+
+{{/* This key is "frontmatter" not "frontMatter" */}}
+{{- $s.Set "frontmatter" "front-matter" }}
+
+{{/* The page title is "Related content" not "related". */}}
+{{- $s.Set "related" "related-content" }}
+
+{{/* It can be configured as bool or map; we want to show map. */}}
+{{- $s.Set "uglyURLs" "ugly-urls" }}
+
+{{- $links := slice }}
+{{- range $k, $v := $s.Values }}
+  {{- $path := printf "/configuration/%s" $v }}
+  {{- with site.GetPage $path }}
+    {{- $links = $links | append (printf "<a href=%q><code>%s</code></a>" .RelPermalink $k) }}
+  {{- else }}
+    {{- errorf "The %q shortcode was unable to find the page %s. See %s." $.Name $path $.Position }}
+  {{- end }}
+{{- end }}
+
+{{- delimit $links ", " ", and " | safeHTML -}}
diff --git a/layouts/_shortcodes/syntax-highlighting-styles.html b/layouts/_shortcodes/syntax-highlighting-styles.html
new file mode 100644 (file)
index 0000000..297849c
--- /dev/null
@@ -0,0 +1,70 @@
+{{- /*
+Renders a gallery a Chroma syntax highlighting styles.
+
+@example {{% syntax-highlighting-styles %}}
+*/ -}}
+{{- $examples := slice }}
+
+{{- /* Example: css */}}
+{{- $example := dict "lang" "css" "code" `
+body {
+  font-size: 16px;  /* comment */
+}
+`}}
+{{- $examples = $examples | append $example }}
+
+{{- /* Example: html */}}
+{{- $example = dict "lang" "html" "code" `
+<a href="/about.html">Example</a>  <!-- comment -->
+`}}
+{{- $examples = $examples | append $example }}
+
+{{- /* Example: go-html-template */}}
+{{- $example = dict "lang" "go-html-template" "code" `
+{{ with $.Page.Params.content }}
+  {{ . | $.Page.RenderString }}  {{/* comment */}}
+{{ end }}
+`}}
+{{- $examples = $examples | append $example }}
+
+{{- /* Example: javascript */}}
+{{- $example = dict "lang" "javascript" "code" `
+if ([1,"one",2,"two"].includes(value)){
+  console.log("Number is either 1 or 2.");  // comment
+}
+`}}
+{{- $examples := $examples | append $example }}
+
+{{- /* Example: markdown */}}
+{{- $example = dict "lang" "markdown" "code" `
+{{< figure src="kitten.jpg" >}}
+[example](https://example.org "An example")  <!-- comment -->
+`}}
+{{- $examples := $examples | append $example }}
+
+{{- /* Example: toml */}}
+{{- $example = dict "lang" "toml" "code" `
+[params]
+bool = true  # comment
+string = 'foo'
+`}}
+{{- $examples := $examples | append $example }}
+
+{{- /* Render */}}
+{{- with site.Data.docs.chroma.styles }}
+  {{- range $style := . }}
+
+### {{ $style }} {class="!mt-7 !mb-6"}{{/* Do not indent. */}}
+
+    {{- range $examples }}
+
+{{ .lang }}{{/* Do not indent. */}}
+{class="text-sm !-mt-3 !-mb-5"}{{/* Do not indent. */}}
+
+```{{ .lang }} {noClasses=true style="{{ $style }}"}{{/* Do not indent. */}}
+{{- .code | safeHTML -}}{{/* Do not indent. */}}
+```{{/* Do not indent. */}}
+
+    {{- end }}
+  {{- end }}
+{{- end }}
diff --git a/layouts/baseof.html b/layouts/baseof.html
new file mode 100644 (file)
index 0000000..4c14a6b
--- /dev/null
@@ -0,0 +1,74 @@
+<!doctype html>
+<html
+  class="h-full antialiased scheme-light dark:scheme-dark"
+  lang="{{ or site.Language.LanguageCode `en-US` }}">
+  <head>
+    <meta charset="utf-8">
+    <title>
+      {{ .Title }}
+    </title>
+    <style>
+      [x-cloak] {
+        display: none !important;
+      }
+    </style>
+    <meta
+      name="description"
+      content="{{ .Description | default site.Params.description }}">
+    {{ partial "layouts/head/head-js.html" . }}
+    {{ with (templates.Defer (dict "key" "global")) }}
+      {{ $t := debug.Timer "tailwindcss" }}
+      {{ with resources.Get "css/styles.css" }}
+        {{ $opts := dict
+          "inlineImports" true
+          "minify" (not hugo.IsDevelopment)
+        }}
+        {{ with . | css.TailwindCSS $opts }}
+          {{ partial "helpers/linkcss.html" (dict "r" .) }}
+        {{ end }}
+      {{ end }}
+      {{ $t.Stop }}
+    {{ end }}
+    {{ $noop := .WordCount }}
+    {{ if .Page.Store.Get "hasMath" }}
+      <link
+        href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css"
+        rel="stylesheet">
+    {{ end }}
+    {{ partial "layouts/head/head.html" . }}
+  </head>
+  <body
+    class="flex flex-col min-h-full bg-white dark:bg-blue-950 kind-{{ .Kind }}">
+    {{ partial "layouts/hooks/body-start.html" . }}
+    {{/* Layout. */}}
+    {{ block "header" . }}
+      {{ partial "layouts/header/header.html" . }}
+    {{ end }}
+    {{ block "subheader" . }}
+    {{ end }}
+    {{ block "hero" . }}
+    {{ end }}
+    <div class="flex w-full xl:w-6xl h-full flex-auto mx-auto">
+      <main
+        class="flex-1 mx-auto lg:mx-0 w-full max-w-3x lg:max-w-3x pt-8 lg:pt-14 pb-20 px-main print:pt-0">
+        {{ partial "layouts/hooks/body-main-start.html" . }}
+        {{ block "main" . }}{{ end }}
+      </main>
+      {{ block "rightsidebar" . }}
+        <aside
+          class="py-15 ml-4 xl:ml-12 w-60 hidden lg:relative lg:block lg:flex-none">
+          {{ block "rightsidebar_content" . }}{{ end }}
+        </aside>
+      {{ end }}
+    </div>
+    {{/* Common icons. */}}
+    {{ partial "layouts/icons.html" . }}
+    {{/* Common templates. */}}
+    {{ partial "layouts/templates.html" . }}
+    {{/* Footer. */}}
+    {{ block "footer" . }}
+      {{ partial "layouts/footer.html" . }}
+    {{ end }}
+    {{ partial "layouts/hooks/body-end.html" . }}
+  </body>
+</html>
diff --git a/layouts/home.headers b/layouts/home.headers
new file mode 100644 (file)
index 0000000..1216e42
--- /dev/null
@@ -0,0 +1,5 @@
+/*
+  X-Frame-Options: DENY
+  X-XSS-Protection: 1; mode=block
+  X-Content-Type-Options: nosniff
+  Referrer-Policy: origin-when-cross-origin
diff --git a/layouts/home.html b/layouts/home.html
new file mode 100644 (file)
index 0000000..392f66c
--- /dev/null
@@ -0,0 +1,52 @@
+{{ define "main" }}
+  <div class="flex flex-col w-full p-0 m-0">
+    {{ partial "layouts/home/opensource.html" . }}
+    <hr class="border-t border-gray-200 dark:border-gray-800 my-10 lg:my-14">
+    {{ partial "layouts/home/sponsors.html"  (dict "ctx" . "gtag" "home" ) }}
+    <hr class="border-t border-gray-200 dark:border-gray-800 my-10 lg:my-14">
+    {{ partial "layouts/home/features.html" . }}
+  </div>
+{{ end }}
+
+{{ define "hero" }}
+  <div class="relative isolate px-6 lg:px-8">
+    <div class="mx-auto max-w-2xl pt-16">
+      <div class="text-center">
+        <img
+          src="{{ `images/hugo-logo-wide.svg`| relURL }}"
+          alt="Hugo Logo"
+          class="w-64 aspect-3/1 mx-auto mb-8">
+        <h1
+          class="text-4xl font-bold tracking-tight text-balance text-gray-900 dark:text-gray-300 sm:text-6xl">
+          The world’s fastest framework for building websites
+        </h1>
+        <div
+          class="mt-8 text-lg font-medium text-pretty text-gray-800 dark:text-gray-400  sm:text-xl/8">
+          Hugo is one of the most popular open-source static site generators.
+          With its amazing speed and flexibility, Hugo makes building websites
+          fun again.
+        </div>
+        <div class="mt-10 flex items-center justify-center gap-x-6">
+          {{ with site.GetPage "/getting-started" }}
+            <a
+              href="{{ .RelPermalink }}"
+              class="rounded-md uppercase tracking-wide bg-blue-600  hover:bg-blue-500 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
+              >{{ .LinkTitle }}</a
+            >
+          {{ end }}
+          <div class="-my-5 mr-6 sm:mr-8 md:mr-0">
+            {{ partial "layouts/search/button.html" (dict "page" . "standalone" true) }}
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+{{ end }}
+
+{{ define "rightsidebar" }}
+  {{ printf "%c" '\u00A0' }}
+{{ end }}
+
+{{ define "leftsidebar" }}
+  {{ printf "%c" '\u00A0' }}
+{{ end }}
diff --git a/layouts/home.redir b/layouts/home.redir
new file mode 100644 (file)
index 0000000..bb72f96
--- /dev/null
@@ -0,0 +1,6 @@
+# Netlify redirects. See https://www.netlify.com/docs/redirects/
+{{ range $p := .Site.Pages -}}
+{{ range .Aliases }}
+{{ . | printf "%-35s" }}       {{ $p.RelPermalink -}}
+{{ end -}}
+{{- end -}}
diff --git a/layouts/index.headers b/layouts/index.headers
deleted file mode 100644 (file)
index 1216e42..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
-  X-Frame-Options: DENY
-  X-XSS-Protection: 1; mode=block
-  X-Content-Type-Options: nosniff
-  Referrer-Policy: origin-when-cross-origin
diff --git a/layouts/index.html b/layouts/index.html
deleted file mode 100644 (file)
index 392f66c..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-{{ define "main" }}
-  <div class="flex flex-col w-full p-0 m-0">
-    {{ partial "layouts/home/opensource.html" . }}
-    <hr class="border-t border-gray-200 dark:border-gray-800 my-10 lg:my-14">
-    {{ partial "layouts/home/sponsors.html"  (dict "ctx" . "gtag" "home" ) }}
-    <hr class="border-t border-gray-200 dark:border-gray-800 my-10 lg:my-14">
-    {{ partial "layouts/home/features.html" . }}
-  </div>
-{{ end }}
-
-{{ define "hero" }}
-  <div class="relative isolate px-6 lg:px-8">
-    <div class="mx-auto max-w-2xl pt-16">
-      <div class="text-center">
-        <img
-          src="{{ `images/hugo-logo-wide.svg`| relURL }}"
-          alt="Hugo Logo"
-          class="w-64 aspect-3/1 mx-auto mb-8">
-        <h1
-          class="text-4xl font-bold tracking-tight text-balance text-gray-900 dark:text-gray-300 sm:text-6xl">
-          The world’s fastest framework for building websites
-        </h1>
-        <div
-          class="mt-8 text-lg font-medium text-pretty text-gray-800 dark:text-gray-400  sm:text-xl/8">
-          Hugo is one of the most popular open-source static site generators.
-          With its amazing speed and flexibility, Hugo makes building websites
-          fun again.
-        </div>
-        <div class="mt-10 flex items-center justify-center gap-x-6">
-          {{ with site.GetPage "/getting-started" }}
-            <a
-              href="{{ .RelPermalink }}"
-              class="rounded-md uppercase tracking-wide bg-blue-600  hover:bg-blue-500 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
-              >{{ .LinkTitle }}</a
-            >
-          {{ end }}
-          <div class="-my-5 mr-6 sm:mr-8 md:mr-0">
-            {{ partial "layouts/search/button.html" (dict "page" . "standalone" true) }}
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-{{ end }}
-
-{{ define "rightsidebar" }}
-  {{ printf "%c" '\u00A0' }}
-{{ end }}
-
-{{ define "leftsidebar" }}
-  {{ printf "%c" '\u00A0' }}
-{{ end }}
diff --git a/layouts/index.redir b/layouts/index.redir
deleted file mode 100644 (file)
index bb72f96..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# Netlify redirects. See https://www.netlify.com/docs/redirects/
-{{ range $p := .Site.Pages -}}
-{{ range .Aliases }}
-{{ . | printf "%-35s" }}       {{ $p.RelPermalink -}}
-{{ end -}}
-{{- end -}}
diff --git a/layouts/list.html b/layouts/list.html
new file mode 100644 (file)
index 0000000..b049b6d
--- /dev/null
@@ -0,0 +1,69 @@
+{{ define "main" }}
+  {{ $pages := "" }}
+  {{ if .IsPage }}
+    {{/* We currently have a slightly odd content structure with no top level /docs section. */}}
+    {{ $pages = .CurrentSection.Pages }}
+  {{ else }}
+    {{ $pages = .Pages }}
+    {{ if eq .Section "news" }}
+      {{ $pages = $pages.ByPublishDate.Reverse }}
+    {{ end }}
+  {{ end }}
+
+
+  <article class="">
+    {{ partial "layouts/docsheader.html" . }}
+    <div class="mt-6 sm:mt-8 grid grid-cols-2 xl:grid-cols-3 gap-4 min-h-40">
+      {{ range $pages }}
+        {{ if eq . $ }}
+          {{ continue }}
+        {{ end }}
+        <a
+          class="flex col-span-1 a--block cursor-pointer flex-col group border p-3 sm:p-4 hover:shadow-md dark:shadow-slate-800 border-gray-300 dark:border-gray-800 m-0"
+          href="{{ or .Params.permalink .RelPermalink }}">
+          {{ if .Params.show_publish_date }}
+            {{ with .PublishDate }}
+              <p
+                class="text-gray-500 dark:text-gray-400 text-sm/5 md:text-base/2 mb-2 sm:mb-4">
+                {{ partial "layouts/date.html" . }}
+              </p>
+            {{ end }}
+          {{ end }}
+          <h3
+            class="text-lg/6 md:text-2xl tracking-tight p-0 -mt-1 sm:mt-0 mb-1 sm:mb-2 text-primary group-hover:text-primary/70 overflow-hidden">
+            {{ .LinkTitle }}
+          </h3>
+
+          {{ with .Params.functions_and_methods.signatures }}
+            {{/* Set in functions and methods pages. */}}
+            {{ with $signature := index . 0 }}
+              {{ if $.Params.functions_and_methods.returnType }}
+                {{ $signature = printf "%s ⟼ %s" $signature $.context.Params.functions_and_methods.returnType }}
+              {{ end }}
+              <div
+                class="font-mono font-light text-sm whitespace-nowrap mb-2 sm:mb-4 p-2 bg-slate-50 dark:bg-slate-700 border-0 mr-8 overflow-x-auto">
+                {{- $signature -}}
+              </div>
+            {{ end }}
+          {{ end }}
+          <p
+            class="text-black dark:text-gray-100 leading-6 text-sm md:text-base three-lines-ellipsis">
+            {{ if and (eq .Section "commands") .IsPage }}
+              {{ $simpleCobraCommandShort := .RawContent | strings.ReplaceRE `(?s)^##\s.+?\n\n(.+?)\n\n.*` "$1" }}
+              {{ printf "%s." $simpleCobraCommandShort }}
+            {{ else }}
+              {{ (or .Params.description .Summary) | plainify | safeHTML }}
+            {{ end }}
+          </p>
+          {{ if and hugo.IsDevelopment site.Params.debug.display_page_metadata }}
+            {{ partial "helpers/debug/list-item-metadata.html" . }}
+          {{ end }}
+        </a>
+      {{ end }}
+    </div>
+  </article>
+{{ end }}
+
+{{ define "rightsidebar" }}
+  {{ printf "%c" '\u00A0' }}
+{{ end }}
diff --git a/layouts/list.rss.xml b/layouts/list.rss.xml
new file mode 100644 (file)
index 0000000..90fa221
--- /dev/null
@@ -0,0 +1,33 @@
+{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+  <channel>
+    <title>Hugo News</title>
+    <description>Recent news about Hugo, a static site generator written in Go, optimized for speed and designed for flexibility.</description>
+    <link>{{ .Permalink }}</link>
+    <generator>Hugo {{ hugo.Version }}</generator>
+    <language>{{ or site.Language.LanguageCode site.Language.Lang }}</language>
+    {{- with site.Copyright }}
+      <copyright>{{ . }}</copyright>
+    {{- end }}
+    {{- with .OutputFormats.Get "rss" }}
+      {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
+    {{- end }}
+    {{- $limit := cond (gt site.Config.Services.RSS.Limit 0) site.Config.Services.RSS.Limit 999 }}
+    {{- $pages := "" }}
+    {{- with site.GetPage "/news" }}
+      {{- $pages = .Pages.ByPublishDate.Reverse | first $limit }}
+    {{- else }}
+      {{- errorf "The list.rss.xml layout was unable to find the 'news' page." }}
+    {{- end }}
+    <lastBuildDate>{{ (index $pages 0).PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
+    {{- range $pages }}
+      <item>
+        <title>{{ .Title }}</title>
+        <link>{{ or .Params.permalink .Permalink }}</link>
+        <pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
+        <guid>{{ or .Params.permalink .Permalink }}</guid>
+        <description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
+      </item>
+    {{- end }}
+  </channel>
+</rss>
diff --git a/layouts/partials/docs/functions-aliases.html b/layouts/partials/docs/functions-aliases.html
deleted file mode 100644 (file)
index b3a5a76..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-{{- with .Params.functions_and_methods.aliases }}
-  {{- $label := "Alias" }}
-  {{- if gt (len .) 1 }}
-    {{- $label = "Aliases" }}
-  {{- end }}
-  <p class="font-bold text-dark dark:text-light mt-2">{{ $label }}</p>
-  {{- range . }}
-    <div class="font-sm font-mono ml-3 sm:ml-6 mt-0 sm:mt-1">
-      {{- . -}}
-    </div>
-  {{- end }}
-{{- end -}}
diff --git a/layouts/partials/docs/functions-return-type.html b/layouts/partials/docs/functions-return-type.html
deleted file mode 100644 (file)
index 75c97f8..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{{- with .Params.functions_and_methods.returnType }}
-  <p class="font-bold text-dark dark:text-light mt-2">Returns</p>
-  <div class="font-sm font-mono ml-3 sm:ml-6 mt-0 sm:mt-1">
-    {{- . -}}
-  </div>
-{{- end -}}
diff --git a/layouts/partials/docs/functions-signatures.html b/layouts/partials/docs/functions-signatures.html
deleted file mode 100644 (file)
index 6fb61df..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-{{- with .Params.functions_and_methods.signatures }}
-  <p class="font-bold text-dark dark:text-light">Syntax</p>
-  {{- range . }}
-    {{- $signature := . }}
-    {{- if $.Params.function.returnType }}
-      {{- $signature = printf "%s ⟼ %s" . $.Params.function.returnType }}
-    {{- end }}
-    <div class="font-sm font-mono ml-3 sm:ml-6 mt-0 sm:mt-1">
-      {{- $signature -}}
-    </div>
-  {{- end }}
-{{- end -}}
diff --git a/layouts/partials/helpers/debug/list-item-metadata.html b/layouts/partials/helpers/debug/list-item-metadata.html
deleted file mode 100644 (file)
index d027484..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<span class="h-3"></span>
-<table class="mt-auto">
-  <tbody>
-    <tr>
-      <td class="align-top text-red-700">weight:</td>
-      <td class="align-top pl-2 w-full">
-        {{ .Weight }}
-      </td>
-    </tr>
-    <tr>
-      <td class="align-top text-red-700">keywords:</td>
-      <td class="align-top pl-2">
-        {{ delimit (or .Keywords "") ", " }}
-      </td>
-    </tr>
-    <tr>
-      <td class="align-top text-red-700">categories:</td>
-      <td class="align-top pl-2">
-        {{ delimit (or .Params.categories "") ", " }}
-      </td>
-    </tr>
-  </tbody>
-</table>
diff --git a/layouts/partials/helpers/funcs/color-from-string.html b/layouts/partials/helpers/funcs/color-from-string.html
deleted file mode 100644 (file)
index cd59953..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{{ $colors := slice  "slate" "green" "cyan" "blue" }}
-{{ with .single }}
-  {{ $colors = slice . }}
-{{ end }}
-
-{{ $shades := slice 300 400 500 }}
-{{ if not .dark }}
-  {{ $shades = slice 700 800 }}
-{{ end }}
-{{ $hash := (hash.FNV32a .text) }}
-{{ $i := mod $hash (len $colors) }}
-{{ $j := mod $hash (len $shades) }}
-{{ $color := index $colors $i }}
-{{ $shade1 := index $shades $j }}
-{{ $shade2 := 0 }}
-{{ $shade3 := 0 }}
-{{ if gt $shade1 500 }}
-  {{ $shade2 =  math.Min (sub $shade1 500) 100 | int }}
-  {{ $shade3 =  sub $shade1 100 }}
-{{ else }}
-  {{ $shade2 = math.Max (add $shade1 500) 700 | int }}
-  {{ $shade3 = add $shade1 200 }}
-{{ end }}
-{{ $res := dict  "color" $color "shade1" $shade1  "shade2" $shade2 "shade3" $shade3 }}
-{{ return $res }}
diff --git a/layouts/partials/helpers/funcs/get-github-info.html b/layouts/partials/helpers/funcs/get-github-info.html
deleted file mode 100644 (file)
index 7e2dc89..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-{{ $url := "https://api.github.com/repos/gohugoio/hugo" }}
-{{ $cacheKey := print $url (now.Format "2006-01-02") }}
-{{ $headers := dict }}
-{{ with os.Getenv "HUGO_GH_TOKEN" }}
-  {{ $headers = dict "Authorization" (printf "Bearer %s" .) }}
-{{ end }}
-{{ $opts := dict "headers" $headers "key" $cacheKey }}
-{{ $githubRepoInfo := dict }}
-{{ with try (resources.GetRemote $url $opts) }}
-  {{ with .Err }}
-    {{ warnf "Failed to get GitHub repo info: %s" . }}
-  {{ else with (.Value | transform.Unmarshal) }}
-    {{ $githubRepoInfo = dict
-      "html_url"  .html_url
-      "stargazers_url" .stargazers_url
-      "watchers_count" .watchers_count
-      "stargazers_count" .stargazers_count
-      "forks_count" .forks_count
-      "contributors_url" .contributors_url
-      "releases_url" .releases_url
-      "forks_count" .forks_count
-      }}
-  {{ else }}
-    {{ errorf "Unable to get remote resource %q" $url }}
-  {{ end }}
-{{ end }}
-
-{{ return $githubRepoInfo }}
diff --git a/layouts/partials/helpers/funcs/get-remote-data.html b/layouts/partials/helpers/funcs/get-remote-data.html
deleted file mode 100644 (file)
index ed70434..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{/*
-Parses the serialized data from the given URL and returns a map or an array.
-
-Supports CSV, JSON, TOML, YAML, and XML.
-
-@param {string} . The URL from which to retrieve the serialized data.
-@returns {any}
-
-@example {{ partial "get-remote-data.html" "https://example.org/foo.json" }}
-*/}}
-{{/* prettier-ignore-end */ -}}
-{{ $url := . }}
-{{ $data := dict }}
-{{ with try (resources.GetRemote $url) }}
-  {{ with .Err }}
-    {{ errorf "%s" . }}
-  {{ else with .Value }}
-    {{ $data = .Content | transform.Unmarshal }}
-  {{ else }}
-    {{ errorf "Unable to get remote resource %q" $url }}
-  {{ end }}
-{{ end }}
-{{ return $data }}
diff --git a/layouts/partials/helpers/gtag.html b/layouts/partials/helpers/gtag.html
deleted file mode 100644 (file)
index 59bf36b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{{ with site.Config.Services.GoogleAnalytics.ID }}
-  <script
-    async
-    src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
-<script>
-  window.dataLayer = window.dataLayer || [];
-  function gtag(){dataLayer.push(arguments);}
-  gtag('js', new Date());
-
-  {{ $site := site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+).*" "$2" }}
-  gtag('config', '{{ . }}', {'anonymize_ip': true, 'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'});
-
-/**
-* Function that tracks a click on an outbound link in Analytics.
-* Setting the transport method to 'beacon' lets the hit be sent
-* using 'navigator.sendBeacon' in browser that support it.
-*/
-var trackOutboundLink = function(id, url) {
-  gtag('event', 'click', {
-    'event_category': 'outbound',
-    'event_label': id,
-    'transport_type': 'beacon'
-  });
-}
-
-</script>
-{{ end }}
diff --git a/layouts/partials/helpers/linkcss.html b/layouts/partials/helpers/linkcss.html
deleted file mode 100644 (file)
index 814d2b5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-{{ $r := .r }}
-{{ $attr := .attributes | default dict }}
-
-{{ if hugo.IsDevelopment }}
-  <link
-    rel="stylesheet"
-    href="{{ $r.RelPermalink }}"
-    {{ template `render-attributes` $attr }}>
-{{ else }}
-  {{ with $r | minify | fingerprint }}
-    <link
-      rel="stylesheet"
-      href="{{ .RelPermalink }}"
-      integrity="{{ .Data.Integrity }}"
-      crossorigin="anonymous"
-      {{ template `render-attributes` $attr }}>
-  {{ end }}
-{{ end }}
-
-{{ define "render-attributes" }}
-  {{- range $k, $v := . -}}
-    {{- if $v -}}
-      {{- printf ` %s=%q` $k $v | safeHTMLAttr -}}
-    {{- else -}}
-      {{- printf ` %s` $k | safeHTMLAttr -}}
-    {{- end -}}
-  {{- end -}}
-{{ end }}
diff --git a/layouts/partials/helpers/linkjs.html b/layouts/partials/helpers/linkjs.html
deleted file mode 100644 (file)
index 00129ad..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{{ $r := .r }}
-{{ $attr := .attributes | default dict }}
-{{ if hugo.IsDevelopment }}
-  <script
-    src="{{ $r.RelPermalink }}"
-    {{ template `render-attributes` $attr }}></script>
-{{ else }}
-  {{ with $r | fingerprint }}
-    <script
-      src="{{ .RelPermalink }}"
-      integrity="{{ .Data.Integrity }}"
-      crossorigin="anonymous"
-      {{ template `render-attributes` $attr }}></script>
-  {{ end }}
-{{ end }}
diff --git a/layouts/partials/helpers/picture.html b/layouts/partials/helpers/picture.html
deleted file mode 100644 (file)
index 454dd70..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{{ $image := .image }}
-{{ $width := .width | default 1000 }}
-{{ $width1x := div $width 2 }}
-{{ $imageWebp := $image.Resize (printf "%dx webp" $width) }}
-{{ $image1x := $image.Resize (printf "%dx" $width1x) }}
-{{ $image1xWebp := $image.Resize (printf "%dx webp" $width1x) }}
-{{ $class := .class | default "h-64 tablet:h-96 lg:h-full w-full object-cover lg:absolute" }}
-<picture>
-  <source
-    srcset="{{ $imageWebp.RelPermalink }}"
-    type="image/webp"
-    media="(min-width: 1200px)">
-  <source
-    srcset="{{ $image.RelPermalink }}"
-    type="image/jpeg"
-    media="(min-width: 1200px)">
-  <source srcset="{{ $image1xWebp.RelPermalink }}" type="image/webp">
-  <source srcset="{{ $image1x.RelPermalink }}" type="image/jpeg">
-  <img
-    class="{{ $class }}"
-    src="{{ $image1x.RelPermalink }}"
-    alt=""
-    width="{{ $image1x.Width }}"
-    height="{{ $image1x.Height }}">
-</picture>
diff --git a/layouts/partials/helpers/validation/validate-keywords.html b/layouts/partials/helpers/validation/validate-keywords.html
deleted file mode 100644 (file)
index 3447ec4..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{- /*
-We use the front matter keywords field to determine related content. To ensure
-consistency, during site build we validate each keyword against the entries in
-data/keywords.yaml.
-
-As of March 5, 2025, this feature is experimental, pending usability
-assessment. We anticipate that the number of additions to data/keywords.yaml
-will decrease over time, though the initial implementation will require some
-effort.
-*/}}
-{{/* prettier-ignore-end */ -}}
-{{- $t := debug.Timer "validateKeywords" }}
-{{- $allowedKeywords := collections.Apply site.Data.keywords "strings.ToLower" "." }}
-{{- range $p := site.Pages }}
-  {{- range .Params.keywords }}
-    {{- if not (in $allowedKeywords (lower .)) }}
-      {{- warnf "The word or phrase %q is not in the keywords data file. See %s." . $p.Page.String }}
-    {{- end }}
-  {{- end }}
-{{- end }}
-{{- $t.Stop }}
diff --git a/layouts/partials/layouts/blocks/alert.html b/layouts/partials/layouts/blocks/alert.html
deleted file mode 100644 (file)
index 45f0044..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{{- $title := .title | default "" }}
-{{- $color := .color | default "yellow" }}
-{{- $icon := .icon | default "exclamation-triangle" }}
-{{- $text := .text | default "" }}
-{{- $class := .class | default "mt-6 mb-8" }}
-<div
-  class="border-l-4 overflow-x-auto border-{{ $color }}-400 bg-{{ $color }}-50 dark:bg-{{ $color }}-950 border-1 border-{{ $color }}-100 dark:border-{{ $color }}-900 p-4 {{ $class }}">
-  <div class="flex">
-    <div class="shrink-0">
-      <svg class="fill-{{ $color }}-500 dark:fill-{{ $color }}-400 h-7 w-7">
-        <use href="#icon--{{ $icon }}"></use>
-      </svg>
-    </div>
-    <div class="ml-3">
-      {{- with $title }}
-        <h3 class="text-{{ $color }}-800">
-          {{ . }}
-        </h3>
-      {{- end }}
-      <div class="mt-2">
-        {{ $text }}
-      </div>
-    </div>
-  </div>
-</div>
diff --git a/layouts/partials/layouts/blocks/modal.html b/layouts/partials/layouts/blocks/modal.html
deleted file mode 100644 (file)
index 7d825c0..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<div x-data="{open: false}">
-  <div @click="open = true">
-    {{ .modal_button }}
-  </div>
-  <div
-    x-cloak
-    x-show="open"
-    x-transition:enter.opacity.duration.200ms
-    x-transition:leave.opacity.duration.300ms
-    x-trap.inert.noscroll="open"
-    @keydown.esc.window="open = false"
-    @click.self="open = false"
-    class="fixed inset-0 z-30 flex items-end justify-center bg-black/50 pb-8 backdrop-blur-xs sm:items-center"
-    role="dialog"
-    aria-modal="true"
-    aria-label="Modal">
-    <div
-      x-show="open"
-      x-transition:enter.opacity.scale.60.origin.top.right.duration.300ms.delay.200ms
-      class="flex content-center items-center justify-center max-w-lg flex-col overflow-hidden bg-white dark:bg-blue-950 border-2 border-gray-300 dark:border-gray-800 shadow-lg sm:shadow-xl">
-      <div
-        class="border-b border-outline border-gray-300 dark:border-gray-800 p-2 lg:p-4">
-        <h3 class="text-sm font-semibold">
-          {{ .modal_title }}
-        </h3>
-      </div>
-      {{ .modal_content }}
-    </div>
-  </div>
-</div>
diff --git a/layouts/partials/layouts/breadcrumbs.html b/layouts/partials/layouts/breadcrumbs.html
deleted file mode 100644 (file)
index 69bcf7b..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-{{ $documentation := site.GetPage "/documentation" }}
-
-
-<nav aria-label="breadcrumb" class="flex breadcrumbs">
-  <ol class="inline-flex items-center flex-wrap tracking-tight">
-    {{ $currentSection := .CurrentSection }}
-    {{ $ancestors := .Ancestors.Reverse }}
-    {{ range $i, $p := $ancestors }}
-      {{ $isCurrentSection := eq $p $currentSection }}
-      {{/* We currently have a slightly odd structure. */}}
-      {{ if eq $p site.Home }}
-        {{ $p = $documentation }}
-      {{ end }}
-      <li class="flex items-center">
-        {{ $isLast := eq $i (sub (len $ancestors) 1) }}
-        <a
-          href="{{ $p.RelPermalink }}"
-          class="truncate text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 {{ if $isCurrentSection }}
-            current-section
-          {{ end }}"
-          >{{ $p.LinkTitle }}</a
-        >
-        {{ if ne $ $documentation }}
-          {{ template "breadcrumbs-arrow" . }}
-        {{ end }}
-      </li>
-    {{ end }}
-    {{ if ne $ $documentation }}
-      {{ $isCurrentSection := eq $ $currentSection }}
-      <li
-        class="truncate text-gray-700 dark:text-gray-300 {{ if $isCurrentSection }}
-          current-section
-        {{ end }}">
-        {{ $.LinkTitle }}
-      </li>
-    {{ end }}
-  </ol>
-</nav>
-
-{{ define "breadcrumbs-arrow" }}
-  <svg class="fill-gray-500 dark:fill-gray-100 w-3 h-3 mx-2">
-    <use href="#icon--chevron-right"></use>
-  </svg>
-{{ end }}
diff --git a/layouts/partials/layouts/date.html b/layouts/partials/layouts/date.html
deleted file mode 100644 (file)
index 2ec1450..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ $humanDate := time.Format "January 2, 2006" . }}
-{{ $machineDate := time.Format "2006-01-02T15:04:05-07:00" . }}
-<time {{ printf "datetime=%q" $machineDate | safeHTMLAttr }}>
-  {{ $humanDate }}
-</time>
diff --git a/layouts/partials/layouts/docsheader.html b/layouts/partials/layouts/docsheader.html
deleted file mode 100644 (file)
index 7e8e950..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<header>
-  {{ partial "layouts/breadcrumbs.html" . }}
-  {{ if and .IsPage (not (eq .Layout "list")) }}
-    <h1
-      class="font-display mt-6 sm:mt-8 text-3xl tracking-tight text-slate-900 dark:text-white">
-      {{ .Title }}
-    </h1>
-  {{ end }}
-</header>
diff --git a/layouts/partials/layouts/explorer.html b/layouts/partials/layouts/explorer.html
deleted file mode 100644 (file)
index bb6f8e9..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-{{/* This is currently not in use, but kept in case I change my mind. */}}
-<nav
-  role="navigation"
-  id="explorer"
-  class="overflow-x-hidden w-54"
-  x-data="explorer"
-  data-turbo-permanent
-  @turbo:load.window="onLoad()"
-  @turbo:before-render.window="onBeforeRender()"
-  x-cloak>
-  <ul class="w-full">
-    {{ $root := site.GetPage "/" }}
-    {{ template "docs-explorer-section" (dict "p" $root "level" 0 ) }}
-  </ul>
-</nav>
-
-{{ define "docs-explorer-section" }}
-  {{ $p := .p }}
-  {{ $level := .level }}
-  {{ $pleft := $level }}
-  {{ if gt $level 0 }}
-    {{ $pleft = add $level 1 }}
-  {{ end }}
-  {{ $pl := printf "pl-%d" $pleft }}
-  {{ $pages := $p.Sections }}
-
-  {{ range $pages }}
-    {{ $hasChildren := gt (len .Pages) 0 }}
-    {{ $class := cond (eq $level 0) "text-primary hover:text-primary/70" "text-gray-900 dark:text-gray-400 hover:dark:text-gray-300" }}
-    <li class="w-full">
-      <a
-        @click="toggleNode('{{ .RelPermalink }}')"
-        href="{{ .RelPermalink }}"
-        x-ref="{{ .RelPermalink }}"
-        :class="isCurrent('{{ .RelPermalink }}') ? 'font-bold underline': 'font-normal'"
-        class="block cursor-pointer {{ $pl }} {{ $class }} focus:font-bold hover:underline focus:underline tracking-tight leading-7">
-        {{ .LinkTitle }}
-      </a>
-      {{ if $hasChildren }}
-        <ul class="w-full" x-show="isOpen('{{ .RelPermalink }}')">
-          {{ template "docs-explorer-section" (dict "p" . "level" (add $level 1)) }}
-        </ul>
-      {{ end }}
-    </li>
-  {{ end }}
-
-{{ end }}
diff --git a/layouts/partials/layouts/footer.html b/layouts/partials/layouts/footer.html
deleted file mode 100644 (file)
index 1b17e44..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<footer
-  class="print:hidden bg-blue-950 mt-8 sm:mt-24 border-t-1 border-gray-800">
-  <div class="mx-auto max-w-7xl pt-16 pb-8 sm:pt-18 lg:pt-20">
-    <div class="xl:grid xl:grid-cols-3 xl:gap-8">
-      {{/* Column 1 */}}
-      <div class="flex flex-col items-center justify-between space-y-8">
-        <div class="text-gray-200">
-          By the
-          <a
-            href="https://github.com/gohugoio/hugo/graphs/contributors"
-            class="text-blue-300 hover:underline"
-            >Hugo Authors</a
-          ><br>
-        </div>
-
-        <img
-          src="/images/hugo-logo-wide.svg"
-          alt="Hugo Logo"
-          class="aspect-3/1 w-40">
-
-        <ul class="space-y-2 text-gray-200">
-          <li class="hover:text-white">
-            <a href="https://fosstodon.org/@gohugoio" class="">@GoHugoIO</a>
-          </li>
-          <li class="hover:text-white">
-            <a href="https://twitter.com/spf13" class="">@spf13</a>
-          </li>
-          <li class="hover:text-white">
-            <a href="https://twitter.com/bepsays" class="">@bepsays</a>
-          </li>
-          <li class="mt-6">
-            <a
-              href="https://github.com/gohugoio/hugo/issues/new"
-              class="text-sm/6 text-gray-200 hover:text-white"
-              >File an issue</a
-            >
-          </li>
-          <li>
-            <a
-              href="https://discourse.gohugo.io/"
-              class="text-sm/6 text-gray-200 hover:text-white"
-              >Get help</a
-            >
-          </li>
-          <li>
-            <a
-              href="https://themes.gohugo.io/"
-              class="text-sm/6 text-gray-200 hover:text-white"
-              >Find a theme</a
-            >
-          </li>
-        </ul>
-      </div>
-
-      {{/* Sponsors */}}
-      <div
-        class="mt-16 xl:mt-0 col-span-2 text-gray-200 max-w-3xl flex items-center content-center justify-center mx-auto">
-        {{ partial "layouts/home/sponsors.html"  (dict
-          "ctx" .
-          "gtag" "footer"
-
-          )
-        }}
-      </div>
-    </div>
-    <div class="mt-16 border-t border-white/10 pt-8 sm:mt-20 lg:mt-24">
-      <p class="text-sm/6 text-gray-200">
-        The Hugo logos are copyright © Steve Francia 2013–{{ now.Year }}. The
-        Hugo Gopher is based on an original work by Renée French.
-      </p>
-    </div>
-  </div>
-</footer>
diff --git a/layouts/partials/layouts/head/head-js.html b/layouts/partials/layouts/head/head-js.html
deleted file mode 100644 (file)
index d83efcd..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-{{ $githubInfo := partialCached "helpers/funcs/get-github-info.html" . "-" }}
-{{ $opts := dict "minify" true }}
-{{ with resources.Get "js/head-early.js" | js.Build $opts }}
-  {{ partial "helpers/linkjs.html" (dict "r" . "attributes" (dict "async" "")) }}
-{{ end }}
-{{ with resources.Get "js/main.js" | js.Build $opts }}
-  {{ partial "helpers/linkjs.html" (dict "r" . "attributes" (dict "defer" "")) }}
-{{ end }}
-{{ with resources.Get "js/turbo.js" | js.Build $opts }}
-  {{ partial "helpers/linkjs.html" (dict "r" . "attributes" (dict "defer" "")) }}
-{{ end }}
diff --git a/layouts/partials/layouts/head/head.html b/layouts/partials/layouts/head/head.html
deleted file mode 100644 (file)
index bb27f6a..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
-{{ hugo.Generator }}
-
-{{ if hugo.IsProduction }}
-  <meta name="robots" content="index, follow" />
-{{ else }}
-  <meta name="robots" content="noindex, nofollow" />
-{{ end }}
-
-<title>
-  {{ with .Title }}{{ . }} |{{ end }}
-  {{ .Site.Title }}
-</title>
-
-<link rel=apple-touch-icon sizes=180x180 href=/apple-touch-icon.png>
-<link rel=icon type=image/png href=/favicon-32x32.png sizes=32x32>
-<link rel=icon type=image/png href=/favicon-16x16.png sizes=16x16>
-<link rel=manifest href=/manifest.json>
-<link rel=mask-icon href=/safari-pinned-tab.svg color=#0594cb>
-
-<meta name="turbo-prefetch" content="true">
-<meta name="view-transition" content="same-origin">
-
-{{ range .AlternativeOutputFormats -}}
-  <link
-    rel="{{ .Rel }}"
-    type="{{ .MediaType.Type }}"
-    href="{{ .RelPermalink | safeURL }}" />
-{{ end -}}
-
-
-<meta
-  name="description"
-  content="{{ with .Description }}
-    {{ . }}
-  {{ else }}
-    {{ with .Site.Params.description }}{{ . }}{{ end }}
-  {{ end }}
-    " />
-
-
-
-{{ partial "opengraph/opengraph.html" . }}
-{{- template "_internal/schema.html" . -}}
-{{- template "_internal/twitter_cards.html" . -}}
-
-{{ if hugo.IsProduction }}
-  {{ partial "helpers/gtag.html" . }}
-{{ end }}
diff --git a/layouts/partials/layouts/header/githubstars.html b/layouts/partials/layouts/header/githubstars.html
deleted file mode 100644 (file)
index 75db568..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{{ with partialCached "helpers/funcs/get-github-info.html" . "-" }}
-  <a
-    href="{{ .html_url | safeURL }}"
-    target="_blank"
-    class="font-normal font-mono  tracking-tighter     flex items-center bg-gray-100 hover:bg-gray-200 dark:bg-gray-600 dark:hover:bg-gray-700 text-sm text-black dark:text-white h-10 border-none cursor-pointer relative py-1 px-2 rounded-md"
-    aria-label="Star on GitHub">
-    <svg class="mr-[4px] fill-gray-800 dark:fill-gray-100 w-6 h-6">
-      <use href="#icon--github"></use>
-    </svg>
-    <span class="hidden md:inline mr-[3px]">Star</span>
-    <span class="hidden md:inline">{{ .stargazers_count }}</span>
-    <span class="inline md:hidden">
-      {{ printf "%0.1fk" (div .stargazers_count 1000) }}
-    </span>
-  </a>
-{{ end }}
diff --git a/layouts/partials/layouts/header/header.html b/layouts/partials/layouts/header/header.html
deleted file mode 100644 (file)
index 0d2e720..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<header
-  x-data="navbar"
-  class="print:hidden sticky top-0 z-50 bg-blue-950 flex flex-none flex-wrap items-center justify-between px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 sm:px-6 lg:px-8 dark:shadow-none"
-  :class="$store.nav.scroll.atTop ? '': 'bg-blue-950/80'">
-  <div class="relative flex basis-0 items-center mr-2 lg:mr-8">
-    {{ with site.Home }}
-      <a
-        class="text-white text-xl font-bold upper"
-        href="{{ .RelPermalink }}"
-        aria-label="{{ .LinkTitle }}"
-        >HUGO</a
-      >
-    {{ end }}
-  </div>
-  <div
-    class=" relative flex flex-grow basis-0 items-center min-w-24 max-w-3xl overflow-x-auto">
-    {{ range .Site.Menus.global }}
-      <a
-        href="{{ .URL }}"
-        class="font-semibold text-gray-300 hover:text-gray-400 ml-4"
-        >{{ .Name }}</a
-      >
-    {{ end }}
-
-  </div>
-
-  <div class="-my-5 pl-2 grow-0">
-    {{/* Search. */}}
-    {{ partial "layouts/search/input.html" . }}
-  </div>
-  <div
-    class="relative ml-0 md:ml-8 flex basis-0 justify-end gap-0 sm:gap-1 xl:grow-1">
-    {{/* QR code. */}}
-    {{ partial "layouts/header/qr.html" . }}
-    {{/* Theme selector. */}}
-    {{ partial "layouts/header/theme.html" . }}
-
-    {{/* Social. */}}
-    <div
-      class="hidden sm:block ml-2 sm:ml-6 h-6 fill-slate-400 group-hover:fill-slate-500 dark:group-hover:fill-slate-300">
-      {{ partial "layouts/header/githubstars.html" . }}
-    </div>
-  </div>
-</header>
diff --git a/layouts/partials/layouts/header/qr.html b/layouts/partials/layouts/header/qr.html
deleted file mode 100644 (file)
index ccc0ee9..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{{ $t := debug.Timer "qr" }}
-{{ $qr := partial "_inline/qr" (dict
-  "page" $
-  "img_class" "w-10 bg-white view-transition-qr" )
-}}
-{{ $qrBig := partial "_inline/qr" (dict "page" $ "img_class" "w-64 p-4") }}
-{{ $t.Stop }}
-<div
-  class="hidden lg:block cursor-pointer outline-2 hover:outline-3 outline-blue-500 w-10 h-10">
-  {{ partial "layouts/blocks/modal.html"  (dict "modal_button" $qr "modal_content" $qrBig "modal_title" (printf "QR code linking to %s" $.Permalink )) }}
-</div>
-
-{{ define "partials/_inline/qr" }}
-  {{ $img_class := .img_class | default "w-10" }}
-  {{ with images.QR $.page.Permalink (dict "targetDir" "images/qr") }}
-
-    <img
-      src="{{ .RelPermalink }}"
-      width="{{ .Width }}"
-      height="{{ .Height }}"
-      @load="$event.target.classList.remove('_opacity-0')"
-      alt="QR code linking to {{ $.page.Permalink }}"
-      class="{{ $img_class }}">
-  {{ end }}
-{{ end }}
diff --git a/layouts/partials/layouts/header/theme.html b/layouts/partials/layouts/header/theme.html
deleted file mode 100644 (file)
index e0b356d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<div class="ml-2 sm:ml-6 flex items-center" x-data>
-  <button
-    @click="$store.nav.userSettings.toggleColorScheme()"
-    aria-label="Toggle color scheme"
-    id="theme-toggle"
-    type="button"
-    class="inline-flex cursor-pointer items-center p-2 bg-orange-600 hover:bg-orange-700 dark:bg-gray-600 dark:hover:bg-gray-700 border border-transparent rounded-full shadow-sm text-white hover:text-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500">
-    <svg
-      aria-hidden="true"
-      class="w-3 h-3 sm:w-5 sm:h-5"
-      fill="none"
-      stroke="currentColor"
-      viewBox="0 0 24 24"
-      xmlns="http://www.w3.org/2000/svg">
-      <path
-        x-show="$store.nav.userSettings.colorScheme() == 1"
-        stroke-linecap="round"
-        stroke-linejoin="round"
-        stroke-width="2"
-        d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
-      <path
-        x-show="$store.nav.userSettings.colorScheme() == 2"
-        stroke-linecap="round"
-        stroke-linejoin="round"
-        stroke-width="2"
-        d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path>
-      <path
-        x-show="$store.nav.userSettings.colorScheme() == 3"
-        stroke-linecap="round"
-        stroke-linejoin="round"
-        stroke-width="2"
-        d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path>
-    </svg>
-  </button>
-</div>
diff --git a/layouts/partials/layouts/home/features.html b/layouts/partials/layouts/home/features.html
deleted file mode 100644 (file)
index 527c98c..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-{{/* icons source: https://heroicons.com/ */}}
-{{ $dataTOML := `
-  [[features]]
-  heading = "Optimized for speed"
-  copy = "Written in Go, optimized for speed and designed for flexibility. With its advanced templating system and fast asset pipelines, Hugo renders a large site in seconds, often less."
-  icon = """<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
-  <path stroke-linecap="round" stroke-linejoin="round" d="M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" />
-  </svg>
-  """
-  [[features]]
-  heading = "Flexible framework"
-  copy = "With its multilingual support, and powerful taxonomy system, Hugo is widely used to create documentation sites, landing pages, corporate, government, nonprofit, education, news, event, and project sites."
-  icon = """<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
-  <path stroke-linecap="round" stroke-linejoin="round" d="M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" />
-  </svg>
-  """
-  [[features]]
-  heading = "Fast assets pipeline"
-  copy = "Image processing (convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract EXIF data), JavaScript bundling (tree shake, code splitting), Sass processing, great TailwindCSS support."
-  icon = """<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
-  <path stroke-linecap="round" stroke-linejoin="round" d="m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
-  </svg>
-  """
-  [[features]]
-  heading = "Embedded web server"
-  copy = "Use Hugo's embedded web server during development to instantly see changes to content, structure, behavior, and presentation. "
-  icon = """<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
-  <path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418" />
-  </svg>
-  """
-  `
-}}
-{{ $data := $dataTOML | transform.Unmarshal }}
-<div class="mx-auto max-w-7xl px-6 lg:px-8">
-  <div class="mx-auto max-w-2xl lg:max-w-4xl">
-    <dl
-      class="grid max-w-xl grid-cols-1 gap-x-8 gap-y-10 lg:max-w-none lg:grid-cols-2 lg:gap-y-16">
-      {{ range $data.features }}
-        <div class="relative pl-16">
-          <dt
-            class="text-base/7 font-semibold text-gray-900 dark:text-gray-300">
-            <div
-              class="absolute top-0 left-0 flex size-10 items-center justify-center rounded-full bg-blue-600 p-2 fill-white text-white">
-              {{ .icon | safeHTML }}
-            </div>
-            {{ .heading }}
-          </dt>
-          <dd class="mt-2 text-base/7 text-gray-600 dark:text-gray-400">
-            {{ .copy }}
-          </dd>
-        </div>
-      {{ end }}
-
-    </dl>
-  </div>
-</div>
diff --git a/layouts/partials/layouts/home/opensource.html b/layouts/partials/layouts/home/opensource.html
deleted file mode 100644 (file)
index 153c0f4..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-{{ $githubInfo := partialCached "helpers/funcs/get-github-info.html" . "-" }}
-<div class="mx-auto max-w-7xl px-6 lg:px-8">
-  <div
-    class="mx-auto grid max-w-2xl grid-cols-1 gap-x-8 gap-y-10 lg:mx-0 lg:max-w-none lg:grid-cols-2">
-    <div class="lg:pr-8">
-      <div class="lg:max-w-lg">
-        <p
-          class="text-4xl font-bold tracking-tight text-pretty text-gray-900 dark:text-gray-300 sm:text-5xl">
-          Open source
-        </p>
-        <p class="mt-6 text-lg/8 text-gray-600 dark:text-gray-400">
-          Hugo is open source and free to use. It is distributed under the
-          Apache 2.0 License.
-        </p>
-        <dl
-          class="mt-10 max-w-xl space-y-8 text-base/7 text-gray-600 dark:text-gray-300 lg:max-w-none">
-          <div class="relative pl-9">
-            <dt class="inline font-bold text-gray-900 dark:text-gray-300">
-              <svg
-                class="absolute top-1 left-1 size-5 text-blue-500"
-                xmlns="http://www.w3.org/2000/svg"
-                fill="none"
-                viewBox="0 0 24 24"
-                stroke-width="1.5"
-                stroke="currentColor"
-                class="size-6">
-                <path
-                  stroke-linecap="round"
-                  stroke-linejoin="round"
-                  d="M6 20.25h12m-7.5-3v3m3-3v3m-10.125-3h17.25c.621 0 1.125-.504 1.125-1.125V4.875c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125Z" />
-              </svg>
-              Popular.
-            </dt>
-            <dd class="inline ml-1">
-              Hugo has
-              {{ $githubInfo.stargazers_count | lang.FormatNumber 0 }}
-              stars on GitHub as of {{ now.Format "January 2, 2006" }}.
-              Join the crowd and hit the
-              <a
-                class="text-blue-500 hover:text-blue-500 font-semibold"
-                href="https://github.com/gohugoio/hugo"
-                >Star button</a
-              >.
-            </dd>
-          </div>
-          <div class="relative pl-9">
-            <dt class="inline font-bold text-gray-900 dark:text-gray-300">
-              <svg
-                class="absolute top-1 left-1 size-5 text-blue-500"
-                xmlns="http://www.w3.org/2000/svg"
-                fill="none"
-                viewBox="0 0 24 24"
-                stroke-width="1.5"
-                stroke="currentColor"
-                class="size-6">
-                <path
-                  stroke-linecap="round"
-                  stroke-linejoin="round"
-                  d="m20.893 13.393-1.135-1.135a2.252 2.252 0 0 1-.421-.585l-1.08-2.16a.414.414 0 0 0-.663-.107.827.827 0 0 1-.812.21l-1.273-.363a.89.89 0 0 0-.738 1.595l.587.39c.59.395.674 1.23.172 1.732l-.2.2c-.212.212-.33.498-.33.796v.41c0 .409-.11.809-.32 1.158l-1.315 2.191a2.11 2.11 0 0 1-1.81 1.025 1.055 1.055 0 0 1-1.055-1.055v-1.172c0-.92-.56-1.747-1.414-2.089l-.655-.261a2.25 2.25 0 0 1-1.383-2.46l.007-.042a2.25 2.25 0 0 1 .29-.787l.09-.15a2.25 2.25 0 0 1 2.37-1.048l1.178.236a1.125 1.125 0 0 0 1.302-.795l.208-.73a1.125 1.125 0 0 0-.578-1.315l-.665-.332-.091.091a2.25 2.25 0 0 1-1.591.659h-.18c-.249 0-.487.1-.662.274a.931.931 0 0 1-1.458-1.137l1.411-2.353a2.25 2.25 0 0 0 .286-.76m11.928 9.869A9 9 0 0 0 8.965 3.525m11.928 9.868A9 9 0 1 1 8.965 3.525" />
-              </svg>
-              Active.
-            </dt>
-            <dd class="inline ml-1">
-              Hugo has a large and active community. If you have questions or
-              need help, you can ask in the
-              <a
-                class="text-blue-500 hover:text-blue-500 font-semibold"
-                href="https://discourse.gohugo.io"
-                >Hugo forums</a
-              >.
-            </dd>
-          </div>
-          <div class="relative pl-9">
-            <dt class="inline font-bold text-gray-900 dark:text-gray-300">
-              <svg
-                class="absolute top-1 left-1 size-5 text-blue-500"
-                xmlns="http://www.w3.org/2000/svg"
-                fill="none"
-                viewBox="0 0 24 24"
-                stroke-width="1.5"
-                stroke="currentColor"
-                class="size-6">
-                <path
-                  stroke-linecap="round"
-                  stroke-linejoin="round"
-                  d="M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h1.5C5.496 19.5 6 18.996 6 18.375m-3.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-1.5A1.125 1.125 0 0 1 18 18.375M20.625 4.5H3.375m17.25 0c.621 0 1.125.504 1.125 1.125M20.625 4.5h-1.5C18.504 4.5 18 5.004 18 5.625m3.75 0v1.5c0 .621-.504 1.125-1.125 1.125M3.375 4.5c-.621 0-1.125.504-1.125 1.125M3.375 4.5h1.5C5.496 4.5 6 5.004 6 5.625m-3.75 0v1.5c0 .621.504 1.125 1.125 1.125m0 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m1.5-3.75C5.496 8.25 6 7.746 6 7.125v-1.5M4.875 8.25C5.496 8.25 6 8.754 6 9.375v1.5m0-5.25v5.25m0-5.25C6 5.004 6.504 4.5 7.125 4.5h9.75c.621 0 1.125.504 1.125 1.125m1.125 2.625h1.5m-1.5 0A1.125 1.125 0 0 1 18 7.125v-1.5m1.125 2.625c-.621 0-1.125.504-1.125 1.125v1.5m2.625-2.625c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125M18 5.625v5.25M7.125 12h9.75m-9.75 0A1.125 1.125 0 0 1 6 10.875M7.125 12C6.504 12 6 12.504 6 13.125m0-2.25C6 11.496 5.496 12 4.875 12M18 10.875c0 .621-.504 1.125-1.125 1.125M18 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m-12 5.25v-5.25m0 5.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125m-12 0v-1.5c0-.621-.504-1.125-1.125-1.125M18 18.375v-5.25m0 5.25v-1.5c0-.621.504-1.125 1.125-1.125M18 13.125v1.5c0 .621.504 1.125 1.125 1.125M18 13.125c0-.621.504-1.125 1.125-1.125M6 13.125v1.5c0 .621-.504 1.125-1.125 1.125M6 13.125C6 12.504 5.496 12 4.875 12m-1.5 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M19.125 12h1.5m0 0c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h1.5m14.25 0h1.5" />
-              </svg>
-              Frequent releases.
-            </dt>
-            <dd class="inline ml-1">
-              Hugo has a fast
-              <a
-                class="text-blue-500 hover:text-blue-500 font-semibold"
-                href="https://github.com/gohugoio/hugo/releases"
-                >release</a
-              >
-              cycle. The project is actively maintained and new features are
-              added regularly.
-            </dd>
-          </div>
-        </dl>
-      </div>
-    </div>
-    {{ partial "helpers/picture.html" (dict
-      "image" (resources.Get "images/hugo-github-screenshot.png")
-      "alt" "Hugo GitHub Repository"
-      "width" 640
-      "class" "w-full max-w-[38rem] ring-1 shadow-xl dark:shadow-gray-500 ring-gray-400/10")
-    }}
-  </div>
-</div>
diff --git a/layouts/partials/layouts/home/sponsors.html b/layouts/partials/layouts/home/sponsors.html
deleted file mode 100644 (file)
index 1f391e1..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-{{ $gtag := .gtag | default "unknown" }}
-{{ $gtag := .gtag | default "unknown" }}
-{{ $isFooter := (eq $gtag "footer") }}
-{{ $utmSource := cond $isFooter "hugofooter" "hugohome" }}
-{{ $containerClass := .containerClass | default "mx-auto max-w-7xl px-6 lg:px-8" }}
-{{ with .ctx.Site.Data.sponsors }}
-  <div class="{{ $containerClass }}">
-    <h2 class="font-bold text-2xl mb-6 tracking-tighter">Hugo Sponsors</h2>
-    <div class="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-6">
-      {{ range .banners }}
-        <div class="max-w-64" style="background-color: {{ .bgcolor }};">
-          {{ $query_params := .query_params | default "" }}
-          {{ $url := .link }}
-          {{ if not .no_query_params }}
-            {{ $url = printf "%s?%s%s" .link $query_params (querify "utm_source" (.utm_source | default $utmSource ) "utm_medium" (.utm_medium | default "banner") "utm_campaign" (.utm_campaign | default "hugosponsor") "utm_content" (.utm_content | default "gohugoio")) | safeURL }}
-          {{ end }}
-          {{ $logo := resources.Get .logo }}
-          {{ $gtagID := printf "Sponsor %s %s" .name $gtag | title }}
-          <a
-            href="{{ $url }}"
-            title="{{ .title | default .name }}"
-            {{ if hugo.IsProduction }}
-              onclick="trackOutboundLink({{ printf "'%s', '%s'" $gtagID $url | safeJS }});"
-            {{ end }}
-            class="group inline-block w-full h-full shadow-md dark:shadow-gray-600"
-            {{ with .link_attr }}{{ . | safeHTMLAttr }}{{ end }}>
-            <div
-              class="flex w-full h-full p-8 items-center justify-center content-center transition duration-500 hover:scale-105 {{ if .show_on_hover }}
-                invisible group-hover:visible
-              {{ end }}">
-              {{ with $logo }}
-                {{ .Content | safeHTML }}
-              {{ else }}
-                <span class="text-4xl font-bold text-white">
-                  {{ .name }}
-                </span>
-              {{ end }}
-            </div>
-          </a>
-        </div>
-      {{ end }}
-    </div>
-  </div>
-{{ end }}
diff --git a/layouts/partials/layouts/hooks/body-end.html b/layouts/partials/layouts/hooks/body-end.html
deleted file mode 100644 (file)
index 9ffd93b..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{{- if .IsHome }}
-  {{- partial "helpers/validation/validate-keywords.html" }}
-{{- end }}
diff --git a/layouts/partials/layouts/hooks/body-main-start.html b/layouts/partials/layouts/hooks/body-main-start.html
deleted file mode 100644 (file)
index b28dd21..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{{ if or .IsSection .IsPage }}
-  <div class="hidden print:flex justify-between border-b-1 border-b-gray-400 mb-4">
-    <p class="flex flex-col justify-end text-4xl mb-3">Hugo Documentation</p>
-    {{ with images.QR .Permalink (dict "scale" 3) }}
-      <img class="mb-2 -mr-2" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="Link to {{ $.Permalink }}">
-    {{ end }}
-  </div>
-{{end }}
diff --git a/layouts/partials/layouts/hooks/body-start.html b/layouts/partials/layouts/hooks/body-start.html
deleted file mode 100644 (file)
index 3430bd8..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{{ with resources.Get "js/body-start.js" | js.Build (dict "minify" true) }}
-  {{ partial "helpers/linkjs.html" (dict "r" . "attributes" (dict "" "")) }}
-{{ end }}
diff --git a/layouts/partials/layouts/icons.html b/layouts/partials/layouts/icons.html
deleted file mode 100644 (file)
index b05adef..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
-  <symbol id="icon--chevron-right" viewBox="0 0 20 20">
-    <path
-      fill-rule="evenodd"
-      d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
-      clip-rule="evenodd"></path>
-  </symbol>
-</svg>
-
-<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
-  <symbol id="icon--search" viewBox="0 0 20 20">
-    <path
-      d="M16.293 17.707a1 1 0 0 0 1.414-1.414l-1.414 1.414ZM9 14a5 5 0 0 1-5-5H2a7 7 0 0 0 7 7v-2ZM4 9a5 5 0 0 1 5-5V2a7 7 0 0 0-7 7h2Zm5-5a5 5 0 0 1 5 5h2a7 7 0 0 0-7-7v2Zm8.707 12.293-3.757-3.757-1.414 1.414 3.757 3.757 1.414-1.414ZM14 9a4.98 4.98 0 0 1-1.464 3.536l1.414 1.414A6.98 6.98 0 0 0 16 9h-2Zm-1.464 3.536A4.98 4.98 0 0 1 9 14v2a6.98 6.98 0 0 0 4.95-2.05l-1.414-1.414Z" />
-  </symbol>
-</svg>
-
-<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
-  <symbol id="icon--anchor" viewBox="0 0 24 24">
-    <path d="M0 0h24v24H0z" fill="none" />
-    <path
-      d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" />
-  </symbol>
-</svg>
-
-<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
-  <symbol id="icon--copy" viewBox="0 0 24 24">
-    <path
-    fill="none"
-    stroke="currentColor"
-    stroke-width="1.5"
-    aria-hidden="true"
-    stroke-linecap="round"
-    stroke-linejoin="round"
-    d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z"></path>
-  </symbol>
-</svg>
-
-<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
-  <symbol id="icon--github" viewBox="0 0 24 24" aria-hidden="true">
-    <path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.477 2 2 6.463 2 11.97c0 4.404 2.865 8.14 6.839 9.458.5.092.682-.216.682-.48 0-.236-.008-.864-.013-1.695-2.782.602-3.369-1.337-3.369-1.337-.454-1.151-1.11-1.458-1.11-1.458-.908-.618.069-.606.069-.606 1.003.07 1.531 1.027 1.531 1.027.892 1.524 2.341 1.084 2.91.828.092-.643.35-1.083.636-1.332-2.22-.251-4.555-1.107-4.555-4.927 0-1.088.39-1.979 1.029-2.675-.103-.252-.446-1.266.098-2.638 0 0 .84-.268 2.75 1.022A9.607 9.607 0 0 1 12 6.82c.85.004 1.705.114 2.504.336 1.909-1.29 2.747-1.022 2.747-1.022.546 1.372.202 2.386.1 2.638.64.696 1.028 1.587 1.028 2.675 0 3.83-2.339 4.673-4.566 4.92.359.307.678.915.678 1.846 0 1.332-.012 2.407-.012 2.734 0 .267.18.577.688.48 3.97-1.32 6.833-5.054 6.833-9.458C22 6.463 17.522 2 12 2Z"></path>
-  </symbol>
-</svg>
-
-{{/* https://heroicons.com/mini exclamation-circle */}}
-<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
-  <symbol id="icon--exclamation-circle" viewBox="0 0 24 24" aria-hidden="true">
-    <path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" />
-  </symbol>
-</svg>
-
-{{/* https://heroicons.com/mini exclamation-triangle */}}
-<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
-  <symbol id="icon--exclamation-triangle" viewBox="0 0 24 24" aria-hidden="true">
-    <path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" />
-  </symbol>
-</svg>
-
-{{/* https://heroicons.com/mini information-circle */}}
-<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
-  <symbol id="icon--information-circle" viewBox="0 0 24 24" aria-hidden="true">
-    <path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z" clip-rule="evenodd" />
-  </symbol>
-</svg>
-
-{{/* https://heroicons.com/mini light-bulb */}}
-<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
-  <symbol id="icon--light-bulb" viewBox="0 0 24 24" aria-hidden="true">
-    <path d="M10 1a6 6 0 0 0-3.815 10.631C7.237 12.5 8 13.443 8 14.456v.644a.75.75 0 0 0 .572.729 6.016 6.016 0 0 0 2.856 0A.75.75 0 0 0 12 15.1v-.644c0-1.013.762-1.957 1.815-2.825A6 6 0 0 0 10 1ZM8.863 17.414a.75.75 0 0 0-.226 1.483 9.066 9.066 0 0 0 2.726 0 .75.75 0 0 0-.226-1.483 7.553 7.553 0 0 1-2.274 0Z" />
-  </symbol>
-</svg>
diff --git a/layouts/partials/layouts/in-this-section.html b/layouts/partials/layouts/in-this-section.html
deleted file mode 100644 (file)
index 28e5ed7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-{{- with .CurrentSection.RegularPages }}
-  {{ $hasTocOrRelated := or  ($.Store.Get "hasToc") ($.Store.Get "hasRelated") }}
-  <div
-    class="overflow-y-auto {{ if $hasTocOrRelated }}
-      max-h-96
-    {{ else }}
-      sticky top-[8rem] max-h-[70vh]
-    {{ end }} relative mt-2 mb-8"
-    data-turbo-preserve-scroll-container="in-this-section">
-    <h2
-      class="text-base font-semibold tracking-tight text-gray-600  dark:text-gray-400">
-      In this section
-    </h2>
-
-    <ul id="in-sthis-section" class="mt-2">
-      {{- range . }}
-        <li>
-          <a
-            class="text-sm {{ if eq . $ }}
-              font-bold text-blue-600 hover:text-blue-600
-              dark:hover:text-blue-200 dark:text-blue-200 focus:font-bold
-              scroll-active
-            {{ else }}
-              text-blue-600 hover:text-blue-500 dark:text-blue-500
-              dark:hover:text-blue-400
-            {{ end }}"
-            href="{{ .RelPermalink }}"
-            >{{ .LinkTitle }}</a
-          >
-        </li>
-      {{- end }}
-    </ul>
-  </div>
-{{- end }}
diff --git a/layouts/partials/layouts/page-edit.html b/layouts/partials/layouts/page-edit.html
deleted file mode 100644 (file)
index 6a976d1..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<div class="print:hidden">
-  <hr class="border-t border-gray-200 dark:border-gray-800 my-10 lg:my-16">
-
-  <div class="text-gray-800 dark:text-gray-300 font-semibold">
-    Last updated:
-    {{ .Lastmod.Format "January 2, 2006" }}{{ with .GitInfo }}
-      :
-      <a
-        class="text-blue-600 hover:text-blue-500"
-        href="{{ $.Site.Params.ghrepo }}commit/{{ .Hash }}"
-        >{{ .Subject }} ({{ .AbbreviatedHash }})</a
-      >
-    {{ end }}
-  </div>
-
-  {{ with .File }}
-    {{ if not .IsContentAdapter }}
-      {{ $href := printf "%sedit/master/content/%s/%s" site.Params.ghrepo $.Lang .Path }}
-      <a
-        href="{{ $href }}"
-        class="mt-4 inline-block not-prose bg-blue-600 hover:bg-blue-800 text-white hover:text-white font-bold py-2 px-4 rounded">
-        Improve this page
-      </a>
-    {{ end }}
-  {{ end }}
-</div>
diff --git a/layouts/partials/layouts/related.html b/layouts/partials/layouts/related.html
deleted file mode 100644 (file)
index 0245ba7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-{{- $heading := "See also" }}
-{{- $related := site.Pages.Related . }}
-{{- $related = $related | complement .CurrentSection.Pages | first 7 }}
-
-{{- with $related }}
-  {{ $.Store.Set "hasRelated" true }}
-  <h2
-    class="text-base font-semibold tracking-tight text-gray-600  dark:text-gray-400">
-    {{ $heading }}
-  </h2>
-  <ul class="mt-2 mb-8">
-    {{- range . }}
-      <li>
-        <a
-          class="text-sm text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400"
-          href="{{ .RelPermalink }}"
-          >{{ or .Params.altTitle .Title }}</a
-        >
-      </li>
-    {{- end }}
-  </ul>
-{{- end }}
diff --git a/layouts/partials/layouts/search/algolialogo.html b/layouts/partials/layouts/search/algolialogo.html
deleted file mode 100644 (file)
index a7fc6c0..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<div class="flex items-center gap-1">
-  <span class="">Search by</span
-  ><svg
-    width="77"
-    height="19"
-    aria-label="Algolia"
-    role="img"
-    id="l1"
-    class="fill-gray-600 dark:fill-gray-400"
-    xmlns="http://www.w3.org/2000/svg"
-    viewBox="0 0 2196.2 500">
-    <path
-      class=""
-      d="M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"></path>
-    <rect
-      class="cls-1"
-      x="1845.88"
-      y="104.73"
-      width="62.58"
-      height="277.9"
-      rx="5.9"
-      ry="5.9"></rect>
-    <path
-      class=""
-      d="M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"></path>
-    <path
-      class=""
-      d="M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"></path>
-    <path
-      class=""
-      d="M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"></path>
-    <path
-      class=""
-      d="M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"></path>
-    <path
-      class=""
-      d="M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"></path>
-    <path
-      class=""
-      d="M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"></path>
-    <path
-      class="cls-1"
-      d="M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"></path>
-  </svg>
-</div>
diff --git a/layouts/partials/layouts/search/button.html b/layouts/partials/layouts/search/button.html
deleted file mode 100644 (file)
index 07c1f73..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-{{ $textColor := "text-gray-300" }}
-{{ $fillColor := "fill-slate-400 dark:fill-slate-500" }}
-{{ if .standalone }}
-  {{ $textColor = "text-gray-800 dark:text-gray-300 " }}
-  {{ $fillColor = "fill-slate-500 dark:fill-slate-400" }}
-{{ end }}
-
-
-<button
-  {{ if .standalone }}
-    x-data @click="$dispatch('search-toggle')"
-  {{ end }}
-  type="button"
-  aria-label="Search"
-  class="{{ $textColor }} grid cursor-pointer w-full lg:w-56 grid-cols-[auto_1fr_auto] items-center rounded-md px-2 sm:px-4 py-2 text-left text-xs/6 lg:text-sm/6 outline-0 sm:outline-1 -outline-offset-1 outline-gray-600">
-  <svg
-    class="{{ $fillColor }} pointer-events-none -ml-0.5 mr-2 size-5 sm:size-4">
-    <use href="#icon--search"></use>
-  </svg>
-  <span class="hidden lg:inline">Search docs</span>
-  <span class="hidden lg:inline">/</span>
-</button>
diff --git a/layouts/partials/layouts/search/input.html b/layouts/partials/layouts/search/input.html
deleted file mode 100644 (file)
index 5f5ff07..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<div x-data="search" class="flex w-full">
-  {{ partial "layouts/search/button.html" (dict "page" . "standalone" false) }}
-  {{ partial "layouts/search/results.html" . }}
-</div>
diff --git a/layouts/partials/layouts/search/results.html b/layouts/partials/layouts/search/results.html
deleted file mode 100644 (file)
index cd9b88d..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-<div
-  class="fixed inset-0 overflow-hidden z-20"
-  :class="{'fixed': open}"
-  aria-label="Search docs"
-  role="dialog"
-  aria-modal="true"
-  @keydown.right="$focus.next()"
-  @keydown.left="$focus.previous()"
-  @keydown.esc="open=false"
-  x-cloak>
-  <div class="absolute inset-0 overflow-hidden z-20" x-show="open">
-    <div class="absolute inset-0" aria-hidden="true"></div>
-
-    <div
-      class="pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10"
-      @click.outside="open = false">
-      <div
-        class="pointer-events-auto w-screen max-w-md"
-        x-show="open"
-        x-transition:enter="transform transition ease-in-out duration-300 sm:duration-500"
-        x-transition:enter-start="translate-x-full"
-        x-transition:enter-end="translate-x-0"
-        x-transition:leave="transform transition ease-in-out duration-300 sm:duration-500"
-        x-transition:leave-start="translate-x-0"
-        x-transition:leave-end="translate-x-full">
-        <div
-          class="flex h-full flex-col overflow-y-scroll dark:bg-blue-950/96 bg-white py-6 shadow-sm dark:shadow-gray-800">
-          <div class="px-4 sm:px-6">
-            <div class="flex items-start justify-between">
-              <input
-                x-model.debounce.100ms="query"
-                @click="search()"
-                type="search"
-                arial-label="Search"
-                class="text-gray-800 dark:text-gray-100 bg-white/40 dark:bg-gray-900 shadow rounded border-0 p-3 w-full"
-                placeholder="Search docs"
-                x-ref="input">
-            </div>
-          </div>
-          <div class="relative mt-6 flex-1 px-4 sm:px-6 h-full">
-            <ul
-              role="list"
-              class="divide-y divide-gray-200 dark:divide-gray-900 h-[calc(100%-6rem)] overflow-y-auto">
-              <template
-                x-for="[group, entries] in Object.entries(result)"
-                :key="group">
-                <li class="py-4">
-                  <div
-                    class="mb-1 dark:text-gray-300 font-semibold uppercase tracking-widest text-sm"
-                    x-text="group"></div>
-                  <template x-for="entry in entries" :key="entry.objectID">
-                    <a
-                      class="flex flex-nowrap space-x-4 py-2 text-sm leading-5 text-gray-900 dark:text-gray-500 hover:dark:text-gray-800 hover:bg-gray-50 dark:hover:bg-gray-500 focus:outline-none focus:bg-gray-50 dark:focus:bg-gray-800 cursor-pointer transition duration-150 ease-in-out"
-                      :href="entry.url">
-                      <span
-                        class="w-1/3 text-xs text-right text-gray-500 dark:text-gray-300"
-                        x-text="entry.hierarchy.lvl1">
-                      </span>
-                      <div class="w-2/3">
-                        <h3
-                          class="text-md font-bold"
-                          x-html="entry.getHeadingHTML()"></h3>
-                        <template
-                          x-if="entry._snippetResult && entry._snippetResult.content">
-                          <div class="two-lines-ellipsis mt-1">
-                            <span>…</span>
-                            <span x-html="entry._snippetResult.content.value">
-                            </span>
-                            <span>…</span>
-                          </div>
-                        </template>
-                      </div>
-                    </a>
-                  </template>
-                </li>
-              </template>
-            </ul>
-          </div>
-          {{/* End listing */ -}}
-        </div>
-      </div>
-      <div
-        class="z-40 fixed pointer-events-auto bottom-0 right-0 dark:text-gray-300 text-gray-800 float-right mr-8 mb-4 text-sm lg:text-md"
-        x-show="open"
-        x-transition.opacity.duration.800ms>
-        {{ partial "layouts/search/algolialogo.html" }}
-      </div>
-    </div>
-  </div>
-</div>
diff --git a/layouts/partials/layouts/templates.html b/layouts/partials/layouts/templates.html
deleted file mode 100644 (file)
index 72b71a3..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<template id="anchor-heading">
-  <a class="hidden group-hover:inline-flex items-center" aria-label="Anchor">
-    <svg class="ml-2 fill-primary hover:fill-primary/70 w-4 h-4">
-      <use href="#icon--anchor"></use>
-    </svg>
-  </a>
-</template>
diff --git a/layouts/partials/layouts/toc.html b/layouts/partials/layouts/toc.html
deleted file mode 100644 (file)
index 774bc15..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-{{ with .Fragments }}
-  {{ with .Headings }}
-    <div
-      x-data="toc"
-      class="sticky top-[8rem] h-screen overflow-y-auto overflow-x-hidden">
-      <h2
-        class="text-base font-semibold tracking-tight text-gray-600  dark:text-gray-400">
-        On this page
-      </h2>
-      <nav class="w-56 mt-2">
-        <ul>
-          {{ template "render-toc-level" (dict "h" . "p" $) }}
-        </ul>
-      </nav>
-    </div>
-  {{ end }}
-{{ end }}
-
-{{ define "render-toc-level" }}
-  {{ range .h }}
-    {{ if and .ID (and (ge .Level 2) (le .Level 4)) }}
-      {{ $indentation := "ml-0" }}
-      {{ if eq .Level 3 }}
-        {{ $indentation = "ml-2 lg:ml-3" }}
-      {{ else if eq .Level 4 }}
-        {{ $indentation = "ml-4 lg:ml-6" }}
-      {{ end }}
-      {{ $.p.Store.Set "hasToc" true }}
-      <li>
-        <a
-          href="#{{ .ID }}"
-          x-ref="{{ .ID }}"
-          @click.stop="setActive('{{ .ID }}')"
-          class="block pb-1 text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 text-sm {{ $indentation }}"
-          :class="{'font-bold dark:text-blue-200 dark:hover:text-blue-300' : activeHeading === '{{ .ID }}'}">
-          {{ .Title | safeHTML }}
-        </a>
-      </li>
-    {{ end }}
-    {{ with .Headings }}
-      <ul>
-        {{ template "render-toc-level"  (dict "h" . "p" $.p) }}
-      </ul>
-    {{ end }}
-  {{ end }}
-{{ end }}
diff --git a/layouts/partials/opengraph/get-featured-image.html b/layouts/partials/opengraph/get-featured-image.html
deleted file mode 100644 (file)
index 50ee2a4..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-{{ $images := $.Resources.ByType "image" }}
-{{ $featured := $images.GetMatch "*feature*" }}
-{{ if not $featured }}
-  {{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}
-{{ end }}
-{{ if not $featured }}
-  {{ $featured = resources.Get "/opengraph/gohugoio-card-base-1.png" }}
-  {{ $size := 80 }}
-  {{ $title := $.LinkTitle }}
-  {{ if gt (len $title) 20 }}
-    {{ $size = 70 }}
-  {{ end }}
-
-  {{ $text := $title }}
-  {{ $textOptions := dict
-    "color" "#FFF"
-    "size" $size
-    "lineSpacing" 10
-    "x" 65 "y" 80
-    "font" (resources.Get "/opengraph/mulish-black.ttf")
-  }}
-
-  {{ $featured = $featured | images.Filter (images.Text $text $textOptions) }}
-{{ end }}
-
-{{ return $featured }}
diff --git a/layouts/partials/opengraph/opengraph.html b/layouts/partials/opengraph/opengraph.html
deleted file mode 100644 (file)
index e32e072..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<meta property="og:title" content="{{ .Title }}">
-<meta
-  property="og:description"
-  content="{{ with .Description }}
-    {{ . }}
-  {{ else }}
-    {{ if .IsPage }}
-      {{ .Summary }}
-    {{ else }}
-      {{ with .Site.Params.description }}{{ . }}{{ end }}
-    {{ end }}
-  {{ end }}">
-<meta
-  property="og:type"
-  content="{{ if .IsPage }}
-    article
-  {{ else }}
-    website
-  {{ end }}">
-<meta property="og:url" content="{{ .Permalink }}">
-
-{{- with $.Params.images -}}
-  {{- range first 6 . }}
-    <meta property="og:image" content="{{ . | absURL }}">
-  {{ end -}}
-{{- else -}}
-  {{- $featured := partial "opengraph/get-featured-image.html" . }}
-  {{- with $featured -}}
-    <meta property="og:image" content="{{ $featured.Permalink }}">
-  {{- else -}}
-    {{- with $.Site.Params.images }}
-      <meta property="og:image" content="{{ index . 0 | absURL }}">
-    {{ end -}}
-  {{- end -}}
-{{- end -}}
-
-{{- if .IsPage }}
-  {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
-  <meta property="article:section" content="{{ .Section }}">
-  {{ with .PublishDate }}
-    <meta
-      property="article:published_time"
-      {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
-  {{ end }}
-  {{ with .Lastmod }}
-    <meta
-      property="article:modified_time"
-      {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
-  {{ end }}
-{{- end -}}
-
-{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}">{{ end }}
-{{- with .Params.locale }}
-  <meta property="og:locale" content="{{ . }}">
-{{ end }}
-{{- with .Site.Params.title }}
-  <meta property="og:site_name" content="{{ . }}">
-{{ end }}
-{{- with .Params.videos }}
-  {{- range . }}
-    <meta property="og:video" content="{{ . | absURL }}">
-  {{ end }}
-
-{{ end }}
-
-{{- /* If it is part of a series, link to related articles */}}
-{{- $permalink := .Permalink }}
-{{- $siteSeries := .Site.Taxonomies.series }}
-{{ with .Params.series }}
-  {{- range $name := . }}
-    {{- $series := index $siteSeries ($name | urlize) }}
-    {{- range $page := first 6 $series.Pages }}
-      {{- if ne $page.Permalink $permalink }}
-        <meta property="og:see_also" content="{{ $page.Permalink }}">
-      {{ end }}
-    {{- end }}
-  {{ end }}
-
-{{ end }}
-
-{{- /* Facebook Page Admin ID for Domain Insights */}}
-{{- with site.Params.social.facebook_admin }}
-  <meta property="fb:admins" content="{{ . }}">
-{{ end }}
diff --git a/layouts/shortcodes/chroma-lexers.html b/layouts/shortcodes/chroma-lexers.html
deleted file mode 100644 (file)
index fd71305..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{- /*
-Renders an HTML template of Chroma lexers and their aliases.
-
-@example {{< chroma-lexers >}}
-*/ -}}
-{{/* prettier-ignore-end */ -}}
-<div class="overflow-x-auto">
-  <table>
-    <thead>
-      <th>Language</th>
-      <th>Identifiers</th>
-    </thead>
-    <tbody>
-      {{- range site.Data.docs.chroma.lexers }}
-        <tr>
-          <td>{{ .Name }}</td>
-          <td>
-            {{- range $k, $_ := .Aliases }}
-              {{- if $k }},{{ end }}
-              <code>{{ . }}</code>
-            {{- end }}
-          </td>
-        </tr>
-      {{- end }}
-    </tbody>
-  </table>
-</div>
diff --git a/layouts/shortcodes/code-toggle.html b/layouts/shortcodes/code-toggle.html
deleted file mode 100644 (file)
index a22c378..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{- /*
-Renders syntax-highlighted configuration data in JSON, TOML, and YAML formats.
-
-@param {string} [config] The section of site.Data.docs.config to render.
-@param {bool} [copy=false] Whether to display a copy-to-clipboard button.
-@param {string} [dataKey] The section of site.Data.docs to render.
-@param {string} [file] The file name to display above the rendered code.
-@param {bool} [fm=false] Whether to render the code as front matter.
-@param {bool} [skipHeader=false] Whether to omit top level key(s) when rendering a section of site.Data.docs.config.
-
-@example  {{< code-toggle file=hugo config=build />}}
-
-@example  {{< code-toggle file=content/example.md fm="true" }}
-          title='Example'
-          draft='false
-          {{< /code-toggle }}
-*/ -}}
-{{/* prettier-ignore-end */ -}}
-{{- /* Initialize. */}}
-{{- $config := "" }}
-{{- $copy := false }}
-{{- $dataKey := "" }}
-{{- $file := "" }}
-{{- $fm := false }}
-{{- $skipHeader := false }}
-
-{{- /* Get parameters. */}}
-{{- $config = .Get "config" }}
-{{- $dataKey = .Get "dataKey" }}
-{{- $file = .Get "file" }}
-{{- if in (slice "false" false 0) (.Get "copy") }}
-  {{- $copy = false }}
-{{- else if in (slice "true" true 1) (.Get "copy") }}
-  {{- $copy = true }}
-{{- end }}
-{{- if in (slice "false" false 0) (.Get "fm") }}
-  {{- $fm = false }}
-{{- else if in (slice "true" true 1) (.Get "fm") }}
-  {{- $fm = true }}
-{{- end }}
-{{- if in (slice "false" false 0) (.Get "skipHeader") }}
-  {{- $skipHeader = false }}
-{{- else if in (slice "true" true 1) (.Get "skipHeader") }}
-  {{- $skipHeader = true }}
-{{- end }}
-
-{{- /* Define constants. */}}
-{{- $delimiters := dict "toml" "+++" "yaml" "---" }}
-{{- $langs := slice "yaml" "toml" "json" }}
-{{- $placeHolder := "#-hugo-placeholder-#" }}
-
-{{- /* Render. */}}
-{{- $code := "" }}
-{{- if $config }}
-  {{- $file = $file | default "hugo" }}
-  {{- $sections := (split $config ".") }}
-  {{- $configSection := index $.Site.Data.docs.config $sections }}
-  {{- $code = dict $sections $configSection }}
-  {{- if $skipHeader }}
-    {{- $code = $configSection }}
-  {{- end }}
-{{- else if $dataKey }}
-  {{- $file = $file | default $dataKey }}
-  {{- $sections := (split $dataKey ".") }}
-  {{- $code = index $.Site.Data.docs $sections }}
-{{- else }}
-  {{- $code = $.Inner }}
-{{- end }}
-
-
-<div x-data class="shortcode-code not-prose relative p-0 mt-6 mb-8">
-  {{- if $copy }}
-    <svg
-      class="absolute right-4 top-12 z-30 text-blue-600 hover:text-blue-500 cursor-pointer w-6 h-6"
-      @click="$copy($refs[$store.nav.userSettings.settings.configFileType])">
-      <use href="#icon--copy"></use>
-    </svg>
-  {{- end }}
-  <nav class="relative flex" aria-label="Tabs">
-    {{- with $file }}
-      <div
-        class="select-none flex-none text-sm px-2 content-center border-b-1 border-gray-300 dark:border-gray-700"
-        aria-label="Filename">
-        {{ . }}{{ if not $fm }}.{{ end }}
-      </div>
-    {{- end }}
-    {{- range $i, $lang := $langs }}
-      {{- $isLast := eq (add $i 1) (len $langs) }}
-      <button
-        x-on:click="$store.nav.userSettings.settings.configFileType = '{{ index $langs $i }}'"
-        aria-label="{{ printf `Toggle %s` . }}"
-        class="px-3 py-2 font-semibold text-black dark:text-slate-200 border-l-1 border-t-1 {{ if $isLast }}
-          border-r-1
-        {{ end }} border-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 dark:border-gray-700 cursor-pointer relative min-w-0 flex-1 overflow-hidden text-sm no-underline text-center focus:z-10 overflow-x-auto"
-        :class="$store.nav.userSettings.settings.configFileType === '{{ index $langs $i }}' ? 'border-b-0 bg-light dark:bg-dark' : 'border-b-1'">
-        <span class="select-none">
-          {{ . }}
-        </span>
-      </button>
-    {{- end }}
-  </nav>
-  {{- if $code }}
-    {{- range $i, $lang := $langs }}
-      <div
-        class="max-h-96 overflow-y-auto border-l-1 border-b-1 border-r-1 border-gray-300 dark:border-gray-700"
-        x-ref="{{ $lang }}"
-        x-cloak
-        x-transition:enter.opacity.duration.300ms
-        x-show="$store.nav.userSettings.settings.configFileType === '{{ index $langs $i }}'">
-        {{- $hCode := $code | transform.Remarshal . }}
-        {{- if and $fm (in (slice "toml" "yaml") .) }}
-          {{- $hCode = printf "%s\n%s\n%s" $placeHolder $hCode $placeHolder }}
-        {{- end }}
-        {{- $hCode = $hCode | replaceRE `\n+` "\n" }}
-        {{- highlight $hCode . "" | replaceRE $placeHolder (index $delimiters .) | safeHTML }}
-      </div>
-    {{- end }}
-  {{- end }}
-</div>
diff --git a/layouts/shortcodes/datatable-filtered.html b/layouts/shortcodes/datatable-filtered.html
deleted file mode 100644 (file)
index de8b0cf..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-{{ $package := (index .Params 0) }}
-{{ $listname := (index .Params 1) }}
-{{ $filter := split (index .Params 2) " " }}
-{{ $filter1 := index $filter 0 }}
-{{ $filter2 := index $filter 1 }}
-{{ $filter3 := index $filter 2 }}
-
-{{ $list := (index (index .Site.Data.docs $package) $listname) }}
-{{ $fields := after 3 .Params }}
-{{ $list := where $list $filter1 $filter2 $filter3 }}
-
-
-<div class="overflow-x-auto">
-  <table>
-    <thead>
-      <tr>
-        {{ range $fields }}
-          <th>{{ . }}</th>
-        {{ end }}
-      </tr>
-    </thead>
-    <tbody>
-      {{ range $list }}
-        <tr>
-          {{ range $k, $v := . }}
-            {{ $.Scratch.Set $k $v }}
-          {{ end }}
-          {{ range $k, $v := $fields }}
-            <td>
-              {{ $tdContent := $.Scratch.Get . }}
-              {{ if eq $k 3 }}
-                {{ printf "%v" $tdContent |
-                  strings.ReplaceRE `\[` "<ol><li>" |
-                  strings.ReplaceRE `\s` "</li><li>" |
-                  strings.ReplaceRE `\]` "</li></ol>" |
-                  safeHTML
-                }}
-              {{ else }}
-                {{ $tdContent }}
-              {{ end }}
-            </td>
-          {{ end }}
-        </tr>
-      {{ end }}
-    </tbody>
-  </table>
-</div>
diff --git a/layouts/shortcodes/datatable.html b/layouts/shortcodes/datatable.html
deleted file mode 100644 (file)
index f135d84..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-{{ $package := (index .Params 0) }}
-{{ $listname := (index .Params 1) }}
-{{ $list := (index (index .Site.Data.docs $package) $listname) }}
-{{ $fields := after 2 .Params }}
-
-
-<div class="overflow-x-auto">
-  <table>
-    <thead>
-      <tr>
-        {{ range $fields }}
-          {{ $s := . }}
-          {{ if eq $s "_key" }}
-            {{ $s = "type" }}
-          {{ end }}
-          <th>{{ $s }}</th>
-        {{ end }}
-      </tr>
-    </thead>
-    <tbody>
-      {{ range $k1, $v1 := $list }}
-        <tr>
-          {{ range $k2, $v2 := . }}
-            {{ $.Scratch.Set $k2 $v2 }}
-          {{ end }}
-          {{ range $fields }}
-            {{ $s := "" }}
-            {{ if eq . "_key" }}
-              {{ $s = $k1 }}
-            {{ else }}
-              {{ $s = $.Scratch.Get . }}
-            {{ end }}
-            <td>{{ $s }}</td>
-          {{ end }}
-        </tr>
-      {{ end }}
-    </tbody>
-  </table>
-</div>
diff --git a/layouts/shortcodes/deprecated-in.html b/layouts/shortcodes/deprecated-in.html
deleted file mode 100644 (file)
index ce2ba38..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{- /*
-Renders a callout indicating the version in which a feature was deprecated.
-
-Include descriptive text between the opening and closing tags, or omit the
-descriptive text and call the shortcode with a self-closing tag.
-
-@param {string} 0 The semantic version string, with or without a leading v.
-
-@example  {{< deprecated-in 0.144.0 />}}
-
-@example  {{< deprecated-in 0.144.0 >}}
-          Some descriptive text here.
-          {{< /deprecated-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 }}
-  {{- $text := printf "Deprecated in [v%s](%s)\n\n%s" $version $href $inner | $.Page.RenderString (dict "display" "block") }}
-  {{- partial "layouts/blocks/alert.html" (dict
-    "color" "orange"
-    "icon" "exclamation"
-    "text" $text
-    )
-  }}
-{{- else }}
-  {{- errorf "The %q shortcode requires a single positional parameter indicating version. See %s" .Name .Position }}
-{{- end }}
diff --git a/layouts/shortcodes/eturl.html b/layouts/shortcodes/eturl.html
deleted file mode 100644 (file)
index a0237db..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{- /*
-Renders an absolute URL to the source code for an embedded template.
-
-Accepts either positional or named parameters, and depends on the
-embedded_templates.toml file in the data directory.
-
-@param {string} filename The embedded template's file name, excluding extension.
-
-@example {{% et robots.txt %}}
-@example {{% et filename=robots.txt %}}
-*/ -}}
-{{/* prettier-ignore-end */ -}}
-{{- with $filename := or (.Get "filename") (.Get 0) }}
-  {{- with site.Data.embedded_template_urls }}
-    {{- with index . $filename }}
-      {{- urls.JoinPath site.Data.embedded_template_urls.base_url . }}
-    {{- else }}
-      {{- errorf "The %q shortcode was unable to find a URL for the embedded template named %q. Check the name. See %s" $.Name $filename $.Position }}
-    {{- end }}
-  {{- else }}
-    {{- 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 }}
-{{- end -}}
diff --git a/layouts/shortcodes/glossary-term.html b/layouts/shortcodes/glossary-term.html
deleted file mode 100644 (file)
index 2a45dc8..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{{- /*
-Renders the definition of the given glossary term.
-
-@param {string} (.Get 0) The glossary term.
-
-@example {{% glossary-term float %}}
-@example {{% glossary-term "floating point" %}}
-*/ -}}
-{{- with .Get 0 }}
-  {{- $path := printf "/quick-reference/glossary/%s" (urlize .) }}
-  {{- with site.GetPage $path }}
-{{ .RenderShortcodes }}{{/* Do not indent. */}}
-  {{- else }}
-    {{- errorf "The glossary term (%s) shortcode was unable to find %s: see %s" $.Name $path $.Position }}
-  {{- end }}
-{{- else }}
-  {{- errorf "The glossary term (%s) shortcode requires one positional parameter: see %s" $.Name $.Position }}
-{{- end -}}
diff --git a/layouts/shortcodes/glossary.html b/layouts/shortcodes/glossary.html
deleted file mode 100644 (file)
index 7331d5c..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-{{- /*
-Renders the glossary of terms.
-
-When you call this shortcode using the {{% %}} notation, the glossary terms are
-Markdown headings (level 6) which means they are members of .Fragments. This
-allows the link render hook to verify links to glossary terms.
-
-Yes, the terms themselves are pages, but we don't want to link to the pages, at
-least not right now. Instead, we want to link to the ids rendered by this
-shortcode.
-
-@example {{% glossary %}}
-*/ -}}
-{{- $path := "/quick-reference/glossary" }}
-{{- with site.GetPage $path }}
-
-  {{- /* Build and render alphabetical index. */}}
-  {{- $m := dict }}
-  {{- range $p := .Pages.ByTitle }}
-    {{- $k := substr .Title 0 1 | strings.ToUpper }}
-    {{- if index $m $k }}
-      {{- continue }}
-    {{- end }}
-    {{- $anchor := path.BaseName .Path | anchorize }}
-    {{- $m = merge $m (dict $k $anchor) }}
-  {{- end }}
-  {{- range $k, $v := $m }}
-[{{ $k }}](#{{ $v }})&nbsp;{{/* Do not indent. */}}
-  {{- end }}
-
-  {{/* Render glossary terms. */}}
-  {{- range $p := .Pages.ByTitle }}
-{{ .Title }}{{/* Do not indent. */}}
-: {{ .RawContent | strings.TrimSpace | safeHTML }}{{/* Do not indent. */}}
-    {{ with .Params.reference }}
-      {{- $destination := "" }}
-      {{- with $u := urls.Parse . }}
-        {{- if $u.IsAbs }}
-          {{- $destination = $u.String }}
-        {{- else }}
-          {{- with site.GetPage $u.Path }}
-            {{- $destination = .RelPermalink }}
-          {{- else }}
-            {{- errorf "The %q shortcode was unable to find the reference link %s: see %s" $.Name . $p.String }}
-          {{- end }}
-        {{- end }}
-      {{- end }}
-: See&nbsp;[details]({{ $destination }}).{{/* Do not indent. */}}
-    {{- end }}
-  {{ end }}
-
-{{- else }}
-  {{- errorf "The %q shortcode was unable to get %s: see %s" .Name $path .Position}}
-{{- end }}
diff --git a/layouts/shortcodes/hl.html b/layouts/shortcodes/hl.html
deleted file mode 100644 (file)
index 3fafcb5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{- /*
-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.
-
-@example This is {{< hl python >}}inline{{< /hl >}} code.
-*/ -}}
-{{/* prettier-ignore-end */ -}}
-{{- $code := .Inner | strings.TrimSpace }}
-{{- $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
deleted file mode 100644 (file)
index 6018780..0000000
+++ /dev/null
@@ -1,391 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{- /*
-Renders the given image using the given filter, if any.
-
-When using the text filter, provide the arguments in this order:
-
-0. The text
-1. The horizontal offset, in pixels, relative to the left of the image (default 20)
-2. The vertical offset, in pixels, relative to the top of the image (default 20)
-3. The font size in pixels (default 64)
-4. The line height (default 1.2)
-5. The font color (default #ffffff)
-
-When using the padding filter, provide all arguments in this order:
-
-0. Padding top
-1. Padding right
-2. Padding bottom
-3. Padding right
-4. Canvas color
-
-@param {string} src The path to the image which must be a remote, page, or global resource.
-@param {string} [filter] The filter to apply to the image (case-insensitive).
-@param {string} [filterArgs] A comma-delimited list of arguments to pass to the filter.
-@param {bool} [example=false] If true, renders a before/after example.
-@param {int} [exampleWidth=384] Image width, in pixels, when rendering a before/after example.
-
-@example  {{< img src="zion-national-park.jpg" >}}
-@example  {{< img src="zion-national-park.jpg" alt="Zion National Park" >}}
-
-@example  {{< img
-            src="zion-national-park.jpg"
-            alt="Zion National Park"
-            filter="grayscale"
-          >}}
-
-@example  {{< img
-            src="zion-national-park.jpg"
-            alt="Zion National Park"
-            filter="process"
-            filterArgs="resize 400x webp"
-          >}}
-
-@example  {{< img
-            src="zion-national-park.jpg"
-            alt="Zion National Park"
-            filter="colorize"
-            filterArgs="180,50,20"
-          >}}
-
-@example  {{< img
-            src="zion-national-park.jpg"
-            alt="Zion National Park"
-            filter="grayscale"
-            example=true
-          >}}
-
-@example  {{< img
-            src="zion-national-park.jpg"
-            alt="Zion National Park"
-            filter="grayscale"
-            example=true
-            exampleWidth=400
-          >}}
-
-@example  {{< img
-            src="images/examples/zion-national-park.jpg"
-            alt="Zion National Park"
-            filter="Text"
-            filterArgs="Zion National Park,25,250,56"
-            example=true
-          >}}
-
-@example  {{< img
-            src="images/examples/zion-national-park.jpg"
-            alt="Zion National Park"
-            filter="Padding"
-            filterArgs="20,50,20,50,#0705"
-            example=true
-          >}}
-*/ -}}
-{{/* prettier-ignore-end */ -}}
-{{- /* Initialize. */}}
-{{- $alt := "" }}
-{{- $src := "" }}
-{{- $filter := "" }}
-{{- $filterArgs := slice }}
-{{- $example := false }}
-{{- $exampleWidth := 384 }}
-
-{{- /* Default values to use with the text filter. */}}
-{{ $textFilterOpts := dict
-  "xOffset" 20
-  "yOffset" 20
-  "fontSize" 64
-  "lineHeight" 1.2
-  "fontColor" "#ffffff"
-  "fontPath" "https://github.com/google/fonts/raw/refs/heads/main/ofl/lato/Lato-Regular.ttf"
-}}
-
-{{- /* Get and validate parameters. */}}
-{{- with .Get "alt" }}
-  {{- $alt = . }}
-{{- end }}
-
-{{- with .Get "src" }}
-  {{- $src = . }}
-{{- else }}
-  {{- errorf "The %q shortcode requires a file parameter. See %s" .Name .Position }}
-{{- end }}
-
-{{- with .Get "filter" }}
-  {{- $filter = . | lower }}
-{{- end }}
-
-{{- $validFilters := slice
-  "autoorient" "brightness" "colorbalance" "colorize" "contrast" "dither"
-  "gamma" "gaussianblur" "grayscale" "hue" "invert" "mask" "none" "opacity"
-  "overlay" "padding" "pixelate" "process" "saturation" "sepia" "sigmoid" "text"
-  "unsharpmask"
-}}
-
-{{- with $filter }}
-  {{- if not (in $validFilters .) }}
-    {{- errorf "The filter passed to the %q shortcode is invalid. The filter must be one of %s. See %s" $.Name (delimit $validFilters ", " ", or ") $.Position }}
-  {{- end }}
-{{- end }}
-
-{{- with .Get "filterArgs" }}
-  {{- $filterArgs = split . "," }}
-  {{- $filterArgs = apply $filterArgs "trim" "." " " }}
-{{- end }}
-
-{{- if in (slice "false" false 0) (.Get "example") }}
-  {{- $example = false }}
-{{- else if in (slice "true" true 1) (.Get "example") }}
-  {{- $example = true }}
-{{- end }}
-
-{{- with .Get "exampleWidth" }}
-  {{- $exampleWidth = . | int }}
-{{- end }}
-
-{{- /* Get image. */}}
-{{- $ctx := dict "page" .Page "src" $src "name" .Name "position" .Position }}
-{{- $i := partial "inline/get-resource.html" $ctx }}
-
-{{- /* Resize if rendering before/after examples. */}}
-{{- if $example }}
-  {{- $i = $i.Resize (printf "%dx" $exampleWidth) }}
-{{- end }}
-
-{{- /* Create filter. */}}
-{{- $f := "" }}
-{{- $ctx := dict "filter" $filter "args" $filterArgs "name" .Name "position" .Position }}
-{{- 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" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 100) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.Brightness (index $filterArgs 0) }}
-{{- else if eq $filter "colorbalance" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 3) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $filterArgs = apply $filterArgs "float" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "percentage red" "argValue" (index $filterArgs 0) "min" -100 "max" 500) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $ctx = merge $ctx (dict "argName" "percentage green" "argValue" (index $filterArgs 1) "min" -100 "max" 500) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $ctx = merge $ctx (dict "argName" "percentage blue" "argValue" (index $filterArgs 2) "min" -100 "max" 500) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.ColorBalance (index $filterArgs 0) (index $filterArgs 1) (index $filterArgs 2) }}
-{{- else if eq $filter "colorize" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 3) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $filterArgs = apply $filterArgs "float" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "hue" "argValue" (index $filterArgs 0) "min" 0 "max" 360) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $ctx = merge $ctx (dict "argName" "saturation" "argValue" (index $filterArgs 1) "min" 0 "max" 100) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 2) "min" 0 "max" 100) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.Colorize (index $filterArgs 0) (index $filterArgs 1) (index $filterArgs 2) }}
-{{- else if eq $filter "contrast" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $filterArgs = apply $filterArgs "float" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 100) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.Contrast (index $filterArgs 0) }}
-{{- else if eq $filter "dither" }}
-  {{- $f = images.Dither }}
-{{- else if eq $filter "gamma" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $filterArgs = apply $filterArgs "float" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "gamma" "argValue" (index $filterArgs 0) "min" 0 "max" 100) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.Gamma (index $filterArgs 0) }}
-{{- else if eq $filter "gaussianblur" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $filterArgs = apply $filterArgs "float" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "sigma" "argValue" (index $filterArgs 0) "min" 0 "max" 1000) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.GaussianBlur (index $filterArgs 0) }}
-{{- else if eq $filter "grayscale" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 0) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $f = images.Grayscale }}
-{{- else if eq $filter "hue" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $filterArgs = apply $filterArgs "float" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "shift" "argValue" (index $filterArgs 0) "min" -180 "max" 180) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.Hue (index $filterArgs 0) }}
-{{- else if eq $filter "invert" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 0) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $f = images.Invert }}
-{{- else if eq $filter "mask" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $ctx := dict "src" (index $filterArgs 0) "name" .Name "position" .Position }}
-  {{- $maskImage := partial "inline/get-resource.html" $ctx }}
-  {{- $f = images.Mask $maskImage }}
-{{- else if eq $filter "opacity" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $filterArgs = apply $filterArgs "float" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "opacity" "argValue" (index $filterArgs 0) "min" 0 "max" 1) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.Opacity (index $filterArgs 0) }}
-{{- else if eq $filter "overlay" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 3) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $ctx := dict "src" (index $filterArgs 0) "name" .Name "position" .Position }}
-  {{- $overlayImg := partial "inline/get-resource.html" $ctx }}
-  {{- $f = images.Overlay $overlayImg (index $filterArgs 1 | float ) (index $filterArgs 2 | float) }}
-{{- else if eq $filter "padding" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 5) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $f = images.Padding
-    (index $filterArgs 0 | int)
-    (index $filterArgs 1 | int)
-    (index $filterArgs 2 | int)
-    (index $filterArgs 3 | int)
-    (index $filterArgs 4)
-  }}
-{{- else if eq $filter "pixelate" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $filterArgs = apply $filterArgs "float" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "size" "argValue" (index $filterArgs 0) "min" 0 "max" 1000) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.Pixelate (index $filterArgs 0) }}
-{{- else if eq $filter "process" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $f = images.Process (index $filterArgs 0) }}
-{{- else if eq $filter "saturation" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $filterArgs = apply $filterArgs "float" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 500) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.Saturation (index $filterArgs 0) }}
-{{- else if eq $filter "sepia" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $filterArgs = apply $filterArgs "float" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" 0 "max" 100) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.Sepia (index $filterArgs 0) }}
-{{- else if eq $filter "sigmoid" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 2) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $filterArgs = apply $filterArgs "float" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "midpoint" "argValue" (index $filterArgs 0) "min" 0 "max" 1) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $ctx = merge $ctx (dict "argName" "factor" "argValue" (index $filterArgs 1) "min" -10 "max" 10) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.Sigmoid (index $filterArgs 0) (index $filterArgs 1) }}
-{{- else if eq $filter "text" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $ctx := dict "src" $textFilterOpts.fontPath "name" .Name "position" .Position }}
-  {{- $font := or (partial "inline/get-resource.html" $ctx) }}
-  {{- $fontSize := or (index $filterArgs 3 | int) $textFilterOpts.fontSize }}
-  {{- $lineHeight := math.Max (or (index $filterArgs 4 | float) $textFilterOpts.lineHeight) 1 }}
-  {{- $opts := dict
-    "x" (or (index $filterArgs 1 | int) $textFilterOpts.xOffset)
-    "y" (or (index $filterArgs 2 | int) $textFilterOpts.yOffset)
-    "size" $fontSize
-    "linespacing" (mul (sub $lineHeight 1) $fontSize)
-    "color" (or (index $filterArgs 5) $textFilterOpts.fontColor)
-    "font" $font
-  }}
-  {{- $f = images.Text (index $filterArgs 0) $opts }}
-{{- else if eq $filter "unsharpmask" }}
-  {{- $ctx = merge $ctx (dict "argsRequired" 3) }}
-  {{- template "validate-arg-count" $ctx }}
-  {{- $filterArgs = apply $filterArgs "float" "." }}
-  {{- $ctx = merge $ctx (dict "argName" "sigma" "argValue" (index $filterArgs 0) "min" 0 "max" 500) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $ctx = merge $ctx (dict "argName" "amount" "argValue" (index $filterArgs 1) "min" 0 "max" 100) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $ctx = merge $ctx (dict "argName" "threshold" "argValue" (index $filterArgs 2) "min" 0 "max" 1) }}
-  {{- template "validate-arg-value" $ctx }}
-  {{- $f = images.UnsharpMask (index $filterArgs 0) (index $filterArgs 1) (index $filterArgs 2) }}
-{{- end }}
-
-{{- /* Apply filter. */}}
-{{- $fi := $i }}
-{{- with $f }}
-  {{- $fi = $i.Filter . }}
-{{- end }}
-
-{{- /* Render. */}}
-{{- $class := "border-1 border-gray-300 dark:border-gray-500" }}
-{{- if $example }}
-  <p>Original</p>
-  <img
-    class="{{ $class }}"
-    src="{{ $i.RelPermalink }}"
-    alt="{{ $alt }}">
-  <p>Processed</p>
-  <img
-    class="{{ $class }}"
-    src="{{ $fi.RelPermalink }}"
-    alt="{{ $alt }}">
-{{- else -}}
-  <img
-    src="{{ $fi.RelPermalink }}"
-    alt="{{ $alt }}">
-{{- end }}
-
-{{- define "validate-arg-count" }}
-  {{- $msg := "When using the %q filter, the %q shortcode requires an args parameter with %d %s. See %s" }}
-  {{- if lt (len .args) .argsRequired }}
-    {{- $text := "values" }}
-    {{- if eq 1 .argsRequired }}
-      {{- $text = "value" }}
-    {{- end }}
-    {{- errorf $msg .filter .name .argsRequired $text .position }}
-  {{- end }}
-{{- end }}
-
-{{- define "validate-arg-value" }}
-  {{- $msg := "The %q argument passed to the %q shortcode is invalid. Expected a value in the range [%v,%v], but received %v. See %s" }}
-  {{- if or (lt .argValue .min) (gt .argValue .max) }}
-    {{- errorf $msg .argName .name .min .max .argValue .position }}
-  {{- end }}
-{{- end }}
-
-{{- define "partials/inline/get-resource.html" }}
-  {{- $r := "" }}
-  {{- $u := urls.Parse .src }}
-  {{- $msg := "The %q shortcode was unable to resolve %s. See %s" }}
-  {{- if $u.IsAbs }}
-    {{- with try (resources.GetRemote $u.String) }}
-      {{- with .Err }}
-        {{- errorf "%s" . }}
-      {{- else with .Value }}
-        {{- /* This is a remote resource. */}}
-        {{- $r = . }}
-      {{- else }}
-        {{- errorf $msg $.name $u.String $.position }}
-      {{- end }}
-    {{- end }}
-  {{- else }}
-    {{- with .page.Resources.Get (strings.TrimPrefix "./" $u.Path) }}
-      {{- /* This is a page resource. */}}
-      {{- $r = . }}
-    {{- else }}
-      {{- with resources.Get $u.Path }}
-        {{- /* This is a global resource. */}}
-        {{- $r = . }}
-      {{- else }}
-        {{- errorf $msg $.name $u.Path $.position }}
-      {{- end }}
-    {{- end }}
-  {{- end }}
-  {{- return $r }}
-{{- end -}}
diff --git a/layouts/shortcodes/imgproc.html b/layouts/shortcodes/imgproc.html
deleted file mode 100644 (file)
index fee4852..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{- /*
-Renders the given image using the given process specification.
-
-@param {string} path The path to the image, either a page resource or a global resource.
-@param {string} spec The image processing specification.
-@param {string} alt The alt attribute of the img element.
-
-@example {{< imgproc path="sunset.jpg" spec="resize 300x" alt="A sunset" >}}
-*/ -}}
-{{/* prettier-ignore-end */ -}}
-{{- with $.Get "path" }}
-  {{- with $i := or ($.Page.Resources.Get .) (resources.Get .) }}
-    {{- with $spec := $.Get "spec" }}
-      {{- with $i.Process . }}
-        <figure>
-          <img
-            src="{{ .RelPermalink }}"
-            width="{{ .Width }}"
-            height="{{ .Height }}"
-            alt="{{ $.Get `alt` }}">
-          <figcaption class="not-prose text-sm">
-            {{- with $.Inner }}
-              {{ . }}
-            {{- else }}
-              {{ $spec }}
-            {{- end }}
-          </figcaption>
-        </figure>
-      {{- end }}
-    {{- else }}
-      {{- errorf "The %q shortcode requires a 'spec' argument containing the image processing specification. See %s" $.Name $.Position }}
-    {{- end }}
-  {{- else }}
-    {{- errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position }}
-  {{- end }}
-{{- else }}
-  {{- errorf "The %q shortcode requires a 'path' argument indicating the image path. The image must be a page resource or a global resource. See %s" $.Name $.Position }}
-{{- end }}
diff --git a/layouts/shortcodes/include.html b/layouts/shortcodes/include.html
deleted file mode 100644 (file)
index 81b0c1d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{- /*
-Renders the page using the RenderShortcode method on the Page object.
-
-You must call this shortcode using the {{% %}} notation.
-
-@param {string} (positional parameter 0) The path to the page, relative to the content directory.
-
-@example {{% include "functions/_common/glob-patterns" %}}
-*/ -}}
-{{/* prettier-ignore-end */ -}}
-{{- with .Get 0 }}
-  {{- with or ($.Page.GetPage .) (site.GetPage .) }}
-    {{- .RenderShortcodes }}
-  {{- else }}
-    {{- errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position }}
-  {{- end }}
-{{- else }}
-  {{- errorf "The %q shortcode requires a positional parameter indicating the path of the file to include. See %s" .Name .Position }}
-{{- end }}
diff --git a/layouts/shortcodes/list-pages-in-section.html b/layouts/shortcodes/list-pages-in-section.html
deleted file mode 100644 (file)
index f6dfe72..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-{{- /*
-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.
-
-Filters are defined in the data directory, in the file named page_filters. Each
-filter is an array of paths to a file, relative to the root of the content
-directory. Hugo will throw an error if the specified filter does not exist, or
-if any of the pages in the filter do not exist.
-
-@param {string} path The path to the section.
-@param {string} [filter=""] The name of filter list.
-@param {string} [filterType=""] The type of filter, either include or exclude.
-@param {string} [titlePrefix=""] The string to prepend to the link title.
-
-@example {{< list-pages-in-section path=/methods/resources >}}
-@example {{< list-pages-in-section path=/functions/images filter=some_filter filterType=exclude >}}
-@example {{< list-pages-in-section path=/functions/images filter=some_filter filterType=exclude titlePrefix=foo >}}
-*/}}
-
-{{/* Initialize. */}}
-{{ $filter := or "" (.Get "filter" | lower) }}
-{{ $filterType := or (.Get "filterType") "none" | lower }}
-{{ $filteredPages := slice }}
-{{ $titlePrefix := or (.Get "titlePrefix") "" }}
-
-{{/* Build slice of filtered pages. */}}
-{{ with $filter }}
-  {{ with index site.Data.page_filters . }}
-    {{ range . }}
-      {{ with site.GetPage . }}
-        {{ $filteredPages = $filteredPages | append . }}
-      {{ else }}
-        {{ errorf "The %q shortcode was unable to find %q as specified in the page_filters data file. See %s" $.Name . $.Position }}
-      {{ end }}
-    {{ end }}
-  {{ else }}
-    {{ errorf "The %q shortcode was unable to find the %q filter in the page_filters data file. See %s" $.Name . $.Position }}
-  {{ end }}
-{{ end }}
-
-{{/* Render. */}}
-{{ with $sectionPath := .Get "path" }}
-  {{ with site.GetPage . }}
-    {{ with .RegularPages }}
-        {{ range $page := .ByTitle }}
-          {{ if or
-            (and (eq $filterType "include") (in $filteredPages $page))
-            (and (eq $filterType "exclude") (not (in $filteredPages $page)))
-            (eq $filterType "none")
-          }}
-            {{ $linkTitle := .LinkTitle }}
-            {{ with $titlePrefix }}
-              {{ $linkTitle = printf "%s%s" . $linkTitle }}
-            {{ end }}
-[{{ $linkTitle }}]({{ $page.RelPermalink }}){{/* Do not indent. */}}
-: {{ $page.Description }}{{/* Do not indent. */}}
-          {{ end }}
-        {{ end }}
-    {{ else }}
-      {{ warnf "The %q shortcode found no pages in the %q section. See %s" $.Name $sectionPath $.Position }}
-    {{ end }}
-  {{ else }}
-    {{ errorf "The %q shortcode was unable to find %q. See %s" $.Name $sectionPath $.Position }}
-  {{ end }}
-{{ else }}
-  {{ errorf "The %q shortcode requires a 'path' parameter indicating the path to the section. See %s" $.Name $.Position }}
-{{ end }}
diff --git a/layouts/shortcodes/module-mounts-note.html b/layouts/shortcodes/module-mounts-note.html
deleted file mode 100644 (file)
index ba89abc..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-For a more flexible approach to configuring this directory, consult the section
-on [module mounts](/configuration/module/#mounts).
diff --git a/layouts/shortcodes/new-in.html b/layouts/shortcodes/new-in.html
deleted file mode 100644 (file)
index 955d0a7..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{- /*
-Renders a callout or badge indicating the version in which a feature was added.
-
-To render a callout, include descriptive text between the opening and closing
-tags. To render a badge,omit the descriptive text and call the shortcode with a
-self-closing tag.
-
-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} 0 The semantic version string, with or without a leading v.
-
-@example  {{< new-in 0.100.0 />}}
-
-@example  {{{< new-in 0.100.0 >}}
-          Some descriptive text here.
-          {{< /new-in >}}
-*/ -}}
-{{/* prettier-ignore-end */ -}}
-{{- $majorVersionDiffThreshold := 0 }}
-{{- $minorVersionDiffThreshold := 30 }}
-{{- $displayExpirationWarning := true }}
-
-{{- with $version := .Get 0 | strings.TrimLeft "vV" }}
-  {{- $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 }}
-    {{- $href := printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}
-    {{- with $.Inner }}
-      {{- $inner := strings.TrimSpace . }}
-      {{- $text := printf "New in [v%s](%s)\n\n%s" $version $href $inner | $.Page.RenderString (dict "display" "block") }}
-      {{ partial "layouts/blocks/alert.html" (dict
-        "color" "green"
-        "icon" "exclamation"
-        "text" $text
-        )
-      }}
-    {{- else }}
-      <span
-        class="not-prose inline-flex items-center px-2 mr-1 rounded text-sm font-medium bg-green-200 dark:bg-green-400 fill-green-600">
-        <svg class="mr-1.5 h-2 w-2" viewBox="0 0 8 8">
-          <circle cx="4" cy="4" r="3" />
-        </svg>
-        <a
-          class="text-green-800 dark:text-black hover:text-green-600 no-underline"
-          href="{{ $href }}"
-          target="_blank">
-          New in
-          v{{ $version }}
-        </a>
-      </span>
-    {{- end }}
-  {{- end }}
-{{- else }}
-  {{- errorf "The %q shortcode requires a single positional parameter indicating version. See %s" .Name .Position }}
-{{- end }}
diff --git a/layouts/shortcodes/per-lang-config-keys.html b/layouts/shortcodes/per-lang-config-keys.html
deleted file mode 100644 (file)
index f6090d5..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{- /*
-Renders a responsive grid of the configuration keys that can be defined
-separately for each language.
-*/ -}}
-{{/* prettier-ignore-end */ -}}
-{{- $siteConfigKeys := slice
-  (dict "baseURL" "/configuration/all/#baseurl")
-  (dict "buildDrafts" "/configuration/all/#builddrafts")
-  (dict "buildExpired" "/configuration/all/#buildexpired")
-  (dict "buildFuture" "/configuration/all/#buildfuture")
-  (dict "canonifyURLs" "/configuration/all/#canonifyurls")
-  (dict "capitalizeListTitles" "/configuration/all/#capitalizelisttitles")
-  (dict "contentDir" "/configuration/all/#contentdir")
-  (dict "copyright" "/configuration/all/#copyright")
-  (dict "disableAliases" "/configuration/all/#disablealiases")
-  (dict "disableHugoGeneratorInject" "/configuration/all/#disableHugogeneratorinject")
-  (dict "disableKinds" "/configuration/all/#disableKinds")
-  (dict "disableLiveReload" "/configuration/all/#disablelivereload")
-  (dict "disablePathToLower" "/configuration/all/#disablepathtolower")
-  (dict "enableEmoji " "/configuration/all/#enableemoji")
-  (dict "frontmatter" "/configuration/front-matter/")
-  (dict "hasCJKLanguage" "/configuration/all/#hascjklanguage")
-  (dict "languageCode" "/configuration/all/#languagecode")
-  (dict "mainSections" "/configuration/all/#mainsections")
-  (dict "markup" "/configuration/markup/")
-  (dict "mediaTypes" "/configuration/media-types/")
-  (dict "menus" "/configuration/menus/")
-  (dict "outputFormats" "/configuration/output-formats")
-  (dict "outputs" "/configuration/outputs/")
-  (dict "page" "/configuration/page/")
-  (dict "pagination" "/configuration/pagination/")
-  (dict "params" "/configuration/params/")
-  (dict "permalinks" "/configuration/permalinks/")
-  (dict "pluralizeListTitles" "/configuration/all/#pluralizelisttitles")
-  (dict "privacy" "/configuration/privacy/")
-  (dict "refLinksErrorLevel" "/configuration/all/#reflinkserrorlevel")
-  (dict "refLinksNotFoundURL" "/configuration/all/#reflinksnotfoundurl")
-  (dict "related" "/configuration/related-content/")
-  (dict "relativeURLs" "/configuration/all/#relativeurls")
-  (dict "removePathAccents" "/configuration/all/#removepathaccents")
-  (dict "renderSegments" "/configuration/all/#rendersegments")
-  (dict "sectionPagesMenu" "/configuration/all/#sectionpagesmenu")
-  (dict "security" "/configuration/security/")
-  (dict "services" "/configuration/services/")
-  (dict "sitemap" "/configuration/sitemap/")
-  (dict "staticDir" "/configuration/all/#staticdir")
-  (dict "summaryLength" "/configuration/all/#summarylength")
-  (dict "taxonomies" "/configuration/taxonomies/")
-  (dict "timeZone" "/configuration/all/#timezone")
-  (dict "title" "/configuration/all/#title")
-  (dict "titleCaseStyle" "/configuration/all/#titlecasestyle")
-}}
-
-{{- $a := len $siteConfigKeys }}
-{{- $b := math.Ceil (div $a 2.) }}
-{{- $c := math.Ceil (div $a 3.) }}
-
-
-<div
-  class="grid grid-flow-col grid-rows-{{ $a }} sm:grid-rows-{{ $b }} md:grid-rows-{{ $c }} gap-1">
-  {{- range $siteConfigKeys }}
-    {{ range $k, $v := . }}
-      {{ $u := urls.Parse $v }}
-      {{ if not (site.GetPage $u.Path) }}
-        {{ errorf "The %q shorcode was unable to find %s. See %s." $.Name $u.Path $.Position }}
-      {{ end }}
-      <a href="{{ $v | relLangURL }}"><code>{{ $k }}</code></a>
-    {{ end }}
-  {{- end }}
-</div>
diff --git a/layouts/shortcodes/quick-reference.html b/layouts/shortcodes/quick-reference.html
deleted file mode 100644 (file)
index 0ac5440..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-{{- /*
-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.
-
-@example {{% quick-reference section="/functions" %}}
-*/ -}}
-{{ $section := "" }}
-{{ with .Get "section" }}
-  {{ $section = . }}
-{{ else }}
-  {{ errorf "The %q shortcode requires a 'section' parameter. See %s" .Name .Position }}
-{{ end }}
-
-{{ with site.GetPage $section }}
-  {{ range .Sections }}
-## {{ .LinkTitle }}{{/* Do not indent. */}}
-{{ .Description }}{{/* Do not indent. */}}
-    {{ .Content }}
-    {{ with .Pages }}
-      {{ range . }}
-[{{ .LinkTitle }}]({{ .RelPermalink }}){{/* Do not indent. */}}
-: {{ .Description }}{{/* Do not indent. */}}
-      {{ end }}
-    {{ end }}
-  {{ end }}
-{{ else }}
-  {{ errorf "The %q shortcodes was unable to find the %q section. See %s" .Name $section .Position }}
-{{ end }}
diff --git a/layouts/shortcodes/root-configuration-keys.html b/layouts/shortcodes/root-configuration-keys.html
deleted file mode 100644 (file)
index 46a6e07..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-{{/* prettier-ignore-start */ -}}
-{{/*
-Renders a comma-separated list of links to the root key configuration pages.
-
-@example {{< root-configuration-keys >}}
-*/ -}}
-{{/* prettier-ignore-end */ -}}
-{{- /* Create scratch map of key:filename. */}}
-{{- $s := newScratch }}
-{{- range $k, $v := site.Data.docs.config }}
-  {{- if or (reflect.IsMap .) (reflect.IsSlice .) }}
-    {{- $s.Set $k ($k | humanize | anchorize) }}
-  {{- end }}
-{{- end }}
-
-{{/* Deprecated. */}}
-{{- $s.Delete "author" }}
-
-{{/* Use mounts instead. */}}
-{{- $s.Delete "staticDir" }}
-{{- $s.Delete "ignoreFiles" }}
-
-{{/* This key is "HTTPCache" not "httpCache". */}}
-{{- $s.Set "HTTPCache" "http-cache" }}
-
-{{/* This key is "frontmatter" not "frontMatter" */}}
-{{- $s.Set "frontmatter" "front-matter" }}
-
-{{/* The page title is "Related content" not "related". */}}
-{{- $s.Set "related" "related-content" }}
-
-{{/* It can be configured as bool or map; we want to show map. */}}
-{{- $s.Set "uglyURLs" "ugly-urls" }}
-
-{{- $links := slice }}
-{{- range $k, $v := $s.Values }}
-  {{- $path := printf "/configuration/%s" $v }}
-  {{- with site.GetPage $path }}
-    {{- $links = $links | append (printf "<a href=%q><code>%s</code></a>" .RelPermalink $k) }}
-  {{- else }}
-    {{- errorf "The %q shortcode was unable to find the page %s. See %s." $.Name $path $.Position }}
-  {{- end }}
-{{- end }}
-
-{{- delimit $links ", " ", and " | safeHTML -}}
diff --git a/layouts/shortcodes/syntax-highlighting-styles.html b/layouts/shortcodes/syntax-highlighting-styles.html
deleted file mode 100644 (file)
index 297849c..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-{{- /*
-Renders a gallery a Chroma syntax highlighting styles.
-
-@example {{% syntax-highlighting-styles %}}
-*/ -}}
-{{- $examples := slice }}
-
-{{- /* Example: css */}}
-{{- $example := dict "lang" "css" "code" `
-body {
-  font-size: 16px;  /* comment */
-}
-`}}
-{{- $examples = $examples | append $example }}
-
-{{- /* Example: html */}}
-{{- $example = dict "lang" "html" "code" `
-<a href="/about.html">Example</a>  <!-- comment -->
-`}}
-{{- $examples = $examples | append $example }}
-
-{{- /* Example: go-html-template */}}
-{{- $example = dict "lang" "go-html-template" "code" `
-{{ with $.Page.Params.content }}
-  {{ . | $.Page.RenderString }}  {{/* comment */}}
-{{ end }}
-`}}
-{{- $examples = $examples | append $example }}
-
-{{- /* Example: javascript */}}
-{{- $example = dict "lang" "javascript" "code" `
-if ([1,"one",2,"two"].includes(value)){
-  console.log("Number is either 1 or 2.");  // comment
-}
-`}}
-{{- $examples := $examples | append $example }}
-
-{{- /* Example: markdown */}}
-{{- $example = dict "lang" "markdown" "code" `
-{{< figure src="kitten.jpg" >}}
-[example](https://example.org "An example")  <!-- comment -->
-`}}
-{{- $examples := $examples | append $example }}
-
-{{- /* Example: toml */}}
-{{- $example = dict "lang" "toml" "code" `
-[params]
-bool = true  # comment
-string = 'foo'
-`}}
-{{- $examples := $examples | append $example }}
-
-{{- /* Render */}}
-{{- with site.Data.docs.chroma.styles }}
-  {{- range $style := . }}
-
-### {{ $style }} {class="!mt-7 !mb-6"}{{/* Do not indent. */}}
-
-    {{- range $examples }}
-
-{{ .lang }}{{/* Do not indent. */}}
-{class="text-sm !-mt-3 !-mb-5"}{{/* Do not indent. */}}
-
-```{{ .lang }} {noClasses=true style="{{ $style }}"}{{/* Do not indent. */}}
-{{- .code | safeHTML -}}{{/* Do not indent. */}}
-```{{/* Do not indent. */}}
-
-    {{- end }}
-  {{- end }}
-{{- end }}
diff --git a/layouts/single.html b/layouts/single.html
new file mode 100644 (file)
index 0000000..2e9e4f3
--- /dev/null
@@ -0,0 +1,80 @@
+{{ define "main" }}
+  {{ $ttop := debug.Timer "single" }}
+  <article class="max-w-5xl lg:max-w-3xl" id="article">
+    {{ partial "layouts/docsheader.html" . }}
+    <div class="content">
+      {{ with .Params.description }}
+        <div class="lead">
+          {{ . | markdownify }}
+        </div>
+      {{ end }}
+      {{ if .Params.show_publish_date }}
+        {{ with .PublishDate }}
+          <p
+            class="text-gray-500 dark:text-gray-400 text-sm/5 md:text-base/2 mb-2 sm:mb-4">
+            {{ partial "layouts/date.html" . }}
+          </p>
+        {{ end }}
+      {{ end }}
+      {{ $t := debug.Timer "single.categories" }}
+      {{ $categories := .GetTerms "categories" }}
+      {{ with $categories }}
+        <div class="mb-4 sm:mb-6 flex flex-wrap gap-2">
+          {{ range . }}
+            {{ $text := .LinkTitle }}
+            {{ $class := "" }}
+            {{ range (slice true false ) }}
+              {{ $color := partial "helpers/funcs/color-from-string.html" (dict "text" $text "dark" . "--single" "green" ) }}
+
+              {{ $prefix := "" }}
+              {{ if . }}
+                {{ $prefix = "dark:" }}
+              {{ end }}
+              {{ $class = printf "%sbg-%s-%d %stext-%s-%d border %sborder-%s-%d"
+                $prefix $color.color $color.shade1
+                $prefix $color.color $color.shade2
+                $prefix $color.color $color.shade3
+              }}
+            {{ end }}
+
+
+            <a
+              href="{{ .RelPermalink }}"
+              class="{{ $class }} text-xs h-auto tracking-widest uppercase font-light not-prose no-underline inline-block py-1 px-3 rounded-xl shadow-xs hover:opacity-80 hover:shadow-none">
+              {{ .LinkTitle }}
+            </a>
+          {{ end }}
+        </div>
+      {{ end }}
+      {{ $t.Stop }}
+
+      {{ if .Params.functions_and_methods.signatures }}
+        <div class="mb-4 not-prose">
+          {{- partial "docs/functions-signatures.html" . -}}
+          {{- partial "docs/functions-return-type.html" . -}}
+          {{- partial "docs/functions-aliases.html" . -}}
+        </div>
+      {{ end }}
+      {{ $t := debug.Timer "single.content" }}
+      {{ .Content }}
+      {{ $t.Stop }}
+      {{ $t := debug.Timer "single.page-edit" }}
+      {{ partial "layouts/page-edit.html" . }}
+      {{ $t.Stop }}
+    </div>
+  </article>
+  {{ $ttop.Stop }}
+{{ end }}
+
+{{ define "rightsidebar_content" }}
+  {{/* in-this-section.html depends on these being reneredc first. */}}
+  {{ $related := partial "layouts/related.html" . }}
+  {{ $toc := partial "layouts/toc.html" . }}
+  {{ if not .Params.hide_in_this_section }}
+    {{ partial "layouts/in-this-section.html" . }}
+  {{ end }}
+  {{ $related }}
+  {{ if $.Store.Get "hasToc" }}
+    {{ $toc }}
+  {{ end }}
+{{ end }}
index 67c146cad4b60137bd865d3b6b2be9b1f965e304..c24a32a60d90ff38ec9663a54f50200a5bc09870 100644 (file)
@@ -3,7 +3,7 @@
   command = "hugo --gc --minify"
 
   [build.environment]
-    HUGO_VERSION = "0.145.0"
+    HUGO_VERSION = "0.146.7"
 
 [context.production.environment]
   HUGO_ENV           = "production"
diff --git a/package.hugo.json b/package.hugo.json
new file mode 100644 (file)
index 0000000..24ffc7f
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "name": "hugoDocs",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "author": "",
+  "license": "",
+  "devDependencies": {
+    "@awmottaz/prettier-plugin-void-html": "~1.8.0",
+    "@tailwindcss/cli": "~4.1.0",
+    "@tailwindcss/typography": "~0.5.16",
+    "prettier": "~3.5.3",
+    "prettier-plugin-go-template": "~0.0.15",
+    "tailwindcss": "~4.1.0"
+  },
+  "dependencies": {
+    "@alpinejs/focus": "~3.14.9",
+    "@alpinejs/persist": "~3.14.9",
+    "@hotwired/turbo": "~8.0.13",
+    "alpinejs": "~3.14.9"
+  }
+}