]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 4 Dec 2023 14:24:01 +0000 (15:24 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 4 Dec 2023 14:24:01 +0000 (15:24 +0100)
763 files changed:
1  2 
docs/.cspell.json
docs/.github/workflows/codeql-analysis.yml
docs/.github/workflows/spellcheck.yml
docs/.github/workflows/super-linter.yml
docs/LICENSE.md
docs/README.md
docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_print.css
docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_right-sidebar.css
docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_shame.css
docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/main.css
docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-codeblock-mermaid.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-heading.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-link.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/page.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/index.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/index.rss.xml
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/maintenance/list.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/news/list.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/news/single.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/boxes-section-summaries.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/boxes-small-news.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/docs/functions-aliases.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/docs/functions-return-type.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/docs/functions-signatures.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/tweets.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/hooks/before-body-end.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/maintenance-pages-table.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-top.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/opengraph.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/twitter_cards.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/pagelayout.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/related.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/right-sidebar.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/chroma-lexers.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/code-toggle.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/code.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/datatable-filtered.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/datatable.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/deprecated-in.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/funcsig.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/gomodules-info.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/imgproc.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/include.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/list-pages-in-section.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/module-mounts-note.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/new-in.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/note.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/quick-reference.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/readfile.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/todo.html
docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/template-func/page.html
docs/_vendor/modules.txt
docs/archetypes/functions.md
docs/archetypes/methods.md
docs/archetypes/showcase/bio.md
docs/assets/images/examples/zion-national-park-grayscale.jpg
docs/assets/images/examples/zion-national-park.jpg
docs/assets/images/logos/logo-128x128.png
docs/assets/images/logos/logo-256x256.png
docs/assets/images/logos/logo-512x512.png
docs/assets/images/logos/logo-64x64.png
docs/assets/images/logos/logo-96x96.png
docs/config/_default/menus/menus.en.toml
docs/config/_default/params.toml
docs/content/en/about/benefits.md
docs/content/en/about/features.md
docs/content/en/about/hugo-and-gdpr.md
docs/content/en/about/license.md
docs/content/en/about/security-model.md
docs/content/en/about/what-is-hugo.md
docs/content/en/content-management/_common/_index.md
docs/content/en/content-management/_common/page-kinds.md
docs/content/en/content-management/_index.md
docs/content/en/content-management/archetypes.md
docs/content/en/content-management/build-options.md
docs/content/en/content-management/comments.md
docs/content/en/content-management/cross-references.md
docs/content/en/content-management/diagrams.md
docs/content/en/content-management/formats.md
docs/content/en/content-management/front-matter.md
docs/content/en/content-management/image-processing/index.md
docs/content/en/content-management/menus.md
docs/content/en/content-management/multilingual.md
docs/content/en/content-management/organization/index.md
docs/content/en/content-management/page-bundles.md
docs/content/en/content-management/page-resources.md
docs/content/en/content-management/related.md
docs/content/en/content-management/sections.md
docs/content/en/content-management/shortcodes.md
docs/content/en/content-management/static-files.md
docs/content/en/content-management/summaries.md
docs/content/en/content-management/syntax-highlighting.md
docs/content/en/content-management/taxonomies.md
docs/content/en/content-management/toc.md
docs/content/en/content-management/types.md
docs/content/en/content-management/urls.md
docs/content/en/contribute/_index.md
docs/content/en/contribute/development.md
docs/content/en/contribute/documentation.md
docs/content/en/contribute/themes.md
docs/content/en/documentation.md
docs/content/en/functions/_common/_index.md
docs/content/en/functions/_common/glob-patterns.md
docs/content/en/functions/_common/locales.md
docs/content/en/functions/_common/regular-expressions.md
docs/content/en/functions/_common/time-layout-string.md
docs/content/en/functions/_index.md
docs/content/en/functions/cast/ToFloat.md
docs/content/en/functions/cast/ToInt.md
docs/content/en/functions/cast/ToString.md
docs/content/en/functions/cast/_index.md
docs/content/en/functions/collections/After.md
docs/content/en/functions/collections/Append.md
docs/content/en/functions/collections/Apply.md
docs/content/en/functions/collections/Complement.md
docs/content/en/functions/collections/Delimit.md
docs/content/en/functions/collections/Dictionary.md
docs/content/en/functions/collections/First.md
docs/content/en/functions/collections/Group.md
docs/content/en/functions/collections/In.md
docs/content/en/functions/collections/IndexFunction.md
docs/content/en/functions/collections/Intersect.md
docs/content/en/functions/collections/IsSet.md
docs/content/en/functions/collections/KeyVals.md
docs/content/en/functions/collections/Last.md
docs/content/en/functions/collections/Merge.md
docs/content/en/functions/collections/NewScratch.md
docs/content/en/functions/collections/Querify.md
docs/content/en/functions/collections/Reverse.md
docs/content/en/functions/collections/Seq.md
docs/content/en/functions/collections/Shuffle.md
docs/content/en/functions/collections/Slice.md
docs/content/en/functions/collections/Sort.md
docs/content/en/functions/collections/SymDiff.md
docs/content/en/functions/collections/Union.md
docs/content/en/functions/collections/Uniq.md
docs/content/en/functions/collections/Where.md
docs/content/en/functions/collections/_index.md
docs/content/en/functions/compare/Conditional.md
docs/content/en/functions/compare/Default.md
docs/content/en/functions/compare/Eq.md
docs/content/en/functions/compare/Ge.md
docs/content/en/functions/compare/Gt.md
docs/content/en/functions/compare/Le.md
docs/content/en/functions/compare/Lt.md
docs/content/en/functions/compare/Ne.md
docs/content/en/functions/compare/_index.md
docs/content/en/functions/crypto/FNV32a.md
docs/content/en/functions/crypto/HMAC.md
docs/content/en/functions/crypto/MD5.md
docs/content/en/functions/crypto/SHA1.md
docs/content/en/functions/crypto/SHA256.md
docs/content/en/functions/crypto/_index.md
docs/content/en/functions/data/GetCSV.md
docs/content/en/functions/data/GetJSON.md
docs/content/en/functions/data/_index.md
docs/content/en/functions/debug/Dump.md
docs/content/en/functions/debug/Timer.md
docs/content/en/functions/debug/_index.md
docs/content/en/functions/diagrams/Goat.md
docs/content/en/functions/diagrams/_index.md
docs/content/en/functions/encoding/Base64Decode.md
docs/content/en/functions/encoding/Base64Encode.md
docs/content/en/functions/encoding/Jsonify.md
docs/content/en/functions/encoding/_index.md
docs/content/en/functions/fmt/Errorf.md
docs/content/en/functions/fmt/Erroridf.md
docs/content/en/functions/fmt/Print.md
docs/content/en/functions/fmt/Printf.md
docs/content/en/functions/fmt/Println.md
docs/content/en/functions/fmt/Warnf.md
docs/content/en/functions/fmt/_common/_index.md
docs/content/en/functions/fmt/_common/fmt-layout.md
docs/content/en/functions/fmt/_index.md
docs/content/en/functions/global/_index.md
docs/content/en/functions/global/page.md
docs/content/en/functions/global/site.md
docs/content/en/functions/go-template/_common/_index.md
docs/content/en/functions/go-template/_common/text-template.md
docs/content/en/functions/go-template/_common/truthy-falsy.md
docs/content/en/functions/go-template/_index.md
docs/content/en/functions/go-template/and.md
docs/content/en/functions/go-template/block.md
docs/content/en/functions/go-template/break.md
docs/content/en/functions/go-template/continue.md
docs/content/en/functions/go-template/define.md
docs/content/en/functions/go-template/else.md
docs/content/en/functions/go-template/end.md
docs/content/en/functions/go-template/if.md
docs/content/en/functions/go-template/len.md
docs/content/en/functions/go-template/not.md
docs/content/en/functions/go-template/or.md
docs/content/en/functions/go-template/range.md
docs/content/en/functions/go-template/return.md
docs/content/en/functions/go-template/template.md
docs/content/en/functions/go-template/urlquery.md
docs/content/en/functions/go-template/with.md
docs/content/en/functions/hugo/BuildDate.md
docs/content/en/functions/hugo/CommitHash.md
docs/content/en/functions/hugo/Deps.md
docs/content/en/functions/hugo/Environment.md
docs/content/en/functions/hugo/Generator.md
docs/content/en/functions/hugo/GoVersion.md
docs/content/en/functions/hugo/IsDevelopment.md
docs/content/en/functions/hugo/IsExtended.md
docs/content/en/functions/hugo/IsProduction.md
docs/content/en/functions/hugo/IsServer.md
docs/content/en/functions/hugo/Version.md
docs/content/en/functions/hugo/WorkingDir.md
docs/content/en/functions/hugo/_index.md
docs/content/en/functions/images/Brightness.md
docs/content/en/functions/images/ColorBalance.md
docs/content/en/functions/images/Colorize.md
docs/content/en/functions/images/Config.md
docs/content/en/functions/images/Contrast.md
docs/content/en/functions/images/Filter.md
docs/content/en/functions/images/Gamma.md
docs/content/en/functions/images/GaussianBlur.md
docs/content/en/functions/images/Grayscale.md
docs/content/en/functions/images/Hue.md
docs/content/en/functions/images/Invert.md
docs/content/en/functions/images/Opacity.md
docs/content/en/functions/images/Overlay.md
docs/content/en/functions/images/Padding.md
docs/content/en/functions/images/Pixelate.md
docs/content/en/functions/images/Process.md
docs/content/en/functions/images/Saturation.md
docs/content/en/functions/images/Sepia.md
docs/content/en/functions/images/Sigmoid.md
docs/content/en/functions/images/Text.md
docs/content/en/functions/images/UnsharpMask.md
docs/content/en/functions/images/_common/_index.md
docs/content/en/functions/images/_common/apply-image-filter.md
docs/content/en/functions/images/_index.md
docs/content/en/functions/inflect/Humanize.md
docs/content/en/functions/inflect/Pluralize.md
docs/content/en/functions/inflect/Singularize.md
docs/content/en/functions/inflect/_index.md
docs/content/en/functions/js/Build.md
docs/content/en/functions/js/_index.md
docs/content/en/functions/lang/FormatAccounting.md
docs/content/en/functions/lang/FormatCurrency.md
docs/content/en/functions/lang/FormatNumber.md
docs/content/en/functions/lang/FormatNumberCustom.md
docs/content/en/functions/lang/FormatPercent.md
docs/content/en/functions/lang/Merge.md
docs/content/en/functions/lang/Translate.md
docs/content/en/functions/lang/_index.md
docs/content/en/functions/math/Abs.md
docs/content/en/functions/math/Add.md
docs/content/en/functions/math/Ceil.md
docs/content/en/functions/math/Counter.md
docs/content/en/functions/math/Div.md
docs/content/en/functions/math/Floor.md
docs/content/en/functions/math/Log.md
docs/content/en/functions/math/Max.md
docs/content/en/functions/math/Min.md
docs/content/en/functions/math/Mod.md
docs/content/en/functions/math/ModBool.md
docs/content/en/functions/math/Mul.md
docs/content/en/functions/math/Pow.md
docs/content/en/functions/math/Product.md
docs/content/en/functions/math/Round.md
docs/content/en/functions/math/Sqrt.md
docs/content/en/functions/math/Sub.md
docs/content/en/functions/math/Sum.md
docs/content/en/functions/math/_index.md
docs/content/en/functions/openapi3/Unmarshal.md
docs/content/en/functions/openapi3/_index.md
docs/content/en/functions/os/FileExists.md
docs/content/en/functions/os/Getenv.md
docs/content/en/functions/os/ReadDir.md
docs/content/en/functions/os/ReadFile.md
docs/content/en/functions/os/Stat.md
docs/content/en/functions/os/_index.md
docs/content/en/functions/partials/Include.md
docs/content/en/functions/partials/IncludeCached.md
docs/content/en/functions/partials/_index.md
docs/content/en/functions/path/Base.md
docs/content/en/functions/path/BaseName.md
docs/content/en/functions/path/Clean.md
docs/content/en/functions/path/Dir.md
docs/content/en/functions/path/Ext.md
docs/content/en/functions/path/Join.md
docs/content/en/functions/path/Split.md
docs/content/en/functions/path/_index.md
docs/content/en/functions/reflect/IsMap.md
docs/content/en/functions/reflect/IsSlice.md
docs/content/en/functions/reflect/_index.md
docs/content/en/functions/resources/Babel.md
docs/content/en/functions/resources/ByType.md
docs/content/en/functions/resources/Concat.md
docs/content/en/functions/resources/Copy.md
docs/content/en/functions/resources/ExecuteAsTemplate.md
docs/content/en/functions/resources/Fingerprint.md
docs/content/en/functions/resources/FromString.md
docs/content/en/functions/resources/Get.md
docs/content/en/functions/resources/GetMatch.md
docs/content/en/functions/resources/GetRemote.md
docs/content/en/functions/resources/Match.md
docs/content/en/functions/resources/Minify.md
docs/content/en/functions/resources/PostCSS.md
docs/content/en/functions/resources/PostProcess.md
docs/content/en/functions/resources/ToCSS.md
docs/content/en/functions/resources/_common/_index.md
docs/content/en/functions/resources/_common/postcss-windows-warning.md
docs/content/en/functions/resources/_index.md
docs/content/en/functions/safe/CSS.md
docs/content/en/functions/safe/HTML.md
docs/content/en/functions/safe/HTMLAttr.md
docs/content/en/functions/safe/JS.md
docs/content/en/functions/safe/JSStr.md
docs/content/en/functions/safe/URL.md
docs/content/en/functions/safe/_index.md
docs/content/en/functions/strings/Chomp.md
docs/content/en/functions/strings/Contains.md
docs/content/en/functions/strings/ContainsAny.md
docs/content/en/functions/strings/ContainsNonSpace.md
docs/content/en/functions/strings/Count.md
docs/content/en/functions/strings/CountRunes.md
docs/content/en/functions/strings/CountWords.md
docs/content/en/functions/strings/FindRESubmatch.md
docs/content/en/functions/strings/FindRe.md
docs/content/en/functions/strings/FirstUpper.md
docs/content/en/functions/strings/HasPrefix.md
docs/content/en/functions/strings/HasSuffix.md
docs/content/en/functions/strings/Repeat.md
docs/content/en/functions/strings/Replace.md
docs/content/en/functions/strings/ReplaceRE.md
docs/content/en/functions/strings/RuneCount.md
docs/content/en/functions/strings/SliceString.md
docs/content/en/functions/strings/Split.md
docs/content/en/functions/strings/Substr.md
docs/content/en/functions/strings/Title.md
docs/content/en/functions/strings/ToLower.md
docs/content/en/functions/strings/ToUpper.md
docs/content/en/functions/strings/Trim.md
docs/content/en/functions/strings/TrimLeft.md
docs/content/en/functions/strings/TrimPrefix.md
docs/content/en/functions/strings/TrimRight.md
docs/content/en/functions/strings/TrimSuffix.md
docs/content/en/functions/strings/Truncate.md
docs/content/en/functions/strings/_index.md
docs/content/en/functions/templates/Exists.md
docs/content/en/functions/templates/_index.md
docs/content/en/functions/time/AsTime.md
docs/content/en/functions/time/Duration.md
docs/content/en/functions/time/Format.md
docs/content/en/functions/time/Now.md
docs/content/en/functions/time/ParseDuration.md
docs/content/en/functions/time/_common/_index.md
docs/content/en/functions/time/_common/parsable-date-time-strings.md
docs/content/en/functions/time/_index.md
docs/content/en/functions/transform/CanHighlight.md
docs/content/en/functions/transform/Emojify.md
docs/content/en/functions/transform/HTMLEscape.md
docs/content/en/functions/transform/HTMLUnescape.md
docs/content/en/functions/transform/Highlight.md
docs/content/en/functions/transform/HighlightCodeBlock.md
docs/content/en/functions/transform/Markdownify.md
docs/content/en/functions/transform/Plainify.md
docs/content/en/functions/transform/Remarshal.md
docs/content/en/functions/transform/Unmarshal.md
docs/content/en/functions/transform/_index.md
docs/content/en/functions/urls/AbsLangURL.md
docs/content/en/functions/urls/AbsURL.md
docs/content/en/functions/urls/Anchorize.md
docs/content/en/functions/urls/JoinPath.md
docs/content/en/functions/urls/Parse.md
docs/content/en/functions/urls/Ref.md
docs/content/en/functions/urls/RelLangURL.md
docs/content/en/functions/urls/RelRef.md
docs/content/en/functions/urls/RelURL.md
docs/content/en/functions/urls/URLize.md
docs/content/en/functions/urls/_common/_index.md
docs/content/en/functions/urls/_common/anchorize-vs-urlize.md
docs/content/en/functions/urls/_index.md
docs/content/en/getting-started/_index.md
docs/content/en/getting-started/configuration-markup.md
docs/content/en/getting-started/configuration.md
docs/content/en/getting-started/directory-structure.md
docs/content/en/getting-started/external-learning-resources/index.md
docs/content/en/getting-started/glossary.md
docs/content/en/getting-started/quick-start.md
docs/content/en/getting-started/usage.md
docs/content/en/hosting-and-deployment/_index.md
docs/content/en/hosting-and-deployment/deployment-with-rclone.md
docs/content/en/hosting-and-deployment/deployment-with-rsync.md
docs/content/en/hosting-and-deployment/hosting-on-21yunbox.md
docs/content/en/hosting-and-deployment/hosting-on-aws-amplify.md
docs/content/en/hosting-and-deployment/hosting-on-azure-static-web-apps.md
docs/content/en/hosting-and-deployment/hosting-on-cloudflare-pages.md
docs/content/en/hosting-and-deployment/hosting-on-firebase.md
docs/content/en/hosting-and-deployment/hosting-on-github/index.md
docs/content/en/hosting-and-deployment/hosting-on-gitlab.md
docs/content/en/hosting-and-deployment/hosting-on-keycdn.md
docs/content/en/hosting-and-deployment/hosting-on-netlify.md
docs/content/en/hosting-and-deployment/hosting-on-render.md
docs/content/en/hosting-and-deployment/hugo-deploy.md
docs/content/en/hugo-modules/_index.md
docs/content/en/hugo-modules/configuration.md
docs/content/en/hugo-modules/theme-components.md
docs/content/en/hugo-modules/use-modules.md
docs/content/en/hugo-pipes/_index.md
docs/content/en/hugo-pipes/babel.md
docs/content/en/hugo-pipes/bundling.md
docs/content/en/hugo-pipes/fingerprint.md
docs/content/en/hugo-pipes/introduction.md
docs/content/en/hugo-pipes/js.md
docs/content/en/hugo-pipes/minification.md
docs/content/en/hugo-pipes/postcss.md
docs/content/en/hugo-pipes/postprocess.md
docs/content/en/hugo-pipes/resource-from-string.md
docs/content/en/hugo-pipes/resource-from-template.md
docs/content/en/hugo-pipes/transpile-sass-to-css.md
docs/content/en/installation/_common/01-editions.md
docs/content/en/installation/_common/02-prerequisites.md
docs/content/en/installation/_common/03-prebuilt-binaries.md
docs/content/en/installation/_common/04-build-from-source.md
docs/content/en/installation/_common/_index.md
docs/content/en/installation/_common/homebrew.md
docs/content/en/installation/_index.md
docs/content/en/installation/bsd.md
docs/content/en/installation/linux.md
docs/content/en/installation/macos.md
docs/content/en/installation/windows.md
docs/content/en/maintenance/_index.md
docs/content/en/methods/_common/_index.md
docs/content/en/methods/_common/next-prev-on-page-vs-next-prev-on-pages.md
docs/content/en/methods/_index.md
docs/content/en/methods/duration/Abs.md
docs/content/en/methods/duration/Hours.md
docs/content/en/methods/duration/Microseconds.md
docs/content/en/methods/duration/Milliseconds.md
docs/content/en/methods/duration/Minutes.md
docs/content/en/methods/duration/Nanoseconds.md
docs/content/en/methods/duration/Round.md
docs/content/en/methods/duration/Seconds.md
docs/content/en/methods/duration/Truncate.md
docs/content/en/methods/duration/_index.md
docs/content/en/methods/menu-entry/Children.md
docs/content/en/methods/menu-entry/HasChildren.md
docs/content/en/methods/menu-entry/Identifier.md
docs/content/en/methods/menu-entry/KeyName.md
docs/content/en/methods/menu-entry/Menu.md
docs/content/en/methods/menu-entry/Name.md
docs/content/en/methods/menu-entry/Page.md
docs/content/en/methods/menu-entry/Params.md
docs/content/en/methods/menu-entry/Parent.md
docs/content/en/methods/menu-entry/Post.md
docs/content/en/methods/menu-entry/Pre.md
docs/content/en/methods/menu-entry/Title.md
docs/content/en/methods/menu-entry/URL.md
docs/content/en/methods/menu-entry/Weight.md
docs/content/en/methods/menu-entry/_common/_index.md
docs/content/en/methods/menu-entry/_common/pre-post.md
docs/content/en/methods/menu-entry/_index.md
docs/content/en/methods/menu/ByName.md
docs/content/en/methods/menu/ByWeight.md
docs/content/en/methods/menu/Limit.md
docs/content/en/methods/menu/Reverse.md
docs/content/en/methods/menu/_index.md
docs/content/en/methods/page/Aliases.md
docs/content/en/methods/page/AllTranslations.md
docs/content/en/methods/page/AlternativeOutputFormats.md
docs/content/en/methods/page/Ancestors.md
docs/content/en/methods/page/BundleType.md
docs/content/en/methods/page/CodeOwners.md
docs/content/en/methods/page/Content.md
docs/content/en/methods/page/CurrentSection.md
docs/content/en/methods/page/Data.md
docs/content/en/methods/page/Date.md
docs/content/en/methods/page/Description.md
docs/content/en/methods/page/Draft.md
docs/content/en/methods/page/Eq.md
docs/content/en/methods/page/ExpiryDate.md
docs/content/en/methods/page/File.md
docs/content/en/methods/page/FirstSection.md
docs/content/en/methods/page/Fragments.md
docs/content/en/methods/page/FuzzyWordCount.md
docs/content/en/methods/page/GetPage.md
docs/content/en/methods/page/GetTerms.md
docs/content/en/methods/page/GitInfo.md
docs/content/en/methods/page/HasMenuCurrent.md
docs/content/en/methods/page/HasShortcode.md
docs/content/en/methods/page/HeadingsFiltered.md
docs/content/en/methods/page/InSection.md
docs/content/en/methods/page/IsAncestor.md
docs/content/en/methods/page/IsDescendant.md
docs/content/en/methods/page/IsHome.md
docs/content/en/methods/page/IsMenuCurrent.md
docs/content/en/methods/page/IsNode.md
docs/content/en/methods/page/IsPage.md
docs/content/en/methods/page/IsSection.md
docs/content/en/methods/page/IsTranslated.md
docs/content/en/methods/page/Keywords.md
docs/content/en/methods/page/Kind.md
docs/content/en/methods/page/Language.md
docs/content/en/methods/page/Lastmod.md
docs/content/en/methods/page/Layout.md
docs/content/en/methods/page/Len.md
docs/content/en/methods/page/LinkTitle.md
docs/content/en/methods/page/Next.md
docs/content/en/methods/page/NextInSection.md
docs/content/en/methods/page/OutputFormats.md
docs/content/en/methods/page/Page.md
docs/content/en/methods/page/Pages.md
docs/content/en/methods/page/Paginate.md
docs/content/en/methods/page/Paginator.md
docs/content/en/methods/page/Param.md
docs/content/en/methods/page/Params.md
docs/content/en/methods/page/Parent.md
docs/content/en/methods/page/Permalink.md
docs/content/en/methods/page/Plain.md
docs/content/en/methods/page/PlainWords.md
docs/content/en/methods/page/Prev.md
docs/content/en/methods/page/PrevInSection.md
docs/content/en/methods/page/PublishDate.md
docs/content/en/methods/page/RawContent.md
docs/content/en/methods/page/ReadingTime.md
docs/content/en/methods/page/Ref.md
docs/content/en/methods/page/RegularPages.md
docs/content/en/methods/page/RegularPagesRecursive.md
docs/content/en/methods/page/RelPermalink.md
docs/content/en/methods/page/RelRef.md
docs/content/en/methods/page/Render.md
docs/content/en/methods/page/RenderShortcodes.md
docs/content/en/methods/page/RenderString.md
docs/content/en/methods/page/Resources.md
docs/content/en/methods/page/Scratch.md
docs/content/en/methods/page/Section.md
docs/content/en/methods/page/Sections.md
docs/content/en/methods/page/Site.md
docs/content/en/methods/page/Sitemap.md
docs/content/en/methods/page/Sites.md
docs/content/en/methods/page/Slug.md
docs/content/en/methods/page/Store.md
docs/content/en/methods/page/Summary.md
docs/content/en/methods/page/TableOfContents.md
docs/content/en/methods/page/Title.md
docs/content/en/methods/page/TranslationKey.md
docs/content/en/methods/page/Translations.md
docs/content/en/methods/page/Truncated.md
docs/content/en/methods/page/Type.md
docs/content/en/methods/page/Weight.md
docs/content/en/methods/page/WordCount.md
docs/content/en/methods/page/_common/_index.md
docs/content/en/methods/page/_common/definition-of-section.md
docs/content/en/methods/page/_common/output-format-definition.md
docs/content/en/methods/page/_common/output-format-methods.md
docs/content/en/methods/page/_common/scratch-methods.md
docs/content/en/methods/page/_index.md
docs/content/en/methods/pages/ByDate.md
docs/content/en/methods/pages/ByExpiryDate.md
docs/content/en/methods/pages/ByLanguage.md
docs/content/en/methods/pages/ByLastmod.md
docs/content/en/methods/pages/ByLength.md
docs/content/en/methods/pages/ByLinkTitle.md
docs/content/en/methods/pages/ByParam.md
docs/content/en/methods/pages/ByPublishDate.md
docs/content/en/methods/pages/ByTitle.md
docs/content/en/methods/pages/ByWeight.md
docs/content/en/methods/pages/GroupBy.md
docs/content/en/methods/pages/GroupByDate.md
docs/content/en/methods/pages/GroupByExpiryDate.md
docs/content/en/methods/pages/GroupByLastmod.md
docs/content/en/methods/pages/GroupByParam.md
docs/content/en/methods/pages/GroupByParamDate.md
docs/content/en/methods/pages/GroupByPublishDate.md
docs/content/en/methods/pages/Len.md
docs/content/en/methods/pages/Limit.md
docs/content/en/methods/pages/Next.md
docs/content/en/methods/pages/Prev.md
docs/content/en/methods/pages/Related.md
docs/content/en/methods/pages/Reverse.md
docs/content/en/methods/pages/_common/_index.md
docs/content/en/methods/pages/_common/group-sort-order.md
docs/content/en/methods/pages/_index.md
docs/content/en/methods/resource/Colors.md
docs/content/en/methods/resource/Content.md
docs/content/en/methods/resource/Crop.md
docs/content/en/methods/resource/Data.md
docs/content/en/methods/resource/Err.md
docs/content/en/methods/resource/Exif.md
docs/content/en/methods/resource/Fill.md
docs/content/en/methods/resource/Filter.md
docs/content/en/methods/resource/Fit.md
docs/content/en/methods/resource/Height.md
docs/content/en/methods/resource/Key.md
docs/content/en/methods/resource/MediaType.md
docs/content/en/methods/resource/Name.md
docs/content/en/methods/resource/Params.md
docs/content/en/methods/resource/Permalink.md
docs/content/en/methods/resource/Process.md
docs/content/en/methods/resource/Publish.md
docs/content/en/methods/resource/RelPermalink.md
docs/content/en/methods/resource/Resize.md
docs/content/en/methods/resource/ResourceType.md
docs/content/en/methods/resource/Title.md
docs/content/en/methods/resource/Width.md
docs/content/en/methods/resource/_common/_index.md
docs/content/en/methods/resource/_common/global-page-remote-resources.md
docs/content/en/methods/resource/_common/processing-spec.md
docs/content/en/methods/resource/_index.md
docs/content/en/methods/shortcode/Get.md
docs/content/en/methods/shortcode/Inner.md
docs/content/en/methods/shortcode/InnerDeindent.md
docs/content/en/methods/shortcode/IsNamedParams.md
docs/content/en/methods/shortcode/Name.md
docs/content/en/methods/shortcode/Ordinal.md
docs/content/en/methods/shortcode/Page.md
docs/content/en/methods/shortcode/Params.md
docs/content/en/methods/shortcode/Parent.md
docs/content/en/methods/shortcode/Position.md
docs/content/en/methods/shortcode/Ref.md
docs/content/en/methods/shortcode/RelRef.md
docs/content/en/methods/shortcode/Scratch.md
docs/content/en/methods/shortcode/Site.md
docs/content/en/methods/shortcode/_index.md
docs/content/en/methods/site/AllPages.md
docs/content/en/methods/site/BaseURL.md
docs/content/en/methods/site/BuildDrafts.md
docs/content/en/methods/site/Config.md
docs/content/en/methods/site/Copyright.md
docs/content/en/methods/site/Data.md
docs/content/en/methods/site/DisqusShortname.md
docs/content/en/methods/site/GetPage.md
docs/content/en/methods/site/GoogleAnalytics.md
docs/content/en/methods/site/Home.md
docs/content/en/methods/site/IsDevelopment.md
docs/content/en/methods/site/IsMultiLingual.md
docs/content/en/methods/site/IsServer.md
docs/content/en/methods/site/Language.md
docs/content/en/methods/site/LanguagePrefix.md
docs/content/en/methods/site/Languages.md
docs/content/en/methods/site/LastChange.md
docs/content/en/methods/site/MainSections.md
docs/content/en/methods/site/Menus.md
docs/content/en/methods/site/Pages.md
docs/content/en/methods/site/Param.md
docs/content/en/methods/site/Params.md
docs/content/en/methods/site/RegularPages.md
docs/content/en/methods/site/Sections.md
docs/content/en/methods/site/Sites.md
docs/content/en/methods/site/Taxonomies.md
docs/content/en/methods/site/Title.md
docs/content/en/methods/site/_index.md
docs/content/en/methods/taxonomy/Alphabetical.md
docs/content/en/methods/taxonomy/ByCount.md
docs/content/en/methods/taxonomy/Count.md
docs/content/en/methods/taxonomy/Get.md
docs/content/en/methods/taxonomy/_common/_index.md
docs/content/en/methods/taxonomy/_common/get-a-taxonomy-object.md
docs/content/en/methods/taxonomy/_common/ordered-taxonomy-element-methods.md
docs/content/en/methods/taxonomy/_index.md
docs/content/en/methods/time/Add.md
docs/content/en/methods/time/AddDate.md
docs/content/en/methods/time/After.md
docs/content/en/methods/time/Before.md
docs/content/en/methods/time/Day.md
docs/content/en/methods/time/Equal.md
docs/content/en/methods/time/Format.md
docs/content/en/methods/time/Hour.md
docs/content/en/methods/time/IsDST.md
docs/content/en/methods/time/IsZero.md
docs/content/en/methods/time/Local.md
docs/content/en/methods/time/Minute.md
docs/content/en/methods/time/Month.md
docs/content/en/methods/time/Nanosecond.md
docs/content/en/methods/time/Second.md
docs/content/en/methods/time/Sub.md
docs/content/en/methods/time/UTC.md
docs/content/en/methods/time/Unix.md
docs/content/en/methods/time/UnixMicro.md
docs/content/en/methods/time/UnixMilli.md
docs/content/en/methods/time/UnixNano.md
docs/content/en/methods/time/Weekday.md
docs/content/en/methods/time/Year.md
docs/content/en/methods/time/YearDay.md
docs/content/en/methods/time/_index.md
docs/content/en/myshowcase/bio.md
docs/content/en/news/_index.md
docs/content/en/quick-reference/_index.md
docs/content/en/quick-reference/emojis.md
docs/content/en/quick-reference/functions.md
docs/content/en/quick-reference/methods.md
docs/content/en/quick-reference/page-collections.md
docs/content/en/showcase/1password-support/bio.md
docs/content/en/showcase/1password-support/index.md
docs/content/en/showcase/alora-labs/bio.md
docs/content/en/showcase/alora-labs/index.md
docs/content/en/showcase/ampio-help/index.md
docs/content/en/showcase/bypasscensorship/bio.md
docs/content/en/showcase/bypasscensorship/index.md
docs/content/en/showcase/digitalgov/index.md
docs/content/en/showcase/forestry/index.md
docs/content/en/showcase/godot-tutorials/index.md
docs/content/en/showcase/hartwell-insurance/index.md
docs/content/en/showcase/letsencrypt/index.md
docs/content/en/showcase/pharmaseal/index.md
docs/content/en/showcase/quiply-employee-communications-app/bio.md
docs/content/en/showcase/template/bio.md
docs/content/en/templates/404.md
docs/content/en/templates/_index.md
docs/content/en/templates/base.md
docs/content/en/templates/data-templates.md
docs/content/en/templates/files.md
docs/content/en/templates/homepage.md
docs/content/en/templates/internal.md
docs/content/en/templates/introduction.md
docs/content/en/templates/lists/index.md
docs/content/en/templates/lookup-order.md
docs/content/en/templates/menu-templates.md
docs/content/en/templates/output-formats.md
docs/content/en/templates/pagination.md
docs/content/en/templates/partials.md
docs/content/en/templates/render-hooks.md
docs/content/en/templates/robots.md
docs/content/en/templates/rss.md
docs/content/en/templates/section-templates.md
docs/content/en/templates/shortcode-templates.md
docs/content/en/templates/single-page-templates.md
docs/content/en/templates/sitemap-template.md
docs/content/en/templates/taxonomy-templates.md
docs/content/en/templates/views.md
docs/content/en/tools/_index.md
docs/content/en/tools/editors.md
docs/content/en/tools/front-ends.md
docs/content/en/tools/migrations.md
docs/content/en/tools/other.md
docs/content/en/tools/search.md
docs/content/en/troubleshooting/_index.md
docs/content/en/troubleshooting/audit/index.md
docs/content/en/troubleshooting/audit/screen-capture.png
docs/content/en/troubleshooting/deprecation.md
docs/content/en/troubleshooting/faq.md
docs/content/en/troubleshooting/inspection.md
docs/content/en/troubleshooting/logging.md
docs/content/en/troubleshooting/performance.md
docs/content/en/variables/_common/_index.md
docs/content/en/variables/_common/consistent-terminology.md
docs/content/en/variables/_index.md
docs/content/en/variables/file.md
docs/content/en/variables/git.md
docs/content/en/variables/menu-entry.md
docs/content/en/variables/page.md
docs/content/en/variables/pages.md
docs/content/en/variables/shortcode.md
docs/content/en/variables/site.md
docs/content/en/variables/taxonomy.md
docs/data/docs.yaml
docs/data/page_filters.yaml
docs/go.mod
docs/go.sum
docs/hugo.toml
docs/layouts/shortcodes/new-in.html
docs/netlify.toml

index 0958b76450a31efc599844405be298b5d28f31b6,0000000000000000000000000000000000000000..ae469d6461139d8e362d35023bef1b9acc59167e
mode 100644,000000..100644
--- /dev/null
@@@ -1,361 -1,0 +1,133 @@@
-     "aaabaab",
-     "aabb",
-     "aabba",
-     "aabbaa",
-     "aabbaabb",
-     "aabbaabbab",
-     "abbaa",
-     "abourget",
-     "absurl",
-     "adoc",
-     "algolia",
-     "allowfullscreen",
-     "ananke",
-     "anchorize",
-     "anthonyfok",
-     "asciidoctor",
-     "attrlink",
-     "azblob",
-     "baseof",
-     "bbaa",
-     "bcde",
-     "bcdef",
-     "beevelop",
-     "Bergevin",
-     "bibtex",
-     "Bjørn",
-     "blackfriday",
-     "blogue",
-     "bogem",
-     "Bootcamp",
-     "brlink",
-     "Brotli",
-     "Browsersync",
-     "canonicalization",
-     "canonify",
-     "Catmull",
-     "Catwoman",
-     "changefreq",
-     "Cheatsheet",
-     "choco",
-     "chromastyles",
-     "clockoon",
-     "Cloudinary",
-     "CNAME",
-     "Codecademy's",
-     "CODEOWNERS",
-     "Coen",
-     "Commento",
-     "Cond",
-     "contentdir",
-     "Contentful",
-     "Copr",
-     "copyrighthtml",
-     "corejs",
-     "countrunes",
-     "countwords",
-     "crossreferences",
-     "daftaupe",
-     "datatable",
-     "DATOCMS",
-     "debugconfig",
 +{
 +  "version": "0.2",
++  "allowCompoundWords": true,
++  "files": [
++    "**/*.md"
++  ],
++  "flagWords": [
++    "alot",
++    "hte",
++    "reccommend",
++    "seperate"
++  ],
++  "ignorePaths": [
++    "**/emojis.md",
++    "**/commands/*",
++    "**/showcase/*",
++    "**/tools/*"
++  ],
++  "ignoreRegExpList": [
++    "# cspell: ignore fenced code blocks",
++    "^(\\s*`{3,}).*[\\s\\S]*?^\\1",
++    "# cspell: ignore words joined with dot",
++    "\\w+\\.\\w+",
++    "# cspell: ignore strings within backticks",
++    "`.+`",
++    "# cspell: ignore strings within single quotes",
++    "'.+'",
++    "# cspell: ignore strings within double quotes",
++    "\".+\"",
++    "# cspell: ignore strings within brackets",
++    "\\[.+\\]",
++    "# cspell: ignore strings within parentheses",
++    "\\(.+\\)",
++    "# cspell: ignore words that begin with a slash",
++    "/\\w+",
++    "# cspell: ignore everything within action delimiters",
++    "\\{\\{.+\\}\\}",
++    "# cspell: ignore everything after a right arrow",
++    "\\s+→\\s+.+"
++  ],
++  "language": "en",
 +  "words": [
-     "Deindent",
-     "DELIM",
-     "dhersam",
-     "digitalcraftsman",
-     "Disqus",
-     "Dmdh",
-     "doas",
-     "dokuwiki",
-     "dpkg",
-     "DRING",
-     "Eiqc",
++    "antialiasing",
++    "codeowners",
++    "composability",
++    "configurators",
 +    "defang",
-     "embeddable",
-     "Emojify",
-     "Enwrite",
-     "eopkg",
-     "eparis",
-     "errorf",
-     "erroridf",
-     "esbuild",
-     "Evernote",
-     "Exif",
-     "exitwp",
-     "expirydate",
-     "Feminella",
-     "firstpost",
-     "Flickr",
-     "Formspree",
-     "fpath",
-     "Francia",
-     "freenode",
-     "frontmatter",
-     "funcs",
-     "funcsig",
-     "Garen",
-     "Garuda",
-     "gcloud",
-     "Getenv",
-     "getjson",
-     "getpage",
-     "Gitee",
-     "Gmfc",
-     "Goel",
-     "Gohugo",
-     "gohugoio",
-     "goldenbridge",
-     "Goldmark",
-     "gomodules",
-     "GOPATH",
-     "govendor",
-     "Gowans",
-     "Grayscale",
++    "deindent",
++    "downscale",
++    "downscaled",
++    "downscaling",
++    "exif",
++    "geolocalized",
++    "grayscale",
++    "marshal",
++    "marshaling",
++    "multihost",
++    "performantly",
++    "preconfigured",
++    "prerendering",
++    "redirection",
++    "redirections",
++    "shortcode",
++    "shortcodes",
++    "subexpression",
++    "subexpressions",
++    "suppressable",
++    "templating",
++    "transpile",
++    "transpiles",
++    "unmarshal",
++    "unmarshaling",
++    "# ----------------------------------------------------------------------",
++    "# cspell: ignore foreign language words",
++    "# ----------------------------------------------------------------------",
++    "bezpieczeństwo",
++    "dokumentation",
++    "libros",
++    "miesiąc",
++    "miesiąc",
++    "miesięcy",
++    "miesięcy",
++    "misérables",
++    "projekt",
++    "régime",
++    "# ----------------------------------------------------------------------",
++    "# cspell: ignore proper nouns",
++    "# ----------------------------------------------------------------------",
 +    "Eliott",
-     "Gruber",
-     "gtag",
-     "gvfs",
-     "hidecaption",
-     "hmac",
-     "Hokus",
-     "hola",
-     "hügó",
-     "hugodeps",
-     "hugodoc",
-     "Hugofy",
-     "hugolang",
-     "hugoversion",
-     "Hyas",
-     "Hyvor",
-     "iframes",
-     "ifttt",
-     "iife",
-     "imgproc",
-     "importr",
-     "IMWQ",
-     "indice",
-     "innershortcode",
-     "Intelli",
-     "interdoc",
-     "IPTC",
-     "ismenucurrent",
-     "Isset",
-     "Isso",
 +    "Gregor",
-     "JIRN",
-     "johnpatitucci",
-     "Joomla",
-     "JRBR",
-     "jsonify",
-     "Karmada",
-     "katex",
-     "keycdn",
-     "KEYVALS",
-     "kubernetes",
-     "Kubuntu",
-     "Lanczos",
-     "langformatnumber",
-     "lastmod",
-     "libwebp",
-     "linktitle",
-     "Lipi",
-     "lrwxr",
-     "Lubuntu",
-     "maingo",
-     "markdownified",
-     "markdownify",
-     "mathjax",
-     "mdhender",
-     "mdshortcode",
-     "MENUENTRY",
-     "mercredi",
-     "Milli",
-     "Mittwoch",
-     "mkdir",
-     "modh",
-     "monokai",
-     "Morling",
-     "mspowerpoint",
-     "Multihost",
-     "Muut",
-     "myclass",
-     "mydeployment",
-     "myindex",
-     "mylayout",
-     "mylogin",
-     "mypage",
-     "mypartials",
-     "mypost",
-     "mysite",
-     "myspa",
-     "mystyle",
-     "mytextpartial",
-     "mytheme",
-     "NDJSON",
-     "needsexample",
-     "Netravali",
-     "newparam",
-     "Nichlas",
-     "Nikhil",
-     "Nikola",
-     "Njjy",
-     "nlist",
-     "nobr",
-     "nocopy",
-     "Norsk",
-     "nosniff",
-     "NOSQL",
-     "notoc",
-     "novembre",
-     "numfmt",
-     "NUMWORKERMULTIPLIER",
-     "Obhu",
-     "octohug",
-     "Octopress",
-     "oldparam",
-     "onrender",
-     "opengraph",
-     "OWASP",
-     "Pandoc",
-     "partialcached",
 +    "Jaco",
-     "Patitucci",
-     "PCRE",
-     "peaceiris",
-     "Pedersen",
-     "Pekka",
-     "permalinkable",
-     "plainify",
-     "POSIX",
-     "postprocess",
-     "Poupin",
-     "prerender",
-     "println",
-     "Pritchard",
-     "publishdate",
-     "Pygments",
-     "qref",
-     "querify",
-     "QVOMC",
-     "Racic",
-     "Rclone",
-     "rdwatters",
-     "readfile",
-     "rebinded",
-     "recommendedby",
-     "REDIR",
-     "reftext",
-     "relatedfuncs",
-     "relref",
-     "relurl",
-     "remarkjs",
-     "rgba",
-     "Riku",
-     "rlimit",
-     "roboto",
-     "rssxml",
-     "rwxrwxrwx",
-     "RYUGV",
-     "safehtml",
-     "safejs",
++    "Noll",
 +    "Pastorius",
-     "schemaorg",
-     "setx",
-     "Shekhar",
-     "Shortcode",
-     "Shortcodes",
-     "signup",
-     "Silvola",
-     "Sindre",
-     "sitemapindex",
-     "sitemapxml",
-     "slugorfilename",
-     "Smartcrop",
-     "Sobre",
-     "Sprintf",
-     "Startseite",
-     "strconv",
 +    "Samsa",
-     "structs",
-     "subdir",
-     "svgs",
-     "symdiff",
-     "Talkyard",
-     "taxo",
-     "taxonomyname",
-     "tbody",
++    "# ----------------------------------------------------------------------",
++    "# cspell: ignore operating systems and software packages",
++    "# ----------------------------------------------------------------------",
++    "asciidoctor",
++    "brotli",
++    "corejs",
++    "disqus",
++    "doas",
++    "eopkg",
++    "gitee",
++    "goldmark",
++    "kubuntu",
++    "lubuntu",
++    "nosql",
++    "pandoc",
++    "pkgin",
++    "rclone",
++    "xubuntu",
++    "# ----------------------------------------------------------------------",
++    "# cspell: ignore miscellaneous",
++    "# ----------------------------------------------------------------------",
++    "dring",
++    "getenv",
++    "gohugo",
++    "inor",
++    "jdoe",
++    "milli",
++    "rgba",
++    "rsmith",
 +    "stringifier",
 +    "struct",
-     "testshortcodes",
-     "thead",
-     "Thinkful",
-     "Tknx",
-     "TLDR",
-     "TMPDIR",
 +    "tdewolff",
-     "TOCSS",
-     "todos",
-     "tojson",
-     "Tomango",
-     "topologix",
-     "Torikian",
-     "totoml",
-     "toyaml",
-     "twitteruser",
-     "Unmarshal",
-     "unpublishdate",
-     "Unsharp",
-     "urlize",
-     "urlset",
-     "utimestamp",
-     "vendored",
-     "vimrc",
-     "wanghc",
-     "Wappalyzer",
-     "warnf",
-     "webp",
-     "Wercker",
-     "wibble",
-     "wordcount",
-     "workson",
-     "Wowchemy",
-     "wpxr",
-     "Xbaabbab",
-     "Xubuntu",
-     "xvzf",
-     "yoyoyo",
-     "yunbox",
-     "Zgotmpl",
-     "Zorin",
-     "zzbbaabb",
-     "مدونتي"
-   ],
-   "language": "en,en-US,de,fr",
-   "allowCompoundWords": true,
-   "files": [
-     "**/*.md"
-   ],
-   "ignoreRegExpList": [
-     "<!-- prettier-ignore -->\\n(`{3,})\\w*\\n[\\s\\S]+?\\1",
-     "\\[(\\*{2})?@\\w+?\\1\\]",
-     "\\[`\\w+`\\]",
-     "ve{2,}r{2,}y",
-     "ve+r+y+long\\w*",
-     "\\/.*?\\/",
-     "\\_\\w+",
-     "\\#\\w+"
-   ],
-   "ignorePaths": [
-     ".cspell.json",
-     "**/node_modules/**",
-     "*.min.*",
-     "**/news/*",
-     "**/showcase/*"
-   ],
-   "useGitignore": true,
-   "enabled": true
++    "tjones",
 +    "toclevels",
++    "vals",
++    "xfeff",
++    "zgotmplz"
++  ]
 +}
index 30f98a000b4855df3f3471bda764abd4cfbe648b,0000000000000000000000000000000000000000..48555823e86f4373fb06d36ed544696c35b4743f
mode 100644,000000..100644
--- /dev/null
@@@ -1,26 -1,0 +1,26 @@@
-         uses: actions/checkout@v3
 +name: "CodeQL"
 +
 +on:
 +  schedule:
 +    - cron: "0 0 1 * *"
 +
 +jobs:
 +  analyze:
 +    name: Analyze
 +    runs-on: ubuntu-latest
 +    permissions:
 +      actions: read
 +      contents: read
 +      security-events: write
 +
 +    steps:
 +      - name: Checkout repository
++        uses: actions/checkout@v4
 +
 +      - name: Initialize CodeQL
 +        uses: github/codeql-action/init@v2
 +        with:
 +          languages: "javascript"
 +
 +      - name: Perform CodeQL Analysis
 +        uses: github/codeql-action/analyze@v2
index 594621604006a24393547aaa030ff2db8ed27d47,0000000000000000000000000000000000000000..a650f153c9ffd6cabac62df141095ab00fe6eed0
mode 100644,000000..100644
--- /dev/null
@@@ -1,21 -1,0 +1,22 @@@
- on: # rebuild any PRs and main branch changes
 +name: "Check spelling"
-   pull_request:
++on:
 +  push:
++  pull_request:
 +    branches-ignore:
 +      - "dependabot/**"
-       - uses: actions/checkout@v3
-       - uses: streetsidesoftware/cspell-action@v2
 +
 +permissions:
 +  contents: read
 +
 +jobs:
 +  spellcheck:
 +    runs-on: ubuntu-latest
 +    steps:
++      - uses: actions/checkout@v4
++      - uses: streetsidesoftware/cspell-action@v4
 +        with:
 +          check_dot_files: false
++          files: content/**/*.md
 +          incremental_files_only: true
 +          inline: warning
 +          strict: false
index efd206960961ea78586a92458bad982114f7f284,0000000000000000000000000000000000000000..b2a5cb6f1c763c2c9e2c4ceeabe477168ee4ea68
mode 100644,000000..100644
--- /dev/null
@@@ -1,41 -1,0 +1,41 @@@
-         uses: actions/checkout@v3
 +name: Super Linter
 +
 +on:
 +  workflow_dispatch:
 +
 +permissions:
 +  contents: read #  to fetch code (actions/checkout)
 +
 +jobs:
 +  build:
 +    permissions:
 +      contents: read #  to fetch code (actions/checkout)
 +      statuses: write #  to mark status of each linter run (github/super-linter/slim)
 +
 +    name: Lint Code Base
 +    runs-on: ubuntu-latest
 +    if: ${{ github.actor != 'dependabot[bot]' }}
 +
 +    steps:
 +      - name: Checkout Code
-         uses: github/super-linter/slim@v4
++        uses: actions/checkout@v4
 +
 +      - name: Lint Code Base
++        uses: super-linter/super-linter/slim@v5
 +        env:
 +          DEFAULT_BRANCH: master
 +          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 +          IGNORE_GITIGNORED_FILES: true
 +          LINTER_RULES_PATH: /
 +          LOG_LEVEL: NOTICE
 +          MARKDOWN_CONFIG_FILE: .markdownlint.yaml
 +          SUPPRESS_POSSUM: true
 +          VALIDATE_CSS: false
 +          VALIDATE_EDITORCONFIG: false
 +          VALIDATE_GITLEAKS: false
 +          VALIDATE_HTML: false
 +          VALIDATE_JAVASCRIPT_STANDARD: false
 +          VALIDATE_JSCPD: false
 +          VALIDATE_NATURAL_LANGUAGE: false
 +          VALIDATE_SHELL_SHFMT: false
 +          VALIDATE_XML: false
diff --cc docs/LICENSE.md
index b62a9b5ff786a107c55a0b4fd3b28507af6e5e9f,0000000000000000000000000000000000000000..b09cd7856d58590578ee1a4f3ad45d1310a97f87
mode 100644,000000..100644
--- /dev/null
@@@ -1,194 -1,0 +1,201 @@@
- ==============
- _Version 2.0, January 2004_
- _&lt;<http://www.apache.org/licenses/>&gt;_
- ### Terms and Conditions for use, reproduction, and distribution
- #### 1. Definitions
- “License” shall mean the terms and conditions for use, reproduction, and
- distribution as defined by Sections 1 through 9 of this document.
- “Licensor” shall mean the copyright owner or entity authorized by the copyright
- owner that is granting the License.
- “Legal Entity” shall mean the union of the acting entity and all other entities
- that control, are controlled by, or are under common control with that entity.
- For the purposes of this definition, “control” means **(i)** the power, direct or
- indirect, to cause the direction or management of such entity, whether by
- contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the
- outstanding shares, or **(iii)** beneficial ownership of such entity.
- “You” (or “Your”) shall mean an individual or Legal Entity exercising
- permissions granted by this License.
- “Source” form shall mean the preferred form for making modifications, including
- but not limited to software source code, documentation source, and configuration
- files.
- “Object” form shall mean any form resulting from mechanical transformation or
- translation of a Source form, including but not limited to compiled object code,
- generated documentation, and conversions to other media types.
- “Work” shall mean the work of authorship, whether in Source or Object form, made
- available under the License, as indicated by a copyright notice that is included
- in or attached to the work (an example is provided in the Appendix below).
- “Derivative Works” shall mean any work, whether in Source or Object form, that
- is based on (or derived from) the Work and for which the editorial revisions,
- annotations, elaborations, or other modifications represent, as a whole, an
- original work of authorship. For the purposes of this License, Derivative Works
- shall not include works that remain separable from, or merely link (or bind by
- name) to the interfaces of, the Work and Derivative Works thereof.
- “Contribution” shall mean any work of authorship, including the original version
- of the Work and any modifications or additions to that Work or Derivative Works
- thereof, that is intentionally submitted to Licensor for inclusion in the Work
- by the copyright owner or by an individual or Legal Entity authorized to submit
- on behalf of the copyright owner. For the purposes of this definition,
- “submitted” means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems, and
- issue tracking systems that are managed by, or on behalf of, the Licensor for
- the purpose of discussing and improving the Work, but excluding communication
- that is conspicuously marked or otherwise designated in writing by the copyright
- owner as “Not a Contribution.”
- “Contributor” shall mean Licensor and any individual or Legal Entity on behalf
- of whom a Contribution has been received by Licensor and subsequently
- incorporated within the Work.
- #### 2. Grant of Copyright License
- Subject to the terms and conditions of this License, each Contributor hereby
- grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
- irrevocable copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the Work and such
- Derivative Works in Source or Object form.
- #### 3. Grant of Patent License
- Subject to the terms and conditions of this License, each Contributor hereby
- grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
- irrevocable (except as stated in this section) patent license to make, have
- made, use, offer to sell, sell, import, and otherwise transfer the Work, where
- such license applies only to those patent claims licensable by such Contributor
- that are necessarily infringed by their Contribution(s) alone or by combination
- of their Contribution(s) with the Work to which such Contribution(s) was
- submitted. If You institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work or a
- Contribution incorporated within the Work constitutes direct or contributory
- patent infringement, then any patent licenses granted to You under this License
- for that Work shall terminate as of the date such litigation is filed.
- #### 4. Redistribution
- You may reproduce and distribute copies of the Work or Derivative Works thereof
- in any medium, with or without modifications, and in Source or Object form,
- provided that You meet the following conditions:
- * **(a)** You must give any other recipients of the Work or Derivative Works a copy of
- this License; and
- * **(b)** You must cause any modified files to carry prominent notices stating that You
- changed the files; and
- * **(c)** You must retain, in the Source form of any Derivative Works that You distribute,
- all copyright, patent, trademark, and attribution notices from the Source form
- of the Work, excluding those notices that do not pertain to any part of the
- Derivative Works; and
- * **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any
- Derivative Works that You distribute must include a readable copy of the
- attribution notices contained within such NOTICE file, excluding those notices
- that do not pertain to any part of the Derivative Works, in at least one of the
- following places: within a NOTICE text file distributed as part of the
- Derivative Works; within the Source form or documentation, if provided along
- with the Derivative Works; or, within a display generated by the Derivative
- Works, if and wherever such third-party notices normally appear. The contents of
- the NOTICE file are for informational purposes only and do not modify the
- License. You may add Your own attribution notices within Derivative Works that
- You distribute, alongside or as an addendum to the NOTICE text from the Work,
- provided that such additional attribution notices cannot be construed as
- modifying the License.
- You may add Your own copyright statement to Your modifications and may provide
- additional or different license terms and conditions for use, reproduction, or
- distribution of Your modifications, or for any such Derivative Works as a whole,
- provided Your use, reproduction, and distribution of the Work otherwise complies
- with the conditions stated in this License.
- #### 5. Submission of Contributions
- Unless You explicitly state otherwise, any Contribution intentionally submitted
- for inclusion in the Work by You to the Licensor shall be under the terms and
- conditions of this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify the terms of
- any separate license agreement you may have executed with Licensor regarding
- such Contributions.
- #### 6. Trademarks
- This License does not grant permission to use the trade names, trademarks,
- service marks, or product names of the Licensor, except as required for
- reasonable and customary use in describing the origin of the Work and
- reproducing the content of the NOTICE file.
- #### 7. Disclaimer of Warranty
- Unless required by applicable law or agreed to in writing, Licensor provides the
- Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
- including, without limitation, any warranties or conditions of TITLE,
- NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
- solely responsible for determining the appropriateness of using or
- redistributing the Work and assume any risks associated with Your exercise of
- permissions under this License.
- #### 8. Limitation of Liability
- In no event and under no legal theory, whether in tort (including negligence),
- contract, or otherwise, unless required by applicable law (such as deliberate
- and grossly negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special, incidental,
- or consequential damages of any character arising as a result of this License or
- out of the use or inability to use the Work (including but not limited to
- damages for loss of goodwill, work stoppage, computer failure or malfunction, or
- any and all other commercial damages or losses), even if such Contributor has
- been advised of the possibility of such damages.
- #### 9. Accepting Warranty or Additional Liability
- While redistributing the Work or Derivative Works thereof, You may choose to
- offer, and charge a fee for, acceptance of support, warranty, indemnity, or
- other liability obligations and/or rights consistent with this License. However,
- in accepting such obligations, You may act only on Your own behalf and on Your
- sole responsibility, not on behalf of any other Contributor, and only if You
- agree to indemnify, defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason of your
- accepting any such warranty or additional liability.
- _END OF TERMS AND CONDITIONS_
- ### APPENDIX: How to apply the Apache License to your work
- To apply the Apache License to your work, attach the following boilerplate
- notice, with the fields enclosed by brackets `[]` replaced with your own
- identifying information. (Don't include the brackets!) The text should be
- enclosed in the appropriate comment syntax for the file format. We also
- recommend that a file or class name and description of purpose be included on
- the same “printed page” as the copyright notice for easier identification within
- third-party archives.
-     Copyright [yyyy] [name of copyright owner]
-     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
-       http://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.
 +Apache License
++                           Version 2.0, January 2004
++                        http://www.apache.org/licenses/
++
++   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
++
++   1. Definitions.
++
++      "License" shall mean the terms and conditions for use, reproduction,
++      and distribution as defined by Sections 1 through 9 of this document.
++
++      "Licensor" shall mean the copyright owner or entity authorized by
++      the copyright owner that is granting the License.
++
++      "Legal Entity" shall mean the union of the acting entity and all
++      other entities that control, are controlled by, or are under common
++      control with that entity. For the purposes of this definition,
++      "control" means (i) the power, direct or indirect, to cause the
++      direction or management of such entity, whether by contract or
++      otherwise, or (ii) ownership of fifty percent (50%) or more of the
++      outstanding shares, or (iii) beneficial ownership of such entity.
++
++      "You" (or "Your") shall mean an individual or Legal Entity
++      exercising permissions granted by this License.
++
++      "Source" form shall mean the preferred form for making modifications,
++      including but not limited to software source code, documentation
++      source, and configuration files.
++
++      "Object" form shall mean any form resulting from mechanical
++      transformation or translation of a Source form, including but
++      not limited to compiled object code, generated documentation,
++      and conversions to other media types.
++
++      "Work" shall mean the work of authorship, whether in Source or
++      Object form, made available under the License, as indicated by a
++      copyright notice that is included in or attached to the work
++      (an example is provided in the Appendix below).
++
++      "Derivative Works" shall mean any work, whether in Source or Object
++      form, that is based on (or derived from) the Work and for which the
++      editorial revisions, annotations, elaborations, or other modifications
++      represent, as a whole, an original work of authorship. For the purposes
++      of this License, Derivative Works shall not include works that remain
++      separable from, or merely link (or bind by name) to the interfaces of,
++      the Work and Derivative Works thereof.
++
++      "Contribution" shall mean any work of authorship, including
++      the original version of the Work and any modifications or additions
++      to that Work or Derivative Works thereof, that is intentionally
++      submitted to Licensor for inclusion in the Work by the copyright owner
++      or by an individual or Legal Entity authorized to submit on behalf of
++      the copyright owner. For the purposes of this definition, "submitted"
++      means any form of electronic, verbal, or written communication sent
++      to the Licensor or its representatives, including but not limited to
++      communication on electronic mailing lists, source code control systems,
++      and issue tracking systems that are managed by, or on behalf of, the
++      Licensor for the purpose of discussing and improving the Work, but
++      excluding communication that is conspicuously marked or otherwise
++      designated in writing by the copyright owner as "Not a Contribution."
++
++      "Contributor" shall mean Licensor and any individual or Legal Entity
++      on behalf of whom a Contribution has been received by Licensor and
++      subsequently incorporated within the Work.
++
++   2. Grant of Copyright License. Subject to the terms and conditions of
++      this License, each Contributor hereby grants to You a perpetual,
++      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++      copyright license to reproduce, prepare Derivative Works of,
++      publicly display, publicly perform, sublicense, and distribute the
++      Work and such Derivative Works in Source or Object form.
++
++   3. Grant of Patent License. Subject to the terms and conditions of
++      this License, each Contributor hereby grants to You a perpetual,
++      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
++      (except as stated in this section) patent license to make, have made,
++      use, offer to sell, sell, import, and otherwise transfer the Work,
++      where such license applies only to those patent claims licensable
++      by such Contributor that are necessarily infringed by their
++      Contribution(s) alone or by combination of their Contribution(s)
++      with the Work to which such Contribution(s) was submitted. If You
++      institute patent litigation against any entity (including a
++      cross-claim or counterclaim in a lawsuit) alleging that the Work
++      or a Contribution incorporated within the Work constitutes direct
++      or contributory patent infringement, then any patent licenses
++      granted to You under this License for that Work shall terminate
++      as of the date such litigation is filed.
++
++   4. Redistribution. You may reproduce and distribute copies of the
++      Work or Derivative Works thereof in any medium, with or without
++      modifications, and in Source or Object form, provided that You
++      meet the following conditions:
++
++      (a) You must give any other recipients of the Work or
++          Derivative Works a copy of this License; and
++
++      (b) You must cause any modified files to carry prominent notices
++          stating that You changed the files; and
++
++      (c) You must retain, in the Source form of any Derivative Works
++          that You distribute, all copyright, patent, trademark, and
++          attribution notices from the Source form of the Work,
++          excluding those notices that do not pertain to any part of
++          the Derivative Works; and
++
++      (d) If the Work includes a "NOTICE" text file as part of its
++          distribution, then any Derivative Works that You distribute must
++          include a readable copy of the attribution notices contained
++          within such NOTICE file, excluding those notices that do not
++          pertain to any part of the Derivative Works, in at least one
++          of the following places: within a NOTICE text file distributed
++          as part of the Derivative Works; within the Source form or
++          documentation, if provided along with the Derivative Works; or,
++          within a display generated by the Derivative Works, if and
++          wherever such third-party notices normally appear. The contents
++          of the NOTICE file are for informational purposes only and
++          do not modify the License. You may add Your own attribution
++          notices within Derivative Works that You distribute, alongside
++          or as an addendum to the NOTICE text from the Work, provided
++          that such additional attribution notices cannot be construed
++          as modifying the License.
++
++      You may add Your own copyright statement to Your modifications and
++      may provide additional or different license terms and conditions
++      for use, reproduction, or distribution of Your modifications, or
++      for any such Derivative Works as a whole, provided Your use,
++      reproduction, and distribution of the Work otherwise complies with
++      the conditions stated in this License.
++
++   5. Submission of Contributions. Unless You explicitly state otherwise,
++      any Contribution intentionally submitted for inclusion in the Work
++      by You to the Licensor shall be under the terms and conditions of
++      this License, without any additional terms or conditions.
++      Notwithstanding the above, nothing herein shall supersede or modify
++      the terms of any separate license agreement you may have executed
++      with Licensor regarding such Contributions.
++
++   6. Trademarks. This License does not grant permission to use the trade
++      names, trademarks, service marks, or product names of the Licensor,
++      except as required for reasonable and customary use in describing the
++      origin of the Work and reproducing the content of the NOTICE file.
++
++   7. Disclaimer of Warranty. Unless required by applicable law or
++      agreed to in writing, Licensor provides the Work (and each
++      Contributor provides its Contributions) on an "AS IS" BASIS,
++      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
++      implied, including, without limitation, any warranties or conditions
++      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
++      PARTICULAR PURPOSE. You are solely responsible for determining the
++      appropriateness of using or redistributing the Work and assume any
++      risks associated with Your exercise of permissions under this License.
++
++   8. Limitation of Liability. In no event and under no legal theory,
++      whether in tort (including negligence), contract, or otherwise,
++      unless required by applicable law (such as deliberate and grossly
++      negligent acts) or agreed to in writing, shall any Contributor be
++      liable to You for damages, including any direct, indirect, special,
++      incidental, or consequential damages of any character arising as a
++      result of this License or out of the use or inability to use the
++      Work (including but not limited to damages for loss of goodwill,
++      work stoppage, computer failure or malfunction, or any and all
++      other commercial damages or losses), even if such Contributor
++      has been advised of the possibility of such damages.
++
++   9. Accepting Warranty or Additional Liability. While redistributing
++      the Work or Derivative Works thereof, You may choose to offer,
++      and charge a fee for, acceptance of support, warranty, indemnity,
++      or other liability obligations and/or rights consistent with this
++      License. However, in accepting such obligations, You may act only
++      on Your own behalf and on Your sole responsibility, not on behalf
++      of any other Contributor, and only if You agree to indemnify,
++      defend, and hold each Contributor harmless for any liability
++      incurred by, or claims asserted against, such Contributor by reason
++      of your accepting any such warranty or additional liability.
++
++   END OF TERMS AND CONDITIONS
++
++   APPENDIX: How to apply the Apache License to your work.
++
++      To apply the Apache License to your work, attach the following
++      boilerplate notice, with the fields enclosed by brackets "[]"
++      replaced with your own identifying information. (Don't include
++      the brackets!)  The text should be enclosed in the appropriate
++      comment syntax for the file format. We also recommend that a
++      file or class name and description of purpose be included on the
++      same "printed page" as the copyright notice for easier
++      identification within third-party archives.
++
++   Copyright [yyyy] [name of copyright owner]
++
++   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
++
++       http://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.
diff --cc docs/README.md
index 730ad5fc81b8ea895f35427e4c13b49366fec609,0000000000000000000000000000000000000000..bf5d9402c196f2c7d1421919c83c4edbdd307f61
mode 100644,000000..100644
--- /dev/null
@@@ -1,57 -1,0 +1,56 @@@
 +[![Netlify Status](https://api.netlify.com/api/v1/badges/e0dbbfc7-34f1-4393-a679-c16e80162705/deploy-status)](https://app.netlify.com/sites/gohugoio/deploys)
 +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://gohugo.io/contribute/documentation/)
 +
 +# Hugo Docs
 +
 +Documentation site for [Hugo](https://github.com/gohugoio/hugo), the very fast and flexible static site generator built with love in Go.
 +
 +## Contributing
 +
 +We welcome contributions to Hugo of any kind including documentation, suggestions, bug reports, pull requests etc. Also check out our [contribution guide](https://gohugo.io/contribute/documentation/). We would love to hear from you.
 +
 +Note that this repository contains solely the documentation for Hugo. For contributions that aren't documentation-related please refer to the [hugo](https://github.com/gohugoio/hugo) repository.
 +
 +*Pull requests shall **only** contain changes to the actual documentation. However, changes on the codebase of Hugo **and** the documentation shall be a single, atomic pull request in the [hugo](https://github.com/gohugoio/hugo) repository.*
 +
 +Spelling fixes are most welcomed, and if you want to contribute longer sections to the documentation, it would be great if you had the following criteria in mind when writing:
 +
 +* Short is good. People go to the library to read novels. If there is more than one way to _do a thing_ in Hugo, describe the current _best practice_ (avoid "… but you can also do …" and "… in older versions of Hugo you had to …".
 +* For example, try to find short snippets that teaches people about the concept. If the example is also useful as-is (copy and paste), then great. Don't list long and similar examples just so people can use them on their sites.
 +* Hugo has users from all over the world, so easy to understand and [simple English](https://simple.wikipedia.org/wiki/Basic_English) is good.
 +
- ```
 +## Edit the theme
 +
 +If you want to do docs-related theme changes, the simplest way is to have both `hugoDocs` and `gohugoioTheme` cloned as sibling directories, and then run:
 +
- ```bash
++```sh
 +HUGO_MODULE_WORKSPACE=hugo.work hugo server --ignoreVendorPaths "**"
 +```
 +
 +## Branches
 +
 +* The `master` branch is where the site is automatically built from, and is the place to put changes relevant to the current Hugo version.
 +* The `next` branch is where we store changes that are related to the next Hugo release. This can be previewed here: https://next--gohugoio.netlify.com/
 +
 +## Build
 +
 +To view the documentation site locally, you need to clone this repository:
 +
- ```bash
++```sh
 +git clone https://github.com/gohugoio/hugoDocs.git
 +```
 +
 +Also note that the documentation version for a given version of Hugo can also be found in the `/docs` sub-folder of the [Hugo source repository](https://github.com/gohugoio/hugo).
 +
 +Then to view the docs in your browser, run Hugo and open up the link:
 +
++```sh
 +▶ hugo server
 +
 +Started building sites ...
 +.
 +.
 +Serving pages from memory
 +Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
 +Press Ctrl+C to stop
 +```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c0be3af6179d06bcc982c7823944038e4dc152e1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++@media print {
++  #page-footer,
++  body > footer,
++  body > nav {
++    display: none;
++  }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..757457b2d5b4a71350c8df0edcf2e59b474f915a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++#right-sidebar {
++  scrollbar-width: none; /* hide scrollbar: Firefox */
++  -ms-overflow-style: none;  /* hide scrollbar: Internet Explorer 10+ */
++  height: calc(100vh - 9rem);
++  overflow-y: auto;
++}
++
++#right-sidebar::-webkit-scrollbar { /* hide scrollbar: WebKit */
++  width: 0;
++  height: 0;
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..634adbf06807a3af36eb20bca6a48dfea4597e09
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++/*
++Make h6 elements behave like dt elements. Initially implemented to support
++linkable glossary entries.
++
++Yes, it's a hack. That's why it's in the shame file.
++*/
++
++h6 {
++  margin-top: 0;
++  margin-bottom: 0;
++  font-size: 1.125rem;
++}
++
++h6:first-of-type {
++  margin-top: 3em;
++}
++
++h6 ~ p {
++  margin: 0.5em 0 2em 0;
++}
index c71f69dd1249a853617ed9dd8767304b272fcb62,0000000000000000000000000000000000000000..fd0f2a50375a05cce51085b8491d335d6b4a7b7f
mode 100644,000000..100644
--- /dev/null
@@@ -1,39 -1,0 +1,39 @@@
 +/*Base Styles*/
 +@import '_tachyons';
 +
 +/* purgecss start ignore */
 +@import '_header-link';
 +@import '_animation';
 +@import '_documentation-styles';
 +
 +@import 'docsearch.js/dist/cdn/docsearch.min';
 +@import '_carousel';
 +@import '_code';
 +@import '_tabs';
 +@import '_color-scheme';
 +@import '_columns';
 +@import '_content';
 +@import '_content-tables';
 +@import '_definition-lists';
 +@import '_fluid-type';
 +@import '_font-family';
 +@import '_hugo-internal-template-styling';
 +@import '_no-js';
 +@import '_social-icons';
 +@import '_stickyheader';
-   /*margin: 0;*/
++@import '_right-sidebar';
 +@import '_svg';
 +@import '_chroma';
 +@import '_variables';
++@import '_print';
++@import '_shame';
 +
 +.nested-blockquote blockquote {
 +  border-left: 4px solid var(--primary-color);
 +  padding-left: 1em;
 +}
 +
 +.mw-90 {
 +  max-width:90%;
 +}
 +/* purgecss end ignore */
index f5e09aeb10d42cb97b8a4a7de82f5e6eada69fa2,0000000000000000000000000000000000000000..5e0b0c7085fc2f3a1385abdab8e7e13e404dd9af
mode 100644,000000..100644
--- /dev/null
@@@ -1,5317 -1,0 +1,5350 @@@
-   /*margin: 0;*/
 +/* muli-200normal - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: normal;
 +  font-display: swap;
 +  font-weight: 200;
 +  src:
 +    local('Muli Extra Light '),
 +    local('Muli-Extra Light'),
 +    url(/fonts/muli-latin-200.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-200.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-200italic - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: italic;
 +  font-display: swap;
 +  font-weight: 200;
 +  src:
 +    local('Muli Extra Light italic'),
 +    local('Muli-Extra Lightitalic'),
 +    url(/fonts/muli-latin-200italic.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-200italic.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-300normal - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: normal;
 +  font-display: swap;
 +  font-weight: 300;
 +  src:
 +    local('Muli Light '),
 +    local('Muli-Light'),
 +    url(/fonts/muli-latin-300.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-300.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-300italic - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: italic;
 +  font-display: swap;
 +  font-weight: 300;
 +  src:
 +    local('Muli Light italic'),
 +    local('Muli-Lightitalic'),
 +    url(/fonts/muli-latin-300italic.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-300italic.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-400normal - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: normal;
 +  font-display: swap;
 +  font-weight: 400;
 +  src:
 +    local('Muli Regular '),
 +    local('Muli-Regular'),
 +    url(/fonts/muli-latin-400.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-400.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-400italic - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: italic;
 +  font-display: swap;
 +  font-weight: 400;
 +  src:
 +    local('Muli Regular italic'),
 +    local('Muli-Regularitalic'),
 +    url(/fonts/muli-latin-400italic.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-400italic.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-600normal - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: normal;
 +  font-display: swap;
 +  font-weight: 600;
 +  src:
 +    local('Muli SemiBold '),
 +    local('Muli-SemiBold'),
 +    url(/fonts/muli-latin-600.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-600.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-600italic - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: italic;
 +  font-display: swap;
 +  font-weight: 600;
 +  src:
 +    local('Muli SemiBold italic'),
 +    local('Muli-SemiBolditalic'),
 +    url(/fonts/muli-latin-600italic.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-600italic.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-700normal - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: normal;
 +  font-display: swap;
 +  font-weight: 700;
 +  src:
 +    local('Muli Bold '),
 +    local('Muli-Bold'),
 +    url(/fonts/muli-latin-700.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-700.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-700italic - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: italic;
 +  font-display: swap;
 +  font-weight: 700;
 +  src:
 +    local('Muli Bold italic'),
 +    local('Muli-Bolditalic'),
 +    url(/fonts/muli-latin-700italic.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-700italic.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-800normal - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: normal;
 +  font-display: swap;
 +  font-weight: 800;
 +  src:
 +    local('Muli ExtraBold '),
 +    local('Muli-ExtraBold'),
 +    url(/fonts/muli-latin-800.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-800.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-800italic - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: italic;
 +  font-display: swap;
 +  font-weight: 800;
 +  src:
 +    local('Muli ExtraBold italic'),
 +    local('Muli-ExtraBolditalic'),
 +    url(/fonts/muli-latin-800italic.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-800italic.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-900normal - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: normal;
 +  font-display: swap;
 +  font-weight: 900;
 +  src:
 +    local('Muli Black '),
 +    local('Muli-Black'),
 +    url(/fonts/muli-latin-900.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-900.woff) format('woff'); /* Modern Browsers */
 +}
 +/* muli-900italic - latin */
 +@font-face {
 +  font-family: 'Muli';
 +  font-style: italic;
 +  font-display: swap;
 +  font-weight: 900;
 +  src:
 +    local('Muli Black italic'),
 +    local('Muli-Blackitalic'),
 +    url(/fonts/muli-latin-900italic.woff2) format('woff2'), 
 +    url(/fonts/muli-latin-900italic.woff) format('woff'); /* Modern Browsers */
 +}
 +
 +
 +/*Base Styles*/
 +/*! TACHYONS v4.7.0 | http://tachyons.io */
 +/*
 + * NOTE: The Tachyons folder is for backup/reference only. This file references the module
 + *      ________            ______
 + *      ___  __/_____ _________  /______  ______________________
 + *      __  /  _  __ `/  ___/_  __ \_  / / /  __ \_  __ \_  ___/
 + *      _  /   / /_/ // /__ _  / / /  /_/ // /_/ /  / / /(__  )
 + *      /_/    \__,_/ \___/ /_/ /_/_\__, / \____//_/ /_//____/
 + *                                 /____/
 + *
 + *    TABLE OF CONTENTS
 + *
 + *    1. External Library Includes
 + *       - Normalize.css | http://normalize.css.github.io
 + *    2. Tachyons Modules
 + *    3. Variables
 + *       - Media Queries
 + *       - Colors
 + *    4. Debugging
 + *       - Debug all
 + *       - Debug children
 + *
 + */
 +/* External Library Includes */
 +/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
 +/* Document
 +   ========================================================================== */
 +/**
 + * 1. Correct the line height in all browsers.
 + * 2. Prevent adjustments of font size after orientation changes in iOS.
 + */
 +html {
 +  line-height: 1.15; /* 1 */
 +  -webkit-text-size-adjust: 100%; /* 2 */
 +}
 +/* Sections
 +   ========================================================================== */
 +/**
 + * Remove the margin in all browsers.
 + */
 +body {
 +  margin: 0;
 +}
 +/**
 + * Correct the font size and margin on `h1` elements within `section` and
 + * `article` contexts in Chrome, Firefox, and Safari.
 + */
 +h1 {
 +  font-size: 2em;
 +  margin: 0.67em 0;
 +}
 +/* Grouping content
 +   ========================================================================== */
 +/**
 + * 1. Add the correct box sizing in Firefox.
 + * 2. Show the overflow in Edge and IE.
 + */
 +hr {
 +  -webkit-box-sizing: content-box;
 +          box-sizing: content-box; /* 1 */
 +  height: 0; /* 1 */
 +  overflow: visible; /* 2 */
 +}
 +/**
 + * 1. Correct the inheritance and scaling of font size in all browsers.
 + * 2. Correct the odd `em` font sizing in all browsers.
 + */
 +pre {
 +  font-family: monospace, monospace; /* 1 */
 +  font-size: 1em; /* 2 */
 +}
 +/* Text-level semantics
 +   ========================================================================== */
 +/**
 + * Remove the gray background on active links in IE 10.
 + */
 +a {
 +  background-color: transparent;
 +}
 +/**
 + * 1. Remove the bottom border in Chrome 57-
 + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 + */
 +abbr[title] {
 +  border-bottom: none; /* 1 */
 +  text-decoration: underline; /* 2 */
 +  -webkit-text-decoration: underline dotted;
 +          text-decoration: underline dotted; /* 2 */
 +}
 +/**
 + * Add the correct font weight in Chrome, Edge, and Safari.
 + */
 +b,
 +strong {
 +  font-weight: bolder;
 +}
 +/**
 + * 1. Correct the inheritance and scaling of font size in all browsers.
 + * 2. Correct the odd `em` font sizing in all browsers.
 + */
 +code,
 +kbd,
 +samp {
 +  font-family: monospace, monospace; /* 1 */
 +  font-size: 1em; /* 2 */
 +}
 +/**
 + * Add the correct font size in all browsers.
 + */
 +small {
 +  font-size: 80%;
 +}
 +/**
 + * Prevent `sub` and `sup` elements from affecting the line height in
 + * all browsers.
 + */
 +sub,
 +sup {
 +  font-size: 75%;
 +  line-height: 0;
 +  position: relative;
 +  vertical-align: baseline;
 +}
 +sub {
 +  bottom: -0.25em;
 +}
 +sup {
 +  top: -0.5em;
 +}
 +/* Embedded content
 +   ========================================================================== */
 +/**
 + * Remove the border on images inside links in IE 10.
 + */
 +img {
 +  border-style: none;
 +}
 +/* Forms
 +   ========================================================================== */
 +/**
 + * 1. Change the font styles in all browsers.
 + * 2. Remove the margin in Firefox and Safari.
 + */
 +button,
 +input,
 +optgroup,
 +select,
 +textarea {
 +  font-family: inherit; /* 1 */
 +  font-size: 100%; /* 1 */
 +  line-height: 1.15; /* 1 */
 +  margin: 0; /* 2 */
 +}
 +/**
 + * Show the overflow in IE.
 + * 1. Show the overflow in Edge.
 + */
 +button,
 +input { /* 1 */
 +  overflow: visible;
 +}
 +/**
 + * Remove the inheritance of text transform in Edge, Firefox, and IE.
 + * 1. Remove the inheritance of text transform in Firefox.
 + */
 +button,
 +select { /* 1 */
 +  text-transform: none;
 +}
 +/**
 + * Correct the inability to style clickable types in iOS and Safari.
 + */
 +button,
 +[type="button"],
 +[type="reset"],
 +[type="submit"] {
 +  -webkit-appearance: button;
 +}
 +/**
 + * Remove the inner border and padding in Firefox.
 + */
 +button::-moz-focus-inner,
 +[type="button"]::-moz-focus-inner,
 +[type="reset"]::-moz-focus-inner,
 +[type="submit"]::-moz-focus-inner {
 +  border-style: none;
 +  padding: 0;
 +}
 +/**
 + * Restore the focus styles unset by the previous rule.
 + */
 +button:-moz-focusring,
 +[type="button"]:-moz-focusring,
 +[type="reset"]:-moz-focusring,
 +[type="submit"]:-moz-focusring {
 +  outline: 1px dotted ButtonText;
 +}
 +/**
 + * Correct the padding in Firefox.
 + */
 +fieldset {
 +  padding: 0.35em 0.75em 0.625em;
 +}
 +/**
 + * 1. Correct the text wrapping in Edge and IE.
 + * 2. Correct the color inheritance from `fieldset` elements in IE.
 + * 3. Remove the padding so developers are not caught out when they zero out
 + *    `fieldset` elements in all browsers.
 + */
 +legend {
 +  -webkit-box-sizing: border-box;
 +          box-sizing: border-box; /* 1 */
 +  color: inherit; /* 2 */
 +  display: table; /* 1 */
 +  max-width: 100%; /* 1 */
 +  padding: 0; /* 3 */
 +  white-space: normal; /* 1 */
 +}
 +/**
 + * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 + */
 +progress {
 +  vertical-align: baseline;
 +}
 +/**
 + * Remove the default vertical scrollbar in IE 10+.
 + */
 +textarea {
 +  overflow: auto;
 +}
 +/**
 + * 1. Add the correct box sizing in IE 10.
 + * 2. Remove the padding in IE 10.
 + */
 +[type="checkbox"],
 +[type="radio"] {
 +  -webkit-box-sizing: border-box;
 +          box-sizing: border-box; /* 1 */
 +  padding: 0; /* 2 */
 +}
 +/**
 + * Correct the cursor style of increment and decrement buttons in Chrome.
 + */
 +[type="number"]::-webkit-inner-spin-button,
 +[type="number"]::-webkit-outer-spin-button {
 +  height: auto;
 +}
 +/**
 + * 1. Correct the odd appearance in Chrome and Safari.
 + * 2. Correct the outline style in Safari.
 + */
 +[type="search"] {
 +  -webkit-appearance: textfield; /* 1 */
 +  outline-offset: -2px; /* 2 */
 +}
 +/**
 + * Remove the inner padding in Chrome and Safari on macOS.
 + */
 +[type="search"]::-webkit-search-decoration {
 +  -webkit-appearance: none;
 +}
 +/**
 + * 1. Correct the inability to style clickable types in iOS and Safari.
 + * 2. Change font properties to `inherit` in Safari.
 + */
 +::-webkit-file-upload-button {
 +  -webkit-appearance: button; /* 1 */
 +  font: inherit; /* 2 */
 +}
 +/* Interactive
 +   ========================================================================== */
 +/*
 + * Add the correct display in Edge, IE 10+, and Firefox.
 + */
 +details {
 +  display: block;
 +}
 +/*
 + * Add the correct display in all browsers.
 + */
 +summary {
 +  display: list-item;
 +}
 +/* Misc
 +   ========================================================================== */
 +/**
 + * Add the correct display in IE 10+.
 + */
 +template {
 +  display: none;
 +}
 +/**
 + * Add the correct display in IE 10.
 + */
 +[hidden] {
 +  display: none;
 +}
 +/* Modules */
 +/*
 + 
 +  BOX SIZING
 +
 +*/
 +html,
 +body,
 +div,
 +article,
 +aside,
 +section,
 +main,
 +nav,
 +footer,
 +header,
 +form,
 +fieldset,
 +legend,
 +pre,
 +code,
 +a,
 +h1,h2,h3,h4,h5,h6,
 +p,
 +ul,
 +ol,
 +li,
 +dl,
 +dt,
 +dd,
 +blockquote,
 +figcaption,
 +figure,
 +textarea,
 +table, 
 +td,
 +th,
 +tr,
 +input[type="email"],
 +input[type="number"],
 +input[type="password"],
 +input[type="tel"],
 +input[type="text"],
 +input[type="url"],
 +.border-box {
 +  -webkit-box-sizing: border-box;
 +          box-sizing: border-box;
 +}
 +/*@import 'tachyons/src/_aspect-ratios';*/
 +/*
 +
 +   IMAGES
 +   Docs: http://tachyons.io/docs/elements/images/
 +
 +*/
 +/* Responsive images! */
 +img { max-width: 100%; }
 +/*
 +
 +   BACKGROUND SIZE
 +   Docs: http://tachyons.io/docs/themes/background-size/
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +/*
 +  Often used in combination with background image set as an inline style
 +  on an html element.
 +*/
 +.cover { background-size: cover!important; }
 +.contain { background-size: contain!important; }
 +@media screen and (min-width: 30em) {
 +  .cover-ns { background-size: cover!important; }
 +  .contain-ns { background-size: contain!important; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .cover-m { background-size: cover!important; }
 +  .contain-m { background-size: contain!important; }
 +}
 +@media screen and (min-width: 60em) {
 +  .cover-l { background-size: cover!important; }
 +  .contain-l { background-size: contain!important; }
 +}
 +/*
 +
 +    BACKGROUND POSITION
 +
 +    Base:
 +    bg = background
 +
 +    Modifiers:
 +    -center = center center
 +    -top = top center
 +    -right = center right
 +    -bottom = bottom center
 +    -left = center left
 +
 +    Media Query Extensions:
 +      -ns = not-small
 +      -m  = medium
 +      -l  = large
 +
 + */
 +.bg-center { 
 +  background-repeat: no-repeat;
 +  background-position: center center; 
 +}
 +.bg-top {    
 +  background-repeat: no-repeat; 
 +  background-position: top center;    
 +}
 +.bg-right {  
 +  background-repeat: no-repeat; 
 +  background-position: center right;  
 +}
 +.bg-bottom { 
 +  background-repeat: no-repeat; 
 +  background-position: bottom center; 
 +}
 +.bg-left {   
 +  background-repeat: no-repeat; 
 +  background-position: center left;   
 +}
 +@media screen and (min-width: 30em) {
 +  .bg-center-ns { 
 +    background-repeat: no-repeat;
 +    background-position: center center; 
 +  }
 +
 +  .bg-top-ns {    
 +    background-repeat: no-repeat; 
 +    background-position: top center;    
 +  }
 +
 +  .bg-right-ns {  
 +    background-repeat: no-repeat; 
 +    background-position: center right;  
 +  }
 +
 +  .bg-bottom-ns { 
 +    background-repeat: no-repeat; 
 +    background-position: bottom center; 
 +  }
 +
 +  .bg-left-ns {   
 +    background-repeat: no-repeat; 
 +    background-position: center left;   
 +  }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .bg-center-m { 
 +    background-repeat: no-repeat;
 +    background-position: center center; 
 +  }
 +
 +  .bg-top-m {    
 +    background-repeat: no-repeat; 
 +    background-position: top center;    
 +  }
 +
 +  .bg-right-m {  
 +    background-repeat: no-repeat; 
 +    background-position: center right;  
 +  }
 +
 +  .bg-bottom-m { 
 +    background-repeat: no-repeat; 
 +    background-position: bottom center; 
 +  }
 +
 +  .bg-left-m {   
 +    background-repeat: no-repeat; 
 +    background-position: center left;   
 +  }
 +}
 +@media screen and (min-width: 60em) {
 +  .bg-center-l { 
 +    background-repeat: no-repeat;
 +    background-position: center center; 
 +  }
 +
 +  .bg-top-l {    
 +    background-repeat: no-repeat; 
 +    background-position: top center;    
 +  }
 +
 +  .bg-right-l {  
 +    background-repeat: no-repeat; 
 +    background-position: center right;  
 +  }
 +
 +  .bg-bottom-l { 
 +    background-repeat: no-repeat; 
 +    background-position: bottom center; 
 +  }
 +
 +  .bg-left-l {   
 +    background-repeat: no-repeat; 
 +    background-position: center left;   
 +  }
 +}
 +/*@import 'tachyons/src/_outlines';*/
 +/*
 +
 +    BORDERS
 +    Docs: http://tachyons.io/docs/themes/borders/
 +
 +    Base:
 +      b = border
 +
 +    Modifiers:
 +      a = all
 +      t = top
 +      r = right
 +      b = bottom
 +      l = left
 +      n = none
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.ba { border-style: solid; border-width: 1px; }
 +.bt { border-top-style: solid; border-top-width: 1px; }
 +.br { border-right-style: solid; border-right-width: 1px; }
 +.bb { border-bottom-style: solid; border-bottom-width: 1px; }
 +.bl { border-left-style: solid; border-left-width: 1px; }
 +.bn { border-style: none; border-width: 0; }
 +@media screen and (min-width: 30em) {
 +  .ba-ns { border-style: solid; border-width: 1px; }
 +  .bt-ns { border-top-style: solid; border-top-width: 1px; }
 +  .br-ns { border-right-style: solid; border-right-width: 1px; }
 +  .bb-ns { border-bottom-style: solid; border-bottom-width: 1px; }
 +  .bl-ns { border-left-style: solid; border-left-width: 1px; }
 +  .bn-ns { border-style: none; border-width: 0; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .ba-m { border-style: solid; border-width: 1px; }
 +  .bt-m { border-top-style: solid; border-top-width: 1px; }
 +  .br-m { border-right-style: solid; border-right-width: 1px; }
 +  .bb-m { border-bottom-style: solid; border-bottom-width: 1px; }
 +  .bl-m { border-left-style: solid; border-left-width: 1px; }
 +  .bn-m { border-style: none; border-width: 0; }
 +}
 +@media screen and (min-width: 60em) {
 +  .ba-l { border-style: solid; border-width: 1px; }
 +  .bt-l { border-top-style: solid; border-top-width: 1px; }
 +  .br-l { border-right-style: solid; border-right-width: 1px; }
 +  .bb-l { border-bottom-style: solid; border-bottom-width: 1px; }
 +  .bl-l { border-left-style: solid; border-left-width: 1px; }
 +  .bn-l { border-style: none; border-width: 0; }
 +}
 +/*
 +
 +   BORDER COLORS
 +   Docs: http://tachyons.io/docs/themes/borders/
 +
 +   Border colors can be used to extend the base
 +   border classes ba,bt,bb,br,bl found in the _borders.css file.
 +
 +   The base border class by default will set the color of the border
 +   to that of the current text color. These classes are for the cases
 +   where you desire for the text and border colors to be different.
 +
 +   Base:
 +     b = border
 +
 +   Modifiers:
 +   --color-name = each color variable name is also a border color name
 +
 +*/
 +.b--black {        border-color: #000; }
 +.b--near-black {   border-color: #111; }
 +.b--dark-gray {    border-color: #333; }
 +.b--mid-gray {     border-color: #555; }
 +.b--gray {         border-color: #777; }
 +.b--silver {       border-color: #999; }
 +.b--light-silver { border-color: #aaa; }
 +.b--moon-gray {    border-color: #ccc; }
 +.b--light-gray {   border-color: #eee; }
 +.b--near-white {   border-color: #f4f4f4; }
 +.b--white {        border-color: #fff; }
 +.b--white-90 {   border-color: rgba(255, 255, 255, .9); }
 +.b--white-80 {   border-color: rgba(255, 255, 255, .8); }
 +.b--white-70 {   border-color: rgba(255, 255, 255, .7); }
 +.b--white-60 {   border-color: rgba(255, 255, 255, .6); }
 +.b--white-50 {   border-color: rgba(255, 255, 255, .5); }
 +.b--white-40 {   border-color: rgba(255, 255, 255, .4); }
 +.b--white-30 {   border-color: rgba(255, 255, 255, .3); }
 +.b--white-20 {   border-color: rgba(255, 255, 255, .2); }
 +.b--white-10 {   border-color: rgba(255, 255, 255, .1); }
 +.b--white-05 {   border-color: rgba(255, 255, 255, .05); }
 +.b--white-025 {   border-color: rgba(255, 255, 255, .025); }
 +.b--white-0125 {   border-color: rgba(255, 255, 255, .0125); }
 +.b--black-90 {   border-color: rgba(0, 0, 0, .9); }
 +.b--black-80 {   border-color: rgba(0, 0, 0, .8); }
 +.b--black-70 {   border-color: rgba(0, 0, 0, .7); }
 +.b--black-60 {   border-color: rgba(0, 0, 0, .6); }
 +.b--black-50 {   border-color: rgba(0, 0, 0, .5); }
 +.b--black-40 {   border-color: rgba(0, 0, 0, .4); }
 +.b--black-30 {   border-color: rgba(0, 0, 0, .3); }
 +.b--black-20 {   border-color: rgba(0, 0, 0, .2); }
 +.b--black-10 {   border-color: rgba(0, 0, 0, .1); }
 +.b--black-05 {   border-color: rgba(0, 0, 0, .05); }
 +.b--black-025 {   border-color: rgba(0, 0, 0, .025); }
 +.b--black-0125 {   border-color: rgba(0, 0, 0, .0125); }
 +.b--dark-red { border-color: #e7040f; }
 +.b--red { border-color: #ff4136; }
 +.b--light-red { border-color: #ff725c; }
 +.b--orange { border-color: #ff6300; }
 +.b--gold { border-color: #ffb700; }
 +.b--yellow { border-color: #ffd700; }
 +.b--light-yellow { border-color: #fbf1a9; }
 +.b--purple { border-color: #5e2ca5; }
 +.b--light-purple { border-color: #a463f2; }
 +.b--dark-pink { border-color: #d5008f; }
 +.b--hot-pink { border-color: #ff41b4; }
 +.b--pink { border-color: #ff80cc; }
 +.b--light-pink { border-color: #ffa3d7; }
 +.b--dark-green { border-color: #137752; }
 +.b--green { border-color: #19a974; }
 +.b--light-green { border-color: #9eebcf; }
 +.b--navy { border-color: #001b44; }
 +.b--dark-blue { border-color: #00449e; }
 +.b--blue { border-color: #0594CB; }
 +.b--light-blue { border-color: #96ccff; }
 +.b--lightest-blue { border-color: #cdecff; }
 +.b--washed-blue { border-color: #f6fffe; }
 +.b--washed-green { border-color: #e8fdf5; }
 +.b--washed-yellow { border-color: #fffceb; }
 +.b--washed-red { border-color: #ffdfdf; }
 +.b--transparent { border-color: transparent; }
 +.b--inherit { border-color: inherit; }
 +/*
 +
 +   BORDER RADIUS
 +   Docs: http://tachyons.io/docs/themes/border-radius/
 +
 +   Base:
 +     br   = border-radius
 +
 +   Modifiers:
 +     0    = 0/none
 +     1    = 1st step in scale
 +     2    = 2nd step in scale
 +     3    = 3rd step in scale
 +     4    = 4th step in scale
 +
 +   Literal values:
 +     -100 = 100%
 +     -pill = 9999px
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.br0 {        border-radius: 0; }
 +.br1 {        border-radius: .125rem; }
 +.br2 {        border-radius: .25rem; }
 +.br3 {        border-radius: .5rem; }
 +.br4 {        border-radius: 1rem; }
 +.br-100 {     border-radius: 100%; }
 +.br-pill {    border-radius: 9999px; }
 +.br--bottom {
 +      border-top-left-radius: 0;
 +      border-top-right-radius: 0;
 +  }
 +.br--top {
 +      border-bottom-left-radius: 0;
 +      border-bottom-right-radius: 0;
 +  }
 +.br--right {
 +      border-top-left-radius: 0;
 +      border-bottom-left-radius: 0;
 +  }
 +.br--left {
 +      border-top-right-radius: 0;
 +      border-bottom-right-radius: 0;
 +  }
 +@media screen and (min-width: 30em) {
 +  .br0-ns {     border-radius: 0; }
 +  .br1-ns {     border-radius: .125rem; }
 +  .br2-ns {     border-radius: .25rem; }
 +  .br3-ns {     border-radius: .5rem; }
 +  .br4-ns {     border-radius: 1rem; }
 +  .br-100-ns {  border-radius: 100%; }
 +  .br-pill-ns { border-radius: 9999px; }
 +  .br--bottom-ns {
 +      border-top-left-radius: 0;
 +      border-top-right-radius: 0;
 +  }
 +  .br--top-ns {
 +      border-bottom-left-radius: 0;
 +      border-bottom-right-radius: 0;
 +  }
 +  .br--right-ns {
 +      border-top-left-radius: 0;
 +      border-bottom-left-radius: 0;
 +  }
 +  .br--left-ns {
 +      border-top-right-radius: 0;
 +      border-bottom-right-radius: 0;
 +  }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .br0-m {     border-radius: 0; }
 +  .br1-m {     border-radius: .125rem; }
 +  .br2-m {     border-radius: .25rem; }
 +  .br3-m {     border-radius: .5rem; }
 +  .br4-m {     border-radius: 1rem; }
 +  .br-100-m {  border-radius: 100%; }
 +  .br-pill-m { border-radius: 9999px; }
 +  .br--bottom-m {
 +      border-top-left-radius: 0;
 +      border-top-right-radius: 0;
 +  }
 +  .br--top-m {
 +      border-bottom-left-radius: 0;
 +      border-bottom-right-radius: 0;
 +  }
 +  .br--right-m {
 +      border-top-left-radius: 0;
 +      border-bottom-left-radius: 0;
 +  }
 +  .br--left-m {
 +      border-top-right-radius: 0;
 +      border-bottom-right-radius: 0;
 +  }
 +}
 +@media screen and (min-width: 60em) {
 +  .br0-l {     border-radius: 0; }
 +  .br1-l {     border-radius: .125rem; }
 +  .br2-l {     border-radius: .25rem; }
 +  .br3-l {     border-radius: .5rem; }
 +  .br4-l {     border-radius: 1rem; }
 +  .br-100-l {  border-radius: 100%; }
 +  .br-pill-l { border-radius: 9999px; }
 +  .br--bottom-l {
 +      border-top-left-radius: 0;
 +      border-top-right-radius: 0;
 +  }
 +  .br--top-l {
 +      border-bottom-left-radius: 0;
 +      border-bottom-right-radius: 0;
 +  }
 +  .br--right-l {
 +      border-top-left-radius: 0;
 +      border-bottom-left-radius: 0;
 +  }
 +  .br--left-l {
 +      border-top-right-radius: 0;
 +      border-bottom-right-radius: 0;
 +  }
 +}
 +/*
 +
 +   BORDER STYLES
 +   Docs: http://tachyons.io/docs/themes/borders/
 +
 +   Depends on base border module in _borders.css
 +
 +   Base:
 +     b = border-style
 +
 +   Modifiers:
 +     --none   = none
 +     --dotted = dotted
 +     --dashed = dashed
 +     --solid  = solid
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 + */
 +.b--dotted { border-style: dotted; }
 +.b--dashed { border-style: dashed; }
 +.b--solid {  border-style: solid; }
 +.b--none {   border-style: none; }
 +@media screen and (min-width: 30em) {
 +  .b--dotted-ns { border-style: dotted; }
 +  .b--dashed-ns { border-style: dashed; }
 +  .b--solid-ns {  border-style: solid; }
 +  .b--none-ns {   border-style: none; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .b--dotted-m { border-style: dotted; }
 +  .b--dashed-m { border-style: dashed; }
 +  .b--solid-m {  border-style: solid; }
 +  .b--none-m {   border-style: none; }
 +}
 +@media screen and (min-width: 60em) {
 +  .b--dotted-l { border-style: dotted; }
 +  .b--dashed-l { border-style: dashed; }
 +  .b--solid-l {  border-style: solid; }
 +  .b--none-l {   border-style: none; }
 +}
 +/*
 +
 +   BORDER WIDTHS
 +   Docs: http://tachyons.io/docs/themes/borders/
 +
 +   Base:
 +     bw = border-width
 +
 +   Modifiers:
 +     0 = 0 width border
 +     1 = 1st step in border-width scale
 +     2 = 2nd step in border-width scale
 +     3 = 3rd step in border-width scale
 +     4 = 4th step in border-width scale
 +     5 = 5th step in border-width scale
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.bw0 { border-width: 0; }
 +.bw1 { border-width: .125rem; }
 +.bw2 { border-width: .25rem; }
 +.bw3 { border-width: .5rem; }
 +.bw4 { border-width: 1rem; }
 +.bw5 { border-width: 2rem; }
 +/* Resets */
 +.bt-0 { border-top-width: 0; }
 +.br-0 { border-right-width: 0; }
 +.bb-0 { border-bottom-width: 0; }
 +.bl-0 { border-left-width: 0; }
 +@media screen and (min-width: 30em) {
 +  .bw0-ns { border-width: 0; }
 +  .bw1-ns { border-width: .125rem; }
 +  .bw2-ns { border-width: .25rem; }
 +  .bw3-ns { border-width: .5rem; }
 +  .bw4-ns { border-width: 1rem; }
 +  .bw5-ns { border-width: 2rem; }
 +  .bt-0-ns { border-top-width: 0; }
 +  .br-0-ns { border-right-width: 0; }
 +  .bb-0-ns { border-bottom-width: 0; }
 +  .bl-0-ns { border-left-width: 0; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .bw0-m { border-width: 0; }
 +  .bw1-m { border-width: .125rem; }
 +  .bw2-m { border-width: .25rem; }
 +  .bw3-m { border-width: .5rem; }
 +  .bw4-m { border-width: 1rem; }
 +  .bw5-m { border-width: 2rem; }
 +  .bt-0-m { border-top-width: 0; }
 +  .br-0-m { border-right-width: 0; }
 +  .bb-0-m { border-bottom-width: 0; }
 +  .bl-0-m { border-left-width: 0; }
 +}
 +@media screen and (min-width: 60em) {
 +  .bw0-l { border-width: 0; }
 +  .bw1-l { border-width: .125rem; }
 +  .bw2-l { border-width: .25rem; }
 +  .bw3-l { border-width: .5rem; }
 +  .bw4-l { border-width: 1rem; }
 +  .bw5-l { border-width: 2rem; }
 +  .bt-0-l { border-top-width: 0; }
 +  .br-0-l { border-right-width: 0; }
 +  .bb-0-l { border-bottom-width: 0; }
 +  .bl-0-l { border-left-width: 0; }
 +}
 +/*
 +
 +  BOX-SHADOW
 +  Docs: http://tachyons.io/docs/themes/box-shadow/
 +
 +  Media Query Extensions:
 +   -ns = not-small
 +   -m  = medium
 +   -l  = large
 +
 + */
 +.shadow-1 { -webkit-box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); }
 +.shadow-2 { -webkit-box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); }
 +.shadow-3 { -webkit-box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); }
 +.shadow-4 { -webkit-box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); }
 +.shadow-5 { -webkit-box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); }
 +@media screen and (min-width: 30em) {
 +  .shadow-1-ns { -webkit-box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); }
 +  .shadow-2-ns { -webkit-box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); }
 +  .shadow-3-ns { -webkit-box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); }
 +  .shadow-4-ns { -webkit-box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); }
 +  .shadow-5-ns { -webkit-box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .shadow-1-m { -webkit-box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); }
 +  .shadow-2-m { -webkit-box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); }
 +  .shadow-3-m { -webkit-box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); }
 +  .shadow-4-m { -webkit-box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); }
 +  .shadow-5-m { -webkit-box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); }
 +}
 +@media screen and (min-width: 60em) {
 +  .shadow-1-l { -webkit-box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .2); }
 +  .shadow-2-l { -webkit-box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, .2); }
 +  .shadow-3-l { -webkit-box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); box-shadow: 2px 2px 4px 2px rgba(0, 0, 0, .2); }
 +  .shadow-4-l { -webkit-box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, .2); }
 +  .shadow-5-l { -webkit-box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, .2); }
 +}
 +/*@import 'tachyons/src/_code';*/
 +/*
 +
 +   COORDINATES
 +   Docs: http://tachyons.io/docs/layout/position/
 +
 +   Use in combination with the position module.
 +
 +   Base:
 +     top
 +     bottom
 +     right
 +     left
 +
 +   Modifiers:
 +     -0  = literal value 0
 +     -1  = literal value 1
 +     -2  = literal value 2
 +     --1 = literal value -1
 +     --2 = literal value -2
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.top-0    { top:    0; }
 +.right-0  { right:  0; }
 +.bottom-0 { bottom: 0; }
 +.left-0   { left:   0; }
 +.top-1    { top:    1rem; }
 +.right-1  { right:  1rem; }
 +.bottom-1 { bottom: 1rem; }
 +.left-1   { left:   1rem; }
 +.top-2    { top:    2rem; }
 +.right-2  { right:  2rem; }
 +.bottom-2 { bottom: 2rem; }
 +.left-2   { left:   2rem; }
 +.top--1    { top:    -1rem; }
 +.right--1  { right:  -1rem; }
 +.bottom--1 { bottom: -1rem; }
 +.left--1   { left:   -1rem; }
 +.top--2    { top:    -2rem; }
 +.right--2  { right:  -2rem; }
 +.bottom--2 { bottom: -2rem; }
 +.left--2   { left:   -2rem; }
 +.absolute--fill {
 +  top: 0;
 +  right: 0;
 +  bottom: 0;
 +  left: 0;
 +}
 +@media screen and (min-width: 30em) {
 +  .top-0-ns     { top:   0; }
 +  .left-0-ns    { left:  0; }
 +  .right-0-ns   { right: 0; }
 +  .bottom-0-ns  { bottom: 0; }
 +  .top-1-ns     { top:   1rem; }
 +  .left-1-ns    { left:  1rem; }
 +  .right-1-ns   { right: 1rem; }
 +  .bottom-1-ns  { bottom: 1rem; }
 +  .top-2-ns     { top:   2rem; }
 +  .left-2-ns    { left:  2rem; }
 +  .right-2-ns   { right: 2rem; }
 +  .bottom-2-ns  { bottom: 2rem; }
 +  .top--1-ns    { top:    -1rem; }
 +  .right--1-ns  { right:  -1rem; }
 +  .bottom--1-ns { bottom: -1rem; }
 +  .left--1-ns   { left:   -1rem; }
 +  .top--2-ns    { top:    -2rem; }
 +  .right--2-ns  { right:  -2rem; }
 +  .bottom--2-ns { bottom: -2rem; }
 +  .left--2-ns   { left:   -2rem; }
 +  .absolute--fill-ns {
 +    top: 0;
 +    right: 0;
 +    bottom: 0;
 +    left: 0;
 +  }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .top-0-m     { top:   0; }
 +  .left-0-m    { left:  0; }
 +  .right-0-m   { right: 0; }
 +  .bottom-0-m  { bottom: 0; }
 +  .top-1-m     { top:   1rem; }
 +  .left-1-m    { left:  1rem; }
 +  .right-1-m   { right: 1rem; }
 +  .bottom-1-m  { bottom: 1rem; }
 +  .top-2-m     { top:   2rem; }
 +  .left-2-m    { left:  2rem; }
 +  .right-2-m   { right: 2rem; }
 +  .bottom-2-m  { bottom: 2rem; }
 +  .top--1-m    { top:    -1rem; }
 +  .right--1-m  { right:  -1rem; }
 +  .bottom--1-m { bottom: -1rem; }
 +  .left--1-m   { left:   -1rem; }
 +  .top--2-m    { top:    -2rem; }
 +  .right--2-m  { right:  -2rem; }
 +  .bottom--2-m { bottom: -2rem; }
 +  .left--2-m   { left:   -2rem; }
 +  .absolute--fill-m {
 +    top: 0;
 +    right: 0;
 +    bottom: 0;
 +    left: 0;
 +  }
 +}
 +@media screen and (min-width: 60em) {
 +  .top-0-l     { top:   0; }
 +  .left-0-l    { left:  0; }
 +  .right-0-l   { right: 0; }
 +  .bottom-0-l  { bottom: 0; }
 +  .top-1-l     { top:   1rem; }
 +  .left-1-l    { left:  1rem; }
 +  .right-1-l   { right: 1rem; }
 +  .bottom-1-l  { bottom: 1rem; }
 +  .top-2-l     { top:   2rem; }
 +  .left-2-l    { left:  2rem; }
 +  .right-2-l   { right: 2rem; }
 +  .bottom-2-l  { bottom: 2rem; }
 +  .top--1-l    { top:    -1rem; }
 +  .right--1-l  { right:  -1rem; }
 +  .bottom--1-l { bottom: -1rem; }
 +  .left--1-l   { left:   -1rem; }
 +  .top--2-l    { top:    -2rem; }
 +  .right--2-l  { right:  -2rem; }
 +  .bottom--2-l { bottom: -2rem; }
 +  .left--2-l   { left:   -2rem; }
 +  .absolute--fill-l {
 +    top: 0;
 +    right: 0;
 +    bottom: 0;
 +    left: 0;
 +  }
 +}
 +/*
 +
 +   CLEARFIX
 +   http://tachyons.io/docs/layout/clearfix/
 +
 +*/
 +/* Nicolas Gallaghers Clearfix solution
 +   Ref: http://nicolasgallagher.com/micro-clearfix-hack/ */
 +.cf:before,
 +.cf:after { content: " "; display: table; }
 +.cf:after { clear: both; }
 +.cf {       *zoom: 1; }
 +.cl { clear: left; }
 +.cr { clear: right; }
 +.cb { clear: both; }
 +.cn { clear: none; }
 +@media screen and (min-width: 30em) {
 +  .cl-ns { clear: left; }
 +  .cr-ns { clear: right; }
 +  .cb-ns { clear: both; }
 +  .cn-ns { clear: none; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .cl-m { clear: left; }
 +  .cr-m { clear: right; }
 +  .cb-m { clear: both; }
 +  .cn-m { clear: none; }
 +}
 +@media screen and (min-width: 60em) {
 +  .cl-l { clear: left; }
 +  .cr-l { clear: right; }
 +  .cb-l { clear: both; }
 +  .cn-l { clear: none; }
 +}
 +/*
 +
 +   DISPLAY
 +   Docs: http://tachyons.io/docs/layout/display
 +
 +   Base:
 +    d = display
 +
 +   Modifiers:
 +    n     = none
 +    b     = block
 +    ib    = inline-block
 +    it    = inline-table
 +    t     = table
 +    tc    = table-cell
 +    t-row          = table-row
 +    t-columm       = table-column
 +    t-column-group = table-column-group
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.dn {              display: none; }
 +.di {              display: inline; }
 +.db {              display: block; }
 +.dib {             display: inline-block; }
 +.dit {             display: inline-table; }
 +.dt {              display: table; }
 +.dtc {             display: table-cell; }
 +.dt-row {          display: table-row; }
 +.dt-row-group {    display: table-row-group; }
 +.dt-column {       display: table-column; }
 +.dt-column-group { display: table-column-group; }
 +/*
 +  This will set table to full width and then
 +  all cells will be equal width
 +*/
 +.dt--fixed {
 +  table-layout: fixed;
 +  width: 100%;
 +}
 +@media screen and (min-width: 30em) {
 +  .dn-ns {              display: none; }
 +  .di-ns {              display: inline; }
 +  .db-ns {              display: block; }
 +  .dib-ns {             display: inline-block; }
 +  .dit-ns {             display: inline-table; }
 +  .dt-ns {              display: table; }
 +  .dtc-ns {             display: table-cell; }
 +  .dt-row-ns {          display: table-row; }
 +  .dt-row-group-ns {    display: table-row-group; }
 +  .dt-column-ns {       display: table-column; }
 +  .dt-column-group-ns { display: table-column-group; }
 +
 +  .dt--fixed-ns {
 +    table-layout: fixed;
 +    width: 100%;
 +  }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .dn-m {              display: none; }
 +  .di-m {              display: inline; }
 +  .db-m {              display: block; }
 +  .dib-m {             display: inline-block; }
 +  .dit-m {             display: inline-table; }
 +  .dt-m {              display: table; }
 +  .dtc-m {             display: table-cell; }
 +  .dt-row-m {          display: table-row; }
 +  .dt-row-group-m {    display: table-row-group; }
 +  .dt-column-m {       display: table-column; }
 +  .dt-column-group-m { display: table-column-group; }
 +
 +  .dt--fixed-m {
 +    table-layout: fixed;
 +    width: 100%;
 +  }
 +}
 +@media screen and (min-width: 60em) {
 +  .dn-l {              display: none; }
 +  .di-l {              display: inline; }
 +  .db-l {              display: block; }
 +  .dib-l {             display: inline-block; }
 +  .dit-l {             display: inline-table; }
 +  .dt-l {              display: table; }
 +  .dtc-l {             display: table-cell; }
 +  .dt-row-l {          display: table-row; }
 +  .dt-row-group-l {    display: table-row-group; }
 +  .dt-column-l {       display: table-column; }
 +  .dt-column-group-l { display: table-column-group; }
 +
 +  .dt--fixed-l {
 +    table-layout: fixed;
 +    width: 100%;
 +  }
 +}
 +/*
 +
 +  FLEXBOX
 +
 +  Media Query Extensions:
 +   -ns = not-small
 +   -m  = medium
 +   -l  = large
 +
 +*/
 +.flex { display: -webkit-box; display: -ms-flexbox; display: flex; }
 +.inline-flex { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; }
 +/* 1. Fix for Chrome 44 bug.
 + * https://code.google.com/p/chromium/issues/detail?id=506893 */
 +.flex-auto {
 +  -webkit-box-flex: 1;
 +      -ms-flex: 1 1 auto;
 +          flex: 1 1 auto;
 +  min-width: 0; /* 1 */
 +  min-height: 0; /* 1 */
 +}
 +.flex-none { -webkit-box-flex: 0; -ms-flex: none; flex: none; }
 +.flex-column  { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
 +.flex-row     { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; }
 +.flex-wrap    { -ms-flex-wrap: wrap; flex-wrap: wrap; }
 +.flex-nowrap    { -ms-flex-wrap: nowrap; flex-wrap: nowrap; }
 +.flex-wrap-reverse    { -ms-flex-wrap: wrap-reverse; flex-wrap: wrap-reverse; }
 +.flex-column-reverse  { -webkit-box-orient: vertical; -webkit-box-direction: reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; }
 +.flex-row-reverse     { -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; }
 +.items-start    { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
 +.items-end      { -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; }
 +.items-center   { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
 +.items-baseline { -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline; }
 +.items-stretch  { -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; }
 +.self-start    { -ms-flex-item-align: start; align-self: flex-start; }
 +.self-end      { -ms-flex-item-align: end; align-self: flex-end; }
 +.self-center   { -ms-flex-item-align: center; align-self: center; }
 +.self-baseline { -ms-flex-item-align: baseline; align-self: baseline; }
 +.self-stretch  { -ms-flex-item-align: stretch; align-self: stretch; }
 +.justify-start   { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; }
 +.justify-end     { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }
 +.justify-center  { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
 +.justify-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }
 +.justify-around  { -ms-flex-pack: distribute; justify-content: space-around; }
 +.content-start   { -ms-flex-line-pack: start; align-content: flex-start; }
 +.content-end     { -ms-flex-line-pack: end; align-content: flex-end; }
 +.content-center  { -ms-flex-line-pack: center; align-content: center; }
 +.content-between { -ms-flex-line-pack: justify; align-content: space-between; }
 +.content-around  { -ms-flex-line-pack: distribute; align-content: space-around; }
 +.content-stretch { -ms-flex-line-pack: stretch; align-content: stretch; }
 +.order-0 { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; }
 +.order-1 { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; }
 +.order-2 { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; }
 +.order-3 { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; }
 +.order-4 { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; }
 +.order-5 { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; }
 +.order-6 { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; }
 +.order-7 { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; }
 +.order-8 { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; }
 +.order-last { -webkit-box-ordinal-group: 100000; -ms-flex-order: 99999; order: 99999; }
 +.flex-grow-0 { -webkit-box-flex: 0; -ms-flex-positive: 0; flex-grow: 0; }
 +.flex-grow-1 { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; }
 +.flex-shrink-0 { -ms-flex-negative: 0; flex-shrink: 0; }
 +.flex-shrink-1 { -ms-flex-negative: 1; flex-shrink: 1; }
 +@media screen and (min-width: 30em) {
 +  .flex-ns { display: -webkit-box; display: -ms-flexbox; display: flex; }
 +  .inline-flex-ns { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; }
 +  .flex-auto-ns {
 +    -webkit-box-flex: 1;
 +        -ms-flex: 1 1 auto;
 +            flex: 1 1 auto;
 +    min-width: 0; /* 1 */
 +    min-height: 0; /* 1 */
 +  }
 +  .flex-none-ns { -webkit-box-flex: 0; -ms-flex: none; flex: none; }
 +  .flex-column-ns { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
 +  .flex-row-ns { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; }
 +  .flex-wrap-ns { -ms-flex-wrap: wrap; flex-wrap: wrap; }
 +  .flex-nowrap-ns { -ms-flex-wrap: nowrap; flex-wrap: nowrap; }
 +  .flex-wrap-reverse-ns { -ms-flex-wrap: wrap-reverse; flex-wrap: wrap-reverse; }
 +  .flex-column-reverse-ns { -webkit-box-orient: vertical; -webkit-box-direction: reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; }
 +  .flex-row-reverse-ns { -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; }
 +  .items-start-ns { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
 +  .items-end-ns { -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; }
 +  .items-center-ns { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
 +  .items-baseline-ns { -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline; }
 +  .items-stretch-ns { -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; }
 +
 +  .self-start-ns { -ms-flex-item-align: start; align-self: flex-start; }
 +  .self-end-ns { -ms-flex-item-align: end; align-self: flex-end; }
 +  .self-center-ns { -ms-flex-item-align: center; align-self: center; }
 +  .self-baseline-ns { -ms-flex-item-align: baseline; align-self: baseline; }
 +  .self-stretch-ns { -ms-flex-item-align: stretch; align-self: stretch; }
 +
 +  .justify-start-ns { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; }
 +  .justify-end-ns { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }
 +  .justify-center-ns { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
 +  .justify-between-ns { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }
 +  .justify-around-ns { -ms-flex-pack: distribute; justify-content: space-around; }
 +
 +  .content-start-ns { -ms-flex-line-pack: start; align-content: flex-start; }
 +  .content-end-ns { -ms-flex-line-pack: end; align-content: flex-end; }
 +  .content-center-ns { -ms-flex-line-pack: center; align-content: center; }
 +  .content-between-ns { -ms-flex-line-pack: justify; align-content: space-between; }
 +  .content-around-ns { -ms-flex-line-pack: distribute; align-content: space-around; }
 +  .content-stretch-ns { -ms-flex-line-pack: stretch; align-content: stretch; }
 +
 +  .order-0-ns { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; }
 +  .order-1-ns { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; }
 +  .order-2-ns { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; }
 +  .order-3-ns { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; }
 +  .order-4-ns { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; }
 +  .order-5-ns { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; }
 +  .order-6-ns { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; }
 +  .order-7-ns { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; }
 +  .order-8-ns { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; }
 +  .order-last-ns { -webkit-box-ordinal-group: 100000; -ms-flex-order: 99999; order: 99999; }
 +
 +  .flex-grow-0-ns { -webkit-box-flex: 0; -ms-flex-positive: 0; flex-grow: 0; }
 +  .flex-grow-1-ns { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; }
 +
 +  .flex-shrink-0-ns { -ms-flex-negative: 0; flex-shrink: 0; }
 +  .flex-shrink-1-ns { -ms-flex-negative: 1; flex-shrink: 1; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .flex-m { display: -webkit-box; display: -ms-flexbox; display: flex; }
 +  .inline-flex-m { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; }
 +  .flex-auto-m {
 +    -webkit-box-flex: 1;
 +        -ms-flex: 1 1 auto;
 +            flex: 1 1 auto;
 +    min-width: 0; /* 1 */
 +    min-height: 0; /* 1 */
 +  }
 +  .flex-none-m { -webkit-box-flex: 0; -ms-flex: none; flex: none; }
 +  .flex-column-m { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
 +  .flex-row-m     { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; }
 +  .flex-wrap-m { -ms-flex-wrap: wrap; flex-wrap: wrap; }
 +  .flex-nowrap-m { -ms-flex-wrap: nowrap; flex-wrap: nowrap; }
 +  .flex-wrap-reverse-m { -ms-flex-wrap: wrap-reverse; flex-wrap: wrap-reverse; }
 +  .flex-column-reverse-m { -webkit-box-orient: vertical; -webkit-box-direction: reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; }
 +  .flex-row-reverse-m { -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; }
 +  .items-start-m { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
 +  .items-end-m { -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; }
 +  .items-center-m { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
 +  .items-baseline-m { -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline; }
 +  .items-stretch-m { -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; }
 +
 +  .self-start-m { -ms-flex-item-align: start; align-self: flex-start; }
 +  .self-end-m { -ms-flex-item-align: end; align-self: flex-end; }
 +  .self-center-m { -ms-flex-item-align: center; align-self: center; }
 +  .self-baseline-m { -ms-flex-item-align: baseline; align-self: baseline; }
 +  .self-stretch-m { -ms-flex-item-align: stretch; align-self: stretch; }
 +
 +  .justify-start-m { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; }
 +  .justify-end-m { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }
 +  .justify-center-m { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
 +  .justify-between-m { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }
 +  .justify-around-m { -ms-flex-pack: distribute; justify-content: space-around; }
 +
 +  .content-start-m { -ms-flex-line-pack: start; align-content: flex-start; }
 +  .content-end-m { -ms-flex-line-pack: end; align-content: flex-end; }
 +  .content-center-m { -ms-flex-line-pack: center; align-content: center; }
 +  .content-between-m { -ms-flex-line-pack: justify; align-content: space-between; }
 +  .content-around-m { -ms-flex-line-pack: distribute; align-content: space-around; }
 +  .content-stretch-m { -ms-flex-line-pack: stretch; align-content: stretch; }
 +
 +  .order-0-m { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; }
 +  .order-1-m { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; }
 +  .order-2-m { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; }
 +  .order-3-m { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; }
 +  .order-4-m { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; }
 +  .order-5-m { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; }
 +  .order-6-m { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; }
 +  .order-7-m { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; }
 +  .order-8-m { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; }
 +  .order-last-m { -webkit-box-ordinal-group: 100000; -ms-flex-order: 99999; order: 99999; }
 +
 +  .flex-grow-0-m { -webkit-box-flex: 0; -ms-flex-positive: 0; flex-grow: 0; }
 +  .flex-grow-1-m { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; }
 +
 +  .flex-shrink-0-m { -ms-flex-negative: 0; flex-shrink: 0; }
 +  .flex-shrink-1-m { -ms-flex-negative: 1; flex-shrink: 1; }
 +}
 +@media screen and (min-width: 60em) {
 +  .flex-l { display: -webkit-box; display: -ms-flexbox; display: flex; }
 +  .inline-flex-l { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; }
 +  .flex-auto-l {
 +    -webkit-box-flex: 1;
 +        -ms-flex: 1 1 auto;
 +            flex: 1 1 auto;
 +    min-width: 0; /* 1 */
 +    min-height: 0; /* 1 */
 +  }
 +  .flex-none-l { -webkit-box-flex: 0; -ms-flex: none; flex: none; }
 +  .flex-column-l { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
 +  .flex-row-l { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; }
 +  .flex-wrap-l { -ms-flex-wrap: wrap; flex-wrap: wrap; }
 +  .flex-nowrap-l { -ms-flex-wrap: nowrap; flex-wrap: nowrap; }
 +  .flex-wrap-reverse-l { -ms-flex-wrap: wrap-reverse; flex-wrap: wrap-reverse; }
 +  .flex-column-reverse-l { -webkit-box-orient: vertical; -webkit-box-direction: reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; }
 +  .flex-row-reverse-l { -webkit-box-orient: horizontal; -webkit-box-direction: reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; }
 +
 +  .items-start-l { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
 +  .items-end-l { -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; }
 +  .items-center-l { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
 +  .items-baseline-l { -webkit-box-align: baseline; -ms-flex-align: baseline; align-items: baseline; }
 +  .items-stretch-l { -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; }
 +
 +  .self-start-l { -ms-flex-item-align: start; align-self: flex-start; }
 +  .self-end-l { -ms-flex-item-align: end; align-self: flex-end; }
 +  .self-center-l { -ms-flex-item-align: center; align-self: center; }
 +  .self-baseline-l { -ms-flex-item-align: baseline; align-self: baseline; }
 +  .self-stretch-l { -ms-flex-item-align: stretch; align-self: stretch; }
 +
 +  .justify-start-l { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; }
 +  .justify-end-l { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }
 +  .justify-center-l { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
 +  .justify-between-l { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }
 +  .justify-around-l { -ms-flex-pack: distribute; justify-content: space-around; }
 +
 +  .content-start-l { -ms-flex-line-pack: start; align-content: flex-start; }
 +  .content-end-l { -ms-flex-line-pack: end; align-content: flex-end; }
 +  .content-center-l { -ms-flex-line-pack: center; align-content: center; }
 +  .content-between-l { -ms-flex-line-pack: justify; align-content: space-between; }
 +  .content-around-l { -ms-flex-line-pack: distribute; align-content: space-around; }
 +  .content-stretch-l { -ms-flex-line-pack: stretch; align-content: stretch; }
 +
 +  .order-0-l { -webkit-box-ordinal-group: 1; -ms-flex-order: 0; order: 0; }
 +  .order-1-l { -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; }
 +  .order-2-l { -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; }
 +  .order-3-l { -webkit-box-ordinal-group: 4; -ms-flex-order: 3; order: 3; }
 +  .order-4-l { -webkit-box-ordinal-group: 5; -ms-flex-order: 4; order: 4; }
 +  .order-5-l { -webkit-box-ordinal-group: 6; -ms-flex-order: 5; order: 5; }
 +  .order-6-l { -webkit-box-ordinal-group: 7; -ms-flex-order: 6; order: 6; }
 +  .order-7-l { -webkit-box-ordinal-group: 8; -ms-flex-order: 7; order: 7; }
 +  .order-8-l { -webkit-box-ordinal-group: 9; -ms-flex-order: 8; order: 8; }
 +  .order-last-l { -webkit-box-ordinal-group: 100000; -ms-flex-order: 99999; order: 99999; }
 +
 +  .flex-grow-0-l { -webkit-box-flex: 0; -ms-flex-positive: 0; flex-grow: 0; }
 +  .flex-grow-1-l { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; }
 +
 +  .flex-shrink-0-l { -ms-flex-negative: 0; flex-shrink: 0; }
 +  .flex-shrink-1-l { -ms-flex-negative: 1; flex-shrink: 1; }
 +}
 +/*
 +
 +   FLOATS
 +   http://tachyons.io/docs/layout/floats/
 +
 +   1. Floated elements are automatically rendered as block level elements.
 +      Setting floats to display inline will fix the double margin bug in
 +      ie6. You know... just in case.
 +
 +   2. Don't forget to clearfix your floats with .cf
 +
 +   Base:
 +     f = float
 +
 +   Modifiers:
 +     l = left
 +     r = right
 +     n = none
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.fl { float: left;  _display: inline; }
 +.fr { float: right; _display: inline; }
 +.fn { float: none; }
 +@media screen and (min-width: 30em) {
 +  .fl-ns { float: left; _display: inline; }
 +  .fr-ns { float: right; _display: inline; }
 +  .fn-ns { float: none; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .fl-m { float: left; _display: inline; }
 +  .fr-m { float: right; _display: inline; }
 +  .fn-m { float: none; }
 +}
 +@media screen and (min-width: 60em) {
 +  .fl-l { float: left; _display: inline; }
 +  .fr-l { float: right; _display: inline; }
 +  .fn-l { float: none; }
 +}
 +/*@import 'tachyons/src/_font-family';*/
 +/*
 +
 +   FONT STYLE
 +   Docs: http://tachyons.io/docs/typography/font-style/
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.i         { font-style: italic; }
 +.fs-normal { font-style: normal; }
 +@media screen and (min-width: 30em) {
 +  .i-ns       { font-style: italic; }
 +  .fs-normal-ns     { font-style: normal; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .i-m       { font-style: italic; }
 +  .fs-normal-m     { font-style: normal; }
 +}
 +@media screen and (min-width: 60em) {
 +  .i-l       { font-style: italic; }
 +  .fs-normal-l     { font-style: normal; }
 +}
 +/*
 +
 +   FONT WEIGHT
 +   Docs: http://tachyons.io/docs/typography/font-weight/
 +
 +   Base
 +     fw = font-weight
 +
 +   Modifiers:
 +     1 = literal value 100
 +     2 = literal value 200
 +     3 = literal value 300
 +     4 = literal value 400
 +     5 = literal value 500
 +     6 = literal value 600
 +     7 = literal value 700
 +     8 = literal value 800
 +     9 = literal value 900
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.normal { font-weight: normal; }
 +.b      { font-weight: bold; }
 +.fw1    { font-weight: 100; }
 +.fw2    { font-weight: 200; }
 +.fw3    { font-weight: 300; }
 +.fw4    { font-weight: 400; }
 +.fw5    { font-weight: 500; }
 +.fw6    { font-weight: 600; }
 +.fw7    { font-weight: 700; }
 +.fw8    { font-weight: 800; }
 +.fw9    { font-weight: 900; }
 +@media screen and (min-width: 30em) {
 +  .normal-ns { font-weight: normal; }
 +  .b-ns      { font-weight: bold; }
 +  .fw1-ns    { font-weight: 100; }
 +  .fw2-ns    { font-weight: 200; }
 +  .fw3-ns    { font-weight: 300; }
 +  .fw4-ns    { font-weight: 400; }
 +  .fw5-ns    { font-weight: 500; }
 +  .fw6-ns    { font-weight: 600; }
 +  .fw7-ns    { font-weight: 700; }
 +  .fw8-ns    { font-weight: 800; }
 +  .fw9-ns    { font-weight: 900; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .normal-m { font-weight: normal; }
 +  .b-m      { font-weight: bold; }
 +  .fw1-m    { font-weight: 100; }
 +  .fw2-m    { font-weight: 200; }
 +  .fw3-m    { font-weight: 300; }
 +  .fw4-m    { font-weight: 400; }
 +  .fw5-m    { font-weight: 500; }
 +  .fw6-m    { font-weight: 600; }
 +  .fw7-m    { font-weight: 700; }
 +  .fw8-m    { font-weight: 800; }
 +  .fw9-m    { font-weight: 900; }
 +}
 +@media screen and (min-width: 60em) {
 +  .normal-l { font-weight: normal; }
 +  .b-l      { font-weight: bold; }
 +  .fw1-l    { font-weight: 100; }
 +  .fw2-l    { font-weight: 200; }
 +  .fw3-l    { font-weight: 300; }
 +  .fw4-l    { font-weight: 400; }
 +  .fw5-l    { font-weight: 500; }
 +  .fw6-l    { font-weight: 600; }
 +  .fw7-l    { font-weight: 700; }
 +  .fw8-l    { font-weight: 800; }
 +  .fw9-l    { font-weight: 900; }
 +}
 +/*
 +
 +   FORMS
 +   
 +*/
 +.input-reset {
 +  -webkit-appearance: none;
 +  -moz-appearance: none;
 +}
 +.button-reset::-moz-focus-inner,
 +.input-reset::-moz-focus-inner {
 +  border: 0;
 +  padding: 0;
 +}
 +/*
 +
 +   HEIGHTS
 +   Docs: http://tachyons.io/docs/layout/heights/
 +
 +   Base:
 +     h = height
 +     min-h = min-height
 +     min-vh = min-height vertical screen height
 +     vh = vertical screen height
 +
 +   Modifiers
 +     1 = 1st step in height scale
 +     2 = 2nd step in height scale
 +     3 = 3rd step in height scale
 +     4 = 4th step in height scale
 +     5 = 5th step in height scale
 +
 +     -25   = literal value 25%
 +     -50   = literal value 50%
 +     -75   = literal value 75%
 +     -100  = literal value 100%
 +
 +     -auto = string value of auto
 +     -inherit = string value of inherit
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +/* Height Scale */
 +.h1 { height: 1rem; }
 +.h2 { height: 2rem; }
 +.h3 { height: 4rem; }
 +.h4 { height: 8rem; }
 +.h5 { height: 16rem; }
 +/* Height Percentages - Based off of height of parent */
 +.h-25 {  height:  25%; }
 +.h-50 {  height:  50%; }
 +.h-75 {  height:  75%; }
 +.h-100 { height: 100%; }
 +.min-h-100 { min-height: 100%; }
 +/* Screen Height Percentage */
 +.vh-25 {  height:  25vh; }
 +.vh-50 {  height:  50vh; }
 +.vh-75 {  height:  75vh; }
 +.vh-100 { height: 100vh; }
 +.min-vh-100 { min-height: 100vh; }
 +/* String Properties */
 +.h-auto {     height: auto; }
 +.h-inherit {  height: inherit; }
 +@media screen and (min-width: 30em) {
 +  .h1-ns {  height: 1rem; }
 +  .h2-ns {  height: 2rem; }
 +  .h3-ns {  height: 4rem; }
 +  .h4-ns {  height: 8rem; }
 +  .h5-ns {  height: 16rem; }
 +  .h-25-ns { height: 25%; }
 +  .h-50-ns { height: 50%; }
 +  .h-75-ns { height: 75%; }
 +  .h-100-ns { height: 100%; }
 +  .min-h-100-ns { min-height: 100%; }
 +  .vh-25-ns {  height:  25vh; }
 +  .vh-50-ns {  height:  50vh; }
 +  .vh-75-ns {  height:  75vh; }
 +  .vh-100-ns { height: 100vh; }
 +  .min-vh-100-ns { min-height: 100vh; }
 +  .h-auto-ns { height: auto; }
 +  .h-inherit-ns { height: inherit; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .h1-m { height: 1rem; }
 +  .h2-m { height: 2rem; }
 +  .h3-m { height: 4rem; }
 +  .h4-m { height: 8rem; }
 +  .h5-m { height: 16rem; }
 +  .h-25-m { height: 25%; }
 +  .h-50-m { height: 50%; }
 +  .h-75-m { height: 75%; }
 +  .h-100-m { height: 100%; }
 +  .min-h-100-m { min-height: 100%; }
 +  .vh-25-m {  height:  25vh; }
 +  .vh-50-m {  height:  50vh; }
 +  .vh-75-m {  height:  75vh; }
 +  .vh-100-m { height: 100vh; }
 +  .min-vh-100-m { min-height: 100vh; }
 +  .h-auto-m { height: auto; }
 +  .h-inherit-m { height: inherit; }
 +}
 +@media screen and (min-width: 60em) {
 +  .h1-l { height: 1rem; }
 +  .h2-l { height: 2rem; }
 +  .h3-l { height: 4rem; }
 +  .h4-l { height: 8rem; }
 +  .h5-l { height: 16rem; }
 +  .h-25-l { height: 25%; }
 +  .h-50-l { height: 50%; }
 +  .h-75-l { height: 75%; }
 +  .h-100-l { height: 100%; }
 +  .min-h-100-l { min-height: 100%; }
 +  .vh-25-l {  height:  25vh; }
 +  .vh-50-l {  height:  50vh; }
 +  .vh-75-l {  height:  75vh; }
 +  .vh-100-l { height: 100vh; }
 +  .min-vh-100-l { min-height: 100vh; }
 +  .h-auto-l { height: auto; }
 +  .h-inherit-l { height: inherit; }
 +}
 +/*
 +
 +   LETTER SPACING
 +   Docs: http://tachyons.io/docs/typography/tracking/
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.tracked       { letter-spacing:  .1em; }
 +.tracked-tight { letter-spacing: -.05em; }
 +.tracked-mega  { letter-spacing:  .25em; }
 +@media screen and (min-width: 30em) {
 +  .tracked-ns       { letter-spacing:  .1em; }
 +  .tracked-tight-ns { letter-spacing: -.05em; }
 +  .tracked-mega-ns  { letter-spacing:  .25em; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .tracked-m       { letter-spacing:  .1em; }
 +  .tracked-tight-m { letter-spacing: -.05em; }
 +  .tracked-mega-m  { letter-spacing:  .25em; }
 +}
 +@media screen and (min-width: 60em) {
 +  .tracked-l       { letter-spacing:  .1em; }
 +  .tracked-tight-l { letter-spacing: -.05em; }
 +  .tracked-mega-l  { letter-spacing:  .25em; }
 +}
 +/*
 +
 +   LINE HEIGHT / LEADING
 +   Docs: http://tachyons.io/docs/typography/line-height
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.lh-solid { line-height: 1; }
 +.lh-title { line-height: 1.25; }
 +.lh-copy  { line-height: 1.5; }
 +@media screen and (min-width: 30em) {
 +  .lh-solid-ns { line-height: 1; }
 +  .lh-title-ns { line-height: 1.25; }
 +  .lh-copy-ns  { line-height: 1.5; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .lh-solid-m { line-height: 1; }
 +  .lh-title-m { line-height: 1.25; }
 +  .lh-copy-m  { line-height: 1.5; }
 +}
 +@media screen and (min-width: 60em) {
 +  .lh-solid-l { line-height: 1; }
 +  .lh-title-l { line-height: 1.25; }
 +  .lh-copy-l  { line-height: 1.5; }
 +}
 +/*
 +
 +   LINKS
 +   Docs: http://tachyons.io/docs/elements/links/
 +
 +*/
 +.link {
 +  text-decoration: none;
 +  -webkit-transition: color .15s ease-in;
 +  transition: color .15s ease-in;
 +}
 +.link:link,
 +.link:visited {
 +  -webkit-transition: color .15s ease-in;
 +  transition: color .15s ease-in;
 +}
 +.link:hover   {
 +  -webkit-transition: color .15s ease-in;
 +  transition: color .15s ease-in;
 +}
 +.link:active  {
 +  -webkit-transition: color .15s ease-in;
 +  transition: color .15s ease-in;
 +}
 +.link:focus   {
 +  -webkit-transition: color .15s ease-in;
 +  transition: color .15s ease-in;
 +  outline: 1px dotted currentColor;
 +}
 +/*
 +
 +   LISTS
 +   http://tachyons.io/docs/elements/lists/
 +
 +*/
 +.list {         list-style-type: none; }
 +/*
 +
 +   MAX WIDTHS
 +   Docs: http://tachyons.io/docs/layout/max-widths/
 +
 +   Base:
 +     mw = max-width
 +
 +   Modifiers
 +     1 = 1st step in width scale
 +     2 = 2nd step in width scale
 +     3 = 3rd step in width scale
 +     4 = 4th step in width scale
 +     5 = 5th step in width scale
 +     6 = 6st step in width scale
 +     7 = 7nd step in width scale
 +     8 = 8rd step in width scale
 +     9 = 9th step in width scale
 +
 +     -100 = literal value 100%
 +
 +     -none  = string value none
 +
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +/* Max Width Percentages */
 +.mw-100  { max-width: 100%; }
 +/* Max Width Scale */
 +.mw1  {  max-width: 1rem; }
 +.mw2  {  max-width: 2rem; }
 +.mw3  {  max-width: 4rem; }
 +.mw4  {  max-width: 8rem; }
 +.mw5  {  max-width: 16rem; }
 +.mw6  {  max-width: 32rem; }
 +.mw7  {  max-width: 48rem; }
 +.mw8  {  max-width: 64rem; }
 +.mw9  {  max-width: 96rem; }
 +/* Max Width String Properties */
 +.mw-none { max-width: none; }
 +@media screen and (min-width: 30em) {
 +  .mw-100-ns  { max-width: 100%; }
 +
 +  .mw1-ns  {  max-width: 1rem; }
 +  .mw2-ns  {  max-width: 2rem; }
 +  .mw3-ns  {  max-width: 4rem; }
 +  .mw4-ns  {  max-width: 8rem; }
 +  .mw5-ns  {  max-width: 16rem; }
 +  .mw6-ns  {  max-width: 32rem; }
 +  .mw7-ns  {  max-width: 48rem; }
 +  .mw8-ns  {  max-width: 64rem; }
 +  .mw9-ns  {  max-width: 96rem; }
 +
 +  .mw-none-ns { max-width: none; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .mw-100-m  { max-width: 100%; }
 +
 +  .mw1-m  {  max-width: 1rem; }
 +  .mw2-m  {  max-width: 2rem; }
 +  .mw3-m  {  max-width: 4rem; }
 +  .mw4-m  {  max-width: 8rem; }
 +  .mw5-m  {  max-width: 16rem; }
 +  .mw6-m  {  max-width: 32rem; }
 +  .mw7-m  {  max-width: 48rem; }
 +  .mw8-m  {  max-width: 64rem; }
 +  .mw9-m  {  max-width: 96rem; }
 +
 +  .mw-none-m { max-width: none; }
 +}
 +@media screen and (min-width: 60em) {
 +  .mw-100-l  { max-width: 100%; }
 +
 +  .mw1-l  {  max-width: 1rem; }
 +  .mw2-l  {  max-width: 2rem; }
 +  .mw3-l  {  max-width: 4rem; }
 +  .mw4-l  {  max-width: 8rem; }
 +  .mw5-l  {  max-width: 16rem; }
 +  .mw6-l  {  max-width: 32rem; }
 +  .mw7-l  {  max-width: 48rem; }
 +  .mw8-l  {  max-width: 64rem; }
 +  .mw9-l  {  max-width: 96rem; }
 +
 +  .mw-none-l { max-width: none; }
 +}
 +/*
 +
 +   WIDTHS
 +   Docs: http://tachyons.io/docs/layout/widths/
 +
 +   Base:
 +     w = width
 +
 +   Modifiers
 +     1 = 1st step in width scale
 +     2 = 2nd step in width scale
 +     3 = 3rd step in width scale
 +     4 = 4th step in width scale
 +     5 = 5th step in width scale
 +
 +     -10  = literal value 10%
 +     -20  = literal value 20%
 +     -25  = literal value 25%
 +     -30  = literal value 30%
 +     -33  = literal value 33%
 +     -34  = literal value 34%
 +     -40  = literal value 40%
 +     -50  = literal value 50%
 +     -60  = literal value 60%
 +     -70  = literal value 70%
 +     -75  = literal value 75%
 +     -80  = literal value 80%
 +     -90  = literal value 90%
 +     -100 = literal value 100%
 +
 +     -third      = 100% / 3 (Not supported in opera mini or IE8)
 +     -two-thirds = 100% / 1.5 (Not supported in opera mini or IE8)
 +     -auto       = string value auto
 +
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +/* Width Scale */
 +.w1 {    width: 1rem; }
 +.w2 {    width: 2rem; }
 +.w3 {    width: 4rem; }
 +.w4 {    width: 8rem; }
 +.w5 {    width: 16rem; }
 +.w-10 {  width:  10%; }
 +.w-20 {  width:  20%; }
 +.w-25 {  width:  25%; }
 +.w-30 {  width:  30%; }
 +.w-33 {  width:  33%; }
 +.w-34 {  width:  34%; }
 +.w-40 {  width:  40%; }
 +.w-50 {  width:  50%; }
 +.w-60 {  width:  60%; }
 +.w-70 {  width:  70%; }
 +.w-75 {  width:  75%; }
 +.w-80 {  width:  80%; }
 +.w-90 {  width:  90%; }
 +.w-100 { width: 100%; }
 +.w-third { width: 33.33333%; }
 +.w-two-thirds { width: 66.66667%; }
 +.w-auto { width: auto; }
 +@media screen and (min-width: 30em) {
 +  .w1-ns {  width: 1rem; }
 +  .w2-ns {  width: 2rem; }
 +  .w3-ns {  width: 4rem; }
 +  .w4-ns {  width: 8rem; }
 +  .w5-ns {  width: 16rem; }
 +  .w-10-ns { width:  10%; }
 +  .w-20-ns { width:  20%; }
 +  .w-25-ns { width:  25%; }
 +  .w-30-ns { width:  30%; }
 +  .w-33-ns { width:  33%; }
 +  .w-34-ns { width:  34%; }
 +  .w-40-ns { width:  40%; }
 +  .w-50-ns { width:  50%; }
 +  .w-60-ns { width:  60%; }
 +  .w-70-ns { width:  70%; }
 +  .w-75-ns { width:  75%; }
 +  .w-80-ns { width:  80%; }
 +  .w-90-ns { width:  90%; }
 +  .w-100-ns { width: 100%; }
 +  .w-third-ns { width: 33.33333%; }
 +  .w-two-thirds-ns { width: 66.66667%; }
 +  .w-auto-ns { width: auto; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .w1-m {      width: 1rem; }
 +  .w2-m {      width: 2rem; }
 +  .w3-m {      width: 4rem; }
 +  .w4-m {      width: 8rem; }
 +  .w5-m {      width: 16rem; }
 +  .w-10-m { width:  10%; }
 +  .w-20-m { width:  20%; }
 +  .w-25-m { width:  25%; }
 +  .w-30-m { width:  30%; }
 +  .w-33-m { width:  33%; }
 +  .w-34-m { width:  34%; }
 +  .w-40-m { width:  40%; }
 +  .w-50-m { width:  50%; }
 +  .w-60-m { width:  60%; }
 +  .w-70-m { width:  70%; }
 +  .w-75-m { width:  75%; }
 +  .w-80-m { width:  80%; }
 +  .w-90-m { width:  90%; }
 +  .w-100-m { width: 100%; }
 +  .w-third-m { width: 33.33333%; }
 +  .w-two-thirds-m { width: 66.66667%; }
 +  .w-auto-m {    width: auto; }
 +}
 +@media screen and (min-width: 60em) {
 +  .w1-l {      width: 1rem; }
 +  .w2-l {      width: 2rem; }
 +  .w3-l {      width: 4rem; }
 +  .w4-l {      width: 8rem; }
 +  .w5-l {      width: 16rem; }
 +  .w-10-l {    width:  10%; }
 +  .w-20-l {    width:  20%; }
 +  .w-25-l {    width:  25%; }
 +  .w-30-l {    width:  30%; }
 +  .w-33-l {    width:  33%; }
 +  .w-34-l {    width:  34%; }
 +  .w-40-l {    width:  40%; }
 +  .w-50-l {    width:  50%; }
 +  .w-60-l {    width:  60%; }
 +  .w-70-l {    width:  70%; }
 +  .w-75-l {    width:  75%; }
 +  .w-80-l {    width:  80%; }
 +  .w-90-l {    width:  90%; }
 +  .w-100-l {   width: 100%; }
 +  .w-third-l { width: 33.33333%; }
 +  .w-two-thirds-l { width: 66.66667%; }
 +  .w-auto-l {    width: auto; }
 +}
 +/*
 +
 +    OVERFLOW
 +
 +    Media Query Extensions:
 +      -ns = not-small
 +      -m  = medium
 +      -l  = large
 +
 + */
 +.overflow-visible { overflow: visible; }
 +.overflow-hidden { overflow: hidden; }
 +.overflow-scroll { overflow: scroll; }
 +.overflow-auto { overflow: auto; }
 +.overflow-x-visible { overflow-x: visible; }
 +.overflow-x-hidden { overflow-x: hidden; }
 +.overflow-x-scroll { overflow-x: scroll; }
 +.overflow-x-auto { overflow-x: auto; }
 +.overflow-y-visible { overflow-y: visible; }
 +.overflow-y-hidden { overflow-y: hidden; }
 +.overflow-y-scroll { overflow-y: scroll; }
 +.overflow-y-auto { overflow-y: auto; }
 +@media screen and (min-width: 30em) {
 +  .overflow-visible-ns { overflow: visible; }
 +  .overflow-hidden-ns { overflow: hidden; }
 +  .overflow-scroll-ns { overflow: scroll; }
 +  .overflow-auto-ns { overflow: auto; }
 +  .overflow-x-visible-ns { overflow-x: visible; }
 +  .overflow-x-hidden-ns { overflow-x: hidden; }
 +  .overflow-x-scroll-ns { overflow-x: scroll; }
 +  .overflow-x-auto-ns { overflow-x: auto; }
 +
 +  .overflow-y-visible-ns { overflow-y: visible; }
 +  .overflow-y-hidden-ns { overflow-y: hidden; }
 +  .overflow-y-scroll-ns { overflow-y: scroll; }
 +  .overflow-y-auto-ns { overflow-y: auto; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .overflow-visible-m { overflow: visible; }
 +  .overflow-hidden-m { overflow: hidden; }
 +  .overflow-scroll-m { overflow: scroll; }
 +  .overflow-auto-m { overflow: auto; }
 +
 +  .overflow-x-visible-m { overflow-x: visible; }
 +  .overflow-x-hidden-m { overflow-x: hidden; }
 +  .overflow-x-scroll-m { overflow-x: scroll; }
 +  .overflow-x-auto-m { overflow-x: auto; }
 +
 +  .overflow-y-visible-m { overflow-y: visible; }
 +  .overflow-y-hidden-m { overflow-y: hidden; }
 +  .overflow-y-scroll-m { overflow-y: scroll; }
 +  .overflow-y-auto-m { overflow-y: auto; }
 +}
 +@media screen and (min-width: 60em) {
 +  .overflow-visible-l { overflow: visible; }
 +  .overflow-hidden-l { overflow: hidden; }
 +  .overflow-scroll-l { overflow: scroll; }
 +  .overflow-auto-l { overflow: auto; }
 +
 +  .overflow-x-visible-l { overflow-x: visible; }
 +  .overflow-x-hidden-l { overflow-x: hidden; }
 +  .overflow-x-scroll-l { overflow-x: scroll; }
 +  .overflow-x-auto-l { overflow-x: auto; }
 +
 +  .overflow-y-visible-l { overflow-y: visible; }
 +  .overflow-y-hidden-l { overflow-y: hidden; }
 +  .overflow-y-scroll-l { overflow-y: scroll; }
 +  .overflow-y-auto-l { overflow-y: auto; }
 +}
 +/*
 +
 +   POSITIONING
 +   Docs: http://tachyons.io/docs/layout/position/
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.static { position: static; }
 +.relative  { position: relative; }
 +.absolute  { position: absolute; }
 +.fixed  { position: fixed; }
 +@media screen and (min-width: 30em) {
 +  .static-ns { position: static; }
 +  .relative-ns  { position: relative; }
 +  .absolute-ns  { position: absolute; }
 +  .fixed-ns  { position: fixed; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .static-m { position: static; }
 +  .relative-m  { position: relative; }
 +  .absolute-m  { position: absolute; }
 +  .fixed-m  { position: fixed; }
 +}
 +@media screen and (min-width: 60em) {
 +  .static-l { position: static; }
 +  .relative-l  { position: relative; }
 +  .absolute-l  { position: absolute; }
 +  .fixed-l  { position: fixed; }
 +}
 +/*
 +
 +    OPACITY
 +    Docs: http://tachyons.io/docs/themes/opacity/
 +
 +*/
 +.o-100 { opacity: 1;    }
 +.o-90  { opacity: .9;   }
 +.o-80  { opacity: .8;   }
 +.o-70  { opacity: .7;   }
 +.o-60  { opacity: .6;   }
 +.o-50  { opacity: .5;   }
 +.o-40  { opacity: .4;   }
 +.o-30  { opacity: .3;   }
 +.o-20  { opacity: .2;   }
 +.o-10  { opacity: .1;   }
 +.o-05  { opacity: .05;  }
 +.o-025 { opacity: .025; }
 +.o-0   { opacity: 0; }
 +/*@import 'tachyons/src/_rotations';*/
 +/*
 +
 +   SKINS
 +   Docs: http://tachyons.io/docs/themes/skins/
 +
 +   Classes for setting foreground and background colors on elements.
 +   If you haven't declared a border color, but set border on an element, it will 
 +   be set to the current text color. 
 +
 +*/
 +/* Text colors */
 +.black-90 {         color: rgba(0, 0, 0, .9); }
 +.black-80 {         color: rgba(0, 0, 0, .8); }
 +.black-70 {         color: rgba(0, 0, 0, .7); }
 +.black-60 {         color: rgba(0, 0, 0, .6); }
 +.black-50 {         color: rgba(0, 0, 0, .5); }
 +.black-40 {         color: rgba(0, 0, 0, .4); }
 +.black-30 {         color: rgba(0, 0, 0, .3); }
 +.black-20 {         color: rgba(0, 0, 0, .2); }
 +.black-10 {         color: rgba(0, 0, 0, .1); }
 +.black-05 {         color: rgba(0, 0, 0, .05); }
 +.white-90 {         color: rgba(255, 255, 255, .9); }
 +.white-80 {         color: rgba(255, 255, 255, .8); }
 +.white-70 {         color: rgba(255, 255, 255, .7); }
 +.white-60 {         color: rgba(255, 255, 255, .6); }
 +.white-50 {         color: rgba(255, 255, 255, .5); }
 +.white-40 {         color: rgba(255, 255, 255, .4); }
 +.white-30 {         color: rgba(255, 255, 255, .3); }
 +.white-20 {         color: rgba(255, 255, 255, .2); }
 +.white-10 {         color: rgba(255, 255, 255, .1); }
 +.black {         color: #000; }
 +.near-black {    color: #111; }
 +.dark-gray {     color: #333; }
 +.mid-gray {      color: #555; }
 +.gray {          color: #777; }
 +.silver  {       color: #999; }
 +.light-silver {  color: #aaa; }
 +.moon-gray {     color: #ccc; }
 +.light-gray {    color: #eee; }
 +.near-white {    color: #f4f4f4; }
 +.white {         color: #fff; }
 +.dark-red { color: #e7040f; }
 +.red { color: #ff4136; }
 +.light-red { color: #ff725c; }
 +.orange { color: #ff6300; }
 +.gold { color: #ffb700; }
 +.yellow { color: #ffd700; }
 +.light-yellow { color: #fbf1a9; }
 +.purple { color: #5e2ca5; }
 +.light-purple { color: #a463f2; }
 +.dark-pink { color: #d5008f; }
 +.hot-pink { color: #ff41b4; }
 +.pink { color: #ff80cc; }
 +.light-pink { color: #ffa3d7; }
 +.dark-green { color: #137752; }
 +.green { color: #19a974; }
 +.light-green { color: #9eebcf; }
 +.navy { color: #001b44; }
 +.dark-blue { color: #00449e; }
 +.blue { color: #0594CB; }
 +.light-blue { color: #96ccff; }
 +.lightest-blue { color: #cdecff; }
 +.washed-blue { color: #f6fffe; }
 +.washed-green { color: #e8fdf5; }
 +.washed-yellow { color: #fffceb; }
 +.washed-red { color: #ffdfdf; }
 +.color-inherit { color: inherit; }
 +.bg-black-90 {         background-color: rgba(0, 0, 0, .9); }
 +.bg-black-80 {         background-color: rgba(0, 0, 0, .8); }
 +.bg-black-70 {         background-color: rgba(0, 0, 0, .7); }
 +.bg-black-60 {         background-color: rgba(0, 0, 0, .6); }
 +.bg-black-50 {         background-color: rgba(0, 0, 0, .5); }
 +.bg-black-40 {         background-color: rgba(0, 0, 0, .4); }
 +.bg-black-30 {         background-color: rgba(0, 0, 0, .3); }
 +.bg-black-20 {         background-color: rgba(0, 0, 0, .2); }
 +.bg-black-10 {         background-color: rgba(0, 0, 0, .1); }
 +.bg-black-05 {         background-color: rgba(0, 0, 0, .05); }
 +.bg-white-90 {        background-color: rgba(255, 255, 255, .9); }
 +.bg-white-80 {        background-color: rgba(255, 255, 255, .8); }
 +.bg-white-70 {        background-color: rgba(255, 255, 255, .7); }
 +.bg-white-60 {        background-color: rgba(255, 255, 255, .6); }
 +.bg-white-50 {        background-color: rgba(255, 255, 255, .5); }
 +.bg-white-40 {        background-color: rgba(255, 255, 255, .4); }
 +.bg-white-30 {        background-color: rgba(255, 255, 255, .3); }
 +.bg-white-20 {        background-color: rgba(255, 255, 255, .2); }
 +.bg-white-10 {        background-color: rgba(255, 255, 255, .1); }
 +/* Background colors */
 +.bg-black {         background-color: #000; }
 +.bg-near-black {    background-color: #111; }
 +.bg-dark-gray {     background-color: #333; }
 +.bg-mid-gray {      background-color: #555; }
 +.bg-gray {          background-color: #777; }
 +.bg-silver  {       background-color: #999; }
 +.bg-light-silver {  background-color: #aaa; }
 +.bg-moon-gray {     background-color: #ccc; }
 +.bg-light-gray {    background-color: #eee; }
 +.bg-near-white {    background-color: #f4f4f4; }
 +.bg-white {         background-color: #fff; }
 +.bg-transparent {   background-color: transparent; }
 +.bg-dark-red { background-color: #e7040f; }
 +.bg-red { background-color: #ff4136; }
 +.bg-light-red { background-color: #ff725c; }
 +.bg-orange { background-color: #ff6300; }
 +.bg-gold { background-color: #ffb700; }
 +.bg-yellow { background-color: #ffd700; }
 +.bg-light-yellow { background-color: #fbf1a9; }
 +.bg-purple { background-color: #5e2ca5; }
 +.bg-light-purple { background-color: #a463f2; }
 +.bg-dark-pink { background-color: #d5008f; }
 +.bg-hot-pink { background-color: #ff41b4; }
 +.bg-pink { background-color: #ff80cc; }
 +.bg-light-pink { background-color: #ffa3d7; }
 +.bg-dark-green { background-color: #137752; }
 +.bg-green { background-color: #19a974; }
 +.bg-light-green { background-color: #9eebcf; }
 +.bg-navy { background-color: #001b44; }
 +.bg-dark-blue { background-color: #00449e; }
 +.bg-blue { background-color: #0594CB; }
 +.bg-light-blue { background-color: #96ccff; }
 +.bg-lightest-blue { background-color: #cdecff; }
 +.bg-washed-blue { background-color: #f6fffe; }
 +.bg-washed-green { background-color: #e8fdf5; }
 +.bg-washed-yellow { background-color: #fffceb; }
 +.bg-washed-red { background-color: #ffdfdf; }
 +.bg-inherit { background-color: inherit; }
 +/* 
 +  
 +   SKINS:PSEUDO
 +
 +   Customize the color of an element when
 +   it is focused or hovered over.
 + 
 + */
 +.hover-black:hover, 
 +.hover-black:focus { color: #000; }
 +.hover-near-black:hover, 
 +.hover-near-black:focus { color: #111; }
 +.hover-dark-gray:hover, 
 +.hover-dark-gray:focus { color: #333; }
 +.hover-mid-gray:hover, 
 +.hover-mid-gray:focus { color: #555; }
 +.hover-gray:hover, 
 +.hover-gray:focus { color: #777; }
 +.hover-silver:hover, 
 +.hover-silver:focus { color: #999; }
 +.hover-light-silver:hover, 
 +.hover-light-silver:focus { color: #aaa; }
 +.hover-moon-gray:hover, 
 +.hover-moon-gray:focus { color: #ccc; }
 +.hover-light-gray:hover, 
 +.hover-light-gray:focus { color: #eee; }
 +.hover-near-white:hover, 
 +.hover-near-white:focus { color: #f4f4f4; }
 +.hover-white:hover, 
 +.hover-white:focus { color: #fff; }
 +.hover-black-90:hover,
 +.hover-black-90:focus { color: rgba(0, 0, 0, .9); }
 +.hover-black-80:hover,
 +.hover-black-80:focus { color: rgba(0, 0, 0, .8); }
 +.hover-black-70:hover,
 +.hover-black-70:focus { color: rgba(0, 0, 0, .7); }
 +.hover-black-60:hover,
 +.hover-black-60:focus { color: rgba(0, 0, 0, .6); }
 +.hover-black-50:hover,
 +.hover-black-50:focus { color: rgba(0, 0, 0, .5); }
 +.hover-black-40:hover,
 +.hover-black-40:focus { color: rgba(0, 0, 0, .4); }
 +.hover-black-30:hover,
 +.hover-black-30:focus { color: rgba(0, 0, 0, .3); }
 +.hover-black-20:hover,
 +.hover-black-20:focus { color: rgba(0, 0, 0, .2); }
 +.hover-black-10:hover,
 +.hover-black-10:focus { color: rgba(0, 0, 0, .1); }
 +.hover-white-90:hover,
 +.hover-white-90:focus { color: rgba(255, 255, 255, .9); }
 +.hover-white-80:hover,
 +.hover-white-80:focus { color: rgba(255, 255, 255, .8); }
 +.hover-white-70:hover,
 +.hover-white-70:focus { color: rgba(255, 255, 255, .7); }
 +.hover-white-60:hover,
 +.hover-white-60:focus { color: rgba(255, 255, 255, .6); }
 +.hover-white-50:hover,
 +.hover-white-50:focus { color: rgba(255, 255, 255, .5); }
 +.hover-white-40:hover,
 +.hover-white-40:focus { color: rgba(255, 255, 255, .4); }
 +.hover-white-30:hover,
 +.hover-white-30:focus { color: rgba(255, 255, 255, .3); }
 +.hover-white-20:hover,
 +.hover-white-20:focus { color: rgba(255, 255, 255, .2); }
 +.hover-white-10:hover,
 +.hover-white-10:focus { color: rgba(255, 255, 255, .1); }
 +.hover-inherit:hover,
 +.hover-inherit:focus { color: inherit; }
 +.hover-bg-black:hover, 
 +.hover-bg-black:focus { background-color: #000; }
 +.hover-bg-near-black:hover, 
 +.hover-bg-near-black:focus { background-color: #111; }
 +.hover-bg-dark-gray:hover, 
 +.hover-bg-dark-gray:focus { background-color: #333; }
 +.hover-bg-mid-gray:hover, 
 +.hover-bg-mid-gray:focus { background-color: #555; }
 +.hover-bg-gray:hover, 
 +.hover-bg-gray:focus { background-color: #777; }
 +.hover-bg-silver:hover, 
 +.hover-bg-silver:focus { background-color: #999; }
 +.hover-bg-light-silver:hover, 
 +.hover-bg-light-silver:focus { background-color: #aaa; }
 +.hover-bg-moon-gray:hover, 
 +.hover-bg-moon-gray:focus { background-color: #ccc; }
 +.hover-bg-light-gray:hover, 
 +.hover-bg-light-gray:focus { background-color: #eee; }
 +.hover-bg-near-white:hover, 
 +.hover-bg-near-white:focus { background-color: #f4f4f4; }
 +.hover-bg-white:hover, 
 +.hover-bg-white:focus { background-color: #fff; }
 +.hover-bg-transparent:hover, 
 +.hover-bg-transparent:focus { background-color: transparent; }
 +.hover-bg-black-90:hover,
 +.hover-bg-black-90:focus { background-color: rgba(0, 0, 0, .9); }
 +.hover-bg-black-80:hover,
 +.hover-bg-black-80:focus { background-color: rgba(0, 0, 0, .8); }
 +.hover-bg-black-70:hover,
 +.hover-bg-black-70:focus { background-color: rgba(0, 0, 0, .7); }
 +.hover-bg-black-60:hover,
 +.hover-bg-black-60:focus { background-color: rgba(0, 0, 0, .6); }
 +.hover-bg-black-50:hover,
 +.hover-bg-black-50:focus { background-color: rgba(0, 0, 0, .5); }
 +.hover-bg-black-40:hover,
 +.hover-bg-black-40:focus { background-color: rgba(0, 0, 0, .4); }
 +.hover-bg-black-30:hover,
 +.hover-bg-black-30:focus { background-color: rgba(0, 0, 0, .3); }
 +.hover-bg-black-20:hover,
 +.hover-bg-black-20:focus { background-color: rgba(0, 0, 0, .2); }
 +.hover-bg-black-10:hover,
 +.hover-bg-black-10:focus { background-color: rgba(0, 0, 0, .1); }
 +.hover-bg-white-90:hover,
 +.hover-bg-white-90:focus { background-color: rgba(255, 255, 255, .9); }
 +.hover-bg-white-80:hover,
 +.hover-bg-white-80:focus { background-color: rgba(255, 255, 255, .8); }
 +.hover-bg-white-70:hover,
 +.hover-bg-white-70:focus { background-color: rgba(255, 255, 255, .7); }
 +.hover-bg-white-60:hover,
 +.hover-bg-white-60:focus { background-color: rgba(255, 255, 255, .6); }
 +.hover-bg-white-50:hover,
 +.hover-bg-white-50:focus { background-color: rgba(255, 255, 255, .5); }
 +.hover-bg-white-40:hover,
 +.hover-bg-white-40:focus { background-color: rgba(255, 255, 255, .4); }
 +.hover-bg-white-30:hover,
 +.hover-bg-white-30:focus { background-color: rgba(255, 255, 255, .3); }
 +.hover-bg-white-20:hover,
 +.hover-bg-white-20:focus { background-color: rgba(255, 255, 255, .2); }
 +.hover-bg-white-10:hover,
 +.hover-bg-white-10:focus { background-color: rgba(255, 255, 255, .1); }
 +.hover-dark-red:hover,
 +.hover-dark-red:focus { color: #e7040f; }
 +.hover-red:hover,
 +.hover-red:focus { color: #ff4136; }
 +.hover-light-red:hover,
 +.hover-light-red:focus { color: #ff725c; }
 +.hover-orange:hover,
 +.hover-orange:focus { color: #ff6300; }
 +.hover-gold:hover,
 +.hover-gold:focus { color: #ffb700; }
 +.hover-yellow:hover,
 +.hover-yellow:focus { color: #ffd700; }
 +.hover-light-yellow:hover,
 +.hover-light-yellow:focus { color: #fbf1a9; }
 +.hover-purple:hover,
 +.hover-purple:focus { color: #5e2ca5; }
 +.hover-light-purple:hover,
 +.hover-light-purple:focus { color: #a463f2; }
 +.hover-dark-pink:hover,
 +.hover-dark-pink:focus { color: #d5008f; }
 +.hover-hot-pink:hover,
 +.hover-hot-pink:focus { color: #ff41b4; }
 +.hover-pink:hover,
 +.hover-pink:focus { color: #ff80cc; }
 +.hover-light-pink:hover,
 +.hover-light-pink:focus { color: #ffa3d7; }
 +.hover-dark-green:hover,
 +.hover-dark-green:focus { color: #137752; }
 +.hover-green:hover,
 +.hover-green:focus { color: #19a974; }
 +.hover-light-green:hover,
 +.hover-light-green:focus { color: #9eebcf; }
 +.hover-navy:hover,
 +.hover-navy:focus { color: #001b44; }
 +.hover-dark-blue:hover,
 +.hover-dark-blue:focus { color: #00449e; }
 +.hover-blue:hover,
 +.hover-blue:focus { color: #0594CB; }
 +.hover-light-blue:hover,
 +.hover-light-blue:focus { color: #96ccff; }
 +.hover-lightest-blue:hover,
 +.hover-lightest-blue:focus { color: #cdecff; }
 +.hover-washed-blue:hover,
 +.hover-washed-blue:focus { color: #f6fffe; }
 +.hover-washed-green:hover,
 +.hover-washed-green:focus { color: #e8fdf5; }
 +.hover-washed-yellow:hover,
 +.hover-washed-yellow:focus { color: #fffceb; }
 +.hover-washed-red:hover,
 +.hover-washed-red:focus { color: #ffdfdf; }
 +.hover-bg-dark-red:hover,
 +.hover-bg-dark-red:focus { background-color: #e7040f; }
 +.hover-bg-red:hover,
 +.hover-bg-red:focus { background-color: #ff4136; }
 +.hover-bg-light-red:hover,
 +.hover-bg-light-red:focus { background-color: #ff725c; }
 +.hover-bg-orange:hover,
 +.hover-bg-orange:focus { background-color: #ff6300; }
 +.hover-bg-gold:hover,
 +.hover-bg-gold:focus { background-color: #ffb700; }
 +.hover-bg-yellow:hover,
 +.hover-bg-yellow:focus { background-color: #ffd700; }
 +.hover-bg-light-yellow:hover,
 +.hover-bg-light-yellow:focus { background-color: #fbf1a9; }
 +.hover-bg-purple:hover,
 +.hover-bg-purple:focus { background-color: #5e2ca5; }
 +.hover-bg-light-purple:hover,
 +.hover-bg-light-purple:focus { background-color: #a463f2; }
 +.hover-bg-dark-pink:hover,
 +.hover-bg-dark-pink:focus { background-color: #d5008f; }
 +.hover-bg-hot-pink:hover,
 +.hover-bg-hot-pink:focus { background-color: #ff41b4; }
 +.hover-bg-pink:hover,
 +.hover-bg-pink:focus { background-color: #ff80cc; }
 +.hover-bg-light-pink:hover,
 +.hover-bg-light-pink:focus { background-color: #ffa3d7; }
 +.hover-bg-dark-green:hover,
 +.hover-bg-dark-green:focus { background-color: #137752; }
 +.hover-bg-green:hover,
 +.hover-bg-green:focus { background-color: #19a974; }
 +.hover-bg-light-green:hover,
 +.hover-bg-light-green:focus { background-color: #9eebcf; }
 +.hover-bg-navy:hover,
 +.hover-bg-navy:focus { background-color: #001b44; }
 +.hover-bg-dark-blue:hover,
 +.hover-bg-dark-blue:focus { background-color: #00449e; }
 +.hover-bg-blue:hover,
 +.hover-bg-blue:focus { background-color: #0594CB; }
 +.hover-bg-light-blue:hover,
 +.hover-bg-light-blue:focus { background-color: #96ccff; }
 +.hover-bg-lightest-blue:hover,
 +.hover-bg-lightest-blue:focus { background-color: #cdecff; }
 +.hover-bg-washed-blue:hover,
 +.hover-bg-washed-blue:focus { background-color: #f6fffe; }
 +.hover-bg-washed-green:hover,
 +.hover-bg-washed-green:focus { background-color: #e8fdf5; }
 +.hover-bg-washed-yellow:hover,
 +.hover-bg-washed-yellow:focus { background-color: #fffceb; }
 +.hover-bg-washed-red:hover,
 +.hover-bg-washed-red:focus { background-color: #ffdfdf; }
 +.hover-bg-inherit:hover,
 +.hover-bg-inherit:focus { background-color: inherit; }
 +/* Variables */
 +/*
 +   SPACING
 +   Docs: http://tachyons.io/docs/layout/spacing/
 +
 +   An eight step powers of two scale ranging from 0 to 16rem.
 +
 +   Base:
 +     p = padding
 +     m = margin
 +
 +   Modifiers:
 +     a = all
 +     h = horizontal
 +     v = vertical
 +     t = top
 +     r = right
 +     b = bottom
 +     l = left
 +
 +     0 = none
 +     1 = 1st step in spacing scale
 +     2 = 2nd step in spacing scale
 +     3 = 3rd step in spacing scale
 +     4 = 4th step in spacing scale
 +     5 = 5th step in spacing scale
 +     6 = 6th step in spacing scale
 +     7 = 7th step in spacing scale
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.pa0 { padding: 0; }
 +.pa1 { padding: .25rem; }
 +.pa2 { padding: .5rem; }
 +.pa3 { padding: 1rem; }
 +.pa4 { padding: 2rem; }
 +.pa5 { padding: 4rem; }
 +.pa6 { padding: 8rem; }
 +.pa7 { padding: 16rem; }
 +.pl0 { padding-left: 0; }
 +.pl1 { padding-left: .25rem; }
 +.pl2 { padding-left: .5rem; }
 +.pl3 { padding-left: 1rem; }
 +.pl4 { padding-left: 2rem; }
 +.pl5 { padding-left: 4rem; }
 +.pl6 { padding-left: 8rem; }
 +.pl7 { padding-left: 16rem; }
 +.pr0 { padding-right: 0; }
 +.pr1 { padding-right: .25rem; }
 +.pr2 { padding-right: .5rem; }
 +.pr3 { padding-right: 1rem; }
 +.pr4 { padding-right: 2rem; }
 +.pr5 { padding-right: 4rem; }
 +.pr6 { padding-right: 8rem; }
 +.pr7 { padding-right: 16rem; }
 +.pb0 { padding-bottom: 0; }
 +.pb1 { padding-bottom: .25rem; }
 +.pb2 { padding-bottom: .5rem; }
 +.pb3 { padding-bottom: 1rem; }
 +.pb4 { padding-bottom: 2rem; }
 +.pb5 { padding-bottom: 4rem; }
 +.pb6 { padding-bottom: 8rem; }
 +.pb7 { padding-bottom: 16rem; }
 +.pt0 { padding-top: 0; }
 +.pt1 { padding-top: .25rem; }
 +.pt2 { padding-top: .5rem; }
 +.pt3 { padding-top: 1rem; }
 +.pt4 { padding-top: 2rem; }
 +.pt5 { padding-top: 4rem; }
 +.pt6 { padding-top: 8rem; }
 +.pt7 { padding-top: 16rem; }
 +.pv0 {
 +  padding-top: 0;
 +  padding-bottom: 0;
 +}
 +.pv1 {
 +  padding-top: .25rem;
 +  padding-bottom: .25rem;
 +}
 +.pv2 {
 +  padding-top: .5rem;
 +  padding-bottom: .5rem;
 +}
 +.pv3 {
 +  padding-top: 1rem;
 +  padding-bottom: 1rem;
 +}
 +.pv4 {
 +  padding-top: 2rem;
 +  padding-bottom: 2rem;
 +}
 +.pv5 {
 +  padding-top: 4rem;
 +  padding-bottom: 4rem;
 +}
 +.pv6 {
 +  padding-top: 8rem;
 +  padding-bottom: 8rem;
 +}
 +.pv7 {
 +  padding-top: 16rem;
 +  padding-bottom: 16rem;
 +}
 +.ph0 {
 +  padding-left: 0;
 +  padding-right: 0;
 +}
 +.ph1 {
 +  padding-left: .25rem;
 +  padding-right: .25rem;
 +}
 +.ph2 {
 +  padding-left: .5rem;
 +  padding-right: .5rem;
 +}
 +.ph3 {
 +  padding-left: 1rem;
 +  padding-right: 1rem;
 +}
 +.ph4 {
 +  padding-left: 2rem;
 +  padding-right: 2rem;
 +}
 +.ph5 {
 +  padding-left: 4rem;
 +  padding-right: 4rem;
 +}
 +.ph6 {
 +  padding-left: 8rem;
 +  padding-right: 8rem;
 +}
 +.ph7 {
 +  padding-left: 16rem;
 +  padding-right: 16rem;
 +}
 +.ma0  {  margin: 0; }
 +.ma1 {  margin: .25rem; }
 +.ma2  {  margin: .5rem; }
 +.ma3  {  margin: 1rem; }
 +.ma4  {  margin: 2rem; }
 +.ma5  {  margin: 4rem; }
 +.ma6 {  margin: 8rem; }
 +.ma7 { margin: 16rem; }
 +.ml0  {  margin-left: 0; }
 +.ml1 {  margin-left: .25rem; }
 +.ml2  {  margin-left: .5rem; }
 +.ml3  {  margin-left: 1rem; }
 +.ml4  {  margin-left: 2rem; }
 +.ml5  {  margin-left: 4rem; }
 +.ml6 {  margin-left: 8rem; }
 +.ml7 { margin-left: 16rem; }
 +.mr0  {  margin-right: 0; }
 +.mr1 {  margin-right: .25rem; }
 +.mr2  {  margin-right: .5rem; }
 +.mr3  {  margin-right: 1rem; }
 +.mr4  {  margin-right: 2rem; }
 +.mr5  {  margin-right: 4rem; }
 +.mr6 {  margin-right: 8rem; }
 +.mr7 { margin-right: 16rem; }
 +.mb0  {  margin-bottom: 0; }
 +.mb1 {  margin-bottom: .25rem; }
 +.mb2  {  margin-bottom: .5rem; }
 +.mb3  {  margin-bottom: 1rem; }
 +.mb4  {  margin-bottom: 2rem; }
 +.mb5  {  margin-bottom: 4rem; }
 +.mb6 {  margin-bottom: 8rem; }
 +.mb7 { margin-bottom: 16rem; }
 +.mt0  {  margin-top: 0; }
 +.mt1 {  margin-top: .25rem; }
 +.mt2  {  margin-top: .5rem; }
 +.mt3  {  margin-top: 1rem; }
 +.mt4  {  margin-top: 2rem; }
 +.mt5  {  margin-top: 4rem; }
 +.mt6 {  margin-top: 8rem; }
 +.mt7 { margin-top: 16rem; }
 +.mv0   {
 +  margin-top: 0;
 +  margin-bottom: 0;
 +}
 +.mv1  {
 +  margin-top: .25rem;
 +  margin-bottom: .25rem;
 +}
 +.mv2   {
 +  margin-top: .5rem;
 +  margin-bottom: .5rem;
 +}
 +.mv3   {
 +  margin-top: 1rem;
 +  margin-bottom: 1rem;
 +}
 +.mv4   {
 +  margin-top: 2rem;
 +  margin-bottom: 2rem;
 +}
 +.mv5   {
 +  margin-top: 4rem;
 +  margin-bottom: 4rem;
 +}
 +.mv6  {
 +  margin-top: 8rem;
 +  margin-bottom: 8rem;
 +}
 +.mv7  {
 +  margin-top: 16rem;
 +  margin-bottom: 16rem;
 +}
 +.mh0   {
 +  margin-left: 0;
 +  margin-right: 0;
 +}
 +.mh1   {
 +  margin-left: .25rem;
 +  margin-right: .25rem;
 +}
 +.mh2   {
 +  margin-left: .5rem;
 +  margin-right: .5rem;
 +}
 +.mh3   {
 +  margin-left: 1rem;
 +  margin-right: 1rem;
 +}
 +.mh4   {
 +  margin-left: 2rem;
 +  margin-right: 2rem;
 +}
 +.mh5   {
 +  margin-left: 4rem;
 +  margin-right: 4rem;
 +}
 +.mh6  {
 +  margin-left: 8rem;
 +  margin-right: 8rem;
 +}
 +.mh7  {
 +  margin-left: 16rem;
 +  margin-right: 16rem;
 +}
 +@media screen and (min-width: 30em) {
 +  .pa0-ns  {  padding: 0; }
 +  .pa1-ns {  padding: .25rem; }
 +  .pa2-ns  {  padding: .5rem; }
 +  .pa3-ns  {  padding: 1rem; }
 +  .pa4-ns  {  padding: 2rem; }
 +  .pa5-ns  {  padding: 4rem; }
 +  .pa6-ns {  padding: 8rem; }
 +  .pa7-ns { padding: 16rem; }
 +
 +  .pl0-ns  {  padding-left: 0; }
 +  .pl1-ns {  padding-left: .25rem; }
 +  .pl2-ns  {  padding-left: .5rem; }
 +  .pl3-ns  {  padding-left: 1rem; }
 +  .pl4-ns  {  padding-left: 2rem; }
 +  .pl5-ns  {  padding-left: 4rem; }
 +  .pl6-ns {  padding-left: 8rem; }
 +  .pl7-ns { padding-left: 16rem; }
 +
 +  .pr0-ns  {  padding-right: 0; }
 +  .pr1-ns {  padding-right: .25rem; }
 +  .pr2-ns  {  padding-right: .5rem; }
 +  .pr3-ns  {  padding-right: 1rem; }
 +  .pr4-ns  {  padding-right: 2rem; }
 +  .pr5-ns {   padding-right: 4rem; }
 +  .pr6-ns {  padding-right: 8rem; }
 +  .pr7-ns { padding-right: 16rem; }
 +
 +  .pb0-ns  {  padding-bottom: 0; }
 +  .pb1-ns {  padding-bottom: .25rem; }
 +  .pb2-ns  {  padding-bottom: .5rem; }
 +  .pb3-ns  {  padding-bottom: 1rem; }
 +  .pb4-ns  {  padding-bottom: 2rem; }
 +  .pb5-ns  {  padding-bottom: 4rem; }
 +  .pb6-ns {  padding-bottom: 8rem; }
 +  .pb7-ns { padding-bottom: 16rem; }
 +
 +  .pt0-ns  {  padding-top: 0; }
 +  .pt1-ns {  padding-top: .25rem; }
 +  .pt2-ns  {  padding-top: .5rem; }
 +  .pt3-ns  {  padding-top: 1rem; }
 +  .pt4-ns  {  padding-top: 2rem; }
 +  .pt5-ns  {  padding-top: 4rem; }
 +  .pt6-ns {  padding-top: 8rem; }
 +  .pt7-ns { padding-top: 16rem; }
 +
 +  .pv0-ns {
 +    padding-top: 0;
 +    padding-bottom: 0;
 +  }
 +  .pv1-ns {
 +    padding-top: .25rem;
 +    padding-bottom: .25rem;
 +  }
 +  .pv2-ns {
 +    padding-top: .5rem;
 +    padding-bottom: .5rem;
 +  }
 +  .pv3-ns {
 +    padding-top: 1rem;
 +    padding-bottom: 1rem;
 +  }
 +  .pv4-ns {
 +    padding-top: 2rem;
 +    padding-bottom: 2rem;
 +  }
 +  .pv5-ns {
 +    padding-top: 4rem;
 +    padding-bottom: 4rem;
 +  }
 +  .pv6-ns {
 +    padding-top: 8rem;
 +    padding-bottom: 8rem;
 +  }
 +  .pv7-ns {
 +    padding-top: 16rem;
 +    padding-bottom: 16rem;
 +  }
 +  .ph0-ns {
 +    padding-left: 0;
 +    padding-right: 0;
 +  }
 +  .ph1-ns {
 +    padding-left: .25rem;
 +    padding-right: .25rem;
 +  }
 +  .ph2-ns {
 +    padding-left: .5rem;
 +    padding-right: .5rem;
 +  }
 +  .ph3-ns {
 +    padding-left: 1rem;
 +    padding-right: 1rem;
 +  }
 +  .ph4-ns {
 +    padding-left: 2rem;
 +    padding-right: 2rem;
 +  }
 +  .ph5-ns {
 +    padding-left: 4rem;
 +    padding-right: 4rem;
 +  }
 +  .ph6-ns {
 +    padding-left: 8rem;
 +    padding-right: 8rem;
 +  }
 +  .ph7-ns {
 +    padding-left: 16rem;
 +    padding-right: 16rem;
 +  }
 +
 +  .ma0-ns  {  margin: 0; }
 +  .ma1-ns {  margin: .25rem; }
 +  .ma2-ns  {  margin: .5rem; }
 +  .ma3-ns  {  margin: 1rem; }
 +  .ma4-ns  {  margin: 2rem; }
 +  .ma5-ns  {  margin: 4rem; }
 +  .ma6-ns {  margin: 8rem; }
 +  .ma7-ns { margin: 16rem; }
 +
 +  .ml0-ns  {  margin-left: 0; }
 +  .ml1-ns {  margin-left: .25rem; }
 +  .ml2-ns  {  margin-left: .5rem; }
 +  .ml3-ns  {  margin-left: 1rem; }
 +  .ml4-ns  {  margin-left: 2rem; }
 +  .ml5-ns  {  margin-left: 4rem; }
 +  .ml6-ns {  margin-left: 8rem; }
 +  .ml7-ns { margin-left: 16rem; }
 +
 +  .mr0-ns  {  margin-right: 0; }
 +  .mr1-ns {  margin-right: .25rem; }
 +  .mr2-ns  {  margin-right: .5rem; }
 +  .mr3-ns  {  margin-right: 1rem; }
 +  .mr4-ns  {  margin-right: 2rem; }
 +  .mr5-ns  {  margin-right: 4rem; }
 +  .mr6-ns {  margin-right: 8rem; }
 +  .mr7-ns { margin-right: 16rem; }
 +
 +  .mb0-ns  {  margin-bottom: 0; }
 +  .mb1-ns {  margin-bottom: .25rem; }
 +  .mb2-ns  {  margin-bottom: .5rem; }
 +  .mb3-ns  {  margin-bottom: 1rem; }
 +  .mb4-ns  {  margin-bottom: 2rem; }
 +  .mb5-ns  {  margin-bottom: 4rem; }
 +  .mb6-ns {  margin-bottom: 8rem; }
 +  .mb7-ns { margin-bottom: 16rem; }
 +
 +  .mt0-ns  {  margin-top: 0; }
 +  .mt1-ns {  margin-top: .25rem; }
 +  .mt2-ns  {  margin-top: .5rem; }
 +  .mt3-ns  {  margin-top: 1rem; }
 +  .mt4-ns  {  margin-top: 2rem; }
 +  .mt5-ns  {  margin-top: 4rem; }
 +  .mt6-ns {  margin-top: 8rem; }
 +  .mt7-ns { margin-top: 16rem; }
 +
 +  .mv0-ns   {
 +    margin-top: 0;
 +    margin-bottom: 0;
 +  }
 +  .mv1-ns  {
 +    margin-top: .25rem;
 +    margin-bottom: .25rem;
 +  }
 +  .mv2-ns   {
 +    margin-top: .5rem;
 +    margin-bottom: .5rem;
 +  }
 +  .mv3-ns   {
 +    margin-top: 1rem;
 +    margin-bottom: 1rem;
 +  }
 +  .mv4-ns   {
 +    margin-top: 2rem;
 +    margin-bottom: 2rem;
 +  }
 +  .mv5-ns   {
 +    margin-top: 4rem;
 +    margin-bottom: 4rem;
 +  }
 +  .mv6-ns  {
 +    margin-top: 8rem;
 +    margin-bottom: 8rem;
 +  }
 +  .mv7-ns  {
 +    margin-top: 16rem;
 +    margin-bottom: 16rem;
 +  }
 +
 +  .mh0-ns   {
 +    margin-left: 0;
 +    margin-right: 0;
 +  }
 +  .mh1-ns   {
 +    margin-left: .25rem;
 +    margin-right: .25rem;
 +  }
 +  .mh2-ns   {
 +    margin-left: .5rem;
 +    margin-right: .5rem;
 +  }
 +  .mh3-ns   {
 +    margin-left: 1rem;
 +    margin-right: 1rem;
 +  }
 +  .mh4-ns   {
 +    margin-left: 2rem;
 +    margin-right: 2rem;
 +  }
 +  .mh5-ns   {
 +    margin-left: 4rem;
 +    margin-right: 4rem;
 +  }
 +  .mh6-ns  {
 +    margin-left: 8rem;
 +    margin-right: 8rem;
 +  }
 +  .mh7-ns  {
 +    margin-left: 16rem;
 +    margin-right: 16rem;
 +  }
 +
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .pa0-m  {  padding: 0; }
 +  .pa1-m {  padding: .25rem; }
 +  .pa2-m  {  padding: .5rem; }
 +  .pa3-m  {  padding: 1rem; }
 +  .pa4-m  {  padding: 2rem; }
 +  .pa5-m  {  padding: 4rem; }
 +  .pa6-m {  padding: 8rem; }
 +  .pa7-m { padding: 16rem; }
 +
 +  .pl0-m  {  padding-left: 0; }
 +  .pl1-m {  padding-left: .25rem; }
 +  .pl2-m  {  padding-left: .5rem; }
 +  .pl3-m  {  padding-left: 1rem; }
 +  .pl4-m  {  padding-left: 2rem; }
 +  .pl5-m  {  padding-left: 4rem; }
 +  .pl6-m {  padding-left: 8rem; }
 +  .pl7-m { padding-left: 16rem; }
 +
 +  .pr0-m  {  padding-right: 0; }
 +  .pr1-m {  padding-right: .25rem; }
 +  .pr2-m  {  padding-right: .5rem; }
 +  .pr3-m  {  padding-right: 1rem; }
 +  .pr4-m  {  padding-right: 2rem; }
 +  .pr5-m  {  padding-right: 4rem; }
 +  .pr6-m {  padding-right: 8rem; }
 +  .pr7-m { padding-right: 16rem; }
 +
 +  .pb0-m  {  padding-bottom: 0; }
 +  .pb1-m {  padding-bottom: .25rem; }
 +  .pb2-m  {  padding-bottom: .5rem; }
 +  .pb3-m  {  padding-bottom: 1rem; }
 +  .pb4-m  {  padding-bottom: 2rem; }
 +  .pb5-m  {  padding-bottom: 4rem; }
 +  .pb6-m {  padding-bottom: 8rem; }
 +  .pb7-m { padding-bottom: 16rem; }
 +
 +  .pt0-m  {  padding-top: 0; }
 +  .pt1-m {  padding-top: .25rem; }
 +  .pt2-m  {  padding-top: .5rem; }
 +  .pt3-m  {  padding-top: 1rem; }
 +  .pt4-m  {  padding-top: 2rem; }
 +  .pt5-m  {  padding-top: 4rem; }
 +  .pt6-m {  padding-top: 8rem; }
 +  .pt7-m { padding-top: 16rem; }
 +
 +  .pv0-m {
 +    padding-top: 0;
 +    padding-bottom: 0;
 +  }
 +  .pv1-m {
 +    padding-top: .25rem;
 +    padding-bottom: .25rem;
 +  }
 +  .pv2-m {
 +    padding-top: .5rem;
 +    padding-bottom: .5rem;
 +  }
 +  .pv3-m {
 +    padding-top: 1rem;
 +    padding-bottom: 1rem;
 +  }
 +  .pv4-m {
 +    padding-top: 2rem;
 +    padding-bottom: 2rem;
 +  }
 +  .pv5-m {
 +    padding-top: 4rem;
 +    padding-bottom: 4rem;
 +  }
 +  .pv6-m {
 +    padding-top: 8rem;
 +    padding-bottom: 8rem;
 +  }
 +  .pv7-m {
 +    padding-top: 16rem;
 +    padding-bottom: 16rem;
 +  }
 +
 +  .ph0-m {
 +    padding-left: 0;
 +    padding-right: 0;
 +  }
 +  .ph1-m {
 +    padding-left: .25rem;
 +    padding-right: .25rem;
 +  }
 +  .ph2-m {
 +    padding-left: .5rem;
 +    padding-right: .5rem;
 +  }
 +  .ph3-m {
 +    padding-left: 1rem;
 +    padding-right: 1rem;
 +  }
 +  .ph4-m {
 +    padding-left: 2rem;
 +    padding-right: 2rem;
 +  }
 +  .ph5-m {
 +    padding-left: 4rem;
 +    padding-right: 4rem;
 +  }
 +  .ph6-m {
 +    padding-left: 8rem;
 +    padding-right: 8rem;
 +  }
 +  .ph7-m {
 +    padding-left: 16rem;
 +    padding-right: 16rem;
 +  }
 +
 +  .ma0-m  {  margin: 0; }
 +  .ma1-m {  margin: .25rem; }
 +  .ma2-m  {  margin: .5rem; }
 +  .ma3-m  {  margin: 1rem; }
 +  .ma4-m  {  margin: 2rem; }
 +  .ma5-m  {  margin: 4rem; }
 +  .ma6-m {  margin: 8rem; }
 +  .ma7-m { margin: 16rem; }
 +
 +  .ml0-m  {  margin-left: 0; }
 +  .ml1-m {  margin-left: .25rem; }
 +  .ml2-m  {  margin-left: .5rem; }
 +  .ml3-m  {  margin-left: 1rem; }
 +  .ml4-m  {  margin-left: 2rem; }
 +  .ml5-m  {  margin-left: 4rem; }
 +  .ml6-m {  margin-left: 8rem; }
 +  .ml7-m { margin-left: 16rem; }
 +
 +  .mr0-m  {  margin-right: 0; }
 +  .mr1-m {  margin-right: .25rem; }
 +  .mr2-m  {  margin-right: .5rem; }
 +  .mr3-m  {  margin-right: 1rem; }
 +  .mr4-m  {  margin-right: 2rem; }
 +  .mr5-m  {  margin-right: 4rem; }
 +  .mr6-m {  margin-right: 8rem; }
 +  .mr7-m { margin-right: 16rem; }
 +
 +  .mb0-m  {  margin-bottom: 0; }
 +  .mb1-m {  margin-bottom: .25rem; }
 +  .mb2-m  {  margin-bottom: .5rem; }
 +  .mb3-m  {  margin-bottom: 1rem; }
 +  .mb4-m  {  margin-bottom: 2rem; }
 +  .mb5-m  {  margin-bottom: 4rem; }
 +  .mb6-m {  margin-bottom: 8rem; }
 +  .mb7-m { margin-bottom: 16rem; }
 +
 +  .mt0-m  {  margin-top: 0; }
 +  .mt1-m {  margin-top: .25rem; }
 +  .mt2-m  {  margin-top: .5rem; }
 +  .mt3-m  {  margin-top: 1rem; }
 +  .mt4-m  {  margin-top: 2rem; }
 +  .mt5-m  {  margin-top: 4rem; }
 +  .mt6-m {  margin-top: 8rem; }
 +  .mt7-m { margin-top: 16rem; }
 +
 +  .mv0-m {
 +    margin-top: 0;
 +    margin-bottom: 0;
 +  }
 +  .mv1-m {
 +    margin-top: .25rem;
 +    margin-bottom: .25rem;
 +  }
 +  .mv2-m {
 +    margin-top: .5rem;
 +    margin-bottom: .5rem;
 +  }
 +  .mv3-m {
 +    margin-top: 1rem;
 +    margin-bottom: 1rem;
 +  }
 +  .mv4-m {
 +    margin-top: 2rem;
 +    margin-bottom: 2rem;
 +  }
 +  .mv5-m {
 +    margin-top: 4rem;
 +    margin-bottom: 4rem;
 +  }
 +  .mv6-m {
 +    margin-top: 8rem;
 +    margin-bottom: 8rem;
 +  }
 +  .mv7-m {
 +    margin-top: 16rem;
 +    margin-bottom: 16rem;
 +  }
 +
 +  .mh0-m {
 +    margin-left: 0;
 +    margin-right: 0;
 +  }
 +  .mh1-m {
 +    margin-left: .25rem;
 +    margin-right: .25rem;
 +  }
 +  .mh2-m {
 +    margin-left: .5rem;
 +    margin-right: .5rem;
 +  }
 +  .mh3-m {
 +    margin-left: 1rem;
 +    margin-right: 1rem;
 +  }
 +  .mh4-m {
 +    margin-left: 2rem;
 +    margin-right: 2rem;
 +  }
 +  .mh5-m {
 +    margin-left: 4rem;
 +    margin-right: 4rem;
 +  }
 +  .mh6-m {
 +    margin-left: 8rem;
 +    margin-right: 8rem;
 +  }
 +  .mh7-m {
 +    margin-left: 16rem;
 +    margin-right: 16rem;
 +  }
 +
 +}
 +@media screen and (min-width: 60em) {
 +  .pa0-l  {  padding: 0; }
 +  .pa1-l {  padding: .25rem; }
 +  .pa2-l  {  padding: .5rem; }
 +  .pa3-l  {  padding: 1rem; }
 +  .pa4-l  {  padding: 2rem; }
 +  .pa5-l  {  padding: 4rem; }
 +  .pa6-l {  padding: 8rem; }
 +  .pa7-l { padding: 16rem; }
 +
 +  .pl0-l  {  padding-left: 0; }
 +  .pl1-l {  padding-left: .25rem; }
 +  .pl2-l  {  padding-left: .5rem; }
 +  .pl3-l  {  padding-left: 1rem; }
 +  .pl4-l  {  padding-left: 2rem; }
 +  .pl5-l  {  padding-left: 4rem; }
 +  .pl6-l {  padding-left: 8rem; }
 +  .pl7-l { padding-left: 16rem; }
 +
 +  .pr0-l  {  padding-right: 0; }
 +  .pr1-l {  padding-right: .25rem; }
 +  .pr2-l  {  padding-right: .5rem; }
 +  .pr3-l  {  padding-right: 1rem; }
 +  .pr4-l  {  padding-right: 2rem; }
 +  .pr5-l  {  padding-right: 4rem; }
 +  .pr6-l {  padding-right: 8rem; }
 +  .pr7-l { padding-right: 16rem; }
 +
 +  .pb0-l  {  padding-bottom: 0; }
 +  .pb1-l {  padding-bottom: .25rem; }
 +  .pb2-l  {  padding-bottom: .5rem; }
 +  .pb3-l  {  padding-bottom: 1rem; }
 +  .pb4-l  {  padding-bottom: 2rem; }
 +  .pb5-l  {  padding-bottom: 4rem; }
 +  .pb6-l {  padding-bottom: 8rem; }
 +  .pb7-l { padding-bottom: 16rem; }
 +
 +  .pt0-l  {  padding-top: 0; }
 +  .pt1-l {  padding-top: .25rem; }
 +  .pt2-l  {  padding-top: .5rem; }
 +  .pt3-l  {  padding-top: 1rem; }
 +  .pt4-l  {  padding-top: 2rem; }
 +  .pt5-l  {  padding-top: 4rem; }
 +  .pt6-l {  padding-top: 8rem; }
 +  .pt7-l { padding-top: 16rem; }
 +
 +  .pv0-l {
 +    padding-top: 0;
 +    padding-bottom: 0;
 +  }
 +  .pv1-l {
 +    padding-top: .25rem;
 +    padding-bottom: .25rem;
 +  }
 +  .pv2-l {
 +    padding-top: .5rem;
 +    padding-bottom: .5rem;
 +  }
 +  .pv3-l {
 +    padding-top: 1rem;
 +    padding-bottom: 1rem;
 +  }
 +  .pv4-l {
 +    padding-top: 2rem;
 +    padding-bottom: 2rem;
 +  }
 +  .pv5-l {
 +    padding-top: 4rem;
 +    padding-bottom: 4rem;
 +  }
 +  .pv6-l {
 +    padding-top: 8rem;
 +    padding-bottom: 8rem;
 +  }
 +  .pv7-l {
 +    padding-top: 16rem;
 +    padding-bottom: 16rem;
 +  }
 +
 +  .ph0-l {
 +    padding-left: 0;
 +    padding-right: 0;
 +  }
 +  .ph1-l {
 +    padding-left: .25rem;
 +    padding-right: .25rem;
 +  }
 +  .ph2-l {
 +    padding-left: .5rem;
 +    padding-right: .5rem;
 +  }
 +  .ph3-l {
 +    padding-left: 1rem;
 +    padding-right: 1rem;
 +  }
 +  .ph4-l {
 +    padding-left: 2rem;
 +    padding-right: 2rem;
 +  }
 +  .ph5-l {
 +    padding-left: 4rem;
 +    padding-right: 4rem;
 +  }
 +  .ph6-l {
 +    padding-left: 8rem;
 +    padding-right: 8rem;
 +  }
 +  .ph7-l {
 +    padding-left: 16rem;
 +    padding-right: 16rem;
 +  }
 +
 +  .ma0-l  {  margin: 0; }
 +  .ma1-l {  margin: .25rem; }
 +  .ma2-l  {  margin: .5rem; }
 +  .ma3-l  {  margin: 1rem; }
 +  .ma4-l  {  margin: 2rem; }
 +  .ma5-l  {  margin: 4rem; }
 +  .ma6-l {  margin: 8rem; }
 +  .ma7-l { margin: 16rem; }
 +
 +  .ml0-l  {  margin-left: 0; }
 +  .ml1-l {  margin-left: .25rem; }
 +  .ml2-l  {  margin-left: .5rem; }
 +  .ml3-l  {  margin-left: 1rem; }
 +  .ml4-l  {  margin-left: 2rem; }
 +  .ml5-l  {  margin-left: 4rem; }
 +  .ml6-l {  margin-left: 8rem; }
 +  .ml7-l { margin-left: 16rem; }
 +
 +  .mr0-l  {  margin-right: 0; }
 +  .mr1-l {  margin-right: .25rem; }
 +  .mr2-l  {  margin-right: .5rem; }
 +  .mr3-l  {  margin-right: 1rem; }
 +  .mr4-l  {  margin-right: 2rem; }
 +  .mr5-l  {  margin-right: 4rem; }
 +  .mr6-l {  margin-right: 8rem; }
 +  .mr7-l { margin-right: 16rem; }
 +
 +  .mb0-l  {  margin-bottom: 0; }
 +  .mb1-l {  margin-bottom: .25rem; }
 +  .mb2-l  {  margin-bottom: .5rem; }
 +  .mb3-l  {  margin-bottom: 1rem; }
 +  .mb4-l  {  margin-bottom: 2rem; }
 +  .mb5-l  {  margin-bottom: 4rem; }
 +  .mb6-l {  margin-bottom: 8rem; }
 +  .mb7-l { margin-bottom: 16rem; }
 +
 +  .mt0-l  {  margin-top: 0; }
 +  .mt1-l {  margin-top: .25rem; }
 +  .mt2-l  {  margin-top: .5rem; }
 +  .mt3-l  {  margin-top: 1rem; }
 +  .mt4-l  {  margin-top: 2rem; }
 +  .mt5-l  {  margin-top: 4rem; }
 +  .mt6-l {  margin-top: 8rem; }
 +  .mt7-l { margin-top: 16rem; }
 +
 +  .mv0-l {
 +    margin-top: 0;
 +    margin-bottom: 0;
 +  }
 +  .mv1-l {
 +    margin-top: .25rem;
 +    margin-bottom: .25rem;
 +  }
 +  .mv2-l {
 +    margin-top: .5rem;
 +    margin-bottom: .5rem;
 +  }
 +  .mv3-l {
 +    margin-top: 1rem;
 +    margin-bottom: 1rem;
 +  }
 +  .mv4-l {
 +    margin-top: 2rem;
 +    margin-bottom: 2rem;
 +  }
 +  .mv5-l {
 +    margin-top: 4rem;
 +    margin-bottom: 4rem;
 +  }
 +  .mv6-l {
 +    margin-top: 8rem;
 +    margin-bottom: 8rem;
 +  }
 +  .mv7-l {
 +    margin-top: 16rem;
 +    margin-bottom: 16rem;
 +  }
 +
 +  .mh0-l {
 +    margin-left: 0;
 +    margin-right: 0;
 +  }
 +  .mh1-l {
 +    margin-left: .25rem;
 +    margin-right: .25rem;
 +  }
 +  .mh2-l {
 +    margin-left: .5rem;
 +    margin-right: .5rem;
 +  }
 +  .mh3-l {
 +    margin-left: 1rem;
 +    margin-right: 1rem;
 +  }
 +  .mh4-l {
 +    margin-left: 2rem;
 +    margin-right: 2rem;
 +  }
 +  .mh5-l {
 +    margin-left: 4rem;
 +    margin-right: 4rem;
 +  }
 +  .mh6-l {
 +    margin-left: 8rem;
 +    margin-right: 8rem;
 +  }
 +  .mh7-l {
 +    margin-left: 16rem;
 +    margin-right: 16rem;
 +  }
 +}
 +/*
 +   NEGATIVE MARGINS
 +
 +   Base:
 +     n = negative
 +
 +   Modifiers:
 +     a = all
 +     t = top
 +     r = right
 +     b = bottom
 +     l = left
 +
 +     1 = 1st step in spacing scale
 +     2 = 2nd step in spacing scale
 +     3 = 3rd step in spacing scale
 +     4 = 4th step in spacing scale
 +     5 = 5th step in spacing scale
 +     6 = 6th step in spacing scale
 +     7 = 7th step in spacing scale
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.na1 { margin: -0.25rem; }
 +.na2 { margin: -0.5rem; }
 +.na3 { margin: -1rem; }
 +.na4 { margin: -2rem; }
 +.na5 { margin: -4rem; }
 +.na6 { margin: -8rem; }
 +.na7 { margin: -16rem; }
 +.nl1 { margin-left: -0.25rem; }
 +.nl2 { margin-left: -0.5rem; }
 +.nl3 { margin-left: -1rem; }
 +.nl4 { margin-left: -2rem; }
 +.nl5 { margin-left: -4rem; }
 +.nl6 { margin-left: -8rem; }
 +.nl7 { margin-left: -16rem; }
 +.nr1 { margin-right: -0.25rem; }
 +.nr2 { margin-right: -0.5rem; }
 +.nr3 { margin-right: -1rem; }
 +.nr4 { margin-right: -2rem; }
 +.nr5 { margin-right: -4rem; }
 +.nr6 { margin-right: -8rem; }
 +.nr7 { margin-right: -16rem; }
 +.nb1 { margin-bottom: -0.25rem; }
 +.nb2 { margin-bottom: -0.5rem; }
 +.nb3 { margin-bottom: -1rem; }
 +.nb4 { margin-bottom: -2rem; }
 +.nb5 { margin-bottom: -4rem; }
 +.nb6 { margin-bottom: -8rem; }
 +.nb7 { margin-bottom: -16rem; }
 +.nt1 { margin-top: -0.25rem; }
 +.nt2 { margin-top: -0.5rem; }
 +.nt3 { margin-top: -1rem; }
 +.nt4 { margin-top: -2rem; }
 +.nt5 { margin-top: -4rem; }
 +.nt6 { margin-top: -8rem; }
 +.nt7 { margin-top: -16rem; }
 +@media screen and (min-width: 30em) {
 +
 +  .na1-ns { margin: -0.25rem; }
 +  .na2-ns { margin: -0.5rem; }
 +  .na3-ns { margin: -1rem; }
 +  .na4-ns { margin: -2rem; }
 +  .na5-ns { margin: -4rem; }
 +  .na6-ns { margin: -8rem; }
 +  .na7-ns { margin: -16rem; }
 +
 +  .nl1-ns { margin-left: -0.25rem; }
 +  .nl2-ns { margin-left: -0.5rem; }
 +  .nl3-ns { margin-left: -1rem; }
 +  .nl4-ns { margin-left: -2rem; }
 +  .nl5-ns { margin-left: -4rem; }
 +  .nl6-ns { margin-left: -8rem; }
 +  .nl7-ns { margin-left: -16rem; }
 +
 +  .nr1-ns { margin-right: -0.25rem; }
 +  .nr2-ns { margin-right: -0.5rem; }
 +  .nr3-ns { margin-right: -1rem; }
 +  .nr4-ns { margin-right: -2rem; }
 +  .nr5-ns { margin-right: -4rem; }
 +  .nr6-ns { margin-right: -8rem; }
 +  .nr7-ns { margin-right: -16rem; }
 +
 +  .nb1-ns { margin-bottom: -0.25rem; }
 +  .nb2-ns { margin-bottom: -0.5rem; }
 +  .nb3-ns { margin-bottom: -1rem; }
 +  .nb4-ns { margin-bottom: -2rem; }
 +  .nb5-ns { margin-bottom: -4rem; }
 +  .nb6-ns { margin-bottom: -8rem; }
 +  .nb7-ns { margin-bottom: -16rem; }
 +
 +  .nt1-ns { margin-top: -0.25rem; }
 +  .nt2-ns { margin-top: -0.5rem; }
 +  .nt3-ns { margin-top: -1rem; }
 +  .nt4-ns { margin-top: -2rem; }
 +  .nt5-ns { margin-top: -4rem; }
 +  .nt6-ns { margin-top: -8rem; }
 +  .nt7-ns { margin-top: -16rem; }
 +
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .na1-m { margin: -0.25rem; }
 +  .na2-m { margin: -0.5rem; }
 +  .na3-m { margin: -1rem; }
 +  .na4-m { margin: -2rem; }
 +  .na5-m { margin: -4rem; }
 +  .na6-m { margin: -8rem; }
 +  .na7-m { margin: -16rem; }
 +
 +  .nl1-m { margin-left: -0.25rem; }
 +  .nl2-m { margin-left: -0.5rem; }
 +  .nl3-m { margin-left: -1rem; }
 +  .nl4-m { margin-left: -2rem; }
 +  .nl5-m { margin-left: -4rem; }
 +  .nl6-m { margin-left: -8rem; }
 +  .nl7-m { margin-left: -16rem; }
 +
 +  .nr1-m { margin-right: -0.25rem; }
 +  .nr2-m { margin-right: -0.5rem; }
 +  .nr3-m { margin-right: -1rem; }
 +  .nr4-m { margin-right: -2rem; }
 +  .nr5-m { margin-right: -4rem; }
 +  .nr6-m { margin-right: -8rem; }
 +  .nr7-m { margin-right: -16rem; }
 +
 +  .nb1-m { margin-bottom: -0.25rem; }
 +  .nb2-m { margin-bottom: -0.5rem; }
 +  .nb3-m { margin-bottom: -1rem; }
 +  .nb4-m { margin-bottom: -2rem; }
 +  .nb5-m { margin-bottom: -4rem; }
 +  .nb6-m { margin-bottom: -8rem; }
 +  .nb7-m { margin-bottom: -16rem; }
 +
 +  .nt1-m { margin-top: -0.25rem; }
 +  .nt2-m { margin-top: -0.5rem; }
 +  .nt3-m { margin-top: -1rem; }
 +  .nt4-m { margin-top: -2rem; }
 +  .nt5-m { margin-top: -4rem; }
 +  .nt6-m { margin-top: -8rem; }
 +  .nt7-m { margin-top: -16rem; }
 +
 +}
 +@media screen and (min-width: 60em) {
 +  .na1-l { margin: -0.25rem; }
 +  .na2-l { margin: -0.5rem; }
 +  .na3-l { margin: -1rem; }
 +  .na4-l { margin: -2rem; }
 +  .na5-l { margin: -4rem; }
 +  .na6-l { margin: -8rem; }
 +  .na7-l { margin: -16rem; }
 +
 +  .nl1-l { margin-left: -0.25rem; }
 +  .nl2-l { margin-left: -0.5rem; }
 +  .nl3-l { margin-left: -1rem; }
 +  .nl4-l { margin-left: -2rem; }
 +  .nl5-l { margin-left: -4rem; }
 +  .nl6-l { margin-left: -8rem; }
 +  .nl7-l { margin-left: -16rem; }
 +
 +  .nr1-l { margin-right: -0.25rem; }
 +  .nr2-l { margin-right: -0.5rem; }
 +  .nr3-l { margin-right: -1rem; }
 +  .nr4-l { margin-right: -2rem; }
 +  .nr5-l { margin-right: -4rem; }
 +  .nr6-l { margin-right: -8rem; }
 +  .nr7-l { margin-right: -16rem; }
 +
 +  .nb1-l { margin-bottom: -0.25rem; }
 +  .nb2-l { margin-bottom: -0.5rem; }
 +  .nb3-l { margin-bottom: -1rem; }
 +  .nb4-l { margin-bottom: -2rem; }
 +  .nb5-l { margin-bottom: -4rem; }
 +  .nb6-l { margin-bottom: -8rem; }
 +  .nb7-l { margin-bottom: -16rem; }
 +
 +  .nt1-l { margin-top: -0.25rem; }
 +  .nt2-l { margin-top: -0.5rem; }
 +  .nt3-l { margin-top: -1rem; }
 +  .nt4-l { margin-top: -2rem; }
 +  .nt5-l { margin-top: -4rem; }
 +  .nt6-l { margin-top: -8rem; }
 +  .nt7-l { margin-top: -16rem; }
 +}
 +/*
 +
 +  TABLES
 +  Docs: http://tachyons.io/docs/elements/tables/
 +
 +*/
 +.collapse {
 +    border-collapse: collapse;
 +    border-spacing: 0;
 +}
 +.striped--light-silver:nth-child(odd) {
 +  background-color: #aaa;
 +}
 +.striped--moon-gray:nth-child(odd) {
 +  background-color: #ccc;
 +}
 +.striped--light-gray:nth-child(odd) {
 +  background-color: #eee;
 +}
 +.striped--near-white:nth-child(odd) {
 +  background-color: #f4f4f4;
 +}
 +.stripe-light:nth-child(odd) {
 +  background-color: rgba(255, 255, 255, .1);
 +}
 +.stripe-dark:nth-child(odd) {
 +  background-color: rgba(0, 0, 0, .1);
 +}
 +/*
 +
 +   TEXT DECORATION
 +   Docs: http://tachyons.io/docs/typography/text-decoration/
 +
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.strike       { text-decoration: line-through; }
 +.underline    { text-decoration: underline; }
 +.no-underline { text-decoration: none; }
 +@media screen and (min-width: 30em) {
 +  .strike-ns       { text-decoration: line-through; }
 +  .underline-ns    { text-decoration: underline; }
 +  .no-underline-ns { text-decoration: none; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .strike-m       { text-decoration: line-through; }
 +  .underline-m    { text-decoration: underline; }
 +  .no-underline-m { text-decoration: none; }
 +}
 +@media screen and (min-width: 60em) {
 +  .strike-l       { text-decoration: line-through; }
 +  .underline-l {    text-decoration: underline; }
 +  .no-underline-l { text-decoration: none; }
 +}
 +/*
 +
 +  TEXT ALIGN
 +  Docs: http://tachyons.io/docs/typography/text-align/
 +
 +  Base
 +    t = text-align
 +
 +  Modifiers
 +    l = left
 +    r = right
 +    c = center
 +    j = justify
 +
 +  Media Query Extensions:
 +    -ns = not-small
 +    -m  = medium
 +    -l  = large
 +
 +*/
 +.tl  { text-align: left; }
 +.tr  { text-align: right; }
 +.tc  { text-align: center; }
 +.tj  { text-align: justify; }
 +@media screen and (min-width: 30em) {
 +  .tl-ns  { text-align: left; }
 +  .tr-ns  { text-align: right; }
 +  .tc-ns  { text-align: center; }
 +  .tj-ns  { text-align: justify; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .tl-m  { text-align: left; }
 +  .tr-m  { text-align: right; }
 +  .tc-m  { text-align: center; }
 +  .tj-m  { text-align: justify; }
 +}
 +@media screen and (min-width: 60em) {
 +  .tl-l  { text-align: left; }
 +  .tr-l  { text-align: right; }
 +  .tc-l  { text-align: center; }
 +  .tj-l  { text-align: justify; }
 +}
 +/*
 +
 +   TEXT TRANSFORM
 +   Docs: http://tachyons.io/docs/typography/text-transform/
 +
 +   Base:
 +     tt = text-transform
 +
 +   Modifiers
 +     c = capitalize
 +     l = lowercase
 +     u = uppercase
 +     n = none
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.ttc { text-transform: capitalize; }
 +.ttl { text-transform: lowercase; }
 +.ttu { text-transform: uppercase; }
 +.ttn { text-transform: none; }
 +@media screen and (min-width: 30em) {
 +  .ttc-ns { text-transform: capitalize; }
 +  .ttl-ns { text-transform: lowercase; }
 +  .ttu-ns { text-transform: uppercase; }
 +  .ttn-ns { text-transform: none; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .ttc-m { text-transform: capitalize; }
 +  .ttl-m { text-transform: lowercase; }
 +  .ttu-m { text-transform: uppercase; }
 +  .ttn-m { text-transform: none; }
 +}
 +@media screen and (min-width: 60em) {
 +  .ttc-l { text-transform: capitalize; }
 +  .ttl-l { text-transform: lowercase; }
 +  .ttu-l { text-transform: uppercase; }
 +  .ttn-l { text-transform: none; }
 +}
 +/*
 +
 +   TYPE SCALE
 +   Docs: http://tachyons.io/docs/typography/scale/
 +
 +   Base:
 +    f = font-size
 +
 +   Modifiers
 +     1 = 1st step in size scale
 +     2 = 2nd step in size scale
 +     3 = 3rd step in size scale
 +     4 = 4th step in size scale
 +     5 = 5th step in size scale
 +     6 = 6th step in size scale
 +     7 = 7th step in size scale
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +*/
 +/*
 + * For Hero/Marketing Titles
 + *
 + * These generally are too large for mobile
 + * so be careful using them on smaller screens.
 + * */
 +.f-6,
 +.f-headline {
 +  font-size: 6rem;
 +}
 +.f-5,
 +.f-subheadline {
 +  font-size: 5rem;
 +}
 +/* Type Scale */
 +.f1 { font-size: 3rem; }
 +.f2 { font-size: 2.25rem; }
 +.f3 { font-size: 1.5rem; }
 +.f4 { font-size: 1.25rem; }
 +.f5 { font-size: 1rem; }
 +.f6 { font-size: .875rem; }
 +.f7 { font-size: .75rem; }
 +/* Small and hard to read for many people so use with extreme caution */
 +@media screen and (min-width: 30em){
 +  .f-6-ns,
 +  .f-headline-ns { font-size: 6rem; }
 +  .f-5-ns,
 +  .f-subheadline-ns { font-size: 5rem; }
 +  .f1-ns { font-size: 3rem; }
 +  .f2-ns { font-size: 2.25rem; }
 +  .f3-ns { font-size: 1.5rem; }
 +  .f4-ns { font-size: 1.25rem; }
 +  .f5-ns { font-size: 1rem; }
 +  .f6-ns { font-size: .875rem; }
 +  .f7-ns { font-size: .75rem; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .f-6-m,
 +  .f-headline-m { font-size: 6rem; }
 +  .f-5-m,
 +  .f-subheadline-m { font-size: 5rem; }
 +  .f1-m { font-size: 3rem; }
 +  .f2-m { font-size: 2.25rem; }
 +  .f3-m { font-size: 1.5rem; }
 +  .f4-m { font-size: 1.25rem; }
 +  .f5-m { font-size: 1rem; }
 +  .f6-m { font-size: .875rem; }
 +  .f7-m { font-size: .75rem; }
 +}
 +@media screen and (min-width: 60em) {
 +  .f-6-l,
 +  .f-headline-l {
 +    font-size: 6rem;
 +  }
 +  .f-5-l,
 +  .f-subheadline-l {
 +    font-size: 5rem;
 +  }
 +  .f1-l { font-size: 3rem; }
 +  .f2-l { font-size: 2.25rem; }
 +  .f3-l { font-size: 1.5rem; }
 +  .f4-l { font-size: 1.25rem; }
 +  .f5-l { font-size: 1rem; }
 +  .f6-l { font-size: .875rem; }
 +  .f7-l { font-size: .75rem; }
 +}
 +/*
 +
 +   TYPOGRAPHY
 +   http://tachyons.io/docs/typography/measure/
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +/* Measure is limited to ~66 characters */
 +.measure {
 +  max-width: 30em;
 +}
 +/* Measure is limited to ~80 characters */
 +.measure-wide {
 +  max-width: 34em;
 +}
 +/* Measure is limited to ~45 characters */
 +.measure-narrow {
 +  max-width: 20em;
 +}
 +/* Book paragraph style - paragraphs are indented with no vertical spacing. */
 +.indent {
 +  text-indent: 1em;
 +  margin-top: 0;
 +  margin-bottom: 0;
 +}
 +.small-caps {
 +  -webkit-font-feature-settings: "c2sc";
 +          font-feature-settings: "c2sc";
 +  font-variant: small-caps;
 +}
 +/* Combine this class with a width to truncate text (or just leave as is to truncate at width of containing element. */
 +.truncate {
 +  white-space: nowrap;
 +  overflow: hidden;
 +  text-overflow: ellipsis;
 +}
 +@media screen and (min-width: 30em) {
 +  .measure-ns  {
 +    max-width: 30em;
 +  }
 +  .measure-wide-ns {
 +    max-width: 34em;
 +  }
 +  .measure-narrow-ns {
 +    max-width: 20em;
 +  }
 +  .indent-ns {
 +    text-indent: 1em;
 +    margin-top: 0;
 +    margin-bottom: 0;
 +  }
 +  .small-caps-ns {
 +    -webkit-font-feature-settings: "c2sc";
 +            font-feature-settings: "c2sc";
 +    font-variant: small-caps;
 +  }
 +  .truncate-ns {
 +    white-space: nowrap;
 +    overflow: hidden;
 +    text-overflow: ellipsis;
 +  }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .measure-m {
 +    max-width: 30em;
 +  }
 +  .measure-wide-m {
 +    max-width: 34em;
 +  }
 +  .measure-narrow-m {
 +    max-width: 20em;
 +  }
 +  .indent-m {
 +    text-indent: 1em;
 +    margin-top: 0;
 +    margin-bottom: 0;
 +  }
 +  .small-caps-m {
 +    -webkit-font-feature-settings: "c2sc";
 +            font-feature-settings: "c2sc";
 +    font-variant: small-caps;
 +  }
 +  .truncate-m {
 +    white-space: nowrap;
 +    overflow: hidden;
 +    text-overflow: ellipsis;
 +  }
 +}
 +@media screen and (min-width: 60em) {
 +  .measure-l {
 +    max-width: 30em;
 +  }
 +  .measure-wide-l {
 +    max-width: 34em;
 +  }
 +  .measure-narrow-l {
 +    max-width: 20em;
 +  }
 +  .indent-l {
 +    text-indent: 1em;
 +    margin-top: 0;
 +    margin-bottom: 0;
 +  }
 +  .small-caps-l {
 +    -webkit-font-feature-settings: "c2sc";
 +            font-feature-settings: "c2sc";
 +    font-variant: small-caps;
 +  }
 +  .truncate-l {
 +    white-space: nowrap;
 +    overflow: hidden;
 +    text-overflow: ellipsis;
 +  }
 +}
 +/*
 +
 +   UTILITIES
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +/* Equivalent to .overflow-y-scroll */
 +.overflow-container {
 +  overflow-y: scroll;
 +}
 +.center {
 +  margin-right: auto;
 +  margin-left: auto;
 +}
 +.mr-auto { margin-right: auto; }
 +.ml-auto { margin-left:  auto; }
 +@media screen and (min-width: 30em){
 +  .center-ns {
 +    margin-right: auto;
 +    margin-left: auto;
 +  }
 +  .mr-auto-ns { margin-right: auto; }
 +  .ml-auto-ns { margin-left:  auto; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em){
 +  .center-m {
 +    margin-right: auto;
 +    margin-left: auto;
 +  }
 +  .mr-auto-m { margin-right: auto; }
 +  .ml-auto-m { margin-left:  auto; }
 +}
 +@media screen and (min-width: 60em){
 +  .center-l {
 +    margin-right: auto;
 +    margin-left: auto;
 +  }
 +  .mr-auto-l { margin-right: auto; }
 +  .ml-auto-l { margin-left:  auto; }
 +}
 +/*
 +
 +   VISIBILITY
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +/*
 +    Text that is hidden but accessible
 +    Ref: http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 +*/
 +.clip {
 +  position: fixed !important;
 +  _position: absolute !important;
 +  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
 +  clip: rect(1px, 1px, 1px, 1px);
 +}
 +@media screen and (min-width: 30em) {
 +  .clip-ns {
 +    position: fixed !important;
 +    _position: absolute !important;
 +    clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
 +    clip: rect(1px, 1px, 1px, 1px);
 +  }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .clip-m {
 +    position: fixed !important;
 +    _position: absolute !important;
 +    clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
 +    clip: rect(1px, 1px, 1px, 1px);
 +  }
 +}
 +@media screen and (min-width: 60em) {
 +  .clip-l {
 +    position: fixed !important;
 +    _position: absolute !important;
 +    clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
 +    clip: rect(1px, 1px, 1px, 1px);
 +  }
 +}
 +/*
 +
 +   WHITE SPACE
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.ws-normal { white-space: normal; }
 +.nowrap { white-space: nowrap; }
 +.pre { white-space: pre; }
 +@media screen and (min-width: 30em) {
 +  .ws-normal-ns { white-space: normal; }
 +  .nowrap-ns { white-space: nowrap; }
 +  .pre-ns { white-space: pre; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .ws-normal-m { white-space: normal; }
 +  .nowrap-m { white-space: nowrap; }
 +  .pre-m { white-space: pre; }
 +}
 +@media screen and (min-width: 60em) {
 +  .ws-normal-l { white-space: normal; }
 +  .nowrap-l { white-space: nowrap; }
 +  .pre-l { white-space: pre; }
 +}
 +/*
 +
 +   VERTICAL ALIGN
 +
 +   Media Query Extensions:
 +     -ns = not-small
 +     -m  = medium
 +     -l  = large
 +
 +*/
 +.v-base     { vertical-align: baseline; }
 +.v-mid      { vertical-align: middle; }
 +.v-top      { vertical-align: top; }
 +.v-btm      { vertical-align: bottom; }
 +@media screen and (min-width: 30em) {
 +  .v-base-ns     { vertical-align: baseline; }
 +  .v-mid-ns      { vertical-align: middle; }
 +  .v-top-ns      { vertical-align: top; }
 +  .v-btm-ns      { vertical-align: bottom; }
 +}
 +@media screen and (min-width: 30em) and (max-width: 60em) {
 +  .v-base-m     { vertical-align: baseline; }
 +  .v-mid-m      { vertical-align: middle; }
 +  .v-top-m      { vertical-align: top; }
 +  .v-btm-m      { vertical-align: bottom; }
 +}
 +@media screen and (min-width: 60em) {
 +  .v-base-l     { vertical-align: baseline; }
 +  .v-mid-l      { vertical-align: middle; }
 +  .v-top-l      { vertical-align: top; }
 +  .v-btm-l      { vertical-align: bottom; }
 +}
 +/*
 +
 +  HOVER EFFECTS
 +  Docs: http://tachyons.io/docs/themes/hovers/
 +
 +    - Dim
 +    - Glow
 +    - Hide Child
 +    - Underline text
 +    - Grow
 +    - Pointer
 +    - Shadow
 +
 +*/
 +/*
 +
 +  Dim element on hover by adding the dim class.
 +
 +*/
 +.dim {
 +  opacity: 1;
 +  -webkit-transition: opacity .15s ease-in;
 +  transition: opacity .15s ease-in;
 +}
 +.dim:hover,
 +.dim:focus {
 +  opacity: .5;
 +  -webkit-transition: opacity .15s ease-in;
 +  transition: opacity .15s ease-in;
 +}
 +.dim:active {
 +  opacity: .8; -webkit-transition: opacity .15s ease-out; transition: opacity .15s ease-out;
 +}
 +/*
 +
 +  Animate opacity to 100% on hover by adding the glow class.
 +
 +*/
 +.glow {
 +  -webkit-transition: opacity .15s ease-in;
 +  transition: opacity .15s ease-in;
 +}
 +.glow:hover,
 +.glow:focus {
 +  opacity: 1;
 +  -webkit-transition: opacity .15s ease-in;
 +  transition: opacity .15s ease-in;
 +}
 +/*
 +
 +  Hide child & reveal on hover:
 +
 +  Put the hide-child class on a parent element and any nested element with the
 +  child class will be hidden and displayed on hover or focus.
 +
 +  <div class="hide-child">
 +    <div class="child"> Hidden until hover or focus </div>
 +    <div class="child"> Hidden until hover or focus </div>
 +    <div class="child"> Hidden until hover or focus </div>
 +    <div class="child"> Hidden until hover or focus </div>
 +  </div>
 +*/
 +.hide-child .child {
 +  opacity: 0;
 +  -webkit-transition: opacity .15s ease-in;
 +  transition: opacity .15s ease-in;
 +}
 +.hide-child:hover  .child,
 +.hide-child:focus  .child,
 +.hide-child:active .child {
 +  opacity: 1;
 +  -webkit-transition: opacity .15s ease-in;
 +  transition: opacity .15s ease-in;
 +}
 +.underline-hover:hover,
 +.underline-hover:focus {
 +  text-decoration: underline;
 +}
 +/* Can combine this with overflow-hidden to make background images grow on hover
 + * even if you are using background-size: cover */
 +.grow {
 +  -moz-osx-font-smoothing: grayscale;
 +  -webkit-backface-visibility: hidden;
 +          backface-visibility: hidden;
 +  -webkit-transform: translateZ(0);
 +          transform: translateZ(0);
 +  -webkit-transition: -webkit-transform 0.25s ease-out;
 +  transition: -webkit-transform 0.25s ease-out;
 +  transition: transform 0.25s ease-out;
 +  transition: transform 0.25s ease-out, -webkit-transform 0.25s ease-out;
 +}
 +.grow:hover,
 +.grow:focus {
 +  -webkit-transform: scale(1.05);
 +          transform: scale(1.05);
 +}
 +.grow:active {
 +  -webkit-transform: scale(.90);
 +          transform: scale(.90);
 +}
 +.grow-large {
 +  -moz-osx-font-smoothing: grayscale;
 +  -webkit-backface-visibility: hidden;
 +          backface-visibility: hidden;
 +  -webkit-transform: translateZ(0);
 +          transform: translateZ(0);
 +  -webkit-transition: -webkit-transform .25s ease-in-out;
 +  transition: -webkit-transform .25s ease-in-out;
 +  transition: transform .25s ease-in-out;
 +  transition: transform .25s ease-in-out, -webkit-transform .25s ease-in-out;
 +}
 +.grow-large:hover,
 +.grow-large:focus {
 +  -webkit-transform: scale(1.2);
 +          transform: scale(1.2);
 +}
 +.grow-large:active {
 +  -webkit-transform: scale(.95);
 +          transform: scale(.95);
 +}
 +/* Add pointer on hover */
 +.pointer:hover {
 +  cursor: pointer;
 +}
 +/* 
 +   Add shadow on hover.
 +
 +   Performant box-shadow animation pattern from 
 +   http://tobiasahlin.com/blog/how-to-animate-box-shadow/ 
 +*/
 +.shadow-hover {
 +  cursor: pointer;
 +  position: relative;
 +  -webkit-transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
 +  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
 +}
 +.shadow-hover::after {
 +  content: '';
 +  -webkit-box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, .2);
 +          box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, .2);
 +  border-radius: inherit;
 +  opacity: 0;
 +  position: absolute;
 +  top: 0;
 +  left: 0;
 +  width: 100%;
 +  height: 100%;
 +  z-index: -1;
 +  -webkit-transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
 +  transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
 +}
 +.shadow-hover:hover::after,
 +.shadow-hover:focus::after {
 +  opacity: 1;
 +}
 +/* Combine with classes in skins and skins-pseudo for 
 + * many different transition possibilities. */
 +.bg-animate,
 +.bg-animate:hover,
 +.bg-animate:focus {
 +  -webkit-transition: background-color .15s ease-in-out;
 +  transition: background-color .15s ease-in-out; 
 +}
 +/*
 +
 +  Z-INDEX
 +
 +  Base
 +    z = z-index
 +
 +  Modifiers
 +    -0 = literal value 0
 +    -1 = literal value 1
 +    -2 = literal value 2
 +    -3 = literal value 3
 +    -4 = literal value 4
 +    -5 = literal value 5
 +    -999 = literal value 999
 +    -9999 = literal value 9999
 +
 +    -max = largest accepted z-index value as integer
 +
 +    -inherit = string value inherit
 +    -initial = string value initial
 +    -unset = string value unset
 +
 +  MDN: https://developer.mozilla.org/en/docs/Web/CSS/z-index
 +  Spec: http://www.w3.org/TR/CSS2/zindex.html
 +  Articles:
 +    https://philipwalton.com/articles/what-no-one-told-you-about-z-index/
 +
 +  Tips on extending:
 +  There might be a time worth using negative z-index values.
 +  Or if you are using tachyons with another project, you might need to
 +  adjust these values to suit your needs.
 +
 +*/
 +.z-0 { z-index: 0; }
 +.z-1 { z-index: 1; }
 +.z-2 { z-index: 2; }
 +.z-3 { z-index: 3; }
 +.z-4 { z-index: 4; }
 +.z-5 { z-index: 5; }
 +.z-999 { z-index: 999; }
 +.z-9999 { z-index: 9999; }
 +.z-max {
 +  z-index: 2147483647;
 +}
 +.z-inherit { z-index: inherit; }
 +.z-initial { z-index: auto; z-index: initial; }
 +.z-unset { z-index: unset; }
 +/*
 +
 +    NESTED
 +    Tachyons module for styling nested elements
 +    that are generated by a cms.
 +
 +*/
 +.nested-copy-line-height p,
 +.nested-copy-line-height ul,
 +.nested-copy-line-height ol {
 +  line-height: 1.5;
 +}
 +.nested-headline-line-height h1,
 +.nested-headline-line-height h2,
 +.nested-headline-line-height h3,
 +.nested-headline-line-height h4,
 +.nested-headline-line-height h5,
 +.nested-headline-line-height h6 {
 +  line-height: 1.25;
 +}
 +.nested-list-reset ul,
 +.nested-list-reset ol {
 +  padding-left: 0;
 +  margin-left: 0;
 +  list-style-type: none;
 +}
 +.nested-copy-indent p+p {
 +  text-indent: 1em;
 +  margin-top: 0;
 +  margin-bottom: 0;
 +}
 +.nested-copy-separator p+p {
 +  margin-top: 1.5em;
 +}
 +.nested-img img {
 +  width: 100%;
 +  max-width: 100%;
 +  display: block;
 +}
 +.nested-links a {
 +  color: #0594CB;
 +  -webkit-transition: color .15s ease-in;
 +  transition: color .15s ease-in;
 +}
 +.nested-links a:hover,
 +.nested-links a:focus {
 +  color: #96ccff;
 +  -webkit-transition: color .15s ease-in;
 +  transition: color .15s ease-in;
 +}
 +/*@import 'tachyons/src/_styles';*/
 +/* Variables */
 +/* Importing here will allow you to override any variables in the modules */
 +/*
 +
 +   Tachyons
 +   COLOR VARIABLES
 +
 +   Grayscale
 +   - Solids
 +   - Transparencies
 +   Colors
 +
 +*/
 +/*
 +
 +  CUSTOM MEDIA QUERIES
 +
 +  Media query values can be changed to fit your own content.
 +  There are no magic bullets when it comes to media query width values.
 +  They should be declared in em units - and they should be set to meet
 +  the needs of your content. You can also add additional media queries,
 +  or remove some of the existing ones.
 +
 +  These media queries can be referenced like so:
 +
 +  @media (--breakpoint-not-small) {
 +    .medium-and-larger-specific-style {
 +      background-color: red;
 +    }
 +  }
 +
 +  @media (--breakpoint-medium) {
 +    .medium-screen-specific-style {
 +      background-color: red;
 +    }
 +  }
 +
 +  @media (--breakpoint-large) {
 +    .large-and-larger-screen-specific-style {
 +      background-color: red;
 +    }
 +  }
 +
 +*/
 +/* Media Queries */
 +/* Debugging */
 +/*@import 'tachyons/src/_debug-children';
 +@import 'tachyons/src/_debug-grid';*/
 +/* Uncomment out the line below to help debug layout issues */
 +/* @import 'tachyons/src/_debug'; */
 +/* purgecss start ignore */
 +.header-link:after {
 +  position: relative;
 +  left: 0.5em;
 +  opacity: 0;
 +  font-size: 0.8em;
 +  -moz-transition: opacity 0.2s ease-in-out 0.1s;
 +  -ms-transition: opacity 0.2s ease-in-out 0.1s;
 +}
 +h2:hover .header-link,
 +h3:hover .header-link,
 +h4:hover .header-link,
 +h5:hover .header-link,
 +h6:hover .header-link {
 +  opacity: 1;
 +}
 +.animated {
 +  -webkit-animation-duration: .5s;
 +          animation-duration: .5s;
 +  -webkit-animation-fill-mode: forwards;
 +          animation-fill-mode: forwards;
 +  -webkit-animation-timing-function: ease-in-out;
 +          animation-timing-function: ease-in-out;
 +}
 +@-webkit-keyframes fadeIn {
 +  from {
 +    opacity: 0;
 +  }
 +
 +  to {
 +    opacity: 1;
 +  }
 +}
 +@keyframes fadeIn {
 +  from {
 +    opacity: 0;
 +  }
 +
 +  to {
 +    opacity: 1;
 +  }
 +}
 +.fadeIn {
 +  -webkit-animation-name: fadeIn;
 +          animation-name: fadeIn;
 +}
 +.animated-delay-1 {
 +  -webkit-animation-delay: 0.5s;
 +          animation-delay: 0.5s;
 +}
 +.note,
 +.warning {
 +
 +  border-left-width: 4px;
 +  border-left-style: solid;
 +  position: relative;
 +  border-color: #0594CB;
 +
 +  display: block;
 +}
 +.note #exclamation-icon,
 +.warning #exclamation-icon {
 +
 +  fill: #0594CB;
 +  position: absolute;
 +  top: 35%;
 +  left: -12px;
 +  /*background-color: white;*/
 +}
 +.admonition-content {
 +    display: block;
 +    margin: 0px;
 +    padding: .125em 1em;
 +    /*margin-left: 1em;*/
 +    margin-top: 2em;
 +    margin-bottom: 2em;
 +    overflow-x: auto;
 +    /*font-size: .9375em;*/
 +    background-color: rgba(0, 0, 0, .05);
 +  }
 +.hide-child-menu .child-menu {
 +    display: none;
 +  }
 +.hide-child-menu:hover  .child-menu,
 +  .hide-child-menu:focus  .child-menu,
 +  .hide-child-menu:active .child-menu {
 +  display: block;
 +  }
 +/*documentation-copy headings exaggerate spacing and size to chunk content */
 +.documentation-copy h2 {
 +    margin-top: 3em
 +  }
 +.documentation-copy h2.minor {
 +  font-size: inherit;
 +  margin-top: inherit;
 +  border-bottom: none;
 +}
 +.searchbox{display:inline-block;position:relative;width:200px;height:32px!important;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;visibility:visible!important}
 +.searchbox .algolia-autocomplete{display:block;width:100%;height:100%}
 +.searchbox__wrapper{width:100%;height:100%;z-index:999;position:relative}
 +.searchbox__input{display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:background .4s ease,-webkit-box-shadow .4s ease;transition:background .4s ease,-webkit-box-shadow .4s ease;transition:box-shadow .4s ease,background .4s ease;transition:box-shadow .4s ease,background .4s ease,-webkit-box-shadow .4s ease;border:0;border-radius:16px;-webkit-box-shadow:inset 0 0 0 1px #ccc;box-shadow:inset 0 0 0 1px #ccc;background:#fff!important;padding:0 26px 0 32px;width:100%;height:100%;vertical-align:middle;white-space:normal;font-size:12px;-webkit-appearance:none;-moz-appearance:none;appearance:none}
 +.searchbox__input::-webkit-search-cancel-button,.searchbox__input::-webkit-search-decoration,.searchbox__input::-webkit-search-results-button,.searchbox__input::-webkit-search-results-decoration{display:none}
 +.searchbox__input:hover{-webkit-box-shadow:inset 0 0 0 1px #b3b3b3;box-shadow:inset 0 0 0 1px #b3b3b3}
 +.searchbox__input:active,.searchbox__input:focus{outline:0;-webkit-box-shadow:inset 0 0 0 1px #aaa;box-shadow:inset 0 0 0 1px #aaa;background:#fff}
 +.searchbox__input::-webkit-input-placeholder{color:#aaa}
 +.searchbox__input:-ms-input-placeholder{color:#aaa}
 +.searchbox__input::-ms-input-placeholder{color:#aaa}
 +.searchbox__input::placeholder{color:#aaa}
 +.searchbox__submit{position:absolute;top:0;margin:0;border:0;border-radius:16px 0 0 16px;background-color:rgba(69, 142, 225, 0);padding:0;width:32px;height:100%;vertical-align:middle;text-align:center;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;right:inherit;left:0}
 +.searchbox__submit:before{display:inline-block;margin-right:-4px;height:100%;vertical-align:middle;content:""}
 +.searchbox__submit:active,.searchbox__submit:hover{cursor:pointer}
 +.searchbox__submit:focus{outline:0}
 +.searchbox__submit svg{width:14px;height:14px;vertical-align:middle;fill:#6d7e96}
 +.searchbox__reset{display:block;position:absolute;top:8px;right:8px;margin:0;border:0;background:none;cursor:pointer;padding:0;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:rgba(0, 0, 0, .5)}
 +.searchbox__reset.hide{display:none}
 +.searchbox__reset:focus{outline:0}
 +.searchbox__reset svg{display:block;margin:4px;width:8px;height:8px}
 +.searchbox__input:valid~.searchbox__reset{display:block;-webkit-animation-name:sbx-reset-in;animation-name:sbx-reset-in;-webkit-animation-duration:.15s;animation-duration:.15s}
 +@-webkit-keyframes sbx-reset-in{0%{-webkit-transform:translate3d(-20%,0,0);transform:translate3d(-20%,0,0);opacity:0}to{-webkit-transform:none;transform:none;opacity:1}}
 +@keyframes sbx-reset-in{0%{-webkit-transform:translate3d(-20%,0,0);transform:translate3d(-20%,0,0);opacity:0}to{-webkit-transform:none;transform:none;opacity:1}}
 +.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu{right:0!important;left:inherit!important}
 +.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu:before{right:48px}
 +.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu{left:0!important;right:inherit!important}
 +.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu:before{left:48px}
 +.algolia-autocomplete .ds-dropdown-menu{top:-6px;border-radius:4px;margin:6px 0 0;padding:0;text-align:left;height:auto;position:relative;background:transparent;border:none;z-index:999;max-width:600px;min-width:500px;-webkit-box-shadow:0 1px 0 0 rgba(0, 0, 0, .2),0 2px 3px 0 rgba(0, 0, 0, .1);box-shadow:0 1px 0 0 rgba(0, 0, 0, .2),0 2px 3px 0 rgba(0, 0, 0, .1)}
 +.algolia-autocomplete .ds-dropdown-menu:before{display:block;position:absolute;content:"";width:14px;height:14px;background:#fff;z-index:1000;top:-7px;border-top:1px solid #d9d9d9;border-right:1px solid #d9d9d9;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);border-radius:2px}
 +.algolia-autocomplete .ds-dropdown-menu .ds-suggestions{position:relative;z-index:1000;margin-top:8px}
 +.algolia-autocomplete .ds-dropdown-menu .ds-suggestions a:hover{text-decoration:none}
 +.algolia-autocomplete .ds-dropdown-menu .ds-suggestion{cursor:pointer}
 +.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion.suggestion-layout-simple,.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content{background-color:rgba(69, 142, 225, .05)}
 +.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-]{position:relative;border:1px solid #d9d9d9;background:#fff;border-radius:4px;overflow:auto;padding:0 8px 8px}
 +.algolia-autocomplete .ds-dropdown-menu *{-webkit-box-sizing:border-box;box-sizing:border-box}
 +.algolia-autocomplete .algolia-docsearch-suggestion{display:block;position:relative;padding:0 8px;background:#fff;color:#02060c;overflow:hidden}
 +.algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#174d8c;background:rgba(143, 187, 237, .1);padding:.1em .05em}
 +.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl1 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{padding:0 0 1px;background:inherit;-webkit-box-shadow:inset 0 -2px 0 0 rgba(69, 142, 225, .8);box-shadow:inset 0 -2px 0 0 rgba(69, 142, 225, .8);color:inherit}
 +.algolia-autocomplete .algolia-docsearch-suggestion--content{display:block;float:right;width:70%;position:relative;padding:5.33333px 0 5.33333px 10.66667px;cursor:pointer}
 +.algolia-autocomplete .algolia-docsearch-suggestion--content:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;left:-1px}
 +.algolia-autocomplete .algolia-docsearch-suggestion--category-header{position:relative;border-bottom:1px solid #ddd;display:none;margin-top:8px;padding:4px 0;font-size:1em;color:#33363d}
 +.algolia-autocomplete .algolia-docsearch-suggestion--wrapper{width:100%;float:left;padding:8px 0 0}
 +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column{float:left;width:30%;text-align:right;position:relative;padding:5.33333px 10.66667px;color:#a4a7ae;font-size:.9em;word-wrap:break-word}
 +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;right:0}
 +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-inline{display:none}
 +.algolia-autocomplete .algolia-docsearch-suggestion--title{margin-bottom:4px;color:#02060c;font-size:.9em;font-weight:700}
 +.algolia-autocomplete .algolia-docsearch-suggestion--text{display:block;line-height:1.2em;font-size:.85em;color:#63676d}
 +.algolia-autocomplete .algolia-docsearch-suggestion--no-results{width:100%;padding:8px 0;text-align:center;font-size:1.2em}
 +.algolia-autocomplete .algolia-docsearch-suggestion--no-results:before{display:none}
 +.algolia-autocomplete .algolia-docsearch-suggestion code{padding:1px 5px;font-size:90%;border:none;color:#222;background-color:#ebebeb;border-radius:3px;font-family:Menlo,Monaco,Consolas,Courier New,monospace}
 +.algolia-autocomplete .algolia-docsearch-suggestion code .algolia-docsearch-suggestion--highlight{background:none}
 +.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main .algolia-docsearch-suggestion--category-header,.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary{display:block}
 +@media (min-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:block}}
 +@media (max-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:inline-block;width:auto;float:left;padding:0;color:#02060c;font-size:.9em;font-weight:700;text-align:left;opacity:.5}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after{content:"|"}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content{display:inline-block;width:auto;text-align:left;float:left;padding:0}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content:before{display:none}}
 +.algolia-autocomplete .suggestion-layout-simple.algolia-docsearch-suggestion{border-bottom:1px solid #eee;padding:8px;margin:0}
 +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content{width:100%;padding:0}
 +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content:before{display:none}
 +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header{margin:0;padding:0;display:block;width:100%;border:none}
 +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl0,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1{opacity:.6;font-size:.85em}
 +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1:before{background-image:url('data:image/svg+xml;utf8,<svg width="10" height="10" viewBox="0 0 20 38" xmlns="http://www.w3.org/2000/svg"><path d="M1.49 4.31l14 16.126.002-2.624-14 16.074-1.314 1.51 3.017 2.626 1.313-1.508 14-16.075 1.142-1.313-1.14-1.313-14-16.125L3.2.18.18 2.8l1.31 1.51z" fill-rule="evenodd" fill="%231D3657" /></svg>');content:"";width:10px;height:10px;display:inline-block}
 +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--wrapper{width:100%;float:left;margin:0;padding:0}
 +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--duplicate-content,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--subcategory-inline{display:none!important}
 +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title{margin:0;color:#458ee1;font-size:.9em;font-weight:400}
 +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title:before{content:"#";font-weight:700;color:#458ee1;display:inline-block}
 +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text{margin:4px 0 0;display:block;line-height:1.4em;padding:5.33333px 8px;background:#f8f8f8;font-size:.85em;opacity:.8}
 +.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{color:#3f4145;font-weight:700;-webkit-box-shadow:none;box-shadow:none}
 +.algolia-autocomplete .algolia-docsearch-footer{width:134px;height:20px;z-index:2000;margin-top:10.66667px;float:right;font-size:0;line-height:0}
 +.algolia-autocomplete .algolia-docsearch-footer--logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='168' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938zm41.937 17.866c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17z' fill='%235468FF'/%3E%3Cpath d='M6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z' fill='%235D6494'/%3E%3Cpath d='M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50%;background-size:100%;overflow:hidden;text-indent:-9000px;padding:0!important;width:100%;height:100%;display:block}
 +/* These styles enhance the home page carousel, located here: themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html */
 +.overflow-x-scroll{
 +  -webkit-overflow-scrolling: touch;
 +}
 +.row {
 +  -webkit-transition: 450ms -webkit-transform;
 +  transition: 450ms -webkit-transform;
 +  transition: 450ms transform;
 +  transition: 450ms transform, 450ms -webkit-transform;
 +  font-size: 0;
 +}
 +.tile {
 +  -webkit-transition: 450ms all;
 +  transition: 450ms all;
 +}
 +.details {
 +  background: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, .9)), to(rgba(0, 0, 0, 0)));
 +  background: linear-gradient(to top, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, 0) 100%);
 +  -webkit-transition: 450ms opacity;
 +  transition: 450ms opacity;
 +}
 +.tile:hover .details {
 +  opacity: 1;
 +}
 +.row:hover .tile {
 +  opacity: 0.3;
 +}
 +.row:hover .tile:hover {
 +  opacity: 1;
 +}
 +.chroma .lntable pre {
 +  padding: 0;
 +  margin: 0;
 +  border: 0;
 +}
 +.chroma .lntable pre code  {
 +  padding: 0;
 +  margin: 0;
 +}
 +code {
 +    padding: 0.2em;
 +    margin: 0;
 +    font-size: 85%;
 +    background-color: rgba(27, 31, 35, .05);
 +    border-radius: 3px;
 +}
 +pre code {
 +  display: block;
 +  padding: 1.5em 1.5em;
 +  font-size: .875rem;
 +  line-height: 2;
 +  overflow-x: auto;
 +}
 +pre {
 +  background-color: #fff;
 +  color: #333;
 +  white-space: pre;
 +  -webkit-hyphens: none;
 +      -ms-hyphens: none;
 +          hyphens: none;
 +  position: relative;
 +  border-width: 1px;
 +  border-color: #ccc;
 +  border-style: solid;
 +}
 +/* The Pygments highlighter comes with its own styles. */
 +.highlight pre {
 +  background-color: inherit;
 +  color: inherit;
 +  padding: 0.5em;
 +  font-size: .875rem;
 +}
 +/*We are adding the copy button content here so we can change it with javascript. See the "Clipboard scripts"*/
 +.copy:after {
 +  content: "Copy"
 +}
 +.copied:after {
 +  content: "Copied"
 +}
 +@media screen and (min-width: 60em) {
 +  .full-width
 +  {
 +  /*width: 100vw;
 +  position: relative;
 +  left: 50%;
 +  right: 50%;
 +  margin-left: -50vw;
 +  margin-right: -50vw;*/
 +  /*width: 60vw;*/
 +  /*position: relative;
 +  left: 50%;
 +  right: 50%;*/
 +  /*margin-left: -30vw;*/
 +  margin-right: -30vw;
 +  max-width: 100vw;
 +  }
 +}
 +.code-block .line-numbers-rows {
 +    background: #2f3a46;
 +    border: none;
 +    bottom: -50px;
 +    color: #98a4b3;
 +    left: -178px;
 +    padding: 50px 0;
 +    top: -50px;
 +    width: 138px
 +}
 +.code-block .line-numbers-rows>span:before {
 +    color: inherit;
 +    padding-right: 30px
 +}
 +.tab-button{
 +      margin-bottom:1px;
 +      position: relative;
 +      z-index: 1;
 +      color:#333;
 +      border-color:#ccc;
 +      outline: none;
 +      background-color:white;
 +}
 +.tab-pane code{
 +      background:#f1f2f2;
 +      border-radius:0;
 +}
 +.tab-pane .chroma{
 +      background:none;
 +      padding:0;
 +}
 +.tab-button.active{
 +      border-bottom-color:#f1f2f2;
 +      background-color: #f1f2f2;
 +}
 +.tab-content .tab-pane{
 +      display: none;
 +}
 +.tab-content .tab-pane.active{
 +      display: block;
 +}
 +/* Treatment of copy buttons inside a tab module */
 +.tab-content .copy, .tab-content .copied{
 +      display: none;
 +}
 +.tab-content .tab-pane.active + .copy, .tab-content .tab-pane.active + .copied{
 +      display: block;
 +}
 +.primary-color                      {color: #0594CB}
 +.bg-primary-color                   {background-color: #0594CB}
 +.hover-bg-primary-color:hover       {background-color: #0594CB}
 +.primary-color-dark                  {color: #0A1922}
 +.bg-primary-color-dark               {background-color: #0A1922}
 +.hover-bg-primary-color-dark:hover   {background-color: #0A1922}
 +.primary-color-light                  {color: #f9f9f9}
 +.bg-primary-color-light               {background-color: #f9f9f9}
 +.hover-bg-primary-color-light:hover   {background-color: #f9f9f9}
 +.accent-color                         {color: #EBB951}
 +.bg-accent-color                      {background-color: #EBB951}
 +.hover-bg-accent-color:hover          {background-color: #EBB951}
 +.accent-color-light                   {color: #FF4088}
 +.hover-accent-color-light:hover                   {color: #FF4088}
 +.bg-accent-color-light                {background-color: #FF4088}
 +.hover-bg-accent-color-light:hover    {background-color: #FF4088}
 +.accent-color-dark                    {color: #33ba91}
 +.bg-accent-color-dark                 {background-color: #33ba91}
 +.hover-bg-accent-color-dark:hover     {background-color: #33ba91}
 +.text-color-primary    {color: #373737}
 +.text-on-primary-color {color: #fff}
 +.text-color-secondary  {color: #ccc}
 +.text-color-disabled   {color: #F7f7f7}
 +.divider-color         {color: #f6f6f6}
 +.warn-color            {color: red}
 +.nested-links a {
 +  color: #0594CB;
 +  text-decoration: none;
 +
 +}
 +.column-count-2 {-webkit-column-count: 1;column-count: 1}
 +.column-gap-1 {-webkit-column-gap: 0;column-gap: 0}
 +.break-inside-avoid {-webkit-column-break-inside: auto;break-inside: auto}
 +@media screen and (min-width: 60em) {
 +  .column-count-3-l {-webkit-column-count: 3;column-count: 3}
 +  .column-count-2-l {-webkit-column-count: 2;column-count: 2}
 +  .column-gap-1-l {-webkit-column-gap: 1;column-gap: 1}
 +  .break-inside-avoid-l {-webkit-column-break-inside: avoid;break-inside: avoid}
 +}
 +.prose ul, .prose ol {
 +  margin-bottom: 2em;
 +}
 +.prose ul li, .prose  ol li {
 +  margin-bottom: .5em;
 +}
 +.prose li:hover {
 +  background-color: #eee
 +}
 +.prose ::selection {
 +  background: #0594CB; /* WebKit/Blink Browsers */
 +  color: white;
 +}
 +.prose-glossary h3 {
 +  margin-top: 0;
 +  font-size: 1.125rem;
 +}
 +.prose-glossary h3:first-of-type {
 +  margin-top: 3em;
 +}
 +.prose-glossary h3 ~ p {
 +  margin: 0.5em 0 2em 0;
 +}
 +body {
 +
 +line-height: 1.45;
 +
 +}
 +p {margin-bottom: 1.3em;}
 +h1, h2, h3, h4 {
 +margin: 1.414em 0 0.5em;
 +
 +line-height: 1.2;
 +}
 +h1 {
 +margin-top: 0;
 +font-size: 2.441em;
 +}
 +h2 {font-size: 1.953em;}
 +h3 {font-size: 1.563em;}
 +h4 {font-size: 1.25em;}
 +small, .font_small {font-size: 0.8em;}
 +.prose table {
 +    width: 100%;
 +    margin-bottom: 3em;
 +    border-collapse: collapse;
 +    border-spacing: 0;
 +    font-size: 1em;
 +    border: 1px solid #eee
 +
 +}
 +.prose table th {
 +  background-color: #0594CB;
 +  border-bottom: 1px solid #0594CB;
 +  color: white;
 +  font-weight: 400;
 +  text-align: left;
 +  padding: .375em .5em;
 +}
 +.prose table td, .prose table tc {
 +  padding: .75em .5em;
 +  text-align: left;
 +  border-right: 1px solid #eee;
 +}
 +.prose table tr:nth-child(even) {
 +  background-color: #eee;
 +}
 +dl dt {
 +  font-weight: bold;
 +  font-size: 1.125rem;
 +}
 +dd {
 +  margin: .5em 0 2em 0;
 +  padding: 0;
 +}
 +.f2-fluid {
 +  font-size: 2.25rem;
 +}
 +@media screen and (min-width: 60em) {
 +  .f2-fluid {
 +    font-size: 1.25rem;
 +    font-size: calc(0.70833rem + 0.83333vw);
 +  }
 +}
 +/* From https://www.cssfontstack.com */
 +code, .code, pre code, .highlight pre  {
 +  font-family: 'inconsolata',Menlo,Monaco,'Courier New',monospace;
 +}
 +.sans-serif {
 +  font-family: 'Muli',
 +              avenir,
 +               'helvetica neue', helvetica,
 +               ubuntu,
 +               roboto, noto,
 +               'segoe ui', arial,
 +               sans-serif;
 +}
 +.serif {
 +  font-family: Palatino,"Palatino Linotype","Palatino LT STD","Book Antiqua",Georgia,serif;
 +}
 +/* Monospaced Typefaces (for code) */
 +.courier {
 +  font-family: 'Courier Next',
 +               courier,
 +               monospace;
 +}
 +/* Sans-Serif Typefaces */
 +.helvetica {
 +  font-family: 'helvetica neue', helvetica,
 +               sans-serif;
 +}
 +.avenir {
 +  font-family: 'avenir next', avenir,
 +               sans-serif;
 +}
 +/* Serif Typefaces */
 +.athelas {
 +  font-family: athelas,
 +               georgia,
 +               serif;
 +}
 +.georgia {
 +  font-family: georgia,
 +               serif;
 +}
 +.times {
 +  font-family: times,
 +               serif;
 +}
 +.bodoni {
 +  font-family: "Bodoni MT",
 +                serif;
 +}
 +.calisto {
 +  font-family: "Calisto MT",
 +                serif;
 +}
 +.garamond {
 +  font-family: garamond,
 +               serif;
 +}
 +.baskerville {
 +  font-family: baskerville,
 +               serif;
 +}
 +/* pagination.html: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */
 +.pagination {
 +  margin: 3rem 0;
 +}
 +.pagination li {
 +  display: inline-block;
 +  margin-right: .375rem;
 +  font-size: .875rem;
 +  margin-bottom: 2.5em;
 +}
 +.pagination li a {
 +  padding: .5rem .625rem;
 +  background-color: white;
 +  color: #333;
 +  border: 1px solid #ddd;
 +  border-radius: 3px;
 +  text-decoration: none;
 +}
 +.pagination li.disabled {
 +  display: none;
 +}
 +.pagination li.active a:link,
 +.pagination li.active a:active,
 +.pagination li.active a:visited {
 +  background-color: #ddd;
 +}
 +/* Hides non-meaningful TOC items*/
 +#TableOfContents ul li ul li ul li{
 +    display: none;
 +  }
 +#TableOfContents ul li {
 +  color: black;
 +  display: block;
 +  margin-bottom: .375em;
 +  line-height: 1.375;
 +}
 +#TableOfContents ul li a{
 +  width: 100%;
 +  padding: .25em .375em;
 +  margin-left: -.375em;
 +
 +}
 +#TableOfContents ul li a:hover {
 +  background-color: #999;
 +  color: white;
 +
 +}
 +.no-js .needs-js {
 +  opacity: 0
 +}
 +.js .needs-js {
 +  opacity: 1;
 +  -webkit-transition: opacity .15s ease-in;
 +  transition: opacity .15s ease-in;
 +}
 +.facebook,
 +.twitter,
 +.instagram,
 +.youtube {
 +  fill: #bababa;
 +}
 +.facebook:hover {
 +  fill: #3b5998;
 +}
 +.twitter {
 +  fill: #55acee;
 +}
 +.twitter:hover {
 +  fill: #bababa;
 +}
 +.instagram:hover {
 +  fill: #e95950;
 +}
 +.youtube:hover {
 +  fill: #bb0000;
 +}
 +.mstdn {
 +  display: inline-block;
 +  background-color: #282c37;
 +  color: #d9e1e8;
 +  text-decoration: none;
 +  padding: 4px 10px 4px 30px;
 +  border-radius: 4px;
 +  font-size: 16px;
 +  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2261.076954mm%22%20height%3D%2265.47831mm%22%20viewBox%3D%220%200%20216.4144%20232.00976%22%3E%3Cpath%20d%3D%22M211.80734%20139.0875c-3.18125%2016.36625-28.4925%2034.2775-57.5625%2037.74875-15.15875%201.80875-30.08375%203.47125-45.99875%202.74125-26.0275-1.1925-46.565-6.2125-46.565-6.2125%200%202.53375.15625%204.94625.46875%207.2025%203.38375%2025.68625%2025.47%2027.225%2046.39125%2027.9425%2021.11625.7225%2039.91875-5.20625%2039.91875-5.20625l.8675%2019.09s-14.77%207.93125-41.08125%209.39c-14.50875.7975-32.52375-.365-53.50625-5.91875C9.23234%20213.82%201.40609%20165.31125.20859%20116.09125c-.365-14.61375-.14-28.39375-.14-39.91875%200-50.33%2032.97625-65.0825%2032.97625-65.0825C49.67234%203.45375%2078.20359.2425%20107.86484%200h.72875c29.66125.2425%2058.21125%203.45375%2074.8375%2011.09%200%200%2032.975%2014.7525%2032.975%2065.0825%200%200%20.41375%2037.13375-4.59875%2062.915%22%20fill%3D%22%233088d4%22%2F%3E%3Cpath%20d%3D%22M177.50984%2080.077v60.94125h-24.14375v-59.15c0-12.46875-5.24625-18.7975-15.74-18.7975-11.6025%200-17.4175%207.5075-17.4175%2022.3525v32.37625H96.20734V85.42325c0-14.845-5.81625-22.3525-17.41875-22.3525-10.49375%200-15.74%206.32875-15.74%2018.7975v59.15H38.90484V80.077c0-12.455%203.17125-22.3525%209.54125-29.675%206.56875-7.3225%2015.17125-11.07625%2025.85-11.07625%2012.355%200%2021.71125%204.74875%2027.8975%2014.2475l6.01375%2010.08125%206.015-10.08125c6.185-9.49875%2015.54125-14.2475%2027.8975-14.2475%2010.6775%200%2019.28%203.75375%2025.85%2011.07625%206.36875%207.3225%209.54%2017.22%209.54%2029.675%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E");
 +  background-size: 16px;
 +  background-repeat: no-repeat;
 +  background-position: top 50% left 8px;
 +  -webkit-transition: all 0.5s;
 +  transition: all 0.5s;
 +}
 +.mstdn:hover {
 +  background-color: #484c56;
 +}
 +.mstdn > span {
 +  color: #9baec8;
 +  font-size: 12px;
 +  padding-left: 3px;
 +}
 +.mstdn > span:before {
 +  content: "@";
 +}
 +@media (min-width: 75em) {
 +  
 +  [data-scrolldir="down"] .sticky {
 +    position: fixed;
 +    top:100px;
 +    right:0;
 +  }
 +
 +  [data-scrolldir="up"] .sticky {
 +    position: fixed;
 +    top:100px;
 +    right:0;
 +  }
 +}
++#right-sidebar {
++  scrollbar-width: none; /* hide scrollbar: Firefox */
++  -ms-overflow-style: none;  /* hide scrollbar: Internet Explorer 10+ */
++  height: calc(100vh - 9rem);
++  overflow-y: auto;
++}
++#right-sidebar::-webkit-scrollbar { /* hide scrollbar: WebKit */
++  width: 0;
++  height: 0;
++}
 +.fill-current { fill: currentColor; }
 +/* Background */
 +.chroma { background-color: #ffffff }
 +/* Error */
 +.chroma .err { color: #a61717; background-color: #e3d2d2 }
 +/* LineTableTD */
 +.chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
 +/* LineTable */
 +.chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
 +/* LineHighlight */
 +.chroma .hl { display: block; width: 100%;background-color: #ffffcc }
 +/* LineNumbersTable */
 +.chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; }
 +/* LineNumbers */
 +.chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; }
 +/* Keyword */
 +.chroma .k { font-weight: bold }
 +/* KeywordConstant */
 +.chroma .kc { font-weight: bold }
 +/* KeywordDeclaration */
 +.chroma .kd { font-weight: bold }
 +/* KeywordNamespace */
 +.chroma .kn { font-weight: bold }
 +/* KeywordPseudo */
 +.chroma .kp { font-weight: bold }
 +/* KeywordReserved */
 +.chroma .kr { font-weight: bold }
 +/* KeywordType */
 +.chroma .kt { color: #445588; font-weight: bold }
 +/* NameAttribute */
 +.chroma .na { color: #008080 }
 +/* NameBuiltin */
 +.chroma .nb { color: #999999 }
 +/* NameClass */
 +.chroma .nc { color: #445588; font-weight: bold }
 +/* NameConstant */
 +.chroma .no { color: #008080 }
 +/* NameEntity */
 +.chroma .ni { color: #800080 }
 +/* NameException */
 +.chroma .ne { color: #990000; font-weight: bold }
 +/* NameFunction */
 +.chroma .nf { color: #990000; font-weight: bold }
 +/* NameNamespace */
 +.chroma .nn { color: #555555 }
 +/* NameTag */
 +.chroma .nt { color: #000080 }
 +/* NameVariable */
 +.chroma .nv { color: #008080 }
 +/* LiteralString */
 +.chroma .s { color: #bb8844 }
 +/* LiteralStringAffix */
 +.chroma .sa { color: #bb8844 }
 +/* LiteralStringBacktick */
 +.chroma .sb { color: #bb8844 }
 +/* LiteralStringChar */
 +.chroma .sc { color: #bb8844 }
 +/* LiteralStringDelimiter */
 +.chroma .dl { color: #bb8844 }
 +/* LiteralStringDoc */
 +.chroma .sd { color: #bb8844 }
 +/* LiteralStringDouble */
 +.chroma .s2 { color: #bb8844 }
 +/* LiteralStringEscape */
 +.chroma .se { color: #bb8844 }
 +/* LiteralStringHeredoc */
 +.chroma .sh { color: #bb8844 }
 +/* LiteralStringInterpol */
 +.chroma .si { color: #bb8844 }
 +/* LiteralStringOther */
 +.chroma .sx { color: #bb8844 }
 +/* LiteralStringRegex */
 +.chroma .sr { color: #808000 }
 +/* LiteralStringSingle */
 +.chroma .s1 { color: #bb8844 }
 +/* LiteralStringSymbol */
 +.chroma .ss { color: #bb8844 }
 +/* LiteralNumber */
 +.chroma .m { color: #009999 }
 +/* LiteralNumberBin */
 +.chroma .mb { color: #009999 }
 +/* LiteralNumberFloat */
 +.chroma .mf { color: #009999 }
 +/* LiteralNumberHex */
 +.chroma .mh { color: #009999 }
 +/* LiteralNumberInteger */
 +.chroma .mi { color: #009999 }
 +/* LiteralNumberIntegerLong */
 +.chroma .il { color: #009999 }
 +/* LiteralNumberOct */
 +.chroma .mo { color: #009999 }
 +/* Operator */
 +.chroma .o { font-weight: bold }
 +/* OperatorWord */
 +.chroma .ow { font-weight: bold }
 +/* Comment */
 +.chroma .c { color: #999988; font-style: italic }
 +/* CommentHashbang */
 +.chroma .ch { color: #999988; font-style: italic }
 +/* CommentMultiline */
 +.chroma .cm { color: #999988; font-style: italic }
 +/* CommentSingle */
 +.chroma .c1 { color: #999988; font-style: italic }
 +/* CommentSpecial */
 +.chroma .cs { color: #999999; font-weight: bold; font-style: italic }
 +/* CommentPreproc */
 +.chroma .cp { color: #999999; font-weight: bold }
 +/* CommentPreprocFile */
 +.chroma .cpf { color: #999999; font-weight: bold }
 +/* GenericDeleted */
 +.chroma .gd { color: #000000; background-color: #ffdddd }
 +/* GenericEmph */
 +.chroma .ge { font-style: italic }
 +/* GenericError */
 +.chroma .gr { color: #aa0000 }
 +/* GenericHeading */
 +.chroma .gh { color: #999999 }
 +/* GenericInserted */
 +.chroma .gi { color: #000000; background-color: #ddffdd }
 +/* GenericOutput */
 +.chroma .go { color: #888888 }
 +/* GenericPrompt */
 +.chroma .gp { color: #555555 }
 +/* GenericStrong */
 +.chroma .gs { font-weight: bold }
 +/* GenericSubheading */
 +.chroma .gu { color: #aaaaaa }
 +/* GenericTraceback */
 +.chroma .gt { color: #aa0000 }
 +/* TextWhitespace */
 +.chroma .w { color: #bbbbbb }
++@media print {
++  #page-footer,
++  body > footer,
++  body > nav {
++    display: none;
++  }
++}
++/*
++Make h6 elements behave like dt elements. Initially implemented to support
++linkable glossary entries.
++
++Yes, it's a hack. That's why it's in the shame file.
++*/
++h6 {
++  margin-top: 0;
++  margin-bottom: 0;
++  font-size: 1.125rem;
++}
++h6:first-of-type {
++  margin-top: 3em;
++}
++h6 ~ p {
++  margin: 0.5em 0 2em 0;
++}
 +.nested-blockquote blockquote {
 +  border-left: 4px solid #0594CB;
 +  padding-left: 1em;
 +}
 +.mw-90 {
 +  max-width:90%;
 +}
 +/* purgecss end ignore */
 +
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..94ea0cad0846ab81877849f8b595a1457bcf5adb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++<pre class="mermaid">
++  {{- .Inner | safeHTML }}
++</pre>
++{{ .Page.Store.Set "hasMermaid" true }}
index 6f944aee3157b7b9740e49626d09256f64f0b535,0000000000000000000000000000000000000000..e1b29119fa0aeaf2083974fd46f7311fd1742d47
mode 100644,000000..100644
--- /dev/null
@@@ -1,5 -1,0 +1,5 @@@
- {{- if and (ge .Level 2) (le .Level 4) }}{{" " -}}
 +<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}
++{{- if in (slice 2 3 4 6) .Level }}{{" " -}}
 +<a class="header-link" href="#{{ .Anchor | safeURL }}"><svg class="fill-current o-60 hover-accent-color-light" height="22px" viewBox="0 0 24 24" width="22px" xmlns="http://www.w3.org/2000/svg"><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"/></svg></a>
 +{{- end -}}
 +</h{{ .Level }}>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7b3d58c2df58e2c586c84ab72b24c1d57bf6aa48
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,250 @@@
++{{- /* Last modified: 2023-09-04T09:23:04-07:00 */}}
++
++{{- /*
++Copyright 2023 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}
++*/}}
++
++{{- /* Initialize. */}}
++{{- $renderHookName := "link" }}
++
++{{- /* Verify minimum required version. */}}
++{{- $minHugoVersion := "0.120.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 := "" }}
++{{- with .Page.File }}
++  {{- $contentPath = .Path }}
++{{- else }}
++  {{- $contentPath = .Path }}
++{{- end }}
++
++{{- /* 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 $u.IsAbs }}
++  {{- /* Destination is a remote resource. */}}
++  {{- $attrs = merge $attrs (dict "rel" "external") }}
++{{- else }}
++  {{- with $u.Path }}
++    {{- with $p := or ($.Page.GetPage .) ($.Page.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 $.Page.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 }}
++        {{- end }}
++      {{- 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 }}
++{{- with .Title }}
++  {{- $attrs = merge $attrs (dict "title" .) }}
++{{- end -}}
++
++{{- /* Render anchor element. */ -}}
++<a
++  {{- range $k, $v := $attrs }}
++    {{- printf " %s=%q" $k $v | safeHTMLAttr }}
++  {{- end -}}
++>{{ .Text | safeHTML }}</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 {srting} 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 -}}
index 5767f078badab188e04f3f27226b02fcd2adb3a8,0000000000000000000000000000000000000000..09cbb2f66542b7e072566e9c0864610cf722eaba
mode 100644,000000..100644
--- /dev/null
@@@ -1,119 -1,0 +1,119 @@@
-       {{ partial "gtag" . }}
 +<!DOCTYPE html>
 +<html
 +  class="no-js"
 +  lang="{{ with $.Site.LanguageCode }}
 +    {{ . }}
 +  {{ else }}
 +    en-us
 +  {{ end }}
 +  ">
 +  <head>
 +    <meta charset="utf-8" />
 +    {{/* https://www.zachleat.com/web/preload/ */}}
 +    <link
 +      rel="preload"
 +      href="{{ "fonts/muli-latin-200.woff2" | absURL }}"
 +      as="font"
 +      type="font/woff2"
 +      crossorigin />
 +    <link
 +      rel="preload"
 +      href="{{ "fonts/muli-latin-400.woff2" | absURL }}"
 +      as="font"
 +      type="font/woff2"
 +      crossorigin />
 +    <link
 +      rel="preload"
 +      href="{{ "fonts/muli-latin-800.woff2" | absURL }}"
 +      as="font"
 +      type="font/woff2"
 +      crossorigin />
 +
 +    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
 +    {{/* NOTE: the Site's title, and if there is a page title, that is set too */}}
 +    <title>
 +      {{ block "title" . }}
 +        {{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}
 +      {{ end }}
 +
 +    </title>
 +
 +    <meta name="viewport" content="width=device-width,minimum-scale=1" />
 +    {{ hugo.Generator }}
 +
 +    {{ if hugo.IsProduction }}
 +      <meta name="robots" content="index, follow" />
 +    {{ else }}
 +      <meta name="robots" content="noindex, nofollow" />
 +    {{ end }}
 +
 +    {{ range .AlternativeOutputFormats -}}
 +      <link
 +        rel="{{ .Rel }}"
 +        type="{{ .MediaType.Type }}"
 +        href="{{ .Permalink | safeURL }}" />
 +    {{ end -}}
 +
 +    {{ $isDev := eq hugo.Environment "development" }}
 +    {{ $stylesheet := resources.Get "output/css/app.css" }}
 +    {{ if not $isDev }}
 +      {{ $stylesheet = $stylesheet | minify | fingerprint }}
 +    {{ end }}
 +    {{ with $stylesheet }}
 +      {{ if $isDev }}
 +        <link
 +          rel="stylesheet"
 +          href="{{ .RelPermalink }}"
 +          crossorigin="anonymous" />
 +      {{ else }}
 +        <link
 +          rel="stylesheet"
 +          href="{{ .RelPermalink }}"
 +          integrity="{{ .Data.Integrity }}"
 +          crossorigin="anonymous" />
 +      {{ end }}
 +      {{ $.Scratch.Set "stylesheet" . }}
 +    {{ end }}
 +
 +
 +    <meta
 +      name="description"
 +      content="{{ with .Description }}
 +        {{ . }}
 +      {{ else }}
 +        {{ with .Site.Params.description }}{{ . }}{{ end }}
 +      {{ end }}
 +      " />
 +
 +    {{ block "scripts" . }}
 +      {{- partial "site-scripts.html" . -}}
 +    {{ end }}
 +    {{ partial "site-manifest.html" . }}
 +    {{- partial "head-additions.html" . -}}
 +    {{- partial "opengraph/opengraph.html" . -}}
 +    {{- template "_internal/schema.html" . -}}
 +    {{- partial "opengraph/twitter_cards.html" . -}}
 +
 +    {{ if hugo.IsProduction }}
-     {{ partial "hooks/after-body-start" . }}
++      {{ partial "gtag.html" . }}
 +    {{ end }}
 +
 +  </head>
 +
 +  <body
 +    class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }}
 +      {{ . }}
 +    {{ end }}">
-     {{ partial "hooks/before-body-end" . }}
++    {{ partial "hooks/after-body-start.html" . }}
 +    {{ block "nav" . }}{{ partial "site-nav.html" . }}{{ end }}
 +    {{ block "header" . }}{{ end }}
 +    <main role="main" class="content-with-sidebar min-vh-100 pb7 pb0-ns">
 +      {{ block "main" . }}{{ end }}
 +    </main>
 +
 +    {{ block "footer" . }}{{ partialCached "site-footer.html" . }}{{ end }}
 +
++    {{ partial "hooks/before-body-end.html" . }}
 +
 +  </body>
 +</html>
index 898d7c8f4ef35fe59c6d726484e1a86dd75a21aa,0000000000000000000000000000000000000000..108d323237471d083b347c81eee84f2f9a299a79
mode 100644,000000..100644
--- /dev/null
@@@ -1,37 -1,0 +1,48 @@@
-   {{ if .Params.categories }}
 +<header class="flex-none w-100">
-         {{ humanize  . | upper }}
++  {{ if in (slice "functions" "methods") .Type }}
++    {{ with .FirstSection }}
++      <a href="{{ .RelPermalink }}" class="f6 fw8 mb0 link mid-gray dim mr3">
++        {{ humanize .Title | upper }}
++      </a>
++    {{ end }}
++    {{ with .CurrentSection }}
++      <a href="{{ .RelPermalink }}" class="f6 fw8 mb0 link mid-gray dim mr3">
++        {{ humanize .Title | upper }}
++      </a>
++    {{ end }}
++  {{ else }}
 +    {{ range .Params.categories }}
 +      <a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" class="f6 fw8 mb0 link mid-gray dim mr3">
-   {{end}}
++        {{ humanize . | upper }}
 +      </a>
 +    {{ end }}
-     {{- if eq .Section "functions" -}}
-       {{ .LinkTitle }}
-     {{- else -}}
-       {{ .Title }}
-     {{- end -}}
++  {{ end }}
 +  <h1 class="lh-title mb3 mv0 pt3 primary-color-dark">
-     <div class="f4 fw4 lh-copy">
++    {{ .Title }}
 +  </h1>
 +</header>
 +
 +<aside class="bt bw1 pt3 mt2 mid-gray b--mid-gray fn w-100">
 +  {{ with .Params.description }}
- <div class="prose prose-{{ .Type }}" id="prose">
-   {{- partial "docs/functions-signature.html" . -}}
++    <div class="mb4 f4 fw4 lh-copy">
 +      {{ . | markdownify }}
 +    </div>
 +  {{ end }}
 +
 +  <!--
 +  NOTE: Removed to test builds without it.
 +  partial "components/author-github-data" (dict "context" . "size" "110") -->
 +</aside>
 +
 +{{ with .Params.featured_image_path }}
 +  <img src="{{ . }}" alt="Featured Image for {{ $.Title }}" class="mw-100">
 +{{ end }}
 +
++<div class="prose" id="prose">
++  <div class="mb4">
++    {{- partial "docs/functions-signatures.html" . -}}
++    {{- partial "docs/functions-return-type.html" . -}}
++    {{- partial "docs/functions-aliases.html" . -}}
++  </div>
 +  {{ .Content }}
 +</div>
index 8cd2896249db03e909844ec5a500f38211e25435,0000000000000000000000000000000000000000..092a692706de2fad99b3ac3c719cda5b8e9eab40
mode 100644,000000..100644
--- /dev/null
@@@ -1,31 -1,0 +1,29 @@@
-       <div class="order-2 w-100 w-20-l ph5-m ph0-l mb4 sticky">
-       {{- partial "toc.html" . -}}
 +{{ define "main" }}
 +  <article class="w-100 ph4 pb5 pb6-ns pt1 pt5-ns">
 +    <div class="flex-l">
 +
-       <div class="order-1 w-60-l mw7 ph0 ph5-ns mid-gray nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote mt0-ns" style="flex-grow:1;">
-         <div class="documentation-copy center measure-wide-l">
-           <div id="readout" class="fixed right-0 bottom-0">
-           </div>
++      <div class="order-0 w-20 dn db-l">
++        {{ partial "nav-links-docs.html" . }}
 +      </div>
-       <div class="order-0 w-20 dn db-l">
-         {{ partial "nav-links-docs.html" . }}
++      <div class="order-1 flex-grow-1 ph0 ph5-ns mt0-ns mid-gray nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote">
++        <div style="max-width: 40rem;" class="documentation-copy">
++          <div id="readout" class="fixed right-0 bottom-0"></div>
 +          {{ .Render "page" }}
 +          {{ partial "related.html" . }}
 +        </div>
 +      </div>
-   <div class="w-100 bg-light-gray">
++      <div id="right-sidebar" class="order-2 w-20 dn db-l sticky pt2">
++        {{ partial "right-sidebar.html" . }}
 +      </div>
 +
 +    </div>
 +  </article>
 +
++  <div id="page-footer" class="w-100 bg-light-gray">
 +    <div class="mw7 pa4 center nested-lh-copy lh-copy">
 +      {{ partial "docs/page-meta-data.html" . }}
 +      {{ partial "page-edit.html" . }}
 +      {{ partial "tags.html" . }}
 +    </div>
 +  </div>
 +{{ end }}
index 93dfdd6c60ef6d583c6401a35fa8ae26e6169d38,0000000000000000000000000000000000000000..3df97ae4252171317db31a888274ea3d0acc51db
mode 100644,000000..100644
--- /dev/null
@@@ -1,27 -1,0 +1,27 @@@
-   {{ partial "hero" . }}
-   {{ partial "boxes-small-news" . }}
 +{{ define "header" }}
-     {{- partial "home-page-sections/features-icons" . -}}
++  {{ partial "hero.html" . }}
++  {{ partial "boxes-small-news.html" . }}
 +{{ end }}
 +
 +{{ define "main" }}
 +  <section class="w-100 ph4 ph5-ns pv4">
-   {{- partial "home-page-sections/features-single" . -}}
++    {{- partial "home-page-sections/features-icons.html" . -}}
 +  </section>
 +
 +  {{ partial "home-page-sections/sponsors.html" (dict "cx" . "gtag" "home" ) }}
 +
-   {{- partial "home-page-sections/showcase.html" . -}} 
++  {{- partial "home-page-sections/features-single.html" . -}}
 +
-     {{- partial "home-page-sections/installation" . -}}
++  {{- partial "home-page-sections/showcase.html" . -}}
 +
 +  <section class="w-100 ph4 ph5-ns pv4 pv6-ns mid-gray bg-white bb bt b--light-gray">
-     {{- partial "home-page-sections/tweets" . -}}
++    {{- partial "home-page-sections/installation.html" . -}}
 +  </section>
 +
 +  <section class="w-100 ph4 ph5-ns pv4 pv6-ns mid-gray bg-accent-color-dark">
-     {{- partial "home-page-sections/open-source-involvement" . -}}
++    {{- partial "home-page-sections/tweets.html" . -}}
 +  </section>
 +  <section class="w-100 ph4 ph5-ns pt4 pb5 mid-gray bg-primary-color-light bb bt b--light-gray ">
++    {{- partial "home-page-sections/open-source-involvement.html" . -}}
 +  </section>
 +{{ end }}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1d3498a1efbad20fb6f9e3fa140b82343e9a84fd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,38 @@@
++<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
++  <channel>
++    <title>{{ .Site.Title }} – {{ .Title }}</title>
++    <link>{{ .Permalink }}</link>
++    <description>Recent Hugo news from gohugo.io</description>
++    <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
++    <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
++    <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
++    <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
++    <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
++    <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
++    <image>
++      <url>{{ "img/hugo.png" | absURL }}</url>
++      <title>GoHugo.io</title>
++      <link>{{ .Permalink }}</link>
++    </image>
++    {{ with .OutputFormats.Get "RSS" }}
++      {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
++    {{ end }}
++    {{ range first 50 (where .Site.RegularPages "Type" "in" (slice "news" "showcase")) }}
++    <item>
++      <title>{{ .Section | title }}: {{ .Title }}</title>
++      <link>{{ .Permalink }}</link>
++      <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
++      {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
++      <guid>{{ .Permalink }}</guid>
++      <description>
++        {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }}
++        {{ with $img }}
++        {{ $img := .Resize "640x" }}
++        {{ printf "<![CDATA[<img src=\"%s\" width=\"%d\" height=\"%d\"/>]]>" $img.Permalink $img.Width $img.Height | safeHTML }}
++        {{ end }}
++        {{ .Content | html }}
++      </description>
++    </item>
++    {{ end }}
++  </channel>
++</rss>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f78bbd08f2b5344375da4633037ebd9e08ed88b7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,78 @@@
++{{ define "main" }}
++  <div class="w-100 ph4 pb5 pb6-ns pt1 mt4 pt3-ns">
++    <div class="flex-l">
++      <div class="order-2 w-100 w-20-l ph5-m ph0-l mb4 sticky">
++        <aside
++          class="fixed-lTK mw5-l right-0 f6 bl-l b--moon-gray pv4 pv0-ns ph4-l nested-list-reset nested-links nested-copy-line-height">
++          <p class="b">What's on this Page</p>
++          <ul>
++            <li><a href="#last-updated">Last Updated</a></li>
++            <li>
++              <a href="#least-recently-updated">Least Recently Updated</a>
++            </li>
++            <li><a href="#todos">Pages marked with TODO</a></li>
++            <li>
++              <a href="#dependencies">Project dependencies (Hugo Modules)</a>
++            </li>
++          </ul>
++        </aside>
++      </div>
++      <div class="w-100">
++        {{ $byLastMod :=  .Site.RegularPages.ByLastmod }}
++        {{ $recent := ($byLastMod | last 30).Reverse }}
++        {{ $leastRecent := $byLastMod | first 10 }}
++        <h2 id="last-updated">Last Updated</h2>
++        {{ partial "maintenance-pages-table.html" $recent }}
++        <h2 id="least-recently-updated">Least Recently Updated</h2>
++        {{ partial "maintenance-pages-table.html" $leastRecent }}
++
++        {{/* Don't think this is possible with where directly. Should investigate. */}}
++        {{ .Scratch.Set "todos" slice }}
++        {{ range .Site.RegularPages }}
++          {{ if .HasShortcode "todo" }}
++            {{ $.Scratch.Add "todos" . }}
++          {{ end }}
++        {{ end }}
++        <h2 id="todos">Pages marked with TODO</h2>
++        {{ partial "maintenance-pages-table.html" (.Scratch.Get "todos") }}
++
++
++        <h2 id="dependencies">Dependencies</h2>
++        <table class="collapse ba br2 b--black-10 pv2 ph3">
++          <thead>
++            <tr>
++              <th class="pv2 ph3 tl f6 fw6 ttu">#</th>
++              <th class="pv2 ph3 tl f6 fw6 ttu">Owner</th>
++              <th class="pv2 ph3 tl f6 fw6 ttu">Path</th>
++              <th class="pv2 ph3 tl f6 fw6 ttu">Version</th>
++              <th class="pv2 ph3 tl f6 fw6 ttu">Time</th>
++              <th class="pv2 ph3 tl f6 fw6 ttu">Vendor</th>
++            </tr>
++          </thead>
++          <tbody>
++            {{ range $index, $element := hugo.Deps }}
++              <tr class="striped--light-gray">
++                <th class="pv2 ph3">{{ add $index 1 }}</th>
++                <td class="pv2 ph3">
++                  {{ with $element.Owner }}{{ .Path }}{{ end }}
++                </td>
++                <td class="pv2 ph3">
++                  {{ $element.Path }}
++                  {{ with $element.Replace }}
++                    =>
++                    {{ .Path }}
++                  {{ end }}
++                </td>
++                <td class="pv2 ph3">{{ $element.Version }}</td>
++                <td class="pv2 ph3">
++                  {{ with $element.Time }}{{ . }}{{ end }}
++                </td>
++                <td class="pv2 ph3">{{ $element.Vendor }}</td>
++              </tr>
++            {{ end }}
++          </tbody>
++        </table>
++      </div>
++    </div>
++  </div>
++{{ end }}
index eeb8cb2d9e62ad4b14ee54f01b03182659eda6f1,0000000000000000000000000000000000000000..5165c8a13e23e70507754814365598168de51e39
mode 100644,000000..100644
--- /dev/null
@@@ -1,41 -1,0 +1,70 @@@
-   <!-- TODO: May be a good idea in this case to add monthly archives -->
 +{{ define "main" }}
 +<div class="w-100 ph4 ph5-ns pb5 pb6-ns pt1 pt3-ns ">
 +
 +  <article class="cf pa3 pa4-m pa4-l nested-copy-line-height nested-img">
 +    <h1 class="primary-color-dark">
 +      {{ .Title }}
 +    </h1>
 +    <div class="nested-copy-line-height">
 +      {{ .Content }}
 +    </div>
 +  </article>
 +
-       {{/* [wip] add archive lists
-       <div class="w-100 w-20-ns dn">
-         <ul>
-           <li>
-             <a href="#">
-               archive section
-             </a>
-           </li>
-         </ul>
-       </div> */}}
 +  <div class="flex flex-wrap">
-       {{ $paginator := .Paginate (.Pages | lang.Merge (where .Sites.First.RegularPages "Section" .Section)) -}}
-       {{ range $paginator.Pages }}
-         {{ partial "boxes-section-summaries" (dict "context" . "classes" $interior_classes "fullcontent" false) }}
 +    {{ $interior_classes := $.Site.Params.flex_box_interior_classes }}
 +    <section class="flex-ns flex-wrap justify-between w-100 w-80-nsTK v-top">
-   <div class="nested-list-reset nested-links">
-     {{/* pagination.html: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */}}
-     {{ template "_internal/pagination.html" . }}
-   </div>
++
++      {{ $news_items := slice }}
++
++      {{/* Get releases from GitHub. */}}
++      {{ $u := "https://api.github.com/repos/gohugoio/hugo/releases" }}
++      {{ $releases := partial "inline/get-remote-data.html" $u }}
++      {{ $releases = where $releases "draft" false }}
++      {{ $releases = where $releases "prerelease" false }}
++      {{ range $releases | first 20 }}
++        {{ $ctx := dict
++          "Date" (.published_at | time.AsTime)
++          "Title" (printf "Release %s" .name)
++          "Permalink" .html_url
++          "Section" "news"
++          "Summary" ""
++        }}
++        {{ $news_items = $news_items | append $ctx }}
++      {{ end }}
++
++      {{/* Get content pages from news section. */}}
++      {{ range .Pages }}
++        {{ $ctx := dict
++          "Date" .Date
++          "Title" .Title
++          "RelPermalink" .RelPermalink
++          "Section" "news"
++          "Summary" .Summary
++          "Params" (dict "description" .Description)
++        }}
++        {{ $news_items = $news_items | append $ctx }}
 +      {{ end }}
++
++      {{/* Sort by date (descending) and render. */}}
++      {{ range sort $news_items "Date" "desc" }}
++        {{ partial "boxes-section-summaries.html" (dict "context" . "classes" $interior_classes "fullcontent" false) }}
++      {{ end }}
++
 +    </section>
 +  </div>
 +
 +</div>
 +{{ end }}
++
++{{ define "partials/inline/get-remote-data.html" }}
++  {{ $u := . }}
++  {{ $r := "" }}
++  {{ with $r = resources.GetRemote $u }}
++    {{ with .Err }}
++      {{ errorf "%s" . }}
++    {{ end }}
++  {{ else }}
++    {{ errorf "Unable to get remote resource %q" $u }}
++  {{ end }}
++  {{ return ($r | transform.Unmarshal) }}
++{{ end }}
index 200daa70a1dc4e0d08791aabfe78feb98621577c,0000000000000000000000000000000000000000..eb34bedd7f2e5766d1e1c60b268b5a16428203f8
mode 100644,000000..100644
--- /dev/null
@@@ -1,88 -1,0 +1,85 @@@
-         <!--
-         NOTE: Removed to test builds without it.
-         partial "components/author-github-data" (dict "context" . "size" "110") -->
 +{{ define "main" }}
 +  {{ $currentPageUrl := .RelPermalink }}
 +
 +  <article class="cf ph4 pv3 pv5-ns">
 +      <!-- header spans the full width -->
 +    <header class="flex-none w-100 pb3">
 +      {{ if .Params.categories }}
 +        {{ range .Params.categories }}
 +          <a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" class="f6 fw8 mb0 link mid-gray dim mr3">
 +            {{ humanize  . | upper }}
 +          </a>
 +        {{ end }}
 +      {{end}}
 +
 +      <h1 class="lh-title fw9 mb7 mv0 pt3">
 +        <a href="{{ .RelPermalink }}" class="link primary-color dim">
 +          {{ .Title }}
 +        </a>
 +      </h1>
 +    </header>
 +
 +    <div class="flex-l">
 +      <aside class="mid-gray fn w-100 w-25-l">
 +        {{ with .Params.description }}
 +          <h2 class="f3 lh-title">
 +            {{ . | markdownify }}
 +          </h2>
 +        {{ end }}
 +        <time class="f6 mt2 db ttu tracked" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
 +          {{ .Date.Format "January 2, 2006" }}
 +        </time>
 +        {{ if in .Params.categories "Releases" }}
 +        <p>
 +        Go to <a href="https://github.com/gohugoio/hugo/releases" class="link primary-color dim">Hugo Releases</a> for the release downloads.
 +        </p>
 +        {{ end }}
 +
 +        <div class="nested-links mt4">
 +          {{- partial "previous-next-links-in-section.html" . -}}
 +        </div>
 +
 +      </aside>
 +
 +      <div class="fn pl5-l pt3 mid-gray w-100 w-two-third-l sans-serif nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote measure-wide-l"><!-- TODO: Can the content top and the description top line up more precisely, or is just winging it with padding the best we've got? -->
 +        {{ with .Params.featured_image_path }}
 +          <img src="{{ . }}" alt="Featured Image for {{ $.Title }}" class="mw-100">
 +        {{ else }}
 +          {{ $featured := (.Resources.ByType "image").GetMatch "*featured*" }}
 +          {{ with $featured }}
 +          {{ $featured := .Resize "480x" }}
 +          <img src="{{ $featured.RelPermalink }}" alt="Featured Image for {{ $.Title }}" class="mw-100">
 +          {{ end }}
 +          {{ end }}
 +        {{ .Content }}
 +      </div>
 +    </div>
 +    {{ if and .Params.tags .Site.Taxonomies.tags }}
 +      <div class="mt5 f6 gray nested-lh-copy bg-light-gray ph3 pv2 measure-wide-l">
 +          {{ $name := index .Params.tags 0 }}
 +          {{ $name := $name | urlize }}
 +          {{ $tags := index .Site.Taxonomies.tags $name }}
 +
 +            <ul class="list dib nested-links ml0 pl0">
 +              <li class="dib mb2 mr2">Related:</li>
 +              {{ range $tags.Pages }}
 +                {{ if ne .RelPermalink $currentPageUrl }}
 +                  <li class="mb2 mr3">
 +                     <a href="{{ .RelPermalink }}" class="link">
 +                       {{ .LinkTitle }}
 +                     </a>
 +                   </li>
 +                {{ end }}
 +              {{end}}
 +            </ul>
 +          </div>
 +        {{end}}
 +
 +      <div class="gray f6 mv6">
 +        Last Update: {{ .Lastmod.Format "January 2, 2006" }} <br>
 +        {{ partial "page-edit.html" . }}
 +      </div>
 +
 +  </article>
 +
 +{{ end }}
index b7e37c47c2da21a489ef05d667dba14671b956e8,0000000000000000000000000000000000000000..b293dc17da7aa312a857b422a1647b1ccbc607be
mode 100644,000000..100644
--- /dev/null
@@@ -1,35 -1,0 +1,46 @@@
 +<div class="relative {{ .classes }} weight-{{ .context.Weight }}">
-       <date class="f6 db" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
 +  <div class="bg-white mb2 pa3 pa4-l gray">
++
++    {{ $href := .context.RelPermalink }}
 +    {{ if eq .context.Section "news" }}
-       </date>
++      {{ $href = .context.Permalink }}
++      <time class="f6 db" datetime="{{ .context.Date.Format `2006-01-02T15:04:05Z07:00` }}">
 +        {{ .context.Date.Format "January 2, 2006" }}
-       <a href="{{ .context.RelPermalink }}" class="link primary-color dim">
-       {{- if eq .context.Section "functions" -}}
-         {{ .context.LinkTitle }}
-       {{- else -}}
++      </time>
 +    {{ end }}
 +
 +    <h1 class="near-black f3">
-       {{- end -}}
++      <a href="{{ $href }}" class="link primary-color dim">
 +        {{ .context.Title }}
 +      </a>
 +    </h1>
-       {{ if .context.Params.description  }}
 +    <div class="lh-copy links">
-       {{ end }}
-         <a href="{{ .context.RelPermalink }}" class="f6 mt2 db link primary-color dim">
-           Read More &raquo;
-         </a>
++      {{ if eq .context.Section "commands" }}
++        {{ replaceRE `(?s).*?##\s.*?\n\n(.*?)\n.*` "$1" .context.RawContent  }}
++      {{ else }}
++
++        {{ if in (slice "functions" "methods") .context.Type }}
++          {{ with $signature := index .context.Params.action.signatures 0 }}
++            {{ if $.context.Params.action.returnType }}
++              {{ $signature = printf "%s ⟼ %s" $signature $.context.Params.action.returnType }}
++            {{ end }}
++            <pre class="f6 mb3 ph3 pv2 bg-light-gray overflow-x-auto">
++              {{- $signature -}}
++            </pre>
++          {{ end }}
++        {{ end }}
++
++        {{ if .context.Params.description  }}
 +          {{ .context.Params.description | markdownify }}
 +        {{ else }}
 +          {{ .context.Summary  }}
++        {{ end }}
 +
++      {{ end }}
++      <a href="{{ $href }}" class="f6 mt2 db link primary-color dim">
++        Read More &raquo;
++      </a>
 +    </div>
 +
 +  </div>
 +</div>
index 0b01257400832a5bf3d7551af0943a266b71f250,0000000000000000000000000000000000000000..0d53c5465d136339f63d0efe2b78fc2a1e4d389f
mode 100644,000000..100644
--- /dev/null
@@@ -1,18 -1,0 +1,1 @@@
- <section class="relative w-100 bg-black white">
-   <div class="flex flex-wrap w-90-l center center mw9">
-     <!-- <a href="/news/" class="link accent-color tr-ns f6 w-100 w-50-m w-10-l bg-animate hover-bg-accent-color hover-white pv3 pv4-l ph3 ph4-l dib">
-       Latest News:
-     </a> -->
-     {{ range first 4 ( sort (where .Site.RegularPages "Section" "news") "Date" "desc" ) }}
-       <!-- only show 2 boxes on mobile -->
-       {{ $.Scratch.Add "i" 1 }}{{ $i := $.Scratch.Get "i" }}
-       <a href="{{ .RelPermalink }}" class="link lh-copy light-gray f6 w-100 w-50-m w-25-l bg-animate hover-bg-accent-color hover-white pv3 pv4-ns ph3 ph4-ns{{ if ge $i 3 }} dn dib-l{{ else }} dib{{ end }}">
-         <span class="f6 gray pb1 db">
-           {{ .Date.Format "January 2, 2006" }}
-         </span>
-         {{ .Params.description | markdownify | truncate 100 "…"}}
-       </a>
-     {{ end }}
-   </div>
- </section>
++{{/* Empty for now. */}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3db9db4dc88957cb877c6d3dc3d730947ea315d1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++{{- with .Params.action.aliases }}
++  {{- $label := "Alias" }}
++  {{- if gt (len .) 1 }}
++    {{- $label = "Aliases" }}
++  {{- end }}
++  <p class="fw7 primary-color-dark">{{ $label }}</p>
++  {{- range . }}
++    <pre class="f5 ph3 pv2 bg-light-gray" style="border-left:4px solid #0594CB;">
++      {{- . -}}
++    </pre>
++  {{- end }}
++{{- end -}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5b01bb560489a2e85a1ba4c41dd078117c401dde
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++{{- with .Params.action.returnType }}
++  <p class="fw7 primary-color-dark">Returns</p>
++  <pre class="f5 ph3 pv2 bg-light-gray" style="border-left:4px solid #0594CB;">
++    {{- . -}}
++  </pre>
++{{- end -}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..dce160227ecdaf84fa388e9d809f5c858186adbe
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++{{- with .Params.action.signatures }}
++  <p class="fw7 primary-color-dark">Syntax</p>
++  {{- range . }}
++    {{- $signature := . }}
++    {{- if $.Params.function.returnType }}
++      {{- $signature = printf "%s ⟼ %s" . $.Params.function.returnType }}
++    {{- end }}
++    <pre class="f5 ph3 pv2 bg-light-gray overflow-x-auto" style="border-left:4px solid #0594CB;">
++      {{- $signature -}}
++    </pre>
++  {{- end }}
++{{- end -}}
index fe9f4d2aa20b41dac2449cedea6c1df3434a5188,0000000000000000000000000000000000000000..7c6a9ade52087cd032ab854af571f2b3cada387e
mode 100644,000000..100644
--- /dev/null
@@@ -1,25 -1,0 +1,25 @@@
- {{ with .Site.GoogleAnalytics }}
++{{ 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 }}
index 5aebf6737a29b76c25e7e5778a95e67622cfbf23,0000000000000000000000000000000000000000..32eb46ba878a22f152fead2a2b1cb28f0c1052c2
mode 100644,000000..100644
--- /dev/null
@@@ -1,25 -1,0 +1,27 @@@
 +<div class="flex-ns flex-wrap center mw9">
 +
 +  {{ $interior_classes := $.Site.Params.flex_box_interior_classes }}
 +
 +  <h3 class="f2 fw4 white">See what others are saying about Hugo…</h3>
 +
 +  <div class="flex-ns flex-wrap justify-between">
 +
++    {{ if $.Site.Data.homepagetweets }}
 +    {{ range first 4 (sort $.Site.Data.homepagetweets.tweet "date" "desc" )  }}
 +      <div class="homepage-tweet relative {{ $interior_classes }} br1 mid-gray  pv3 nested-links shadow-5">
 +          <div class="absolute top-0 left-0 ma2  o-10">
 +            {{ partial "svg/twitter.svg" . }}
 +          </div>
 +        <blockquote>
 +          <p class="f4">
 +            {{.quote | safeHTML}}
 +          </p>
 +          <cite class="homepage-tweet-attribution gray f6">&#9472; {{ .name }} ({{ .twitter_handle }}) <a href="{{ .link }}">
 +            {{ dateFormat "January 2, 2006" .date }}</a>
 +          </cite>
 +        </blockquote>
 +      </div>
 +    {{ end }}
++    {{ end }}
 +  </div>
 +</div>
index 426abd0187d2a703d1cce016a5719230f0f2846a,0000000000000000000000000000000000000000..dab653508b46eb159361e6e89102db6f6a9c456f
mode 100644,000000..100644
--- /dev/null
@@@ -1,1 -1,0 +1,7 @@@
- {{/* Deliberately empty */}}
++{{ if .Page.Store.Get "hasMermaid" }}
++  <script type="module" async>
++    import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@9/+esm';
++    
++    mermaid.initialize({ startOnLoad: true });
++  </script>
++{{ end }}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a2429a3350a43432526c3115e7f41ecddb415577
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++<table class="collapse ba br2 b--black-10 pv2 ph3">
++      <thead>
++              <tr>
++                      <th class="pv2 ph3 tl f6 fw6 ttu">LastMod</th>
++                      <th class="pv2 ph3 tl f6 fw6 ttu">Link</th>
++                      <th class="pv2 ph3 tl f6 fw6 ttu">GitHub</th>
++              </tr>
++      </thead>
++      <tbody>
++              {{ range  . }}
++              <tr class="striped--light-gray">
++                      <td class="pv2 ph3">{{ .Lastmod.Format "2006-01-02" }}</td>
++                      <td class="pv2 ph3">
++                              <a href="{{ .Permalink }}">{{ .Title }}</a>
++                      </td>
++                      <td class="pv2 ph3">
++                              <a href="{{.Site.Params.ghrepo}}blob/master/content/{{.Lang }}/{{.File.Path}}">
++                                      {{ with .GitInfo }}{{ .Subject }}{{ else }}Source{{ end }}
++                              </a>
++                      </td>
++              </tr>
++              {{ end }}
++      </tbody>
++</table>
index d8e87eb633af6573941ea13db51c04a3915d59e2,0000000000000000000000000000000000000000..f641114099660d470cf2e7e901f2f3f06931eb5e
mode 100644,000000..100644
--- /dev/null
@@@ -1,16 -1,0 +1,16 @@@
-     {{ partial "nav-links" .}}
 +{{ $currentPage := . }}
 +<header class="dn-lTK relative cf bg-primary-color-dark pl4 w-100 z-5">
 +  <div class="flexTK items-centerTK dib ">
 +    <a class="absolute top-0 left-0 ml4 w4 w4-ns ph3  mr3" href="/">
 +      <img src="{{ .Site.Params.logo }}" alt="" class="w-100 shadow-2">
 +    </a>
 +    <a class="f4 f3-ns lh-solid brand-font fw7 link white hover-white no-underline dib mv0 ml6 pl3 mr5" href="/">
 +     {{ .Site.Title | markdownify  }}
 +    </a>
 +  </div>
 +
-     {{ partial "nav-button-open" .}}
++    {{ partial "nav-links.html" .}}
 +  <div class="dn-l">
++    {{ partial "nav-button-open.html" .}}
 +  </div>
 +</header>
index c8ff64889c6be4bcab1e6a3a560bd665443e322f,0000000000000000000000000000000000000000..6d195ede696540bfec280861910116b0320f1366
mode 100644,000000..100644
--- /dev/null
@@@ -1,42 -1,0 +1,42 @@@
- {{- with .Site.Social.facebook_admin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}
 +<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 }}
index 9d25d0315fa1c56353e9da3f4f5547c64fac859a,0000000000000000000000000000000000000000..456f87b1cc93c855e6343f91cbc1ac7e3a898d1c
mode 100644,000000..100644
--- /dev/null
@@@ -1,22 -1,0 +1,22 @@@
- {{ with .Site.Social.twitter -}}
 +{{- with $.Params.images -}}
 +<meta name="twitter:card" content="summary_large_image"/>
 +<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
 +{{ else -}}
 +{{- $featured := partial "opengraph/get-featured-image.html" . }}
 +{{- with $featured -}}
 +<meta name="twitter:card" content="summary_large_image"/>
 +<meta name="twitter:image" content="{{ $featured.Permalink }}"/>
 +{{- else -}}
 +{{- with $.Site.Params.images -}}
 +<meta name="twitter:card" content="summary_large_image"/>
 +<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
 +{{ else -}}
 +<meta name="twitter:card" content="summary"/>
 +{{- end -}}
 +{{- end -}}
 +{{- end }}
 +<meta name="twitter:title" content="{{ .Title }}"/>
 +<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
- {{ end -}}
++{{ with site.Params.social.twitter -}}
 +<meta name="twitter:site" content="@{{ . }}"/>
++{{ end -}}
index dd048223e246d49eb3a17b31c01edf389a343ffd,0000000000000000000000000000000000000000..e6b644b2f93c599af92dedd17f99de6668b34635
mode 100644,000000..100644
--- /dev/null
@@@ -1,34 -1,0 +1,36 @@@
-       <!-- TODO: May be a good idea in this case to add monthly archives -->
 +{{ $section_to_display := .section_to_display  }}
 +  <div class="w-100 ph4 pb5 pb6-ns pt1 mt4 pt3-ns">
 +
 +  <div class="flex">
 +    <div class="dn db-l w-20">
 +        {{ partial "nav-links-docs.html" .context }}
 +    </div>
 +
 +    <div class="w-100 w-80-l ph0 ph4-l">
 +      <article class="w-100 nested-copy-line-height nested-links nested-img">
 +        <h1 class="primary-color-dark f2">
 +          {{ with $.context.Data.Singular }}{{ . | humanize }}: {{ end }}{{ .context.Title }}
 +        </h1>
 +        <div class="{{ .Site.Params.copyClass }} mid-gray f5 f4-l">
 +          {{ .context.Content }}
 +        </div>
 +      </article>
 +
-           {{ range $section_to_display }}
-             {{ partial "boxes-section-summaries" (dict "context" . "classes" $interior_classes "fullcontent" true) }}
 +      <div class="flex flex-wrap">
 +        {{ $interior_classes := .context.Site.Params.flex_box_interior_classes }}
 +        <section class="flex-ns flex-wrap justify-between w-100">
++          {{ $pages := $section_to_display }}
++          {{ if in (slice "functions" "methods") $.context.Type }}
++            {{ $pages = $.context.Pages }}
++          {{ end }}
++          {{ range $pages }}
++            {{ partial "boxes-section-summaries.html" (dict "context" . "classes" $interior_classes "fullcontent" true) }}
 +          {{ end }}
 +        </section>
 +      </div>
 +
 +    </div>
 +
 +  </div>
 +
 +</div>
index fb11699af6777620c8a3d532f81df7de1c6ca3b7,0000000000000000000000000000000000000000..ff74356680643fafebcd40a79407a856dd2f56bc
mode 100644,000000..100644
--- /dev/null
@@@ -1,9 -1,0 +1,22 @@@
- {{ $related := .Site.RegularPages.Related . | first 5 }}
- {{ with $related }}
- <h2>See Also</h2>
- <ul>
-       {{ range . }}
-       <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
-       {{ end }}
- </ul>
- {{ end }}
++{{- $heading := "See also" }}
++{{- $related := site.RegularPages.Related . | first 5 }}
++
++{{- if in (slice "functions" "methods") .Type }}
++  {{- $related = slice }}
++  {{- range .Params.action.related }}
++    {{- with site.GetPage (lower .) }}
++      {{- $related = $related | append . }}
++    {{- else }}
++      {{- errorf "The 'related' partial was unable to get page %s" . }}
++    {{- end }}
++  {{- end }}
++{{- end }}
++
++{{- with $related }}
++  <h2>{{ $heading }}</h2>
++  <ul>
++    {{- range . }}
++      <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
++    {{- end }}
++  </ul>
++{{- end }}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ecdbeb33f6cd1f3c316954a34bc449df243d2b8a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,29 @@@
++<aside class="right-0 f6 pv4 pv0-ns ph4-l nested-list-reset nested-copy-line-height">
++  <div class="nested-links">
++    {{- partial "previous-next-links-in-section.html" . }}
++  </div>
++
++  {{- /* Table of contents is visible if toc = true in front matter. */}}
++      {{- if .Params.toc }}
++    <div class="nested-links">
++      <p class="f5 fw8 mid-gray mb0">On this page</p>
++      {{- .TableOfContents }}
++    </div>
++      {{- end }}
++
++  {{- /* Section menu for single pages is visible if showSectionMenu = true in top level section page. */}}
++  {{- if .FirstSection.Params.showSectionMenu  }}
++    {{- with .CurrentSection.RegularPages }}
++      <p class="mb0"><a class="link f5 fw8 mid-gray" href="{{ $.CurrentSection.RelPermalink }}">In this section</a></p>
++      <nav>
++        <ul>
++          {{- range . }}
++            <li>
++              <a style="padding: 2px 5px;" class="dib link hover-bg-black-40 hover-white blue nl1" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
++            </li>
++          {{- end }}
++        </ul>
++      </nav>
++    {{- end }}
++  {{- end }}
++</aside>
index 5c7430759adad8b6b1803add6589c3501fbedf02,0000000000000000000000000000000000000000..ce16953c8dd7b200c78d4e3e5799908494813c67
mode 100644,000000..100644
--- /dev/null
@@@ -1,9 -1,0 +1,9 @@@
-   with .Site.Social.twitter }}
 +{{/*
 +  Disable Twitter for now as we lost access to the account.
++  with site.Params.social.twitter }}
 +  <a href="https://twitter.com/intent/follow?screen_name={{ . }}" title="Follow on Twitter" class="link-transition twitter link dib z-999 pt3 pt0-l mr2">
 +    {{ partial "svg/twitter.svg" (dict "size" "32px") }}
 +  </a>
 +{{ end */}}
 +  <a rel="me" class="mstdn mr3" href="https://fosstodon.org/@gohugoio" target="_blank">gohugoio</a>
 +  <a class="github-button needs-js link primary-color-dark" href="https://github.com/gohugoio/hugo" data-size="large" data-show-count="false" aria-label="Star gohugoio/hugo on GitHub">Star</a>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2e10c3dee33331627c07047c5972d93da48d0d25
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++<dl>
++  {{ range .Site.Data.docs.chroma.lexers }}
++    <dt>{{ .Name }}</dt>
++    <dd>{{ with .Aliases }}{{ delimit . ", " }}{{ end }}</dd>
++  {{ end }}
++</dl>
index c695a7aae2470d773af5c03cdd42f2f7b74bcebe,0000000000000000000000000000000000000000..d1131132dd046553f713b66ff5ca4f15a30e0b7c
mode 100644,000000..100644
--- /dev/null
@@@ -1,24 -1,0 +1,101 @@@
- {{ $langs := (slice "yaml" "toml" "json") }}
- <div class="code relative" {{ with .Get "file" }}id="{{ . | urlize}}"{{ end }}>
-       <div class="code-nav flex flex-nowrap items-stretch">
-               {{- with .Get "file" -}}
-                       <div class="san-serif f6 dib lh-solid pl2 pv2 mr2">{{ . }}.</div>
-               {{- end -}}
-               {{ range $langs }}
-                       <button data-toggle-tab="{{ . }}" class="tab-button {{ cond (eq . "yaml") "active" ""}} ba san-serif f6 dib lh-solid ph2 pv2">{{ . }}</button>&nbsp;
-               {{ end }}
-       </div>
-       <div class="tab-content">
-               {{ range $langs }}
-                       <div data-pane="{{ . }}" class="code-copy-content nt3 tab-pane {{ cond (eq . "yaml") "active" ""}}">
-                               {{ highlight ($.Inner | transform.Remarshal . | safeHTML) . ""}}
-                       </div>
-                       {{ if ne ($.Get "copy") "false" }}
-                               <button class="needs-js copy copy-toggle bg-accent-color-dark f6 absolute top-0 right-0 lh-solid hover-bg-primary-color-dark bn white ph3 pv2" title="Copy this code to your clipboard." data-clipboard-action="copy" aria-label="copy button">
-                               </button>
-                               {{/* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}}
-                       {{end}}
-               {{ end }}
-       </div>
++{{- /*
++  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] If true, display a copy to clipboard button.
++  @param {string} [file] The file name to display above the rendered code.
++  @param {bool} [fm=false] If true, render the code as front matter.
++  @param {bool} [skipHeader=false] If false, omit top level key(s) when rendering a section of site.Data.docs.config.
++
++  @returns {template.HTML}
++*/}}
++
++{{- /* Initialize. */}}
++{{- $config := "" }}
++{{- $dataKey := "" }}
++{{- $copy := false }}
++{{- $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 class="code relative" {{ with $file }}id="{{ . | urlize }}"{{ end }}>
++  <div class="code-nav flex flex-nowrap items-stretch">
++    {{- with $file }}
++      <div class="san-serif f6 dib lh-solid pl2 pv2 mr2">
++        {{ . }}{{ if not $fm }}.{{ end }}
++      </div>
++    {{- end }}
++    {{- range $langs }}
++      <button
++        data-toggle-tab="{{ . }}"
++        class="tab-button {{ cond (eq . "yaml") "active" "" }} ba san-serif f6 dib lh-solid ph2 pv2">
++        {{ . }}
++      </button>
++      &nbsp;
++    {{- end }}
++  </div>
++  <div class="tab-content">
++    {{- range $langs }}
++      <div
++        data-pane="{{ . }}"
++        class="code-copy-content nt3 tab-pane {{ cond (eq . "yaml") "active" "" }}">
++        {{- $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>
++      {{- if $copy }}
++        <button
++          class="needs-js copy copy-toggle bg-accent-color-dark f6 absolute top-0 right-0 lh-solid hover-bg-primary-color-dark bn white ph3 pv2"
++          title="Copy this code to your clipboard."
++          data-clipboard-action="copy"
++          aria-label="copy button"></button>
++        {{- /* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}}
++      {{- end }}
++    {{- end }}
++  </div>
 +</div>
index 6df49956a09a154e4d726b47d0d25cd8e0e27466,0000000000000000000000000000000000000000..dd21551cbb4475e7dbcb7addead5d655935cf384
mode 100644,000000..100644
--- /dev/null
@@@ -1,15 -1,0 +1,35 @@@
- <div class="code relative bg-primary-color moon-gray" id="{{.Get "file" | urlize}}">
-       {{- with .Get "file" -}}
-               <div class="filename san-serif f6 dib lh-solid pl2 pv2">{{.}}</div>
-       {{- end -}}
-       {{ if ne (.Get "copy") "false" }}
-               <button class="needs-js copy bg-accent-color-dark f6 absolute top-0 right-0 lh-solid hover-bg-primary-color-dark bn white ph3 pv2" title="Copy this code to your clipboard." data-clipboard-action="copy" aria-label="copy button">
-               </button>
-               {{/* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}}
-       {{end}}
-       <div class="code-copy-content nt3" {{with .Get "download"}}id="{{.}}"{{end}}>
-               {{- .Inner -}}
-       </div>
++{{- /*
++Renders syntax highlighted code.
 +
++@param {bool} [copy=false] If true, display a copy to clipboard button.
++@param {string} [file] The file name to display above the rendered code.
++@param {string} [lang] The code language of the inner content.
++
++@returns {template.HTML}
++*/}}
++
++{{- /* Get parameters. */}}
++{{- $copy := false }}
++{{- if in (slice "false" false 0) (.Get "copy") }}
++  {{- $copy = false }}
++{{- else if in (slice "true" true 1) (.Get "copy")}}
++  {{- $copy = true }}
++{{- end }}
++{{- $file := or (.Get "file") "&nbsp;" }}
++{{- $lang := or (.Get "lang") (path.Ext $file | strings.TrimPrefix ".") "text" }}
++
++{{- /* Use the go-html-template Chroma lexer for HTML. */}}
++{{- if eq $lang "html" }}
++  {{- $lang = "go-html-template" }}
++{{- end }}
++
++{{- /* Render. */}}
++<div class="code relative" id="{{ $file | urlize }}">
++  <div class="f6 dib lh-solid pl2 pv2">{{ $file | htmlUnescape }}</div>
++  {{- if $copy }}
++    <button class="needs-js copy bg-accent-color-dark f6 absolute top-0 right-0 lh-solid hover-bg-primary-color-dark bn white ph3 pv2" title="Copy this code to your clipboard." data-clipboard-action="copy" aria-label="copy button"></button>
++  {{- end }}
++  <div class="code-copy-content nt3">
++    {{- highlight (trim .Inner "\n\r") $lang }}
++  </div>
 +</div>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ff3f299bdb00a13087837fbb8670a7b75e14aca5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,39 @@@
++{{ $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 }}
++
++<table class="table table-bordered">
++      <tr>
++              {{ range $fields }}
++              <th>{{ . }}</th>
++              {{ end }}
++      </tr>
++      {{ 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 }}
++</table>
index 7ddda86d0f420d6ca0a1680d017a97fbdbbc5883,0000000000000000000000000000000000000000..12054f89dad3c437b37b2570f92f9ee35a16af4b
mode 100644,000000..100644
--- /dev/null
@@@ -1,18 -1,0 +1,33 @@@
- <table class="utils-table">
- <thead>
-       <tr>
-               <td class="col-title">Title</td>
-               <td class="col-author">Author</td>
-               <td class="col-date">Date</td>
-       </tr>
- </thead>
- <tbody>
-       {{ range $ind, $art := $.Site.Data.articles.article }}
-       <tr>
-               <td><a href="{{$art.url}}" target="_blank">{{$art.title | markdownify }}</a></td>
-               <td>{{ $art.author | markdownify }}</td>
-               <td>{{ $art.date }}</td>
-       </tr>
-       {{ end }}
- </tbody>
- </table>
++{{ $package := (index .Params 0) }}
++{{ $listname := (index .Params 1) }}
++{{ $list := (index (index .Site.Data.docs $package) $listname) }}
++{{ $fields := after 2 .Params }}
++
++
++<table class="table table-bordered">
++  <tr>
++    {{ range $fields }}
++      {{ $s := . }}
++      {{ if eq $s "_key" }}
++        {{ $s = "Type" }}
++      {{ end }}
++      <th>{{ $s }}</th>
++    {{ end }}
++  </tr>
++  {{ 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 }}
++</table>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cab85541d0403f85c35e065d1e069ee5e3998b91
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++{{ $_hugo_config := `{ "version": 1 }` }}
++
++{{ with .Get 0 }}
++  {{ $version := printf "v%v" (strings.TrimLeft "vV" .) }}
++  {{ $href := printf "https://github.com/gohugoio/hugo/releases/tag/%s" $version }}
++  <aside>
++    <div class="admonition-content bl bw2 b--dark-red" >
++      <p>Deprecated in <a href="{{ $href }}">{{ $version }}</a></p>
++      {{ $.Inner }}
++    </div>
++  </aside>
++{{ else }}
++  {{ errorf "The %q shortcode requires a single positional parameter indicating version. See %s" .Name .Position }}
++{{ end }}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4e96504abd977af4877503f4b6fdb287b05fb431
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++<h4 class="minor mb1 pt2 primary-color-dark">Syntax</h4>
++<pre class="f5 mb4 ph3 pv2 bg-light-gray overflow-x-auto" style="border-left:4px solid #0594CB;">
++  {{- .Inner -}}
++</pre>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b56758ac38454e47007b088ba01f3c2a0e7f1847
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++{{ $text := `
++Most of the commands for **Hugo Modules** require a newer version of Go installed (see https://golang.org/dl/) and the relevant VCS client (e.g. Git, see https://git-scm.com/downloads/ ). If you have an "older" site running on Netlify, you may have to set GO_VERSION to 1.12 in your Environment settings.
++
++For more information about Go Modules, see:
++
++* https://github.com/golang/go/wiki/Modules
++* https://blog.golang.org/using-go-modules
++` }}
++
++<aside class="admonition note">
++      <div class="note-icon">
++              {{partial "svg/exclamation.svg" (dict "size" "20px" ) }}
++      </div>
++      <div class="admonition-content">
++        {{- $text | markdownify -}}
++    </div>
++</aside>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ea5b6de1d8a86a2191e69c53b550fdbae0e727d9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,374 @@@
++{{- /*
++Renders the given image using the given filter, if any.
++
++@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.
++
++@returns {template.HTML}
++
++@examples
++
++  {{< img src="zion-national-park.jpg" >}}
++
++  {{< img src="zion-national-park.jpg" alt="Zion National Park" >}}
++
++  {{< img
++    src="zion-national-park.jpg"
++    alt="Zion National Park"
++    filter="grayscale"
++  >}}
++
++  {{< img
++    src="zion-national-park.jpg"
++    alt="Zion National Park"
++    filter="process"
++    filterArgs="resize 400x webp"
++  >}}
++
++  {{< img
++    src="zion-national-park.jpg"
++    alt="Zion National Park"
++    filter="colorize"
++    filterArgs="180,50,20"
++  >}}
++
++  {{< img
++    src="zion-national-park.jpg"
++    alt="Zion National Park"
++    filter="grayscale"
++    example=true
++  >}}
++
++  {{< img
++    src="zion-national-park.jpg"
++    alt="Zion National Park"
++    filter="grayscale"
++    example=true
++    exampleWidth=400
++  >}}
++
++  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)
++
++  {{< img
++    src="images/examples/zion-national-park.jpg"
++    alt="Zion National Park"
++    filter="Text"
++    filterArgs="Zion National Park,25,250,56"
++    example=true
++  >}}
++
++  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
++
++  {{< img
++    src="images/examples/zion-national-park.jpg"
++    alt="Zion National Park"
++    filter="Padding"
++    filterArgs="20,50,20,50,#0705"
++    example=true
++  >}}
++
++*/}}
++
++{{- /* 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/main/apache/roboto/static/Roboto-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
++  "brightness" "colorbalance" "colorize" "contrast" "gamma" "gaussianblur"
++  "grayscale" "hue" "invert" "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 "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 "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 "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. */}}
++{{- if $example }}
++  <p>Original</p>
++  <img class='di ba b--black-20' style="width: initial;" src="{{ $i.RelPermalink }}" alt="{{ $alt }}">
++  <p>Processed</p>
++  <img class='di ba b--black-20' style="width: initial;" src="{{ $fi.RelPermalink }}" alt="{{ $alt }}">
++{{- else -}}
++  <img class='di' style="width: initial;" 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 resources.GetRemote $u.String }}
++      {{- with .Err }}
++        {{- errorf "%s" }}
++      {{- else }}
++        {{- /* This is a remote resource. */}}
++        {{- $r = . }}
++      {{- end }}
++    {{- else }}
++      {{- errorf $msg $.name $u.String $.position }}
++    {{- 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 -}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c09133ba8ebbe935b02116b96bde03e1cb1a8ba2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,37 @@@
++{{- /*
++Renders the given image using the given process specification.
++
++@param {string} (positional parameter 0) The path to the image, relative to the current page. The image must be a page resource.
++@param {string}} (positional parameter 1) The image processing specification.
++
++@returns template.HTML
++
++@example {{< imgproc "sunset.jpg" "resize 300x" />}}
++*/}}
++
++{{- with $.Get 0 }}
++  {{- with $i := $.Page.Resources.Get . }}
++    {{- with $spec := $.Get 1 }}
++      {{- with $i.Process . }}
++        <figure style="padding: 0.25rem; margin: 2rem 0; background-color: #cccc">
++          <img style="max-width: 100%; width: auto; height: auto;" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++          <figcaption>
++            <small>
++              {{- with $.Inner }}
++                {{ . }}
++              {{- else }}
++                {{ $spec }}
++              {{- end }}
++            </small>
++          </figcaption>
++        </figure>
++      {{- end }}
++    {{- else }}
++      {{- errorf "The %q shortcode requires a positional parameter (1) 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 positional parameter (0) indicating the image path, relative to the current page. See %s" $.Name $.Position }}
++{{- end }}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a13dd756a446d0576dc479ce415dce1885d347d3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++{{- /*
++Renders the page using the RenderShortcode method on the Page object.
++
++You must call this shortcode using the {{% %}} notation.
++
++@param {string} (postional parameter 0) The path to the page, relative to the content directory.
++@returns template.HTML
++
++@example {{% include "functions/_common/glob-patterns" %}}
++*/}}
++
++{{- with .Get 0 }}
++  {{- with 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 }}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..07a41d613a1255fce1fa6e9bc42a83b912e4760a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,96 @@@
++{{- /*
++Renders a desciption 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.
++
++The definition term elements (dt) have an id attribute derived from the title
++of the page. This is probably unique, because pages of the same title in the
++same section is unlikely.
++
++If you render a complete list on a page, then call the shortcode again to
++render a subset, you will generate duplicate element ids. In this case, set
++omitElementIDs to true for the subset.
++
++@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} [omitElementIDs=false] Whether to omit dt element ids.
++@param {string} [titlePrefix=""] The string to prepend to the link title.
++
++@returns template.HTML
++
++@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 >}}
++@example {{< list-pages-in-section path=/functions/images filter=some_filter filterType=exclude titlePrefix=foo omitElementIDs=true >}}
++*/}}
++
++{{- /* Initialize. */}}
++{{- $filter := or "" (.Get "filter" | lower)}}
++{{- $filterType := or (.Get "filterType") "none" | lower }}
++{{- $filteredPages := slice }}
++{{- $titlePrefix := or (.Get "titlePrefix") "" }}
++{{- $omitElementIDs := false }}
++
++{{- /* Get boolean parameters. */}}
++{{- if in (slice "false" false 0) (.Get "omitElementIDs") }}
++  {{- $omitElementIDs = false }}
++{{- else if in (slice "true" true 1) (.Get "omitElementIDs")}}
++  {{- $omitElementIDs = true }}
++{{- end }}
++
++{{- /* 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 }}
++      <dl>
++        {{- 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 }}
++            {{- $idAttribute := "" }}
++            {{- if not $omitElementIDs }}
++              {{- $id := path.Join .File.Dir .File.ContentBaseName | replaceRE `[\|/]` ":" | lower }}
++              {{- $idAttribute = printf " id=%q" $id }}
++            {{- end }}
++            <dt {{- $idAttribute | safeHTMLAttr }}><a href="{{ $page.RelPermalink }}">{{ $linkTitle }}</a></dt>
++            <dd>{{- $page.Description | $page.RenderString }}</dd>
++          {{- end }}
++        {{- end }}
++      </dl>
++    {{- 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 }}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e8b2a7a7eb17afa07ae2ebd064ed8d29f09c37c1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++Also see [Module Mounts Config](/hugo-modules/configuration/#module-configuration-mounts) for an alternative way to configure this directory (from Hugo 0.56).
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9236cf2bc857b5ac24d1337612e075203a3f182b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++{{ $version := .Get 0 }}
++{{ if not $version }}
++  {{ errorf "Missing version in new-in shortcode " }}
++{{ end }}
++{{ $version = $version | strings.TrimPrefix "v" }}
++<button
++  class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 px-4 border border-gray-400 rounded shadow">
++  <a
++    href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}"
++    target="_blank"
++    >New in v{{ $version }}</a
++  >
++</button>
index 24d2cd0b2bd34413edceda4056419179019a840a,0000000000000000000000000000000000000000..99818114e1e4b13839f8918a0a37f35dd446f5a5
mode 100644,000000..100644
--- /dev/null
@@@ -1,9 -1,0 +1,7 @@@
- <aside class="admonition note">
-       <div class="note-icon">
-               {{partial "svg/exclamation.svg" (dict "size" "20px" ) }}
-       </div>
-       <!-- <h2 id="{{if .Get 0}}{{.Get 0 | urlize}}{{else}}note{{end}}">{{if .Get 0}}{{.Get 0 | markdownify}}{{else}}Note{{end}}</h2> -->
-       <!-- <h3>Note</h3> -->
-       <div class="admonition-content">{{- .Inner -}}</div>
 +{{ $_hugo_config := `{ "version": 1 }` }}
++
++<aside>
++  <div class="admonition-content bl bw2 b--blue" >
++    {{ .Inner }}
++  </div>
 +</aside>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..250bfc0657041d7cf3dce0b35c6170c268df0f51
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,37 @@@
++{{/*
++Renders the child sections of the given top-level section, listing each childs's immediate descendants.
++
++@param {string} section The top-level section to render.
++@returns template.HTML
++
++@example {{% quick-reference section="functions" %}}
++*/}}
++
++{{ $section := "" }}
++{{ with .Get "section" }}
++  {{ $section = . }}
++{{ else }}
++  {{ errorf "The %q shortcodes requires a 'section' parameter. See %s" .Name .Postion }}
++{{ end }}
++
++{{/* Do not change the markdown indentation, and do not remove blank lines. */}}
++{{ with site.GetPage $section }}
++  {{ range .Sections }}
++
++## {{ .LinkTitle }}
++{{ .RawContent }}
++
++    {{ range .Pages }}
++      {{ $aliases := "" }}
++      {{ if eq .Section "functions" }}
++        {{ $aliases = delimit .Params.action.aliases " or " }}
++      {{ end }}
++
++[{{ .LinkTitle }}]({{ .RelPermalink }}) {{ with $aliases }}({{ . }}){{ end }}
++: {{ .Description }}
++
++    {{ end }}
++  {{ end }}
++{{ else }}
++  {{ errorf "The %q shortcodes was unable to find the %q section. See %s" .Name $section .Postion }}
++{{ end }}
index f777abe261905fc17f7524b8bfceba338e217f73,0000000000000000000000000000000000000000..de8083443f07992d286d5c53b5bcfc446b5e2ce0
mode 100644,000000..100644
--- /dev/null
@@@ -1,6 -1,0 +1,29 @@@
- {{$file := .Get "file"}}
- {{- if eq (.Get "markdown") "true" -}}
- {{- $file  | readFile | markdownify -}}
- {{- else -}}
- {{ $file  | readFile | safeHTML }}
- {{- end -}}
++{{- $highlight := or (.Get "highlight") "" }}
++
++{{- $markdown := false }}
++{{- if in (slice "false" false 0) (.Get "markdown") }}
++  {{- $markdown = false }}
++{{- else if in (slice "true" true 1) (.Get "markdown") }}
++  {{- $markdown = true }}
++{{- end }}
++
++{{- with .Get "file" }}
++  {{- if os.FileExists . }}
++    {{- with os.ReadFile . }}
++      {{- $content := trim . "\n\r" }}
++      {{- if $markdown }}
++        {{- $content | markdownify }}
++      {{- else if $highlight }}
++        {{- highlight $content $highlight }}
++      {{- else }}
++        {{- $content | safeHTML }}
++      {{- end }}
++    {{- else }}
++      {{- errorf "The %q shortcode was unable to read %q. 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 'file' parameter. See %s" $.Name $.Position }}
++{{- end }}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..50a09926733c7e19323325746d6e833f335a5b81
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++{{ if .Inner }}{{ end }}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8b5f0da85914b327e4b89752b37e336041ecb431
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,55 @@@
++{{ $pkg := .Params.package}}
++{{ $funcs := index site.Data.docs.tpl.funcs $pkg }}
++
++{{  range $k, $v := $funcs }}
++  {{ if $v.Description }}
++    {{ $func := printf "%s.%s" $pkg $k }}
++    {{ $id := $func | anchorize | safeURL }}
++    <h2 id="{{ $id }}">
++      <a class="header-link" href="#{{ $id }}">
++        <svg class="fill-current o-60 hover-accent-color-light" height="22px" viewBox="0 0 24 24" width="22px" xmlns="http://www.w3.org/2000/svg">
++          <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"/>
++        </svg>
++      </a>
++      {{ $func }}
++    </h2>
++    {{ with  $v.Description }}
++      <p class="f4 lh-copy">
++        {{ . |  $.RenderString | safeHTML }}
++      </p>
++    {{ end }}
++    <h4 class="minor mb3 pt2 primary-color-dark">
++      Syntax
++    </h4>
++    <div class="f5 mb4 ph3 pv2 bg-light-gray" style="border-left:4px solid #0594CB;">
++      {{ $pkg }}.{{ $k }}
++      {{ with $v.Args }}
++        <span class="ttu">
++          {{ delimit $v.Args ", "}}
++        </span>
++      {{ end }}
++      <span></span>
++    </div>
++    {{ if $v.Examples }}
++      <h4 class="minor mb3 pt2 primary-color-dark">
++        Examples
++      </h4>
++    {{ end }}
++    {{ range $v.Examples }}
++      {{ $input := index . 0 }}
++      {{ $result := index . 1 }}
++      {{ $example := printf "%s ---> %s" $input $result }}
++
++      {{ highlight $example "go-html-template" "" }}
++    {{ end }}
++    {{ with $v.Aliases }}
++      <h4 class="minor mb3 pt2 primary-color-dark">
++        Aliases
++      </h4>
++      <p>
++        {{ delimit . ", "}}
++      </p>
++    {{ end }}
++  {{ end }}
++{{ end }}
index 4d5e6890353fd02450ba0880584181e6bd50eb36,0000000000000000000000000000000000000000..7a692e0cefbb8422618a6bafdba8a7f710630717
mode 100644,000000..100644
--- /dev/null
@@@ -1,1 -1,0 +1,1 @@@
- # github.com/gohugoio/gohugoioTheme v0.0.0-20230927165800-342e2c850f18
++# github.com/gohugoio/gohugoioTheme v0.0.0-20231111235806-77931ac4875e
index cb0e7c930ef37d309b85c3d81ff4577c58023a7b,0000000000000000000000000000000000000000..44a2a5635c27c35e9ada8218ecba73db88ce0fb4
mode 100644,000000..100644
--- /dev/null
@@@ -1,14 -1,0 +1,11 @@@
- categories: [functions]
 +---
 +title: {{ replace .File.ContentBaseName "-" " " | title }}
 +description:
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions: []
++action:
 +  aliases: []
++  related: []
 +  returnType:
 +  signatures: []
 +---
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2c415547d2d268e52cad77029ebe9bcd94c4616f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,10 @@@
++---
++title: {{ replace .File.ContentBaseName "-" " " | title }}
++description:
++categories: []
++keywords: []
++action:
++  related: []
++  returnType:
++  signatures: []
++---
index 2443c2f35dcd14bf5e5275b89d1a39872582ba42,0000000000000000000000000000000000000000..5d17089786ff055632e58c86ad880f11c3a6c00c
mode 100644,000000..100644
--- /dev/null
@@@ -1,8 -1,0 +1,7 @@@
- * [Person 1](https://example.com)
- * [Person 1](https://example.com)
 +
 +Add some **general info** about {{ replace .Name "-" " " | title }} here.
 +
 +The site is built by:
 +
++* [Person 1](https://example.org)
++* [Person 1](https://example.org)
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..908bd88c6b95706cb4d77cf14628821e034536d2
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7980abccb8c8538320c66afbe57f17225ea038d8
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ec1a2d6e1bb4bacec2b9054b6285e773ff691b31
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d9fdb888a95db6eb71afaee7f85eb116f5cddc85
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..76d463600e7b79b94799f775417836a59ff977dc
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9857bcea1396ef72c7b8aff5f4f97c8ea77bba0a
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..48d0cb98e3fd8fde32c3ccabd3307cde2949a384
new file mode 100644 (file)
Binary files differ
index 327a5777bc2242b225daa1fd32ac3201697f8469,0000000000000000000000000000000000000000..cd337cbeeeaf7f383ca9e3d500086d3193f9d33d
mode 100644,000000..100644
--- /dev/null
@@@ -1,142 -1,0 +1,152 @@@
-   name = "About Hugo"
-   weight = 10
-   identifier = "about"
-   url = "/about/"
 +[[docs]]
-   name = "Installation"
-   weight = 20
-   identifier = "installation"
-   url = "/installation/"
++identifier = 'about'
++name = 'About Hugo'
++pageRef = '/about/'
++weight = 10
 +
 +[[docs]]
-   name = "Getting started"
-   weight = 30
-   identifier = "getting-started"
-   url = "/getting-started/"
++name = 'Installation'
++weight = 20
++identifier = 'installation'
++pageRef = '/installation/'
 +
 +[[docs]]
-   name = "Hugo Modules"
-   weight = 40
-   identifier = "modules"
-   post = "break"
-   url = "/hugo-modules/"
++name = 'Getting started'
++weight = 30
++identifier = 'getting-started'
++pageRef = '/getting-started/'
++post = 'break'
 +
 +[[docs]]
- # Core menus
++name = 'Content management'
++weight = 40
++identifier = 'content-management'
++post = 'expanded'
++pageRef = '/content-management/'
 +
-   name = "Content management"
-   weight = 50
-   identifier = "content-management"
-   post = "expanded"
-   url = "/content-management/"
++[[docs]]
++name = 'Templates'
++weight = 50
++identifier = 'templates'
++pageRef = '/templates/'
++
++[[docs]]
++name = 'Functions'
++weight = 60
++identifier = 'functions'
++pageRef = '/functions/'
 +
 +[[docs]]
-   name = "Templates"
-   weight = 60
-   identifier = "templates"
-   url = "/templates/"
++name = 'Methods'
++weight = 70
++identifier = 'methods'
++pageRef = '/methods/'
 +
 +[[docs]]
-   name = "Functions"
-   weight = 70
-   identifier = "functions"
-   url = "/functions/"
++name = 'Quick reference'
++weight = 80
++identifier = 'quick-reference'
++pageRef = '/quick-reference/'
 +
 +[[docs]]
-   name = "Variables"
-   weight = 80
-   identifier = "variables"
-   url = "/variables/"
++name = 'Variables'
++weight = 85
++identifier = 'variables'
++pageRef = '/variables/'
 +
 +[[docs]]
-   name = "Hugo Pipes"
-   weight = 90
-   identifier = "hugo-pipes"
-   url = "/hugo-pipes/"
++name = 'Hugo Modules'
++weight = 90
++identifier = 'modules'
++pageRef = '/hugo-modules/'
 +
 +[[docs]]
-   name = "CLI"
-   weight = 100
-   post = "break"
-   identifier = "commands"
-   url = "/commands/"
++name = 'Hugo Pipes'
++weight = 100
++identifier = 'hugo-pipes'
++pageRef = '/hugo-pipes/'
 +
 +[[docs]]
-   name = "Troubleshooting"
-   weight = 110
-   identifier = "troubleshooting"
-   url = "/troubleshooting/"
++name = 'CLI'
++weight = 110
++post = 'break'
++identifier = 'commands'
++pageRef = '/commands/'
 +
 +# Low level items
 +
 +[[docs]]
-   name = "Developer tools"
-   weight = 120
-   identifier = "developer-tools"
-   url = "/tools/"
++name = 'Troubleshooting'
++weight = 120
++identifier = 'troubleshooting'
++pageRef = '/troubleshooting/'
 +
 +[[docs]]
-   name = "Hosting and deployment"
-   weight = 130
-   identifier = "hosting-and-deployment"
-   url = "/hosting-and-deployment/"
++name = 'Developer tools'
++weight = 130
++identifier = 'developer-tools'
++pageRef = '/tools/'
 +
 +[[docs]]
-   name = "Contribute"
-   weight = 140
-   post = "break"
-   identifier = "contribute"
-   url = "/contribute/"
++name = 'Hosting and deployment'
++weight = 140
++identifier = 'hosting-and-deployment'
++pageRef = '/hosting-and-deployment/'
 +
 +[[docs]]
-   name = "Fundamentals"
-   weight = 1
-   identifier = "fundamentals"
-   url = "/tags/fundamentals/"
++name = 'Contribute'
++weight = 150
++post = 'break'
++identifier = 'contribute'
++pageRef = '/contribute/'
 +
 +######## QUICKLINKS
 +
 +[[quicklinks]]
-     name = "News"
-     weight = 1
-     identifier = "news"
-     url = "/news/"
++identifier = 'fundamentals'
++name = 'Fundamentals'
++pageRef = '/tags/fundamentals/'
++weight = 1
 +
 +######## GLOBAL ITEMS TO BE SHARED WITH THE HUGO SITES
 +
 +[[global]]
-   name = "Docs"
-   weight = 5
-   identifier = "docs"
-   url = "/documentation/"
++name = 'News'
++weight = 1
++identifier = 'news'
++pageRef = '/news/'
 +
 +[[global]]
-   name = "Themes"
-   weight = 10
-   identifier = "themes"
-   url = "https://themes.gohugo.io/"
++name = 'Docs'
++weight = 5
++identifier = 'docs'
++url = '/documentation/'
 +
 +[[global]]
-   name = "Showcase"
-   weight = 20
-   identifier = "showcase"
-   url = "/showcase/"
++name = 'Themes'
++weight = 10
++identifier = 'themes'
++url = 'https://themes.gohugo.io/'
 +
 +[[global]]
-   name = "Community"
-   weight = 150
-   icon = true
-   identifier = "community"
-   post = "external"
-   url = "https://discourse.gohugo.io/"
++name = 'Showcase'
++weight = 20
++identifier = 'showcase'
++pageRef = '/showcase/'
 +
 +# Anything with a weight > 100 gets an external icon
 +
 +[[global]]
-   name = "GitHub"
-   weight = 200
-   identifier = "github"
-   post = "external"
-   url = "https://github.com/gohugoio/hugo"
++name = 'Community'
++weight = 150
++icon = true
++identifier = 'community'
++post = 'external'
++url = 'https://discourse.gohugo.io/'
 +
 +[[global]]
++name = 'GitHub'
++weight = 200
++identifier = 'github'
++post = 'external'
++url = 'https://github.com/gohugoio/hugo'
index 3fddf9dbc6ee02173625d43477f68ca9414d3470,0000000000000000000000000000000000000000..b41679c61ce2ef9de44448d6b19341b9bebaa944
mode 100644,000000..100644
--- /dev/null
@@@ -1,24 -1,0 +1,27 @@@
 +
 +description = "The world’s fastest framework for building websites"
 +## Setting this to true will add a "noindex" to *EVERY* page on the site..
 +removefromexternalsearch = false
 +## Gh repo for site footer (include trailing slash)
 +ghrepo = "https://github.com/gohugoio/hugoDocs/"
 +## GH Repo for filing a new issue
 +github_repo = "https://github.com/gohugoio/hugo/issues/new"
 +### Edit content repo (set to automatically enter "edit" mode; this is good for "improve this page" links)
 +ghdocsrepo = "https://github.com/gohugoio/hugoDocs/tree/master/docs"
 +## Discuss Forum URL
 +forum = "https://discourse.gohugo.io/"
 +## Google Tag Manager
 +gtmid = ""
 +
 +# First one is picked as the Twitter card image if not set on page.
 +images = ["images/gohugoio-card.png"]
 +
 +flex_box_interior_classes = "flex-auto w-100 w-40-l mr3 mb3 bg-white ba b--moon-gray nested-copy-line-height"
 +
 +#sidebar_direction = "sidebar_left"
 +
 +[social]
 +twitter = "GoHugoIO"
++
++[render_hooks.link]
++errorLevel = 'warning' # ignore (default), warning, or error (fails the build)
index f1fc0cfb62513cc7a6038e45e8dd49dba8e632a7,0000000000000000000000000000000000000000..82952c4e6e41087ea858a93fc03d00dcecc722cd
mode 100644,000000..100644
--- /dev/null
@@@ -1,35 -1,0 +1,36 @@@
 +---
 +title: Benefits of static site generators
 +linkTitle: Static site generators
 +description: Improved performance, security and ease of use are just a few of the reasons static site generators are so appealing.
++categories: [about]
 +keywords: [ssg,static,performance,security]
 +menu:
 +  docs:
 +    parent: about
 +    weight: 40
 +weight: 40
 +---
 +
 +The purpose of website generators is to render content into HTML files. Most are "dynamic site generators." That means the HTTP server---i.e., the program that sends files to the browser to be viewed---runs the generator to create a new HTML file every time an end user requests a page.
 +
 +Over time, dynamic site generators were programmed to cache their HTML files to prevent unnecessary delays in delivering pages to end users. A cached page is a static version of a web page.
 +
 +Hugo takes caching a step further and all HTML files are rendered on your computer. You can review the files locally before copying them to the computer hosting the HTTP server. Since the HTML files aren't generated dynamically, we say that Hugo is a *static site generator*.
 +
 +This has many benefits. The most noticeable is performance. HTTP servers are *very* good at sending files---so good, in fact, that you can effectively serve the same number of pages with a fraction of the memory and CPU needed for a dynamic site.
 +
 +## More on static site generators
 +
 +* ["An Introduction to Static Site Generators", David Walsh]
 +* ["Hugo vs. WordPress page load speed comparison: Hugo leaves WordPress in its dust", GettingThingsTech][hugovwordpress]
 +* ["Static Site Generators", O'Reilly]
 +* [StaticGen: Top Open-Source Static Site Generators (GitHub Stars)]
 +* ["Top 10 Static Website Generators", Netlify blog]
 +* ["The Resurgence of Static", dotCMS][dotcms]
 +
 +["An Introduction to Static Site Generators", David Walsh]: https://davidwalsh.name/introduction-static-site-generators
 +["Static Site Generators", O'Reilly]: https://github.com/gohugoio/hugoDocs/files/1242701/static-site-generators.pdf
 +["Top 10 Static Website Generators", Netlify blog]: https://www.netlify.com/blog/2016/05/02/top-ten-static-website-generators/
 +[hugovwordpress]: https://gettingthingstech.com/hugo-vs.-wordpress-page-load-speed-comparison-hugo-leaves-wordpress-in-its-dust/
 +[StaticGen: Top Open-Source Static Site Generators (GitHub Stars)]: https://www.staticgen.com/
 +[dotcms]: https://dotcms.com/blog/post/the-resurgence-of-static
index dcb85e8b5fd57b2f78707fd384d18edbf546e064,0000000000000000000000000000000000000000..a94ce5526e98f8a7bb3b3469272395a2637a2419
mode 100644,000000..100644
--- /dev/null
@@@ -1,78 -1,0 +1,80 @@@
 +---
 +title: Hugo features
 +description: Hugo boasts blistering speed, robust content management, and a powerful templating language making it a great fit for all kinds of static websites.
++categories: [about]
++keywords: []
 +menu:
 +  docs:
 +    parent: about
 +    weight: 30
 +weight: 30
 +toc: true
 +---
 +
 +## General
 +
 +* [Extremely fast] build times (&lt; 1 ms per page)
 +* Completely cross platform, with [easy installation][install] on macOS, Linux, Windows, and more
 +* Renders changes on the fly with [LiveReload] as you develop
 +* [Powerful theming]
 +* [Host your site anywhere][hostanywhere]
 +
 +## Organization
 +
 +* Straightforward [organization for your projects], including website sections
 +* Customizable [URLs]
 +* Support for configurable [taxonomies], including categories and tags
 +* [Sort content] as you desire through powerful template [functions]
 +* Automatic [table of contents] generation
 +* [Dynamic menu] creation
 +* [Pretty URLs] support
 +* [Permalink] pattern support
 +* Redirects via [aliases]
 +
 +## Content
 +
 +* Native Markdown and Emacs Org-Mode support, as well as other languages via *external helpers* (see [supported formats])
 +* TOML, YAML, and JSON metadata support in [front matter]
 +* Customizable [homepage]
 +* Multiple [content types]
 +* Automatic and user defined [content summaries]
 +* [Shortcodes] to enable rich content inside of Markdown
 +* ["Minutes to Read"][pagevars] functionality
 +* ["WordCount"][pagevars] functionality
 +
 +## Additional features
 +
 +* Integrated [Disqus] comment support
 +* Integrated [Google Analytics] support
 +* Automatic [RSS] creation
 +* Support for [Go] HTML templates
 +* [Syntax highlighting] powered by [Chroma]
 +
 +[aliases]: /content-management/urls/#aliases
 +[Chroma]: https://github.com/alecthomas/chroma
 +[content summaries]: /content-management/summaries/
 +[content types]: /content-management/types/
 +[Disqus]: https://disqus.com/
 +[Dynamic menu]: /templates/menu-templates/
 +[Extremely fast]: https://github.com/bep/hugo-benchmark
 +[front matter]: /content-management/front-matter/
 +[functions]: /functions/
 +[Go]: https://pkg.go.dev/html/template
 +[Google Analytics]: https://google-analytics.com/
 +[homepage]: /templates/homepage/
 +[hostanywhere]: /hosting-and-deployment/
 +[install]: /installation/
 +[LiveReload]: /getting-started/usage/
 +[organization for your projects]: /getting-started/directory-structure/
 +[pagevars]: /variables/page/
 +[Permalink]: /content-management/urls/#permalinks
 +[Powerful theming]: /hugo-modules/theme-components/
 +[Pretty URLs]: /content-management/urls/
 +[RSS]: /templates/rss/
 +[Shortcodes]: /content-management/shortcodes/
 +[sort content]: /templates/
 +[supported formats]: /content-management/formats/
 +[Syntax highlighting]: /content-management/syntax-highlighting/
 +[table of contents]: /content-management/toc/
 +[taxonomies]: /content-management/taxonomies/
 +[URLs]: /content-management/urls/
index 85e996f5949a3712ef1a8b64ad4efc3da6b19eb7,0000000000000000000000000000000000000000..daf4e80f07d8008462613f23ac8ed101b53539c5
mode 100644,000000..100644
--- /dev/null
@@@ -1,134 -1,0 +1,134 @@@
- layout: single
 +---
 +title: Hugo and the General Data Protection Regulation
 +linkTitle: Hugo and the GDPR
 +description: About how to configure your Hugo site to meet the new regulations.
- aliases: [/privacy/,/gdpr/]
++categories: [about]
 +keywords: ["GDPR", "Privacy", "Data Protection"]
 +menu:
 +  docs:
 +    parent: about
 +    weight: 60
 +weight: 60
- {{< code-toggle file="hugo" >}}
 +toc: true
++aliases: [/privacy/,/gdpr/]
 +---
 +
 + General Data Protection Regulation ([GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation)) is a regulation in EU law on data protection and privacy for all individuals within the European Union and the European Economic Area. It became enforceable on 25 May 2018.
 +
 + **Hugo is a static site generator. By using Hugo you are already standing on very solid ground. Static HTML files on disk are much easier to reason about compared to server and database driven web sites.**
 +
 + But even static websites can integrate with external services, so from version `0.41`, Hugo provides a **privacy configuration** that covers the relevant built-in templates.
 +
 + Note that:
 +
 + * These settings have their defaults setting set to _off_, i.e. how it worked before Hugo `0.41`. You must do your own evaluation of your site and apply the appropriate settings.
 + * These settings work with the [internal templates](/templates/internal/). Some theme may contain custom templates for embedding services like Google Analytics. In that case these options have no effect.
 + * We will continue this work and improve this further in future Hugo versions.
 +
 +## All privacy settings
 +
 +Below are all privacy settings and their default value. These settings need to be put in your site configuration (e.g. `hugo.toml`).
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle file=hugo >}}
 +[privacy]
 +[privacy.disqus]
 +disable = false
 +[privacy.googleAnalytics]
 +disable = false
 +respectDoNotTrack = false
 +anonymizeIP = false
 +useSessionStorage = false
 +[privacy.instagram]
 +disable = false
 +simple = false
 +[privacy.twitter]
 +disable = false
 +enableDNT = false
 +simple = false
 +[privacy.vimeo]
 +disable = false
 +enableDNT = false
 +simple = false
 +[privacy.youtube]
 +disable = false
 +privacyEnhanced = false
 +{{< /code-toggle >}}
 +
 +## Disable all services
 +
 +An example privacy configuration that disables all the relevant services in Hugo. With this configuration, the other settings will not matter.
 +
-  {{< code-toggle file="hugo" >}}
++{{< code-toggle file=hugo >}}
 +[privacy]
 +[privacy.disqus]
 +disable = true
 +[privacy.googleAnalytics]
 +disable = true
 +[privacy.instagram]
 +disable = true
 +[privacy.twitter]
 +disable = true
 +[privacy.vimeo]
 +disable = true
 +[privacy.youtube]
 +disable = true
 +{{< /code-toggle >}}
 +
 +## The privacy settings explained
 +
 +### GoogleAnalytics
 +
 +anonymizeIP
 +: Enabling this will make it so the users' IP addresses are anonymized within Google Analytics.
 +
 +respectDoNotTrack
 +: Enabling this will make the GA templates respect the "Do Not Track" HTTP header.
 +
 +useSessionStorage
 +: Enabling this will disable the use of Cookies and use Session Storage to Store the GA Client ID.
 +
 +{{% note %}}
 +`useSessionStorage` is not supported when using Google Analytics v4 (gtag.js).
 +{{% /note %}}
 +
 +### Instagram
 +
 +simple
 +: If simple mode is enabled, a static and no-JS version of the Instagram image card will be built. Note that this only supports image cards and the image itself will be fetched from Instagram's servers.
 +
 +**Note:** If you use the _simple mode_ for Instagram and a site styled with Bootstrap 4, you may want to disable the inline styles provided by Hugo:
 +
-  {{< code-toggle file="hugo" >}}
++{{< code-toggle file=hugo >}}
 +[services]
 +[services.instagram]
 +disableInlineCSS = true
 +{{< /code-toggle >}}
 +
 +### Twitter
 +
 +enableDNT
 +: Enabling this for the twitter/tweet shortcode, the tweet and its embedded page on your site are not used for purposes that include personalized suggestions and personalized ads.
 +
 +simple
 +: If simple mode is enabled, a static and no-JS version of a tweet will be built.
 +
 +**Note:** If you use the _simple mode_ for Twitter, you may want to disable the inline styles provided by Hugo:
 +
++{{< code-toggle file=hugo >}}
 +[services]
 +[services.twitter]
 +disableInlineCSS = true
 +{{< /code-toggle >}}
 +
 +### YouTube
 +
 +privacyEnhanced
 +: When you turn on privacy-enhanced mode, YouTube won’t store information about visitors on your website unless the user plays the embedded video.
 +
 +### Vimeo
 +
 +enableDNT
 +: Enabling this for the vimeo shortcode, the Vimeo player will be blocked from tracking any session data, including all cookies and stats.
 +
 +simple
 +: If simple mode is enabled, the video thumbnail is fetched from Vimeo's servers and it is overlaid with a play button. If the user clicks to play the video, it will open in a new tab directly on Vimeo's website.
index dc560b33f937ca42e1bece458fdcfc466b2ab377,0000000000000000000000000000000000000000..e488bb87a43a96f5ffd9102b22b241b5547c3a2f
mode 100644,000000..100644
--- /dev/null
@@@ -1,160 -1,0 +1,80 @@@
- description: Hugo v0.15 and later are released under the Apache 2.0 license.
- categories: ["about hugo"]
- keywords: ["License","apache"]
 +---
 +title: License
- aliases: [/meta/license]
- toc: true
++description: Hugo is released under the Apache 2.0 license.
++categories: [about]
++keywords: [license,apache]
 +menu:
 +  docs:
 +    parent: about
 +    weight: 70
 +weight: 70
- {{% note %}}
- Hugo v0.15 and later are released under the Apache 2.0 license.
- Earlier versions of Hugo were released under the [Simple Public License](https://opensource.org/license/simpl-2-0-html/).
- {{% /note %}}
- _Version 2.0, January 2004_ <br>
- <https://www.apache.org/licenses/LICENSE-2.0>
- *Terms and Conditions for use, reproduction, and distribution*
- ## 1. Definitions
- “License” shall mean the terms and conditions for use, reproduction, and
- distribution as defined by Sections 1 through 9 of this document.
- “Licensor” shall mean the copyright owner or entity authorized by the copyright
- owner that is granting the License.
- “Legal Entity” shall mean the union of the acting entity and all other entities
- that control, are controlled by, or are under common control with that entity.
- For the purposes of this definition, “control” means **(i)** the power, direct or
- indirect, to cause the direction or management of such entity, whether by
- contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the
- outstanding shares, or **(iii)** beneficial ownership of such entity.
- “You” (or “Your”) shall mean an individual or Legal Entity exercising
- permissions granted by this License.
- “Source” form shall mean the preferred form for making modifications, including
- but not limited to software source code, documentation source, and configuration
- files.
- “Object” form shall mean any form resulting from mechanical transformation or
- translation of a Source form, including but not limited to compiled object code,
- generated documentation, and conversions to other media types.
- “Work” shall mean the work of authorship, whether in Source or Object form, made
- available under the License, as indicated by a copyright notice that is included
- in or attached to the work (an example is provided in the Appendix below).
- “Derivative Works” shall mean any work, whether in Source or Object form, that
- is based on (or derived from) the Work and for which the editorial revisions,
- annotations, elaborations, or other modifications represent, as a whole, an
- original work of authorship. For the purposes of this License, Derivative Works
- shall not include works that remain separable from, or merely link (or bind by
- name) to the interfaces of, the Work and Derivative Works thereof.
- “Contribution” shall mean any work of authorship, including the original version
- of the Work and any modifications or additions to that Work or Derivative Works
- thereof, that is intentionally submitted to Licensor for inclusion in the Work
- by the copyright owner or by an individual or Legal Entity authorized to submit
- on behalf of the copyright owner. For the purposes of this definition,
- “submitted” means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems, and
- issue tracking systems that are managed by, or on behalf of, the Licensor for
- the purpose of discussing and improving the Work, but excluding communication
- that is conspicuously marked or otherwise designated in writing by the copyright
- owner as “Not a Contribution.”
- “Contributor” shall mean Licensor and any individual or Legal Entity on behalf
- of whom a Contribution has been received by Licensor and subsequently
- incorporated within the Work.
- ## 2. Grant of Copyright License
- Subject to the terms and conditions of this License, each Contributor hereby
- grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
- irrevocable copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the Work and such
- Derivative Works in Source or Object form.
- ## 3. Grant of Patent License
- Subject to the terms and conditions of this License, each Contributor hereby
- grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
- irrevocable (except as stated in this section) patent license to make, have
- made, use, offer to sell, sell, import, and otherwise transfer the Work, where
- such license applies only to those patent claims licensable by such Contributor
- that are necessarily infringed by their Contribution(s) alone or by combination
- of their Contribution(s) with the Work to which such Contribution(s) was
- submitted. If You institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work or a
- Contribution incorporated within the Work constitutes direct or contributory
- patent infringement, then any patent licenses granted to You under this License
- for that Work shall terminate as of the date such litigation is filed.
- ## 4. Redistribution
- You may reproduce and distribute copies of the Work or Derivative Works thereof
- in any medium, with or without modifications, and in Source or Object form,
- provided that You meet the following conditions:
- * **(a)** You must give any other recipients of the Work or Derivative Works a copy of
- this License; and
- * **(b)** You must cause any modified files to carry prominent notices stating that You
- changed the files; and
- * **\(c)** You must retain, in the Source form of any Derivative Works that You distribute,
- all copyright, patent, trademark, and attribution notices from the Source form
- of the Work, excluding those notices that do not pertain to any part of the
- Derivative Works; and
- * **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
 +---
 +
- You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
++## Apache License
 +
- ## 5. Submission of Contributions
 +
- Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
++_Version 2.0, January 2004_  
++_<http://www.apache.org/licenses/>_
 +
- ## 6. Trademarks
++### Terms and Conditions for use, reproduction, and distribution
 +
- This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
++#### 1. Definitions
 +
- ## 7. Disclaimer of Warranty
++“License” shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
 +
- Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
++“Licensor” shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
 +
- ## 8. Limitation of Liability
++“Legal Entity” shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, “control” means **(i)** the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the outstanding shares, or **(iii)** beneficial ownership of such entity.
 +
- In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
++“You” (or “Your”) shall mean an individual or Legal Entity exercising permissions granted by this License.
 +
- ## 9. Accepting Warranty or Additional Liability
++“Source” form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
 +
- While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
++“Object” form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
 +
- _END OF TERMS AND CONDITIONS_
++“Work” shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
++
++“Derivative Works” shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
++
++“Contribution” shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, “submitted” means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as “Not a Contribution.”
++
++“Contributor” shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
++
++#### 2. Grant of Copyright License
++
++Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
++
++#### 3. Grant of Patent License
++
++Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
 +
- ## APPENDIX: How to apply the Apache License to your work
++#### 4. Redistribution
 +
- To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets `[]` replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same “printed page” as the copyright notice for easier identification within third-party archives.
++You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
 +
- {{< code file="apache-notice.txt" >}}
- Copyright [yyyy] [name of copyright owner]
++* **(a)** You must give any other recipients of the Work or Derivative Works a copy of this License; and
++* **(b)** You must cause any modified files to carry prominent notices stating that You changed the files; and
++* **(c)** You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
++* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
++
++You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
++
++#### 5. Submission of Contributions
++
++Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
++
++#### 6. Trademarks
 +
- 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
++This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
++
++#### 7. Disclaimer of Warranty
 +
-   https://www.apache.org/licenses/LICENSE-2.0
++Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
 +
- 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.
- {{< /code >}}
++#### 8. Limitation of Liability
 +
++In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
++
++#### 9. Accepting Warranty or Additional Liability
++
++While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
index 3b93167ab57664c9822f16a425bd3207c5e7b2c5,0000000000000000000000000000000000000000..af1dd7d75b58a0e995354842ff76e5868aeba4ca
mode 100644,000000..100644
--- /dev/null
@@@ -1,63 -1,0 +1,63 @@@
- layout: single
- keywords: ["Security", "Privacy"]
 +---
 +title: Hugo's security model
 +description: A summary of Hugo's security model.
- aliases: [/security/]
++categories: [about]
++keywords: [security,privacy]
 +menu:
 +  docs:
 +    parent: about
 +    weight: 50
 +weight: 50
- {{< code-toggle config="security" />}}
 +toc: true
++aliases: [/security/]
 +---
 +
 +## Runtime security
 +
 +Hugo produces static output, so once built, the runtime is the browser (assuming the output is HTML) and any server (API) that you integrate with.
 +
 +But when developing and building your site, the runtime is the `hugo` executable. Securing a runtime can be [a real challenge](https://blog.logrocket.com/how-to-protect-your-node-js-applications-from-malicious-dependencies-5f2e60ea08f9/).
 +
 +**Hugo's main approach is that of sandboxing and a security policy with strict defaults:**
 +
 +* Hugo has a virtual file system and only the main project (not third-party components) is allowed to mount directories or files outside the project root.
 +* Only the main project can walk symbolic links.
 +* User-defined components have read-only access to the filesystem.
 +* We shell out to some external binaries to support [Asciidoctor](/content-management/formats/#list-of-content-formats) and similar, but those binaries and their flags are predefined and disabled by default (see [Security Policy](#security-policy)). General functions to run arbitrary external OS commands have been [discussed](https://github.com/gohugoio/hugo/issues/796), but not implemented because of security concerns.
 +
 +## Security policy
 +
 +Hugo has a built-in security policy that restricts access to [os/exec](https://pkg.go.dev/os/exec), remote communication and similar.
 +
 +The default configuration is listed below. Any build using features not in the allow list of the security policy will fail with a detailed message about what needs to be done. Most of these settings are allow lists (string or slice, [Regular Expressions](https://pkg.go.dev/regexp) or `none` which matches nothing).
 +
++{{< code-toggle config=security />}}
 +
 +Note that these and other configuration settings in Hugo can be overridden by the OS environment. If you want to block all remote HTTP fetching of data:
 +
 +```txt
 +HUGO_SECURITY_HTTP_URLS=none hugo
 +```
 +
 +## Dependency security
 +
 +Hugo is built as a static binary using [Go Modules](https://github.com/golang/go/wiki/Modules) to manage its dependencies. Go Modules have several safeguards, one of them being the `go.sum` file. This is a database of the expected cryptographic checksums of all of your dependencies, including transitive dependencies.
 +
 +[Hugo Modules](/hugo-modules/) is a feature built on top of the functionality of Go Modules. Like Go Modules, a Hugo project using Hugo Modules will have a `go.sum` file. We recommend that you commit this file to your version control system. The Hugo build will fail if there is a checksum mismatch, which would be an indication of [dependency tampering](https://julienrenaux.fr/2019/12/20/github-actions-security-risk/).
 +
 +## Web application security
 +
 +These are the security threats as defined by [OWASP](https://en.wikipedia.org/wiki/OWASP).
 +
 +For HTML output, this is the core security model:
 +
 +<https://pkg.go.dev/html/template#hdr-Security_Model>
 +
 +In short:
 +
 +Template and configuration authors (you) are trusted, but the data you send in is not.
 +This is why you sometimes need to use the _safe_ functions, such as `safeHTML`, to avoid escaping of data you know is safe.
 +There is one exception to the above, as noted in the documentation: If you enable inline shortcodes, you also say that the shortcodes and data handling in content files are trusted, as those macros are treated as pure text.
 +It may be worth adding that Hugo is a static site generator with no concept of dynamic user input.
 +
 +For content, the default Markdown renderer is [configured](/getting-started/configuration-markup) to remove or escape potentially unsafe content. This behavior can be reconfigured if you trust your content.
index be564233ff28c31403a3f6501f581c12c2eca960,0000000000000000000000000000000000000000..e4326d1735d77281223872e752e98b5b48f790e6
mode 100644,000000..100644
--- /dev/null
@@@ -1,56 -1,0 +1,57 @@@
- layout: single
 +---
 +title: What is Hugo
 +description: Hugo is a fast and modern static site generator written in Go, and designed to make website creation fun again.
- aliases: [/overview/introduction/,/about/why-i-built-hugo/]
++categories: [about]
++keywords: []
 +menu:
 +  docs:
 +    parent: about
 +    weight: 20
 +weight: 20
 +toc: true
++aliases: [/overview/introduction/,/about/why-i-built-hugo/]
 +---
 +
 +Hugo is a general-purpose website framework. Technically speaking, Hugo is a [static site generator]. Unlike systems that dynamically build a page with each visitor request, Hugo builds pages when you create or update your content. Since websites are viewed far more often than they are edited, Hugo is designed to provide an optimal viewing experience for your website's end users and an ideal writing experience for website authors.
 +
 +Websites built with Hugo are extremely fast and secure. Hugo sites can be hosted anywhere, including [Netlify], [Heroku], [GoDaddy], [DreamHost], [GitHub Pages], [GitLab Pages], [Surge], [Firebase], [Google Cloud Storage], [Amazon S3], [Rackspace], [Azure], and [CloudFront] and work well with CDNs. Hugo sites run without the need for a database or dependencies on expensive runtimes like Ruby, Python, or PHP.
 +
 +We think of Hugo as the ideal website creation tool with nearly instant build times, able to rebuild whenever a change is made.
 +
 +## How fast is Hugo?
 +
 +{{< youtube "CdiDYZ51a2o" >}}
 +
 +## What does Hugo do?
 +
 +In technical terms, Hugo takes a source directory of files and templates and uses these as input to create a complete website.
 +
 +## Who should use Hugo?
 +
 +Hugo is for people that prefer writing in a text editor over a browser.
 +
 +Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
 +
 +Hugo is for people building a blog, a company site, a portfolio site, documentation, a single landing page, or a website with thousands of pages.
 +
 +[@spf13]: https://twitter.com/spf13
 +[Amazon S3]: https://aws.amazon.com/s3/
 +[Azure]: https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website
 +[CloudFront]: https://aws.amazon.com/cloudfront/
 +[DreamHost]: https://www.dreamhost.com/
 +[Firebase]: https://firebase.google.com/docs/hosting/
 +[GitHub Pages]: https://pages.github.com/
 +[GitLab Pages]: https://about.gitlab.com/features/pages/
 +[Go language]: https://go.dev/
 +[GoDaddy]: https://www.godaddy.com/
 +[Google Cloud Storage]: https://cloud.google.com/storage/
 +[Heroku]: https://www.heroku.com/
 +[Jekyll]: https://jekyllrb.com/
 +[Middleman]: https://middlemanapp.com/
 +[Nanoc]: https://nanoc.ws/
 +[Netlify]: https://netlify.com
 +[Rackspace]: https://www.rackspace.com/cloud/files
 +[Surge]: https://surge.sh
 +[contributing to it]: https://github.com/gohugoio/hugo
 +[rackspace]: https://www.rackspace.com/openstack/public/files
 +[static site generator]: /about/benefits/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..07a53e8e63e349a5d40fb9300030c70461477250
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++# Do not remove front matter.
++---
++
++| Kind | Description | Example |
++|----------------|--------------------------------------------------------------------|-------------------------------------------------------------------------------|
++| `home` | The landing page for the home page | `/index.html` |
++| `page` | The landing page for a given page | `my-post` page (`/posts/my-post/index.html`) |
++| `section` | The landing page of a given section | `posts` section (`/posts/index.html`) |
++| `taxonomy` | The landing page for a taxonomy | `tags` taxonomy (`/tags/index.html`) |
++| `term` | The landing page for one taxonomy's term | term `awesome` in `tags` taxonomy (`/tags/awesome/index.html`) |
++
++Four other page kinds unrelated to content are `robotsTXT`, `RSS`, `sitemap`, and `404`. Although primarily for internal use, you can specify the name when disabling one or more page kinds on your site. For example:
++
++{{< code-toggle file=hugo >}}
++disableKinds = ['robotsTXT','404']
++{{< /code-toggle >}}
index 35f85a641931aaa65363f06efe733e05756ebc72,0000000000000000000000000000000000000000..66af24681392734b6eb7c481c50739ba5e5456da
mode 100644,000000..100644
--- /dev/null
@@@ -1,16 -1,0 +1,16 @@@
- keywords: [source, organization]
- categories: [content management]
 +---
 +title: Content management
 +linkTitle: Overview
 +description: Hugo makes managing large static sites easy with support for archetypes, content types, menus, cross references, summaries, and more.
++categories: []
++keywords: []
 +menu:
 +  docs:
 +    identifier: content-management-overview
 +    parent: content-management
 +    weight: 10
 +weight: 10
 +aliases: [/content/,/content/organization]
 +---
 +
 +A static site generator needs to extend beyond front matter and a couple of templates to be both scalable and *manageable*. Hugo was designed with not only developers in mind, but also content managers and authors.
index fe460f91ff4d5cd3172aad3052bf522d7724da1a,0000000000000000000000000000000000000000..94f0388480085c06219b0072fbc17b58debcc8d3
mode 100644,000000..100644
--- /dev/null
@@@ -1,185 -1,0 +1,184 @@@
- keywords: [archetypes,generators,metadata,front matter]
 +---
 +title: Archetypes
 +description: An archetype is a template for new content.
- toc: true
 +categories: [content management]
++keywords: [archetypes,generators,metadata,front matter]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 140
 +  quicklinks:
- {{< code-toggle file="archetypes/default.md" copy=false fm=true >}}
 +weight: 140
++toc: true
 +aliases: [/content/archetypes/]
 +---
 +
 +## Overview
 +
 +A content file consists of [front matter] and markup. The markup is typically markdown, but Hugo also supports other [content formats]. Front matter can be TOML, YAML, or JSON.
 +
 +The `hugo new content` command creates a new file in the `content` directory, using an archetype as a template. This is the default archetype:
 +
- ```text
++{{< code-toggle file=archetypes/default.md fm=true >}}
 +title = '{{ replace .File.ContentBaseName `-` ` ` | title }}'
 +date = '{{ .Date }}'
 +draft = true
 +{{< /code-toggle >}}
 +
 +When you create new content, Hugo evaluates the [template actions] within the archetype. For example:
 +
- {{< code-toggle file="content/posts/my-first-post.md" copy=false fm=true >}}
++```sh
 +hugo new content posts/my-first-post.md
 +```
 +
 +With the default archetype shown above, Hugo creates this content file:
 +
- ```text
++{{< code-toggle file=content/posts/my-first-post.md fm=true >}}
 +title = 'My First Post'
 +date = '2023-08-24T11:49:46-07:00'
 +draft = true
 +{{< /code-toggle >}}
 +
 +You can create an archetype for one or more [content types]. For example, use one archetype for posts, and use the default archetype for everything else:
 +
 +```text
 +archetypes/
 +├── default.md
 +└── posts.md
 +```
 +
 +## Lookup order
 +
 +Hugo looks for archetypes in the `archetypes` directory in the root of your project, falling back to the `archetypes` directory in themes or installed modules. An archetype for a specific content type takes precedence over the default archetype.
 +
 +For example, with this command:
 +
- - `.File` (see [details](/variables/files/))
++```sh
 +hugo new content posts/my-first-post.md
 +```
 +
 +The archetype lookup order is:
 +
 +1. archetypes/posts.md
 +1. archetypes/default.md
 +1. themes/my-theme/archetypes/posts.md
 +1. themes/my-theme/archetypes/default.md
 +
 +If none of these exists, Hugo uses a built-in default archetype.
 +
 +## Functions and context
 +
 +You can use any [template function] within an archetype. As shown above, the default archetype uses the [`replace`](/functions/strings/replace) function to replace hyphens with spaces when populating the title in front matter.
 +
 +Archetypes receive the following objects and values in [context]:
 +
 +- `.Date`
 +- `.Type`
 +- `.Site` (see [details](/variables/site/))
- {{< code file="archetypes/functions.md" copy=false >}}
++- `.File` (see [details](/variables/file/))
 +
 +As shown above, the default archetype passes `.File.ContentBaseName` as the argument to the `replace` function when populating the title in front matter.
 +
 +## Include content
 +
 +Although typically used as a front matter template, you can also use an archetype to populate content.
 +
 +For example, in a documentation site you might have a section (content type) for functions. Every page within this section should follow the same format: a brief description, the function signature, examples, and notes. We can pre-populate the page to remind content authors of the standard format.
 +
- │   ├── images/
- │   │   └── .gitkeep
- │   └── index.md      <-- same format as default.md
++{{< code file=archetypes/functions.md >}}
 +---
 +date: '{{ .Date }}'
 +draft: true
 +title: '{{ replace .File.ContentBaseName `-` ` ` | title }}'
 +---
 +
 +A brief description of what the function does, using simple present tense in the third person singular form. For example:
 +
 +`someFunction` returns the string `s` repeated `n` times.
 +
 +## Signature
 +
 +```text
 +func someFunction(s string, n int) string
 +```
 +
 +## Examples
 +
 +One or more practical examples, each within a fenced code block.
 +
 +## Notes
 +
 +Additional information to clarify as needed.
 +{{< /code >}}
 +
 +Although you can include [template actions] within the content body, remember that Hugo evaluates these once---at the time of content creation. In most cases, place template actions in a [template] where Hugo evaluates the actions every time you [build](/getting-started/glossary/#build) the site.
 +
 +## Leaf bundles
 +
 +You can also create archetypes for [leaf bundles](/getting-started/glossary/#leaf-bundle).
 +
 +For example, in a photography site you might have a section (content type) for galleries. Each gallery is leaf bundle with content and images.
 +
 +Create an archetype for galleries:
 +
 +```text
 +archetypes/
 +├── galleries/
++│   ├── images/
++│   │   └── .gitkeep
++│   └── index.md      <-- same format as default.md
 +└── default.md
 +```
 +
 +Subdirectories within an archetype must contain at least one file. Without a file, Hugo will not create the subdirectory when you create new content. The name and size of the file are irrelevant. The example above includes a&nbsp;`.gitkeep` file, an empty file commonly used to preserve otherwise empty directories in a Git repository.
 +
- ```text
 +To create a new gallery:
- ```text
++
++```sh
 +hugo new galleries/bryce-canyon
 +```
 +
 +This produces:
 +
 +```text
 +content/
 +├── galleries/
 +│   └── bryce-canyon/
 +│       ├── images/
 +│       │   └── .gitkeep
 +│       └── index.md
 +└── _index.md
 +```
 +
 +## Use alternate archetype
 +
 +Use the `--kind` command line flag to specify an alternate archetype when creating content.
 +
 +For example, let's say your site has two sections: articles and tutorials. Create an archetype for each content type:
 +
 +```text
 +archetypes/
 +├── articles.md
 +├── default.md
 +└── tutorials.md
 +```
 +
 +To create an article using the articles archetype:
 +
- ```text
++```sh
 +hugo new content articles/something.md
 +```
 +
 +To create an article using the tutorials archetype:
 +
++```sh
 +hugo new content --kind tutorials articles/something.md
 +```
 +
 +[content formats]: /getting-started/glossary/#content-format
 +[content types]: /getting-started/glossary/#content-type
 +[context]: /getting-started/glossary/#context
 +[front matter]: /getting-started/glossary/#front-matter
 +[template actions]: /getting-started/glossary/#template-action
 +[template]: /getting-started/glossary/#template
 +[template function]: /getting-started/glossary/#function
index 378a31144479c7f6a9c84b1194279bcd1d410b4c,0000000000000000000000000000000000000000..bc9d7ff49f26a780e17fdaa3e0a696624d1bd319
mode 100644,000000..100644
--- /dev/null
@@@ -1,102 -1,0 +1,321 @@@
- categories: [fundamentals,content management]
 +---
 +title: Build options
 +description: Build options help define how Hugo must treat a given page when building the site.
++categories: [content management,fundamentals]
 +keywords: [build,content,front matter, page resources]
- toc: true
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 70
- They are stored in a reserved front matter object named `_build` with the following defaults:
 +weight: 70
++toc: true
 +aliases: [/content/build-options/]
 +---
 +
- {{< code-toggle >}}
- _build:
-   render: always
-   list: always
-   publishResources: true
++Build options are stored in a reserved front matter object named `_build` with these defaults:
 +
- #### render
++{{< code-toggle file=content/example/index.md fm=true >}}
++[_build]
++list = 'always'
++publishResources = true
++render = 'always'
 +{{< /code-toggle >}}
 +
- If `always`, the page will be treated as a published page, holding its dedicated output files (`index.html`, etc...) and permalink.
 +
- Valid values are:
++list
++: When to include the page within page collections. Specify one of:
++  
++  - `always`
++    : Include the page in _all_ page collections. For example, `site.RegularPages`, `.Pages`, etc. This is the default value.
 +
-     : The page will not be included in any page collection.
-   - `always (default)`
-     : The page will be rendered to disk and get a `RelPermalink` etc.
-   - `link`
-     : The page will be not be rendered to disk, but will get a `RelPermalink`.
++  - `local`
++    : Include the page in _local_ page collections. For example, `.RegularPages`, `.Pages`, etc. Use this option to create fully navigable but headless content sections.
 +
 +  - `never`
- #### list
++    : Do not include the page in _any_ page collection.
 +
- Valid values are:
-   
-   - `never`
-     : The page will not be included in any page collection.
-   - `always (default)`
-     : The page will be included in all page collections, e.g. `site.RegularPages`, `.Pages`.
-   - `local`
-     : The page will be included in any _local_ page collection, e.g. `.RegularPages`, `.Pages`. One use case for this would be to create fully navigable, but headless content sections.
++publishResources
++: Applicable to [page bundles], determines whether to publish the associated [page resources]. Specify one of:
 +
- #### publishResources
++  - `true`
++    : Always publish resources. This is the default value.
 +
- If set to `true` (default) the [Bundle's Resources](/content-management/page-bundles) will be published.
- Setting this to `false` will still publish Resources on demand (when a resource's `.Permalink` or `.RelPermalink` is invoked from the templates) but will skip the others.
++  - `false`
++    : Only publish a resource when invoking its [`Permalink`], [`RelPermalink`], or [`Publish`] method within a template.
 +
- Any page, regardless of their build options, will always be available using the [`.GetPage`](/functions/getpage) methods.
++render
++: When to render the page. Specify one of:
++
++  - `always`
++    : Always render the page to disk. This is the default value.
++
++  - `link`
++    : Do not render the page to disk, but include it in all page collections.
++
++  - `never`
++    : Never render the page to disk, and exclude it from all page collections.
++
++[page bundles]: content-management/page-bundles
++[page resources]: /content-management/page-resources
++[`Permalink`]: /methods/resource/permalink
++[`RelPermalink`]: /methods/resource/relpermalink
++[`Publish`]: /methods/resource/publish
 +
 +{{% note %}}
- ### Illustrative use cases
++Any page, regardless of its build options, will always be available by using the [`.Page.GetPage`] or [`.Site.GetPage`] method.
++
++[`.Page.GetPage`]: /methods/page/getpage
++[`.Site.GetPage`]: /methods/site/getpage
 +{{% /note %}}
 +
- #### Not publishing a page
++## Example -- headless page
++
++Create a unpublished page whose content and resources can be included in other pages.
++
++```text
++content/
++├── headless/
++│   ├── a.jpg
++│   ├── b.jpg
++│   └── index.md  <-- leaf bundle
++└── _index.md     <-- home page
++```
++
++Set the build options in front matter:
++
++{{< code-toggle file=content/headless/index.md fm=true >}}
++title = 'Headless page'
++[_build]
++  list = 'never'
++  publishResources = false
++  render = 'never'
++{{< /code-toggle >}}
++
++To include the content and images on the home page:
++
++{{< code file=layouts/_default/home.html  >}}
++{{ with .Site.GetPage "/headless" }}
++  {{ .Content }}
++  {{ range .Resources.ByType "image" }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++{{< /code >}}
++
++The published site will have this structure:
++
++```text
++public/
++├── headless/
++│   ├── a.jpg
++│   └── b.jpg
++└── index.html
++```
++
++In the example above, note that:
++
++1. Hugo did not publish an HTML file for the page.
++2. Despite setting `publishResources` to `false` in front matter, Hugo published the [page resources] because we invoked the [`RelPermalink`] method on each resource. This is the expected behavior.
++
++## Example -- headless section
 +
- Project needs a "Who We Are" content file for front matter and body to be used by the homepage but nowhere else.
++Create a unpublished section whose content and resources can be included in other pages.
 +
- {{< code-toggle file="content/who-we-are.md" fm=true copy=false >}}
- title: Who we are
- _build:
-  list: false
-  render: false
++[branch bundle]: /content-management/page-bundles
 +
- {{< code file="layouts/index.html" copy=false >}}
- <section id="who-we-are">
-   {{ with site.GetPage "who-we-are" }}
++```text
++content/
++├── headless/
++│   ├── note-1/
++│   │   ├── a.jpg
++│   │   ├── b.jpg
++│   │   └── index.md  <-- leaf bundle
++│   ├── note-2/
++│   │   ├── c.jpg
++│   │   ├── d.jpg
++│   │   └── index.md  <-- leaf bundle
++│   └── _index.md     <-- branch bundle
++└── _index.md         <-- home page
++```
++
++Set the build options in front matter, using the `cascade` keyword to "cascade" the values down to descendant pages.
++
++{{< code-toggle file=content/headless/_index.md fm=true >}}
++title = 'Headless section'
++[[cascade]]
++[cascade._build]
++  list = 'local'
++  publishResources = false
++  render = 'never'
 +{{< /code-toggle >}}
 +
- </section>
++In the front matter above, note that we have set `list` to `local` to include the descendant pages in local page collections.
++
++To include the content and images on the home page:
++
++{{< code file=layouts/_default/home.html  >}}
++{{ with .Site.GetPage "/headless" }}
++  {{ range .Pages }}
 +    {{ .Content }}
++    {{ range .Resources.ByType "image" }}
++      <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++    {{ end }}
 +  {{ end }}
- #### Listing pages without publishing them
++{{ end }}
 +{{< /code >}}
 +
- Website needs to showcase a few of the hundred "testimonials" available as content files without publishing any of them.
++The published site will have this structure:
++
++```text
++public/
++├── headless/
++│   ├── note-1/
++│   │   ├── a.jpg
++│   │   └── b.jpg
++│   └── note-2/
++│       ├── c.jpg
++│       └── d.jpg
++└── index.html
++```
++
++In the example above, note that:
++
++1. Hugo did not publish an HTML file for the page.
++2. Despite setting `publishResources` to `false` in front matter, Hugo correctly published the [page resources] because we invoked the [`RelPermalink`] method on each resource. This is the expected behavior.
++
++## Example -- list without publishing
 +
- To avoid setting the build options on every testimonials, one can use [`cascade`](/content-management/front-matter#front-matter-cascade) on the testimonial section's content file.
++Publish a section page without publishing the descendant pages. For example, to create a glossary:
 +
- {{< code-toggle >}}
- title: Testimonials
- _build:
-   render: true
- cascade:
-   _build:
-     render: false
-     list: true # default
++```text
++content/
++├── glossary/
++│   ├── _index.md
++│   ├── bar.md
++│   ├── baz.md
++│   └── foo.md
++└── _index.md
++```
 +
- {{< code file="layouts/_defaults/testimonials.html" copy=false >}}
- <section id="testimonials">
-   {{ range first 5 .Pages }}
-     <blockquote cite="{{ .Params.cite }}">
-       {{ .Content }}
-     </blockquote>
++Set the build options in front matter, using the `cascade` keyword to "cascade" the values down to descendant pages.
++
++{{< code-toggle file=content/glossary/_index.md fm=true >}}
++title = 'Glossary'
++[_build]
++render = 'always'
++[[cascade]]
++[cascade._build]
++  list = 'local'
++  publishResources = false
++  render = 'never'
 +{{< /code-toggle >}}
 +
- </section>
++To render the glossary:
++
++{{< code file=layouts/glossary/list.html  >}}
++<dl>
++  {{ range .Pages }}
++    <dt>{{ .Title }}</dt>
++    <dd>{{ .Content }}</dd>
 +  {{ end }}
++</dl>
 +{{< /code >}}
++
++The published site will have this structure:
++
++```text
++public/
++├── glossary/
++│   └── index.html
++└── index.html
++```
++
++## Example -- publish without listing
++
++Publish a section's descendant pages without publishing the section page itself.
++
++```text
++content/
++├── books/
++│   ├── _index.md
++│   ├── book-1.md
++│   └── book-2.md
++└── _index.md
++```
++
++Set the build options in front matter:
++
++{{< code-toggle file=content/books/_index.md >}}
++title = 'Books'
++[_build]
++render = 'never'
++list = 'never'
++{{< /code-toggle >}}
++
++The published site will have this structure:
++
++```html
++public/
++├── books/
++│   ├── book-1/
++│   │   └── index.html
++│   └── book-2/
++│       └── index.html
++└── index.html
++```
++
++## Example -- conditionally hide section
++
++Consider this example. A documentation site has a team of contributors with access to 20 custom shortcodes. Each shortcode takes several arguments, and requires documentation for the contributors to reference when using them.
++
++Instead of external documentation for the shortcodes, include an "internal" section that is hidden when building the production site.
++
++```text
++content/
++├── internal/
++│   ├── shortcodes/
++│   │   ├── _index.md
++│   │   ├── shortcode-1.md
++│   │   └── shortcode-2.md
++│   └── _index.md
++├── reference/
++│   ├── _index.md
++│   ├── reference-1.md
++│   └── reference-2.md
++├── tutorials/
++│   ├── _index.md
++│   ├── tutorial-1.md
++│   └── tutorial-2.md
++└── _index.md
++```
++
++Set the build options in front matter, using the `cascade` keyword to "cascade" the values down to descendant pages, and use the `target` keyword to target the production environment.
++
++{{< code-toggle file=content/internal/_index.md >}}
++title = 'Internal'
++[[cascade]]
++[cascade._build]
++render = 'never'
++list = 'never'
++[cascade._target]
++environment = 'production'
++{{< /code-toggle >}}
++
++The production site will have this structure:
++
++```html
++public/
++├── reference/
++│   ├── reference-1/
++│   │   └── index.html
++│   ├── reference-2/
++│   │   └── index.html
++│   └── index.html
++├── tutorials/
++│   ├── tutorial-1/
++│   │   └── index.html
++│   ├── tutorial-2/
++│   │   └── index.html
++│   └── index.html
++└── index.html
++```
index 39663013b6b0964a567f6c9d0e29f4b0c86a66a3,0000000000000000000000000000000000000000..9985dd1e69bf7a38bec7353558e50bedf4ba93e5
mode 100644,000000..100644
--- /dev/null
@@@ -1,73 -1,0 +1,73 @@@
- categories: [project organization]
 +---
 +title: Comments
 +description: Hugo ships with an internal Disqus template, but this isn't the only commenting system that will work with your new Hugo website.
++categories: [content management]
 +keywords: [sections,content,organization]
- toc: true
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 220
 +weight: 220
++toc: true
 +aliases: [/extras/comments/]
 +---
 +
 +Hugo ships with support for [Disqus](https://disqus.com/), a third-party service that provides comment and community capabilities to websites via JavaScript.
 +
 +Your theme may already support Disqus, but if not, it is easy to add to your templates via [Hugo's built-in Disqus partial][disquspartial].
 +
 +## Add Disqus
 +
 +Hugo comes with all the code you need to load Disqus into your templates. Before adding Disqus to your site, you'll need to [set up an account][disqussetup].
 +
 +### Configure Disqus
 +
 +Disqus comments require you set a single value in your [site's configuration file][configuration] like so:
 +
 +{{< code-toggle file="hugo" >}}
 +[services.disqus]
 +shortname = 'your-disqus-shortname'
 +{{</ code-toggle >}}
 +
 +For many websites, this is enough configuration. However, you also have the option to set the following in the [front matter] of a single content file:
 +
 +* `disqus_identifier`
 +* `disqus_title`
 +* `disqus_url`
 +
 +### Render Hugo's built-in Disqus partial template
 +
 +Disqus has its own [internal template](/templates/internal/#disqus) available, to render it add the following code where you want comments to appear:
 +
 +```go-html-template
 +{{ template "_internal/disqus.html" . }}
 +```
 +
 +## Alternatives
 +
 +These are some alternatives to Disqus:
 +
 +* [Cactus Comments](https://cactus.chat/docs/integrations/hugo/) (Open Source, Matrix appservice, Docker install)
 +* [Commento](https://commento.io/) (Open Source, available as a service, local install, or docker image)
 +* [Giscus](https://giscus.app/) (Open source, comments system powered by GitHub Discussions)
 +* [Graph Comment](https://graphcomment.com/)
 +* [Hyvor Talk](https://talk.hyvor.com/) (Available as a service)
 +* [IntenseDebate](https://intensedebate.com/)
 +* [Isso](https://isso-comments.de/) (Self-hosted, Python) ([tutorial][issotutorial])
 +* [Muut](https://muut.com/)
 +* [Remark42](https://remark42.com/) (Open source, Golang, Easy to run docker)
 +* [ReplyBox](https://getreplybox.com/)
 +* [Staticman](https://staticman.net/)
 +* [Talkyard](https://blog-comments.talkyard.io/) (Open source, & serverless hosting)
 +* [Utterances](https://utteranc.es/) (Open source, GitHub comments widget built on GitHub issues)
 +
 +[configuration]: /getting-started/configuration/
 +[disquspartial]: /templates/internal/#disqus
 +[disqussetup]: https://disqus.com/profile/signup/
 +[forum]: https://discourse.gohugo.io
 +[front matter]: /content-management/front-matter/
 +[kaijuissue]: https://github.com/spf13/kaiju/issues/new
 +[issotutorial]: https://stiobhart.net/2017-02-24-isso-comments/
 +[partials]: /templates/partials/
 +[MongoDB]: https://www.mongodb.com/
 +[tweet]: https://twitter.com/spf13
index c989cc560d9c42699cbd2a9fe3a3c53cdc5d19dd,0000000000000000000000000000000000000000..500e388a41d262383d8c584be23a62abfb3bd2dd
mode 100644,000000..100644
--- /dev/null
@@@ -1,152 -1,0 +1,150 @@@
- keywords: ["cross references","references", "anchors", "urls"]
 +---
 +title: Links and cross references
 +description: Shortcodes for creating links to documents.
 +categories: [content management]
- toc: true
++keywords: [cross references,references,anchors,urls]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 170
 +weight: 170
++toc: true
 +aliases: [/extras/crossreferences/]
 +---
 +
 +The `ref` and `relref` shortcodes display the absolute and relative permalinks to a document, respectively.
 +
 +## Use of `ref` and `relref`
 +
 +The `ref` and `relref` shortcodes require a single parameter: the path to a content document, with or without a file extension, with or without an anchor. Paths without a leading `/` are first resolved relative to the current page, then to the remainder of the site.
 +
 +```text
 +.
 +└── content
 +    ├── about
 +    |   ├── _index.md
 +    |   └── credits.md
 +    ├── pages
 +    |   ├── document1.md
 +    |   └── document2.md    // has anchor #anchor
 +    ├── products
 +    |   └── index.md
 +    └── blog
 +        └── my-post.md
 +```
 +
 +The pages can be referenced as follows:
 +
- The behavior can, since Hugo 0.45, be configured in `hugo.toml`:
 +```text
 +{{</* ref "document2" */>}}             // <- From pages/document1.md, relative path
 +{{</* ref "document2#anchor" */>}}      
 +{{</* ref "document2.md" */>}}          
 +{{</* ref "document2.md#anchor" */>}}   
 +{{</* ref "#anchor" */>}}               // <- From pages/document2.md
 +{{</* ref "/blog/my-post" */>}}         // <- From anywhere, absolute path
 +{{</* ref "/blog/my-post.md" */>}}
 +{{</* relref "document" */>}}
 +{{</* relref "document.md" */>}}
 +{{</* relref "#anchor" */>}}
 +{{</* relref "/blog/my-post.md" */>}}
 +```
 +
 +index.md can be reference either by its path or by its containing folder without the ending `/`. \_index.md can be referenced only by its containing folder:
 +
 +```text
 +{{</* ref "/about" */>}}             // <- References /about/_index.md
 +{{</* ref "/about/_index" */>}}      //    Raises REF_NOT_FOUND error
 +{{</* ref "/about/credits.md" */>}}  // <- References /about/credits.md
 +
 +{{</* ref "/products" */>}}          // <- References /products/index.md
 +{{</* ref "/products/index" */>}}    // <- References /products/index.md
 +```
 +
 +To generate a hyperlink using `ref` or `relref` in markdown:
 +
 +```text
 +[About]({{</* ref "/about" */>}} "About Us")
 +```
 +
 +Hugo emits an error or warning if a document cannot be uniquely resolved. The error behavior is configurable; see below.
 +
 +### Link to another language version
 +
 +To link to another language version of a document, use this syntax:
 +
 +```go-html-template
 +{{</* relref path="document.md" lang="ja" */>}}
 +```
 +
 +### Get another output format
 +
 +To link to another Output Format of a document, use this syntax:
 +
 +```go-html-template
 +{{</* relref path="document.md" outputFormat="rss" */>}}
 +```
 +
 +### Heading IDs
 +
 +When using Markdown document types, Hugo generates element IDs for every heading on a page. For example:
 +
 +```md
 +## Reference
 +```
 +
 +produces this HTML:
 +
 +```html
 +<h2 id="reference">Reference</h2>
 +```
 +
 +Get the permalink to a heading by appending the ID to the path when using the `ref` or `relref` shortcodes:
 +
 +```go-html-template
 +{{</* ref "document.md#reference" */>}}
 +{{</* relref "document.md#reference" */>}}
 +```
 +
 +Generate a custom heading ID by including an attribute. For example:
 +
 +```md
 +## Reference A {#foo}
 +## Reference B {id="bar"}
 +```
 +
 +produces this HTML:
 +
 +```html
 +<h2 id="foo">Reference A</h2>
 +<h2 id="bar">Reference B</h2>
 +```
 +
 +Hugo will generate unique element IDs if the same heading appears more than once on a page. For example:
 +
 +```md
 +## Reference
 +## Reference
 +## Reference
 +```
 +
 +produces this HTML:
 +
 +```html
 +<h2 id="reference">Reference</h2>
 +<h2 id="reference-1">Reference</h2>
 +<h2 id="reference-2">Reference</h2>
 +```
 +
 +## Ref and RelRef Configuration
 +
++The behavior can be configured in `hugo.toml`:
 +
 +refLinksErrorLevel ("ERROR")
 +: When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
 +
 +refLinksNotFoundURL
 +: URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
 +
 +[lists]: /templates/lists/
 +[output formats]: /templates/output-formats/
 +[shortcode]: /content-management/shortcodes/
index c0b2349b0b24a38aee96ab2d582f9bd0a0a0bfd0,0000000000000000000000000000000000000000..17407098fa5a0ab842ac324bd3a14bfd8ec3fdc5
mode 100644,000000..100644
--- /dev/null
@@@ -1,266 -1,0 +1,263 @@@
- toc: true
 +---
 +title: Diagrams
 +description: Use fenced code blocks and markdown render hooks to display diagrams.
 +categories: [content management]
 +keywords: [diagrams,drawing]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 50
- {{< new-in "0.93.0" >}}
 +weight: 50
++toc: true
 +---
- ## GoAT diagrams (Ascii)
++{{< new-in 0.93.0 >}}
 +
++## GoAT diagrams (ASCII)
 +
 +Hugo supports [GoAT](https://github.com/bep/goat) natively. This means that this code block:
 +
 +````txt
 +```goat
 +      .               .                .               .--- 1          .-- 1     / 1
 +     / \              |                |           .---+            .-+         +
 +    /   \         .---+---.         .--+--.        |   '--- 2      |   '-- 2   / \ 2
 +   +     +        |       |        |       |    ---+            ---+          +
 +  / \   / \     .-+-.   .-+-.     .+.     .+.      |   .--- 3      |   .-- 3   \ / 3
 + /   \ /   \    |   |   |   |    |   |   |   |     '---+            '-+         +
 + 1   2 3   4    1   2   3   4    1   2   3   4         '--- 4          '-- 4     \ 4
 +
 +```
 +````
 +
 +Will be rendered as:
 +
 +```goat
 +
 +          .               .                .               .--- 1          .-- 1     / 1
 +         / \              |                |           .---+            .-+         +
 +        /   \         .---+---.         .--+--.        |   '--- 2      |   '-- 2   / \ 2
 +       +     +        |       |        |       |    ---+            ---+          +
 +      / \   / \     .-+-.   .-+-.     .+.     .+.      |   .--- 3      |   .-- 3   \ / 3
 +     /   \ /   \    |   |   |   |    |   |   |   |     '---+            '-+         +
 +     1   2 3   4    1   2   3   4    1   2   3   4         '--- 4          '-- 4     \ 4
 +```
 +
 +## Mermaid diagrams
 +
 +Hugo currently does not provide default templates for Mermaid diagrams. But you can easily add your own. One way to do it would be to create `layouts/_default/_markup/render-codeblock-mermaid.html`:
 +
 +```go-html-template
 +<pre class="mermaid">
 +  {{- .Inner | safeHTML }}
 +</pre>
 +{{ .Page.Store.Set "hasMermaid" true }}
 +```
 +
 +And then include this snippet at the bottom of the content template (**Note**: below `.Content` as the render hook is not processed until `.Content` is executed):
 +
 +```go-html-template
 +{{ if .Page.Store.Get "hasMermaid" }}
 +  <script type="module">
 +    import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
 +    mermaid.initialize({ startOnLoad: true });
 +  </script>
 +{{ end }}
 +```
 +
 +With that you can use the `mermaid` language in Markdown code blocks:
 +
 +````text
 +```mermaid
 +sequenceDiagram
 +    participant Alice
 +    participant Bob
 +    Alice->>John: Hello John, how are you?
 +    loop Healthcheck
 +        John->>John: Fight against hypochondria
 +    end
 +    Note right of John: Rational thoughts <br/>prevail!
 +    John-->>Alice: Great!
 +    John->>Bob: How about you?
 +    Bob-->>John: Jolly good!
 +```
 +````
 +
 +## Goat ASCII diagram examples
 +
 +### Graphics
 +
 +```goat
 +                                                                             .
 +    0       3                          P *              Eye /         ^     /
 +     *-------*      +y                    \                +)          \   /  Reflection
 +  1 /|    2 /|       ^                     \                \           \ v
 +   *-------* |       |                v0    \       v3           --------*--------
 +   | |4    | |7      |                  *----\-----*
 +   | *-----|-*       +-----> +x        /      v X   \          .-.<--------        o
 +   |/      |/       /                 /        o     \        | / | Refraction    / \
 +   *-------*       v                 /                \        +-'               /   \
 +  5       6      +z              v1 *------------------* v2    |                o-----o
 +                                                               v
 +
 +```
 +
 +### Complex
 +
 +```goat
 ++-------------------+                           ^                      .---.
 +|    A Box          |__.--.__    __.-->         |      .-.             |   |
 +|                   |        '--'               v     | * |<---        |   |
 ++-------------------+                                  '-'             |   |
 +                       Round                                       *---(-. |
 +  .-----------------.  .-------.    .----------.         .-------.     | | |
 + |   Mixed Rounded  | |         |  / Diagonals  \        |   |   |     | | |
 + | & Square Corners |  '--. .--'  /              \       |---+---|     '-)-'       .--------.
 + '--+------------+-'  .--. |     '-------+--------'      |   |   |       |        / Search /
 +    |            |   |    | '---.        |               '-------'       |       '-+------'
 +    |<---------->|   |    |      |       v                Interior                 |     ^
 +    '           <---'      '----'   .-----------.              ---.     .---       v     |
 + .------------------.  Diag line    | .-------. +---.              \   /           .     |
 + |   if (a > b)     +---.      .--->| |       | |    | Curved line  \ /           / \    |
 + |   obj->fcn()     |    \    /     | '-------' |<--'                +           /   \   |
 + '------------------'     '--'      '--+--------'      .--. .--.     |  .-.     +Done?+-'
 +    .---+-----.                        |   ^           |\ | | /|  .--+ |   |     \   /
 +    |   |     | Join        \|/        |   | Curved    | \| |/ | |    \    |      \ /
 +    |   |     +---->  o    --o--        '-'  Vertical  '--' '--'  '--  '--'        +  .---.
 + <--+---+-----'       |     /|\                                                    |  | 3 |
 +                      v                             not:line    'quotes'        .-'   '---'
 +  .-.             .---+--------.            /            A || B   *bold*       |        ^
 + |   |           |   Not a dot  |      <---+---<--    A dash--is not a line    v        |
 +  '-'             '---------+--'          /           Nor/is this.            ---
 +
 +```
 +
 +### Process
 +
 +```goat
 +                                      .
 +   .---------.                       / \
 +  |   START   |                     /   \        .-+-------+-.      ___________
 +   '----+----'    .-------.    A   /     \   B   | |COMPLEX| |     /           \      .-.
 +        |        |   END   |<-----+CHOICE +----->| |       | +--->+ PREPARATION +--->| X |
 +        v         '-------'        \     /       | |PROCESS| |     \___________/      '-'
 +    .---------.                     \   /        '-+---+---+-'
 +   /  INPUT  /                       \ /
 +  '-----+---'                         '
 +        |                             ^
 +        v                             |
 +  .-----------.                 .-----+-----.        .-.
 +  |  PROCESS  +---------------->|  PROCESS  |<------+ X |
 +  '-----------'                 '-----------'        '-'
 +```
 +
 +### File tree
 +
 +Created from <https://arthursonzogni.com/Diagon/#Tree>
 +
 +```goat  { width=300  color="orange" }
 +───Linux─┬─Android
 +         ├─Debian─┬─Ubuntu─┬─Lubuntu
 +         │        │        ├─Kubuntu
 +         │        │        ├─Xubuntu
 +         │        │        └─Xubuntu
 +         │        └─Mint
 +         ├─Centos
 +         └─Fedora
 +```
 +
 +### Sequence diagram
 +
 +<https://arthursonzogni.com/Diagon/#Sequence>
 +
 +```goat { class="w-40" }
 +┌─────┐       ┌───┐
 +│Alice│       │Bob│
 +└──┬──┘       └─┬─┘
 +   │            │  
 +   │ Hello Bob! │  
 +   │───────────>│  
 +   │            │  
 +   │Hello Alice!│  
 +   │<───────────│  
 +┌──┴──┐       ┌─┴─┐
 +│Alice│       │Bob│
 +└─────┘       └───┘
 +
 +```
 +
 +### Flowchart
 +
 +<https://arthursonzogni.com/Diagon/#Flowchart>
 +
 +```goat
 +   _________________                                                              
 +  ╱                 ╲                                                     ┌─────┐ 
 + ╱ DO YOU UNDERSTAND ╲____________________________________________________│GOOD!│ 
 + ╲ FLOW CHARTS?      ╱yes                                                 └──┬──┘ 
 +  ╲_________________╱                                                        │    
 +           │no                                                               │    
 +  _________▽_________                    ______________________              │    
 + ╱                   ╲                  ╱                      ╲    ┌────┐   │    
 +╱ OKAY, YOU SEE THE   ╲________________╱ ... AND YOU CAN SEE    ╲___│GOOD│   │    
 +╲ LINE LABELED 'YES'? ╱yes             ╲ THE ONES LABELED 'NO'? ╱yes└──┬─┘   │    
 + ╲___________________╱                  ╲______________________╱       │     │    
 +           │no                                     │no                 │     │    
 +   ________▽_________                     _________▽__________         │     │    
 +  ╱                  ╲    ┌───────────┐  ╱                    ╲        │     │    
 + ╱ BUT YOU SEE THE    ╲___│WAIT, WHAT?│ ╱ BUT YOU JUST         ╲___    │     │    
 + ╲ ONES LABELED 'NO'? ╱yes└───────────┘ ╲ FOLLOWED THEM TWICE? ╱yes│   │     │    
 +  ╲__________________╱                   ╲____________________╱    │   │     │    
 +           │no                                     │no             │   │     │    
 +       ┌───▽───┐                                   │               │   │     │    
 +       │LISTEN.│                                   └───────┬───────┘   │     │    
 +       └───┬───┘                                    ┌──────▽─────┐     │     │    
 +     ┌─────▽────┐                                   │(THAT WASN'T│     │     │    
 +     │I HATE YOU│                                   │A QUESTION) │     │     │    
 +     └──────────┘                                   └──────┬─────┘     │     │    
 +                                                      ┌────▽───┐       │     │    
 +                                                      │SCREW IT│       │     │    
 +                                                      └────┬───┘       │     │    
 +                                                           └─────┬─────┘     │    
 +                                                                 │           │    
 +                                                                 └─────┬─────┘    
 +                                                               ┌───────▽──────┐   
 +                                                               │LET'S GO DRING│   
 +                                                               └───────┬──────┘   
 +                                                             ┌─────────▽─────────┐
 +                                                             │HEY, I SHOULD TRY  │
 +                                                             │INSTALLING FREEBSD!│
 +                                                             └───────────────────┘
 +
 +```
 +
 +### Table
 +
 +<https://arthursonzogni.com/Diagon/#Table>
 +
 +```goat { class="w-80 dark-blue" }
 +┌────────────────────────────────────────────────┐
 +│                                                │
 +├────────────────────────────────────────────────┤
 +│SYNTAX     = { PRODUCTION } .                   │
 +├────────────────────────────────────────────────┤
 +│PRODUCTION = IDENTIFIER "=" EXPRESSION "." .    │
 +├────────────────────────────────────────────────┤
 +│EXPRESSION = TERM { "|" TERM } .                │
 +├────────────────────────────────────────────────┤
 +│TERM       = FACTOR { FACTOR } .                │
 +├────────────────────────────────────────────────┤
 +│FACTOR     = IDENTIFIER                         │
 +├────────────────────────────────────────────────┤
 +│          | LITERAL                             │
 +├────────────────────────────────────────────────┤
 +│          | "[" EXPRESSION "]"                  │
 +├────────────────────────────────────────────────┤
 +│          | "(" EXPRESSION ")"                  │
 +├────────────────────────────────────────────────┤
 +│          | "{" EXPRESSION "}" .                │
 +├────────────────────────────────────────────────┤
 +│IDENTIFIER = letter { letter } .                │
 +├────────────────────────────────────────────────┤
 +│LITERAL    = """" character { character } """" .│
 +└────────────────────────────────────────────────┘
 +```
index ccc45b943fcc1814950acbf01396eb8efd8b5efc,0000000000000000000000000000000000000000..76c8102b5f64e809ce21bc98993d760d7d7b9b61
mode 100644,000000..100644
--- /dev/null
@@@ -1,94 -1,0 +1,93 @@@
- toc: true
 +---
 +title: Content formats
 +description: Both HTML and Markdown are supported content formats.
 +categories: [content management]
 +keywords: [markdown,asciidoc,pandoc,content format]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 40
- | Goldmark  | md, markdown, goldmark  |Note that you can set the default handler of `md` and `markdown` to something else, see [Configure Markup](/getting-started/configuration-markup/).|
- |Emacs Org-Mode|org|See [go-org](https://github.com/niklasfasching/go-org).|
- |AsciiDoc|asciidocext, adoc, ad|Needs [Asciidoctor][ascii] installed.|
- |RST|rst|Needs [RST](https://docutils.sourceforge.io/rst.html) installed.|
- |Pandoc|pandoc, pdc|Needs [Pandoc](https://www.pandoc.org/) installed.|
- |HTML|html, htm|To be treated as a content file, with layout, shortcodes etc., it must have front matter. If not, it will be copied as-is.|
 +weight: 40
++toc: true
 +aliases: [/content/markdown-extras/,/content/supported-formats/,/doc/supported-formats/]
 +---
 +
 +You can put any file type into your `/content` directories, but Hugo uses the `markup` front matter value if set or the file extension (see `Markup identifiers` in the table below) to determine if the markup needs to be processed, e.g.:
 +
 +* Markdown converted to HTML
 +* [Shortcodes](/content-management/shortcodes/) processed
 +* Layout applied
 +
 +## List of content formats
 +
 +The current list of content formats in Hugo:
 +
 +| Name  | Markup identifiers | Comment |
 +| ------------- | ------------- |-------------|
- Some Asciidoctor parameters can be customized in Hugo. See [details].
++| Goldmark  | `markdown`, `goldmark`  |Note that you can set the default handler of `md` and `markdown` to something else, see [Configure Markup](/getting-started/configuration-markup/).|
++|Emacs Org-Mode|`org`|See [go-org](https://github.com/niklasfasching/go-org).|
++|AsciiDoc|`asciidocext`, `adoc`, `ad`|Needs [Asciidoctor][ascii] installed.|
++|RST|`rst`|Needs [RST](https://docutils.sourceforge.io/rst.html) installed.|
++|Pandoc|`pandoc`, `pdc`|Needs [Pandoc](https://www.pandoc.org/) installed.|
++|HTML|`html`, `htm`|To be treated as a content file, with layout, shortcodes etc., it must have front matter. If not, it will be copied as-is.|
 +
 +The `markup identifier` is fetched from either the `markup` variable in front matter or from the file extension. For markup-related configuration, see [Configure Markup](/getting-started/configuration-markup/).
 +
 +## External helpers
 +
 +Some of the formats in the table above need external helpers installed on your PC. For example, for AsciiDoc files,
 +Hugo will try to call the `asciidoctor` command. This means that you will have to install the associated
 +tool on your machine to be able to use these formats.
 +
 +Hugo passes reasonable default arguments to these external helpers by default:
 +
 +- `asciidoctor`: `--no-header-footer -`
 +- `rst2html`: `--leave-comments --initial-header-level=2`
 +- `pandoc`: `--mathjax`
 +
 +{{% note %}}
 +Because additional formats are external commands, generation performance will rely heavily on the performance of the external tool you are using. As this feature is still in its infancy, feedback is welcome.
 +{{% /note %}}
 +
 +### Asciidoctor
 +
 +The Asciidoctor community offers a wide set of tools for the AsciiDoc format that can be installed additionally to Hugo.
 +[See the Asciidoctor docs for installation instructions](https://asciidoctor.org/docs/install-toolchain/). Make sure that also all
 +optional extensions like `asciidoctor-diagram` or `asciidoctor-html5s` are installed if required.
 +
 +{{% note %}}
 +External `asciidoctor` command requires Hugo rendering to _disk_ to a specific destination directory. It is required to run Hugo with the command option `--destination`.
 +{{% /note %}}
 +
- [emojis]: https://www.webpagefx.com/tools/emoji-cheat-sheet/
++Some Asciidoctor parameters can be customized in Hugo. See&nbsp;[details].
 +
 +[details]: /getting-started/configuration-markup/#asciidoc
 +
 +## Learn markdown
 +
 +Markdown syntax is simple enough to learn in a single sitting. The following are excellent resources to get you up and running:
 +
 +* [Daring Fireball: Markdown, John Gruber (Creator of Markdown)][fireball]
 +* [Markdown Cheatsheet, Adam Pritchard][mdcheatsheet]
 +* [Markdown Tutorial (Interactive), Garen Torikian][mdtutorial]
 +* [The Markdown Guide, Matt Cone][mdguide]
 +
 +[ascii]: https://asciidoctor.org/
 +[config]: /getting-started/configuration/
 +[developer tools]: /tools/
 +[fireball]: https://daringfireball.net/projects/markdown/
 +[gfmtasks]: https://guides.github.com/features/mastering-markdown/#syntax
 +[helperssource]: https://github.com/gohugoio/hugo/blob/77c60a3440806067109347d04eb5368b65ea0fe8/helpers/general.go#L65
 +[hl]: /content-management/syntax-highlighting/
 +[hlsc]: /content-management/shortcodes/#highlight
 +[hugocss]: /css/style.css
 +[ietf]: https://tools.ietf.org/html/
 +[mathjaxdocs]: https://docs.mathjax.org/en/latest/
 +[mdcheatsheet]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
 +[mdguide]: https://www.markdownguide.org/
 +[mdtutorial]: https://www.markdowntutorial.com/
 +[org]: https://orgmode.org/
 +[pandoc]: https://www.pandoc.org/
 +[rest]: https://docutils.sourceforge.io/rst.html
 +[sc]: /content-management/shortcodes/
 +[sct]: /templates/shortcode-templates/
index 10317e805668639e001aba921f70064f6201e83f,0000000000000000000000000000000000000000..dba67ba10734346df9e044bb2559e3f27995b5e0
mode 100644,000000..100644
--- /dev/null
@@@ -1,239 -1,0 +1,244 @@@
- keywords: ["front matter", "yaml", "toml", "json", "metadata", "archetypes"]
 +---
 +title: Front matter
 +description: Hugo allows you to add front matter in yaml, toml, or json to your content files.
 +categories: [content management]
- toc: true
++keywords: [front matter,yaml,toml,json,metadata,archetypes]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 60
- : Used for creating links to content; if set, Hugo defaults to using the `linkTitle` before the `title`. Hugo can also [order lists of content by `linkTitle`][bylinktitle].
 +weight: 60
++toc: true
 +aliases: [/content/front-matter/]
 +---
 +
 +**Front matter** allows you to keep metadata attached to an instance of a [content type]---i.e., embedded inside a content file---and is one of the many features that gives Hugo its strength.
 +
 +{{< youtube Yh2xKRJGff4 >}}
 +
 +## Front matter formats
 +
 +Hugo supports four formats for front matter, each with their own identifying tokens.
 +
 +TOML
 +: identified by opening and closing `+++`.
 +
 +YAML
 +: identified by opening and closing `---`.
 +
 +JSON
 +: a single JSON object surrounded by '`{`' and '`}`', followed by a new line.
 +
 +ORG
 +: a group of Org mode keywords in the format '`#+KEY: VALUE`'. Any line that does not start with `#+` ends the front matter section.
 +  Keyword values can be either strings (`#+KEY: VALUE`) or a whitespace separated list of strings (`#+KEY[]: VALUE_1 VALUE_2`).
 +
 +### Example
 +
 +{{< code-toggle >}}
 +title = "spf13-vim 3.0 release and new website"
 +description = "spf13-vim is a cross platform distribution of vim plugins and resources for Vim."
 +tags = [ ".vimrc", "plugins", "spf13-vim", "vim" ]
 +date = "2012-04-06"
 +categories = [
 +  "Development",
 +  "VIM"
 +]
 +slug = "spf13-vim-3-0-release-and-new-website"
 +{{< /code-toggle >}}
 +
 +## Front matter variables
 +
 +### Predefined
 +
 +There are a few predefined variables that Hugo is aware of. See [Page Variables][pagevars] for how to call many of these predefined variables in your templates.
 +
 +aliases
 +: An array of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure . See [Aliases][aliases] for details.
 +
 +audio
 +: An array of paths to audio files related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:audio`.
 +
 +cascade
 +: A map of front matter keys whose values are passed down to the page's descendants unless overwritten by self or a closer ancestor's cascade. See [Front Matter Cascade](#front-matter-cascade) for details.
 +
 +date
 +: The datetime assigned to this page. This is usually fetched from the `date` field in front matter, but this behavior is configurable.
 +
 +description
 +: The description for the content.
 +
 +draft
 +: If `true`, the content will not be rendered unless the `--buildDrafts` flag is passed to the `hugo` command.
 +
 +expiryDate
 +: The datetime at which the content should no longer be published by Hugo; expired content will not be rendered unless the `--buildExpired` flag is passed to the `hugo` command.
 +
 +headless
 +: If `true`, sets a leaf bundle to be [headless][headless-bundle].
 +
 +images
 +: An array of paths to images related to the page; used by [internal templates](/templates/internal) such as `_internal/twitter_cards.html`.
 +
 +isCJKLanguage
 +: If `true`, Hugo will explicitly treat the content as a CJK language; both `.Summary` and `.WordCount` work properly in CJK languages.
 +
 +keywords
 +: The meta keywords for the content.
 +
 +layout
 +: The layout Hugo should select from the [lookup order][lookup] when rendering the content. If a `type` is not specified in the front matter, Hugo will look for the layout of the same name in the layout directory that corresponds with a content's section. See [Content Types][content type].
 +
 +lastmod
 +: The datetime at which the content was last modified.
 +
 +linkTitle
- \<taxonomies\>
++: Used for creating links to content; if set, Hugo defaults to using the `linkTitle` before the `title`.
 +
 +markup
 +: **experimental**; specify `"rst"` for reStructuredText (requires`rst2html`) or `"md"` (default) for Markdown.
 +
 +outputs
 +: Allows you to specify output formats specific to the content. See [output formats][outputs].
 +
 +publishDate
 +: If in the future, content will not be rendered unless the `--buildFuture` flag is passed to `hugo`.
 +
 +resources
 +: Used for configuring page bundle resources. See [Page Resources][page-resources].
 +
 +series
 +: An array of series this page belongs to, as a subset of the `series` [taxonomy](/content-management/taxonomies/); used by the `opengraph` [internal template](/templates/internal) to populate `og:see_also`.
 +
 +slug
 +: Overrides the last segment of the URL path. Not applicable to section pages. See [URL Management](/content-management/urls/#slug) for details.
 +
 +summary
 +: Text used when providing a summary of the article in the `.Summary` page variable; details available in the [content-summaries](/content-management/summaries/) section.
 +
 +title
 +: The title for the content.
 +
 +type
 +: The type of the content; this value will be automatically derived from the directory (i.e., the [section]) if not specified in front matter.
 +
 +url
 +: Overrides the entire URL path. Applicable to regular pages and section pages. See [URL Management](/content-management/urls/#url) for details.
 +
 +videos
 +: An array of paths to videos related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:video`.
 +
 +weight
 +: used for [ordering your content in lists][ordering]. Lower weight gets higher precedence. So content with lower weight will come first. If set, weights should be non-zero, as 0 is interpreted as an *unset* weight.
 +
- {{< code-toggle copy=false >}}
++taxonomies
 +: Field name of the *plural* form of the index. See `tags` and `categories` in the above front matter examples. *Note that the plural form of user-defined taxonomies cannot be the same as any of the predefined front matter variables.*
 +
 +{{% note %}}
 +If neither `slug` nor `url` is present and [permalinks are not configured otherwise in your site configuration file](/content-management/urls/#permalinks), Hugo will use the file name of your content to create the output URL. See [Content Organization](/content-management/organization) for an explanation of paths in Hugo and [URL Management](/content-management/urls/) for ways to customize Hugo's default behaviors.
 +{{% /note %}}
 +
 +### User-defined
 +
 +You can add fields to your front matter arbitrarily to meet your needs. These user-defined key-values are placed into a single `.Params` variable for use in your templates.
 +
 +The following fields can be accessed via `.Params.include_toc` and `.Params.show_comments`, respectively. The [Variables] section provides more information on using Hugo's page- and site-level variables in your templates.
 +
- {{< code-toggle copy=false >}}
++{{< code-toggle >}}
 +include_toc: true
 +show_comments: false
 +{{</ code-toggle >}}
 +
 +## Front matter cascade
 +
 +Any node or section can pass down to descendants a set of front matter values as long as defined underneath the reserved `cascade` front matter key.
 +
 +### Target specific pages
 +
 +The `cascade` block can be a slice with a optional `_target` keyword, allowing for multiple `cascade` values targeting different page sets.
 +
- {{< code-toggle copy=false >}}
++{{< code-toggle >}}
 +title ="Blog"
 +[[cascade]]
 +background = "yosemite.jpg"
 +[cascade._target]
 +path="/blog/**"
 +lang="en"
 +kind="page"
 +[[cascade]]
 +background = "goldenbridge.jpg"
 +[cascade._target]
 +kind="section"
 +{{</ code-toggle >}}
 +
 +Keywords available for `_target`:
 +
 +path
 +: A [Glob](https://github.com/gobwas/glob) pattern matching the content path below /content. Expects Unix-styled slashes. Note that this is the virtual path, so it starts at the mount root. The matching supports double-asterisks so you can match for patterns like `/blog/*/**` to match anything from the third level and down.
 +
 +kind
 +: A Glob pattern matching the Page's Kind(s), e.g. "{home,section}".
 +
 +lang
 +: A Glob pattern matching the Page's language, e.g. "{en,sv}".
 +
 +environment
 +: A Glob pattern matching the build environment, e.g. "{production,development}"
 +
 +Any of the above can be omitted.
 +
++{{% note %}}
++When making a site that supports multiple languages, defining a `[[cascade]]` is recommended to be done in [Site Config](../../getting-started/configuration/#cascade) to prevent duplication.
++
++If you instea define a `[[cascade]]` in front matter for multiple languages, an `content/XX/foo/_index.md` file needs to be made on a per-language basis, with `XX` the glob pattern matching the Page's language. In this case, the **lang** keyword is ignored. 
++{{% /note %}}
++
 +### Example
 +
 +In `content/blog/_index.md`
 +
- [bylinktitle]: /templates/lists/#by-link-title
++{{< code-toggle >}}
 +title: Blog
 +cascade:
 +  banner: images/typewriter.jpg
 +{{</ code-toggle >}}
 +
 +With the above example the Blog section page and its descendants will return `images/typewriter.jpg` when `.Params.banner` is invoked unless:
 +
 +- Said descendant has its own `banner` value set
 +- Or a closer ancestor node has its own `cascade.banner` value set.
 +
 +## Order content through front matter
 +
 +You can assign content-specific `weight` in the front matter of your content. These values are especially useful for [ordering][ordering] in list views. You can use `weight` for ordering of content and the convention of [`<TAXONOMY>_weight`][taxweight] for ordering content within a taxonomy. See [Ordering and Grouping Hugo Lists][lists] to see how `weight` can be used to organize your content in list views.
 +
 +## Override global markdown configuration
 +
 +It's possible to set some options for Markdown rendering in a content's front matter as an override to the [rendering options set in your project configuration][config].
 +
 +## Front matter format specs
 +
 +- [TOML Spec][toml]
 +- [YAML Spec][yaml]
 +- [JSON Spec][json]
 +
 +[variables]: /variables/
 +[aliases]: /content-management/urls/#aliases
 +[archetype]: /content-management/archetypes/
- [lists]: /templates/lists/#order-content
 +[config]: /getting-started/configuration/
 +[content type]: /content-management/types/
 +[contentorg]: /content-management/organization/
 +[headless-bundle]: /content-management/page-bundles/#headless-bundle
 +[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf
++[lists]: /templates/lists/#sort-content
 +[lookup]: /templates/lookup-order/
 +[ordering]: /templates/lists/
 +[outputs]: /templates/output-formats/
 +[page-resources]: /content-management/page-resources/
 +[pagevars]: /variables/page/
 +[section]: /content-management/sections/
 +[taxweight]: /content-management/taxonomies/
 +[toml]: https://toml.io/
 +[urls]: /content-management/urls/
 +[variables]: /variables/
 +[yaml]: https://yaml.org/spec/
index 9cce9070a37b00061ed2a3e67860e6402f9a65c0,0000000000000000000000000000000000000000..51136570002c66426e52236566a4b51e372e644e
mode 100644,000000..100644
--- /dev/null
@@@ -1,522 -1,0 +1,521 @@@
- categories: [fundamentals,content management]
- keywords: [resources, images]
 +---
 +title: Image processing
 +description: Resize, crop, rotate, filter, and convert images.
- A remote resource is a file on a remote server, accessible via http or https. To access an image as a remote resource:
++categories: [content management,fundamentals]
++keywords: [resources,images]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 90
 +toc: true
 +weight: 90
 +---
++
 +## Image resources
 +
 +To process an image you must access the file as a page resource, global resource, or remote resource.
 +
 +### Page resource
 +
 +A page resource is a file within a [page bundle]. A page bundle is a directory with an `index.md` or `_index.md` file at its root.
 +
 +```text
 +content/
 +└── posts/
 +    └── post-1/           <-- page bundle
 +        ├── index.md
 +        └── sunset.jpg    <-- page resource
 +```
 +
 +To access an image as a page resource:
 +
 +```go-html-template
 +{{ $image := .Resources.Get "sunset.jpg" }}
 +```
 +
 +### Global resource
 +
 +A global resource is a file within the `assets` directory, or within any directory [mounted] to the `assets` directory.
 +
 +```text
 +assets/
 +└── images/
 +    └── sunset.jpg    <-- global resource
 +```
 +
 +To access an image as a global resource:
 +
 +```go-html-template
 +{{ $image := resources.Get "images/sunset.jpg" }}
 +```
 +
 +### Remote resource
 +
- Metadata (EXIF, IPTC, XMP, etc.) is not preserved during image transformation. Use the [`Exif`] method with the _original_ image to extract EXIF metadata from JPEG or TIFF images.
++A remote resource is a file on a remote server, accessible via HTTP or HTTPS. To access an image as a remote resource:
 +
 +```go-html-template
 +{{ $image := resources.GetRemote "https://gohugo.io/img/hugo-logo.png" }}
 +```
 +
 +## Image rendering
 +
 +Once you have accessed an image as either a page resource or a global resource, render it in your templates using the `Permalink`, `RelPermalink`, `Width`, and `Height` properties.
 +
 +Example 1: Throws an error if the resource is not found.
 +
 +```go-html-template
 +{{ $image := .Resources.GetMatch "sunset.jpg" }}
 +<img src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}">
 +```
 +
 +Example 2: Skips image rendering if the resource is not found.
 +
 +```go-html-template
 +{{ $image := .Resources.GetMatch "sunset.jpg" }}
 +{{ with $image }}
 +  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
 +{{ end }}
 +```
 +
 +Example 3: A more concise way to skip image rendering if the resource is not found.
 +
 +```go-html-template
 +{{ with .Resources.GetMatch "sunset.jpg" }}
 +  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
 +{{ end }}
 +```
 +
 +Example 4: Skips rendering if there's problem accessing a remote resource.
 +
 +```go-html-template
 +{{ $u := "https://gohugo.io/img/hugo-logo.png" }}
 +{{ with resources.GetRemote $u }}
 +  {{ with .Err }}
 +    {{ errorf "%s" . }}
 +  {{ else }}
 +    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
 +  {{ end }}
 +{{ else }}
 +  {{ errorf "Unable to get remote resource %q" $u }}
 +{{ end }}
 +```
 +
 +## Image processing methods
 +
 +The `image` resource implements the  [`Process`],  [`Resize`], [`Fit`], [`Fill`], [`Crop`], [`Filter`], [`Colors`] and [`Exif`] methods.
 +
 +{{% note %}}
- {{< new-in "0.119.0" >}}
++Metadata (EXIF, IPTC, XMP, etc.) is not preserved during image transformation. Use the `Exif` method with the _original_ image to extract EXIF metadata from JPEG or TIFF images.
 +{{% /note %}}
 +
 +### Process
 +
- The `Process` method is also available as a filter, which is more effective if need to apply multiple filters to an image. See [Process filter](/functions/images/#process).
++{{< new-in 0.119.0 >}}
 +
 +{{% note %}}
++The `Process` method is also available as a filter, which is more effective if you need to apply multiple filters to an image. See [Process filter](/functions/images/process).
 +{{% /note %}}
 +
 +Process processes the image with the given specification. The specification can contain an optional action, one of `resize`, `crop`, `fit` or `fill`. This means that you can use this method instead of [`Resize`], [`Fit`], [`Fill`], or [`Crop`].
 +
 +See [Options](#image-processing-options) for available options.
 +
 +You can also use this method apply image processing that does not need any scaling, e.g. format conversions:
 +
 +```go-html-template
 +{{/* Convert the image from JPG to PNG. */}}
 +{{ $png := $jpg.Process "png" }}
 +```
 +
 +Some more examples:
 +
 +```go-html-template
 +{{/* Rotate the image 90 degrees counter-clockwise. */}}
 +{{ $image := $image.Process "r90" }}
 +
 +{{/* Scaling actions. */}}
 +{{ $image := $image.Process "resize 600x" }}
 +{{ $image := $image.Process "crop 600x400" }}
 +{{ $image := $image.Process "fit 600x400" }}
 +{{ $image := $image.Process "fill 600x400" }}
 +```
 +
- Resize an image to the specified width and/or height.
 +### Resize
 +
- {{< new-in "0.104.0" >}}
++Resize an image to the given width and/or height.
 +
 +If you specify both width and height, the resulting image will be disproportionally scaled unless the original image has the same aspect ratio.
 +
 +```go-html-template
 +{{/* Resize to a width of 600px and preserve aspect ratio */}}
 +{{ $image := $image.Resize "600x" }}
 +
 +{{/* Resize to a height of 400px and preserve aspect ratio */}}
 +{{ $image := $image.Resize "x400" }}
 +
 +{{/* Resize to a width of 600px and a height of 400px */}}
 +{{ $image := $image.Resize "600x400" }}
 +```
 +
 +### Fit
 +
 +Downscale an image to fit the given dimensions while maintaining aspect ratio. You must provide both width and height.
 +
 +```go-html-template
 +{{ $image := $image.Fit "600x400" }}
 +```
 +
 +### Fill
 +
 +Crop and resize an image to match the given dimensions. You must provide both width and height. Use the [`anchor`] option to change the crop box anchor point.
 +
 +```go-html-template
 +{{ $image := $image.Fill "600x400" }}
 +```
 +
 +### Crop
 +
 +Crop an image to match the given dimensions without resizing. You must provide both width and height. Use the [`anchor`] option to change the crop box anchor point.
 +
 +```go-html-template
 +{{ $image := $image.Crop "600x400" }}
 +```
 +
 +### Filter
 +
 +Apply one or more [filters] to an image.
 +
 +```go-html-template
 +{{ $image := $image.Filter (images.GaussianBlur 6) (images.Pixelate 8) }}
 +```
 +
 +Write this in a more functional style using pipes. Hugo applies the filters in the order given.
 +
 +```go-html-template
 +{{ $image := $image | images.Filter (images.GaussianBlur 6) (images.Pixelate 8) }}
 +```
 +
 +Sometimes it can be useful to create the filter chain once and then reuse it.
 +
 +```go-html-template
 +{{ $filters := slice  (images.GaussianBlur 6) (images.Pixelate 8) }}
 +{{ $image1 := $image1.Filter $filters }}
 +{{ $image2 := $image2.Filter $filters }}
 +```
 +
 +### Colors
 +
++{{< new-in 0.104.0 >}}
 +
 +`.Colors` returns a slice of hex strings with the dominant colors in the image using a simple histogram method.
 +
 +```go-html-template
 +{{ $colors := $image.Colors }}
 +```
 +
 +This method is fast, but if you also scale down your images, it would be good for performance to extract the colors from the scaled down image.
 +
- The [`Resize`], [`Fit`], [`Fill`], and [`Crop`] methods accept a space-separated, case-insensitive list of options. The order of the options within the list is irrelevant.
 +### EXIF
 +
 +Provides an [EXIF] object containing image metadata.
 +
 +You may access EXIF data in JPEG and TIFF images. To prevent errors when processing images without EXIF data, wrap the access in a [`with`] statement.
 +
 +```go-html-template
 +{{ with $image.Exif }}
 +  Date: {{ .Date }}
 +  Lat/Long: {{ .Lat }}/{{ .Long }}
 +  Tags:
 +  {{ range $k, $v := .Tags }}
 +    TAG: {{ $k }}: {{ $v }}
 +  {{ end }}
 +{{ end }}
 +```
 +
 +You may also access EXIF fields individually, using the [`lang.FormatNumber`] function to format the fields as needed.
 +
 +```go-html-template
 +{{ with $image.Exif }}
 +  <ul>
 +    {{ with .Date }}<li>Date: {{ .Format "January 02, 2006" }}</li>{{ end }}
 +    {{ with .Tags.ApertureValue }}<li>Aperture: {{ lang.FormatNumber 2 . }}</li>{{ end }}
 +    {{ with .Tags.BrightnessValue }}<li>Brightness: {{ lang.FormatNumber 2 . }}</li>{{ end }}
 +    {{ with .Tags.ExposureTime }}<li>Exposure Time: {{ . }}</li>{{ end }}
 +    {{ with .Tags.FNumber }}<li>F Number: {{ . }}</li>{{ end }}
 +    {{ with .Tags.FocalLength }}<li>Focal Length: {{ . }}</li>{{ end }}
 +    {{ with .Tags.ISOSpeedRatings }}<li>ISO Speed Ratings: {{ . }}</li>{{ end }}
 +    {{ with .Tags.LensModel }}<li>Lens Model: {{ . }}</li>{{ end }}
 +  </ul>
 +{{ end }}
 +```
 +
 +#### EXIF variables
 +
 +.Date
 +: Image creation date/time. Format with the [time.Format] function.
 +
 +.Lat
 +: GPS latitude in degrees.
 +
 +.Long
 +: GPS longitude in degrees.
 +
 +.Tags
 +: A collection of the available EXIF tags for this image. You may include or exclude specific tags from this collection in the [site configuration](#exif-data).
 +
 +## Image processing options
 +
- <!-- Specifies a libwebp preset, not a libwebp image hint. -->
++The [`Resize`], [`Fit`], [`Fill`], and [`Crop`] methods accept a space-delimited, case-insensitive list of options. The order of the options within the list is irrelevant.
 +
 +### Dimensions
 +
 +With the [`Resize`] method you must specify width, height, or both. The [`Fit`], [`Fill`], and [`Crop`] methods require both width and height. All dimensions are in pixels.
 +
 +```go-html-template
 +{{ $image := $image.Resize "600x" }}
 +{{ $image := $image.Resize "x400" }}
 +{{ $image := $image.Resize "600x400" }}
 +{{ $image := $image.Fit "600x400" }}
 +{{ $image := $image.Fill "600x400" }}
 +{{ $image := $image.Crop "600x400" }}
 +```
 +
 +### Rotation
 +
 +Rotates an image counter-clockwise by the given angle. Hugo performs rotation _before_ scaling. For example, if the original image is 600x400 and you wish to rotate the image 90 degrees counter-clockwise while scaling it by 50%:
 +
 +```go-html-template
 +{{ $image = $image.Resize "200x r90" }}
 +```
 +
 +In the example above, the width represents the desired width _after_ rotation.
 +
 +To rotate an image without scaling, use the dimensions of the original image:
 +
 +```go-html-template
 +{{ with .Resources.GetMatch "sunset.jpg" }}
 +  {{ with .Resize (printf "%dx%d r90" .Height .Width) }}
 +    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
 +  {{ end }}
 +{{ end }}
 +```
 +
 +In the example above, on the second line, we have reversed width and height to reflect the desired dimensions _after_ rotation.
 +
 +### Anchor
 +
 +When using the [`Crop`] or [`Fill`] method, the _anchor_ determines the placement of the crop box. You may specify `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`.
 +
 +The default value is `Smart`, which uses [Smartcrop] image analysis to determine the optimal placement of the crop box. You may override the default value in the [site configuration].
 +
 +For example, if you have a 400x200 image with a bird in the upper left quadrant, you can create a 200x100 thumbnail containing the bird:
 +
 +```go-html-template
 +{{ $image.Crop "200x100 TopLeft" }}
 +```
 +
 +If you apply [rotation](#rotation) when using the [`Crop`] or [`Fill`] method, specify the anchor relative to the rotated image.
 +
 +### Target format
 +
 +By default, Hugo encodes the image in the source format. You may convert the image to another format by specifying `bmp`, `gif`, `jpeg`, `jpg`, `png`, `tif`, `tiff`, or `webp`.
 +
 +```go-html-template
 +{{ $image.Resize "600x webp" }}
 +```
 +
 +To convert an image without scaling, use the dimensions of the original image:
 +
 +```go-html-template
 +{{ with .Resources.GetMatch "sunset.jpg" }}
 +  {{ with .Resize (printf "%dx%d webp" .Width .Height) }}
 +    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
 +  {{ end }}
 +{{ end }}
 +```
 +
 +### Quality
 +
 +Applicable to JPEG and WebP images, the `q` value determines the quality of the converted image. Higher values produce better quality images, while lower values produce smaller files. Set this value to a whole number between 1 and 100, inclusive.
 +
 +The default value is 75. You may override the default value in the [site configuration].
 +
 +```go-html-template
 +{{ $image.Resize "600x webp q50" }}
 +```
 +
 +### Hint
 +
- Applicable to WebP images, this option corresponds to a set of predefined encoding parameters.
++Applicable to WebP images, this option corresponds to a set of predefined encoding parameters, and is equivalent to the `-preset` flag for the [`cwebp`] encoder.
 +
- Use either a 3-digit or a 6-digit hexadecimal color code (e.g., `#00f` or `#0000ff`).
++[`cwebp`]: https://developers.google.com/speed/webp/docs/cwebp
 +
 +Value|Example
 +:--|:--
 +`drawing`|Hand or line drawing with high-contrast details
 +`icon`|Small colorful image
 +`photo`|Outdoor photograph with natural lighting
 +`picture`|Indoor photograph such as a portrait
 +`text`|Image that is primarily text
 +
 +The default value is `photo`. You may override the default value in the [site configuration].
 +
 +```go-html-template
 +{{ $image.Resize "600x webp picture" }}
 +```
 +
 +### Background color
 +
 +When converting an image from a format that supports transparency (e.g., PNG) to a format that does _not_ support transparency (e.g., JPEG), you may specify the background color of the resulting image.
 +
- {{< imgproc sunset Resize "300x" />}}
++Use either a 3-digit or 6-digit hexadecimal color code (e.g., `#00f` or `#0000ff`).
 +
 +The default value is `#ffffff` (white). You may override the default value in the [site configuration].
 +
 +```go-html-template
 +{{ $image.Resize "600x jpg #b31280" }}
 +```
 +
 +### Resampling filter
 +
 +You may specify the resampling filter used when resizing an image. Commonly used resampling filters include:
 +
 +Filter|Description
 +:--|:--
 +`Box`|Simple and fast averaging filter appropriate for downscaling
 +`Lanczos`|High-quality resampling filter for photographic images yielding sharp results
 +`CatmullRom`|Sharp cubic filter that is faster than the Lanczos filter while providing similar results
 +`MitchellNetravali`|Cubic filter that produces smoother results with less ringing artifacts than CatmullRom
 +`Linear`|Bilinear resampling filter, produces smooth output, faster than cubic filters
 +`NearestNeighbor`|Fastest resampling filter, no antialiasing
 +
 +The default value is `Box`. You may override the default value in the [site configuration].
 +
 +```go-html-template
 +{{ $image.Resize "600x400 Lanczos" }}
 +```
 +
 +See [github.com/disintegration/imaging] for the complete list of resampling filters. If you wish to improve image quality at the expense of performance, you may wish to experiment with the alternative filters.
 +
 +## Image processing examples
 +
 +_The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_
 +
- {{< imgproc sunset Fill "90x120 left" />}}
++{{< imgproc "sunset.jpg" "resize 300x" />}}
 +
- {{< imgproc sunset Fill "90x120 right" />}}
++{{< imgproc "sunset.jpg" "fill 90x120 left" />}}
 +
- {{< imgproc sunset Fit "90x90" />}}
++{{< imgproc "sunset.jpg" "fill 90x120 right" />}}
 +
- {{< imgproc sunset Crop "250x250 center" />}}
++{{< imgproc "sunset.jpg" "fit 90x90" />}}
 +
- {{< imgproc sunset Resize "300x q10" />}}
++{{< imgproc "sunset.jpg" "crop 250x250 center" />}}
 +
- {{< code file="layouts/shortcodes/imgproc.html" >}}
- {{< readfile file="layouts/shortcodes/imgproc.html" >}}
- {{< /code >}}
++{{< imgproc "sunset.jpg" "resize 300x q10" />}}
 +
 +This is the shortcode used to generate the examples above:
 +
- {{</* imgproc sunset Resize "300x" /*/>}}
++{{< readfile file=layouts/shortcodes/imgproc.html highlight=go-html-template >}}
 +
 +Call the shortcode from your Markdown like this:
 +
 +```go-html-template
- {{< code-toggle config="imaging" />}}
++{{</* imgproc "sunset.jpg" "resize 300x" /*/>}}
 +```
 +
 +{{% note %}}
 +Note the self-closing shortcode syntax above. You may call the `imgproc` shortcode with or without **inner content**.
 +{{% /note %}}
 +
 +## Imaging configuration
 +
 +### Processing options
 +
 +Define an `imaging` section in your site configuration to set the default [image processing options](#image-processing-options).
 +
- {{< code-toggle file="hugo" copy=true >}}
++{{< code-toggle config=imaging />}}
 +
 +anchor
 +: See image processing options: [anchor](#anchor).
 +
 +bgColor
 +: See image processing options: [background color](#background-color).
 +
 +hint
 +: See image processing options: [hint](#hint).
 +
 +quality
 +: See image processing options: [quality](#quality).
 +
 +resampleFilter
 +: See image processing options: [resampling filter](#resampling-filter).
 +
 +### EXIF data
 +
 +Define an `imaging.exif` section in your site configuration to control the availability of EXIF data.
 +
- To improve performance and decrease cache size, if you set neither `excludeFields` nor `includeFields`, Hugo excludes the following tags: `ColorSpace`, `Contrast`, `Exif`, `Exposure[M|P|B]`, `Flash`, `GPS`, `JPEG`, `Metering`, `Resolution`, `Saturation`, `Sensing`, `Sharp`, and `WhiteBalance`.
++{{< code-toggle file=hugo >}}
 +[imaging.exif]
 +includeFields = ""
 +excludeFields = ""
 +disableDate = false
 +disableLatLong = false
 +{{< /code-toggle >}}
 +
 +disableDate
 +: Hugo extracts the image creation date/time into `.Date`. Set this to `true` to disable. Default is `false`.
 +
 +disableLatLong
 +: Hugo extracts the GPS latitude and longitude into `.Lat` and `.Long`. Set this to `true` to disable. Default is `false`.
 +
 +excludeFields
 +: Regular expression matching the EXIF tags to exclude from the `.Tags` collection. Default is&nbsp;`""`.
 +
 +includeFields
 +: Regular expression matching the EXIF tags to include in the `.Tags` collection. Default is&nbsp;`""`. To include all available tags, set this value to&nbsp;`".*"`.
 +
 +{{% note %}}
- {{< imgproc sunset Fill "200x200 smart" />}}
++To improve performance and decrease cache size, Hugo excludes the following tags: `ColorSpace`, `Contrast`, `Exif`, `Exposure[M|P|B]`, `Flash`, `GPS`, `JPEG`, `Metering`, `Resolution`, `Saturation`, `Sensing`, `Sharp`, and `WhiteBalance`.
++
++To control tag availability, change the `excludeFields` or `includeFields` settings as described above.
 +{{% /note %}}
 +
 +## Smart cropping of images
 +
 +By default, Hugo uses the [Smartcrop] library when cropping images with the `Crop` or`Fill` methods. You can set the anchor point manually, but in most cases the `Smart` option will make a good choice.
 +
 +Examples using the sunset image from above:
 +
- {{< imgproc sunset Crop "200x200 smart" />}}
++{{< imgproc "sunset.jpg" "fill 200x200 smart" />}}
 +
- ```bash
++{{< imgproc "sunset.jpg" "crop 200x200 smart" />}}
 +
 +## Image processing performance consideration
 +
 +Hugo caches processed images in the `resources` directory. If you include this directory in source control, Hugo will not have to regenerate the images in a CI/CD workflow (e.g., GitHub Pages, GitLab Pages, Netlify, etc.). This results in faster builds.
 +
 +If you change image processing methods or options, or if you rename or remove images, the `resources` directory will contain unused images. To remove the unused images, perform garbage collection with:
 +
++```sh
 +hugo --gc
 +```
 +
 +[time.Format]: /functions/time/format
 +[`anchor`]: /content-management/image-processing#anchor
 +[mounted]: /hugo-modules/configuration#module-configuration-mounts
 +[page bundle]: /content-management/page-bundles
 +[`lang.FormatNumber`]: /functions/lang/formatnumber
 +[filters]: /functions/images
 +[github.com/disintegration/imaging]: <https://github.com/disintegration/imaging#image-resizing>
 +[Smartcrop]: <https://github.com/muesli/smartcrop#smartcrop>
 +[Exif]: <https://en.wikipedia.org/wiki/Exif>
 +[`Process`]: #process
 +[`Colors`]: #colors
 +[`Crop`]: #crop
 +[`Exif`]: #exif
 +[`Fill`]: #fill
 +[`Filter`]: #filter
 +[`Fit`]: #fit
 +[`Resize`]: #resize
 +[site configuration]: #processing-options
 +[`with`]: /functions/go-template/with/
index 07bf4166977f70de35e34745f318cd94f15d0b61,0000000000000000000000000000000000000000..e2a72f12434e4294124967a061b39957cc44cb99
mode 100644,000000..100644
--- /dev/null
@@@ -1,225 -1,0 +1,224 @@@
- toc: true
 +---
 +title: Menus
 +description:  Create menus by defining entries, localizing each entry, and rendering the resulting data structure.
 +categories: [content management]
 +keywords: [menus]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 190
- {{< code-toggle file="hugo" copy=false >}}
 +weight: 190
++toc: true
 +aliases: [/extras/menus/]
 +---
 +
 +## Overview
 +
 +To create a menu for your site:
 +
 +1. Define the menu entries
 +2. [Localize] each entry
 +3. 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.
 +
 +There are three ways to define menu entries:
 +
 +1. Automatically
 +1. In front matter
 +1. In site configuration
 +
 +{{% note %}}
 +Although you can use these methods in combination when defining a menu, the menu will be easier to conceptualize and maintain if you use one method throughout the site.
 +{{% /note %}}
 +
 +## Define automatically
 +
 +To automatically define menu entries for each top-level section of your site, enable the section pages menu in your site configuration.
 +
- {{< code-toggle file="content/about.md" copy=false fm=true >}}
++{{< code-toggle file=hugo >}}
 +sectionPagesMenu = "main"
 +{{< /code-toggle >}}
 +
 +This creates a menu structure that you can access with `site.Menus.main` in your templates. See [menu templates] for details.
 +
 +## Define in front matter
 +
 +To add a page to the "main" menu:
 +
- {{< code-toggle file="content/contact.md" copy=false fm=true >}}
++{{< code-toggle file=content/about.md fm=true >}}
 +title = 'About'
 +menu = 'main'
 +{{< /code-toggle >}}
 +
 +Access the entry with `site.Menus.main` in your templates. See [menu templates] for details.
 +
 +To add a page to the "main" and "footer" menus:
 +
- {{< code-toggle file="content/products/software.md" copy=false fm=true >}}
++{{< code-toggle file=content/contact.md fm=true >}}
 +title = 'Contact'
 +menu = ['main','footer']
 +{{< /code-toggle >}}
 +
 +Access the entry with `site.Menus.main` and `site.Menus.footer` in your templates. See [menu templates] for details.
 +
 +### Properties {#properties-front-matter}
 +
 +Use these properties when defining menu entries in front matter:
 +
 +identifier
 +: (`string`) Required when two or more menu entries have the same `name`, or when localizing the `name` using translation tables. Must start with a letter, followed by letters, digits, or underscores.
 +
 +name
 +: (`string`) The text to display when rendering the menu entry.
 +
 +params
 +: (`map`) User-defined properties for the menu entry.
 +
 +parent
 +: (`string`) The `identifier` of the parent menu entry. If `identifier` is not defined, use `name`. Required for child entries in a nested menu.
 +
 +post
 +: (`string`) The HTML to append when rendering the menu entry.
 +
 +pre
 +: (`string`) The HTML to prepend when rendering the menu entry.
 +
 +title
 +: (`string`) The HTML `title` attribute of the rendered menu entry.
 +
 +weight
 +: (`int`) A non-zero integer indicating the entry's position relative the root of the menu, or to its parent for a child entry. Lighter entries float to the top, while heavier entries sink to the bottom.
 +
 +### Example {#example-front-matter}
 +
 +This front matter menu entry demonstrates some of the available properties:
 +
++{{< code-toggle file=content/products/software.md fm=true >}}
 +title = 'Software'
 +[menu.main]
 +parent = 'Products'
 +weight = 20
 +pre = '<i class="fa-solid fa-code"></i>'
 +[menu.main.params]
 +class = 'center'
 +{{< /code-toggle >}}
 +
 +Access the entry with `site.Menus.main` in your templates. See [menu templates] for details.
 +
- {{< code-toggle file="hugo" copy=false >}}
 +## Define in site configuration
 +
 +To define entries for the "main" menu:
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle file=hugo >}}
 +[[menu.main]]
 +name = 'Home'
 +pageRef = '/'
 +weight = 10
 +
 +[[menu.main]]
 +name = 'Products'
 +pageRef = '/products'
 +weight = 20
 +
 +[[menu.main]]
 +name = 'Services'
 +pageRef = '/services'
 +weight = 30
 +{{< /code-toggle >}}
 +
 +This creates a menu structure that you can access with `site.Menus.main` in your templates. See [menu templates] for details.
 +
 +To define entries for the "footer" menu:
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle file=hugo >}}
 +[[menu.footer]]
 +name = 'Terms'
 +pageRef = '/terms'
 +weight = 10
 +
 +[[menu.footer]]
 +name = 'Privacy'
 +pageRef = '/privacy'
 +weight = 20
 +{{< /code-toggle >}}
 +
 +This creates a menu structure that you can access with `site.Menus.footer` in your templates. See [menu templates] for details.
 +
 +### Properties {#properties-site-configuration}
 +
 +{{% note %}}
 +The [properties available to entries defined in front matter] are also available to entries defined in site configuration.
 +
 +[properties available to entries defined in front matter]: /content-management/menus/#properties-front-matter
 +{{% /note %}}
 +
 +Each menu entry defined in site configuration requires two or more properties:
 +
 +- Specify `name` and `pageRef` for internal links
 +- Specify `name` and `url` for external links
 +
 +pageRef
 +: (`string`) The file path of the target page, relative to the `content` directory. Omit language code and file extension. Required for *internal* links.
 +
 +Kind|pageRef
 +:--|:--
 +home|`/`
 +page|`/books/book-1`
 +section|`/books`
 +taxonomy|`/tags`
 +term|`/tags/foo`
 +
 +url
 +: (`string`) Required for *external* links.
 +
 +### Example {#example-site-configuration}
 +
 +This nested menu demonstrates some of the available properties:
 +
++{{< code-toggle file=hugo >}}
 +[[menu.main]]
 +name = 'Products'
 +pageRef = '/products'
 +weight = 10
 +
 +[[menu.main]]
 +name = 'Hardware'
 +pageRef = '/products/hardware'
 +parent = 'Products'
 +weight = 1
 +
 +[[menu.main]]
 +name = 'Software'
 +pageRef = '/products/software'
 +parent = 'Products'
 +weight = 2
 +
 +[[menu.main]]
 +name = 'Services'
 +pageRef = '/services'
 +weight = 20
 +
 +[[menu.main]]
 +name = 'Hugo'
 +pre = '<i class="fa fa-heart"></i>'
 +url = 'https://gohugo.io/'
 +weight = 30
 +[menu.main.params]
 +rel = 'external'
 +{{< /code-toggle >}}
 +
 +This creates a menu structure that you can access with `site.Menus.main` in your templates. See [menu templates] for details.
 +
 +## Localize
 +
 +Hugo provides two methods to localize your menu entries. See [multilingual].
 +
 +## Render
 +
 +See [menu templates].
 +
 +[localize]: /content-management/multilingual/#menus
 +[menu templates]: /templates/menu-templates/
 +[multilingual]: /content-management/multilingual/#menus
 +[template]: /templates/menu-templates/
index 6e787c526dd1ad22d0fd45890c0a9bdd89ec5916,0000000000000000000000000000000000000000..07eecbaaffa74f2417372f7c175cf4d042d33306
mode 100644,000000..100644
--- /dev/null
@@@ -1,716 -1,0 +1,717 @@@
- keywords: [multilingual,i18n, internationalization]
 +---
 +title: Multilingual mode
 +linkTitle: Multilingual
 +description: Hugo supports the creation of websites with multiple languages side by side.
 +categories: [content management]
- toc: true
++keywords: [multilingual,i18n,internationalization]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 230
- {{< code-toggle config="languages" />}}
 +weight: 230
++toc: true
 +aliases: [/content/multilingual/,/tutorials/create-a-multilingual-site/]
 +---
 +
 +You should define the available languages in a `languages` section in your site configuration.
 +
 +Also See [Hugo Multilingual Part 1: Content translation].
 +
 +## Configure languages
 +
 +This is the default language configuration:
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle config=languages />}}
 +
 +This is an example of a site configuration for a multilingual project. Any key not defined in a `languages` object will fall back to the global value in the root of your site configuration.
 +
- `defaultContentLanguage`
++{{< code-toggle file=hugo >}}
 +defaultContentLanguage = 'de'
 +defaultContentLanguageInSubdir = true
 +
 +[languages.de]
 +contentDir = 'content/de'
 +disabled = false
 +languageCode = 'de-DE'
 +languageDirection = 'ltr'
 +languageName = 'Deutsch'
 +title = 'Projekt Dokumentation'
 +weight = 1
 +
 +[languages.de.params]
 +subtitle = 'Referenz, Tutorials und Erklärungen'
 +
 +[languages.en]
 +contentDir = 'content/en'
 +disabled = false
 +languageCode = 'en-US'
 +languageDirection = 'ltr'
 +languageName = 'English'
 +title = 'Project Documentation'
 +weight = 2
 +
 +[languages.en.params]
 +subtitle = 'Reference, Tutorials, and Explanations'
 +{{< /code-toggle >}}
 +
- `defaultContentLanguageInSubdir`
++defaultContentLanguage
 +: (`string`) The project's default language tag as defined by [RFC 5646]. Must be lower case, and must match one of the defined language keys. Default is `en`. Examples:
 +
 +- `en`
 +- `en-gb`
 +- `pt-br`
 +
- `contentDir`
++defaultContentLanguageInSubdir
 +: (`bool`)  If `true`, Hugo renders the default language site in a subdirectory matching the `defaultContentLanguage`. Default is `false`.
 +
- `disabled`
++contentDir
 +: (`string`) The content directory for this language. Omit if [translating by file name].
 +
- `languageCode`
++disabled
 +: (`bool`) If `true`, Hugo will not render content for this language. Default is `false`.
 +
- `languageDirection`
++languageCode
 +: (`string`) The language tag as defined by [RFC 5646]. This value may include upper and lower case characters, hyphens or underscores, and does not affect localization or URLs. Hugo uses this value to populate the `language` element in the [built-in RSS template], and the `lang` attribute of the `html` element in the [built-in alias template]. Examples:
 +
 +- `en`
 +- `en-GB`
 +- `pt-BR`
 +
- `languageName`
++languageDirection
 +: (`string`) The language direction, either left-to-right (`ltr`) or right-to-left (`rtl`). Use this value in your templates with the global [`dir`] HTML attribute.
 +
- `title`
++languageName
 +: (`string`) The language name, typically used when rendering a language switcher.
 +
- `weight`
++title
 +: (`string`) The language title. When set, this overrides the site title for this language.
 +
- {{< new-in "0.112.0" >}}
++weight
 +: (`int`) The language weight. When set to a non-zero value, this is the primary sort criteria for this language.
 +
 +[`dir`]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir
 +[built-in RSS template]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml
 +[built-in alias template]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/alias.html
 +[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646
 +[translating by file name]: #translation-by-file-name
 +
 +### Changes in Hugo 0.112.0
 +
- {{< code-toggle file=hugo copy=false >}}
++{{< new-in 0.112.0 >}}
 +
 +In Hugo `v0.112.0` we consolidated all configuration options, and improved how the languages and their parameters are merged with the main configuration. But while testing this on Hugo sites out there, we received some error reports and reverted some of the changes in favor of deprecation warnings:
 +
 +1. `site.Language.Params` is deprecated. Use `site.Params` directly.
 +1. Adding custom parameters to the top level language configuration is deprecated. Define custom parameters within `languages.xx.params`. See `color` in the example below.
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle file=hugo >}}
 +
 +title = "My blog"
 +languageCode = "en-us"
 +
 +[languages]
 +[languages.sv]
 +title = "Min blogg"
 +languageCode = "sv"
 +[languages.en.params]
 +color = "blue"
 +{{< /code-toggle >}}
 +
 +In the example above, all settings except `color` below `params` map to predefined configuration options in Hugo for the site and its language, and should be accessed via the documented accessors:
 +
 +```go-html-template
 +{{ site.Title }}
 +{{ site.LanguageCode }}
 +{{ site.Params.color }}
 +```
 +
 +### Disable a language
 +
 +To disable a language within a `languages` object in your site configuration:
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle file=hugo >}}
 +[languages.es]
 +disabled = true
 +{{< /code-toggle >}}
 +
 +To disable one or more languages in the root of your site configuration:
 +
- ```bash
++{{< code-toggle file=hugo >}}
 +disableLanguages = ["es", "fr"]
 +{{< /code-toggle >}}
 +
 +To disable one or more languages using an environment variable:
 +
- {{< code-toggle file="hugo" >}}
++```sh
 +HUGO_DISABLELANGUAGES="es fr" hugo
 +```
 +
 +Note that you cannot disable the default content language.
 +
 +### Configure multilingual multihost
 +
 +From **Hugo 0.31** we support multiple languages in a multihost configuration. See [this issue](https://github.com/gohugoio/hugo/issues/4027) for details.
 +
 +This means that you can now configure a `baseURL` per `language`:
 +
 +{{% note %}}
 +If a `baseURL` is set on the `language` level, then all languages must have one and they must all be different.
 +{{% /note %}}
 +
 +Example:
 +
- baseURL = "https://example.com"
++{{< code-toggle file=hugo >}}
 +[languages]
 +[languages.fr]
 +baseURL = "https://example.fr"
 +languageName = "Français"
 +weight = 1
 +title = "En Français"
 +
 +[languages.en]
- **All URLs (i.e `.Permalink` etc.) will be generated from that root. So the English home page above will have its `.Permalink` set to `https://example.com/`.**
++baseURL = "https://example.org/"
 +languageName = "English"
 +weight = 2
 +title = "In English"
 +{{</ code-toggle >}}
 +
 +With the above, the two sites will be generated into `public` with their own root:
 +
 +```text
 +public
 +├── en
 +└── fr
 +```
 +
- Web Server is available at 127.0.0.1:1313 (bind address 127.0.0.1)
- Web Server is available at 127.0.0.1:1314 (bind address 127.0.0.1)
++**All URLs (i.e `.Permalink` etc.) will be generated from that root. So the English home page above will have its `.Permalink` set to `https://example.org/`.**
 +
 +When you run `hugo server` we will start multiple HTTP servers. You will typically see something like this in the console:
 +
 +```text
- {{< code-toggle file="hugo" >}}
++Web Server is available at 127.0.0.1:1313 (bind address 127.0.0.1) fr
++Web Server is available at 127.0.0.1:1314 (bind address 127.0.0.1) en
 +Press Ctrl+C to stop
 +```
 +
 +Live reload and `--navigateToChanged` between the servers work as expected.
 +
 +## Translate your content
 +
 +There are two ways to manage your content translations. Both ensure each page is assigned a language and is linked to its counterpart translations.
 +
 +### Translation by file name
 +
 +Considering the following example:
 +
 +1. `/content/about.en.md`
 +2. `/content/about.fr.md`
 +
 +The first file is assigned the English language and is linked to the second.
 +The second file is assigned the French language and is linked to the first.
 +
 +Their language is __assigned__ according to the language code added as a __suffix to the file name__.
 +
 +By having the same **path and base file name**, the content pieces are __linked__ together as translated pages.
 +
 +{{% note %}}
 +If a file has no language code, it will be assigned the default language.
 +{{% /note %}}
 +
 +### Translation by content directory
 +
 +This system uses different content directories for each of the languages. Each language's content directory is set using the `contentDir` parameter.
 +
- {{< code-toggle file="content/about.fr.md" fm=true copy=false >}}
++{{< code-toggle file=hugo >}}
 +languages:
 +  en:
 +    weight: 10
 +    languageName: "English"
 +    contentDir: "content/english"
 +  fr:
 +    weight: 20
 +    languageName: "Français"
 +    contentDir: "content/french"
 +{{< /code-toggle >}}
 +
 +The value of `contentDir` can be any valid path -- even absolute path references. The only restriction is that the content directories cannot overlap.
 +
 +Considering the following example in conjunction with the configuration above:
 +
 +1. `/content/english/about.md`
 +2. `/content/french/about.md`
 +
 +The first file is assigned the English language and is linked to the second.
 +The second file is assigned the French language and is linked to the first.
 +
 +Their language is __assigned__ according to the content directory they are __placed__ in.
 +
 +By having the same **path and basename** (relative to their language content directory), the content pieces are __linked__ together as translated pages.
 +
 +### Bypassing default linking
 +
 +Any pages sharing the same `translationKey` set in front matter will be linked as translated pages regardless of basename or location.
 +
 +Considering the following example:
 +
 +1. `/content/about-us.en.md`
 +2. `/content/om.nn.md`
 +3. `/content/presentation/a-propos.fr.md`
 +
 +{{< code-toggle >}}
 +translationKey: "about"
 +{{< /code-toggle >}}
 +
 +By setting the `translationKey` front matter parameter to `about` in all three pages, they will be __linked__ as translated pages.
 +
 +### Localizing permalinks
 +
 +Because paths and file names are used to handle linking, all translated pages will share the same URL (apart from the language subdirectory).
 +
 +To localize URLs:
 +
 +- For a regular page, set either [`slug`] or [`url`] in front matter
 +- For a section page, set [`url`] in front matter
 +
 +[`slug`]: /content-management/urls/#slug
 +[`url`]: /content-management/urls/#url
 +
 +For example, a French translation can have its own localized slug.
 +
- {{< code file="layouts/partials/i18nlist.html" >}}
++{{< code-toggle file=content/about.fr.md fm=true >}}
 +title: A Propos
 +slug: "a-propos"
 +{{< /code-toggle >}}
 +
 +At render, Hugo will build both `/about/` and `/fr/a-propos/` without affecting the translation link.
 +
 +### Page bundles
 +
 +To avoid the burden of having to duplicate files, each Page Bundle inherits the resources of its linked translated pages' bundles except for the content files (Markdown files, HTML files etc...).
 +
 +Therefore, from within a template, the page will have access to the files from all linked pages' bundles.
 +
 +If, across the linked bundles, two or more files share the same basename, only one will be included and chosen as follows:
 +
 +* File from current language bundle, if present.
 +* First file found across bundles by order of language `Weight`.
 +
 +{{% note %}}
 +Page Bundle resources follow the same language assignment logic as content files, both by file name (`image.jpg`, `image.fr.jpg`) and by directory (`english/about/header.jpg`, `french/about/header.jpg`).
 +{{%/ note %}}
 +
 +## Reference translated content
 +
 +To create a list of links to translated content, use a template similar to the following:
 +
-     <a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a>
++{{< code file=layouts/partials/i18nlist.html >}}
 +{{ if .IsTranslated }}
 +<h4>{{ i18n "translations" }}</h4>
 +<ul>
 +  {{ range .Translations }}
 +  <li>
- {{< code file="layouts/partials/allLanguages.html" >}}
++    <a href="{{ .RelPermalink }}">{{ .Lang }}: {{ .LinkTitle }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a>
 +  </li>
 +  {{ end }}
 +</ul>
 +{{ end }}
 +{{< /code >}}
 +
 +The above can be put in a `partial` (i.e., inside `layouts/partials/`) and included in any template, whether a [single content page][contenttemplate] or the [homepage]. It will not print anything if there are no translations for a given page.
 +
 +The above also uses the [`i18n` function][i18func] described in the next section.
 +
 +### List all available languages
 +
 +`.AllTranslations` on a `Page` can be used to list all translations, including the page itself. On the home page it can be used to build a language navigator:
 +
- <li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
++{{< code file=layouts/partials/allLanguages.html >}}
 +<ul>
 +{{ range $.Site.Home.AllTranslations }}
- From within your templates, use the `i18n` function like this:
++<li><a href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
 +{{ end }}
 +</ul>
 +{{< /code >}}
 +
 +## Translation of strings
 +
 +Hugo uses [go-i18n] to support string translations. [See the project's source repository][go-i18n-source] to find tools that will help you manage your translation workflows.
 +
 +Translations are collected from the `themes/<THEME>/i18n/` folder (built into the theme), as well as translations present in `i18n/` at the root of your project. In the `i18n`, the translations will be merged and take precedence over what is in the theme folder. Language files should be named according to [RFC 5646] with names such as `en-US.toml`, `fr.toml`, etc.
 +
 +Artificial languages with private use subtags as defined in [RFC 5646 &#167; 2.2.7](https://datatracker.ietf.org/doc/html/rfc5646#section-2.2.7) are also supported. You may omit the `art-x-` prefix for brevity. For example:
 +
 +```text
 +art-x-hugolang
 +hugolang
 +```
 +
 +Private use subtags must not exceed 8 alphanumeric characters.
 +
 +### Query basic translation
 +
- {{< code-toggle file="i18n/en-US" >}}
++From within your templates, use the [`i18n`] function like this:
++
++[`i18n`]: /functions/lang/translate
 +
 +```go-html-template
 +{{ i18n "home" }}
 +```
 +
 +The function will search for the `"home"` id:
 +
- {{< code-toggle file="i18n/en-US" >}}
++{{< code-toggle file=i18n/en-US >}}
 +[home]
 +other = "Home"
 +{{< /code-toggle >}}
 +
 +The result will be
 +
 +```text
 +Home
 +```
 +
 +### Query a flexible translation with variables
 +
 +Often you will want to use the page variables in the translation strings. To do so, pass the `.` context when calling `i18n`:
 +
 +```go-html-template
 +{{ i18n "wordCount" . }}
 +```
 +
 +The function will pass the `.` context to the `"wordCount"` id:
 +
- {{< code-toggle file="i18n/en-US" >}}
++{{< code-toggle file=i18n/en-US >}}
 +[wordCount]
 +other = "This article has {{ .WordCount }} words."
 +{{< /code-toggle >}}
 +
 +Assume `.WordCount` in the context has value is 101. The result will be:
 +
 +```text
 +This article has 101 words.
 +```
 +
 +### Query a singular/plural translation
 +
 +To enable pluralization when translating, pass a map with a numeric `.Count` property to the `i18n` function. The example below uses `.ReadingTime` variable which has a built-in `.Count` property.
 +
 +```go-html-template
 +{{ i18n "readingTime" .ReadingTime }}
 +```
 +
 +The function will read `.Count` from `.ReadingTime` and evaluate whether the number is singular (`one`) or plural (`other`). After that, it will pass to `readingTime` id in `i18n/en-US.toml` file:
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle file=i18n/en-US >}}
 +[readingTime]
 +one = "One minute to read"
 +other = "{{ .Count }} minutes to read"
 +{{< /code-toggle >}}
 +
 +Assuming `.ReadingTime.Count` in the context has value is 525600. The result will be:
 +
 +```text
 +525600 minutes to read
 +```
 +
 +If `.ReadingTime.Count` in the context has value is 1. The result is:
 +
 +```text
 +One minute to read
 +```
 +
 +In case you need to pass a custom data: (`(dict "Count" numeric_value_only)` is minimum requirement)
 +
 +```go-html-template
 +{{ i18n "readingTime" (dict "Count" 25 "FirstArgument" true "SecondArgument" false "Etc" "so on, so far") }}
 +```
 +
 +## Localization
 +
 +The following localization examples assume your site's primary language is English, with translations to French and German.
 +
- - When you define menu entries [in site configuration], you must create language-specific menu entries under each language key. If the names of the menu entries are insufficent, use translation tables to localize each entry.
++{{< code-toggle file=hugo >}}
 +defaultContentLanguage = 'en'
 +
 +[languages]
 +[languages.en]
 +contentDir = 'content/en'
 +languageName = 'English'
 +weight = 1
 +[languages.fr]
 +contentDir = 'content/fr'
 +languageName = 'Français'
 +weight = 2
 +[languages.de]
 +contentDir = 'content/de'
 +languageName = 'Deutsch'
 +weight = 3
 +
 +{{< /code-toggle >}}
 +
 +### Dates
 +
 +With this front matter:
 +
 +{{< code-toggle >}}
 +date = 2021-11-03T12:34:56+01:00
 +{{< /code-toggle >}}
 +
 +And this template code:
 +
 +```go-html-template
 +{{ .Date | time.Format ":date_full" }}
 +```
 +
 +The rendered page displays:
 +
 +Language|Value
 +:--|:--
 +English|Wednesday, November 3, 2021
 +Français|mercredi 3 novembre 2021
 +Deutsch|Mittwoch, 3. November 2021
 +
 +See [`time.Format`] for details.
 +
 +### Currency
 +
 +With this template code:
 +
 +```go-html-template
 +{{ 512.5032 | lang.FormatCurrency 2 "USD" }}
 +```
 +
 +The rendered page displays:
 +
 +Language|Value
 +:--|:--
 +English|$512.50
 +Français|512,50 $US
 +Deutsch|512,50 $
 +
 +See [lang.FormatCurrency] and [lang.FormatAccounting] for details.
 +
 +### Numbers
 +
 +With this template code:
 +
 +```go-html-template
 +{{ 512.5032 | lang.FormatNumber 2 }}
 +```
 +
 +The rendered page displays:
 +
 +Language|Value
 +:--|:--
 +English|512.50
 +Français|512,50
 +Deutsch|512,50
 +
 +See [lang.FormatNumber] and [lang.FormatNumberCustom] for details.
 +
 +### Percentages
 +
 +With this template code:
 +
 +```go-html-template
 +{{ 512.5032 | lang.FormatPercent 2 }}
 +```
 +
 +The rendered page displays:
 +
 +Language|Value
 +:--|:--
 +English|512.50%
 +Français|512,50 %
 +Deutsch|512,50 %
 +
 +See [lang.FormatPercent] for details.
 +
 +## Menus
 +
 +Localization of menu entries depends on how you define them:
 +
 +- When you define menu entries [automatically] using the section pages menu, you must use translation tables to localize each entry.
 +- When you define menu entries [in front matter], they are already localized based on the front matter itself. If the front matter values are insufficient, use translation tables to localize each entry.
- {{< code-toggle file="hugo" copy=false >}}
++- When you define menu entries [in site configuration], you must create language-specific menu entries under each language key. If the names of the menu entries are insufficient, use translation tables to localize each entry.
 +
 +### Create language-specific menu entries
 +
 +#### Method 1 -- Use a single configuration file
 +
 +For a simple menu with a small number of entries, use a single configuration file. For example:
 +
- {{< code-toggle file="config/_default/menus/menu.de" copy=false >}}
++{{< code-toggle file=hugo >}}
 +[languages.de]
 +languageCode = 'de-DE'
 +languageName = 'Deutsch'
 +weight = 1
 +
 +[[languages.de.menu.main]]
 +name = 'Produkte'
 +pageRef = '/products'
 +weight = 10
 +
 +[[languages.de.menu.main]]
 +name = 'Leistungen'
 +pageRef = '/services'
 +weight = 20
 +
 +[languages.en]
 +languageCode = 'en-US'
 +languageName = 'English'
 +weight = 2
 +
 +[[languages.en.menu.main]]
 +name = 'Products'
 +pageRef = '/products'
 +weight = 10
 +
 +[[languages.en.menu.main]]
 +name = 'Services'
 +pageRef = '/services'
 +weight = 20
 +{{< /code-toggle >}}
 +
 +#### Method 2 -- Use a configuration directory
 +
 +With a more complex menu structure, create a [configuration directory] and split the menu entries into multiple files, one file per language. For example:
 +
 +```text
 +config/
 +└── _default/
 +    ├── menus/
 +    │  ├── menu.de.toml
 +    │  └── menu.en.toml
 +    └── hugo.toml
 +```
 +
- {{< code-toggle file="config/_default/menus/menu.en" copy=false >}}
++{{< code-toggle file=config/_default/menus/menu.de >}}
 +[[main]]
 +name = 'Produkte'
 +pageRef = '/products'
 +weight = 10
 +[[main]]
 +name = 'Leistungen'
 +pageRef = '/services'
 +weight = 20
 +{{< /code-toggle >}}
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle file=config/_default/menus/menu.en >}}
 +[[main]]
 +name = 'Products'
 +pageRef = '/products'
 +weight = 10
 +[[main]]
 +name = 'Services'
 +pageRef = '/services'
 +weight = 20
 +{{< /code-toggle >}}
 +
 +[configuration directory]: /getting-started/configuration/#configuration-directory
 +
 +### Use translation tables
 +
 +When rendering the text that appears in menu each entry, the [example menu template] does this:
 +
 +```go-html-template
 +{{ or (T .Identifier) .Name | safeHTML }}
 +```
 +
 +It queries the translation table for the current language using the menu entry's `identifier` and returns the translated string. If the translation table does not exist, or if the `identifier` key is not present in the translation table, it falls back to `name`.
 +
 +The `identifier` depends on how you define menu entries:
 +
 +- If you define the menu entry [automatically] using the section pages menu, the `identifier` is the page's `.Section`.
 +- If you define the menu entry [in site configuration] or [in front matter], set the `identifier` property to the desired value.
 +
 +For example, if you define menu entries in site configuration:
 +
- {{< code-toggle file="i18n/de" copy=false >}}
++{{< code-toggle file=hugo >}}
 +[[menu.main]]
 +  identifier = 'products'
 +  name = 'Products'
 +  pageRef = '/products'
 +  weight = 10
 +[[menu.main]]
 +  identifier = 'services'
 +  name = 'Services'
 +  pageRef = '/services'
 +  weight = 20
 +{{< / code-toggle >}}
 +
 +Create corresponding entries in the translation tables:
 +
- ```bash
++{{< code-toggle file=i18n/de >}}
 +products = 'Produkte'
 +services = 'Leistungen'
 +{{< / code-toggle >}}
 +
 +[example menu template]: /templates/menu-templates/#example
 +[automatically]: /content-management/menus/#define-automatically
 +[in front matter]: /content-management/menus/#define-in-front-matter
 +[in site configuration]: /content-management/menus/#define-in-site-configuration
 +
 +## Missing translations
 +
 +If a string does not have a translation for the current language, Hugo will use the value from the default language. If no default value is set, an empty string will be shown.
 +
 +While translating a Hugo website, it can be handy to have a visual indicator of missing translations. The [`enableMissingTranslationPlaceholders` configuration option][config] will flag all untranslated strings with the placeholder `[i18n] identifier`, where `identifier` is the id of the missing translation.
 +
 +{{% note %}}
 +Hugo will generate your website with these missing translation placeholders. It might not be suitable for production environments.
 +{{% /note %}}
 +
 +For merging of content from other languages (i.e. missing content translations), see [lang.Merge].
 +
 +To track down missing translation strings, run Hugo with the `--printI18nWarnings` flag:
 +
++```sh
 +hugo --printI18nWarnings | grep i18n
 +i18n|MISSING_TRANSLATION|en|wordCount
 +```
 +
 +## Multilingual themes support
 +
 +To support Multilingual mode in your themes, some considerations must be taken for the URLs in the templates. If there is more than one language, URLs must meet the following criteria:
 +
 +* Come from the built-in `.Permalink` or `.RelPermalink`
 +* Be constructed with the [`relLangURL`] or [`absLangURL`] template function, or be prefixed with `{{ .LanguagePrefix }}`
 +
 +If there is more than one language defined, the `LanguagePrefix` variable will equal `/en` (or whatever your `CurrentLanguage` is). If not enabled, it will be an empty string (and is therefore harmless for single-language Hugo websites).
 +
- ```text
 +## Generate multilingual content with `hugo new content`
 +
 +If you organize content with translations in the same directory:
 +
- ```text
++```sh
 +hugo new content post/test.en.md
 +hugo new content post/test.de.md
 +```
 +
 +If you organize content with translations in different directories:
 +
++```sh
 +hugo new content content/en/post/test.md
 +hugo new content content/de/post/test.md
 +```
 +
 +[`abslangurl`]: /functions/urls/abslangurl
 +[config]: /getting-started/configuration/
 +[contenttemplate]: /templates/single-page-templates/
 +[go-i18n-source]: https://github.com/nicksnyder/go-i18n
 +[go-i18n]: https://github.com/nicksnyder/go-i18n
 +[homepage]: /templates/homepage/
 +[Hugo Multilingual Part 1: Content translation]: https://regisphilibert.com/blog/2018/08/hugo-multilingual-part-1-managing-content-translation/
 +[i18func]: /functions/lang/translate
 +[lang.FormatAccounting]: /functions/lang/formataccounting
 +[lang.FormatCurrency]: /functions/lang/formatcurrency
 +[lang.FormatNumber]: /functions/lang/formatnumber
 +[lang.FormatNumberCustom]: /functions/lang/formatnumbercustom
 +[lang.FormatPercent]: /functions/lang/formatpercent
 +[lang.Merge]: /functions/lang/merge/
 +[menus]: /content-management/menus/
 +[OS environment]: /getting-started/configuration/#configure-with-environment-variables
 +[`rellangurl`]: /functions/urls/rellangurl
 +[RFC 5646]: https://tools.ietf.org/html/rfc5646
 +[single page templates]: /templates/single-page-templates/
 +[`time.Format`]: /functions/time/format
index 2c0d2e60432fe5061db4a0cb47891271900c48cd,0000000000000000000000000000000000000000..22b341fcf04a213d3aa32802ed4461e76edecdeb
mode 100644,000000..100644
--- /dev/null
@@@ -1,161 -1,0 +1,154 @@@
- categories: [fundamentals,content management]
 +---
 +title: Content organization
 +linkTitle: Organization
 +description: Hugo assumes that the same structure that works to organize your source content is used to organize the rendered site.
- toc: true
++categories: [content management,fundamentals]
 +keywords: [sections,content,organization,bundle,resources]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 20
- {{< imgproc 1-featured Resize "300x" >}}
 +weight: 20
++toc: true
 +aliases: [/content/sections/]
 +---
 +
 +## Page bundles
 +
 +Hugo `0.32` announced page-relative images and other resources packaged into `Page Bundles`.
 +
 +These terms are connected, and you also need to read about [Page Resources](/content-management/page-resources) and [Image Processing](/content-management/image-processing) to get the full picture.
 +
++{{< imgproc "1-featured-content-bundles.png" "resize 300x" >}}
 +The illustration shows three bundles. Note that the home page bundle cannot contain other content pages, although other files (images etc.) are allowed.
 +{{< /imgproc >}}
 +
 +{{% note %}}
 +The bundle documentation is a **work in progress**. We will publish more comprehensive docs about this soon.
 +{{% /note %}}
 +
-     |   └── index.md  // <- https://example.com/about/
 +## Organization of content source
 +
 +In Hugo, your content should be organized in a manner that reflects the rendered website.
 +
 +While Hugo supports content nested at any level, the top levels (i.e. `content/<DIRECTORIES>`) are special in Hugo and are considered the content type used to determine layouts etc. To read more about sections, including how to nest them, see [sections].
 +
 +Without any additional configuration, the following will automatically work:
 +
 +```txt
 +.
 +└── content
 +    └── about
-     |   ├── firstpost.md   // <- https://example.com/posts/firstpost/
++    |   └── index.md  // <- https://example.org/about/
 +    ├── posts
-     |   |   └── ness.md  // <- https://example.com/posts/happy/ness/
-     |   └── secondpost.md  // <- https://example.com/posts/secondpost/
++    |   ├── firstpost.md   // <- https://example.org/posts/firstpost/
 +    |   ├── happy
-         ├── first.md       // <- https://example.com/quote/first/
-         └── second.md      // <- https://example.com/quote/second/
++    |   |   └── ness.md  // <- https://example.org/posts/happy/ness/
++    |   └── secondpost.md  // <- https://example.org/posts/secondpost/
 +    └── quote
- The following demonstrates the relationships between your content organization and the output URL structure for your Hugo website when it renders. These examples assume you are [using pretty URLs][pretty], which is the default behavior for Hugo. The examples also assume a key-value of `baseURL = "https://example.com"` in your [site's configuration file][config].
++        ├── first.md       // <- https://example.org/quote/first/
++        └── second.md      // <- https://example.org/quote/second/
 +```
 +
 +## Path breakdown in Hugo
 +
- **Tip:** You can get a reference to the content and metadata in `_index.md` using the [`.Site.GetPage` function](/functions/getpage/).
++The following demonstrates the relationships between your content organization and the output URL structure for your Hugo website when it renders. These examples assume you are [using pretty URLs][pretty], which is the default behavior for Hugo. The examples also assume a key-value of `baseURL = "https://example.org"` in your [site's configuration file][config].
 +
 +### Index pages: `_index.md`
 +
 +`_index.md` has a special role in Hugo. It allows you to add front matter and content to your [list templates][lists]. These templates include those for [section templates], [taxonomy templates], [taxonomy terms templates], and your [homepage template].
 +
 +{{% note %}}
++**Tip:** You can get a reference to the content and metadata in `_index.md` using the [`.Site.GetPage` function](/methods/page/getpage).
 +{{% /note %}}
 +
 +You can create one `_index.md` for your homepage and one in each of your content sections, taxonomies, and taxonomy terms. The following shows typical placement of an `_index.md` that would contain content and front matter for a `posts` section list page on a Hugo website:
 +
- https://example.com/posts/index.html
 +```txt
 +.         url
 +.       ⊢--^-⊣
 +.        path    slug
 +.       ⊢--^-⊣⊢---^---⊣
 +.           filepath
 +.       ⊢------^------⊣
 +content/posts/_index.md
 +```
 +
 +At build, this will output to the following destination with the associated values:
 +
 +```txt
 +
 +                     url ("/posts/")
 +                    ⊢-^-⊣
 +       baseurl      section ("posts")
 +⊢--------^---------⊣⊢-^-⊣
 +        permalink
 +⊢----------^-------------⊣
++https://example.org/posts/index.html
 +```
 +
 +The [sections] can be nested as deeply as you want. The important thing to understand is that to make the section tree fully navigational, at least the lower-most section must include a content file. (i.e. `_index.md`).
 +
 +### Single pages in sections
 +
 +Single content files in each of your sections will be rendered as [single page templates][singles]. Here is an example of a single `post` within `posts`:
 +
- https://example.com/posts/my-first-hugo-post/index.html
 +```txt
 +                   path ("posts/my-first-hugo-post.md")
 +.       ⊢-----------^------------⊣
 +.      section        slug
 +.       ⊢-^-⊣⊢--------^----------⊣
 +content/posts/my-first-hugo-post.md
 +```
 +
 +When Hugo builds your site, the content will be output to the following destination:
 +
 +```txt
 +
 +                               url ("/posts/my-first-hugo-post/")
 +                   ⊢------------^----------⊣
 +       baseurl     section     slug
 +⊢--------^--------⊣⊢-^--⊣⊢-------^---------⊣
 +                 permalink
 +⊢--------------------^---------------------⊣
++https://example.org/posts/my-first-hugo-post/index.html
 +```
 +
- [getpage]: /functions/getpage/
 +## Paths explained
 +
 +The following concepts provide more insight into the relationship between your project's organization and the default Hugo behavior when building output for the website.
 +
 +### `section`
 +
 +A default content type is determined by the section in which a content item is stored. `section` is determined by the location within the project's `content` directory. `section` *cannot* be specified or overridden in front matter.
 +
 +### `slug`
 +
 +The `slug` is the last segment of the URL path, defined by the file name and optionally overridden by a `slug` value in front matter. See [URL Management](/content-management/urls/#slug) for details.
 +
 +### `path`
 +
 +A content's `path` is determined by the section's path to the file. The file `path`
 +
 +* is based on the path to the content's location AND
 +* does not include the slug
 +
 +### `url`
 +
 +The `url` is the entire URL path, defined by the file path and optionally overridden by a `url` value in front matter. See [URL Management](/content-management/urls/#slug) for details.
 +
 +[config]: /getting-started/configuration/
 +[formats]: /content-management/formats/
 +[front matter]: /content-management/front-matter/
++[getpage]: /methods/page/getpage
 +[homepage template]: /templates/homepage/
 +[homepage]: /templates/homepage/
 +[lists]: /templates/lists/
 +[pretty]: /content-management/urls/#appearance
 +[section templates]: /templates/section-templates/
 +[sections]: /content-management/sections/
 +[singles]: /templates/single-page-templates/
 +[taxonomy templates]: /templates/taxonomy-templates/
 +[taxonomy terms templates]: /templates/taxonomy-templates/
 +[types]: /content-management/types/
 +[urls]: /content-management/urls/
index c4ce69f5f1b3031ec5871d0be9879157162b9db0,0000000000000000000000000000000000000000..860fff2bbd9a6b48b60aba07cc4d24688d7bdca1
mode 100644,000000..100644
--- /dev/null
@@@ -1,185 -1,0 +1,183 @@@
- keywords: [page, bundle, leaf, branch]
 +---
 +title: Page bundles
 +description: Content organization using Page Bundles
- toc: true
 +categories: [content management]
++keywords: [page,bundle,leaf,branch]
 +menu :
 +  docs:
 +    parent: content-management
 +    weight: 30
- │       └── index.md
 +weight: 30
++toc: true
 +---
 +
 +Page Bundles are a way to group [Page Resources](/content-management/page-resources/).
 +
 +A Page Bundle can be one of:
 +
 +- Leaf Bundle (leaf means it has no children)
 +- Branch Bundle (home page, section, taxonomy terms, taxonomy list)
 +
 +|                                     | Leaf Bundle                                              | Branch Bundle                                                                                                                                                                                                      |
 +|-------------------------------------|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 +| Usage                               | Collection of content and attachments for single pages   | Collection of attachments for section pages (home page, section, taxonomy terms, taxonomy list)                                                                                                                    |
 +| Index file name                      | `index.md` [^fn:1]                                       | `_index.md` [^fn:1]                                                                                                                                                                                                |
 +| Allowed Resources                   | Page and non-page (like images, PDF, etc.) types         | Only non-page (like images, PDF, etc.) types                                                                                                                                                                       |
 +| Where can the Resources live?       | At any directory level within the leaf bundle directory. | Only in the directory level **of** the branch bundle directory i.e. the directory containing the `_index.md` ([ref](https://discourse.gohugo.io/t/question-about-content-folder-structure/11822/4?u=kaushalmodi)). |
 +| Layout type                         | [`single`](/templates/single-page-templates/)            | [`list`](/templates/lists)                                                                                                                                                                                         |
 +| Nesting                             | Does not allow nesting of more bundles under it          | Allows nesting of leaf or branch bundles under it                                                                                                                                                                  |
 +| Example                             | `content/posts/my-post/index.md`                         | `content/posts/_index.md`                                                                                                                                                                                          |
 +| Content from non-index page files...| Accessed only as page resources                          | Accessed only as regular pages                                                                                                                                                                                     |
 +
 +## Leaf bundles
 +
 +A _Leaf Bundle_ is a directory at any hierarchy within the `content/`
 +directory, that contains an **`index.md`** file.
 +
 +### Examples of leaf bundle organization {#examples-of-leaf-bundle-organization}
 +
 +```text
 +content/
 +├── about
 +│   ├── index.md
 +├── posts
 +│   ├── my-post
 +│   │   ├── content1.md
 +│   │   ├── content2.md
 +│   │   ├── image1.jpg
 +│   │   ├── image2.png
 +│   │   └── index.md
 +│   └── my-other-post
-     └── not-a-leaf-bundle
++│       └── index.md
 +│
 +└── another-section
 +    ├── ..
-         └── another-leaf-bundle
-             └── index.md
++    └── not-a-leaf-bundle
 +        ├── ..
- `about`
++        └── another-leaf-bundle
++            └── index.md
 +```
 +
 +In the above example `content/` directory, there are four leaf
 +bundles:
 +
- `my-post`
++about
 +: This leaf bundle is at the root level (directly under
 +    `content` directory) and has only the `index.md`.
 +
- `my-other-post`
++my-post
 +: This leaf bundle has the `index.md`, two other content
 +    Markdown files and two image files.
 +
 +- image1, image2:
 +These images are page resources of `my-post`
 +    and only available in `my-post/index.md` resources.
 +
 +- content1, content2:
 +These content files are page resources of `my-post`
 +    and only available in `my-post/index.md` resources.
 +    They will **not** be rendered as individual pages.
 +
- `another-leaf-bundle`
++my-other-post
 +: This leaf bundle has only the `index.md`.
 +
++another-leaf-bundle
 +: This leaf bundle is nested under couple of
 +    directories. This bundle also has only the `index.md`.
 +
 +{{% note %}}
 +The hierarchy depth at which a leaf bundle is created does not matter,
 +as long as it is not inside another **leaf** bundle.
 +{{% /note %}}
 +
- {{< code-toggle file="content/headless/index.md" fm=true copy=false >}}
 +### Headless bundle
 +
 +A headless bundle is a bundle that is configured to not get published
 +anywhere:
 +
 +- It will have no `Permalink` and no rendered HTML in `public/`.
 +- It will not be part of `.Site.RegularPages`, etc.
 +
 +But you can get it by `.Site.GetPage`. Here is an example:
 +
 +```go-html-template
 +{{ $headless := .Site.GetPage "/some-headless-bundle" }}
 +{{ $reusablePages := $headless.Resources.Match "author*" }}
 +<h2>Authors</h2>
 +{{ range $reusablePages }}
 +    <h3>{{ .Title }}</h3>
 +    {{ .Content }}
 +{{ end }}
 +```
 +
 +_In this example, we are assuming the `some-headless-bundle` to be a headless
 +   bundle containing one or more **page** resources whose `.Name` matches
 +   `"author*"`._
 +
 +Explanation of the above example:
 +
 +1. Get the `some-headless-bundle` Page "object".
 +2. Collect a _slice_ of resources in this _Page Bundle_ that matches
 +   `"author*"` using `.Resources.Match`.
 +3. Loop through that _slice_ of nested pages, and output their `.Title` and
 +   `.Content`.
 +
 +---
 +
 +A leaf bundle can be made headless by adding below in the front matter
 +(in the `index.md`):
 +
++{{< code-toggle file=content/headless/index.md fm=true >}}
 +headless = true
 +{{< /code-toggle >}}
 +
 +There are many use cases of such headless page bundles:
 +
 +- Shared media galleries
 +- Reusable page content "snippets"
 +
 +## Branch bundles
 +
 +A _Branch Bundle_ is any directory at any hierarchy within the
 +`content/` directory, that contains at least an **`_index.md`** file.
 +
 +This `_index.md` can also be directly under the `content/` directory.
 +
 +{{% note %}}
 +Here `md` (markdown) is used just as an example. You can use any file
 +type as a content resource as long as it is a content type recognized by Hugo.
 +{{% /note %}}
 +
- │   ├── branch-content1.md
- │   ├── branch-content2.md
- │   ├── image1.jpg
- │   ├── image2.png
- │   └── _index.md
 +### Examples of branch bundle organization
 +
 +```text
 +content/
 +├── branch-bundle-1
- `branch-bundle-1`
++│   ├── branch-content1.md
++│   ├── branch-content2.md
++│   ├── image1.jpg
++│   ├── image2.png
++│   └── _index.md
 +└── branch-bundle-2
 +    ├── _index.md
 +    └── a-leaf-bundle
 +        └── index.md
 +```
 +
 +In the above example `content/` directory, there are two branch
 +bundles (and a leaf bundle):
 +
- `branch-bundle-2`
++branch-bundle-1
 +: This branch bundle has the `_index.md`, two
 +    other content Markdown files and two image files.
 +
++branch-bundle-2
 +: This branch bundle has the `_index.md` and a
 +    nested leaf bundle.
 +
 +{{% note %}}
 +The hierarchy depth at which a branch bundle is created does not
 +matter.
 +{{% /note %}}
 +
 +[^fn:1]: The `.md` extension is just an example. The extension can be `.html`, `.json` or any valid MIME type.
index bbf28845996ba6bf35a0cd04268e0c4133c92491,0000000000000000000000000000000000000000..f141510bb5cc5497ec35b0150e8547846cba536f
mode 100644,000000..100644
--- /dev/null
@@@ -1,203 -1,0 +1,203 @@@
- toc: true
 +---
 +title: Page resources
 +description: Page resources -- images, other pages, documents, etc. -- have page-relative URLs and their own metadata.
 +categories: [content management]
 +keywords: [bundle,content,resources]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 80
 +weight: 80
++toc: true
 +---
 +Page resources are only accessible from [page bundles](/content-management/page-bundles), those directories with `index.md` or
 +`_index.md` files at their root. Page resources are only available to the
 +page with which they are bundled.
 +
 +In this example, `first-post` is a page bundle with access to 10 page resources including audio, data, documents, images, and video. Although `second-post` is also a page bundle, it has no page resources and is unable to directly access the page resources associated with `first-post`.
 +
 +```text
 +content
 +└── post
 +    ├── first-post
 +    │   ├── images
 +    │   │   ├── a.jpg
 +    │   │   ├── b.jpg
 +    │   │   └── c.jpg
 +    │   ├── index.md (root of page bundle)
 +    │   ├── latest.html
 +    │   ├── manual.json
 +    │   ├── notice.md
 +    │   ├── office.mp3
 +    │   ├── pocket.mp4
 +    │   ├── rating.pdf
 +    │   └── safety.txt
 +    └── second-post
 +        └── index.md (root of page bundle)
 +```
 +
 +## Properties
 +
 +ResourceType
 +: The main type of the resource's [Media Type](/templates/output-formats/#media-types). For example, a file of MIME type `image/jpeg` has the ResourceType `image`. A `Page` will have `ResourceType` with value `page`.
 +
 +Name
 +: Default value is the file name (relative to the owning page). Can be set in front matter.
 +
 +Title
 +: Default value is the same as `.Name`. Can be set in front matter.
 +
 +Permalink
 +: The absolute URL to the resource. Resources of type `page` will have no value.
 +
 +RelPermalink
 +: The relative URL to the resource. Resources of type `page` will have no value.
 +
 +Content
 +: The content of the resource itself. For most resources, this returns a string
 +with the contents of the file. Use this to create inline resources.
 +
 +```go-html-template
 +{{ with .Resources.GetMatch "script.js" }}
 +  <script>{{ .Content | safeJS }}</script>
 +{{ end }}
 +
 +{{ with .Resources.GetMatch "style.css" }}
 +  <style>{{ .Content | safeCSS }}</style>
 +{{ end }}
 +
 +{{ with .Resources.GetMatch "img.png" }}
 +  <img src="data:{{ .MediaType.Type }};base64,{{ .Content | base64Encode }}">
 +{{ end }}
 +```
 +
 +MediaType.Type
 +: The media type (formerly known as a MIME type) of the resource (e.g., `image/jpeg`).
 +
 +MediaType.MainType
 +: The main type of the resource's media type (e.g., `image`).
 +
 +MediaType.SubType
 +: The subtype of the resource's type (e.g., `jpeg`). This may or may not correspond to the file suffix.
 +
 +MediaType.Suffixes
 +: A slice of possible file suffixes for the resource's media type (e.g., `[jpg jpeg jpe jif jfif]`).
 +
 +## Methods
 +
 +ByType
 +: Returns the page resources of the given type.
 +
 +```go-html-template
 +{{ .Resources.ByType "image" }}
 +```
 +Match
 +: Returns all the page resources (as a slice) whose `Name` matches the given Glob pattern ([examples](https://github.com/gobwas/glob/blob/master/readme.md)). The matching is case-insensitive.
 +
 +```go-html-template
 +{{ .Resources.Match "images/*" }}
 +```
 +
 +GetMatch
 +: Same as `Match` but will return the first match.
 +
 +### Pattern matching
 +
 +```go
 +// Using Match/GetMatch to find this images/sunset.jpg ?
 +.Resources.Match "images/sun*" ✅
 +.Resources.Match "**/sunset.jpg" ✅
 +.Resources.Match "images/*.jpg" ✅
 +.Resources.Match "**.jpg" ✅
 +.Resources.Match "*" 🚫
 +.Resources.Match "sunset.jpg" 🚫
 +.Resources.Match "*sunset.jpg" 🚫
- {{< code-toggle copy=false >}}
 +```
 +
 +## Page resources metadata
 +
 +The page resources' metadata is managed from the corresponding page's front matter with an array/table parameter named `resources`. You can batch assign values using [wildcards](https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).
 +
 +{{% note %}}
 +Resources of type `page` get `Title` etc. from their own front matter.
 +{{% /note %}}
 +
 +name
 +: Sets the value returned in `Name`.
 +
 +{{% note %}}
 +The methods `Match`, `Get` and `GetMatch` use `Name` to match the resources.
 +{{% /note %}}
 +
 +title
 +: Sets the value returned in `Title`
 +
 +params
 +: A map of custom key/values.
 +
 +### Resources metadata example
 +
- {{< code-toggle copy=false >}}
++{{< code-toggle >}}
 +title: Application
 +date : 2018-01-25
 +resources :
 +- src : "images/sunset.jpg"
 +  name : "header"
 +- src : "documents/photo_specs.pdf"
 +  title : "Photo Specifications"
 +  params:
 +    icon : "photo"
 +- src : "documents/guide.pdf"
 +  title : "Instruction Guide"
 +- src : "documents/checklist.pdf"
 +  title : "Document Checklist"
 +- src : "documents/payment.docx"
 +  title : "Proof of Payment"
 +- src : "**.pdf"
 +  name : "pdf-file-:counter"
 +  params :
 +    icon : "pdf"
 +- src : "**.docx"
 +  params :
 +    icon : "word"
 +{{</ code-toggle >}}
 +
 +From the example above:
 +
 +- `sunset.jpg` will receive a new `Name` and can now be found with `.GetMatch "header"`.
 +- `documents/photo_specs.pdf` will get the `photo` icon.
 +- `documents/checklist.pdf`, `documents/guide.pdf` and `documents/payment.docx` will get `Title` as set by `title`.
 +- Every `PDF` in the bundle except `documents/photo_specs.pdf` will get the `pdf` icon.
 +- All `PDF` files will get a new `Name`. The `name` parameter contains a special placeholder [`:counter`](#the-counter-placeholder-in-name-and-title), so the `Name` will be `pdf-file-1`, `pdf-file-2`, `pdf-file-3`.
 +- Every docx in the bundle will receive the `word` icon.
 +
 +{{% note %}}
 +The __order matters__ --- Only the **first set** values of the `title`, `name` and `params`-**keys** will be used. Consecutive parameters will be set only for the ones not already set. In the above example, `.Params.icon` is first set to `"photo"` in `src = "documents/photo_specs.pdf"`. So that would not get overridden to `"pdf"` by the later set `src = "**.pdf"` rule.
 +{{% /note %}}
 +
 +### The `:counter` placeholder in `name` and `title`
 +
 +The `:counter` is a special placeholder recognized in `name` and `title` parameters `resources`.
 +
 +The counter starts at 1 the first time they are used in either `name` or `title`.
 +
 +For example, if a bundle has the resources `photo_specs.pdf`, `other_specs.pdf`, `guide.pdf` and `checklist.pdf`, and the front matter has specified the `resources` as:
 +
++{{< code-toggle file=content/inspections/engine/index.md fm=true >}}
++title = 'Engine inspections'
 +[[resources]]
 +  src = "*specs.pdf"
 +  title = "Specification #:counter"
 +[[resources]]
 +  src = "**.pdf"
 +  name = "pdf-file-:counter"
 +{{</ code-toggle >}}
 +
 +the `Name` and `Title` will be assigned to the resource files as follows:
 +
 +| Resource file     | `Name`            | `Title`               |
 +|-------------------|-------------------|-----------------------|
 +| checklist.pdf     | `"pdf-file-1.pdf` | `"checklist.pdf"`     |
 +| guide.pdf         | `"pdf-file-2.pdf` | `"guide.pdf"`         |
 +| other\_specs.pdf  | `"pdf-file-3.pdf` | `"Specification #1"` |
 +| photo\_specs.pdf  | `"pdf-file-4.pdf` | `"Specification #2"` |
index 42d577b95a58a9d5fec953e4da7d0bb255f7f555,0000000000000000000000000000000000000000..e73dfc32ad624c0ee4bc790a1e8ac77be33e2719
mode 100644,000000..100644
--- /dev/null
@@@ -1,176 -1,0 +1,178 @@@
- toc: true
 +---
 +title: Related content
 +description: List related content in "See Also" sections.
 +categories: [content management]
 +keywords: [content]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 110
- {{< code file="layouts/partials/related.html" >}}
 +weight: 110
++toc: true
 +aliases: [/content/related/,/related/]
 +---
 +
 +Hugo uses a set of factors to identify a page's related content based on front matter parameters. This can be tuned to the desired set of indices and parameters or left to Hugo's default [Related Content configuration](#configure-related-content).
 +
 +## List related content
 +
 +To list up to 5 related pages (which share the same _date_ or _keyword_ parameters) is as simple as including something similar to this partial in your single page template:
 +
-  <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
++{{< code file=layouts/partials/related.html >}}
 +{{ $related := .Site.RegularPages.Related . | first 5 }}
 +{{ with $related }}
 +<h3>See Also</h3>
 +<ul>
 + {{ range . }}
- : The indices to search in.
++ <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
 + {{ end }}
 +</ul>
 +{{ end }}
 +{{< /code >}}
 +
 +The `Related` method takes one argument which may be a `Page` or a options map. The options map have these options:
 +
 +indices
- : The document to search for related content for.
++: (`slice`) The indices to search within.
 +
 +document
- : The keywords to search for.
++: (`page`) The page for which to find related content. Required when specifying an options map.
 +
 +namedSlices
- : Fragments holds a a list of special keywords that is used for indices configured as type "fragments". This will match the fragment identifiers of the documents.
++: (`slice`) The keywords to search for, expressed as a slice of `KeyValues` using the [`keyVals`] function.
 +
 +fragments
- {{ $opts := 
++: (`slice`) A list of special keywords that is used for indices configured as type "fragments". This will match the [fragment] identifiers of the documents.
++
++[fragment]: /getting-started/glossary/#fragment
++[`keyVals`]: /functions/collections/keyvals/
 +
 +A fictional example using all of the above options:
 +
 +```go-html-template
 +{{ $page := . }}
- We improved and simplified this feature in Hugo 0.111.0. Before this we had 3 different methods: `Related`, `RelatedTo` and `RelatedIndicies`. Now we have only one method: `Related`. The old methods are still available but deprecated. Also see [this blog article](https://regisphilibert.com/blog/2018/04/hugo-optmized-relashionships-with-related-content/) for a great explanation of more advanced usage of this feature.
++{{ $opts := dict
 +  "indices" (slice "tags" "keywords")
 +  "document" $page
 +  "namedSlices" (slice (keyVals "tags" "hugo" "rocks") (keyVals "date" $page.Date))
 +  "fragments" (slice "heading-1" "heading-2")
 +}}
 +```
 +
 +{{% note %}}
- {{< new-in "0.111.0" >}}
++We improved and simplified this feature in Hugo 0.111.0. Before this we had 3 different methods: `Related`, `RelatedTo` and `RelatedIndices`. Now we have only one method: `Related`. The old methods are still available but deprecated. Also see [this blog article](https://regisphilibert.com/blog/2018/04/hugo-optmized-relashionships-with-related-content/) for a great explanation of more advanced usage of this feature.
 +{{% /note %}}
 +
 +## Index content headings in related content
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< new-in 0.111.0 >}}
 +
 +Hugo can index the headings in your content and use this to find related content. You can enable this by adding a index of type `fragments` to your `related` configuration:
 +
- applyFilter = false
++{{< code-toggle file=hugo >}}
 +[related]
 +threshold    = 20
 +includeNewer = true
 +toLower      = false
 +[[related.indices]]
 +name        = "fragmentrefs"
 +type        = "fragments"
-         <a href="{{ .RelPermalink }}">{{ .Title }}</a>
++applyFilter = true
 +weight      = 80
 +{{< /code-toggle >}}
 +
 +* The `name` maps to a optional front matter slice attribute that can be used to link from the page level down to the fragment/heading level.
 +* If `applyFilter`is enabled, the `.HeadingsFiltered` on each page in the result will reflect the filtered headings. This is useful if you want to show the headings in the related content listing:
 +
 +```go-html-template
 +{{ $related := .Site.RegularPages.Related . | first 5 }}
 +{{ with $related }}
 +  <h2>See Also</h2>
 +  <ul>
 +    {{ range $i, $p := . }}
 +      <li>
- {{< code-toggle config="related" />}}
++        <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
 +        {{ with .HeadingsFiltered }}
 +          <ul>
 +            {{ range . }}
 +              {{ $link := printf "%s#%s" $p.RelPermalink .ID | safeURL }}
 +              <li>
 +                <a href="{{ $link }}">{{ .Title }}</a>
 +              </li>
 +            {{ end }}
 +          </ul>
 +        {{ end }}
 +      </li>
 +    {{ end }}
 +  </ul>
 +{{ end }}
 +```
 +
 +## Configure related content
 +
 +Hugo provides a sensible default configuration of Related Content, but you can fine-tune this in your configuration, on the global or language level if needed.
 +
 +### Default configuration
 +
 +Without any `related` configuration set on the project, Hugo's Related Content methods will use the following.
 +
- :  A value between 0-100. Lower value will give more, but maybe not so relevant, matches.
++{{< code-toggle config=related />}}
 +
 +Custom configuration should be set using the same syntax.
 +
 +{{% note %}}
 +If you add a `related` configuration section, you need to add a complete configuration. It is not possible to just set, say, `includeNewer` and use the rest  from the Hugo defaults.
 +{{% /note %}}
 +
 +### Top level configuration options
 +
 +threshold
- :  Set to true to include **pages newer than the current page** in the related content listing. This will mean that the output for older posts may change as new related content gets added.
++: (`int`) A value between 0-100. Lower value will give more, but maybe not so relevant, matches.
 +
 +includeNewer
- : Set to true to lower case keywords in both the indexes and the queries. This may give more accurate results at a slight performance penalty. Note that this can also be set per index.
++: (`bool`) Set to `true` to include **pages newer than the current page** in the related content listing. This will mean that the output for older posts may change as new related content gets added.
 +
 +toLower
- :  The index name. This value maps directly to a page parameter. Hugo supports string values (`author` in the example) and lists (`tags`, `keywords` etc.) and time and date objects.
++: (`bool`) Set to `true` to lower case keywords in both the indexes and the queries. This may give more accurate results at a slight performance penalty. Note that this can also be set per index.
 +
 +### Configuration options per index
 +
 +name
- type
- : {{< new-in "0.111.0" >}}. One of `basic`(default) or `fragments`.
++: (`string`) The index name. This value maps directly to a page parameter. Hugo supports string values (`author` in the example) and lists (`tags`, `keywords` etc.) and time and date objects.
 +
- applyFilter
- : {{< new-in "0.111.0" >}}. Apply a `type` specific filter to the result of a search. This is currently only used for the `fragments` type.
++type {{< new-in 0.111.0 >}} 
++: (`string`) One of `basic`(default) or `fragments`.
 +
- : An integer weight that indicates _how important_ this parameter is relative to the other parameters.  It can be 0, which has the effect of turning this index off, or even negative. Test with different values to see what fits your content best.
++applyFilter {{< new-in 0.111.0 >}}
++: (`string`) Apply a `type` specific filter to the result of a search. This is currently only used for the `fragments` type.
 +
 +weight
- cardinalityThreshold (default 0)
- : {{< new-in "0.111.0" >}}. A percentage (0-100) used to remove common keywords from the index. As an example, setting this to 50 will remove all keywords that are used in more than 50% of the documents in the index.
++: (`int`) An integer weight that indicates _how important_ this parameter is relative to the other parameters. It can be `0`, which has the effect of turning this index off, or even negative. Test with different values to see what fits your content best.
 +
- : This is currently only relevant for dates. When listing related content, we may want to list content that is also close in time. Setting "2006" (default value for date indexes) as the pattern for a date index will add weight to pages published in the same year. For busier blogs, "200601" (year and month) may be a better default.
++cardinalityThreshold {{< new-in 0.111.0 >}}
++: (`int`) A percentage (0-100) used to remove common keywords from the index. As an example, setting this to `50` will remove all keywords that are used in more than 50% of the documents in the index. Default is `0`.
 +
 +pattern
- : See above.
++: (`string`) This is currently only relevant for dates. When listing related content, we may want to list content that is also close in time. Setting "2006" (default value for date indexes) as the pattern for a date index will add weight to pages published in the same year. For busier blogs, "200601" (year and month) may be a better default.
 +
 +toLower
++: (`bool`) See above.
 +
 +## Performance considerations
 +
 +**Fast is Hugo's middle name** and we would not have released this feature had it not been blistering fast.
 +
 +This feature has been in the back log and requested by many for a long time. The development got this recent kick start from this Twitter thread:
 +
 +{{< tweet user="scott_lowe" id="898398437527363585" >}}
 +
 +Scott S. Lowe removed the "Related Content" section built using the `intersect` template function on tags, and the build time dropped from 30 seconds to less than 2 seconds on his 1700 content page sized blog.
 +
 +He should now be able to add an improved version of that "Related Content" section without giving up the fast live-reloads. But it's worth noting that:
 +
 +* If you don't use any of the `Related` methods, you will not use the Relate Content feature, and performance will be the same as before.
 +* Calling `.RegularPages.Related` etc. will create one inverted index, also sometimes named posting list, that will be reused for any lookups in that same page collection. Doing that in addition to, as an example, calling `.Pages.Related` will work as expected, but will create one additional inverted index. This should still be very fast, but worth having in mind, especially for bigger sites.
 +
 +{{% note %}}
 +We currently do not index **Page content**. We thought we would release something that will make most people happy before we start solving [Sherlock's last case](https://github.com/joearms/sherlock).
 +{{% /note %}}
index a3e4397f37932a7bb8dc1014405407fa68574d01,0000000000000000000000000000000000000000..1b694ce44488cda37b8beb23fcd95ad0c907010a
mode 100644,000000..100644
--- /dev/null
@@@ -1,163 -1,0 +1,161 @@@
- toc: true
 +---
 +title: Sections
 +description: Organize content into sections.
 +
 +categories: [content management]
 +keywords: [lists,sections,content types,organization]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 120
- │   ├── 2022/
- │   │   ├── article-1/
- │   │   │   ├── cover.jpg
- │   │   │   └── index.md
- │   │   └── article-2.md
- │   └── 2023/
- │       ├── article-3.md
- │       └── article-4.md
 +weight: 120
++toc: true
 +aliases: [/content/sections/]
 +---
 +
 +## Overview
 +
 +A section is a top-level content directory, or any content directory with an&nbsp;_index.md file. A content directory with an _index.md file is also known as a [branch bundle](/getting-started/glossary/#branch-bundle). Section templates receive one or more page [collections](/getting-started/glossary/#collection) in [context](/getting-started/glossary/#context).
 +
 +{{% note %}}
 +Although top-level directories without _index.md files are sections, we recommend creating _index.md files in _all_ sections.
 +{{% /note %}}
 +
 +A typical site consists of one or more sections. For example:
 +
 +```text
 +content/
 +├── articles/             <-- section (top-level directory)
- │   ├── product-1/        <-- section (has _index.md file)
- │   │   ├── benefits/     <-- section (has _index.md file)
- │   │   │   ├── _index.md
- │   │   │   ├── benefit-1.md
- │   │   │   └── benefit-2.md
- │   │   ├── features/     <-- section (has _index.md file)
- │   │   │   ├── _index.md
- │   │   │   ├── feature-1.md
- │   │   │   └── feature-2.md
- │   │   └── _index.md
- │   └── product-2/        <-- section (has _index.md file)
- │       ├── benefits/     <-- section (has _index.md file)
- │       │   ├── _index.md
- │       │   ├── benefit-1.md
- │       │   └── benefit-2.md
- │       ├── features/     <-- section (has _index.md file)
- │       │   ├── _index.md
- │       │   ├── feature-1.md
- │       │   └── feature-2.md
- │       └── _index.md
++│   ├── 2022/
++│   │   ├── article-1/
++│   │   │   ├── cover.jpg
++│   │   │   └── index.md
++│   │   └── article-2.md
++│   └── 2023/
++│       ├── article-3.md
++│       └── article-4.md
 +├── products/             <-- section (top-level directory)
- 1. The list page for the products section, by default, includes product-1 and product-2, but not their descendant pages. To include descendant pages, use the `.RegularPagesRecursive` collection instead of the `.Pages` collection in the list template. See [details](/variables/page/#page-collections).
++│   ├── product-1/        <-- section (has _index.md file)
++│   │   ├── benefits/     <-- section (has _index.md file)
++│   │   │   ├── _index.md
++│   │   │   ├── benefit-1.md
++│   │   │   └── benefit-2.md
++│   │   ├── features/     <-- section (has _index.md file)
++│   │   │   ├── _index.md
++│   │   │   ├── feature-1.md
++│   │   │   └── feature-2.md
++│   │   └── _index.md
++│   └── product-2/        <-- section (has _index.md file)
++│       ├── benefits/     <-- section (has _index.md file)
++│       │   ├── _index.md
++│       │   ├── benefit-1.md
++│       │   └── benefit-2.md
++│       ├── features/     <-- section (has _index.md file)
++│       │   ├── _index.md
++│       │   ├── feature-1.md
++│       │   └── feature-2.md
++│       └── _index.md
 +├── _index.md
 +└── about.md
 +```
 +
 +The example above has two top-level sections: articles and products. None of the directories under articles are sections, while all of the directories under products are sections. A section within a section is a known as a nested section or subsection.
 +
 +## Explanation
 +
 +Sections and non-sections behave differently.
 +
 +||Sections|Non-sections
 +:--|:-:|:-:
 +Directory names become URL segments|:heavy_check_mark:|:heavy_check_mark:
 +Have logical ancestors and descendants|:heavy_check_mark:|:x:
 +Have list pages|:heavy_check_mark:|:x:
 +
 +With the file structure from the [example above](#overview):
 +
 +1. The list page for the articles section includes all articles, regardless of directory structure; none of the subdirectories are sections.
 +
 +1. The articles/2022 and articles/2023 directories do not have list pages; they are not sections.
 +
- A section has one or more ancestors (including the home page), and zero or more descendants.  With the file structure from the [example above](#overview):
++1. The list page for the products section, by default, includes product-1 and product-2, but not their descendant pages. To include descendant pages, use the `.RegularPagesRecursive` collection instead of the `.Pages` collection in the list template. See&nbsp;[details](/variables/page/#page-collections).
 +
 +1. All directories in the products section have list pages; each directory is a section.
 +
 +## Template selection
 +
 +Hugo has a defined [lookup order] to determine which template to use when rendering a page. The [lookup rules] consider the top-level section name; subsection names are not considered when selecting a template.
 +
 +With the file structure from the [example above](#overview):
 +
 +Content directory|List page template
 +:--|:--
 +content/products|layouts/products/list.html
 +content/products/product-1|layouts/products/list.html
 +content/products/product-1/benefits|layouts/products/list.html
 +
 +Content directory|Single page template
 +:--|:--
 +content/products|layouts/products/single.html
 +content/products/product-1|layouts/products/single.html
 +content/products/product-1/benefits|layouts/products/single.html
 +
 +If you need to use a different template for a subsection, specify `type` and/or `layout` in front matter.
 +
 +[lookup rules]: /templates/lookup-order/#lookup-rules
 +[lookup order]: /templates/lookup-order/
 +
 +## Ancestors and descendants
 +
- {{< code file="layouts/partials/breadcrumb.html" >}}
++A section has one or more ancestors (including the home page), and zero or more descendants. With the file structure from the [example above](#overview):
 +
 +```text
 +content/products/product-1/benefits/benefit-1.md
 +```
 +
 +The content file (benefit-1.md) has four ancestors: benefits, product-1, products, and the home page. This logical relationship allows us to use the `.Parent` and `.Ancestors` methods to traverse the site structure.
 +
 +For example, use the `.Ancestors` method to render breadcrumb navigation.
 +
-         <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
++{{< code file=layouts/partials/breadcrumb.html >}}
 +<nav aria-label="breadcrumb" class="breadcrumb">
 +  <ol>
 +    {{ range .Ancestors.Reverse }}
 +      <li>
-       <a aria-current="page" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
++        <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
 +      </li>
 +    {{ end }}
 +    <li class="active">
++      <a aria-current="page" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
 +    </li>
 +  </ol>
 +</nav>
 +{{< /code >}}
 +
 +With this CSS:
 +
 +```css
 +.breadcrumb ol {
 +  padding-left: 0;
 +}
 +
 +.breadcrumb li {
 +  display: inline;
 +}
 +
 +.breadcrumb li:not(:last-child)::after {
 +  content: "»";
 +}
 +```
 +
 +Hugo renders this, where each breadcrumb is a link to the corresponding page:
 +
 +```text
 +Home » Products » Product 1 » Benefits » Benefit 1
 +```
 +
 +[archetype]: /content-management/archetypes/
 +[content type]: /content-management/types/
 +[directory structure]: /getting-started/directory-structure/
 +[section templates]: /templates/section-templates/
 +[leaf bundles]: /content-management/page-bundles/#leaf-bundles
 +[branch bundles]: /content-management/page-bundles/#branch-bundles
index b1e32d90206bd5847883f04a601db43870dc19a6,0000000000000000000000000000000000000000..bbc2b0cc83a6db07dba044fee787bbbf59640ab0
mode 100644,000000..100644
--- /dev/null
@@@ -1,406 -1,0 +1,404 @@@
- toc: true
 +---
 +title: Shortcodes
 +description: Shortcodes are simple snippets inside your content files calling built-in or custom templates.
 +categories: [content management]
 +keywords: [markdown,content,shortcodes]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 100
 +weight: 100
++toc: true
 +aliases: [/extras/shortcodes/]
 +testparam: "Hugo Rocks!"
 +---
 +
 +## What a shortcode is
 +
 +Hugo loves Markdown because of its simple content format, but there are times when Markdown falls short. Often, content authors are forced to add raw HTML (e.g., video `<iframe>`'s) to Markdown content. We think this contradicts the beautiful simplicity of Markdown's syntax.
 +
 +Hugo created **shortcodes** to circumvent these limitations.
 +
 +A shortcode is a simple snippet inside a content file that Hugo will render using a predefined template. Note that shortcodes will not work in template files. If you need the type of drop-in functionality that shortcodes provide but in a template, you most likely want a [partial template][partials] instead.
 +
 +In addition to cleaner Markdown, shortcodes can be updated any time to reflect new classes, techniques, or standards. At the point of site generation, Hugo shortcodes will easily merge in your changes. You avoid a possibly complicated search and replace operation.
 +
 +## Use shortcodes
 +
 +{{< youtube 2xkNJL4gJ9E >}}
 +
 +In your content files, a shortcode can be called by calling `{{%/* shortcodename parameters */%}}`. Shortcode parameters are space delimited, and parameters with internal spaces can be quoted.
 +
 +The first word in the shortcode declaration is always the name of the shortcode. Parameters follow the name. Depending upon how the shortcode is defined, the parameters may be named, positional, or both, although you can't mix parameter types in a single call. The format for named parameters models that of HTML with the format `name="value"`.
 +
 +Some shortcodes use or require closing shortcodes. Again like HTML, the opening and closing shortcodes match (name only) with the closing declaration, which is prepended with a slash.
 +
 +Here are two examples of paired shortcodes:
 +
 +```go-html-template
 +{{%/* mdshortcode */%}}Stuff to `process` in the *center*.{{%/* /mdshortcode */%}}
 +```
 +
 +```go-html-template
 +{{</* highlight go */>}} A bunch of code here {{</* /highlight */>}}
 +```
 +
 +The examples above use two different delimiters, the difference being the `%` character in the first and the `<>` characters in the second.
 +
 +### Shortcodes with raw string parameters
 +
 +You can pass multiple lines as parameters to a shortcode by using raw string literals:
 +
 +```go-html-template
 +{{</*  myshortcode `This is some <b>HTML</b>,
 +and a new line with a "quoted string".` */>}}
 +```
 +
 +### Shortcodes with markdown
 +
 +Shortcodes using the `%` as the outer-most delimiter will be fully rendered when sent to the content renderer. This means that the rendered output from a shortcode can be part of the page's table of contents, footnotes, etc.
 +
- : Image caption.  Markdown within the value of `caption` will be rendered.
 +### Shortcodes without markdown
 +
 +The `<` character indicates that the shortcode's inner content does *not* need further rendering. Often shortcodes without Markdown include internal HTML:
 +
 +```go-html-template
 +{{</* myshortcode */>}}<p>Hello <strong>World!</strong></p>{{</* /myshortcode */>}}
 +```
 +
 +### Nested shortcodes
 +
 +You can call shortcodes within other shortcodes by creating your own templates that leverage the `.Parent` variable. `.Parent` allows you to check the context in which the shortcode is being called. See [Shortcode templates][sctemps].
 +
 +## Use Hugo's built-in shortcodes
 +
 +Hugo ships with a set of predefined shortcodes that represent very common usage. These shortcodes are provided for author convenience and to keep your Markdown content clean.
 +
 +### `figure`
 +
 +`figure` is an extension of the image syntax in Markdown, which does not provide a shorthand for the more semantic [HTML5 `<figure>` element][figureelement].
 +
 +The `figure` shortcode can use the following named parameters:
 +
 +src
 +: URL of the image to be displayed.
 +
 +link
 +: If the image needs to be hyperlinked, URL of the destination.
 +
 +target
 +: Optional `target` attribute for the URL if `link` parameter is set.
 +
 +rel
 +: Optional `rel` attribute for the URL if `link` parameter is set.
 +
 +alt
 +: Alternate text for the image if the image cannot be displayed.
 +
 +title
 +: Image title.
 +
 +caption
- {{< code file="figure-input-example.md" >}}
++: Image caption. Markdown within the value of `caption` will be rendered.
 +
 +class
 +: `class` attribute of the HTML `figure` tag.
 +
 +height
 +: `height` attribute of the image.
 +
 +width
 +: `width` attribute of the image.
 +
 +loading
 +: `loading` attribute of the image.
 +
 +attr
 +: Image attribution text. Markdown within the value of `attr` will be rendered.
 +
 +attrlink
 +: If the attribution text needs to be hyperlinked, URL of the destination.
 +
 +#### Example `figure` input
 +
-   <figcaption>An elephant at sunset</figcaption>
++{{< code file=figure-input-example.md >}}
 +{{</* figure src="elephant.jpg" title="An elephant at sunset" */>}}
 +{{< /code >}}
 +
 +#### Example `figure` output
 +
 +```html
 +<figure>
 +  <img src="elephant.jpg">
- {{< gist jmooring 50a7482715eac222e230d1e64dd9a89b >}}
++  <figcaption><h4>An elephant at sunset</h4></figcaption>
 +</figure>
 +```
 +
 +### `gist`
 +
 +To display a GitHub [gist] with this URL:
 +
 +[gist]: https://docs.github.com/en/get-started/writing-on-github/editing-and-sharing-content-with-gists
 +
 +```text
 +https://gist.github.com/user/50a7482715eac222e230d1e64dd9a89b
 +```
 +
 +Include this in your markdown:
 +
 +```text
 +{{</* gist user 50a7482715eac222e230d1e64dd9a89b */>}}
 +```
 +
 +This will display all files in the gist alphabetically by file name.
 +
- {{</* gist user 50a7482715eac222e230d1e64dd9a89b 1-template.html */>}}
++{{< gist jmooring 23932424365401ffa5e9d9810102a477 >}}
 +
 +To display a specific file within the gist:
 +
 +```text
- {{< gist jmooring 50a7482715eac222e230d1e64dd9a89b 1-template.html >}}
++{{</* gist user 23932424365401ffa5e9d9810102a477 list.html */>}}
 +```
 +
 +Rendered:
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< gist jmooring 23932424365401ffa5e9d9810102a477 list.html >}}
 +
 +### `highlight`
 +
 +To display a highlighted code sample:
 +
 +```text
 +{{</* highlight go-html-template */>}}
 +{{ range .Pages }}
 +  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
 +{{ end }}
 +{{</* /highlight */>}}
 +```
 +
 +Rendered:
 +
 +{{< highlight go-html-template >}}
 +{{ range .Pages }}
 +  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
 +{{ end }}
 +{{< /highlight >}}
 +
 +To specify one or more [highlighting options], include a quotation-encapsulated, comma-separated list:
 +
 +[highlighting options]: /functions/transform/highlight/
 +
 +```text
 +{{</* highlight go-html-template "lineNos=inline, lineNoStart=42" */>}}
 +{{ range .Pages }}
 +  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
 +{{ end }}
 +{{</* /highlight */>}}
 +```
 +
 +Rendered:
 +
 +{{< highlight go-html-template "lineNos=inline, lineNoStart=42" >}}
 +{{ range .Pages }}
 +  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
 +{{ end }}
 +{{< /highlight >}}
 +
 +### `instagram`
 +
 +The `instagram` shortcode uses Facebook's **oEmbed Read** feature. The  Facebook [developer documentation] states:
 +
 +- This permission or feature requires successful completion of the App Review process before your app can access live data. [Learn More]
 +- This permission or feature is only available with business verification. You may also need to sign additional contracts before your app can access data. [Learn More Here]
 +
 +[developer documentation]: https://developers.facebook.com/docs/features-reference/oembed-read
 +[Learn More]: https://developers.facebook.com/docs/app-review
 +[Learn More Here]: https://developers.facebook.com/docs/development/release/business-verification
 +
 +You must obtain an Access Token to use the `instagram` shortcode.
 +
 +If your site configuration is private:
 +
- ```text
++{{< code-toggle file=hugo >}}
 +[services.instagram]
 +accessToken = 'xxx'
 +{{< /code-toggle >}}
 +
 +If your site configuration is _not_ private, set the Access Token with an environment variable:
 +
- ```bash
++```sh
 +HUGO_SERVICES_INSTAGRAM_ACCESSTOKEN=xxx hugo --gc --minify
 +```
 +
 +{{% note %}}
 +If you are using a Client Access Token, you must combine the Access Token with your App ID using a pipe symbol (`APPID|ACCESSTOKEN`).
 +{{% /note %}}
 +
 +To display an Instagram post with this URL:
 +
 +```text
 +https://www.instagram.com/p/BWNjjyYFxVx/
 +```
 +
 +Include this in your markdown:
 +
 +```text
 +{{</* instagram BWNjjyYFxVx */>}}
 +```
 +
 +### `param`
 +
 +Gets a value from the current `Page's` parameters set in front matter, with a fallback to the site parameter value. It will log an `ERROR` if the parameter with the given key could not be found in either.
 +
- ```bash
++```sh
 +{{</* param testparam */>}}
 +```
 +
 +Since `testparam` is a parameter defined in front matter of this page with the value `Hugo Rocks!`, the above will print:
 +
 +{{< param testparam >}}
 +
 +To access deeply nested parameters, use "dot syntax", e.g:
 +
- <a href="https://example.com/blog/neat">Neat</a>
++```sh
 +{{</* param "my.nested.param" */>}}
 +```
 +
 +### `ref` and `relref`
 +
 +These shortcodes will look up the pages by their relative path (e.g., `blog/post.md`) or their logical name (`post.md`) and return the permalink (`ref`) or relative permalink (`relref`) for the found page.
 +
 +`ref` and `relref` also make it possible to make fragmentary links that work for the header links generated by Hugo.
 +
 +{{% note %}}
 +Read a more extensive description of `ref` and `relref` in the [cross references](/content-management/cross-references/) documentation.
 +{{% /note %}}
 +
 +`ref` and `relref` take exactly one required parameter of _reference_, quoted and in position `0`.
 +
 +#### Example `ref` and `relref` input
 +
 +```go-html-template
 +[Neat]({{</* ref "blog/neat.md" */>}})
 +[Who]({{</* relref "about.md#who" */>}})
 +```
 +
 +#### Example `ref` and `relref` output
 +
 +Assuming that standard Hugo pretty URLs are turned on.
 +
 +```html
- {{< code file="example-youtube-input.md" >}}
++<a href="https://example.org/blog/neat">Neat</a>
 +<a href="/about/#who">Who</a>
 +```
 +
 +### `tweet`
 +
 +To display a Twitter post with this URL:
 +
 +```txt
 +https://twitter.com/SanDiegoZoo/status/1453110110599868418
 +```
 +
 +Include this in your markdown:
 +
 +```text
 +{{</* tweet user="SanDiegoZoo" id="1453110110599868418" */>}}
 +```
 +
 +Rendered:
 +
 +{{< tweet user="SanDiegoZoo" id="1453110110599868418" >}}
 +
 +### `vimeo`
 +
 +To display a Vimeo video with this URL:
 +
 +```text
 +https://vimeo.com/channels/staffpicks/55073825
 +```
 +
 +Include this in your markdown:
 +
 +```text
 +{{</* vimeo 55073825 */>}}
 +```
 +
 +Rendered:
 +
 +{{< vimeo 55073825 >}}
 +
 +{{% note %}}
 +If you want to further customize the visual styling of the YouTube or Vimeo output, add a `class` named parameter when calling the shortcode. The new `class` will be added to the `<div>` that wraps the `<iframe>` *and* will remove the inline styles. Note that you will need to call the `id` as a named parameter as well. You can also give the vimeo video a descriptive title with `title`.
 +
 +```go
 +{{</* vimeo id="146022717" class="my-vimeo-wrapper-class" title="My vimeo video" */>}}
 +```
 +{{% /note %}}
 +
 +### `youtube`
 +
 +The `youtube` shortcode embeds a responsive video player for [YouTube videos]. Only the ID of the video is required, e.g.:
 +
 +```txt
 +https://www.youtube.com/watch?v=w7Ft2ymGmfc
 +```
 +
 +#### Example `youtube` input
 +
 +Copy the YouTube video ID that follows `v=` in the video's URL and pass it to the `youtube` shortcode:
 +
- {{< code file="example-youtube-input-with-autoplay.md" >}}
++{{< code file=example-youtube-input.md >}}
 +{{</* youtube w7Ft2ymGmfc */>}}
 +{{< /code >}}
 +
 +Furthermore, you can automatically start playback of the embedded video by setting the `autoplay` parameter to `true`. Remember that you can't mix named and unnamed parameters, so you'll need to assign the yet unnamed video ID to the parameter `id`:
 +
- For [accessibility reasons](https://dequeuniversity.com/tips/provide-iframe-titles), it's best to provide a title for your YouTube video.  You  can do this using the shortcode by providing a `title` parameter. If no title is provided, a default of "YouTube Video" will be used.
++{{< code file=example-youtube-input-with-autoplay.md >}}
 +{{</* youtube id="w7Ft2ymGmfc" autoplay="true" */>}}
 +{{< /code >}}
 +
- {{< code file="example-youtube-input-with-title.md" >}}
++For [accessibility reasons](https://dequeuniversity.com/tips/provide-iframe-titles), it's best to provide a title for your YouTube video. You  can do this using the shortcode by providing a `title` parameter. If no title is provided, a default of "YouTube Video" will be used.
 +
- {{< code file="example-youtube-output.html" >}}
++{{< code file=example-youtube-input-with-title.md >}}
 +{{</* youtube id="w7Ft2ymGmfc" title="A New Hugo Site in Under Two Minutes" */>}}
 +{{< /code >}}
 +
 +#### Example `youtube` output
 +
 +Using the preceding `youtube` example, the following HTML will be added to your rendered website's markup:
 +
- [scvars]: /variables/shortcodes/
++{{< code file=example-youtube-output.html >}}
 +{{< youtube id="w7Ft2ymGmfc" autoplay="true" >}}
 +{{< /code >}}
 +
 +#### Example `youtube` display
 +
 +Using the preceding `youtube` example (without `autoplay="true"`), the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your style sheets and surrounding markup. The video is also include in the [Quick Start of the Hugo documentation][quickstart].
 +
 +{{< youtube w7Ft2ymGmfc >}}
 +
 +## Privacy configuration
 +
 +To learn how to configure your Hugo site to meet the new EU privacy regulation, see [Hugo and the GDPR].
 +
 +## Create custom shortcodes
 +
 +To learn more about creating custom shortcodes, see the [shortcode template documentation].
 +
 +[`figure` shortcode]: #figure
 +[contentmanagementsection]: /content-management/formats/
 +[examplegist]: https://gist.github.com/spf13/7896402
 +[figureelement]: https://html5doctor.com/the-figure-figcaption-elements/
 +[Hugo and the GDPR]: /about/hugo-and-gdpr/
 +[Instagram]: https://www.instagram.com/
 +[pagevariables]: /variables/page/
 +[partials]: /templates/partials/
 +[quickstart]: /getting-started/quick-start/
 +[sctemps]: /templates/shortcode-templates/
++[scvars]: /variables/shortcode/
 +[shortcode template documentation]: /templates/shortcode-templates/
 +[templatessection]: /templates/
 +[Vimeo]: https://vimeo.com/
 +[YouTube Videos]: https://www.youtube.com/
 +[YouTube Input shortcode]: #youtube
index 78772af99fab080abecce44df70601ac25eb4041,0000000000000000000000000000000000000000..c1197ede1eff34c04fbe8b74ace603d064703f08
mode 100644,000000..100644
--- /dev/null
@@@ -1,68 -1,0 +1,68 @@@
- toc: true
 +---
 +title: Static files
 +description: Files that get served **statically** (as-is, no modification) on the site root.
 +categories: [content management]
 +keywords: [source, directories]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 200
- {{< code-toggle copy=false file="hugo" >}}
 +weight: 200
++toc: true
 +aliases: [/static-files]
 +---
 +
 +By default, the `static/` directory in the site project is used for
 +all **static files** (e.g. stylesheets, JavaScript, images). The static files are served on the site root path (eg. if you have the file `static/image.png` you can access it using `http://{server-url}/image.png`, to include it in a document you can use `![Example image](/image.png) )`.
 +
 +Hugo can be configured to look into a different directory, or even
 +**multiple directories** for such static files by configuring the
 +`staticDir` parameter in the [site configuration]. All the files in all the
 +static directories will form a union filesystem.
 +
 +This union filesystem will be served from your site root. So a file
 +`<SITE PROJECT>/static/me.png` will be accessible as
 +`<MY_BASEURL>/me.png`.
 +
 +Here's an example of setting `staticDir` and `staticDir2` for a
 +multi-language site:
 +
- baseURL = "https://example.com"
++{{< code-toggle file=hugo >}}
 +staticDir = ["static1", "static2"]
 +
 +[languages]
 +[languages.en]
 +staticDir2 = "static_en"
++baseURL = "https://example.org/"
 +languageName = "English"
 +weight = 2
 +title = "In English"
 +[languages.no]
 +staticDir = ["staticDir_override", "static_no"]
 +baseURL = "https://example.no"
 +languageName = "Norsk"
 +weight = 1
 +title = "På norsk"
 +{{</ code-toggle >}}
 +
 +In the above, with no theme used:
 +
 +- The English site will get its static files as a union of "static1",
 +  "static2" and "static_en". On file duplicates, the right-most
 +  version will win.
 +- The Norwegian site will get its static files as a union of
 +  "staticDir_override" and "static_no".
 +
 +Note 1
 +: The **2** (can be a number between 0 and 10) in `staticDir2` is
 +  added to tell Hugo that you want to **add** this directory to the
 +  global set of static directories defined using `staticDir`. Using
 +  `staticDir` on the language level would replace the global value (as
 +  can be seen in the Norwegian site case).
 +
 +Note 2
 +: The example above is a [multihost setup]. In a regular setup, all
 +  the static directories will be available to all sites.
 +
 +[site configuration]: /getting-started/configuration/#all-configuration-settings
 +[multihost setup]: /content-management/multilingual/#configure-multilingual-multihost
index 74c5623cbf2673c59ab73c5744ddc2dfdffe3127,0000000000000000000000000000000000000000..2ff1fec343aa782e68bb6fe658c6ab71151a15f9
mode 100644,000000..100644
--- /dev/null
@@@ -1,108 -1,0 +1,110 @@@
- toc: true
 +---
 +title: Content summaries
 +linkTitle: Summaries
 +description: Hugo generates summaries of your content.
 +categories: [content management]
 +keywords: [summaries,abstracts,read more]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 160
- Alternatively, you may add the <code>&#60;&#33;&#45;&#45;more&#45;&#45;&#62;</code> summary divider where you want to split the article.
 +weight: 160
++toc: true
 +aliases: [/content/summaries/,/content-management/content-summaries/]
 +---
 +
++<!--more-->
++
 +With the use of the `.Summary` [page variable][pagevariables], Hugo generates summaries of content to use as a short version in summary views.
 +
 +## Summary splitting options
 +
 +* Automatic Summary Split
 +* Manual Summary Split
 +* Front Matter Summary
 +
 +It is natural to accompany the summary with links to the original content, and a common design pattern is to see this link in the form of a "Read More ..." button. See the `.RelPermalink`, `.Permalink`, and `.Truncated` [page variables][pagevariables].
 +
 +### Automatic summary splitting
 +
 +By default, Hugo automatically takes the first 70 words of your content as its summary and stores it into the `.Summary` page variable for use in your templates. You may customize the summary length by setting `summaryLength` in your [site configuration](/getting-started/configuration/).
 +
 +{{% note %}}
 +You can customize how HTML tags in the summary are loaded using functions such as `plainify` and `safeHTML`.
 +{{% /note %}}
 +
 +{{% note %}}
 +The Hugo-defined summaries are set to use word count calculated by splitting the text by one or more consecutive whitespace characters. If you are creating content in a `CJK` language and want to use Hugo's automatic summary splitting, set `hasCJKLanguage` to `true` in your [site configuration](/getting-started/configuration/).
 +{{% /note %}}
 +
 +### Manual summary splitting
 +
- : Freedom, precision, and improved rendering.  All HTML tags and formatting are preserved.
++Alternatively, you may add the `<!--more-->` summary divider where you want to split the article.
 +
 +For [Org mode content][org], use `# more` where you want to split the article.
 +
 +Content that comes before the summary divider will be used as that content's summary and stored in the `.Summary` page variable with all HTML formatting intact.
 +
 +{{% note %}}
 +The concept of a *summary divider* is not unique to Hugo. It is also called the "more tag" or "excerpt separator" in other literature.
 +{{% /note %}}
 +
 +Pros
- : Extra work for content authors, since they need to remember to type <code>&#60;&#33;&#45;&#45;more&#45;&#45;&#62;</code> (or `# more` for [org content][org]) in each content file. This can be automated by adding the summary divider below the front matter of an [archetype](/content-management/archetypes/).
++: Freedom, precision, and improved rendering. All HTML tags and formatting are preserved.
 +
 +Cons
- {{% warning "Be Precise with the Summary Divider" %}}
- Be careful to enter <code>&#60;&#33;&#45;&#45;more&#45;&#45;&#62;</code> exactly; i.e., all lowercase and with no whitespace.
++: Extra work for content authors, since they need to remember to type `<!--more-->` (or `# more` for [org content][org]) in each content file. This can be automated by adding the summary divider below the front matter of an [archetype](/content-management/archetypes/).
 +
- You might want your summary to be something other than the text that starts the article.  In this case you can provide a separate summary in the `summary` variable of the article front matter.
++{{% note %}}
++Be careful to enter `<!--more-->` exactly; i.e., all lowercase and with no whitespace.
 +{{% /note %}}
 +
 +### Front matter summary
 +
- : Complete freedom of text independent of the content of the article.  Markup can be used within the summary.
++You might want your summary to be something other than the text that starts the article. In this case you can provide a separate summary in the `summary` variable of the article front matter.
 +
 +Pros
- Because there are multiple ways in which a summary can be specified it is useful to understand the order of selection Hugo follows when deciding on the text to be returned by `.Summary`.  It is as follows:
++: Complete freedom of text independent of the content of the article. Markup can be used within the summary.
 +
 +Cons
 +: Extra work for content authors as they need to write an entirely separate piece of text as the summary of the article.
 +
 +## Summary selection order
 +
- 1. If there is a <code>&#60;&#33;&#45;&#45;more&#45;&#45;&#62;</code> summary divider present in the article the text up to the divider will be provided as per the manual summary split method
++Because there are multiple ways in which a summary can be specified it is useful to understand the order of selection Hugo follows when deciding on the text to be returned by `.Summary`. It is as follows:
 +
- {{% warning "Competing selections" %}}
- Hugo uses the _first_ of the above steps that returns text.  So if, for example, your article has both `summary` variable in its front matter and a <code>&#60;&#33;&#45;&#45;more&#45;&#45;&#62;</code> summary divider Hugo will use the manual summary split method.
++1. If there is a `<!--more-->`> summary divider present in the article the text up to the divider will be provided as per the manual summary split method
 +2. If there is a `summary` variable in the article front matter the value of the variable will be provided as per the front matter summary method
 +3. The text at the start of the article will be provided as per the automatic summary split method
 +
- {{< code file="page-list-with-summaries.html" >}}
++{{% note %}}
++Hugo uses the _first_ of the above steps that returns text. So if, for example, your article has both `summary` variable in its front matter and a `<!--more-->` summary divider Hugo will use the manual summary split method.
 +{{% /note %}}
 +
 +## Example: first 10 articles with summaries
 +
 +You can show content summaries with the following code. You could use the following snippet, for example, in a [section template].
 +
++{{< code file=page-list-with-summaries.html >}}
 +{{ range first 10 .Pages }}
 +  <article>
 +    <!-- this <div> includes the title summary -->
 +    <div>
 +      <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
 +      {{ .Summary }}
 +    </div>
 +    {{ if .Truncated }}
 +      <!-- This <div> includes a read more link, but only if the summary is truncated... -->
 +      <div>
 +        <a href="{{ .RelPermalink }}">Read More…</a>
 +      </div>
 +    {{ end }}
 +  </article>
 +{{ end }}
 +{{< /code >}}
 +
 +Note how the `.Truncated` boolean variable value may be used to hide the "Read More..." link when the content is not truncated; i.e., when the summary contains the entire article.
 +
 +[org]: /content-management/formats/
 +[pagevariables]: /variables/page/
 +[section template]: /templates/section-templates/
index 39fef0f9b5621ef0dae4848ac5e388a360dea1ac,0000000000000000000000000000000000000000..62071cd465e5a13b9c6e738735d1ad15fd073c7d
mode 100644,000000..100644
--- /dev/null
@@@ -1,139 -1,0 +1,138 @@@
- keywords: [highlighting,chroma,code blocks,syntax]
 +---
 +title: Syntax highlighting
 +description: Hugo comes with really fast syntax highlighting from Chroma.
- toc: true
 +categories: [content management]
++keywords: [highlighting,chroma,code blocks,syntax]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 240
- ```bash
 +weight: 240
++toc: true
 +aliases: [/extras/highlighting/,/extras/highlight/,/tools/syntax-highlighting/]
 +---
 +
 +Hugo uses [Chroma](https://github.com/alecthomas/chroma) as its code highlighter; it is built in Go and is really, really fast.
 +
 +## Configure syntax highlighter
 +
 +See [Configure Highlight](/getting-started/configuration-markup#highlight).
 +
 +## Generate syntax highlighter CSS
 +
 +If you run with `markup.highlight.noClasses=false` in your site configuration, you need a style sheet.
 +
 +You can generate one with Hugo:
 +
- * `hl_inline`  Highlight inside a `<code>` (inline HTML element) tag. Valid values are `true` or `false`. The `code` tag will get a class with name `code-inline`. {{< new-in "0.101.0" >}}
++```sh
 +hugo gen chromastyles --style=monokai > syntax.css
 +```
 +
 +Run `hugo gen chromastyles -h` for more options. See https://xyproto.github.io/splash/docs/ for a gallery of available styles.
 +
 +## Highlight shortcode
 +
 +Highlighting is carried out via the built-in [`highlight` shortcode](/content-management/shortcodes/#highlight). It takes exactly one required parameter for the programming language to be highlighted and requires a closing shortcode.
 +
 +Options:
 +
 +* `linenos`: configure line numbers. Valid values are `true`, `false`, `table`, or `inline`. `false` will turn off line numbers if it's configured to be on in site configuration. `table` will give copy-and-paste friendly code blocks.
 +* `hl_lines`: lists a set of line numbers or line number ranges to be highlighted.
 +* `linenostart=199`: starts the line number count from 199.
 +* `anchorlinenos`: Configure anchors on line numbers. Valid values are `true` or `false`;
 +* `lineanchors`: Configure a prefix for the anchors on line numbers. Will be suffixed with `-`, so linking to the line number 1 with the option `lineanchors=prefix` adds the anchor `prefix-1` to the page.  
++* `hl_inline`  Highlight inside a `<code>` (inline HTML element) tag. Valid values are `true` or `false`. The `code` tag will get a class with name `code-inline`. {{< new-in 0.101.0 >}}
 +
 +### Example: highlight shortcode
 +
 +```go-html-template
 +{{</* highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" */>}}
 +// ... code
 +{{</* / highlight */>}}
 +```
 +
 +Gives this:
 +
 +{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}}
 +// GetTitleFunc returns a func that can be used to transform a string to
 +// title case.
 +//
 +// The supported styles are
 +//
 +// - "Go" (strings.Title)
 +// - "AP" (see https://www.apstylebook.com/)
 +// - "Chicago" (see https://www.chicagomanualofstyle.org/home.html)
 +//
 +// If an unknown or empty style is provided, AP style is what you get.
 +func GetTitleFunc(style string) func(s string) string {
 +  switch strings.ToLower(style) {
 +  case "go":
 +    return strings.Title
 +  case "chicago":
 +    return transform.NewTitleConverter(transform.ChicagoStyle)
 +  default:
 +    return transform.NewTitleConverter(transform.APStyle)
 +  }
 +}
 +{{< / highlight >}}
 +
 +## Highlight Hugo/Go template code
 +
 +For highlighting Hugo/Go template code on your page, add `/*` after the opening double curly braces and `*/` before closing curly braces.
 +
 +``` go
 +{{</*/* myshortcode */*/>}}
 +```
 +
 +Gives this:
 +
 +``` go
 +{{</* myshortcode */>}}
 +```
 +
 +## Highlight template function
 +
 +See [Highlight](/functions/transform/highlight/).
 +
 +## Highlighting in code fences
 +
 +Highlighting in code fences is enabled by default.
 +
 +````txt
 +```go {linenos=table,hl_lines=[8,"15-17"],linenostart=199}
 +// ... code
 +```
 +````
 +
 +Gives this:
 +
 +```go {linenos=table,hl_lines=[8,"15-17"],linenostart=199}
 +// GetTitleFunc returns a func that can be used to transform a string to
 +// title case.
 +//
 +// The supported styles are
 +//
 +// - "Go" (strings.Title)
 +// - "AP" (see https://www.apstylebook.com/)
 +// - "Chicago" (see https://www.chicagomanualofstyle.org/home.html)
 +//
 +// If an unknown or empty style is provided, AP style is what you get.
 +func GetTitleFunc(style string) func(s string) string {
 +  switch strings.ToLower(style) {
 +  case "go":
 +    return strings.Title
 +  case "chicago":
 +    return transform.NewTitleConverter(transform.ChicagoStyle)
 +  default:
 +    return transform.NewTitleConverter(transform.APStyle)
 +  }
 +}
 +```
 +
 +The options are the same as in the [highlighting shortcode](/content-management/syntax-highlighting/#highlight-shortcode), including `linenos=false`, but note the slightly different Markdown attribute syntax.
 +
 +## List of Chroma highlighting languages
 +
 +The full list of Chroma lexers and their aliases (which is the identifier used in the `highlight` template func or when doing highlighting in code fences):
 +
 +{{< chroma-lexers >}}
index af8297876560e845961f58e777abe2c6d0622598,0000000000000000000000000000000000000000..94f2f635731576232657646f223c60caaf16f309
mode 100644,000000..100644
--- /dev/null
@@@ -1,201 -1,0 +1,188 @@@
- keywords: [taxonomies,metadata,front matter,terms]
 +---
 +title: Taxonomies
 +description: Hugo includes support for user-defined taxonomies.
- toc: true
 +categories: [content management]
++keywords: [taxonomies,metadata,front matter,terms]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 150
 +weight: 150
++toc: true
 +aliases: [/taxonomies/overview/,/taxonomies/usage/,/indexes/overview/,/doc/indexes/,/extras/indexes]
 +---
 +
 +## What is a taxonomy?
 +
 +Hugo includes support for user-defined groupings of content called **taxonomies**. Taxonomies are classifications of logical relationships between content.
 +
 +### Definitions
 +
 +Taxonomy
 +: a categorization that can be used to classify content
 +
 +Term
 +: a key within the taxonomy
 +
 +Value
 +: a piece of content assigned to a term
 +
- {{< code-toggle config="taxonomies" />}}
 +## Example taxonomy: movie website
 +
 +Let's assume you are making a website about movies. You may want to include the following taxonomies:
 +
 +* Actors
 +* Directors
 +* Studios
 +* Genre
 +* Year
 +* Awards
 +
 +Then, in each of the movies, you would specify terms for each of these taxonomies (i.e., in the [front matter] of each of your movie content files). From these terms, Hugo would automatically create pages for each Actor, Director, Studio, Genre, Year, and Award, with each listing all of the Movies that matched that specific Actor, Director, Studio, Genre, Year, and Award.
 +
 +### Movie taxonomy organization
 +
 +To continue with the example of a movie site, the following demonstrates content relationships from the perspective of the taxonomy:
 +
 +```txt
 +Actor                    <- Taxonomy
 +    Bruce Willis         <- Term
 +        The Sixth Sense  <- Value
 +        Unbreakable      <- Value
 +        Moonrise Kingdom <- Value
 +    Samuel L. Jackson    <- Term
 +        Unbreakable      <- Value
 +        The Avengers     <- Value
 +        xXx              <- Value
 +```
 +
 +From the perspective of the content, the relationships would appear differently, although the data and labels used are the same:
 +
 +```txt
 +Unbreakable                 <- Value
 +    Actors                  <- Taxonomy
 +        Bruce Willis        <- Term
 +        Samuel L. Jackson   <- Term
 +    Director                <- Taxonomy
 +        M. Night Shyamalan  <- Term
 +    ...
 +Moonrise Kingdom            <- Value
 +    Actors                  <- Taxonomy
 +        Bruce Willis        <- Term
 +        Bill Murray         <- Term
 +    Director                <- Taxonomy
 +        Wes Anderson        <- Term
 +    ...
 +```
 +
 +## Default taxonomies
 +
 +Hugo natively supports taxonomies.
 +
 +Without adding a single line to your [site configuration] file, Hugo will automatically create taxonomies for `tags` and `categories`. That would be the same as manually [configuring your taxonomies](#configure-taxonomies) as below:
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle config=taxonomies />}}
 +
 +If you do not want Hugo to create any taxonomies, set `disableKinds` in your [site configuration] to the following:
 +
- {{% page-kinds %}}
++{{< code-toggle file=hugo >}}
 +disableKinds = ["taxonomy","term"]
 +{{</ code-toggle >}}
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{% include "content-management/_common/page-kinds.md" %}}
 +
 +### Default destinations
 +
 +When taxonomies are used---and [taxonomy templates] are provided---Hugo will automatically create both a page listing all the taxonomy's terms and individual pages with lists of content associated with each term. For example, a `categories` taxonomy declared in your configuration and used in your content front matter will create the following pages:
 +
 +* A single page at `example.com/categories/` that lists all the [terms within the taxonomy]
 +* [Individual taxonomy list pages][taxonomy templates] (e.g., `/categories/development/`) for each of the terms that shows a listing of all pages marked as part of that taxonomy within any content file's [front matter]
 +
 +## Configure taxonomies
 +
 +Custom taxonomies other than the [defaults](#default-taxonomies) must be defined in your [site configuration] before they can be used throughout the site. You need to provide both the plural and singular labels for each taxonomy. For example, `singular key = "plural value"` for TOML and `singular key: "plural value"` for YAML.
 +
 +### Example: adding a custom taxonomy named "series"
 +
 +{{% note %}}
 +While adding custom taxonomies, you need to put in the default taxonomies too, _if you want to keep them_.
 +{{% /note %}}
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle file=hugo >}}
 +[taxonomies]
 +  tag = "tags"
 +  category = "categories"
 +  series = "series"
 +{{</ code-toggle >}}
 +
 +### Example: removing default taxonomies
 +
 +If you want to have just the default `tags` taxonomy, and remove the `categories` taxonomy for your site, you can do so by modifying the `taxonomies` value in your [site configuration].
 +
- Much like regular pages, taxonomy list [permalinks](/content-management/urls/) are configurable, but taxonomy term page permalinks are not.
- {{% /note %}}
- {{% note %}}
- The configuration option `preserveTaxonomyNames` was removed in Hugo 0.55.
- You can now use `.Page.Title` on the relevant taxonomy node to get the original value.
++{{< code-toggle file=hugo >}}
 +[taxonomies]
 +  tag = "tags"
 +{{</ code-toggle >}}
 +
 +If you want to disable all taxonomies altogether, see the use of `disableKinds` in [Hugo Taxonomy Defaults](#default-taxonomies).
 +
 +{{% note %}}
 +You can add content and front matter to your taxonomy list and taxonomy terms pages. See [Content Organization](/content-management/organization/) for more information on how to add an `_index.md` for this purpose.
- {{< code-toggle file="content/example.md" fm=true copy=false >}}
 +{{% /note %}}
 +
 +## Add taxonomies to content
 +
 +Once a taxonomy is defined at the site level, any piece of content can be assigned to it, regardless of [content type] or [content section].
 +
 +Assigning content to a taxonomy is done in the [front matter]. Simply create a variable with the *plural* name of the taxonomy and assign all terms you want to apply to the instance of the content type.
 +
 +{{% note %}}
 +If you would like the ability to quickly generate content files with preconfigured taxonomies or terms, read the docs on [Hugo archetypes](/content-management/archetypes/).
 +{{% /note %}}
 +
 +### Example: front matter with taxonomies
 +
- {{< code-toggle copy=false >}}
++{{< code-toggle file=content/example.md fm=true >}}
 +title = "Hugo: A fast and flexible static site generator"
 +tags = [ "Development", "Go", "fast", "Blogging" ]
 +categories = [ "Development" ]
 +series = [ "Go Web Dev" ]
 +slug = "hugo"
 +project_url = "https://github.com/gohugoio/hugo"
 +{{</ code-toggle >}}
 +
 +## Order taxonomies
 +
 +A content file can assign weight for each of its associate taxonomies. Taxonomic weight can be used for sorting or ordering content in [taxonomy list templates] and is declared in a content file's [front matter]. The convention for declaring taxonomic weight is `taxonomyname_weight`.
 +
 +The following show a piece of content that has a weight of 22, which can be used for ordering purposes when rendering the pages assigned to the "a", "b" and "c" values of the `tags` taxonomy. It has also been assigned the weight of 44 when rendering the "d" category page.
 +
 +### Example: taxonomic `weight`
 +
- {{% note %}}
- Currently taxonomies only support the [default `weight => date` ordering of list content](/templates/lists/#default-weight--date--linktitle--filepath). For more information, see the documentation on [taxonomy templates](/templates/taxonomy-templates/).
- {{% /note %}}
++{{< code-toggle >}}
 +title = "foo"
 +tags = [ "a", "b", "c" ]
 +tags_weight = 22
 +categories = ["d"]
 +categories_weight = 44
 +{{</ code-toggle >}}
 +
 +By using taxonomic weight, the same piece of content can appear in different positions in different taxonomies.
 +
- {{< code-toggle file="content/actors/bruce-willis/_index.md" fm=true copy=false >}}
 +## Add custom metadata to a taxonomy or term
 +
 +If you need to add custom metadata to your taxonomy terms, you will need to create a page for that term at `/content/<TAXONOMY>/<TERM>/_index.md` and add your metadata in its front matter. Continuing with our 'Actors' example, let's say you want to add a Wikipedia page link to each actor. Your terms pages would be something like this:
 +
++{{< code-toggle file=content/actors/bruce-willis/_index.md fm=true >}}
 +title: "Bruce Willis"
 +wikipedia: "https://en.wikipedia.org/wiki/Bruce_Willis"
 +{{< /code-toggle >}}
 +
 +[content section]: /content-management/sections/
 +[content type]: /content-management/types/
 +[documentation on archetypes]: /content-management/archetypes/
 +[front matter]: /content-management/front-matter/
 +[taxonomy list templates]: /templates/taxonomy-templates/#taxonomy-list-templates
 +[taxonomy templates]: /templates/taxonomy-templates/
 +[terms within the taxonomy]: /templates/taxonomy-templates/#taxonomy-terms-templates
 +[site configuration]: /getting-started/configuration/
index ca179c77dc178c9157a35cc3b29867f5a74a6b0d,0000000000000000000000000000000000000000..69021ac4577e3be08aa8d8cbf86de2f0fc6ceed9
mode 100644,000000..100644
--- /dev/null
@@@ -1,116 -1,0 +1,117 @@@
- toc: true
 +---
 +title: Table of contents
 +description: Hugo can automatically parse Markdown content and create a Table of Contents you can use in your templates.
 +categories: [content management]
 +keywords: [table of contents, toc]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 210
- A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame. It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer. Gregor then turned to look out the window at the dull weather. Drops
 +weight: 210
++toc: true
 +aliases: [/extras/toc/]
 +---
 +
 +{{% note %}}
 +
 +Previously, there was no out-of-the-box way to specify which heading levels you want the TOC to render. [See the related GitHub discussion (#1778)](https://github.com/gohugoio/hugo/issues/1778). As such, the resulting `<nav id="TableOfContents"><ul></ul></nav>` was going to start at `<h1>` when pulling from `{{ .Content }}`.
 +
 +Hugo [v0.60.0](https://github.com/gohugoio/hugo/releases/tag/v0.60.0) made a switch to [Goldmark](https://github.com/yuin/goldmark/) as the default library for Markdown which has improved and configurable implementation of TOC. Take a look at [how to configure TOC](/getting-started/configuration-markup/#table-of-contents) for Goldmark renderer.
 +
 +{{% /note %}}
 +
 +## Usage
 +
 +Create your Markdown the way you normally would with the appropriate headings. Here is some example content:
 +
 +```md
 +<!-- Your front matter up here -->
 +
 +## Introduction
 +
 +One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin.
 +
 +## My Heading
 +
 +He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment.
 +
 +### My Subheading
 +
- {{< code file="layout/_default/single.html" >}}
++A collection of textile samples lay spread out on the table - Samsa was a traveling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame. It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer. Gregor then turned to look out the window at the dull weather. Drops
 +```
 +
 +Hugo will take this Markdown and create a table of contents from `## Introduction`, `## My Heading`, and `### My Subheading` and then store it in the [page variable][pagevars]`.TableOfContents`.
 +
 +The built-in `.TableOfContents` variables outputs a `<nav id="TableOfContents">` element with a child `<ul>`, whose child `<li>` elements begin with appropriate HTML headings. See [the available settings](/getting-started/configuration-markup/#table-of-contents) to configure what heading levels you want to include in TOC.
 +
 +## Template example: basic TOC
 +
 +The following is an example of a very basic [single page template]:
 +
- {{< code file="layouts/partials/toc.html" >}}
++{{< code file=layout/_default/single.html >}}
 +{{ define "main" }}
 +  <main>
 +    <article>
 +      <header>
 +        <h1>{{ .Title }}</h1>
 +      </header>
 +      {{ .Content }}
 +    </article>
 +    <aside>
 +      {{ .TableOfContents }}
 +    </aside>
 +  </main>
 +{{ end }}
 +{{< /code >}}
 +
 +## Template example: TOC partial
 +
 +The following is a [partial template][partials] that adds slightly more logic for page-level control over your table of contents. It assumes you are using a `toc` field in your content's [front matter] that, unless specifically set to `false`, will add a TOC to any page with a `.WordCount` (see [Page Variables][pagevars]) greater than 400. This example also demonstrates how to use [conditionals] in your templating:
 +
- A collection of textile samples lay spread out on the table - Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame. It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer. Gregor then turned to look out the window at the dull weather. Drops
++{{< code file=layouts/partials/toc.html >}}
 +{{ if and (gt .WordCount 400 ) (.Params.toc) }}
 +<aside>
 +    <header>
 +    <h2>{{ .Title }}</h2>
 +    </header>
 +    {{ .TableOfContents }}
 +</aside>
 +{{ end }}
 +{{< /code >}}
 +
 +{{% note %}}
 +With the preceding example, even pages with > 400 words *and* `toc` not set to `false` will not render a table of contents if there are no headings in the page for the `{{ .TableOfContents }}` variable to pull from.
 +{{% /note %}}
 +
 +## Usage with AsciiDoc
 +
 +Hugo supports table of contents with AsciiDoc content format.
 +
 +In the header of your content file, specify the AsciiDoc TOC directives necessary to ensure that the table of contents is generated. Hugo will use the generated TOC to populate the page variable `.TableOfContents` in the same way as described for Markdown. See example below:
 +
 +```asciidoc
 +// <!-- Your front matter up here -->
 +:toc:
 +// Set toclevels to be at least your hugo [markup.tableOfContents.endLevel] configuration key
 +:toclevels: 4
 +
 +== Introduction
 +
 +One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin.
 +
 +== My Heading
 +
 +He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment.
 +
 +=== My Subheading
 +
++A collection of textile samples lay spread out on the table - Samsa was a traveling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame. It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer. Gregor then turned to look out the window at the dull weather. Drops
 +```
++
 +Hugo will take this AsciiDoc and create a table of contents store it in the page variable `.TableOfContents`, in the same as described for Markdown.
 +
 +[conditionals]: /templates/introduction/#conditionals
 +[front matter]: /content-management/front-matter/
 +[pagevars]: /variables/page/
 +[partials]: /templates/partials/
 +[single page template]: /templates/single-page-templates/
index e72361f1cf88dd4cd546e4cfe5413c9ca3b0ea5a,0000000000000000000000000000000000000000..67dbe15969a7b82f77838ec8cbea748863197ce0
mode 100644,000000..100644
--- /dev/null
@@@ -1,20 -1,0 +1,20 @@@
- keywords: [lists, sections, content types, types, organization]
 +---
 +title: Content types
 +description: Hugo is built around content organized in sections.
 +categories: [content management]
- toc: true
++keywords: [lists,sections,content types,types,organization]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 130
 +weight: 130
++toc: true
 +aliases: [/content/types]
 +---
 +
 +A **content type** is a way to organize your content. Hugo resolves the content type from either the `type` in front matter or, if not set, the first directory in the file path. E.g. `content/blog/my-first-event.md` will be of type `blog` if no `type` is set.
 +
 +A content type is used to
 +
 +- Determine how the content is rendered. See [Template Lookup Order](/templates/lookup-order/) and [Content Views](/templates/views) for more.
 +- Determine which [archetype](/content-management/archetypes/) template to use for new content.
index 60f9615b864a76a7c016310ec706362711e31435,0000000000000000000000000000000000000000..a91fe21c0ac1a13c33e22fad45fc4361717bce47
mode 100644,000000..100644
--- /dev/null
@@@ -1,432 -1,0 +1,432 @@@
- toc: true
 +---
 +title: URL management
 +description: Control the structure and appearance of URLs through front matter entries and settings in your site configuration.
 +categories: [content management]
 +keywords: [aliases,redirects,permalinks,urls]
 +menu:
 +  docs:
 +    parent: content-management
 +    weight: 180
- {{< code-toggle file="content/posts/post-1.md" copy=false fm=true >}}
 +weight: 180
++toc: true
 +aliases: [/extras/permalinks/,/extras/aliases/,/extras/urls/,/doc/redirects/,/doc/alias/,/doc/aliases/]
 +---
 +
 +## Overview
 +
 +By default, when Hugo renders a page, the resulting URL matches the file path within the `content` directory. For example:
 +
 +```text
 +content/posts/post-1.md → https://example.org/posts/post-1/
 +```
 +
 +You can change the structure and appearance of URLs with front matter values and site configuration options.
 +
 +## Front matter
 +
 +### `slug`
 +
 +Set the `slug` in front matter to override the last segment of the path. The `slug` value does not affect section pages.
 +
- {{< code-toggle file="content/posts/post-1.md" copy=false fm=true >}}
++{{< code-toggle file=content/posts/post-1.md fm=true >}}
 +title = 'My First Post'
 +slug = 'my-first-post'
 +{{< /code-toggle >}}
 +
 +The resulting URL will be:
 +
 +```text
 +https://example.org/posts/my-first-post/
 +```
 +
 +### `url`
 +
 +Set the `url` in front matter to override the entire path. Use this with either regular pages or section pages.
 +
 +With this front matter:
 +
- {{< code-toggle file="content/posts/post-1.md" copy=false fm=true >}}
++{{< code-toggle file=content/posts/post-1.md fm=true >}}
 +title = 'My First Article'
 +url = '/articles/my-first-article'
 +{{< /code-toggle >}}
 +
 +The resulting URL will be:
 +
 +```text
 +https://example.org/articles/my-first-article/
 +```
 +
 +If you include a file extension:
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle file=content/posts/post-1.md fm=true >}}
 +title = 'My First Article'
 +url = '/articles/my-first-article.html'
 +{{< /code-toggle >}}
 +
 +The resulting URL will be:
 +
 +```text
 +https://example.org/articles/my-first-article.html
 +```
 +
 +In a monolingual site, a `url` value with or without a leading slash is relative to the `baseURL`.
 +
 +In a multilingual site:
 +
 +- A `url` value with a leading slash is relative to the `baseURL`.
 +- A `url` value without a leading slash is relative to the `baseURL` plus the language prefix.
 +
 +Site type|Front matter `url`|Resulting URL
 +:--|:--|:--
 +monolingual|`/about`|`https://example.org/about/`
 +monolingual|`about`|`https://example.org/about/`
 +multilingual|`/about`|`https://example.org/about/`
 +multilingual|`about`|`https://example.org/de/about/`
 +
 +If you set both `slug` and `url` in front matter, the `url` value takes precedence.
 +
 +## Site configuration
 +
 +### Permalinks
 +
 +In your site configuration, define a URL pattern for each top-level section. Each URL pattern can target a given language and/or [page kind].
 +
 +Front matter `url` values override the URL patterns defined in the `permalinks` section of your site configuration.
 +
 +[page kind]: /templates/section-templates/#page-kinds
 +
 +#### Monolingual examples {#permalinks-monolingual-examples}
 +
 +With this content structure:
 +
 +```text
 +content/
 +├── posts/
 +│   ├── bash-in-slow-motion.md
 +│   └── tls-in-a-nutshell.md
 +├── tutorials/
 +│   ├── git-for-beginners.md
 +│   └── javascript-bundling-with-hugo.md
 +└── _index.md
 +```
 +
 +Render tutorials under "training", and render the posts under "articles" with a date-base hierarchy:
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle file=hugo >}}
 +[permalinks.page]
 +posts = '/articles/:year/:month/:slug/'
 +tutorials = '/training/:slug/'
 +[permalinks.section]
 +posts = '/articles/'
 +tutorials = '/training/'
 +{{< /code-toggle >}}
 +
 +The structure of the published site will be:
 +
 +```text
 +public/
 +├── articles/
 +│   ├── 2023/
 +│   │   ├── 04/
 +│   │   │   └── bash-in-slow-motion/
 +│   │   │       └── index.html
 +│   │   └── 06/
 +│   │       └── tls-in-a-nutshell/
 +│   │           └── index.html
 +│   └── index.html
 +├── training/
 +│   ├── git-for-beginners/
 +│   │   └── index.html
 +│   ├── javascript-bundling-with-hugo/
 +│   │   └── index.html
 +│   └── index.html
 +└── index.html
 +```
 +
 +To create a date-based hierarchy for regular pages in the content root:
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle file=hugo >}}
 +[permalinks.page]
 +"/" = "/:year/:month/:slug/"
 +{{< /code-toggle >}}
 +
 +Use the same approach with taxonomy terms. For example, to omit the taxonomy segment of the URL:
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle file=hugo >}}
 +[permalinks.term]
 +'tags' = '/:slug/'
 +{{< /code-toggle >}}
 +
 +#### Multilingual example {#permalinks-multilingual-example}
 +
 +Use the `permalinks` configuration as a component of your localization strategy.
 +
 +With this content structure:
 +
 +```text
 +content/
 +├── en/
 +│   ├── books/
 +│   │   ├── les-miserables.md
 +│   │   └── the-hunchback-of-notre-dame.md
 +│   └── _index.md
 +└── es/
 +    ├── books/
 +    │   ├── les-miserables.md
 +    │   └── the-hunchback-of-notre-dame.md
 +    └── _index.md
 +```
 +
 +And this site configuration:
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle file=hugo >}}
 +defaultContentLanguage = 'en'
 +defaultContentLanguageInSubdir = true
 +
 +[languages.en]
 +contentDir = 'content/en'
 +languageCode = 'en-US'
 +languageDirection = 'ltr'
 +languageName = 'English'
 +weight = 1
 +
 +[languages.en.permalinks.page]
 +books = "/books/:slug/"
 +
 +[languages.en.permalinks.section]
 +books = "/books/"
 +
 +[languages.es]
 +contentDir = 'content/es'
 +languageCode = 'es-ES'
 +languageDirection = 'ltr'
 +languageName = 'Español'
 +weight = 2
 +
 +[languages.es.permalinks.page]
 +books = "/libros/:slug/"
 +
 +[languages.es.permalinks.section]
 +books = "/libros/"
 +{{< /code-toggle >}}
 +
 +The structure of the published site will be:
 +
 +```text
 +public/
 +├── en/
 +│   ├── books/
 +│   │   ├── les-miserables/
 +│   │   │   └── index.html
 +│   │   ├── the-hunchback-of-notre-dame/
 +│   │   │   └── index.html
 +│   │   └── index.html
 +│   └── index.html
 +├── es/
 +│   ├── libros/
 +│   │   ├── les-miserables/
 +│   │   │   └── index.html
 +│   │   ├── the-hunchback-of-notre-dame/
 +│   │   │   └── index.html
 +│   │   └── index.html
 +│   └── index.html
 +└── index.html
 +````
 +
 +#### Tokens
 +
 +Use these tokens when defining the URL pattern. The `date` field in front matter determines the value of time-related tokens.
 +
 +`:year`
 +: the 4-digit year
 +
 +`:month`
 +: the 2-digit month
 +
 +`:monthname`
 +: the name of the month
 +
 +`:day`
 +: the 2-digit day
 +
 +`:weekday`
 +: the 1-digit day of the week (Sunday = 0)
 +
 +`:weekdayname`
 +: the name of the day of the week
 +
 +`:yearday`
 +: the 1- to 3-digit day of the year
 +
 +`:section`
 +: the content's section
 +
 +`:sections`
 +: the content's sections hierarchy. You can use a selection of the sections using _slice syntax_: `:sections[1:]` includes all but the first, `:sections[:last]` includes all but the last, `:sections[last]` includes only the last, `:sections[1:2]` includes section 2 and 3. Note that this slice access will not throw any out-of-bounds errors, so you don't have to be exact.
 +
 +`:title`
 +: the content's title
 +
 +`:slug`
 +: the content's slug (or title if no slug is provided in the front matter)
 +
 +`:slugorfilename`
 +: the content's slug (or file name if no slug is provided in the front matter)
 +
 +`:filename`
 +: the content's file name (without extension)
 +
 +For time-related values, you can also use the layout string components defined in Go's [time package]. For example:
 +
 +[time package]: https://pkg.go.dev/time#pkg-constants
 +
- {{< code-toggle file="hugo" copy=false >}}
++{{< code-toggle file=hugo >}}
 +permalinks:
 +  posts: /:06/:1/:2/:title/
 +{{< /code-toggle >}}
 +
 +### Appearance
 +
 +The appearance of a URL is either ugly or pretty.
 +
 +Type|Path|URL
 +:--|:--|:--
 +ugly|content/about.md|`https://example.org/about.html`
 +pretty|content/about.md|`https://example.org/about/`
 +
 +By default, Hugo produces pretty URLs. To generate ugly URLs, change your site configuration:
 +
- ```text
++{{< code-toggle file=hugo >}}
 +uglyURLs = true
 +{{< /code-toggle >}}
 +
 +### Post-processing
 +
 +Hugo provides two mutually exclusive configuration options to alter URLs _after_ it renders a page.
 +
 +#### Canonical URLs
 +
 +{{% note %}}
 +This is a legacy configuration option, superseded by template functions and markdown render hooks, and will likely be [removed in a future release].
 +
 +[removed in a future release]: https://github.com/gohugoio/hugo/issues/4733
 +{{% /note %}}
 +
 +If enabled, Hugo performs a search and replace _after_ it renders the page. It searches for site-relative URLs (those with a leading slash) associated with `action`, `href`, `src`, `srcset`, and `url` attributes. It then prepends the `baseURL` to create absolute URLs.
 +
- {{< code-toggle file="hugo" copy=false >}}
++```html
 +<a href="/about"> → <a href="https://example.org/about/">
 +<img src="/a.gif"> → <img src="https://example.org/a.gif">
 +```
 +
 +This is an imperfect, brute force approach that can affect content as well as HTML attributes. As noted above, this is a legacy configuration option that will likely be removed in a future release.
 +
 +To enable:
 +
- ```text
++{{< code-toggle file=hugo >}}
 +canonifyURLs = true
 +{{< /code-toggle >}}
 +
 +#### Relative URLs
 +
 +{{% note %}}
 +Do not enable this option unless you are creating a serverless site, navigable via the file system.
 +{{% /note %}}
 +
 +If enabled, Hugo performs a search and replace _after_ it renders the page. It searches for site-relative URLs (those with a leading slash) associated with `action`, `href`, `src`, `srcset`, and `url` attributes. It then transforms the URL to be relative to the current page.
 +
 +For example, when rendering `content/posts/post-1`:
 +
- {{< code-toggle file="hugo" copy=false >}}
++```html
 +<a href="/about"> → <a href="../../about">
 +<img src="/a.gif"> → <img src="../../a.gif">
 +```
 +
 +This is an imperfect, brute force approach that can affect content as well as HTML attributes. As noted above, do not enable this option unless you are creating a serverless site.
 +
 +To enable:
 +
- {{< code-toggle file="content/posts/new-file-name.md" copy=false >}}
++{{< code-toggle file=hugo >}}
 +relativeURLs = true
 +{{< /code-toggle >}}
 +
 +## Aliases
 +
 +Create redirects from old URLs to new URLs with aliases:
 +
 +- An alias with a leading slash is relative to the `baseURL`
 +- An alias without a leading slash is relative to the current directory
 +
 +### Examples {#alias-examples}
 +
 +Change the file name of an existing page, and create an alias from the previous URL to the new URL:
 +
- {{< code-toggle file="content/posts/new-file-name.md" copy=false >}}
++{{< code-toggle file=content/posts/new-file-name.md >}}
 +aliases = ['/posts/previous-file-name']
 +{{< /code-toggle >}}
 +
 +Each of these directory-relative aliases is equivalent to the site-relative alias above:
 +
 +- `previous-file-name`
 +- `./previous-file-name`
 +- `../posts/previous-file-name`
 +
 +You can create more than one alias to the current page:
 +
- {{< code-toggle file="content/posts/new-file-name.de.md" copy=false >}}
++{{< code-toggle file=content/posts/new-file-name.md >}}
 +aliases = ['previous-file-name','original-file-name']
 +{{< /code-toggle >}}
 +
 +In a multilingual site, use a directory-relative alias, or include the language prefix with a site-relative alias:
 +
- {{< code file="posts/previous-file-name/index.html" copy=false >}}
++{{< code-toggle file=content/posts/new-file-name.de.md >}}
 +aliases = ['/de/posts/previous-file-name']
 +{{< /code-toggle >}}
 +
 +### How aliases work
 +
 +Using the first example above, Hugo generates the following site structure:
 +
 +```text
 +public/
 +├── posts/
 +│   ├── new-file-name/
 +│   │   └── index.html
 +│   ├── previous-file-name/
 +│   │   └── index.html
 +│   └── index.html
 +└── index.html
 +```
 +
 +The alias from the previous URL to the new URL is a client-side redirect:
 +
- `Permalink`
++{{< code file=posts/previous-file-name/index.html >}}
 +<!DOCTYPE html>
 +<html lang="en-us">
 +  <head>
 +    <title>https://example.org/posts/new-file-name/</title>
 +    <link rel="canonical" href="https://example.org/posts/new-file-name/">
 +    <meta name="robots" content="noindex">
 +    <meta charset="utf-8">
 +    <meta http-equiv="refresh" content="0; url=https://example.org/posts/new-file-name/">
 +  </head>
 +</html>
 +{{< /code >}}
 +
 +Collectively, the elements in the `head` section:
 +
 +- Tell search engines that the new URL is canonical
 +- Tell search engines not to index the previous URL
 +- Tell the browser to redirect to the new URL
 +
 +Hugo renders alias files before rendering pages. A new page with the previous file name will overwrite the alias, as expected.
 +
 +### Customize
 +
 +Create a new template (`layouts/alias.html`) to customize the content of the alias files. The template receives the following context:
 +
- `Page`
++Permalink
 +: the link to the page being aliased
 +
++Page
 +: the Page data for the page being aliased
index 77a5cdb4dcffe6d415a3462421a24cb95b0df127,0000000000000000000000000000000000000000..ca7a18c3642259147f609b7c0e406ad00edfe56a
mode 100644,000000..100644
--- /dev/null
@@@ -1,18 -1,0 +1,16 @@@
- description: Contribute to Hugo development and documentation.
- categories: [contribute]
 +---
 +title: Contribute to the Hugo project
 +linkTitle: Overview
- Hugo relies heavily on the enthusiasm and participation of the open-source community. We need your support in both its development and documentation.
- Hugo's contribution guidelines are [detailed in a `CONTRIBUTING.md`](https://github.com/gohugoio/hugo/blob/master/CONTRIBUTING.md) in the Hugo source repository on GitHub.
++description: Contribute to Hugo development, documentation, and themes.
++categories: []
 +keywords: []
 +menu:
 +  docs:
 +    identifier: contribute-overview
 +    parent: contribute
 +    weight: 10
 +weight: 10
 +aliases: [/tutorials/how-to-contribute-to-hugo/,/community/contributing/]
 +---
 +
++Hugo relies heavily on the enthusiasm and participation of the open-source community. We need your support.
index 7bc201288a88eedd449ddc105f62ac8e58d0d3d8,0000000000000000000000000000000000000000..b4de88256085331f2f65c89ef7d4b78be1fa7200
mode 100644,000000..100644
--- /dev/null
@@@ -1,431 -1,0 +1,430 @@@
- title: Contribute to development
- linkTitle: Development
- description: Hugo relies heavily on contributions from the open source community.
 +---
- keywords: [dev,open source]
++title: Development
++description: Contribute to the development of Hugo.
 +categories: [contribute]
- {{< code file="install-go.sh" >}}
++keywords: [development]
 +menu:
 +  docs:
 +    parent: contribute
 +    weight: 20
 +weight: 20
 +toc: true
 +---
 +
 +## Introduction
 +
 +Hugo is an open-source project and lives by the work of its [contributors]. There are plenty of [open issues][issues], and we need your help to make Hugo even more awesome. You don't need to be a Go guru to contribute to the project's development.
 +
 +## Assumptions
 +
 +This contribution guide takes a step-by-step approach in hopes of helping newcomers. Therefore, we only assume the following:
 +
 +* You are new to Git or open-source projects in general
 +* You are a fan of Hugo and enthusiastic about contributing to the project
 +
 +{{% note %}}
 +If you're struggling at any point in this contribution guide, reach out to the Hugo community in [Hugo's Discussion forum](https://discourse.gohugo.io).
 +{{% /note %}}
 +
 +## Install Go
 +
 +The installation of Go should take only a few minutes. You have more than one option to get Go up and running on your machine.
 +
 +If you are having trouble following the installation guides for Go, check out [Go Bootcamp, which contains setups for every platform][gobootcamp] or reach out to the Hugo community in the [Hugo Discussion Forums][forums].
 +
 +### Install Go from source
 +
 +[Download the latest stable version of Go][godl] and follow the official [Go installation guide][goinstall].
 +
 +Once you're finished installing Go, let's confirm everything is working correctly. Open a terminal---or command line under Windows--and type the following:
 +
 +```txt
 +go version
 +```
 +
 +You should see something similar to the following written to the console. Note that the version here reflects the most recent version of Go as of the last update for this page:
 +
 +```txt
 +go version go1.12 darwin/amd64
 +```
 +
 +Next, make sure that you set up your `GOPATH` [as described in the installation guide][setupgopath].
 +
 +You can print the `GOPATH` with `echo $GOPATH`. You should see a non-empty string containing a valid path to your Go workspace; for example:
 +
 +```txt
 +/Users/<yourusername>/Code/go
 +```
 +
 +### Install Go with Homebrew
 +
 +If you are a macOS user and have [Homebrew](https://brew.sh/) installed on your machine, installing Go is as simple as the following command:
 +
- {{% warning "Be Careful Modifying Multiple Commits"%}}
++{{< code file=install-go.sh >}}
 +brew install go
 +{{< /code >}}
 +
 +### Install Go via GVM
 +
 +More experienced users can use the [Go Version Manager][gvm] (GVM). GVM allows you to switch between different Go versions *on the same machine*. If you're a beginner, you probably don't need this feature. However, GVM makes it easy to upgrade to a new released Go version with just a few commands.
 +
 +GVM comes in especially handy if you follow the development of Hugo over a longer period of time. Future versions of Hugo will usually be compiled with the latest version of Go. Sooner or later, you will have to upgrade if you want to keep up.
 +
 +## Create a GitHub account
 +
 +If you're going to contribute code, you'll need to have an account on GitHub. Go to [www.github.com/join](https://github.com/join) and set up a personal account.
 +
 +## Install Git on your system
 +
 +You will need to have Git installed on your computer to contribute to Hugo development. Teaching Git is outside the scope of the Hugo docs, but if you're looking for an excellent reference to learn the basics of Git, we recommend the [Git book][gitbook] if you are not sure where to begin. We will include short explanations of the Git commands in this document.
 +
 +Git is a [version control system](https://en.wikipedia.org/wiki/Version_control) to track the changes of source code. Hugo depends on smaller third-party packages that are used to extend the functionality. We use them because we don't want to reinvent the wheel.
 +
 +Go ships with a sub-command called `get` that will download these packages for us when we set up our working environment. The source code of the packages is tracked with Git. `get` will interact with the Git servers of the package hosters in order to fetch all dependencies.
 +
 +Move back to the terminal and check if Git is already installed. Type in `git version` and press enter. You can skip the rest of this section if the command returned a version number. Otherwise [download](https://git-scm.com/downloads) the latest version of Git and follow this [installation guide](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
 +
 +Finally, check again with `git version` if Git was installed successfully.
 +
 +### Git graphical front ends
 +
 +There are several [GUI clients](https://git-scm.com/downloads/guis) that help you to operate Git. Not all are available for all operating systems and maybe differ in their usage. Because of this we will document how to use the command-line, since the commands are the same everywhere.
 +
 +### Install Hub on your system (optional)
 +
 +Hub is a great tool for working with GitHub. The main site for it is [hub.github.com](https://hub.github.com/). Feel free to install this little Git wrapper.
 +
 +On a Mac, you can install [Hub](https://github.com/github/hub) using [Homebrew](https://brew.sh):
 +
 +```txt
 +brew install hub
 +```
 +
 +Now we'll create an [alias in Bash](https://tldp.org/LDP/abs/html/aliases.html) so that typing `git` actually runs `Hub`:
 +
 +```txt
 +echo "alias git='hub'" >> ~/.bash_profile
 +```
 +
 +Confirm the installation:
 +
 +```txt
 +git version 2.21.0
 +hub version 2.10.0
 +```
 +
 +## Set up your working copy
 +
 +You set up the working copy of the repository locally on your computer. Your local copy of the files is what you'll edit, compile, and end up pushing back to GitHub. The main steps are cloning the repository and creating your fork as a remote.
 +
 +### Clone the repository
 +
 +We assume that you've set up your `GOPATH` (see the section above if you're unsure about this). You should now copy the Hugo repository down to your computer. You'll hear this called "clone the repo". GitHub's [help pages](https://help.github.com/articles/cloning-a-repository/) give us a short explanation:
 +
 +{{% note %}}
 +When you create a repository on GitHub, it exists as a remote repository. You can create a local clone of your repository on your computer and sync between the two locations.
 +{{% /note %}}
 +
 +We're going to clone the [master Hugo repository](https://github.com/gohugoio/hugo). That seems counter-intuitive, since you won't have commit rights on it. But it's required for the Go workflow. You'll work on a copy of the master and push your changes to your own repository on GitHub.
 +
 +So, let's make a new directory and clone that master repository:
 +
 +```txt
 +mkdir $HOME/src
 +cd $HOME/src
 +git clone https://github.com/gohugoio/hugo.git
 +```
 +
 +Since Hugo 0.48, Hugo uses the Go Modules support built into Go 1.11 to build. The easiest is to clone Hugo in a directory outside of GOPATH
 +
 +And then, install dependencies of Hugo by running the following in the cloned directory:
 +
 +```txt
 +cd $HOME/src/hugo
 +go install
 +```
 +
 +Hugo relies on [mage](https://github.com/magefile/mage) for some convenient build and test targets. If you don't already have it, get it:
 +
 +```txt
 +go install github.com/magefile/mage@latest
 +```
 +
 +### Fork the repository
 +
 +If you're not familiar with this term, GitHub's [help pages](https://help.github.com/articles/fork-a-repo/) provide again a simple explanation:
 +
 +{{% note %}}
 +A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.
 +{{% /note %}}
 +
 +#### Fork by hand
 +
 +Open the [Hugo repository](https://github.com/gohugoio/hugo) on GitHub and click on the "Fork" button in the top right.
 +
 +![Fork button](/images/contribute/development/forking-a-repository.png)
 +
 +Now open your fork repository on GitHub and copy the remote URL of your fork. You can choose between HTTPS and SSH as protocol that Git should use for the following operations. HTTPS works always [if you're not sure](https://help.github.com/articles/which-remote-url-should-i-use/).
 +
 +![Copy remote url](/images/contribute/development/copy-remote-url.png)
 +
 +Switch back to the terminal and move into the directory of the cloned master repository from the last step.
 +
 +```txt
 +cd $HOME/src/hugo
 +```
 +
 +Now Git needs to know that our fork exists by adding the copied remote url:
 +
 +```txt
 +git remote add <YOUR-GITHUB-USERNAME> <COPIED REMOTE-URL>
 +```
 +
 +#### Fork with Hub
 +
 +Alternatively, you can use the Git wrapper Hub. Hub makes forking a repository easy:
 +
 +```txt
 +git fork
 +```
 +
 +That command will log in to GitHub using your account, create a fork of the repository that you're currently working in, and add it as a remote to your working copy.
 +
 +#### Trust, but verify
 +
 +Let's check if everything went right by listing all known remotes:
 +
 +```txt
 +git remote -v
 +```
 +
 +The output should look similar:
 +
 +```txt
 +digitalcraftsman    git@github.com:digitalcraftsman/hugo.git (fetch)
 +digitalcraftsman    git@github.com:digitalcraftsman/hugo.git (push)
 +origin  https://github.com/gohugoio/hugo (fetch)
 +origin  https://github.com/gohugoio/hugo (push)
 +```
 +
 +## The Hugo Git contribution workflow
 +
 +### Create a new branch
 +
 +You should never develop against the "master" branch. The development team will not accept a pull request against that branch. Instead, create a descriptive named branch and work on it.
 +
 +First, you should always pull the latest changes from the master repository:
 +
 +```txt
 +git checkout master
 +git pull
 +```
 +
 +Now we can create a new branch for your additions:
 +
 +```txt
 +git checkout -b <BRANCH-NAME>
 +```
 +
 +You can check on which branch you are with `git branch`. You should see a list of all local branches. The current branch is indicated with a little asterisk.
 +
 +### Contribute to documentation
 +
 +Perhaps you want to start contributing to the Hugo docs. If so, you can ignore most of the following steps and focus on the `/docs` directory within your newly cloned repository. You can change directories into the Hugo docs using `cd docs`.
 +
 +You can start Hugo's built-in server via `hugo server`. Browse the documentation by entering [http://localhost:1313](http://localhost:1313) in the address bar of your browser. The server automatically updates the page whenever you change content.
 +
 +We have developed a [separate Hugo documentation contribution guide][docscontrib] for more information on how the Hugo docs are built, organized, and improved by the generosity of people like you.
 +
 +### Build Hugo
 +
 +While making changes in the codebase it's a good idea to build the binary to test them:
 +
 +```txt
 +mage hugo
 +```
 +
 +This command generates the binary file at the root of the repository.
 +
 +If you want to install the binary in `$GOPATH/bin`, run
 +
 +```txt
 +mage install
 +```
 +
 +### Test
 +
 +Sometimes changes on the codebase can cause unintended side effects. Or they don't work as expected. Most functions have their own test cases. You can find them in files ending with `_test.go`.
 +
 +Make sure the commands
 +
 +```txt
 +mage -v check
 +```
 +
 +passes.
 +
 +### Formatting
 +
 +The Go code style guide maybe is opinionated but it ensures that the codebase looks the same, regardless who wrote the code. Go comes with its own formatting tool. Let's apply the style guide to our additions:
 +
 +```txt
 +mage fmt
 +```
 +
 +Once you made your additions commit your changes. Make sure that you follow our [code contribution guidelines](https://github.com/gohugoio/hugo/blob/master/CONTRIBUTING.md):
 +
 +```txt
 +# Add all changed files
 +git add --all
 +git commit --message "YOUR COMMIT MESSAGE"
 +```
 +
 +The commit message should describe what the commit does (e.g. add feature XYZ), not how it is done.
 +
 +### Modify commits
 +
 +You noticed some commit messages don't fulfill the code contribution guidelines or you just forget something to add some files? No problem. Git provides the necessary tools to fix such problems. The next two methods cover all common cases.
 +
 +If you are unsure what a command does leave the commit as it is. We can fix your commits later in the pull request.
 +
 +#### Modify the last commit
 +
 +Let's say you want to modify the last commit message. Run the following command and replace the current message:
 +
 +```txt
 +git commit --amend -m"YOUR NEW COMMIT MESSAGE"
 +```
 +
 +Take a look at the commit log to see the change:
 +
 +```txt
 +git log
 +# Exit with q
 +```
 +
 +After making the last commit you may have forgotten something. There is no need to create a new commit. Just add the latest changes and merge them into the intended commit:
 +
 +```txt
 +git add --all
 +git commit --amend
 +```
 +
 +#### Modify multiple commits
 +
- pick 80d02a1 tpl: Add hasPrefix to the template funcs' "smoke test"
++{{% note %}}
 +Modifications such as those described in this section can have serious unintended consequences. Skip this section if you're not sure!
 +{{% /note %}}
 +
 +This is a bit more advanced. Git allows you to [rebase](https://git-scm.com/docs/git-rebase) commits interactively. In other words: it allows you to rewrite the commit history.
 +
 +```txt
 +git rebase --interactive @~6
 +```
 +
 +The `6` at the end of the command represents the number of commits that should be modified. An editor should open and present a list of last six commit messages:
 +
 +```txt
- pick 80d02a1 tpl: Add hasPrefix to the template funcs' "smoke test"
++pick 80d02a1 tpl: Add hasPrefix to template function smoke test"
 +pick aaee038 tpl: Sort the smoke tests
 +pick f0dbf2c tpl: Add the other test case for hasPrefix
 +pick 911c35b Add "How to contribute to Hugo" tutorial
 +pick 33c8973 Begin workflow
 +pick 3502f2e Refactoring and typo fixes
 +```
 +
 +In the case above we should merge the last two commits in the commit of this tutorial (`Add "How to contribute to Hugo" tutorial`). You can "squash" commits, i.e. merge two or more commits into a single one.
 +
 +All operations are written before the commit message. Replace "pick" with an operation. In this case `squash` or `s` for short:
 +
 +```txt
- pick 80d02a1 tpl: Add hasPrefix to the template funcs' "smoke test"
++pick 80d02a1 tpl: Add hasPrefix to template function smoke test"
 +pick aaee038 tpl: Sort the smoke tests
 +pick f0dbf2c tpl: Add the other test case for hasPrefix
 +pick 911c35b Add "How to contribute to Hugo" tutorial
 +squash 33c8973 Begin workflow
 +squash 3502f2e Refactoring and typo fixes
 +```
 +
 +We also want to rewrite the commits message of the third last commit. We forgot "docs:" as prefix according to the code contribution guidelines. The operation to rewrite a commit is called `reword` (or `r` as shortcut).
 +
 +You should end up with a similar setup:
 +
 +```txt
++pick 80d02a1 tpl: Add hasPrefix to template function smoke test"
 +pick aaee038 tpl: Sort the smoke tests
 +pick f0dbf2c tpl: Add the other test case for hasPrefix
 +reword 911c35b Add "How to contribute to Hugo" tutorial
 +squash 33c8973 Begin workflow
 +squash 3502f2e Refactoring and typo fixes
 +```
 +
 +Close the editor. It should open again with a new tab. A text is instructing you to define a new commit message for the last two commits that should be merged (aka "squashed"). Save the file with <kbd>CTRL</kbd>+<kbd>S</kbd> and close the editor again.
 +
 +A last time a new tab opens. Enter a new commit message and save again. Your terminal should contain a status message. Hopefully this one:
 +
 +```txt
 +Successfully rebased and updated refs/heads/<BRANCHNAME>.
 +```
 +
 +Check the commit log if everything looks as expected. Should an error occur you can abort this rebase with `git rebase --abort`.
 +
 +### Push commits
 +
 +To push our commits to the fork on GitHub we need to specify a destination. A destination is defined by the remote and a branch name. Earlier, the defined that the remote URL of our fork is the same as our GitHub handle, in my case `digitalcraftsman`. The branch should have the same as our local one. This makes it easy to identify corresponding branches.
 +
 +```txt
 +git push --set-upstream <YOUR-GITHUB-USERNAME> <BRANCHNAME>
 +```
 +
 +Now Git knows the destination. Next time when you to push commits you just need to enter `git push`.
 +
 +If you modified your commit history in the last step GitHub will reject your try to push. This is a safety-feature because the commit history isn't the same and new commits can't be appended as usual. You can enforce this push explicitly with `git push --force`.
 +
 +## Open a pull request
 +
 +We made a lot of progress. Good work. In this step we finally open a pull request to submit our additions. Open the [Hugo master repository](https://github.com/gohugoio/hugo/) on GitHub in your browser.
 +
 +You should find a green button labeled with "New pull request". But GitHub is clever and probably suggests you a pull request like in the beige box below:
 +
 +![Open a pull request](/images/contribute/development/open-pull-request.png)
 +
 +The new page summaries the most important information of your pull request. Scroll down and you find the additions of all your commits. Make sure everything looks as expected and click on "Create pull request".
 +
 +### Accept the contributor license agreement
 +
 +Last but not least you should accept the contributor license agreement (CLA). A new comment should be added automatically to your pull request. Click on the yellow badge, accept the agreement and authenticate yourself with your GitHub account. It just takes a few clicks and only needs to be done once.
 +
 +![Accept the CLA](/images/contribute/development/accept-cla.png)
 +
 +### Automatic builds
 +
 +We use a GitHub Actions workflow to build and test. This is a matrix build across combinations of operating system (macOS, Windows, and Ubuntu) and Go versions. The workflow is triggered by the submission of a pull request. If you are a first-time contributor, the workflow requires approval from a project maintainer.
 +
 +## Where to start?
 +
 +Thank you for reading through this contribution guide. Hopefully, we will see you again soon on GitHub. There are plenty of [open issues][issues] for you to help with.
 +
 +Feel free to [open an issue][newissue] if you think you found a bug or you have a new idea to improve Hugo. We are happy to hear from you.
 +
 +## Additional references for learning Git and Go
 +
 +* [Codecademy's Free "Learn Git" Course][codecademy] (Free)
 +* [Code School and GitHub's "Try Git" Tutorial][trygit] (Free)
 +* [The Git Book][gitbook] (Free)
 +* [Go Bootcamp][gobootcamp]
 +
 +[codecademy]: https://www.codecademy.com/learn/learn-git
 +[contributors]: https://github.com/gohugoio/hugo/graphs/contributors
 +[docscontrib]: /contribute/documentation/
 +[forums]: https://discourse.gohugo.io
 +[gitbook]: https://git-scm.com/
 +[gobootcamp]: https://www.golang-book.com/guides/machine_setup
 +[godl]: https://go.dev/dl/
 +[goinstall]: https://go.dev/doc/install
 +[gvm]: https://github.com/moovweb/gvm
 +[issues]: https://github.com/gohugoio/hugo/issues
 +[newissue]: https://github.com/gohugoio/hugo/issues/new
 +[releases]: /getting-started/
 +[setupgopath]: https://go.dev/doc/code#Workspaces
 +[trygit]: https://try.github.io/levels/1/challenges/1
index 03939f837dc51eb2b9eb55685eaedec1f12f486c,0000000000000000000000000000000000000000..14df5cdee3f6e0a728a98a06b1d03177de1da020
mode 100644,000000..100644
--- /dev/null
@@@ -1,176 -1,0 +1,375 @@@
- title: Contribute to documentation
- linkTitle: Documentation
- description: Documentation is an integral part of any open source project. The Hugo documentation is as much a work in progress as the source it attempts to cover.
 +---
- keywords: [docs,documentation,community, contribute]
++title: Documentation
++description: Help us to improve the documentation by identifying issues and suggesting changes.
 +categories: [contribute]
- toc: true
++keywords: [documentation]
 +menu:
 +  docs:
 +    parent: contribute
 +    weight: 30
- ## GitHub workflow
 +weight: 30
++toc: true
 +aliases: [/contribute/docs/]
 +---
 +
- Step 1
- : Fork the [documentation repository].
++## Introduction
 +
- Step 2
- : Clone your fork.
++We welcome corrections and improvements to the documentation. Please note that the documentation resides in its own repository, separate from the project repository.
 +
- Step 3
- : Create a new branch with a descriptive name.
++For corrections and improvements to the current documentation, please submit issues and pull requests to the [documentation repository].
 +
- ```bash
- git checkout -b fix/typos-site-variables
- ```
++For documentation related to a new feature, please include the documentation changes when you submit a pull request to the [project repository].
 +
- Step 4
- : Make changes.
++## Guidelines
 +
- Step 5
- : Commit your changes with a descriptive commit message, typically 50 characters or less. Included the "Closes" keyword if your change addresses one or more open [issues].
++### Markdown
 +
- ```bash
- git commit -m "Fix typos on site variables page
++Please follow these markdown guidelines:
 +
- Closes #1234
- Closes #5678"
- ```
++- Use [ATX] headings, not [setext] headings, levels 2 through 4
++- Use [fenced code blocks], not [indented code blocks]
++- Use hyphens, not asterisks, with unordered [list items]
++- Use the [note shortcode] instead of blockquotes
++- Do not mix [raw HTML] within markdown
++- Do not use bold text instead of a heading or description term (`dt`)
++- Remove consecutive blank lines (maximum of two)
++- Remove trailing spaces
 +
- Step 5
- : Push the new branch to your fork of the documentation repository.
++### Style
 +
- Step 6
- : Visit the [documentation repository] and create a pull request (PR).
++Although we do not strictly adhere to the [Microsoft Writing Style Guide], it is an excellent resource for questions related to style, grammar, and voice.
 +
- [documentation repository]: https://github.com/gohugoio/hugoDocs/
- [issues]: https://github.com/gohugoio/hugoDocs/issues
++#### Terminology
 +
- Step 7
- : A project maintainer will review your PR, and may request changes. You may delete your branch after the maintainer merges your PR.
++Please link to the [glossary of terms] when necessary, and use the terms consistently throughout the documentation. Of special note:
 +
- ## Including sample code
++- The term "front matter" is two words unless you are referring to the configuration key
++- Use the word "map" instead of "dictionary"
++- Use the word "flag" instead of "option" when referring to a command line flag
 +
- {{% note %}}
- Use this syntax to include shortcodes calls within your code samples:
++#### Page titles and headings
 +
- `{{</*/* foo */*/>}}`\
- `{{%/*/* foo */*/%}}`
++Please follow these guidelines for page titles and headings:
++
++- Use sentence-style capitalization
++- Avoid markdown in headings and page titles
++- Shorter is better
++
++#### Use active voice with present tense
++
++In software documentation, passive voice is unavoidable in some cases. Please use active voice when possible.
++
++No → With Hugo you can build a static site.\
++Yes → Build a static site with Hugo.
++
++No → This will cause Hugo to generate HTML files in the public directory.\
++Yes → Hugo generates HTML files in the public directory.
++
++#### Use second person instead of third person
++
++No → Users should exercise caution when deleting files.\
++Better → You must be cautious when deleting files.\
++Best → Be cautious when deleting files.
++
++#### Avoid adverbs when possible
 +
- Include the language when using a fenced code block.
++No → Hugo is extremely fast.\
++Yes → Hugo is fast.
++
++{{% note %}}
++"It's an adverb, Sam. It's a lazy tool of a weak mind." (Outbreak, 1995).
 +{{% /note %}}
 +
++#### Miscellaneous
++
++Other guidelines to consider:
++
++- Do not place list items directly under a heading; include an introductory sentence or phrase before the list.
++- Avoid use of **bold** text. Use the [note shortcode] to draw attention to important content.
++- Do not place description terms (`dt`) within backticks unless required for syntactic clarity.
++- Do not use Hugo's `ref` or `relref` shortcodes. We use a link render hook to resolve and validate link destinations, including fragments.
++- Shorter is better. If there is more than one way to do something, describe the current best practice. For example, avoid phrases such as "you can also do..." and "in older versions you had to..."
++- When including code samples, use short snippets that demonstrate the concept.
++- The Hugo user community is global; use  [basic english](https://simple.wikipedia.org/wiki/Basic_English) when possible.
++
++#### Level 6 markdown headings
++
++Level 6 markdown headings are styled as `dt` elements. This was implemented to support a [glossary] with linkable terms.
++
++[glossary]: /getting-started/glossary
++
++## Code examples
++
++Indent code by two spaces. With examples of template code, include a space after opening action delimiters, and include a space before closing action delimeters.
++
 +### Fenced code blocks
 +
- ### The code shortcode
++Always include the language code when using a fenced code block:
 +
 +````text
 +```go-html-template
 +{{ if eq $foo "bar" }}
 +  {{ print "foo is bar" }}
 +{{ end }}
 +```
 +````
 +
 +Rendered:
 +
 +```go-html-template
 +{{ if eq $foo "bar" }}
 +  {{ print "foo is bar" }}
 +{{ end }}
 +```
 +
- Use the `code` shortcode to include the file name and a copy-to-clipboard button. This shortcode accepts these optional parameters:
++### Shortcode calls
 +
- copy
- : (`bool`) If `true`, displays a copy-to-clipboard button. Default is `true`.
++Use this syntax to include shortcodes calls within your code examples:
 +
- file
- : (`string`) The file name to display. If you do not provide a `lang` parameter, the file extension determines the code language.
++```text
++{{</*/* foo */*/>}}
++{{%/*/* foo */*/%}}
++```
 +
- lang
- : (`string`) The code language. Default is `text`.
++Rendered:
 +
- ````text
- {{</* code file="layouts/_default_/single.html" */>}}
- {{ if eq $foo "bar" }}
-   {{ print "foo is bar" }}
++```text
++{{</* foo */>}}
++{{%/* foo */%}}
++```
 +
- ````
++### Site configuration
++
++Use the [code-toggle shortcode] to include site configuration examples:
++
++```text
++{{</* code-toggle file=hugo */>}}
++baseURL = 'https://example.org/'
++languageCode = 'en-US'
++title = 'My Site'
++{{</* /code-toggle */>}}
++```
++
++Rendered:
++
++{{< code-toggle file=hugo >}}
++baseURL = 'https://example.org/'
++languageCode = 'en-US'
++title = 'My Site'
++{{< /code-toggle >}}
++
++### Front matter
++
++Use the [code-toggle shortcode] to include front matter examples:
++
++```text
++{{</* code-toggle file=content/posts/my-first-post.md fm=true */>}}
++title = 'My first post'
++date = 2023-11-09T12:56:07-08:00
++draft = false
++{{</* /code-toggle */>}}
++```
++
++Rendered:
++
++{{< code-toggle file=content/posts/my-first-post.md fm=true >}}
++title = 'My first post'
++date = 2023-11-09T12:56:07-08:00
++draft = false
++{{< /code-toggle >}}
++
++### Other code examples
++
++Use the [code shortcode] for other code examples that require a file name:
++
++```text
++{{</* code file=layouts/_default/single.html */>}}
++{{ range .Site.RegularPages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
 +{{ end }}
 +{{</* /code */>}}
- {{< code file="layouts/_default_/single.html" >}}
- {{ if eq $foo "bar" }}
-   {{ print "foo is bar" }}
++```
 +
 +Rendered:
 +
- ### The code-toggle shortcode
++{{< code file=layouts/_default/single.html >}}
++{{ range .Site.RegularPages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
 +{{ end }}
 +{{< /code >}}
 +
- Use the `code-toggle` shortcode to display examples of site configuration, front matter, or data files. This shortcode accepts these optional parameters:
++## Shortcodes
++
++These shortcodes are commonly used throughout the documentation. Other shortcodes are available for specialized use.
++
++### deprecated-in
++
++Use the “deprecated-in” shortcode to indicate that a feature is deprecated:
++
++```text
++{{%/* deprecated-in 0.120.0 */%}}
++Use [`hugo.IsServer`] instead.
++
++[`hugo.IsServer`]: /functions/hugo/isserver
++{{%/* /deprecated-in */%}}
++```
++
++Rendered:
++
++{{% deprecated-in 0.120.0 %}}
++Use [`hugo.IsServer`] instead.
++
++[`hugo.IsServer`]: /functions/hugo/isserver
++{{% /deprecated-in %}}
++
++### code
++
++Use the "code" shortcode for other code examples that require a file name. See the [code examples] above. This shortcode takes these arguments:
++
++copy
++: (`bool`) Whether to display a copy-to-clipboard button. Default is `false`.
++
++file
++: (`string`) The file name to display.
++
++lang
++: (`string`) The code language. If you do not provide a `lang` argument, the code language is determined by the file extension. If the file extension is "html", sets the code language to `go-html-template`. Default is `text`.
++
++### code-toggle
 +
- : (`bool`) If `true`, displays a copy-to-clipboard button. Default is `true`.
++Use the "code-toggle" shortcode to display examples of site configuration, front matter, or data files. See the [code examples] above. This shortcode takes these arguments:
 +
 +copy
- : (`string`) The file name to display. Omit the file extension for site configuration and data file examples.
++: (`bool`) Whether to display a copy-to-clipboard button. Default is `false`.
 +
 +file
- : (`bool`) If `true`, displays the code as front matter. Default is `false`.
++: (`string`) The file name to display. Omit the file extension for site configuration examples.
 +
 +fm
- #### Site configuration example
++: (`bool`) Whether the example is front matter. Default is `false`.
++
++### new-in
 +
- {{</* code-toggle file="hugo" */>}}
- baseURL = 'https://example.org'
- languageCode = 'en-US'
- title = "Example Site"
- {{</* /code-toggle */>}}
++Use the "new-in" shortcode to indicate a new feature:
 +
 +```text
- {{< code-toggle file="hugo" >}}
- baseURL = 'https://example.org'
- languageCode = 'en-US'
- title = "Example Site"
- {{< /code-toggle >}}
++{{</* new-in 0.120.0 */>}}
 +```
 +
 +Rendered:
 +
- #### Front matter example
++{{< new-in 0.120.0 >}}
 +
- {{</* code-toggle file="content/about.md" fm=true */>}}
- title = "About"
- date = 2023-04-02T12:47:24-07:00
- draft = false
- {{</* /code-toggle */>}}
++### note
++
++Use the "note" shortcode with `{{%/* */%}}` delimiters to call attention to important content:
 +
 +```text
- {{< code-toggle file="content/about.md" fm=true >}}
- title = "About"
- date = 2023-04-02T12:47:24-07:00
- draft = false
++{{%/* note */%}}
++Use the [`math.Mod`] function to control...
++
++[`math.Mod`]: /functions/math/mod/
++{{%/* /code */%}}
 +```
 +
 +Rendered:
 +
- ## Admonitions
++{{% note %}}
++Use the [`math.Mod`] function to control...
++
++[`math.Mod`]: /functions/math/mod/
++{{% /code %}}
++
++## New features
++
++Use the "new-in" shortcode to indicate a new feature:
++
++{{< code file=content/something/foo.md lang=text >}}
++{{</* new-in 0.120.0 */>}}
++{{< /code >}}
++
++The "new in" label will be hidden if the specified version is older than a predefined threshold, based on differences in major and minor versions. See&nbsp;[details](https://github.com/gohugoio/hugoDocs/blob/master/layouts/shortcodes/new-in.html).
++
++## Deprecated features
++
++Use the "deprecated-in" shortcode to indicate that a feature is deprecated:
++
++{{< code file=content/something/foo.md >}}
++{{%/* deprecated-in 0.120.0 */%}}
++Use [`hugo.IsServer`] instead.
++
++[`hugo.IsServer`]: /functions/hugo/isserver
++{{%/* /deprecated-in */%}}
++{{< /code >}}
++
++When deprecating a function or method, add this to front matter:
++
++{{< code-toggle file=content/something/foo.md fm=true >}}
++expiryDate: 2024-10-30
++_build:
++  list: never
 +{{< /code-toggle >}}
 +
- Use the `note` shortcode to draw attention to content. Use the `{{%/*  */%}}` notation when calling this shortcode.
++Set the `expiryDate` to one year from the date of deprecation, and add a brief front matter comment to explain the settings.
 +
- ```text
- {{%/* note */%}}
- This is **bold** text.
- {{%/* /note */%}}
- ```
++Users will be able to search for the page, but the page will not appear in any list views, including section menus.
 +
- This is **bold** text.
++## GitHub workflow
 +
 +{{% note %}}
++This section assumes that you have a working knowledge of Git and GitHub, and are comfortable working on the command line.
 +{{% /note %}}
++
++Use this workflow to create and submit pull requests.
++
++Step 1
++: Fork the [documentation repository].
++
++Step 2
++: Clone your fork.
++
++Step 3
++: Create a new branch with a descriptive name.
++
++```sh
++git checkout -b fix/typos-shortcode-templates
++```
++
++Step 4
++: Make changes.
++
++Step 5
++: Commit your changes with a descriptive commit message, typically 50 characters or less. Add the "Closes" keyword if your change addresses one or more open [issues].
++
++```sh
++git commit -m "Fix typos on the shortcode templates page
++
++Closes #1234
++Closes #5678"
++```
++
++Step 5
++: Push the new branch to your fork of the documentation repository.
++
++Step 6
++: Visit the [documentation repository] and create a pull request (PR).
++
++Step 7
++: A project maintainer will review your PR and may request changes. You may delete your branch after the maintainer merges your PR.
++
++[ATX]: https://spec.commonmark.org/0.30/#atx-headings
++[Microsoft Writing Style Guide]: https://learn.microsoft.com/en-us/style-guide/welcome/
++[basic english]: https://simple.wikipedia.org/wiki/Basic_English
++[code examples]: #code-examples
++[code shortcode]: #code
++[code-toggle shortcode]: #code-toggle
++[documentation repository]: https://github.com/gohugoio/hugoDocs/
++[fenced code blocks]: https://spec.commonmark.org/0.30/#fenced-code-blocks
++[glossary of terms]: /getting-started/glossary/
++[indented code blocks]: https://spec.commonmark.org/0.30/#indented-code-blocks
++[issues]: https://github.com/gohugoio/hugoDocs/issues
++[list items]: https://spec.commonmark.org/0.30/#list-items
++[note shortcode]: #note
++[project repository]: https://github.com/gohugoio/hugo
++[raw HTML]: https://spec.commonmark.org/0.30/#raw-html
++[setext]: https://spec.commonmark.org/0.30/#setext-heading
index 0371f7f8c8f016f510924714574c3083412da39f,0000000000000000000000000000000000000000..34056c35a7c40d57a2f81b11c857c14df5fdea10
mode 100644,000000..100644
--- /dev/null
@@@ -1,24 -1,0 +1,30 @@@
- title: Add your hugo theme to the showcase
- linkTitle: Themes
- description: If you've built a Hugo theme and want to contribute back to the Hugo Community, share it with us.
 +---
- keywords: [contribute,themes,design]
++title: Themes
++description: If you've built a Hugo theme and want to contribute back to the Hugo Community, please share it with us.
 +categories: [contribute]
- toc: true
++keywords: [themes]
 +menu:
 +  docs:
 +    parent: contribute
 +    weight: 40
 +weight: 40
 +aliases: [/contribute/theme/]
- A collection of all themes created by the Hugo community, including screenshots and demos, can be found at [themes.gohugo.io]. Every theme in this list will automatically be added to the theme site.
 +---
 +
- Another great site for Hugo themes is [jamstackthemes.dev/](https://jamstackthemes.dev/ssg/hugo/).
++Visit [themes.gohugo.io] to browse a collection of themes created by the Hugo community.
 +
- ### Add your theme to the repository
++To submit your theme:
 +
- In order to add your Hugo theme to [themes.gohugo.io] please [open a pull request in the theme repository](https://github.com/gohugoio/hugoThemesSiteBuilder). **Please make sure that you've read the theme submission guidelines in the [README](https://github.com/gohugoio/hugoThemesSiteBuilder/blob/main/README.md#hugo-themes) of the hugoThemesSiteBuilder repository.**
++1. Read the [submission guidelines]
++2. Open a pull request in the [themes repository]
 +
++Other useful theme directories:
 +
++- [jamstack.club]
++- [jamstackthemes.dev]
++
++[jamstack.club]: https://jamstack.club/#ssg=hugo
++[jamstackthemes.dev]: https://jamstackthemes.dev/ssg/hugo
++[submission guidelines]: https://github.com/gohugoio/hugoThemesSiteBuilder/tree/main#readme
++[themes repository]: https://github.com/gohugoio/hugoThemesSiteBuilder
 +[themes.gohugo.io]: https://themes.gohugo.io/
index cf864e819282766aa9dc40368708c719065fd342,0000000000000000000000000000000000000000..da7b3ef9b4c557caf89b0b962f2c435e7b95ba2a
mode 100644,000000..100644
--- /dev/null
@@@ -1,14 -1,0 +1,22 @@@
- Hugo is the **world's fastest static website engine.** It's written in Go (aka Golang) and developed by [bep](https://github.com/bep), [spf13](https://github.com/spf13) and [friends](https://github.com/gohugoio/hugo/graphs/contributors).
 +---
 +title: Hugo Documentation
 +linkTitle: Hugo
 +description: Hugo is the world's fastest static website engine. It's written in Go (aka Golang) and developed by bep, spf13 and friends.
 +menu:
 +  main:
 +    weight: 1
 +weight: 1
 +layout: documentation-home
 +---
 +
++A fast and flexible [static site generator] built with love by [bep], [spf13], and [friends] in [Go].
++
++Hugo is optimized for speed and designed for flexibility. With its advanced templating system and fast asset pipelines, Hugo renders a complete site in seconds, often less.
++
++[bep]: https://github.com/bep
++[spf13]: https://github.com/spf13
++[friends]: https://github.com/gohugoio/hugo/graphs/contributors
++[go]: https://go.dev/
++[static site generator]: https://en.wikipedia.org/wiki/Static_site_generator
 +
 +Below you will find some of the most common and helpful pages from our documentation.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3b0813f6fe9143547ae4b5fd989e27c3a0fdd0af
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++---
++# Do not remove front matter.
++---
++
++Path|Pattern|Match
++:--|:--|:--
++`images/foo/a.jpg`|`images/foo/*.jpg`|`true`
++`images/foo/a.jpg`|`images/foo/*.*`|`true`
++`images/foo/a.jpg`|`images/foo/*`|`true`
++`images/foo/a.jpg`|`images/*/*.jpg`|`true`
++`images/foo/a.jpg`|`images/*/*.*`|`true`
++`images/foo/a.jpg`|`images/*/*`|`true`
++`images/foo/a.jpg`|`*/*/*.jpg`|`true`
++`images/foo/a.jpg`|`*/*/*.*`|`true`
++`images/foo/a.jpg`|`*/*/*`|`true`
++`images/foo/a.jpg`|`**/*.jpg`|`true`
++`images/foo/a.jpg`|`**/*.*`|`true`
++`images/foo/a.jpg`|`**/*`|`true`
++`images/foo/a.jpg`|`**`|`true`
++`images/foo/a.jpg`|`*/*.jpg`|`false`
++`images/foo/a.jpg`|`*.jpg`|`false`
++`images/foo/a.jpg`|`*.*`|`false`
++`images/foo/a.jpg`|`*`|`false`
index 259231cbff2a3231481061a7ab064ba845baee84,0000000000000000000000000000000000000000..fd84157819b5f263a82aba6a550c9b17e1705d4e
mode 100644,000000..100644
--- /dev/null
@@@ -1,3 -1,0 +1,10 @@@
++---
++# Do not remove front matter.
++---
++
++{{% note %}}
++
 +Localization of dates, currencies, numbers, and percentages is performed by the [gohugoio/locales] package. The language tag of the current site must match one of the listed locales.
 +
 +[gohugoio/locales]: https://github.com/gohugoio/locales
++{{% /note %}}
index 9da340849f62ca6a104140c6b4ff040cf5028bf6,0000000000000000000000000000000000000000..48e020ac65a5748225fffe8647115bf826474d38
mode 100644,000000..100644
--- /dev/null
@@@ -1,8 -1,0 +1,12 @@@
++---
++# Do not remove front matter.
++---
++
 +When specifying the regular expression, use a raw [string literal] (backticks) instead of an interpreted string literal (double quotes) to simplify the syntax. With an interpreted string literal you must escape backslashes.
 +
 +Go's regular expression package implements the [RE2 syntax]. The RE2 syntax is a subset of that accepted by [PCRE], roughly speaking, and with various [caveats]. Note that the RE2 `\C` escape sequence is not supported.
 +
 +[caveats]: https://swtch.com/~rsc/regexp/regexp3.html#caveats
 +[PCRE]: https://www.pcre.org/
 +[RE2 syntax]: https://github.com/google/re2/wiki/Syntax/
 +[string literal]: https://go.dev/ref/spec#String_literals
index 40932f8cfc201d5b394ffa80e70e3b5e39b719d2,0000000000000000000000000000000000000000..827dc9894657a8c94cb9dc0c7d6e15c762070773
mode 100644,000000..100644
--- /dev/null
@@@ -1,42 -1,0 +1,46 @@@
- ```text {copy=false}
++---
++# Do not remove front matter.
++---
++
 +Format a `time.Time` value based on [Go's reference time]:
 +
 +[Go's reference time]: https://pkg.go.dev/time#pkg-constants
 +
- Create a format string using these components:
++```text
 +Mon Jan 2 15:04:05 MST 2006
 +```
 +
- Replace the sign in the format string with a Z to print Z instead of an offset for the UTC zone.
++Create a layout string using these components:
 +
 +Description|Valid components
 +:--|:--
 +Year|`"2006" "06"`
 +Month|`"Jan" "January" "01" "1"`
 +Day of the week|`"Mon" "Monday"`
 +Day of the month|`"2" "_2" "02"`
 +Day of the year|`"__2" "002"`
 +Hour|`"15" "3" "03"`
 +Minute|`"4" "04"`
 +Second|`"5" "05"`
 +AM/PM mark|`"PM"`
 +Time zone offsets|`"-0700" "-07:00" "-07" "-070000" "-07:00:00"`
 +
++Replace the sign in the layout string with a Z to print Z instead of an offset for the UTC zone.
 +
 +Description|Valid components
 +:--|:--
 +Time zone offsets|`"Z0700" "Z07:00" "Z07" "Z070000" "Z07:00:00"`
 +
 +```go-html-template
 +{{ $t := "2023-01-27T23:44:58-08:00" }}
 +{{ $t = time.AsTime $t }}
 +{{ $t = $t.Format "Jan 02, 2006 3:04 PM Z07:00" }}
 +
 +{{ $t }} → Jan 27, 2023 11:44 PM -08:00 
 +```
 +
 +Strings such as `PST` and `CET` are not time zones. They are time zone _abbreviations_.
 +
 +Strings such as `-07:00` and `+01:00` are not time zones. They are time zone _offsets_.
 +
 +A time zone is a geographic area with the same local time. For example, the time zone abbreviated by `PST` and `PDT` (depending on Daylight Savings Time) is `America/Los_Angeles`.
index 4f8aa47ca005d7c2508091b91c5a21cd4abb054b,0000000000000000000000000000000000000000..b4b58eada08c2a5b722814a261ceaa203f3e0c28
mode 100644,000000..100644
--- /dev/null
@@@ -1,17 -1,0 +1,17 @@@
- description: Comprehensive list of Hugo templating functions, including basic and advanced usage examples.
 +---
 +title: Functions
 +linkTitle: Overview
- Go templates are lightweight but extensible. Go itself supplies built-in functions, including comparison operators and other basic tools. These are listed in the [Go template documentation][gofuncs]. Hugo has added additional functions to the basic template logic.
- [gofuncs]: https://golang.org/pkg/text/template/#hdr-Functions
++description: A list of Hugo template functions including examples.
++categories: []
 +keywords: []
 +menu:
 +  docs:
 +    identifier: functions-overview
 +    parent: functions
 +    weight: 10
 +weight: 10
++showSectionMenu: true
 +aliases: [/layout/functions/,/templates/functions]
 +---
 +
++Use these functions within your templates and archetypes.
index acf70bc43aa9db3383669c09889e40bf5116729b,0000000000000000000000000000000000000000..51bc908b6f773e09014e47b1493f82b77cf55888
mode 100644,000000..100644
--- /dev/null
@@@ -1,53 -1,0 +1,48 @@@
- linkTitle: float
- description: Casts a value to a decimal (base 10) floating point value.
- categories: [functions]
 +---
 +title: cast.ToFloat
- menu:
-   docs:
-     parent: functions
- function:
++description: Converts a value to a decimal floating-point number (base 10).
++categories: []
 +keywords: []
- relatedFunctions:
-   - cast.ToFloat
-   - cast.ToInt
-   - cast.ToString
++action:
 +  aliases: [float]
++  related:
++    - functions/cast/ToInt
++    - functions/cast/ToString
 +  returnType: float64
 +  signatures: [cast.ToFloat INPUT]
 +aliases: [/functions/float]
 +---
 +
 +With a decimal (base 10) input:
 +
 +```go-html-template
 +{{ float 11 }} → 11 (float64)
 +{{ float "11" }} → 11 (float64)
 +
 +{{ float 11.1 }} → 11.1 (float64)
 +{{ float "11.1" }} → 11.1 (float64)
 +
 +{{ float 11.9 }} → 11.9 (float64)
 +{{ float "11.9" }} → 11.9 (float64)
 +```
 +
 +With a binary (base 2) input:
 +
 +```go-html-template
 +{{ float 0b11 }} → 3 (float64)
 +```
 +
 +With an octal (base 8) input (use either notation):
 +
 +```go-html-template
 +{{ float 011 }} → 9 (float64)
 +{{ float "011" }} → 11 (float64)
 +
 +{{ float 0o11 }} → 9 (float64)
 +```
 +
 +With a hexadecimal (base 16) input:
 +
 +```go-html-template
 +{{ float 0x11 }} → 17 (float64)
 +```
index b4a37cb6ce712f73a247788e25313bc184941142,0000000000000000000000000000000000000000..f82f029d52a92f6602d505616092b05bfe353c20
mode 100644,000000..100644
--- /dev/null
@@@ -1,59 -1,0 +1,53 @@@
- linkTitle: int
- description: Casts a value to a decimal (base 10) integer.
- categories: [functions]
 +---
 +title: cast.ToInt
- menu:
-   docs:
-     parent: functions
- function:
++description: Converts a value to a decimal integer (base 10).
 +keywords: []
-   signatures: [cast.ToInt INPUT]
- relatedFunctions:
-   - cast.ToFloat
-   - cast.ToInt
-   - cast.ToString
++action:
 +  aliases: [int]
++  related:
++    - functions/cast/ToFloat
++    - functions/cast/ToString
 +  returnType: int
- `{{ strings.TrimLeft "0" "0011" | int }} → 11`
++  signatures: [cast/ToInt INPUT]
 +aliases: [/functions/int]
 +---
 +
 +With a decimal (base 10) input:
 +
 +```go-html-template
 +{{ int 11 }} → 11 (int)
 +{{ int "11" }} → 11 (int)
 +
 +{{ int 11.1 }} → 11 (int)
 +{{ int 11.9 }} → 11 (int)
 +```
 +
 +With a binary (base 2) input:
 +
 +```go-html-template
 +{{ int 0b11 }} → 3 (int)
 +{{ int "0b11" }} → 3 (int)
 +```
 +
 +With an octal (base 8) input (use either notation):
 +
 +```go-html-template
 +{{ int 011 }} → 9 (int)
 +{{ int "011" }} → 9 (int)
 +
 +{{ int 0o11 }} → 9 (int)
 +{{ int "0o11" }} → 9 (int)
 +```
 +
 +With a hexadecimal (base 16) input:
 +
 +```go-html-template
 +{{ int 0x11 }} → 17 (int)
 +{{ int "0x11" }} → 17 (int)
 +```
 +
 +{{% note %}}
 +Values with a leading zero are octal (base 8). When casting a string representation of a decimal (base 10) number, remove leading zeros:
 +
++`{{ strings/TrimLeft "0" "0011" | int }} → 11`
 +{{% /note %}}
index d677ecdbfd6ac5c94f2df94ac2202b6b88af2d0b,0000000000000000000000000000000000000000..a701c94217014d68cadbd7fbb115ee4ea0b026ab
mode 100644,000000..100644
--- /dev/null
@@@ -1,56 -1,0 +1,51 @@@
- linkTitle: string
- description: Cast a value to a string.
- categories: [functions]
 +---
 +title: cast.ToString
- menu:
-   docs:
-     parent: functions
- function:
++description: Converts a value to a string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - cast.ToFloat
-   - cast.ToInt
-   - cast.ToString
++action:
 +  aliases: [string]
++  related:
++    - functions/cast/ToFloat
++    - functions/cast/ToInt
 +  returnType: string
 +  signatures: [cast.ToString INPUT]
 +aliases: [/functions/string]
 +---
 +
 +With a decimal (base 10) input:
 +
 +```go-html-template
 +{{ string 11 }} → 11 (string)
 +{{ string "11" }} → 11 (string)
 +
 +{{ string 11.1 }} → 11.1 (string)
 +{{ string "11.1" }} → 11.1 (string)
 +
 +{{ string 11.9 }} → 11.9 (string)
 +{{ string "11.9" }} → 11.9 (string)
 +```
 +
 +With a binary (base 2) input:
 +
 +```go-html-template
 +{{ string 0b11 }} → 3 (string)
 +{{ string "0b11" }} → 0b11 (string)
 +```
 +
 +With an octal (base 8) input (use either notation):
 +
 +```go-html-template
 +{{ string 011 }} → 9 (string)
 +{{ string "011" }} → 011 (string)
 +
 +{{ string 0o11 }} → 9 (string)
 +{{ string "0o11" }} → 0o11 (string)
 +```
 +
 +With a hexadecimal (base 16) input:
 +
 +```go-html-template
 +{{ string 0x11 }} → 17 (string)
 +{{ string "0x11" }} → 0x11 (string)
 +```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..82389237a26e75a3f20315bd11ecdf75d51f32f6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Cast functions
++linkTitle: cast
++description: Template functions to cast a value from one data type to another.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to cast a value from one data type to another.
index e27c1507fdbf8763537ee3667aa71596e74e95f6,0000000000000000000000000000000000000000..0cf25c7dd49c356f0ca4c7f85d0f7ab9434acb31
mode 100644,000000..100644
--- /dev/null
@@@ -1,66 -1,0 +1,71 @@@
- linkTitle: after
 +---
 +title: collections.After
- categories: [functions]
 +description: Slices an array to the items after the Nth item.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - collections.After
-   - collections.First
-   - collections.Last
++action:
 +  aliases: [after]
++  related:
++    - functions/collections/First
++    - functions/collections/Last
 +  returnType: any
 +  signatures: [collections.After INDEX COLLECTION]
- {{ range after 2 $data }}
-     {{ . }}
- {{ end }}
- → ["three", "four"]
 +aliases: [/functions/after]
 +---
 +
 +The following shows `after` being used in conjunction with the [`slice`]function:
 +
 +```go-html-template
 +{{ $data := slice "one" "two" "three" "four" }}
- {{< code file="layouts/section/articles.html" >}}
++<ul>
++  {{ range after 2 $data }}
++    <li>{{ . }}</li>
++  {{ end }}
++</ul>
++```
++
++The template above is rendered to:
++
++```html
++<ul>
++  <li>three</li>
++  <li>four</li>
++</ul>
 +```
 +
 +## Example of `after` with `first`: 2nd&ndash;4th most recent articles
 +
 +You can use `after` in combination with the [`first`] function and Hugo's [powerful sorting methods][lists]. Let's assume you have a list page at `example.com/articles`. You have 10 articles, but you want your templating for the [list/section page] to show only two rows:
 +
 +1. The top row is titled "Featured" and shows only the most recently published article (i.e. by `publishdate` in the content files' front matter).
 +2. The second row is titled "Recent Articles" and shows only the 2nd- to 4th-most recently published articles.
 +
- <section class="row featured-article">
-   <h2>Featured Article</h2>
-   {{ range first 1 .Pages.ByPublishDate.Reverse }}
-   <header>
-       <h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
-   </header>
-   <p>{{ .Description }}</p>
- {{ end }}
- </section>
- <div class="row recent-articles">
-   <h2>Recent Articles</h2>
-   {{ range first 3 (after 1 .Pages.ByPublishDate.Reverse) }}
-     <section class="recent-article">
-       <header>
-           <h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
-       </header>
-       <p>{{ .Description }}</p>
-     </section>
++{{< code file=layouts/section/articles.html >}}
 +{{ define "main" }}
- </div>
++  <section class="row featured-article">
++    <h2>Featured Article</h2>
++    {{ range first 1 .Pages.ByPublishDate.Reverse }}
++    <header>
++      <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
++    </header>
++    <p>{{ .Description }}</p>
 +  {{ end }}
- [lists]: /templates/lists/#order-content
++  </section>
++  <div class="row recent-articles">
++    <h2>Recent Articles</h2>
++    {{ range first 3 (after 1 .Pages.ByPublishDate.Reverse) }}
++      <section class="recent-article">
++        <header>
++          <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
++        </header>
++        <p>{{ .Description }}</p>
++      </section>
++    {{ end }}
++  </div>
 +{{ end }}
 +{{< /code >}}
 +
 +[`first`]: /functions/collections/first
 +[list/section page]: /templates/section-templates
++[lists]: /templates/lists/#sort-content
 +[`slice`]: /functions/collections/slice/
index 31657288fee8d52622a782f6e6261f041ccdc391,0000000000000000000000000000000000000000..5632dccfbb637db4e6f1130062a3344d2223df11
mode 100644,000000..100644
--- /dev/null
@@@ -1,107 -1,0 +1,102 @@@
- linkTitle: append
 +---
 +title: collections.Append
- categories: [functions]
 +description: Appends one or more elements to a slice and returns the resulting slice.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-     - COLLECTION | collections.Append ELEMENT [ELEMENT]...
-     - COLLECTION | collections.Append COLLECTION
- relatedFunctions:
-   - collections.Append
-   - collections.Merge
-   - collections.Slice
++action:
 +  aliases: [append]
++  related:
++    - functions/collections/Merge
++    - functions/collections/Slice
 +  returnType: any
 +  signatures:
++    - collections.Append ELEMENT [ELEMENT...] COLLECTION
++    - collections.Append COLLECTION1 COLLECTION2
 +aliases: [/functions/append]
 +---
 +
 +This function appends all elements, excluding the last, to the last element. This allows [pipe](/getting-started/glossary/#pipeline) constructs as shown below.
 +
 +Append a single element to a slice:
 +
 +```go-html-template
 +{{ $s := slice "a" "b" }}
 +{{ $s }} → [a b]
 +
 +{{ $s = $s | append "c" }}
 +{{ $s }} → [a b c]
 +```
 +
 +Append two elements to a slice:
 +
 +```go-html-template
 +{{ $s := slice "a" "b" }}
 +{{ $s }} → [a b]
 +
 +{{ $s = $s | append "c" "d" }}
 +{{ $s }} → [a b c d]
 +```
 +
 +Append two elements, as a slice, to a slice. This produces the same result as the previous example:
 +
 +```go-html-template
 +{{ $s := slice "a" "b" }}
 +{{ $s }} → [a b]
 +
 +{{ $s = $s | append (slice "c" "d") }}
 +{{ $s }} → [a b c d]
 +```
 +
 +Start with an empty slice:
 +
 +```go-html-template
 +{{ $s := slice }}
 +{{ $s }} → []
 +
 +{{ $s = $s | append "a" }}
 +{{ $s }} → [a]
 +
 +{{ $s = $s | append "b" "c" }}
 +{{ $s }} → [a b c]
 +
 +{{ $s = $s | append (slice "d" "e") }}
 +{{ $s }} → [a b c d e]
 +```
 +
 +If you start with a slice of a slice:
 +
 +```go-html-template
 +{{ $s := slice (slice "a" "b") }}
 +{{ $s }} → [[a b]]
 +
 +{{ $s = $s | append (slice "c" "d") }}
 +{{ $s }} → [[a b] [c d]]
 +```
 +
 +To create a slice of slices, starting with an empty slice:
 +
 +```go-html-template
 +{{ $s := slice }}
 +{{ $s }} → []
 +
 +{{ $s = $s | append (slice (slice "a" "b")) }}
 +{{ $s }} → [[a b]]
 +
 +{{ $s = $s | append  (slice "c" "d") }}
 +{{ $s }} → [[a b] [c d]]
 +```
 +
 +Although the elements in the examples above are strings, you can use the `append` function with any data type, including Pages. For example, on the home page of a corporate site, to display links to the two most recent press releases followed by links to the four most recent articles:
 +
 +```go-html-template
 +{{ $p := where site.RegularPages "Type" "press-releases" | first 2 }}
 +{{ $p = $p | append (where site.RegularPages "Type" "articles" | first 4) }}
 +
 +{{ with $p }}
 +  <ul>
 +    {{ range . }}
 +      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
 +    {{ end }}
 +  </ul>
 +{{ end }}
 +```
index 4d972b85358e7fdd65c1cfa3996a3599a9ac2970,0000000000000000000000000000000000000000..abd6fca77671ae1ff71e9919432e331419750c41
mode 100644,000000..100644
--- /dev/null
@@@ -1,37 -1,0 +1,31 @@@
- linkTitle: apply
 +---
 +title: collections.Apply
- categories: [functions]
 +description: Returns a new collection with each element transformed by the given function.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   - collections.Apply
++action:
 +  aliases: [apply]
 +  returnType: '[]any'
 +  signatures: [collections.Apply COLLECTION FUNCTION PARAM...]
 +relatedFunctions:
 +  - collections.Delimit
 +  - collections.In
 +  - collections.Reverse
 +  - collections.Seq
 +  - collections.Slice
 +aliases: [/functions/apply]
 +---
 +
 +The `apply` function takes three or more arguments, depending on the function being applied to the collection elements.
 +
 +The first argument is the collection itself, the second argument is the function name, and the remaining arguments are passed to the function, with the string `"."` representing the collection element.
 +
 +```go-html-template
 +{{ $s := slice "hello" "world" }}
 +
 +{{ $s = apply $s "strings.FirstUpper" "." }}
 +{{ $s }} → [Hello World]
 +
 +{{ $s = apply $s "strings.Replace" "." "l" "_" }}
 +{{ $s }} →  [He__o Wor_d]
 +```
index 28b7ded3dc9de8b3d76ddd74b179cebf1ad67f70,0000000000000000000000000000000000000000..b2a4b42a4eabd7d179f48413d3f0fe1f746b1fd4
mode 100644,000000..100644
--- /dev/null
@@@ -1,86 -1,0 +1,80 @@@
- linkTitle: complement
 +---
 +title: collections.Complement
- categories: [functions]
 +description: Returns the elements of the last collection that are not in any of the others.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   signatures: ['collections.Complement COLLECTION [COLLECTION]...']
- relatedFunctions:
-   - collections.Complement
-   - collections.Intersect
-   - collections.SymDiff
-   - collections.Union
++action:
 +  aliases: [complement]
++  related:
++    - functions/collections/Intersect
++    - functions/collections/SymDiff
++    - functions/collections/Union
 +  returnType: any
++  signatures: ['collections.Complement COLLECTION [COLLECTION...]']
 +aliases: [/functions/complement]
 +---
 +
 +To find the elements within `$c3` that do not exist in `$c1` or `$c2`:
 +
 +```go-html-template
 +{{ $c1 := slice 3 }}
 +{{ $c2 := slice 4 5 }}
 +{{ $c3 := slice 1 2 3 4 5 }}
 +
 +{{ complement $c1 $c2 $c3 }} → [1 2]
 +```
 +
 +{{% note %}}
 +Make your code simpler to understand by using a [chained pipeline]:
 +
 +[chained pipeline]: https://pkg.go.dev/text/template#hdr-Pipelines
 +{{% /note %}}
 +
- {{% /note %}} 
 +```go-html-template
 +{{ $c3 | complement $c1 $c2 }} → [1 2]
 +```
 +
 +You can also use the `complement` function with page collections. Let's say your site has five content types:
 +
 +```text
 +content/
 +├── blog/
 +├── books/
 +├── faqs/
 +├── films/
 +└── songs/
 +```
 +
 +To list everything except blog articles (`blog`) and frequently asked questions (`faqs`):
 +
 +```go-html-template
 +{{ $blog := where site.RegularPages "Type" "blog" }}
 +{{ $faqs := where site.RegularPages "Type" "faqs" }}
 +{{ range site.RegularPages | complement $blog $faqs }}
 +  <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
 +{{ end }}
 +```
 +
 +{{% note %}}
 +Although the example above demonstrates the `complement` function, you could use the [`where`] function as well:
 +
 +[`where`]: /functions/collections/where
++{{% /note %}}
 +
 +```go-html-template
 +{{ range where site.RegularPages "Type" "not in" (slice "blog" "faqs") }}
 +  <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
 +{{ end }}
 +```
 +
 +In this example we use the `complement` function to remove [stop words] from a sentence:
 +
 +```go-html-template
 +{{ $text := "The quick brown fox jumps over the lazy dog" }}
 +{{ $stopWords := slice "a" "an" "in" "over" "the" "under" }}
 +{{ $filtered := split $text " " | complement $stopWords }}
 +
 +{{ delimit $filtered " " }} → The quick brown fox jumps lazy dog
 +```
 +
 +[stop words]: https://en.wikipedia.org/wiki/Stop_word
index 0fc3ef537c2d9f5003cb3419dbce696488164eed,0000000000000000000000000000000000000000..6aea467ee17ee895a4e35cd2f138faa7a8928c3d
mode 100644,000000..100644
--- /dev/null
@@@ -1,43 -1,0 +1,38 @@@
- linkTitle: delimit
 +---
 +title: collections.Delimit
- categories: [functions]
 +description: Loops through any array, slice, or map and returns a string of all the values separated by a delimiter.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   returnType: template.HTML
++action:
 +  aliases: [delimit]
- relatedFunctions:
-   - collections.Apply
-   - collections.Delimit
-   - collections.In
-   - collections.Reverse
-   - collections.Seq
-   - collections.Slice
-   - strings.Split
++  related:
++    - functions/collections/Apply
++    - functions/collections/In
++    - functions/collections/Reverse
++    - functions/collections/Seq
++    - functions/collections/Slice
++    - functions/strings/Split
++  returnType: string
 +  signatures: ['collections.Delimit COLLECTION DELIMITER [LAST]']
- {{ delimit $s ", " }} → "b, a, c"
- {{ delimit $s ", " " and "}} → "b, a and c"
 +aliases: [/functions/delimit]
 +---
 +
 +Delimit a slice:
 +
 +```go-html-template
 +{{ $s := slice "b" "a" "c" }}
- {{ delimit $m ", " }} → "1, 2, 3"
- {{ delimit $m ", " " and "}} → "1, 2 and 3"
++{{ delimit $s ", " }} → b, a, c
++{{ delimit $s ", " " and "}} → b, a and c
 +```
 +
 +Delimit a map:
 +
 +{{% note %}}
 +The `delimit` function sorts maps by key, returning the values.
 +{{% /note %}}
 +
 +```go-html-template
 +{{ $m := dict "b" 2 "a" 1 "c" 3 }}
++{{ delimit $m ", " }} → 1, 2, 3
++{{ delimit $m ", " " and "}} → 1, 2 and 3
 +```
index 28c38772611d6adb640daeb6aacc5c7d406c6bfe,0000000000000000000000000000000000000000..2e933aca9789caccad9470fed004f6f0184227be
mode 100644,000000..100644
--- /dev/null
@@@ -1,52 -1,0 +1,71 @@@
- linkTitle: dict
 +---
 +title: collections.Dictionary
- categories: [functions]
 +description: Creates a map from a list of key and value pairs.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   signatures: ['collections.Dictionary KEY VALUE [KEY VALUE]...']
- relatedFunctions:
-   - collections.Dictionary
-   - collections.Group
-   - collections.Index
-   - collections.IsSet
-   - collections.Where
++action:
 +  aliases: [dict]
++  related:
++    - functions/collections/Group
++    - functions/collections/IndexFunction
++    - functions/collections/IsSet
++    - functions/collections/Where
 +  returnType: mapany
- `dict` is especially useful for passing more than one value to a partial template.
++  signatures: ['collections.Dictionary KEY VALUE [VALUE...]']
 +aliases: [/functions/dict]
 +---
 +
- ```go-text-template
++```go-html-template
++{{ $m := dict "a" 1 "b" 2 }}
++```
++
++The above produces this data structure:
++
++```json
++{
++  "a": 1,
++  "b": 2
++}
++```
++
 +
 +Note that the `key` can be either a `string` or a `string slice`. The latter is useful to create a deeply nested structure, e.g.:
 +
- ## Example: using `dict` to pass multiple values to a `partial`
++```go-html-template
 +{{ $m := dict (slice "a" "b" "c") "value" }}
 +```
 +
- {{< code file="layouts/partials/svgs/external-links.svg" >}}
++The above produces this data structure:
++
++```json
++{
++  "a": {
++    "b": {
++      "c": "value"
++    }
++  }
++}
++```
++
++## Pass values to a partial template
 +
 +The partial below creates an SVG and expects `fill`, `height` and `width` from the caller:
 +
 +### Partial definition
 +
- {{< code file="layouts/_default/list.html" >}}
++{{< code file=layouts/partials/svgs/external-links.svg >}}
 +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
 +fill="{{ .fill }}" width="{{ .width }}" height="{{ .height }}" viewBox="0 0 32 32" aria-label="External Link">
 +<path d="M25.152 16.576v5.696q0 2.144-1.504 3.648t-3.648 1.504h-14.848q-2.144 0-3.648-1.504t-1.504-3.648v-14.848q0-2.112 1.504-3.616t3.648-1.536h12.576q0.224 0 0.384 0.16t0.16 0.416v1.152q0 0.256-0.16 0.416t-0.384 0.16h-12.576q-1.184 0-2.016 0.832t-0.864 2.016v14.848q0 1.184 0.864 2.016t2.016 0.864h14.848q1.184 0 2.016-0.864t0.832-2.016v-5.696q0-0.256 0.16-0.416t0.416-0.16h1.152q0.256 0 0.416 0.16t0.16 0.416zM32 1.152v9.12q0 0.48-0.352 0.8t-0.8 0.352-0.8-0.352l-3.136-3.136-11.648 11.648q-0.16 0.192-0.416 0.192t-0.384-0.192l-2.048-2.048q-0.192-0.16-0.192-0.384t0.192-0.416l11.648-11.648-3.136-3.136q-0.352-0.352-0.352-0.8t0.352-0.8 0.8-0.352h9.12q0.48 0 0.8 0.352t0.352 0.8z"></path>
 +</svg>
 +{{< /code >}}
 +
 +### Partial call
 +
 +The `fill`, `height` and `width` values can be stored in one object with `dict` and passed to the partial:
 +
++{{< code file=layouts/_default/list.html >}}
 +{{ partial "svgs/external-links.svg" (dict "fill" "#01589B" "width" 10 "height" 20 ) }}
 +{{< /code >}}
 +
 +[partials]: /templates/partials/
index ddb045382509674ce05970236b3eb6fbfe4538d8,0000000000000000000000000000000000000000..49a0362f576c43e81fb4ab5dcfc857440065a7fd
mode 100644,000000..100644
--- /dev/null
@@@ -1,53 -1,0 +1,36 @@@
- linkTitle: first
- description: Slices an array to the first N elements.
- categories: [functions]
 +---
 +title: collections.First
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given collection, limited to the first N elements.
++categories: []
 +keywords: []
-   signatures: [collections.First LIMIT COLLECTION]
- relatedFunctions:
-   - collections.After
-   - collections.First
-   - collections.Last
++action:
 +  aliases: [first]
++  related:
++    - functions/collections/After
++    - functions/collections/Last
 +  returnType: any
- `first` works in a similar manner to the [`limit` keyword in
- SQL][limitkeyword]. It reduces the array to only the `first N`
- elements. It takes the array and number of elements as input.
- `first` takes two arguments:
- 1. `number of elements`
- 2. `array` *or* `slice of maps or structs`
- {{< code file="layout/_default/section.html" >}}
- {{ range first 10 .Pages }}
-     {{ .Render "summary" }}
++  signatures: [collections.First N COLLECTION]
 +aliases: [/functions/first]
 +---
 +
- {{< /code >}}
++```go-html-template
++{{ range first 5 .Pages }}
++  {{ .Render "summary" }}
 +{{ end }}
- *Note: Exclusive to `first`, LIMIT can be '0' to return an empty array.*
++```
 +
- ## `first` and `where` Together
++Set `N` to zero to return an empty collection.
 +
- Using `first` and [`where`] together can be very
- powerful. Below snippet gets a list of posts only from [main
- sections], sorts it by the `title` parameter, and then
- ranges through only the first 5 posts in that list:
++```go-html-template
++{{ $emptyPageCollection := first 0 .Pages}}
++```
 +
- {{< code file="first-and-where-together.html" >}}
- {{ range first 5 (where site.RegularPages "Type" "in" site.Params.mainSections).ByTitle }}
-    {{ .Content }}
++Use `first` and [`where`] together.
 +
- {{< /code >}}
++```go-html-template
++{{ range where .Pages "Section" "articles" | first 5 }}
++  {{ .Render "summary" }}
 +{{ end }}
- [limitkeyword]: https://www.techonthenet.com/sql/select_limit.php
++```
 +
- [main sections]: /functions/collections/where#mainsections
 +[`where`]: /functions/collections/where
index 29220f1f78076c83a17e66abaf28d7ca63481651,0000000000000000000000000000000000000000..74aa869df2c03106763e62f0b26d78c819ee9e0f
mode 100644,000000..100644
--- /dev/null
@@@ -1,40 -1,0 +1,35 @@@
- linkTitle: group
- description: Groups a list of pages.
- categories: [functions]
 +---
 +title: collections.Group
- menu:
-   docs:
-     parent: functions
- function:
++description: Groups the given page collection by the given key.
++categories: []
 +keywords: []
-   signatures: [PAGES | collections.Group KEY]
- relatedFunctions:
-   - collections.Dictionary
-   - collections.Group
-   - collections.Index
-   - collections.IsSet
-   - collections.Where
++action:
 +  aliases: [group]
++  related:
++    - functions/collections/Dictionary
++    - functions/collections/IndexFunction
++    - functions/collections/IsSet
++    - functions/collections/Where
 +  returnType: any
- {{< code file="layouts/partials/groups.html" >}}
++  signatures: [collections.Group KEY PAGES]
 +aliases: [/functions/group]
 +---
 +
-         <a href="{{ .Permalink }}">{{ .Title }}</a>
++```go-html-template
 +{{ $new := .Site.RegularPages | first 10 | group "New" }}
 +{{ $old := .Site.RegularPages | last 10 | group "Old" }}
 +{{ $groups := slice $new $old }}
 +{{ range $groups }}
 +  <h3>{{ .Key }}{{/* Prints "New", "Old" */}}</h3>
 +  <ul>
 +    {{ range .Pages }}
 +      <li>
- {{< /code >}}
++        <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
 +        <div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
 +      </li>
 +    {{ end }}
 +  </ul>
 +{{ end }}
++```
 +
 +The page group you get from `group` is of the same type you get from the built-in [group methods](/templates/lists#group-content) in Hugo. The above example can be [paginated](/templates/pagination/#list-paginator-pages).
index 57ffbd6539df7c511dd98e6d3aad2b060ad07465,0000000000000000000000000000000000000000..a3ec83d9b679f070634ad42ce613ff20bd60765b
mode 100644,000000..100644
--- /dev/null
@@@ -1,38 -1,0 +1,44 @@@
- linkTitle: in
- description: Reports whether an element is in an array or slice, or if a substring is in a string.
 +---
 +title: collections.In
- menu:
-   docs:
-     parent: functions
- function:
++description: Reports whether the given value is a member of the given set.
++categories: []
 +keywords: []
-   signatures: [collections.In SET ITEM]
- relatedFunctions:
-   - collections.Slice
++action:
 +  aliases: [in]
++  related:
++    - functions/collections/Slice
++    - functions/strings/Contains
++    - functions/strings/ContainsAny
++    - functions/strings/ContainsNonSpace
++    - functions/strings/HasPrefix
++    - functions/strings/HasSuffix
 +  returnType: bool
++  signatures: [collections.In SET VALUE]
 +aliases: [/functions/in]
 +---
 +
++The `SET` can be an [array], [slice], or [string].
 +
++[array]: /getting-started/glossary/#array
++[slice]: /getting-started/glossary/#slice
++[string]: /getting-started/glossary/#string
 +
 +```go-html-template
 +{{ $s := slice "a" "b" "c" }}
 +{{ in $s "b" }} → true
 +```
 +
 +```go-html-template
 +{{ $s := slice 1 2 3 }}
 +{{ in $s 2 }} → true
 +```
 +
 +```go-html-template
 +{{ $s := slice 1.11 2.22 3.33 }}
 +{{ in $s 2.22 }} → true
 +```
 +
 +```go-html-template
 +{{ $s := "abc" }}
 +{{ in $s "b" }} → true
 +```
index cd063f36e930161b13c2142b9273e9575b31e933,0000000000000000000000000000000000000000..e595d2b413a2a9026ad0270f99a432be8052221c
mode 100644,000000..100644
--- /dev/null
@@@ -1,104 -1,0 +1,99 @@@
- linkTitle: index
 +---
 +title: collections.Index
- categories: [functions]
 +description: Looks up the index(es) or key(s) of the data structure passed into it.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - collections.Dictionary
-   - collections.EchoParam
-   - collections.Group
-   - collections.Index
-   - collections.IsSet
-   - collections.Where
++action:
 +  aliases: [index]
++  related:
++    - functions/collections/Dictionary
++    - functions/collections/Group
++    - functions/collections/IsSet
++    - functions/collections/Where
 +  returnType: any
 +  signatures:
 +    - collections.Index COLLECTION INDEXES
 +    - collections.Index COLLECTION KEYS
- ```go-text-template
 +aliases: [/functions/index,/functions/index-function]
 +---
 +
 +The `index` functions returns the result of indexing its first argument by the following arguments. Each indexed item must be a map or a slice, e.g.:
 +
- {{ index $slice 1 }} => b
++```go-html-template
 +{{ $slice := slice "a" "b" "c" }}
- {{ index $map "b" }} => 200
++{{ index $slice 0 }} → a
++{{ index $slice 1 }} → b
++
 +{{ $map := dict "a" 100 "b" 200 }}
- ```go-text-template
++{{ index $map "b" }} → 200
 +```
 +
 +The function takes multiple indices as arguments, and this can be used to get nested values, e.g.:
 +
- {{ index $map "c" 1 }} => 20
++```go-html-template
 +{{ $map := dict "a" 100 "b" 200 "c" (slice 10 20 30) }}
- {{ index $map "c" "e" }} => 20
++{{ index $map "c" 1 }} → 20
 +{{ $map := dict "a" 100 "b" 200 "c" (dict "d" 10 "e" 20) }}
- ```go-text-template
++{{ index $map "c" "e" }} → 20
 +```
 +
 +You may write multiple indices as a slice:
 +
- {{ index $map $slice }} => 20
++```go-html-template
 +{{ $map := dict "a" 100 "b" 200 "c" (dict "d" 10 "e" 20) }}
 +{{ $slice := slice "c" "e" }}
- ```
- .
- └── data
-     └── locations
-         ├── abilene.toml
-         ├── chicago.toml
-         ├── oslo.toml
-         └── provo.toml
++{{ index $map $slice }} → 20
 +```
 +
 +## Example: load data from a path based on front matter parameters
 +
 +Assume you want to add a `location = ""` field to your front matter for every article written in `content/vacations/`. You want to use this field to populate information about the location at the bottom of the article in your `single.html` template. You also have a directory in `data/locations/` that looks like the following:
 +
- {{< code-toggle file="data/locations/oslo" copy=false >}}
++```text
++data/
++  └── locations/
++      ├── abilene.toml
++      ├── chicago.toml
++      ├── oslo.toml
++      └── provo.toml
 +```
 +
 +Here is an example:
 +
- {{< code-toggle file="content/articles/oslo.md" fm=true copy=false >}}
++{{< code-toggle file=data/locations/oslo >}}
 +website = "https://www.oslo.kommune.no"
 +pop_city = 658390
 +pop_metro = 1717900
 +{{< /code-toggle >}}
 +
 +The example we will use will be an article on Oslo, whose front matter should be set to exactly the same name as the corresponding file name in `data/locations/`:
 +
++{{< code-toggle file=content/articles/oslo.md fm=true >}}
 +title = "My Norwegian Vacation"
 +location = "oslo"
 +{{< /code-toggle >}}
 +
 +The content of `oslo.toml` can be accessed from your template using the following node path: `.Site.Data.locations.oslo`. However, the specific file you need is going to change according to the front matter.
 +
 +This is where the `index` function is needed. `index` takes 2 arguments in this use case:
 +
 +1. The node path
 +2. A string corresponding to the desired data; e.g.&mdash;
 +
 +```go-html-template
 +{{ index .Site.Data.locations "oslo" }}
 +```
 +
 +The variable for `.Params.location` is a string and can therefore replace `oslo` in the example above:
 +
 +```go-html-template
 +{{ index .Site.Data.locations .Params.location }}
 +=> map[website:https://www.oslo.kommune.no pop_city:658390 pop_metro:1717900]
 +```
 +
 +Now the call will return the specific file according to the location specified in the content's front matter, but you will likely want to write specific properties to the template. You can do this by continuing down the node path via dot notation (`.`):
 +
 +```go-html-template
 +{{ (index .Site.Data.locations .Params.location).pop_city }}
 +=> 658390
 +```
index 6a2c131b413189328a60b69c3bb8965278f3c240,0000000000000000000000000000000000000000..8bc60f8e1e8e6ad8f8b974aed8ddd676f3b04559
mode 100644,000000..100644
--- /dev/null
@@@ -1,37 -1,0 +1,30 @@@
- linkTitle: intersect
 +---
 +title: collections.Intersect
- categories: [functions]
 +description: Returns the common elements of two arrays or slices, in the same order as the first array.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - collections.Complement
-   - collections.Intersect
-   - collections.SymDiff
-   - collections.Union
++action:
 +  aliases: [intersect]
++  related:
++    - functions/collections/Complement
++    - functions/collections/SymDiff
++    - functions/collections/Union
 +  returnType: any
 +  signatures: [collections.Intersect SET1 SET2]
- A useful example is to use it as `AND` filters when combined with where:
 +aliases: [/functions/intersect]
 +---
- ## AND filter in where query
 +
++A useful example is to use it as `AND` filters when combined with where:
 +
 +```go-html-template
 +{{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }}
 +{{ $pages := $pages | union (where .Site.RegularPages "Params.pinned" true) }}
 +{{ $pages := $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }}
 +```
 +
 +The above fetches regular pages not of `page` or `about` type unless they are pinned. And finally, we exclude all pages with no `images` set in Page parameters.
 +
 +See [union](/functions/collections/union) for `OR`.
 +
 +[partials]: /templates/partials/
 +[single]: /templates/single-page-templates/
index 93fb9f8f6183c5858624b57467636666b09f688e,0000000000000000000000000000000000000000..76b336ae37762dc6a546ff4e9f293d2bbfa64cdd
mode 100644,000000..100644
--- /dev/null
@@@ -1,52 -1,0 +1,49 @@@
- linkTitle: isset
 +---
 +title: collections.IsSet
- categories: [functions]
 +description: Reports whether the key exists within the collection.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - collections.Dictionary
-   - collections.Group
-   - collections.Index
-   - collections.IsSet
-   - collections.Where
++action:
 +  aliases: [isset]
++  related:
++    - functions/collections/Dictionary
++    - functions/collections/Group
++    - functions/collections/IndexFunction
++    - functions/collections/Where
++    - functions/go-template/if
++    - functions/go-template/with
 +  returnType: bool
 +  signatures: [collections.IsSet COLLECTION KEY]
- {{< code-toggle file=hugo copy=false >}}
 +aliases: [/functions/isset]
 +---
 +
 +For example, consider this site configuration:
 +
++{{< code-toggle file=hugo >}}
 +[params]
 +showHeroImage = false
 +{{< /code-toggle >}}
 +
 +It the value of `showHeroImage` is `true`, we can detect that it exists using either `if` or `with`:
 +
 +```go-html-template
 +{{ if site.Params.showHeroImage }}
 +  {{ site.Params.showHeroImage }} → true
 +{{ end }}
 +
 +{{ with site.Params.showHeroImage }}
 +  {{ . }} → true
 +{{ end }}
 +```
 +
 +But if the value of `showHeroImage` is `false`, we can't use either `if` or `with` to detect its existence. In this case, you must use the `isset` function:
 +
 +```go-html-template
 +{{ if isset site.Params "showheroimage" }}
 +  <p>The showHeroImage parameter is set to {{ site.Params.showHeroImage }}.<p>
 +{{ end }}
 +```
 +
 +{{% note %}}
 +When using the `isset` function you must reference the key using lower case. See the previous example.
 +{{% /note %}}
index f3e0c559d360e3c1a89985216dc49ced9249d055,0000000000000000000000000000000000000000..3d21ca6fd8661d24bcaaacda7fec38df1a6b1848
mode 100644,000000..100644
--- /dev/null
@@@ -1,45 -1,0 +1,43 @@@
- linkTitle: keyVals
 +---
 +title: collections.KeyVals
- categories: [functions]
 +description: Returns a KeyVals struct.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   returnType: KeyValues
++action:
 +  aliases: [keyVals]
- relatedFunctions: []
++  related:
++    - methods/pages/Related
++  returnType: types.KeyValues
 +  signatures: [collections.KeyVals KEY VALUES...]
- The primary application for this function is the definition of the `namedSlices` parameter in the options map passed to the `.Related` method on the `Page` object.
 +aliases: [/functions/keyvals]
 +---
 +
++The primary application for this function is the definition of the `namedSlices` parameter in the options map passed to the [`Related`] method on the `Pages` object.
++
++[`Related`]: /methods/pages/related
 +
 +See [related content](/content-management/related).
 +
 +```go-html-template
 +{{ $kv := keyVals "foo" "a" "b" "c" }}
 +```
 +
 +The resulting data structure is:
 +
 +```json
 +{
 +  "Key": "foo",
 +  "Values": [
 +    "a",
 +    "b",
 +    "c"
 +  ]
 +}
 +```
 +
 +To extract the key and values:
 +
 +```go-html-template
 +{{ $kv.Key }} → foo
 +{{ $kv.Values }} → [a b c]
 +```
index 3f84963542d04f1ae28a1888e55692f000d9c390,0000000000000000000000000000000000000000..8219e120dfd42fa279710d083ffe503690a09017
mode 100644,000000..100644
--- /dev/null
@@@ -1,25 -1,0 +1,34 @@@
- linkTitle: last
- description: Slices an array to the last N elements.
- categories: [functions]
 +---
 +title: collections.Last
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given collection, limited to the last N elements.
++categories: []
 +keywords: []
-   signatures: [collections.Last INDEX COLLECTION]
- relatedFunctions:
-   - collections.After
-   - collections.First
-   - collections.Last
++action:
 +  aliases: [last]
++  related:
++    - functions/collections/After
++    - functions/collections/First
 +  returnType: any
++  signatures: [collections.Last N COLLECTION]
 +aliases: [/functions/last]
 +---
 +
 +```go-html-template
 +{{ range last 10 .Pages }}
 +  {{ .Render "summary" }}
 +{{ end }}
 +```
++
++Set `N` to zero to return an empty collection.
++
++```go-html-template
++{{ $emptyPageCollection := last 0 .Pages}}
++```
++
++Use `last` and [`where`] together.
++
++```go-html-template
++{{ range where .Pages "Section" "articles" | last 5 }}
++  {{ .Render "summary" }}
++{{ end }}
++```
index 908f1738a76ec70705caee04eb4c0ecf582504f1,0000000000000000000000000000000000000000..3f5208cfc06377aff171d435b42a70e0a5c4ee04
mode 100644,000000..100644
--- /dev/null
@@@ -1,74 -1,0 +1,69 @@@
- linkTitle: merge
 +---
 +title: collections.Merge
- categories: [functions]
 +description: Returns the result of merging two or more maps.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - collections.Append
-   - collections.Merge
++action:
 +  aliases: [merge]
++  related:
++    - functions/collections/Append
 +  returnType: any
 +  signatures: [collections.Merge MAP MAP...]
 +aliases: [/functions/merge]
 +---
 +
 +Returns the result of merging two or more maps from left to right. If a key already exists, `merge` updates its value. If a key is absent, `merge` inserts the value under the new key.
 +
 +Key handling is case-insensitive.
 +
 +The following examples use these map definitions:
 +
 +```go-html-template
 +{{ $m1 := dict "x" "foo" }}
 +{{ $m2 := dict "x" "bar" "y" "wibble" }}
 +{{ $m3 := dict "x" "baz" "y" "wobble" "z" (dict "a" "huey") }}
 +```
 +
 +Example 1
 +
 +```go-html-template
 +{{ $merged := merge $m1 $m2 $m3 }}
 +
 +{{ $merged.x }}   → baz
 +{{ $merged.y }}   → wobble
 +{{ $merged.z.a }} → huey
 +```
 +
 +Example 2
 +
 +```go-html-template
 +{{ $merged := merge $m3 $m2 $m1 }}
 +
 +{{ $merged.x }}   → foo
 +{{ $merged.y }}   → wibble
 +{{ $merged.z.a }} → huey
 +```
 +
 +Example 3
 +
 +```go-html-template
 +{{ $merged := merge $m2 $m3 $m1 }}
 +
 +{{ $merged.x }}   → foo
 +{{ $merged.y }}   → wobble
 +{{ $merged.z.a }} → huey
 +```
 +
 +Example 4
 +
 +```go-html-template
 +{{ $merged := merge $m1 $m3 $m2 }}
 +
 +{{ $merged.x }}   → bar
 +{{ $merged.y }}   → wibble
 +{{ $merged.z.a }} → huey
 +```
 +
 +{{% note %}}
 +Regardless of depth, merging only applies to maps. For slices, use [append](/functions/collections/append).
 +{{% /note %}}
index 0df90bb96a3948f357ada8dfd4aa3e02763b74ac,0000000000000000000000000000000000000000..793b2b4b58af3f588db02df27171e7df71bfff13
mode 100644,000000..100644
--- /dev/null
@@@ -1,22 -1,0 +1,115 @@@
- linkTitle: newScratch
- description: Creates a new Scratch which can be used to store values in a thread safe way.
- categories: [functions]
 +---
 +title: collections.NewScratch
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns a locally scoped "scratch pad" to store and manipulate data.
++categories: []
 +keywords: []
-   returnType: Scratch
++action:
 +  aliases: [newScratch]
- relatedFunctions: []
++  related:
++    - methods/page/scratch
++    - methods/page/store
++  returnType: maps.Scratch
 +  signatures: [collections.NewScratch ]
- {{ $scratch := newScratch }}
- {{ $scratch.Add "b" 2 }}
- {{ $scratch.Add "b" 2 }}
- {{ $scratch.Get "b" }} → 4
 +---
 +
++The `collections.NewScratch` function creates a locally scoped [scratch pad] to store and manipulate data. To create a scratch pad that is attached to a `Page` object, use the [`Scratch`] or [`Store`] method.
++
++[`Scratch`]: /methods/page/scratch
++[`Store`]: /methods/page/store
++[scratch pad]: /getting-started/glossary/#scratch-pad
++
++## Methods
++
++Set
++: Sets the value of a given key.
++
++```go-html-template
++{{ $s := newScratch }}
++{{ $s.Set "greeting" "Hello" }}
++```
++
++Get
++: Gets the value of a given key.
++
++```go-html-template
++{{ $s := newScratch }}
++{{ $s.Set "greeting" "Hello" }}
++{{ $s.Get "greeting" }} → Hello
++```
++
++Add
++: Adds a given value to existing value(s) of the given key.
++
++: For single values, `Add` accepts values that support Go's `+` operator. If the first `Add` for a key is an array or slice, the following adds will be appended to that list.
++
++```go-html-template
++{{ $s := newScratch }}
++{{ $s.Set "greeting" "Hello" }}
++{{ $s.Add "greeting" "Welcome" }}
++{{ $s.Get "greeting" }} → HelloWelcome
++```
++
++```go-html-template
++{{ $s := newScratch }}
++{{ $s.Set "total" 3 }}
++{{ $s.Add "total" 7 }}
++{{ $s.Get "total" }} → 10
++```
++
++```go-html-template
++{{ $s := newScratch }}
++{{ $s.Set "greetings" (slice "Hello") }}
++{{ $s.Add "greetings" (slice "Welcome" "Cheers") }}
++{{ $s.Get "greetings" }} → [Hello Welcome Cheers]
++```
++
++SetInMap
++: Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`.
++
++```go-html-template
++{{ $s := newScratch }}
++{{ $s.SetInMap "greetings" "english" "Hello" }}
++{{ $s.SetInMap "greetings" "french" "Bonjour" }}
++{{ $s.Get "greetings" }} → map[english:Hello french:Bonjour]
++```
++
++DeleteInMap
++: Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`.
++
++```go-html-template
++{{ $s := newScratch }}
++{{ $s.SetInMap "greetings" "english" "Hello" }}
++{{ $s.SetInMap "greetings" "french" "Bonjour" }}
++{{ $s.DeleteInMap "greetings" "english" }}
++{{ $s.Get "greetings" }} → map[french:Bonjour]
++```
++
++GetSortedMapValues
++: Returns an array of values from `key` sorted by `mapKey`.
++
++```go-html-template
++{{ $s := newScratch }}
++{{ $s.SetInMap "greetings" "english" "Hello" }}
++{{ $s.SetInMap "greetings" "french" "Bonjour" }}
++{{ $s.GetSortedMapValues "greetings" }} → [Hello Bonjour]
++```
++
++Delete
++: Removes the given key.
++
 +```go-html-template
++{{ $s := newScratch }}
++{{ $s.Set "greeting" "Hello" }}
++{{ $s.Delete "greeting" }}
++```
++
++Values
++: Returns the raw backing map. Do not use with `Scratch` or `Store` methods on a `Page` object due to concurrency issues.
++
++```go-html-template
++{{ $s := newScratch }}
++{{ $s.SetInMap "greetings" "english" "Hello" }}
++{{ $s.SetInMap "greetings" "french" "Bonjour" }}
++
++{{ $map := $s.Values }}
 +```
index c94d5113374310f22af9888b15a466a78b6ba961,0000000000000000000000000000000000000000..e195c417ff76cffff729b7dd51df68dcba55d85e
mode 100644,000000..100644
--- /dev/null
@@@ -1,37 -1,0 +1,33 @@@
- linkTitle: querify
 +---
 +title: collections.Querify
- categories: [functions]
 +description: Takes a set or slice of key-value pairs and returns a query string to be appended to URLs.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-     - collections.Querify KEY VALUE [KEY VALUE]...
++action:
 +  aliases: [querify]
 +  returnType: string
 +  signatures:
- relatedFunctions:
++    - collections.Querify VALUE [VALUE...]
 +    - collections.Querify COLLECTION
++related:
 +  - collections.Querify
 +  - urlquery
 +aliases: [/functions/querify]
 +---
 +
 +`querify` takes a set or slice of key-value pairs and returns a [query string](https://en.wikipedia.org/wiki/Query_string) that can be appended to a URL.
 +
 +The following examples create a link to a search results page on Google.
 +
 +```go-html-template
 +<a href="https://www.google.com?{{ (querify "q" "test" "page" 3) | safeURL }}">Search</a>
 +
 +{{ $qs := slice "q" "test" "page" 3 }}
 +<a href="https://www.google.com?{{ (querify $qs) | safeURL }}">Search</a>
 +```
 +
 +Both of these examples render the following HTML:
 +
 +```html
 +<a href="https://www.google.com?page=3&q=test">Search</a>
 +```
index 521adc6f255d1b67b4fa73a80674e0431fa7c92f,0000000000000000000000000000000000000000..12c964c76e40396ddcde8685055032717c2ee9bd
mode 100644,000000..100644
--- /dev/null
@@@ -1,26 -1,0 +1,22 @@@
- categories: [functions]
 +---
 +title: collections.Reverse
 +description: Reverses the order of a collection.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
++action:
 +  aliases: []
 +  returnType: any
 +  signatures: [collections.Reverse COLLECTION]
++related:
 +  - collections.Apply
 +  - collections.Delimit
 +  - collections.In
 +  - collections.Reverse
 +  - collections.Seq
 +  - collections.Slice
 +aliases: [/functions/collections.reverse]
 +---
 +
 +```go-html-template
 +{{ slice 2 1 3 | collections.Reverse }} → [3 1 2]
 +```
index 65ff1432f70e6767be46f322d654be241bc1c6a5,0000000000000000000000000000000000000000..e7430e0d0d730afe83acc2d3cbe4985cbf088e06
mode 100644,000000..100644
--- /dev/null
@@@ -1,42 -1,0 +1,46 @@@
- linkTitle: seq
 +---
 +title: collections.Seq
- categories: [functions]
 +description: Returns a slice of integers.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
++action:
 +  aliases: [seq]
 +  returnType: '[]int'
 +  signatures:
 +    - collections.Seq LAST
 +    - collections.Seq FIRST LAST
 +    - collections.Seq FIRST INCREMENT LAST
++related:
 +  - collections.Apply
 +  - collections.Delimit
 +  - collections.In
 +  - collections.Reverse
 +  - collections.Seq
 +  - collections.Slice
 +aliases: [/functions/seq]
 +---
 +
 +```go-html-template
 +{{ seq 2 }} → [1 2]
 +{{ seq 0 2 }} → [0 1 2]
 +{{ seq -2 2 }} → [-2 -1 0 1 2]
 +{{ seq -2 2 2 }} → [-2 0 2]
 +```
 +
 +Iterate over a sequence of integers:
 +
 +```go-html-template
 +{{ $product := 1 }}
 +{{ range seq 4 }}
 +  {{ $product = mul $product . }}
 +{{ end }}
 +{{ $product }} → 24
 +```
++
++The example above is contrived. To calculate the product of 2 or more numbers, use the [`math.Product`] function:
++
++```go-html-template
++{{ math.Product (seq 4) }} → 24
++```
++
++[`math.Product`]: /functions/math/product
index 8388d533284cad0e24de669da4e35b21c24f23c2,0000000000000000000000000000000000000000..18b8cc664cd338462302c611f98bc3b19b15f0b1
mode 100644,000000..100644
--- /dev/null
@@@ -1,28 -1,0 +1,23 @@@
- linkTitle: shuffle
 +---
 +title: collections.Shuffle
- keywords: [ordering]
- categories: [functions]
 +description: Returns a random permutation of a given array or slice.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
++action:
 +  aliases: [shuffle]
 +  returnType: any
 +  signatures: [collections.Shuffle COLLECTION]
++related:
 +  - collections.Reverse
 +  - collections.Shuffle
 +  - collections.Sort
 +  - collections.Uniq
 +aliases: [/functions/shuffle]
 +---
 +
 +```go-html-template
 +{{ shuffle (seq 1 2 3) }} → [3 1 2] 
 +{{ shuffle (slice "a" "b" "c") }} → [b a c] 
 +```
 +
 +The result will vary from one build to the next.
index a30800ed359e110c90d92c0dadd0214107532578,0000000000000000000000000000000000000000..e24b394ca6b9b844ef47212032db1893a192e688
mode 100644,000000..100644
--- /dev/null
@@@ -1,30 -1,0 +1,24 @@@
- linkTitle: slice
- description: Creates a slice (array) of all passed arguments.
- categories: [functions]
 +---
 +title: collections.Slice
- menu:
-   docs:
-     parent: functions
- function:
++description: Creates a slice of all passed arguments.
++categories: []
 +keywords: []
- relatedFunctions:
++action:
 +  aliases: [slice]
 +  returnType: any
 +  signatures: [collections.Slice ITEM...]
- One use case is the concatenation of elements in combination with the [`delimit` function]:
++related:
 +  - collections.Append
 +  - collections.Apply
 +  - collections.Delimit
 +  - collections.In
 +  - collections.Reverse
 +  - collections.Seq
 +  - collections.Slice
 +aliases: [/functions/slice]
 +---
 +
 +```go-html-template
 +{{ $s := slice "a" "b" "c" }}
 +{{ $s }} → [a b c]
 +```
index bb0f82cded05fa4cd201f6562a215c2d8026e3ec,0000000000000000000000000000000000000000..6b9ea2c34c9e09cb443ec7ca63217d03c8e26457
mode 100644,000000..100644
--- /dev/null
@@@ -1,135 -1,0 +1,122 @@@
- linkTitle: sort
 +---
 +title: collections.Sort
- categories: [functions]
 +description: Sorts slices, maps, and page collections.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
++action:
 +  aliases: [sort]
 +  returnType: any
 +  signatures: ['collections.Sort COLLECTION [KEY] [ORDER]']
- {{< code-toggle file="hugo" copy=false >}}
++related:
 +  - collections.Reverse
 +  - collections.Shuffle
 +  - collections.Sort
 +  - collections.Uniq
 +aliases: [/functions/sort]
 +---
 +
 +The `KEY` is optional when sorting slices in ascending order, otherwise it is required. When sorting slices, use the literal `value` in place of the `KEY`. See examples below.
 +
 +The `ORDER` may be either `asc` (ascending) or `desc` (descending). The default sort order is ascending.
 +
 +## Sort a slice
 +
 +The examples below assume this site configuration:
 +
- {{< code file="layouts/_default/single.html" copy=false >}}
++{{< code-toggle file=hugo >}}
 +[params]
 +grades = ['b','a','c']
 +{{< /code-toggle >}}
 +
 +### Ascending order {#slice-ascending-order}
 +
 +Sort slice elements in ascending order using either of these constructs:
 +
- {{< /code >}}
++```go-html-template
 +{{ sort site.Params.grades }} → [a b c]
 +{{ sort site.Params.grades "value" "asc" }} → [a b c]
- {{< code file="layouts/_default/single.html" copy=false >}}
++```
 +
 +In the examples above, `value` is the `KEY` representing the value of the slice element.
 +
 +### Descending order {#slice-descending-order}
 +
 +Sort slice elements in descending order:
 +
- {{< /code >}}
++```go-html-template
 +{{ sort site.Params.grades "value" "desc" }} → [c b a]
- {{< code-toggle file="hugo" copy=false >}}
++```
 +
 +In the example above, `value` is the `KEY` representing the value of the slice element.
 +
 +## Sort a map
 +
 +The examples below assume this site configuration:
 +
- {{< code file="layouts/_default/single.html" copy=false >}}
++{{< code-toggle file=hugo >}}
 +[params.authors.a]
 +firstName = "Marius"
 +lastName  = "Pontmercy"
 +[params.authors.b]
 +firstName = "Victor"
 +lastName  = "Hugo"
 +[params.authors.c]
 +firstName = "Jean"
 +lastName  = "Valjean"
 +{{< /code-toggle >}}
 +
 +{{% note %}}
 +When sorting maps, the `KEY` argument must be lowercase.
 +{{% /note %}}
 +
 +### Ascending order {#map-ascending-order}
 +
 +Sort map objects in ascending order using either of these constructs:
 +
- {{< /code >}}
++```go-html-template
 +{{ range sort site.Params.authors "firstname" }}
 +  {{ .firstName }}
 +{{ end }}
 +
 +{{ range sort site.Params.authors "firstname" "asc" }}
 +  {{ .firstName }}
 +{{ end }}
- {{< code file="layouts/_default/single.html" copy=false >}}
++```
 +
 +These produce:
 +
 +```text
 +Jean Marius Victor
 +```
 +
 +### Descending order {#map-descending-order}
 +
 +Sort map objects in descending order:
 +
- {{< /code >}}
++```go-html-template
 +{{ range sort site.Params.authors "firstname" "desc" }}
 +  {{ .firstName }}
 +{{ end }}
- Although you can use the `sort` function to sort a page collection, Hugo provides [built-in methods for sorting page collections] by:
++```
 +
 +This produces:
 +
 +```text
 +Victor Marius Jean
 +```
 +
 +## Sort a page collection
 +
- - weight
- - linktitle
- - title
- - front matter parameter
- - date
- - expiration date
- - last modified date
- - publish date
- - length
++{{% note %}}
++Although you can use the `sort` function to sort a page collection, Hugo provides [sorting and grouping methods] as well.
 +
- {{< code file="layouts/_default/home.html" copy=false >}}
++[sorting and grouping methods]: /methods/pages
++{{% /note %}}
 +
 +In this contrived example, sort the site's regular pages by `.Type` in descending order:
 +
-   <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
++```go-html-template
 +{{ range sort site.RegularPages "Type" "desc" }}
- {{< /code >}}
- [built-in methods for sorting page collections]: /templates/lists/#order-content
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
 +{{ end }}
++```
index ea9f201239e0e38e3a93498b187f46de5bba5f8c,0000000000000000000000000000000000000000..828c10ce532597846077f3920252373c0d92d3b7
mode 100644,000000..100644
--- /dev/null
@@@ -1,28 -1,0 +1,24 @@@
- linkTitle: symdiff
 +---
 +title: collections.SymDiff
- categories: [functions]
 +description: Returns the symmetric difference of two collections.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
++action:
 +  aliases: [symdiff]
 +  returnType: any
 +  signatures: [COLLECTION | collections.SymDiff COLLECTION]
- Also see https://en.wikipedia.org/wiki/Symmetric_difference
++related:
 +  - collections.Complement
 +  - collections.Intersect
 +  - collections.SymDiff
 +  - collections.Union
 +aliases: [/functions/symdiff]
 +---
 +
 +Example:
 +
 +```go-html-template
 +{{ slice 1 2 3 | symdiff (slice 3 4) }} → [1 2 4]
 +```
 +
++Also see <https://en.wikipedia.org/wiki/Symmetric_difference>.
index 119da6fb45854f1ad233bc40ee445bf8977f0c8e,0000000000000000000000000000000000000000..e2eb6131337d7448911231d47f9a6fd7d253eb87
mode 100644,000000..100644
--- /dev/null
@@@ -1,50 -1,0 +1,46 @@@
- linkTitle: union
- description: Given two arrays or slices, returns a new array that contains the elements or objects that belong to either or both arrays/slices.
- categories: [functions]
 +---
 +title: collections.Union
- menu:
-   docs:
-     parent: functions
- function:
++description: Given two arrays or slices, returns a new array that contains the elements that belong to either or both arrays/slices.
++categories: []
 +keywords: []
- relatedFunctions:
++action:
 +  aliases: [union]
 +  returnType: any
 +  signatures: [collections.Union SET1 SET2]
- Given two arrays (or slices) A and B, this function will return a new array that contains the elements or objects that belong to either A or to B or to both. The elements supported are strings, integers, and floats (only float64).
++related:
 +  - collections.Complement
 +  - collections.Intersect
 +  - collections.SymDiff
 +  - collections.Union
 +aliases: [/functions/union] 
 +---
 +
++Given two arrays (or slices) A and B, this function will return a new array that contains the elements or objects that belong to either A or to B or to both.
 +
 +```go-html-template
 +{{ union (slice 1 2 3) (slice 3 4 5) }}
 +<!-- returns [1 2 3 4 5] -->
 +
 +{{ union (slice 1 2 3) nil }}
 +<!-- returns [1 2 3] -->
 +
 +{{ union nil (slice 1 2 3) }}
 +<!-- returns [1 2 3] -->
 +
 +{{ union nil nil }}
 +<!-- returns an error because both arrays/slices have to be of the same type -->
 +```
 +
 +## OR filter in where query
 +
 +This is also very useful to use as `OR` filters when combined with where:
 +
 +```go-html-template
 +{{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }}
 +{{ $pages = $pages | union (where .Site.RegularPages "Params.pinned" true) }}
 +{{ $pages = $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }}
 +```
 +
 +The above fetches regular pages not of `page` or `about` type unless they are pinned. And finally, we exclude all pages with no `images` set in Page parameters.
 +
 +See [intersect](/functions/collections/intersect) for `AND`.
index 1b0a8f8f4d8bc9bd193da944be8aed819647516c,0000000000000000000000000000000000000000..8266142ac715fcae69091e2538e269f8ba19c4a4
mode 100644,000000..100644
--- /dev/null
@@@ -1,25 -1,0 +1,20 @@@
- linkTitle: uniq
- description: Takes in a slice or array and returns a slice with duplicate elements removed.
- categories: [functions]
 +---
 +title: collections.Uniq
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given collection, removing duplicate elements.
++categories: []
 +keywords: []
- relatedFunctions:
++action:
 +  aliases: [uniq]
 +  returnType: any
 +  signatures: [collections.Uniq COLLECTION]
++related:
 +  - collections.Reverse
 +  - collections.Shuffle
 +  - collections.Sort
 +  - collections.Uniq
 +aliases: [/functions/uniq]
 +---
 +
 +```go-html-template
 +{{ slice 1 3 2 1 | uniq }} → [1 3 2]
 +```
index df6cec89f0ba2251ea6406c7a5a71be3eb1aae57,0000000000000000000000000000000000000000..e053ed3d555077cf1463a38129e31bbf7c02e5d1
mode 100644,000000..100644
--- /dev/null
@@@ -1,190 -1,0 +1,450 @@@
- linkTitle: where
- description: Filters an array to only the elements containing a matching value for a given field.
- categories: [functions]
 +---
 +title: collections.Where 
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given collection, removing elements that do not satisfy the comparison condition.
++categories: []
 +keywords: []
-   signatures: ['collections.Where COLLECTION KEY [OPERATOR] MATCH']
- relatedFunctions:
++action:
 +  aliases: [where]
 +  returnType: any
- `where` filters an array to only the elements containing a matching
- value for a given field.
++  signatures: ['collections.Where COLLECTION KEY [OPERATOR] VALUE']
++related:
 +  - collections.Dictionary
 +  - collections.Group
 +  - collections.Index
 +  - collections.IsSet
 +  - collections.Where 
 +aliases: [/functions/where]
 +toc: true
 +---
 +
- It works in a similar manner to the [`where` keyword in
- SQL][wherekeyword].
++The `where` function returns the given collection, removing elements that do not satisfy the comparison condition. The comparison condition is comprised of the `KEY`, `OPERATOR`, and `VALUE` arguments:
 +
- {{ range where .Pages "Section" "foo" }}
-   {{ .Content }}
- {{ end }}
++```text
++collections.Where COLLECTION KEY [OPERATOR] VALUE
++                             --------------------
++                             comparison condition
++```
++
++Hugo will test for equality if you do not provide an `OPERATOR` argument. For example:
 +
 +```go-html-template
- It can be used by dot-chaining the second argument to refer to a nested element of a value.
++{{ $pages := where .Site.RegularPages "Section" "books" }}
++{{ $books := where .Site.Data.books "genres" "suspense" }}
 +```
 +
- {{< code-toggle file="content/example.md" fm=true copy=false >}}
- title: Example
- series: golang
- {{< /code-toggle >}}
++## Arguments
 +
- ```go-html-template
- {{ range where .Site.Pages "Params.series" "golang" }}
-    {{ .Content }}
- {{ end }}
- ```
++The where function takes three or four arguments. The `OPERATOR` argument is optional.
 +
- It can also be used with the logical operators `!=`, `>=`, `in`, etc. Without an operator, `where` compares a given field with a matching value equivalent to `=`.
++COLLECTION
++: (`any`) Typically a page collection or a [slice] of [maps].
 +
- {{ range where .Pages "Section" "!=" "foo" }}
-    {{ .Content }}
- {{ end }}
++[maps]: /getting-started/glossary/#map
++[slice]: /getting-started/glossary/#slice
++
++KEY
++: (`string`) The key of the page or map value to compare with `VALUE`. With page collections, commonly used comparison keys are `Section`, `Type`, and `Params`. To compare with a member of the page `Params` map, [chain] the subkey as shown below:
 +
 +```go-html-template
- The following logical operators are available with `where`:
++{{ $result := where .Site.RegularPages "Params.foo" "bar" }}
 +```
 +
- : `true` if a given field value equals a matching value
++[chain]: /getting-started/glossary/#chain
++
++OPERATOR
++: (`string`) The logical comparison [operator](#operators).
++
++VALUE
++: (`any`) The value with which to compare. The values to compare must have comparable data types. For example:
++
++Comparison|Result
++:--|:--
++`"123" "eq" "123"`|`true`
++`"123" "eq" 123`|`false`
++`false "eq" "false"`|`false`
++`false "eq" false`|`true`
++
++When one or both of the values to compare is a slice, use the `in`, `not in` or `intersect` operators as described below.
++
++## Operators
++
++Use any of the following logical operators:
 +
 +`=`, `==`, `eq`
- : `true` if a given field value doesn't equal a matching value
++: (`bool`) Reports whether the given field value is equal to `VALUE`.
 +
 +`!=`, `<>`, `ne`
- : `true` if a given field value is greater than or equal to a matching value
++: (`bool`) Reports whether the given field value is not equal to `VALUE`.
 +
 +`>=`, `ge`
- : `true` if a given field value is greater than a matching value
++: (`bool`) Reports whether the given field value is greater than or equal to `VALUE`.
 +
 +`>`, `gt`
- : `true` if a given field value is lesser than or equal to a matching value
++: `true` Reports whether the given field value is greater than `VALUE`.
 +
 +`<=`, `le`
- : `true` if a given field value is lesser than a matching value
++: (`bool`) Reports whether the given field value is less than or equal to `VALUE`.
 +
 +`<`, `lt`
- : `true` if a given field value is included in a matching value; a matching value must be an array or a slice
++: (`bool`) Reports whether the given field value is less than `VALUE`.
 +
 +`in`
- : `true` if a given field value isn't included in a matching value; a matching value must be an array or a slice
++: (`bool`) Reports whether the given field value is a member of `VALUE`. Compare string to slice, or string to string. See&nbsp;[details](/functions/collections/in).
 +
 +`not in`
- : `true` if a given field value that is a slice/array of strings or integers contains elements in common with the matching value; it follows the same rules as the [`intersect` function][intersect].
++: (`bool`) Reports whether the given field value is not a member of `VALUE`. Compare string to slice, or string to string. See&nbsp;[details](/functions/collections/in).
 +
 +`intersect`
- `like`
- : `true` if a given field value matches a regular expression. Use the `like` operator to compare `string` values. Returns `false` when comparing other data types to the regular expression.
++: (`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 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 %}}
++The examples below perform comparisons within a page collection, but the same comparisons are applicable to a slice of maps.
++{{% /note %}}
++
++## String comparison
 +
- ## Use `where` with boolean values
- When using booleans you should not put quotation marks.
++Compare the value of the given field to a [`string`]:
++
++[`string`]: /getting-started/glossary/#string
 +
- {{ range where .Pages "Draft" true }}
-         <p>{{ .Title }}</p>
- {{ end }}
 +```go-html-template
- ## Use `where` with `intersect`
++{{ $pages := where .Site.RegularPages "Section" "eq" "books" }}
++{{ $pages := where .Site.RegularPages "Section" "ne" "books" }}
 +```
 +
- {{ range where .Site.Pages "Params.tags" "intersect" .Params.tags }}
-   {{ if ne .Permalink $.Permalink }}
-     {{ .Render "summary" }}
-   {{ end }}
- {{ end }}
++## Numeric comparison
++
++Compare the value of the given field to an [`int`] or [`float`]:
++
++[`int`]: /getting-started/glossary/#int
++[`float`]: /getting-started/glossary/#float
 +
 +```go-html-template
- You can also put the returned value of the `where` clauses into a variable:
++{{ $sectionPages := where site.RegularPages "Section" "eq" "books" }}
++
++{{ $pages := where $sectionPages "Params.price" "eq" 42 }}
++{{ $pages := where $sectionPages "Params.price" "ne" 42.67 }}
++{{ $pages := where $sectionPages "Params.price" "ge" 42 }}
++{{ $pages := where $sectionPages "Params.price" "gt" 42.67 }}
++{{ $pages := where $sectionPages "Params.price" "le" 42 }}
++{{ $pages := where $sectionPages "Params.price" "lt" 42.67 }}
 +```
 +
- {{< code file="where-intersect-variables.html" >}}
- {{ $v1 := where .Site.Pages "Params.a" "v1" }}
- {{ $v2 := where .Site.Pages "Params.b" "v2" }}
- {{ $filtered := $v1 | intersect $v2 }}
- {{ range $filtered }}
- {{ end }}
- {{< /code >}}
++## Boolean comparison
 +
- ## Use `where` with `like`
++Compare the value of the given field to a [`bool`]:
 +
- This example matches pages where the "foo" parameter begins with "ab":
++[`bool`]: /getting-started/glossary/#bool
 +
- {{ range where site.RegularPages "Params.foo" "like" `^ab` }}
-   <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
- {{ end }}
++```go-html-template
++{{ $sectionPages := where site.RegularPages "Section" "eq" "books" }}
++
++{{ $pages := where $sectionPages "Params.fiction" "eq" true }}
++{{ $pages := where $sectionPages "Params.fiction" "eq" false }}
++{{ $pages := where $sectionPages "Params.fiction" "ne" true }}
++{{ $pages := where $sectionPages "Params.fiction" "ne" false }}
++```
++
++## Member comparison
++
++Compare a [`scalar`] to a [`slice`].
++
++[`scalar`]: /getting-started/glossary/#scalar
++[`slice`]: /getting-started/glossary/#slice
++
++For example, to return a collection of pages where the `color` page parameter is either "red" or "yellow":
 +
 +```go-html-template
- {{% readfile file="/functions/_common/regular-expressions.md" %}}
++{{ $sectionPages := where site.RegularPages "Section" "eq" "fruit" }}
++
++{{ $colors := slice "red" "yellow" }}
++{{ $pages := where $sectionPages "Params.color" "in" $colors }}
 +```
 +
- ## Use `where` with `first`
++To return a collection of pages where the "color" page parameter is neither "red" nor "yellow":
 +
- Using `first` and `where` together can be very
- powerful. Below snippet gets a list of posts only from [**main
- sections**](#mainsections), sorts it using the [default
- ordering](/templates/lists/) for lists (i.e., `weight => date`), and
- then ranges through only the first 5 posts in that list:
++```go-html-template
++{{ $sectionPages := where site.RegularPages "Section" "eq" "fruit" }}
 +
- {{< code file="first-and-where-together.html" >}}
- {{ range first 5 (where site.RegularPages "Type" "in" site.Params.mainSections) }}
-    {{ .Content }}
- {{ end }}
- {{< /code >}}
++{{ $colors := slice "red" "yellow" }}
++{{ $pages := where $sectionPages "Params.color" "not in" $colors }}
++```
 +
- ## Nest `where` clauses
++## Intersection comparison
++
++Compare a [`slice`] to a [`slice`], returning collection elements with common values. This is frequently used when comparing taxonomy terms.
++
++For example, to return a collection of pages where any of the terms in the "genres" taxonomy are "suspense" or "romance":
++
++```go-html-template
++{{ $sectionPages := where site.RegularPages "Section" "eq" "books" }}
++
++{{ $genres := slice "suspense" "romance" }}
++{{ $pages := where $sectionPages "Params.genres" "intersect" $genres }}
++```
++
++## Regular expression comparison
 +
- You can also nest `where` clauses to drill down on lists of content by more than one parameter. The following first grabs all pages in the "blog" section and then ranges through the result of the first `where` clause and finds all pages that are *not* featured:
++{{< new-in 0.116.0 >}}
 +
- {{ range where (where .Pages "Section" "blog" ) "Params.featured" "!=" true }}
++To return a collection of pages where the "author" page parameter begins with either "victor" or "Victor":
 +
 +```go-html-template
- ## Unset fields
++{{ $pages := where .Site.RegularPages "Params.author" "like" `(?i)^victor` }}
 +```
 +
- Filtering only works for set fields. To check whether a field is set or exists, you can use the operand `nil`.
++{{% include "functions/_common/regular-expressions.md" %}}
++
++{{% note %}}
++Use the `like` operator to compare string values. Comparing other data types will result in an empty collection.
++{{% /note %}}
 +
- This can be useful to filter a small amount of pages from a large pool. Instead of setting a field on all pages, you can set that field on required pages only.
++## Date comparison
 +
- Only the following operators are available for `nil`
++### Predefined dates
 +
- * `=`, `==`, `eq`: True if the given field is not set.
- * `!=`, `<>`, `ne`: True if the given field is set.
++There are four predefined front matter dates: [`date`], [`publishDate`], [`lastmod`], and [`expiryDate`]. Regardless of the front matter data format (TOML, YAML, or JSON) these are [`time.Time`] values, allowing precise comparisons.
 +
- {{ range where .Pages "Params.specialpost" "!=" nil }}
-    {{ .Content }}
++[`date`]: /methods/page/date
++[`publishdate`]: /methods/page/publishdate
++[`lastmod`]: /methods/page/lastmod
++[`expirydate`]: /methods/page/expirydate
++[`time.Time`]: https://pkg.go.dev/time#Time
++
++For example, to return a collection of pages that were created before the current year:
 +
 +```go-html-template
- ## Portable `where` filters -- `site.Params.mainSections` {#mainsections}
++{{ $startOfYear := time.AsTime (printf "%d-01-01" now.Year) }}
++{{ $pages := where .Site.RegularPages "Date" "lt" $startOfYear }}
++```
++
++### Custom dates
++
++With custom front matter dates, the comparison depends on the front matter data format (TOML, YAML, or JSON). 
++
++{{% note %}}
++Using TOML for pages with custom front matter dates enables precise date comparisons.
++{{% /note %}}
++
++With TOML, date values are first-class citizens. TOML has a date data type while JSON and YAML do not. If you quote a TOML date, it is a string. If you do not quote a TOML date value, it is [`time.Time`] value, enabling precise comparisons.
++
++In the TOML example below, note that the event date is not quoted.
++
++{{< code file="content/events/2024-user-conference.md" >}}
+++++
++title = '2024 User Conference"
++eventDate = 2024-04-01
+++++
++{{< /code >}}
++
++To return a collection of future events:
++
++```go-html-template
++{{ $events := where .Site.RegularPages "Type" "events" }}
++{{ $futureEvents := where $events "Params.eventDate" "gt" now }}
++```
++
++When working with YAML or JSON, or quoted TOML values, custom dates are strings; you cannot compare them with `time.Time` values. String comparisons may be possible if the custom date layout is consistent from one page to the next. However, to be safe, filter the pages by ranging through the collection:
++
++```go-html-template
++{{ $events := where .Site.RegularPages "Type" "events" }}
++{{ $futureEvents := slice }}
++{{ range $events }}
++  {{ if gt (time.AsTime .Params.eventDate) now }}
++    {{ $futureEvents = $futureEvents | append . }}
++  {{ end }}
 +{{ end }}
 +```
 +
- **This is especially important for themes.**
++## Nil comparison
 +
- To list the most relevant pages on the front page or similar, you
- should use the `site.Params.mainSections` list instead of comparing
- section names to hard-coded values like `"posts"` or `"post"`.
++To return a collection of pages where the "color" parameter is present in front matter, compare to `nil`:
++
++```go-html-template
++{{ $pages := where .Site.RegularPages "Params.color" "ne" nil }}
++```
 +
- {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
++To return a collection of pages where the "color" parameter is not present in front matter, compare to `nil`:
 +
 +```go-html-template
- If the user has not set this configuration parameter in their site configuration, it will default to the *section with the most pages*.
++{{ $pages := where .Site.RegularPages "Params.color" "eq" nil }}
 +```
 +
- The user can override the default:
++In both examples above, note that `nil` is not quoted.
++
++## Nested comparison
 +
- {{< code-toggle file="hugo" >}}
++These are equivalent:
 +
-   mainSections = ["blog", "docs"]
++```go-html-template
++{{ $pages := where .Site.RegularPages "Type" "tutorials" }}
++{{ $pages = where $pages "Params.level" "eq" "beginner" }}
++```
++
++```go-html-template
++{{ $pages := where (where .Site.RegularPages "Type" "tutorials") "Params.level" "eq" "beginner" }}
++```
++
++## Portable section comparison
++
++Useful for theme authors, avoid hardcoding section names by using the `where` function with the [`MainSections`] method on a `Site` object.
++
++[`MainSections`]: /methods/site/mainsections
++
++```go-html-template
++{{ $pages := where .Site.RegularPages "Section" "in" .Site.MainSections }}
++```
++
++With this construct, a theme author can instruct users to specify their main sections in the site configuration:
++
++{{< code-toggle file=hugo >}}
 +[params]
- [intersect]: /functions/collections/intersect
- [wherekeyword]: https://www.techonthenet.com/sql/where.php
++mainSections = ['blog','galleries']
 +{{< /code-toggle >}}
 +
++If `params.mainSections` is not defined in the site configuration, the `MainSections` method returns a slice with one element---the top level section with the most pages.
++
++## Boolean/undefined comparison
++
++Consider this site content:
++
++```text
++content/
++├── posts/
++│   ├── _index.md
++│   ├── post-1.md  <-- front matter: exclude = false
++│   ├── post-2.md  <-- front matter: exclude = true
++│   └── post-3.md  <-- front matter: exclude not defined
++└── _index.md
++```
++
++The first two pages have an "exclude" field in front matter, but the last page does not. When testing for _equality_, the third page is _excluded_ from the result. When testing for _inequality_, the third page is _included_ in the result.
++
++### Equality test
++
++This template:
++
++```go-html-template
++<ul>
++  {{ range where .Site.RegularPages "Params.exclude" "eq" false }}
++    <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Is rendered to:
++
++```html
++<ul>
++  <li><a href="/posts/post-1/">Post 1</a></li>
++</ul>
++```
++
++This template:
++
++```go-html-template
++<ul>
++  {{ range where .Site.RegularPages "Params.exclude" "eq" true }}
++    <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Is rendered to:
++
++```html
++<ul>  
++  <li><a href="/posts/post-2/">Post 2</a></li>
++</ul>
++```
++
++### Inequality test
++
++This template:
++
++```go-html-template
++<ul>
++  {{ range where .Site.RegularPages "Params.exclude" "ne" false }}
++    <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Is rendered to:
++
++```html
++<ul>
++  <li><a href="/posts/post-2/">Post 2</a></li>
++  <li><a href="/posts/post-3/">Post 3</a></li>
++</ul>
++```
++
++This template:
++
++```go-html-template
++<ul>
++  {{ range where .Site.RegularPages "Params.exclude" "ne" true }}
++    <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Is rendered to:
++
++```html
++<ul>
++  <li><a href="/posts/post-1/">Post 1</a></li>
++  <li><a href="/posts/post-3/">Post 3</a></li>
++</ul>
++```
++
++To exclude a page with an undefined field from a boolean _inequality_ test:
++
++1. Create a collection using a boolean comparison
++2. Create a collection using a nil comparison
++3. Subtract the second collection from the first collection using the [`collections.Complement`] function.
++
++[`collections.Complement`]: /functions/collections/complement
++
++This template:
++
++```go-html-template
++{{ $p1 := where .Site.RegularPages "Params.exclude" "ne" true }}
++{{ $p2 := where .Site.RegularPages "Params.exclude" "eq" nil  }}
++<ul>
++  {{ range $p1 | complement $p2 }}
++    <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Is rendered to:
++
++```html
++<ul>
++  <li><a href="/posts/post-1/">Post 1</a></li>
++</ul>
++```
++
++This template:
++
++```go-html-template
++{{ $p1 := where .Site.RegularPages "Params.exclude" "ne" false }}
++{{ $p2 := where .Site.RegularPages "Params.exclude" "eq" nil  }}
++<ul>
++  {{ range $p1 | complement $p2 }}
++    <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Is rendered to:
++
++```html
++<ul>
++  <li><a href="/posts/post-1/">Post 2</a></li>
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..51981f79b72bcbed1ed3c66530c00f5a22bf2728
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Collections functions
++linkTitle: collections
++description: Template functions to work with arrays, slices, maps, and page collections.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to work with arrays, slices, maps, and page collections.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6d693770d85be1d7e0c96ff422251cf017b14235
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,41 @@@
++---
++title: compare.Conditional
++description: Returns one of two arguments depending on the value of the control argument.
++categories: []
++keywords: []
++action:
++  aliases: [cond]
++  related:
++    - functions/compare/Default
++  returnType: any
++  signatures: [compare.Conditional CONTROL ARG1 ARG2]
++aliases: [/functions/cond]
++---
++
++The CONTROL argument is a boolean value that indicates whether the function should return ARG1 or ARG2. If CONTROL is `true`, the function returns ARG1. Otherwise, the function returns ARG2.
++
++```go-html-template
++{{ $qty := 42 }}
++{{ cond (le $qty 3) "few" "many" }} → many
++```
++
++The CONTROL argument must be either `true` or `false`. To cast a non-boolean value to boolean, pass it through the `not` operator twice.
++
++```go-html-template
++{{ cond (42 | not | not) "truthy" "falsy" }} → truthy
++{{ cond ("" | not | not) "truthy" "falsy" }} → falsy
++```
++
++{{% note %}}
++Unlike [ternary operators] in other languages, the `cond` function does not perform [short-circuit evaluation]. The function evaluates both ARG1 and ARG2, regardless of the CONTROL value.
++
++[short-circuit evaluation]: https://en.wikipedia.org/wiki/Short-circuit_evaluation
++[ternary operators]: https://en.wikipedia.org/wiki/Ternary_conditional_operator
++{{% /note %}}
++
++Due to the absence of short-circuit evaluation, these examples throw an error:
++
++```go-html-template
++{{ cond true "true" (div 1 0) }}
++{{ cond false (div 1 0) "false" }}
++```
index 24ad37ef2def15da238364f7b576531c10fdde16,0000000000000000000000000000000000000000..1e6bd7968adbae6194133566451301070d421592
mode 100644,000000..100644
--- /dev/null
@@@ -1,88 -1,0 +1,48 @@@
- linkTitle: default
- description: Allows setting a default value that can be returned if a first value is not set.
- categories: [functions]
 +---
 +title: compare.Default
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the second argument if set, else the first argument.
 +keywords: []
- relatedFunctions:
-   - compare.Conditional
-   - compare.Default
++action:
 +  aliases: [default]
++  related:
++    - functions/compare/Conditional
++    - functions/go-template/Or
 +  returnType: any
 +  signatures: [compare.Default DEFAULT INPUT]
- `default` checks whether a given value is set and returns a default value if it is not. *Set* in this context means different things depending on the data type:
 +aliases: [/functions/default]
 +---
 +
- * non-zero for numeric types and times
- * non-zero length for strings, arrays, slices, and maps
- * any boolean or struct value
- * non-nil for any other types
++The `default` function returns the second argument if set, else the first argument.
 +
- `default` function examples reference the following content page:
++{{% note %}}
++When the second argument is the boolean `false` value, the `default` function returns `false`. All _other_ falsy values are considered unset.
 +
- {{< code file="content/posts/default-function-example.md" >}}
- ---
- title: Sane Defaults
- seo_title:
- date: 2017-02-18
- font:
- oldparam: The default function helps make your templating DRYer.
- newparam:
- ---
- {{< /code >}}
- `default` can be written in more than one way:
- ```go-html-template
- {{ .Params.font | default "Roboto" }}
- {{ default "Roboto" .Params.font }}
- ```
- Both of the above `default` function calls return `Roboto`.
- A `default` value, however, does not need to be hard coded like the previous example. The `default` value can be a variable or pulled directly from the front matter using dot notation:
- ```go-html-template
- {{ $old := .Params.oldparam }}
- <p>{{ .Params.newparam | default $old }}</p>
- ```
- Which would return:
- ```html
- <p>The default function helps make your templating DRYer.</p>
- ```
- And then using dot notation
- ```go-html-template
- <title>{{ .Params.seo_title | default .Title }}</title>
- ```
- Which would return
- ```html
- <title>Sane Defaults</title>
- ```
++{{% include "functions/go-template/_common/truthy-falsy.md" %}}
 +
- The following have equivalent return values but are far less terse. This demonstrates the utility of `default`:
++To set a default value based on truthiness, use the [`or`] operator instead.
 +
- Using `if`:
++[`or`]: /functions/go-template/or
++{{% /note %}}
 +
- <title>{{ if .Params.seo_title }}{{ .Params.seo_title }}{{ else }}{{ .Title }}{{ end }}</title>
- => Sane Defaults
++The `default` function returns the second argument if set:
 +
 +```go-html-template
- Using `with`:
++{{ default 42 1 }} → 1
++{{ default 42 "foo" }} → foo
++{{ default 42 (dict "k" "v") }} → map[k:v]
++{{ default 42 (slice "a" "b") }} → [a b]
++{{ default 42 true }} → true
++
++<!-- As noted above, the boolean "false" is considered set -->
++{{ default 42 false }} → false
 +```
 +
- <title>{{ with .Params.seo_title }}{{ . }}{{ else }}{{ .Title }}{{ end }}</title>
- => Sane Defaults
++The `default` function returns the first argument if the second argument is not set:
 +
 +```go-html-template
++{{ default 42 0 }} → 42
++{{ default 42 "" }} → 42
++{{ default 42 dict }} → 42
++{{ default 42 slice }} → 42
++{{ default 42 <nil> }} → 42
 +```
index 010fc51b349a1ae31282d0ba243ecfd2a5457081,0000000000000000000000000000000000000000..49350e676cbb6dae6d85aa4334575af5e1fecc7b
mode 100644,000000..100644
--- /dev/null
@@@ -1,32 -1,0 +1,27 @@@
- linkTitle: eq
 +---
 +title: compare.Eq
- categories: [functions]
 +description: Returns the boolean truth of arg1 == arg2 || arg1 == arg3.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - compare.Eq
-   - compare.Ge
-   - compare.Gt
-   - compare.Le
-   - compare.Lt
-   - compare.Ne
++action:
 +  aliases: [eq]
++  related:
++    - functions/compare/Ge
++    - functions/compare/Gt
++    - functions/compare/Le
++    - functions/compare/Lt
++    - functions/compare/Ne
 +  returnType: bool
 +  signatures: ['compare.Eq ARG1 ARG2 [ARG...]']
 +aliases: [/functions/eq]
 +---
 +
 +```go-html-template
 +{{ eq 1 1 }} → true
 +{{ eq 1 2 }} → false
 +
 +{{ eq 1 1 1 }} → true
 +{{ eq 1 1 2 }} → true
 +{{ eq 1 2 1 }} → true
 +{{ eq 1 2 2 }} → false
 +```
index 6bb48dd0094d3ed0f3adedb3aa5dc994cae4178e,0000000000000000000000000000000000000000..479ecf9905b390e07eb9525e5049cfa0c83315ee
mode 100644,000000..100644
--- /dev/null
@@@ -1,37 -1,0 +1,32 @@@
- linkTitle: ge
 +---
 +title: compare.Ge
- categories: [functions]
 +description: Returns the boolean truth of arg1 >= arg2 && arg1 >= arg3.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - compare.Eq
-   - compare.Ge
-   - compare.Gt
-   - compare.Le
-   - compare.Lt
-   - compare.Ne
++action:
 +  aliases: [ge]
++  related:
++    - functions/compare/Eq
++    - functions/compare/Gt
++    - functions/compare/Le
++    - functions/compare/Lt
++    - functions/compare/Ne
 +  returnType: bool
 +  signatures: ['compare.Ge ARG1 ARG2 [ARG...]']
 +aliases: [/functions/ge]
 +---
 +
 +```go-html-template
 +{{ ge 1 1 }} → true
 +{{ ge 1 2 }} → false
 +{{ ge 2 1 }} → true
 +
 +{{ ge 1 1 1 }} → true
 +{{ ge 1 1 2 }} → false
 +{{ ge 1 2 1 }} → false
 +{{ ge 1 2 2 }} → false
 +
 +{{ ge 2 1 1 }} → true
 +{{ ge 2 1 2 }} → true
 +{{ ge 2 2 1 }} → true
 +```
index 4691718ef6c37ddc258179b90d46fba0e3f45c64,0000000000000000000000000000000000000000..0af289ce20d54f2b02ae0b5448b6482b1ba8d629
mode 100644,000000..100644
--- /dev/null
@@@ -1,37 -1,0 +1,32 @@@
- linkTitle: gt
 +---
 +title: compare.Gt
- categories: [functions]
 +description: Returns the boolean truth of arg1 > arg2 && arg1 > arg3.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - compare.Eq
-   - compare.Ge
-   - compare.Gt
-   - compare.Le
-   - compare.Lt
-   - compare.Ne
++action:
 +  aliases: [gt]
++  related:
++    - functions/compare/Eq
++    - functions/compare/Ge
++    - functions/compare/Le
++    - functions/compare/Lt
++    - functions/compare/Ne
 +  returnType: bool
 +  signatures: ['compare.Gt ARG1 ARG2 [ARG...]']
 +aliases: [/functions/gt]
 +---
 +
 +```go-html-template
 +{{ gt 1 1 }} → false
 +{{ gt 1 2 }} → false
 +{{ gt 2 1 }} → true
 +
 +{{ gt 1 1 1 }} → false
 +{{ gt 1 1 2 }} → false
 +{{ gt 1 2 1 }} → false
 +{{ gt 1 2 2 }} → false
 +
 +{{ gt 2 1 1 }} → true
 +{{ gt 2 1 2 }} → false
 +{{ gt 2 2 1 }} → false
 +```
index 792ea6ce6c12b45a7dd9260b425542f35b746a82,0000000000000000000000000000000000000000..319d376f609a9792c83d1003bd11227e5efbbb3d
mode 100644,000000..100644
--- /dev/null
@@@ -1,37 -1,0 +1,32 @@@
- linkTitle: le
 +---
 +title: compare.Le
- categories: [functions]
 +description: Returns the boolean truth of arg1 <= arg2 && arg1 <= arg3.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - compare.Eq
-   - compare.Ge
-   - compare.Gt
-   - compare.Le
-   - compare.Lt
-   - compare.Ne
++action:
 +  aliases: [le]
++  related:
++    - functions/compare/Eq
++    - functions/compare/Ge
++    - functions/compare/Gt
++    - functions/compare/Lt
++    - functions/compare/Ne
 +  returnType: bool
 +  signatures: ['compare.Le ARG1 ARG2 [ARG...]']
 +aliases: [/functions/le]
 +---
 +
 +```go-html-template
 +{{ le 1 1 }} → true
 +{{ le 1 2 }} → true
 +{{ le 2 1 }} → false
 +
 +{{ le 1 1 1 }} → true
 +{{ le 1 1 2 }} → true
 +{{ le 1 2 1 }} → true
 +{{ le 1 2 2 }} → true
 +
 +{{ le 2 1 1 }} → false
 +{{ le 2 1 2 }} → false
 +{{ le 2 2 1 }} → false
 +```
index 537c23b6ffdf276214fd35b7a135b2b66ae03ed6,0000000000000000000000000000000000000000..3fe8f1d2c38903d6858d6af457004cad20e0c0d6
mode 100644,000000..100644
--- /dev/null
@@@ -1,37 -1,0 +1,32 @@@
- linkTitle: lt
 +---
 +title: compare.Lt
- categories: [functions]
 +description: Returns the boolean truth of arg1 < arg2 && arg1 < arg3.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - compare.Eq
-   - compare.Ge
-   - compare.Gt
-   - compare.Le
-   - compare.Lt
-   - compare.Ne
++action:
 +  aliases: [lt]
++  related:
++    - functions/compare/Eq
++    - functions/compare/Ge
++    - functions/compare/Gt
++    - functions/compare/Le
++    - functions/compare/Ne
 +  returnType: bool
 +  signatures: ['compare.Lt ARG1 ARG2 [ARG...]']
 +aliases: [/functions/lt]
 +---
 +
 +```go-html-template
 +{{ lt 1 1 }} → false
 +{{ lt 1 2 }} → true
 +{{ lt 2 1 }} → false
 +
 +{{ lt 1 1 1 }} → false
 +{{ lt 1 1 2 }} → false
 +{{ lt 1 2 1 }} → false
 +{{ lt 1 2 2 }} → true
 +
 +{{ lt 2 1 1 }} → false
 +{{ lt 2 1 2 }} → false
 +{{ lt 2 2 1 }} → false
 +```
index 412f43d4989fef70ddcddf825a4be5463429733f,0000000000000000000000000000000000000000..2d9f826fc73ae29d6be983de5ef8aff03d07a7a2
mode 100644,000000..100644
--- /dev/null
@@@ -1,32 -1,0 +1,27 @@@
- linkTitle: ne
 +---
 +title: compare.Ne
- categories: [functions]
 +description: Returns the boolean truth of arg1 != arg2 && arg1 != arg3.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - compare.Eq
-   - compare.Ge
-   - compare.Gt
-   - compare.Le
-   - compare.Lt
-   - compare.Ne
++action:
 +  aliases: [ne]
++  related:
++    - functions/compare/Eq
++    - functions/compare/Ge
++    - functions/compare/Gt
++    - functions/compare/Le
++    - functions/compare/Lt
 +  returnType: bool
 +  signatures: ['compare.Ne ARG1 ARG2 [ARG...]']
 +aliases: [/functions/ne]
 +---
 +
 +```go-html-template
 +{{ ne 1 1 }} → false
 +{{ ne 1 2 }} → true
 +
 +{{ ne 1 1 1 }} → false
 +{{ ne 1 1 2 }} → false
 +{{ ne 1 2 1 }} → false
 +{{ ne 1 2 2 }} → true
 +```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a9b3a7b27c5c79f3a2b33051d10dcc5815f32270
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Compare functions
++linkTitle: compare
++description: Template functions to compare two or more values.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to compare two or more values.
index 7a7fe303edc3aa5ca7e530cc6ecefe0207723a8a,0000000000000000000000000000000000000000..5c091ebee13d4d9f44bc1094aa3a6dc0e33843f1
mode 100644,000000..100644
--- /dev/null
@@@ -1,26 -1,0 +1,22 @@@
- categories: [functions]
 +---
 +title: crypto.FNV32a
 +description: Returns the FNV (Fowler–Noll–Vo) 32 bit hash of a given string.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - crypto.FNV32a
-   - crypto.HMAC
-   - crypto.MD5
-   - crypto.SHA1
-   - crypto.SHA256
++action:
 +  aliases: []
++  related:
++    - functions/crypto/HMAC
++    - functions/crypto/MD5
++    - functions/crypto/SHA1
++    - functions/crypto/SHA256
 +  returnType: int
 +  signatures: [crypto.FNV32a STRING]
 +aliases: [/functions/crypto.fnv32a]
 +---
 +
 +This function calculates the 32 bit [FNV1a hash](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash) of a given string according to the [specification](https://datatracker.ietf.org/doc/html/draft-eastlake-fnv-12):
 +
 +```go-html-template
 +{{ crypto.FNV32a "Hello world" }} → 1498229191
 +```
index e58619b3895ba9837fc7dc9f6cd3878f0806bcb2,0000000000000000000000000000000000000000..1906689a2b3087691f9ba22e805f31a57620425b
mode 100644,000000..100644
--- /dev/null
@@@ -1,36 -1,0 +1,31 @@@
- linkTitle: hmac
 +---
 +title: crypto.HMAC
- categories: [functions]
 +description: Returns a cryptographic hash that uses a key to sign a message.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - crypto.FNV32a
-   - crypto.HMAC
-   - crypto.MD5
-   - crypto.SHA1
-   - crypto.SHA256
++action:
 +  aliases: [hmac]
++  related:
++    - functions/crypto/FNV32a
++    - functions/crypto/MD5
++    - functions/crypto/SHA1
++    - functions/crypto/SHA256
 +  returnType: string
 +  signatures: ['crypto.HMAC HASH_TYPE KEY MESSAGE [ENCODING]']
 +aliases: [/functions/hmac]
 +---
 +
 +Set the `HASH_TYPE` argument to `md5`, `sha1`, `sha256`, or `sha512`.
 +
 +Set the optional `ENCODING` argument to either `hex` (default) or `binary`.
 +
 +```go-html-template
 +{{ hmac "sha256" "Secret key" "Secret message" }}
 +5cceb491f45f8b154e20f3b0a30ed3a6ff3027d373f85c78ffe8983180b03c84
 +
 +{{ hmac "sha256" "Secret key" "Secret message" "hex" }}
 +5cceb491f45f8b154e20f3b0a30ed3a6ff3027d373f85c78ffe8983180b03c84
 +
 +{{ hmac "sha256" "Secret key" "Secret message" "binary" | base64Encode }}
 +XM60kfRfixVOIPOwow7Tpv8wJ9Nz+Fx4/+iYMYCwPIQ=
 +```
index 9415e015cecf415873a5aa31ad0ebde9d1c41db5,0000000000000000000000000000000000000000..ba44660df5c26ec94a25c4e836682c90466adbed
mode 100644,000000..100644
--- /dev/null
@@@ -1,32 -1,0 +1,26 @@@
- linkTitle: md5
- description: hashes the given input and returns its MD5 checksum.
- categories: [functions]
 +---
 +title: crypto.MD5
- menu:
-   docs:
-     parent: functions
- function:
++description: Hashes the given input and returns its MD5 checksum encoded to a hexadecimal string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - crypto.FNV32a
-   - crypto.HMAC
-   - crypto.MD5
-   - crypto.SHA1
-   - crypto.SHA256
++action:
 +  aliases: [md5]
++  related:
++    - functions/crypto/FNV32a
++    - functions/crypto/HMAC
++    - functions/crypto/SHA1
++    - functions/crypto/SHA256
 +  returnType: string
 +  signatures: [crypto.MD5 INPUT]
 +aliases: [/functions/md5]
 +---
 +
 +```go-html-template
 +{{ md5 "Hello world" }} → 3e25960a79dbc69b674cd4ec67a72c62
 +```
 +
 +This can be useful if you want to use [Gravatar](https://en.gravatar.com/) for generating a unique avatar:
 +
 +```html
 +<img src="https://www.gravatar.com/avatar/{{ md5 "your@email.com" }}?s=100&d=identicon">
 +```
index 6269efe3814144601475ca6385cea4a4108a4e34,0000000000000000000000000000000000000000..204ff038432c73728e9f23388fee36a03d827c3d
mode 100644,000000..100644
--- /dev/null
@@@ -1,25 -1,0 +1,20 @@@
- linkTitle: sha1
- description: Hashes the given input and returns its SHA1 checksum.
- categories: [functions]
 +---
 +title: crypto.SHA1
- menu:
-   docs:
-     parent: functions
- function:
++description: Hashes the given input and returns its SHA1 checksum encoded to a hexadecimal string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - crypto.FNV32a
-   - crypto.HMAC
-   - crypto.MD5
-   - crypto.SHA1
-   - crypto.SHA256
++action:
 +  aliases: [sha1]
++  related:
++    - functions/crypto/FNV32a
++    - functions/crypto/HMAC
++    - functions/crypto/MD5
++    - functions/crypto/SHA256
 +  returnType: string
 +  signatures: [crypto.SHA1 INPUT]
 +aliases: [/functions/sha,/functions/sha1]
 +---
 +
 +```go-html-template
 +{{ sha1 "Hello world" }} → 7b502c3a1f48c8609ae212cdfb639dee39673f5e
 +```
index 3019432d2a18dd87b79b784439b388b65817e263,0000000000000000000000000000000000000000..6fb65776783ff3fc87aff00adc6189ebadde819a
mode 100644,000000..100644
--- /dev/null
@@@ -1,25 -1,0 +1,20 @@@
- linkTitle: sha256
- description: Hashes the given input and returns its SHA256 checksum.
- categories: [functions]
 +---
 +title: crypto.SHA256
- menu:
-   docs:
-     parent: functions
- function:
++description: Hashes the given input and returns its SHA256 checksum encoded to a hexadecimal string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - crypto.FNV32a
-   - crypto.HMAC
-   - crypto.MD5
-   - crypto.SHA1
-   - crypto.SHA256
++action:
 +  aliases: [sha256]
++  related:
++    - functions/crypto/FNV32a
++    - functions/crypto/HMAC
++    - functions/crypto/MD5
++    - functions/crypto/SHA1
 +  returnType: string
 +  signatures: [crypto.SHA256 INPUT]
 +aliases: [/functions/sha256]
 +---
 +
 +```go-html-template
 +{{ sha256 "Hello world" }} → 64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c
 +```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5c95aab6e452fa2e619c4c3b7f75b67b43c4b2f2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Crypto functions
++linkTitle: crypto
++description: Template functions to create cryptographic hashes.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to create cryptographic hashes.
index e02c1588c31cedd89324349edf1615f7b1ab6b3c,0000000000000000000000000000000000000000..d61ea791d9a7d0ad656ddbb10bc20885d4e3e0a5
mode 100644,000000..100644
--- /dev/null
@@@ -1,117 -1,0 +1,140 @@@
- linkTitle: getCSV
 +---
 +title: data.GetCSV
- categories: [functions]
 +description: Returns an array of arrays from a local or remote CSV file, or an error if the file does not exist.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   returnType: '[]string'
-   signatures: [data.GetCSV SEPARATOR PATHPART...]
- relatedFunctions:
-   - data.GetCSV
-   - data.GetJSON
++action:
 +  aliases: [getCSV]
- Consider using `resources.Get` with [`transform.Unmarshal`] when accessing a global resource.
++  related:
++    - functions/data/GetJSON
++    - functions/resources/Get
++    - functions/resources/GetRemote
++    - methods/page/Resources
++  returnType: '[][]string'
++  signatures: ['data.GetCSV SEPARATOR INPUT... [OPTIONS]']
 +toc: true
 +---
 +
 +Given the following directory structure:
 +
 +```text
 +my-project/
 +└── other-files/
 +    └── pets.csv
 +```
 +
 +Access the data with either of the following:
 +
 +```go-html-template
 +{{ $data := getCSV "," "other-files/pets.csv" }}
 +{{ $data := getCSV "," "other-files/" "pets.csv" }}
 +```
 +
++{{% note %}}
++When working with local data, the filepath is relative to the working directory.
++
++You must not place CSV files in the project's data directory.
++{{% /note %}}
++
 +Access remote data with either of the following:
 +
 +```go-html-template
 +{{ $data := getCSV "," "https://example.org/pets.csv" }}
 +{{ $data := getCSV "," "https://example.org/" "pets.csv" }}
 +```
 +
 +The resulting data structure is an array of arrays:
 +
 +```json
 +[
 +  ["name","type","breed","age"],
 +  ["Spot","dog","Collie","3"],
 +  ["Felix","cat","Malicious","7"]
 +]
 +```
 +
++## Options
++
++Add headers to the request by providing an options map:
++
++```go-html-template
++{{ $opts := dict "Authorization" "Bearer abcd" }}
++{{ $data := getCSV "," "https://example.org/pets.csv" $opts }}
++```
++
++Add multiple headers using a slice:
++
++```go-html-template
++{{ $opts := dict "X-List" (slice "a" "b" "c") }}
++{{ $data := getCSV "," "https://example.org/pets.csv" $opts }}
++```
++
 +## Global resource alternative
 +
- Consider using `.Resources.Get` with [`transform.Unmarshal`] when accessing a page resource.
++Consider using the [`resources.Get`] function with [`transform.Unmarshal`] when accessing a global resource.
 +
 +```text
 +my-project/
 +└── assets/
 +    └── data/
 +        └── pets.csv
 +```
 +
 +```go-html-template
 +{{ $data := "" }}
 +{{ $p := "data/pets.csv" }}
 +{{ with resources.Get $p }}
 +  {{ $opts := dict "delimiter" "," }}
 +  {{ $data = . | transform.Unmarshal $opts }}
 +{{ else }}
 +  {{ errorf "Unable to get resource %q" $p }}
 +{{ end }}
 +```
 +
 +## Page resource alternative
 +
- Consider using `resources.GetRemote` with [`transform.Unmarshal`] for improved error handling when accessing a remote resource.
++Consider using the [`Resources.Get`] method with [`transform.Unmarshal`] when accessing a page resource.
 +
 +```text
 +my-project/
 +└── content/
 +    └── posts/
 +        └── my-pets/
 +            ├── index.md
 +            └── pets.csv
 +```
 +
 +```go-html-template
 +{{ $data := "" }}
 +{{ $p := "pets.csv" }}
 +{{ with .Resources.Get $p }}
 +  {{ $opts := dict "delimiter" "," }}
 +  {{ $data = . | transform.Unmarshal $opts }}
 +{{ else }}
 +  {{ errorf "Unable to get resource %q" $p }}
 +{{ end }}
 +```
 +
 +## Remote resource alternative
 +
++Consider using the [`resources.GetRemote`] function with [`transform.Unmarshal`] when accessing a remote resource to improve error handling and cache control.
 +
 +```go-html-template
 +{{ $data := "" }}
 +{{ $u := "https://example.org/pets.csv" }}
 +{{ with resources.GetRemote $u }}
 +  {{ with .Err }}
 +    {{ errorf "%s" . }}
 +  {{ else }}
 +    {{ $opts := dict "delimiter" "," }}
 +    {{ $data = . | transform.Unmarshal $opts }}
 +  {{ end }}
 +{{ else }}
 +  {{ errorf "Unable to get remote resource %q" $u }}
 +{{ end }}
 +```
 +
++[`Resources.Get`]: methods/page/Resources
++[`resources.GetRemote`]: /functions/resources/getremote
++[`resources.Get`]: /functions/resources/get
 +[`transform.Unmarshal`]: /functions/transform/unmarshal
index 37ee8e9a159f68794aff8af47233b35d3271694a,0000000000000000000000000000000000000000..96812e7c063eae39dc96129179a791722253aad9
mode 100644,000000..100644
--- /dev/null
@@@ -1,124 -1,0 +1,145 @@@
- linkTitle: getJSON
 +---
 +title: data.GetJSON
- categories: [functions]
 +description: Returns a JSON object from a local or remote JSON file, or an error if the file does not exist.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   signatures: [data.GetJSON PATHPART...]
- relatedFunctions:
-   - data.GetCSV
-   - data.GetJSON
++action:
 +  aliases: [getJSON]
++  related:
++    - functions/data/GetCSV
++    - functions/resources/Get
++    - functions/resources/GetRemote
++    - methods/page/Resources
 +  returnType: any
- {{ $data := getCSV "," "other-files/books.json" }}
- {{ $data := getCSV "," "other-files/" "books.json" }}
++  signatures: ['data.GetJSON INPUT... [OPTIONS]']
 +toc: true
 +---
 +
 +Given the following directory structure:
 +
 +```text
 +my-project/
 +└── other-files/
 +    └── books.json
 +```
 +
 +Access the data with either of the following:
 +
 +```go-html-template
- {{ $data := getCSV "," "https://example.org/books.json" }}
- {{ $data := getCSV "," "https://example.org/" "books.json" }}
++{{ $data := getJSON "other-files/books.json" }}
++{{ $data := getJSON "other-files/" "books.json" }}
 +```
 +
++{{% note %}}
++When working with local data, the filepath is relative to the working directory.
++{{% /note %}}
++
 +Access remote data with either of the following:
 +
 +```go-html-template
- Consider using `resources.Get` with [`transform.Unmarshal`] when accessing a global resource.
++{{ $data := getJSON "https://example.org/books.json" }}
++{{ $data := getJSON "https://example.org/" "books.json" }}
 +```
 +
 +The resulting data structure is a JSON object:
 +
 +```json
 +[
 +  {
 +    "author": "Victor Hugo",
 +    "rating": 5,
 +    "title": "Les Misérables"
 +  },
 +  {
 +    "author": "Victor Hugo",
 +    "rating": 4,
 +    "title": "The Hunchback of Notre Dame"
 +  }
 +]
 +```
 +
++## Options
++
++Add headers to the request by providing an options map:
++
++```go-html-template
++{{ $opts := dict "Authorization" "Bearer abcd" }}
++{{ $data := getJSON "https://example.org/books.json" $opts }}
++```
++
++Add multiple headers using a slice:
++
++```go-html-template
++{{ $opts := dict "X-List" (slice "a" "b" "c") }}
++{{ $data := getJSON "https://example.org/books.json" $opts }}
++```
++
 +## Global resource alternative
 +
- Consider using `.Resources.Get` with [`transform.Unmarshal`] when accessing a page resource.
++Consider using the [`resources.Get`] function with [`transform.Unmarshal`] when accessing a global resource.
 +
 +```text
 +my-project/
 +└── assets/
 +    └── data/
 +        └── books.json
 +```
 +
 +```go-html-template
 +{{ $data := "" }}
 +{{ $p := "data/books.json" }}
 +{{ with resources.Get $p }}
 +  {{ $opts := dict "delimiter" "," }}
 +  {{ $data = . | transform.Unmarshal $opts }}
 +{{ else }}
 +  {{ errorf "Unable to get resource %q" $p }}
 +{{ end }}
 +```
 +
 +## Page resource alternative
 +
- Consider using `resources.GetRemote` with [`transform.Unmarshal`] for improved error handling when accessing a remote resource.
++Consider using the [`Resources.Get`] method with [`transform.Unmarshal`] when accessing a page resource.
 +
 +```text
 +my-project/
 +└── content/
 +    └── posts/
 +        └── reading-list/
 +            ├── books.json
 +            └── index.md
 +```
 +
 +```go-html-template
 +{{ $data := "" }}
 +{{ $p := "books.json" }}
 +{{ with .Resources.Get $p }}
 +  {{ $opts := dict "delimiter" "," }}
 +  {{ $data = . | transform.Unmarshal $opts }}
 +{{ else }}
 +  {{ errorf "Unable to get resource %q" $p }}
 +{{ end }}
 +```
 +
 +## Remote resource alternative
 +
++Consider using the [`resources.GetRemote`] function with [`transform.Unmarshal`] when accessing a remote resource to improve error handling and cache control.
 +
 +```go-html-template
 +{{ $data := "" }}
 +{{ $u := "https://example.org/books.json" }}
 +{{ with resources.GetRemote $u }}
 +  {{ with .Err }}
 +    {{ errorf "%s" . }}
 +  {{ else }}
 +    {{ $opts := dict "delimiter" "," }}
 +    {{ $data = . | transform.Unmarshal $opts }}
 +  {{ end }}
 +{{ else }}
 +  {{ errorf "Unable to get remote resource %q" $u }}
 +{{ end }}
 +```
 +
++[`Resources.Get`]: methods/page/Resources
++[`resources.GetRemote`]: /functions/resources/getremote
++[`resources.Get`]: /functions/resources/get
 +[`transform.Unmarshal`]: /functions/transform/unmarshal
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..142d6b5282610c862288127bd6c70453efeab8f9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Data functions
++linkTitle: data
++description: Template functions to read local or remote data files.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to read local or remote data files.
index ff505a76b7aef2e7af0e431b22c2d4720e9c0444,0000000000000000000000000000000000000000..d3161605fb98610d4311f60c4f27e6251ef33f2b
mode 100644,000000..100644
--- /dev/null
@@@ -1,50 -1,0 +1,45 @@@
- categories: [functions]
 +---
 +title: debug.Dump
 +description: Returns an object dump as a string.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions: []
++action:
 +  aliases: []
++  related: []
 +  returnType: string
 +  signatures: [debug.Dump VALUE]
 +---
 +
 +```go-html-template
 +{{ $data := "" }}
 +{{ $p := "data/books.json" }}
 +{{ with resources.Get $p }}
 +  {{ $opts := dict "delimiter" "," }}
 +  {{ $data = . | transform.Unmarshal $opts }}
 +{{ else }}
 +  {{ errorf "Unable to get resource %q" $p }}
 +{{ end }}
 +```
 +
 +```go-html-template
 +<pre>{{ debug.Dump $data }}</pre>
 +```
 +
 +```text
 +[]interface {}{
 +  map[string]interface {}{
 +    "author": "Victor Hugo",
 +    "rating": 5.0,
 +    "title": "Les Misérables",
 +  },
 +  map[string]interface {}{
 +    "author": "Victor Hugo",
 +    "rating": 4.0,
 +    "title": "The Hunchback of Notre Dame",
 +  },
 +}
 +```
 +
 +{{% note %}}
 +Output from this function may change from one release to the next. Use for debugging only.
 +{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ae6c3188fd893fe4aa80676368ed4ff49cdf6c8b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,37 @@@
++---
++title: debug.Timer
++description: Creates a named timer that reports elapsed time to the console.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: debug.Timer
++  signatures: [debug.Timer NAME] 
++---
++
++{{< new-in 0.120.0 >}}
++
++Use the `debug.Timer` function to determine execution time for a block of code, useful for finding performance bottle necks in templates.
++
++The timer starts when you instantiate it, and stops when you call its `Stop` method.
++
++```go-html-template
++{{ $t := debug.Timer "TestSqrt" }}
++{{ range seq 2000 }}
++  {{ $f := math.Sqrt . }}
++{{ end }}
++{{ $t.Stop }}
++```
++
++Use the `--logLevel info` command line flag when you build the site.
++
++```sh
++hugo --logLevel info
++```
++
++The results are displayed in the console at the end of the build. You can have as many timers as you want and if you don't stop them, they will be stopped at the end of build.
++
++```text
++INFO  timer:  name TestSqrt total 12.429355ms
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4188285157ddc0cebc367ec940091e3ea38f05c4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Debug functions
++linkTitle: debug
++description: Template functions to debug your templates.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to debug your templates.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2b31d9824d3b4953c1c2a2470563c700fd2ab8c8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,113 @@@
++---
++title: diagrams.Goat
++description: Converts ASCII art to an SVG diagram, returning a GoAT diagram object.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: diagrams.goatDiagram
++  signatures: ['diagrams.Goat INPUT']
++toc: true
++---
++
++Useful in a code block [render hook], the `diagram.Goat` function converts ASCII art to an SVG diagram, returning a [GoAT] diagram object with the following methods:
++
++[GoAT]: https://github.com/blampe/goat#readme
++[render hook]: https://gohugo.io/templates/render-hooks/
++
++Inner
++: (`template.HTML`) Returns the SVG child elements without a wrapping `svg` element, allowing you to create your own wrapper.
++
++Wrapped
++: (`template.HTML`) Returns the SVG child elements wrapped in an `svg` element.
++
++Width
++: (`int`) Returns the width of the rendered diagram, in pixels.
++
++Height
++: (`int`) Returns the height of the rendered diagram, in pixels.
++
++## GoAT Diagrams
++
++Hugo natively supports [GoAT] diagrams.
++
++This markdown:
++
++````
++```goat
++.---.     .-.       .-.       .-.     .---.
++| A +--->| 1 |<--->| 2 |<--->| 3 |<---+ B |
++'---'     '-'       '+'       '+'     '---'
++```
++````
++
++Is rendered to:
++
++```html
++<div class="goat svg-container">
++  <svg xmlns="http://www.w3.org/2000/svg" font-family="Menlo,Lucida Console,monospace" viewBox="0 0 352 57">
++    ...
++  </svg>
++</div>
++```
++
++Which appears in your browser as:
++
++```goat {class="mw6-ns"}
++.---.     .-.       .-.       .-.     .---.
++| A +--->| 1 |<--->| 2 |<--->| 3 |<---+ B |
++'---'     '-'       '+'       '+'     '---'
++```
++
++To customize rendering, override Hugo's [built-in code block render hook] for GoAT diagrams.
++
++[built-in code block render hook]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/_markup/render-codeblock-goat.html
++
++## Code block render hook
++
++By way of example, let's create a code block render hook to render GoAT diagrams as `figure` elements with an optional caption.
++
++{{< code file=layouts/_default/_markup/render-codeblock-goat.html >}}
++{{ $caption := or .Attributes.caption "" }}
++{{ $class := or .Attributes.class "diagram" }}
++{{ $id := or .Attributes.id (printf "diagram-%d" (add 1 .Ordinal)) }}
++
++<figure id="{{ $id }}">
++  {{ with diagrams.Goat (trim .Inner "\n\r") }}
++    <svg class="{{ $class }}" width="{{ .Width }}" height="{{ .Height }}"  xmlns="http://www.w3.org/2000/svg" version="1.1">
++      {{ .Inner }}
++    </svg>
++  {{ end }}
++  <figcaption>{{ $caption }}</figcaption>
++</figure>
++{{< /code >}}
++
++This markdown:
++
++{{< code file=content/example.md lang=text >}}
++```goat {class="foo" caption="Diagram 1: Example"}
++.---.     .-.       .-.       .-.     .---.
++| A +--->| 1 |<--->| 2 |<--->| 3 |<---+ B |
++'---'     '-'       '+'       '+'     '---'
++```
++{{< /code >}}
++
++Is rendered to:
++
++```html
++<figure id="diagram-1">
++  <svg class="foo" width="272" height="57" xmlns="http://www.w3.org/2000/svg" version="1.1">
++    ...
++  </svg>
++  <figcaption>Diagram 1: Example</figcaption>
++</figure>
++```
++
++Use CSS to style the SVG as needed:
++
++```css
++svg.foo {
++  font-family: "Segoe UI","Noto Sans",Helvetica,Arial,sans-serif
++}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e136b4f3308e8fcb88eef9fc866ee88a47c0b7f6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Diagram functions
++linkTitle: diagrams
++description: Template functions to render diagrams.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to render diagrams.
index 8bd554c83ba0f8ffd9c33303fd70b80af653e815,0000000000000000000000000000000000000000..821ca805ae63649efd29bde8d0765bd608d4b107
mode 100644,000000..100644
--- /dev/null
@@@ -1,45 -1,0 +1,40 @@@
- linkTitle: base64Decode
 +---
 +title: encoding.Base64Decode
- categories: [functions]
 +description: Returns the base64 decoding of the given content.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- signatures:
-   - 
-   - base64Decode INPUT
++action:
 +  aliases: [base64Decode]
++  related:
++    - functions/encoding/Base64Encode
 +  returnType: string
 +  signatures: [encoding.Base64Decode INPUT]
- {{ "SHVnbw==" | base64Decode }} → "Hugo"
 +aliases: [/functions/base64Decode]
 +---
 +
 +```go-html-template
++{{ "SHVnbw==" | base64Decode }} → Hugo
 +```
 +
 +Use the `base64Decode` function to decode responses from APIs. For example, the result of this call to GitHub's API contains the base64-encoded representation of the repository's README file:
 +
 +```text
 +https://api.github.com/repos/gohugoio/hugo/readme
 +```
 +
 +To retrieve and render the content:
 +
 +```go-html-template
 +{{ $u := "https://api.github.com/repos/gohugoio/hugo/readme" }}
 +{{ with resources.GetRemote $u }}
 +  {{ with .Err }}
 +    {{ errorf "%s" . }}
 +  {{ else }}
 +    {{ with . | transform.Unmarshal }}
 +      {{ .content | base64Decode | markdownify }}
 +    {{ end }}
 +  {{ end }}
 +{{ else }}
 +  {{ errorf "Unable to get remote resource %q" $u }}
 +{{ end }}
 +```
index d548aca8e1e6a3f6080390f1aace2908df489321,0000000000000000000000000000000000000000..14f67a132f1d69921b0a1f4e3eb343fc562856a5
mode 100644,000000..100644
--- /dev/null
@@@ -1,22 -1,0 +1,17 @@@
- linkTitle: base64Encode
 +---
 +title: encoding.Base64Encode
- categories: [functions]
 +description: Returns the base64 decoding of the given content.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - encoding.Base64Decode
-   - encoding.Base64Encode
++action:
 +  aliases: [base64Encode]
++  related:
++    - functions/encoding/Base64Decode
 +  returnType: string
 +  signatures: [encoding.Base64Encode INPUT]
- {{ "Hugo" | base64Encode }} → "SHVnbw=="
 +aliases: [/functions/base64, /functions/base64Encode]
 +---
 +
 +```go-html-template
++{{ "Hugo" | base64Encode }} → SHVnbw==
 +```
index 0b9cb2e741475499a10b84327af1a7f23f3ff8e2,0000000000000000000000000000000000000000..475f8a76afabc28c788d4df12bfd13b1ba6b12ca
mode 100644,000000..100644
--- /dev/null
@@@ -1,48 -1,0 +1,37 @@@
- linkTitle: jsonify
- description: Encodes a given object to JSON.
- categories: [functions]
 +---
 +title: encoding.Jsonify
- menu:
-   docs:
-     parent: functions
- function:
++description: Encodes the given object to JSON.
++categories: []
 +keywords: []
-     - encoding.Jsonify INPUT
-     - encoding.Jsonify OPTIONS INPUT
- relatedFunctions:
-   - encoding.Jsonify
-   - transform.Remarshal
-   - transform.Unmarshal
++action:
 +  aliases: [jsonify]
 +  returnType: template.HTML
++  related:
++    - functions/transform/Remarshal
++    - functions/transform/Unmarshal
 +  signatures:
- To customize the printing of the JSON, pass a map of options as the first
- argument.  Supported options are "prefix" and "indent".  Each JSON element in
++    - encoding.Jsonify [OPTIONS] INPUT
 +aliases: [/functions/jsonify]
 +---
 +
++To customize the printing of the JSON, pass an options map as the first
++argument. Supported options are "prefix" and "indent". Each JSON element in
 +the output will begin on a new line beginning with *prefix* followed by one or
 +more copies of *indent* according to the indentation nesting.
 +
- indent ("")
- : Indentation to use.
- prefix ("")
- : Indentation prefix.
- noHTMLEscape (false)
- : Disable escaping of problematic HTML characters inside JSON quoted strings. The default behavior is to escape &, <, and > to \u0026, \u003c, and \u003e to avoid certain safety problems that can arise when embedding JSON in HTML.
 +```go-html-template
 +{{ dict "title" .Title "content" .Plain | jsonify }}
 +{{ dict "title" .Title "content" .Plain | jsonify (dict "indent" "  ") }}
 +{{ dict "title" .Title "content" .Plain | jsonify (dict "prefix" " " "indent" "  ") }}
 +```
 +
 +## Options
 +
- See also the `.PlainWords`, `.Plain`, and `.RawContent` [page variables][pagevars].
++indent
++: (`string`) Indentation to use. Default is "".
 +
- [pagevars]: /variables/page/
++prefix
++: (`string`) Indentation prefix. Default is "".
 +
++noHTMLEscape
++: (`bool`) Disable escaping of problematic HTML characters inside JSON quoted strings. The default behavior is to escape `&`, `<`, and `>` to `\u0026`, `\u003c`, and `\u003e` to avoid certain safety problems that can arise when embedding JSON in HTML. Default is `false`.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3c4c4519ece89615b7ccf24b83dcc12cac9d9035
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Encoding functions
++linkTitle: encoding
++description: Template functions to encode and decode data.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to encode and decode data.
index da9845073d19ed737b1bb8e34ea9532bd7f8d22a,0000000000000000000000000000000000000000..bbdd62c530704c8bd2718f2b22c26c8272ea1220
mode 100644,000000..100644
--- /dev/null
@@@ -1,33 -1,0 +1,26 @@@
- linkTitle: errorf
 +---
 +title: fmt.Errorf
- categories: [functions]
 +description: Log an ERROR from a template.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - fmt.Errorf
-   - fmt.Erroridf
-   - fmt.Warnf
++action:
 +  aliases: [errorf]
++  related:
++    - functions/fmt/Erroridf
++    - functions/fmt/Warnf
 +  returnType: string
 +  signatures: ['fmt.Errorf FORMAT [INPUT]']
- The documentation for [Go's fmt package] describes the structure and content of the format string.
 +aliases: [/functions/errorf]
 +---
 +
- Like the  [`printf`] function, the `errorf` function evaluates the format string. It then prints the result to the ERROR log and fails the build. Hugo prints each unique message once to avoid flooding the log with duplicate errors.
++{{% include "functions/fmt/_common/fmt-layout.md" %}}
 +
- [`printf`]: /functions/fmt/printf
- [Go's fmt package]: https://pkg.go.dev/fmt
++The `errorf` function evaluates the format string, then prints the result to the ERROR log and fails the build.
 +
 +```go-html-template
 +{{ errorf "The %q shortcode requires a src parameter. See %s" .Name .Position }}
 +```
 +
 +Use the [`erroridf`] function to allow optional suppression of specific errors.
 +
 +[`erroridf`]: /functions/fmt/erroridf
index 986810436974b1c8bb40350123ef04856b6a29f2,0000000000000000000000000000000000000000..9884f4935218114db2d9b1080938c8aeeea8594a
mode 100644,000000..100644
--- /dev/null
@@@ -1,48 -1,0 +1,40 @@@
- linkTitle: erroridf
 +---
 +title: fmt.Erroridf
- categories: [functions]
 +description: Log a suppressable ERROR from a template.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - fmt.Errorf
-   - fmt.Erroridf
-   - fmt.Warnf
++action:
 +  aliases: [erroridf]
++  related:
++    - functions/fmt/Errorf
++    - functions/fmt/Warnf
 +  returnType: string
 +  signatures: ['fmt.Erroridf ID FORMAT [INPUT]']
- The documentation for [Go's fmt package] describes the structure and content of the format string.
 +aliases: [/functions/erroridf]
 +---
 +
- Like the  [`errorf`] function, the `erroridf` function evaluates the format string, prints the result to the ERROR log, then fails the build. Hugo prints each unique message once to avoid flooding the log with duplicate errors.
- Unlike the `errorf` function, you may suppress errors logged by the `erroridf` function by adding the message ID to the `ignoreErrors` array in your site configuration.
++{{% include "functions/fmt/_common/fmt-layout.md" %}}
 +
- If you feel that this should not be logged as an ERROR, you can ignore it by adding this to your site config:
- ignoreErrors = ["error-42"]
++The `erroridf` function evaluates the format string, then prints the result to the ERROR log and fails the build. Unlike the [`errorf`] function, you may suppress errors logged by the `erroridf` function by adding the message ID to the `ignoreErrors` array in your site configuration.
 +
 +This template code:
 +
 +```go-html-template
 +{{ erroridf "error-42" "You should consider fixing this." }}
 +```
 +
 +Produces this console log:
 +
 +```text
 +ERROR You should consider fixing this.
- {{< code-toggle file=hugo copy=false >}}
++You can suppress this error by adding the following to your site configuration:
++ignoreErrors = ['error-42']
 +```
 +
 +To suppress this message:
 +
- [Go's fmt package]: https://pkg.go.dev/fmt
++{{< code-toggle file=hugo >}}
 +ignoreErrors = ["error-42"]
 +{{< /code-toggle >}}
 +
 +[`errorf`]: /functions/fmt/errorf
index f9ff885f8ce509a8f2fce8be270086598416dd64,0000000000000000000000000000000000000000..6f3128e5f01c432945daa0f617a93c017e3ba47b
mode 100644,000000..100644
--- /dev/null
@@@ -1,25 -1,0 +1,20 @@@
- linkTitle: print
 +---
 +title: fmt.Print
- categories: [functions]
 +description: Prints the default representation of the given arguments using the standard `fmt.Print` function.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - fmt.Print
-   - fmt.Printf
-   - fmt.Println
++action:
 +  aliases: [print]
++  related:
++    - functions/fmt/Printf
++    - functions/fmt/Println
 +  returnType: string
 +  signatures: [fmt.Print INPUT]
- {{ print "foo" }} → "foo"
- {{ print "foo" "bar" }} → "foobar"
 +aliases: [/functions/print]
 +---
 +
 +```go-html-template
++{{ print "foo" }} → foo
++{{ print "foo" "bar" }} → foobar
 +{{ print (slice 1 2 3) }} → [1 2 3]
 +```
index 06b7222e9921d707eb573cc5c13722999520dbbf,0000000000000000000000000000000000000000..5d0127460a155c4320c1dba1e6fb6de39573b490
mode 100644,000000..100644
--- /dev/null
@@@ -1,46 -1,0 +1,39 @@@
- linkTitle: printf
 +---
 +title: fmt.Printf
- categories: [functions]
 +description: Formats a string using the standard `fmt.Sprintf` function.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - fmt.Print
-   - fmt.Printf
-   - fmt.Println
++action:
 +  aliases: [printf]
++  related:
++    - functions/fmt/Print
++    - functions/fmt/Println
 +  returnType: string
 +  signatures: ['fmt.Printf FORMAT [INPUT]']
- The documentation for [Go's fmt package] describes the structure and content of the format string.
- [Go's fmt package]: https://pkg.go.dev/fmt
 +aliases: [/functions/printf]
 +---
 +
++{{% include "functions/fmt/_common/fmt-layout.md" %}}
 +
 +```go-html-template
 +{{ $var := "world" }}
 +{{ printf "Hello %s." $var }} → Hello world.
 +```
 +
 +```go-html-template
 +{{ $pi := 3.14159265 }}
 +{{ printf "Pi is approximately %.2f." $pi }} → 3.14
 +```
 +
 +Use the `printf` function with the `safeHTMLAttr` function:
 +
 +```go-html-template
 +{{ $desc := "Eat at Joe's" }}
 +<meta name="description" {{ printf "content=%q" $desc | safeHTMLAttr }}>
 +```
 +
 +Hugo renders this to:
 +
 +```html
 +<meta name="description" content="Eat at Joe's">
 +```
index 358b5f8ac3726e209bfdb389f36773165bf7b706,0000000000000000000000000000000000000000..a4db56ffb7bef2dd5690863c744e98da12e3d6fc
mode 100644,000000..100644
--- /dev/null
@@@ -1,23 -1,0 +1,18 @@@
- linkTitle: println
- description: Prints the default representation of the given argument using the standard `fmt.Print` function and enforces a linebreak.
- categories: [functions]
 +---
 +title: fmt.Println
- menu:
-   docs:
-     parent: functions
- function:
++description: Prints the default representation of the given argument using the standard `fmt.Print` function and enforces a line break.
++categories: []
 +keywords: []
- relatedFunctions:
-   - fmt.Print
-   - fmt.Printf
-   - fmt.Println
++action:
 +  aliases: [println]
++  related:
++    - functions/fmt/Print
++    - functions/fmt/Printf
 +  returnType: string
 +  signatures: [fmt.Println INPUT]
- {{ println "foo" }} → "foo\n"
 +aliases: [/functions/println]
 +---
 +
 +```go-html-template
++{{ println "foo" }} → foo\n
 +```
index be579a21687ca068af095da53c0d725399247b9f,0000000000000000000000000000000000000000..b07cf3cc3e8465bb50bbc27494cf4a35a7de2123
mode 100644,000000..100644
--- /dev/null
@@@ -1,30 -1,0 +1,22 @@@
- linkTitle: warnf
 +---
 +title: fmt.Warnf
- categories: [functions]
 +description: Log a WARNING from a template.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - fmt.Errorf
-   - fmt.Erroridf
-   - fmt.Warnf
++action:
 +  aliases: [warnf]
++  related:
++    - functions/fmt/Errorf
++    - functions/fmt/Erroridf
 +  returnType: string
 +  signatures: ['fmt.Warnf FORMAT [INPUT]']
- The documentation for [Go's fmt package] describes the structure and content of the format string.
 +aliases: [/functions/warnf]
 +---
 +
- Like the  [`printf`] function, the `warnf` function evaluates the format string. It then prints the result to the WARNING log. Hugo prints each unique message once to avoid flooding the log with duplicate warnings.
++{{% include "functions/fmt/_common/fmt-layout.md" %}}
 +
- {{ warnf "Copyright notice missing from site configuration" }}
++The `warnf` function evaluates the format string, then prints the result to the WARNING log. Hugo prints each unique message once to avoid flooding the log with duplicate warnings.
 +
 +```go-html-template
- [`printf`]: /functions/fmt/printf
- [Go's fmt package]: https://pkg.go.dev/fmt
++{{ warnf "The %q shortcode was unable to find %s. See %s" .Name $file .Position }}
 +```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ff69ce5e43dac2b1213aef13f3843202c7a2abe2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++---
++# Do not remove front matter.
++---
++
++The documentation for Go's [fmt] package describes the structure and content of the format string.
++
++[fmt]: https://pkg.go.dev/fmt
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..51ef847ca73d180d0d6878952529531b84fd7bdc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Fmt functions
++linkTitle: fmt 
++description: Template functions to print strings within a template or to print messages to the terminal
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to print strings within a template or to print messages to the terminal.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1e609b56ebc994d42253d62aa18b048d464507a2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++---
++title: Global functions
++linkTitle: global
++description: Global template functions to access page and site data.
++categories: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these global functions to access page and site data.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e17fb076789f0515d0ef5e3e2b4c17e27e43ad82
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,109 @@@
++---
++title: page
++description: Provides global access to a Page object.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/global/site
++  returnType: 
++  signatures: [page]
++toc: true
++aliases: [/functions/page]
++---
++
++{{< new-in 0.111.0 >}}
++
++At the top level of a template that receives a `Page` object in context, these are equivalent:
++
++```go-html-template
++{{ .Params.foo }}
++{{ .Page.Params.foo }}
++{{ page.Params.foo }}
++```
++
++When a `Page` object is not in context, you can use the global `page` function:
++
++```go-html-template
++{{ page.Params.foo }}
++```
++
++{{% note %}}
++Do not use the global `page` function in shortcodes, partials called by shortcodes, or cached partials. See [warnings](#warnings) below.
++{{% /note %}}
++
++## Explanation
++
++Hugo almost always passes a `Page` as the data context into the top level template (e.g., `single.html`). The one exception is the multihost sitemap template. This means that you can access the current page with the `.` variable in the template.
++
++But when you are deeply nested inside of a [content view], [partial], or [render hook], it is not always practical or possible to access the `Page` object.
++
++Use the global `page` function to access the `Page` object from anywhere in any template.
++
++## Warnings
++
++### Be aware of top-level context
++
++The global `page` function accesses the `Page` object passed into the top-level template.
++
++With this content structure:
++
++```text
++content/
++├── posts/
++│   ├── post-1.md
++│   ├── post-2.md
++│   └── post-3.md
++└── _index.md      <-- title is "My Home Page"
++```
++
++And this code in the home page template:
++
++```go-html-template
++{{ range site.Sections }}
++  {{ range .Pages }}
++    {{ page.Title }}
++  {{ end }}
++{{ end }}
++```
++
++The rendered output will be:
++
++```text
++My Home Page
++My Home Page
++My Home Page
++```
++
++In the example above, the global `page` function accesses the `Page` object passed into the home page template; it does not access the `Page` object of the iterated pages.
++
++### Be aware of caching
++
++Do not use the global `page` function in:
++
++- Shortcodes
++- Partials called by shortcodes
++- Partials cached by the [`partialCached`] function
++
++Hugo caches rendered shortcodes. If you use the global `page` function within a shortcode, and the page content is rendered in two or more templates, the cached shortcodes may be incorrect.
++
++Consider this section template:
++
++```go-html-template
++{{ range .Pages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++  {{ .Summary }}
++{{ end }}
++```
++
++When you call the [`Summary`] method, Hugo renders the page content including shortcodes. In this case, within a shortcode, the global `page` function accesses the `Page` object of the section page, not the content page.
++
++If Hugo renders the section page before a content page, the cached rendered shortcode will be incorrect. You cannot control the rendering sequence due to concurrency.
++
++[`Summary`]: /methods/page/summary
++[`partialCached`]: /functions/partials/includecached
++[content view]: /getting-started/glossary/#content-view
++[partial]: /getting-started/glossary/#partial
++[render hook]: /getting-started/glossary/#render-hook
++[shortcode]: getting-started/glossary/#shortcode
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a097e471bd647d4d68904991c8fb410a17525e50
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++---
++title: site
++description: Provides global access to the current Site object.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/global/page
++  returnType: 
++  signatures: [site]
++aliases: [/functions/site]
++---
++
++At the top level of a template that receives the `Site` object in context, these are equivalent:
++
++```go-html-template
++{{ .Site.Params.foo }}
++{{ site.Params.foo }}
++```
++
++When the `Site` object is not in context, use the global `site` function:
++
++```go-html-template
++{{ site.Params.foo }}
++```
++
++{{% note %}}
++To simplify your templates, use the global `site` function regardless of whether the `Site` object is in context.
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..71718c3fd369853fb543e5ac0aea40a2c227062e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++---
++# Do not remove front matter.
++---
++
++See Go's [text/template] documentation for more information.
++
++[text/template]: https://pkg.go.dev/text/template
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c8fc9e09e4d79ce8a55192d65e3460d915cc8c57
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++---
++# Do not remove front matter.
++---
++
++In Go templates, the falsy values are `false`, `0`, any nil pointer or interface value, and any array, slice, map, or string of length zero. Everything else is truthy.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9075756aa9c2ee9947a2964fe87fe287c6b8ac0f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++---
++title: Go template functions, operators, and statements
++linkTitle: go template
++description: Template functions, operators, and statements provided by Go's text/template package.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++These are the functions, operators, and statements provided by Go's [text/template] package.
++
++[text/template]: https://pkg.go.dev/text/template
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6bc8c60a5774c4eca8c508b8b3b7c3dfff3e6773
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++---
++title: and
++description: Returns the first falsy argument. If all arguments are truthy, returns the last argument.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/go-template/not
++    - functions/go-template/or
++  returnType: any
++  signatures: [and VALUE...]
++---
++
++{{% include "functions/go-template/_common/truthy-falsy.md" %}}
++
++```go-html-template
++{{ and 1 0 "" }} → 0 (int)
++{{ and 1 false 0 }} → false (bool)
++
++{{ and 1 2 3 }} → 3 (int)
++{{ and "a" "b" "c" }} → c (string)
++{{ and "a" 1 true }} → true (bool)
++```
++
++{{% include "functions/go-template/_common/text-template.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f8a082037984fbe6a02aa06ba2d557aff0cf9b60
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,55 @@@
++---
++title: block
++description: Defines a template and executes it in place.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/go-template/define
++    - functions/go-template/end
++  returnType:
++  signatures: [block NAME CONTEXT]
++---
++
++A block is shorthand for defining a template:
++
++```go-html-template
++{{ define "name" }} T1 {{ end }}
++```
++
++and then executing it in place:
++
++```go-html-template
++{{ template "name" pipeline }}
++```
++The typical use is to define a set of root templates that are then customized by redefining the block templates within.
++
++{{< code file=layouts/_default/baseof.html >}}
++<body>
++  <main>
++    {{ block "main" . }}
++      {{ print "default value if 'main' template is empty" }}
++    {{ end }}
++  </main>
++</body>
++{{< /code >}}
++
++{{< code file=layouts/_default/single.html >}}
++{{ define "main" }}
++  <h1>{{ .Title }}</h1>
++  {{ .Content }}
++{{ end }}
++{{< /code >}}
++
++{{< code file=layouts/_default/list.html >}}
++{{ define "main" }}
++  <h1>{{ .Title }}</h1>
++  {{ .Content }}
++  {{ range .Pages }}
++    <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++  {{ end }}
++{{ end }}
++{{< /code >}}
++
++{{% include "functions/go-template/_common/text-template.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..14074d7c08cba96db7413c2ae9aba6101002baeb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,33 @@@
++---
++title: break
++description: Used with the range statement, stops the innermost iteration and bypasses all remaining iterations.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/go-template/continue
++    - functions/go-template/range
++  returnType:
++  signatures: [break]
++---
++
++This template code:
++
++```go-html-template
++{{ $s := slice "foo" "bar" "baz" }}
++{{ range $s }}
++  {{ if eq . "bar" }}
++    {{ break }}
++  {{ end }}
++  <p>{{ . }}</p>
++{{ end }}
++```
++
++Is rendered to:
++
++```html
++<p>foo</p>
++```
++
++{{% include "functions/go-template/_common/text-template.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c8030b8b7e96004e68a62e3f30d0dc28b42bae76
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,34 @@@
++---
++title: continue
++description: Used with the range statement, stops the innermost iteration and continues to the next iteration.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/go-template/break
++    - functions/go-template/range
++  returnType:
++  signatures: [continue]
++---
++
++This template code:
++
++```go-html-template
++{{ $s := slice "foo" "bar" "baz" }}
++{{ range $s }}
++  {{ if eq . "bar" }}
++    {{ continue }}
++  {{ end }}
++  <p>{{ . }}</p>
++{{ end }}
++```
++
++Is rendered to:
++
++```html
++<p>foo</p>
++<p>baz</p>
++```
++
++{{% include "functions/go-template/_common/text-template.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4d09c14f3ee487e2b398d8380bae7e9e9e85caf1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,55 @@@
++---
++title: define
++description: Defines a template.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/go-template/block
++    - functions/go-template/end
++    - functions/go-template/template
++    - functions/partials/Include
++    - functions/partials/IncludeCached
++  returnType:
++  signatures: [define NAME]
++---
++
++Use with the [`block`] statement:
++
++```go-html-template
++{{ block "main" . }}
++  {{ print "default value if 'main' template is empty" }}
++{{ end }}
++
++{{ define "main" }}
++  <h1>{{ .Title }}</h1>
++  {{ .Content }}
++{{ end }}
++```
++
++Use with the [`partial`] function:
++
++```go-html-template
++{{ partial "inline/foo.html" (dict "answer" 42) }}
++
++{{ define "partials/inline/foo.html" }}
++  {{ printf "The answer is %v." .answer }}
++{{ end }}
++```
++
++Use with the [`template`] function:
++
++```go-html-template
++{{ template "foo" (dict "answer" 42) }}
++
++{{ define "foo" }}
++  {{ printf "The answer is %v." .answer }}
++{{ end }}
++```
++
++[`block`]: /functions/go-template/block
++[`template`]: /functions/go-template/block
++[`partial`]: /functions/partials/include/
++
++{{% include "functions/go-template/_common/text-template.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ccb8b722cb3ee339a08b1dbe23380934e46d4229
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,69 @@@
++---
++title: else
++description: Begins an alternate block for if, with, and range statements.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/go-template/if
++    - functions/go-template/range
++    - functions/go-template/with
++    - functions/go-template/end
++  returnType:
++  signatures: [else VALUE]
++---
++
++Use with the [`if`] statement:
++
++```go-html-template
++{{ $var := "foo" }}
++{{ if $var }}
++  {{ $var }} → foo
++{{ else }}
++  {{ print "var is falsy" }}
++{{ end }}
++```
++
++Use with the [`with`] statement:
++
++```go-html-template
++{{ $var := "foo" }}
++{{ with $var }}
++  {{ . }} → foo
++{{ else }}
++  {{ print "var is falsy" }}
++{{ end }}
++```
++
++Use with the [`range`] statement:
++
++```go-html-template
++{{ $var := slice 1 2 3 }}
++{{ range $var }}
++  {{ . }} → 1 2 3 
++{{ else }}
++  {{ print "var is falsy" }}
++{{ end }}
++```
++
++Use `else if` to check multiple conditions.
++
++```go-html-template
++{{ $var := 12 }}
++{{ if eq $var 6 }}
++  {{ print "var is 6" }}
++{{ else if eq $var 7 }}
++  {{ print "var is 7" }}
++{{ else if eq $var 42 }}
++  {{ print "var is 42" }}
++{{ else }}
++  {{ print "var is something else" }}
++{{ end }}
++```
++
++{{% include "functions/go-template/_common/text-template.md" %}}
++
++[`if`]: /functions/go-template/if
++[`with`]: /functions/go-template/with
++[`range`]: /functions/go-template/range
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..07d004de510eb9d3e0d92c3a64648470ab97f88e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,65 @@@
++---
++title: end
++description: Terminates if, with, range, block, and define statements.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/go-template/block
++    - functions/go-template/define
++    - functions/go-template/if
++    - functions/go-template/range
++    - functions/go-template/with
++  returnType:
++  signatures: [end]
++---
++
++Use with the [`if`] statement:
++
++```go-html-template
++{{ $var := "foo" }}
++{{ if $var }}
++  {{ $var }} → foo
++{{ end }}
++```
++
++Use with the [`with`] statement:
++
++```go-html-template
++{{ $var := "foo" }}
++{{ with $var }}
++  {{ . }} → foo
++{{ end }}
++```
++
++Use with the [`range`] statement:
++
++```go-html-template
++{{ $var := slice 1 2 3 }}
++{{ range $var }}
++  {{ . }} → 1 2 3 
++{{ end }}
++```
++
++Use with the [`block`] statement:
++
++```go-html-template
++{{ block "main" . }}{{ end }}
++```
++
++Use with the [`define`] statement:
++
++```go-html-template
++{{ define "main" }}
++  {{ print "this is the main section" }}
++{{ end }}
++```
++
++{{% include "functions/go-template/_common/text-template.md" %}}
++
++[`block`]: /functions/go-template/block
++[`define`]: /functions/go-template/define
++[`if`]: /functions/go-template/if
++[`range`]: /functions/go-template/range
++[`with`]: /functions/go-template/with
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e63c382e126541a20749dbb833486b2ffe53bc01
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,54 @@@
++---
++title: if
++description: Executes the block if the expression is truthy.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/go-template/with
++    - functions/go-template/else
++    - functions/go-template/end
++    - functions/collections/IsSet
++  returnType:
++  signatures: [if EXPR]
++---
++
++{{% include "functions/go-template/_common/truthy-falsy.md" %}}
++
++```go-html-template
++{{ $var := "foo" }}
++{{ if $var }}
++  {{ $var }} → foo
++{{ end }}
++```
++
++Use with the [`else`] statement:
++
++```go-html-template
++{{ $var := "foo" }}
++{{ if $var }}
++  {{ $var }} → foo
++{{ else }}
++  {{ print "var is falsy" }}
++{{ end }}
++```
++
++Use `else if` to check multiple conditions.
++
++```go-html-template
++{{ $var := 12 }}
++{{ if eq $var 6 }}
++  {{ print "var is 6" }}
++{{ else if eq $var 7 }}
++  {{ print "var is 7" }}
++{{ else if eq $var 42 }}
++  {{ print "var is 42" }}
++{{ else }}
++  {{ print "var is something else" }}
++{{ end }}
++```
++
++{{% include "functions/go-template/_common/text-template.md" %}}
++
++[`else`]: /functions/go-template/else
index b8be621e8bdc5637f67533ff19131475e810caed,0000000000000000000000000000000000000000..43f150a5ff3499f0629b89d55fff9c5cc9ff6f57
mode 100644,000000..100644
--- /dev/null
@@@ -1,55 -1,0 +1,51 @@@
- categories: [functions]
 +---
 +title: len
 +description: Returns the length of a string, slice, map, or collection.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   signatures: [len INPUT]
- relatedFunctions:
-   - len
-   - strings.Count
-   - strings.CountRunes
-   - strings.CountWords
-   - strings.RuneCount
++action:
 +  aliases: []
++  related:
++    - functions/strings/Count
++    - functions/strings/CountRunes
++    - functions/strings/CountWords
++    - functions/strings/RuneCount
 +  returnType: int
- {{% readfile file="/functions/_common/go-template-functions.md" %}}
++  signatures: [len VALUE]
 +aliases: [/functions/len]
 +---
 +
 +With a string:
 +
 +```go-html-template
 +{{ "ab" | len }} → 2
 +{{ "" | len }} → 0
 +```
 +
 +With a slice:
 +
 +```go-html-template
 +{{ slice "a" "b" | len }} → 2
 +{{ slice | len }} → 0
 +```
 +
 +With a map:
 +
 +```go-html-template
 +{{ dict "a" 1 "b" 2  | len }} → 2
 +{{ dict | len }} → 0
 +```
 +
 +With a collection:
 +
 +```go-html-template
 +{{ site.RegularPages | len }} → 42
 +```
 +
 +You may also determine the number of pages in a collection with:
 +
 +```go-html-template
 +{{ site.RegularPages.Len }} → 42
 +```
++
++{{% include "functions/go-template/_common/text-template.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4c7747c7bb7d8d490ee8e01fcf0fbeb02f55270b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,35 @@@
++---
++title: not
++description: Returns the boolean negation of its single argument.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/go-template/and
++    - functions/go-template/or
++  returnType: bool
++  signatures: [not VALUE]
++---
++
++Unlike the `and` and `or` operators, the `not` operator always returns a boolean value.
++
++```go-html-template
++{{ not true }} → false
++{{ not false }} → true
++
++{{ not 1 }} → false
++{{ not 0 }} → true
++
++{{ not "x" }} → false
++{{ not "" }} → true
++```
++
++Use the `not` operator, twice in succession, to cast any value to a boolean value. For example:
++
++```go-html-template
++{{ 42 | not | not }} → true
++{{ "" | not | not }} → false
++```
++
++{{% include "functions/go-template/_common/text-template.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0d86196086933742f5d292587b5fb7436f47da22
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++---
++title: or
++description: Returns the first truthy argument. If all arguments are falsy, returns the last argument.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/go-template/and
++    - functions/go-template/not
++  returnType: any
++  signatures: [or VALUE...]
++---
++
++{{% include "functions/go-template/_common/truthy-falsy.md" %}}
++
++```go-html-template
++{{ or 0 1 2 }} → 1
++{{ or false "a" 1 }} → a
++{{ or 0 true "a" }} → true
++
++{{ or false "" 0 }} → 0
++{{ or 0 "" false }} → false
++```
++
++{{% include "functions/go-template/_common/text-template.md" %}}
index cf01633b4d5cc2a4c87be7bda4870550972bec2c,0000000000000000000000000000000000000000..e8642e50b0d844586ea49b777d32298c140511f7
mode 100644,000000..100644
--- /dev/null
@@@ -1,159 -1,0 +1,199 @@@
- description: Iterates over slices, maps, and page collections.
- categories: [functions]
 +---
 +title: range
- menu:
-   docs:
-     parent: functions
- function:
++description: Iterates over a non-empty collection, binds context (the dot) to successive elements, and executes the block.
++categories: []
 +keywords: []
- relatedFunctions:
-   - with
-   - range
++action:
 +  aliases: []
++  related:
++    - functions/go-template/break
++    - functions/go-template/continue
++    - functions/go-template/else
++    - functions/go-template/end
 +  returnType: 
 +  signatures: [range COLLECTION]
- {{% readfile file="/functions/_common/go-template-functions.md" %}}
 +aliases: [/functions/range]
 +toc: true
 +---
 +
- ## Slices
++{{% include "functions/go-template/_common/truthy-falsy.md" %}}
 +
- Template:
++```go-html-template
++{{ $s := slice "foo" "bar" "baz" }}
++{{ range $var }}
++  {{ . }} → foo bar baz
++{{ end }}
++```
 +
- Result:
++Use with the [`else`] statement:
 +
 +```go-html-template
 +{{ $s := slice "foo" "bar" "baz" }}
 +{{ range $s }}
 +  <p>{{ . }}</p>
++{{ else }}
++  <p>The collection is empty</p>
++{{ end }}
++```
++
++Within a range block:
++
++- Use the [`continue`] statement to stop the innermost iteration and continue to the next iteration
++- Use the [`break`] statement to stop the innermost iteration and bypass all remaining iterations
++
++## Understanding context
++
++At the top of a page template, the [context] (the dot) is a `Page` object. Within the `range` block, the context is bound to each successive element.
++
++With this contrived example that uses the [`seq`] function to generate a slice of integers:
++
++```go-html-template
++{{ range seq 3 }}
++  {{ .Title }}
++{{ end }}
++```
++
++Hugo will throw an error:
++
++    can't evaluate field Title in type int
++
++The error occurs because we are trying to use the `.Title` method on an integer instead of a `Page` object. Within the `range` block, if we want to render the page title, we need to get the context passed into the template.
++
++{{% note %}}
++Use the `$` to get the context passed into the template.
++{{% /note %}}
++
++This template will render the page title three times:
++
++```go-html-template
++{{ range seq 3 }}
++  {{ $.Title }}
 +{{ end }}
 +```
 +
- Template:
++{{% note %}}
++Gaining a thorough understanding of context is critical for anyone writing template code.
++{{% /note %}}
++
++[`seq`]: functions/collections/seq/
++[context]: /getting-started/glossary/#context
++
++## Array or slice of scalars
++
++This template code:
++
++```go-html-template
++{{ $s := slice "foo" "bar" "baz" }}
++{{ range $s }}
++  <p>{{ . }}</p>
++{{ end }}
++```
++
++Is rendered to:
 +
 +```html
 +<p>foo</p>
 +<p>bar</p>
 +<p>baz</p>
 +```
 +
- Result:
++This template code:
 +
 +```go-html-template
 +{{ $s := slice "foo" "bar" "baz" }}
 +{{ range $v := $s }}
 +  <p>{{ $v }}</p>
 +{{ end }}
 +```
 +
- Template:
++Is rendered to:
 +
 +```html
 +<p>foo</p>
 +<p>bar</p>
 +<p>baz</p>
 +```
 +
- Result:
++This template code:
 +
 +```go-html-template
 +{{ $s := slice "foo" "bar" "baz" }}
 +{{ range $k, $v := $s }}
 +  <p>{{ $k }}: {{ $v }}</p>
 +{{ end }}
 +```
 +
- ## Maps
++Is rendered to:
 +
 +```html
 +<p>0: foo</p>
 +<p>1: bar</p>
 +<p>2: baz</p>
 +```
 +
- Template:
++## Array or slice of maps
 +
- Result:
++This template code:
 +
 +```go-html-template
 +{{ $m := slice
 +  (dict "name" "John" "age" 30)
 +  (dict "name" "Will" "age" 28)
 +  (dict "name" "Joey" "age" 24)
 +}}
 +{{ range $m }}
 +  <p>{{ .name }} is {{ .age }}</p>
 +{{ end }}
 +```
 +
- ## Page collections
++Is rendered to:
 +
 +```html
 +<p>John is 30</p>
 +<p>Will is 28</p>
 +<p>Joey is 24</p>
 +```
 +
- Template:
++## Array or slice of pages
 +
- Result:
++This template code:
 +
 +```go-html-template
 +{{ range where site.RegularPages "Type" "articles" }}
 +  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
 +{{ end }}
 +```
 +
- ## Break
- Use the `break` statement to stop the innermost iteration and bypass all remaining iterations.
++Is rendered to:
 +
 +```html
 +<h2><a href="/articles/article-3/">Article 3</a></h2>
 +<h2><a href="/articles/article-2/">Article 2</a></h2>
 +<h2><a href="/articles/article-1/">Article 1</a></h2>
 +```
 +
- Template:
++## Maps
 +
- {{ $s := slice "foo" "bar" "baz" }}
- {{ range $s }}
-   {{ if eq . "bar" }}
-     {{ break }}
-   {{ end }}
-   <p>{{ . }}</p>
++This template code:
 +
 +```go-html-template
- Result:
- ```html
- <p>foo</p>
- ```
- ## Continue
- Use the `continue` statement to stop the innermost iteration and continue to the next iteration.
- Template:
++{{ $m :=  dict "name" "John" "age" 30 }}
++{{ range $k, $v := $m }}
++  <p>key = {{ $k }} value = {{ $v }}</p>
 +{{ end }}
 +```
 +
- {{ $s := slice "foo" "bar" "baz" }}
- {{ range $s }}
-   {{ if eq . "bar" }}
-     {{ continue }}
-   {{ end }}
-   <p>{{ . }}</p>
- {{ end }}
++Is rendered to:
 +
 +```go-html-template
- Result:
++<p>key = age value = 30</p>
++<p>key = name value = John</p>
 +```
 +
- ```html
- <p>foo</p>
- <p>baz</p>
- ```
++Unlike ranging over an array or slice, Hugo sorts by key when ranging over a map.
 +
++{{% include "functions/go-template/_common/text-template.md" %}}
++
++[`else`]: /functions/go-template/else
++[`break`]: /functions/go-template/break
++[`continue`]: /functions/go-template/continue
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2a166c718d7cd22979a9907b02db74fc8a2d740e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,110 @@@
++---
++title: return
++description: Used within partial templates, terminates template execution and returns the given value, if any.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/partials/Include
++    - functions/partials/IncludeCached
++  returnType: any
++  signatures: ['return [VALUE]']
++toc: true
++---
++
++The `return` statement is a custom addition to Go's [text/template] package. Used within partial templates, the `return` statement terminates template execution and returns the given value, if any.
++
++The returned value may be of any data type including, but not limited to, [`bool`], [`float`], [`int`], [`map`], [`resource`], [`slice`], and [`string`].
++
++A `return` statement without a value returns an empty string of type `template.HTML`.
++
++[`bool`]: /getting-started/glossary/#bool
++[`float`]: /getting-started/glossary/#float
++[`int`]: /getting-started/glossary/#int
++[`map`]: /getting-started/glossary/#map
++[`resource`]: /getting-started/glossary/#resource
++[`slice`]: /getting-started/glossary/#slice
++[`string`]: /getting-started/glossary/#string
++[text/template]: https://pkg.go.dev/text/template
++
++{{% note %}}
++Unlike `return` statements in other languages, Hugo executes the first occurrence of the `return` statement regardless of its position within logical blocks. See [usage](#usage) notes below.
++{{% /note %}}
++
++## Example
++
++By way of example, let's create a partial template that _renders_ HTML, describing whether the given number is odd or even:
++
++{{< code file="layouts/partials/odd-or-even.html" >}}
++{{ if math.ModBool . 2 }}
++  <p>{{ . }} is even</p>
++{{ else }}
++  <p>{{ . }} is odd</p>
++{{ end }}
++{{< /code >}}
++
++When called, the partial renders HTML:
++
++```go-html-template
++{{ partial "odd-or-even.html" 42 }} → <p>42 is even</p>
++```
++
++Instead of rendering HTML, let's create a partial that _returns_ a boolean value, reporting whether the given number is even:
++
++{{< code file="layouts/partials/is-even.html" >}}
++{{ return math.ModBool . 2 }}
++{{< /code >}}
++
++With this template:
++
++```go-html-template
++{{ $number := 42 }}
++{{ if partial "is-even.html" $number }}
++  <p>{{ $number }} is even</p>
++{{ else }}
++  <p>{{ $number }} is odd</p>
++{{ end }}
++```
++
++Hugo renders:
++
++```html
++<p>42 is even</p>
++```
++
++See additional examples in the [partial templates] section.
++
++[partial templates]: /templates/partials/#returning-a-value-from-a-partial
++
++## Usage
++
++{{% note %}}
++Unlike `return` statements in other languages, Hugo executes the first occurrence of the `return` statement regardless of its position within logical blocks
++{{% /note %}}
++
++A partial that returns a value must contain only one `return` statement, placed at the end of the template.
++
++For example:
++
++{{< code file="layouts/partials/is-even.html" >}}
++{{ $result := false }}
++{{ if math.ModBool . 2 }}
++  {{ $result = "even" }}
++{{ else }}
++  {{ $result = "odd" }}
++{{ end }}
++{{ return $result }}
++{{< /code >}}
++
++{{% note %}}
++The construct below is incorrect; it contains more than one `return` statement.
++{{% /note %}}
++
++{{< code file="layouts/partials/do-not-do-this.html" >}}
++{{ if math.ModBool . 2 }}
++  {{ return "even" }}
++{{ else }}
++  {{ return "odd" }}
++{{ end }}
++{{< /code >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a78ec5c65279040b0222955324e1499b8f08c7a9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,49 @@@
++---
++title: template
++description: Executes the given template, optionally passing context.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/go-template/define
++    - functions/partials/Include
++    - functions/partials/IncludeCached
++  returnType: 
++  signatures: ['template NAME [CONTEXT]']
++---
++
++Use the `template` function to execute [internal templates]. For example:
++
++```go-html-template
++{{ range (.Paginate .Pages).Pages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++{{ template "_internal/pagination.html" . }}
++```
++
++You can also use the `template` function to execute a defined template:
++
++```go-html-template
++{{ template "foo" (dict "answer" 42) }}
++
++{{ define "foo" }}
++  {{ printf "The answer is %v." .answer }}
++{{ end }}
++```
++
++The example above can be rewritten using an [inline partial] template:
++
++```go-html-template
++{{ partial "inline/foo.html" (dict "answer" 42) }}
++
++{{ define "partials/inline/foo.html" }}
++  {{ printf "The answer is %v." .answer }}
++{{ end }}
++```
++
++{{% include "functions/go-template/_common/text-template.md" %}}
++
++[`partial`]: /functions/partials/include/
++[inline partial]: /templates/partials/#inline-partials
++[internal templates]: /templates/internal
index cbbfdfa7d3e1e1a98ae684faafab7fd156395a88,0000000000000000000000000000000000000000..946828f5637a871ad2dcc5f52d3cb0e55df7b59b
mode 100644,000000..100644
--- /dev/null
@@@ -1,32 -1,0 +1,28 @@@
- categories: [functions]
 +---
 +title: urlquery
 +description: Returns the escaped value of the textual representation of its arguments in a form suitable for embedding in a URL query.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   signatures: ['urlquery INPUT [INPUT]...']
- relatedFunctions:
-   - collections.Querify
-   - urlquery
++action:
 +  aliases: []
++  related:
++    - functions/collections/Querify
 +  returnType: string
- {{% readfile file="/functions/_common/go-template-functions.md" %}}
++  signatures: ['urlquery VALUE [VALUE...]']
 +aliases: [/functions/urlquery]
 +---
 +
 +This template code:
 +
 +```go-html-template
 +{{ $u := urlquery "https://" "example.com" | safeURL }}
 +<a href="https://example.org?url={{ $u }}">Link</a>
 +```
 +
 +Is rendered to:
 +
 +```html
 +<a href="https://example.org?url=https%3A%2F%2Fexample.com">Link</a>
 +```
++
++{{% include "functions/go-template/_common/text-template.md" %}}
index 06ca38150f78149873d14fc09ba8533621cae509,0000000000000000000000000000000000000000..1971819530d10aa99b03a30848c9c3e23f00bf4c
mode 100644,000000..100644
--- /dev/null
@@@ -1,35 -1,0 +1,87 @@@
- description: Rebinds the context (`.`) within its scope and skips the block if the variable is absent or empty.
- categories: [functions]
 +---
 +title: with
- menu:
-   docs:
-     parent: functions
- function:
++description: Binds context (the dot) to the expression and executes the block if expression is truthy.
++categories: []
 +keywords: []
-   returnType: any
-   signatures: [with PIPELINE]
- relatedFunctions:
-   - with
-   - range
++action:
 +  aliases: []
- {{% readfile file="/functions/_common/go-template-functions.md" %}}
++  related:
++    - functions/go-template/if
++    - functions/go-template/else
++    - functions/go-template/end
++    - functions/collections/IsSet
++  returnType:
++  signatures: [with EXPR]
 +aliases: [/functions/with]
++toc: true
 +---
 +
- An alternative way of writing an `if` statement and then referencing the same value is to use `with` instead. `with` rebinds the context (`.`) within its scope and skips the block if the variable is absent, unset or empty.
++{{% include "functions/go-template/_common/truthy-falsy.md" %}}
 +
- The set of *empty* values is defined by [the Go templates package](https://golang.org/pkg/text/template/). Empty values include `false`, the number zero, and the empty string.
++```go-html-template
++{{ $var := "foo" }}
++{{ with $var }}
++  {{ . }} → foo
++{{ end }}
++```
 +
- If you want to render a block if an index or key is present in a slice, array, channel or map, regardless of whether the value is empty, you should use [`isset`](/functions/collections/isset) instead.
++Use with the [`else`] statement:
 +
- The following example checks for a [user-defined site variable](/variables/site/) called `twitteruser`. If the key-value is not set, the following will render nothing:
++```go-html-template
++{{ $var := "foo" }}
++{{ with $var }}
++  {{ . }} → foo
++{{ else }}
++  {{ print "var is falsy" }}
++{{ end }}
++```
 +
- {{< code file="layouts/partials/twitter.html" >}}
- {{ with .Site.Params.twitteruser }}<span class="twitter">
- <a href="https://twitter.com/{{ . }}" rel="author">
- <img src="/images/twitter.png" width="48" height="48" title="Twitter: {{ . }}"
-  alt="Twitter"></a>
- </span>{{ end }}
- {{< /code >}}
++Intialize a variable, scoped to the current block:
 +
++```go-html-template
++{{ with $var := 42 }}
++  {{ . }} → 42
++  {{ $var }} → 42
++{{ end }}
++{{ $var }} → undefined
++```
++
++## Understanding context
++
++At the top of a page template, the [context] (the dot) is a `Page` object. Inside of the `with` block, the context is bound to the value passed to the `with` statement.
++
++With this contrived example:
++
++```go-html-template
++{{ with 42 }}
++  {{ .Title }}
++{{ end }}
++```
++
++Hugo will throw an error:
++
++    can't evaluate field Title in type int
++
++The error occurs because we are trying to use the `.Title` method on an integer instead of a `Page` object. Inside of the `with` block, if we want to render the page title, we need to get the context passed into the template.
++
++{{% note %}}
++Use the `$` to get the context passed into the template.
++{{% /note %}}
++
++This template will render the page title as desired:
++
++```go-html-template
++{{ with 42 }}
++  {{ $.Title }}
++{{ end }}
++```
++
++{{% note %}}
++Gaining a thorough understanding of context is critical for anyone writing template code.
++{{% /note %}}
++
++[context]: /getting-started/glossary/#context
++
++{{% include "functions/go-template/_common/text-template.md" %}}
++
++[`else`]: /functions/go-template/else
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1fbdbeac6e9c2040fc5b834daa64a0cf2bac2175
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++---
++title: hugo.BuildDate
++description: Returns the compile date of the Hugo binary.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: string
++  signatures: [hugo.BuildDate]
++---
++
++The `hugo.BuildDate` function returns the compile date of the Hugo binary, formatted per [RFC 3339].
++
++[RFC 3339]: https://datatracker.ietf.org/doc/html/rfc3339
++
++```go-html-template
++{{ hugo.BuildDate }} → 2023-11-01T17:57:00Z
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cd4f2ce922b427465a35a0f954fffc65574d587e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++---
++title: hugo.CommitHash
++description: Returns the Git commit hash of the Hugo binary.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: string
++  signatures: [hugo.CommitHash]
++---
++
++```go-html-template
++{{ hugo.CommitHash }} → a4892a07b41b7b3f1f143140ee4ec0a9a5cf3970
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2f3f75e65d5f1ae2463c57dda018e9a1b67844ce
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,66 @@@
++---
++title: hugo.Deps
++description: Returns a slice of project dependencies, either Hugo Modules or local theme components.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: '[]hugo.Dependency'
++  signatures: [hugo.Deps]
++---
++
++The `hugo.Deps` function returns a slice of project dependencies, either Hugo Modules or local theme components. Each dependency contains:
++
++Owner
++: (`hugo.Dependency`) In the dependency tree, this is the first module that defines this module as a dependency (e.g., `github.com/gohugoio/hugo-mod-bootstrap-scss/v5`).
++
++Path
++: (`string`) The module path or the path below your `themes` directory (e.g., `github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2`).
++
++Replace
++: (`hugo.Dependency`) Replaced by this dependency.
++
++Time
++: (`time.Time`) The time that the version was created (e.g., `2022-02-13 15:11:28 +0000 UTC`).
++
++Vendor
++: (`bool`) Reports whether the dependency is vendored.
++
++Version
++: (`string`) The module version (e.g., `v2.21100.20000`).
++
++An example table listing the dependencies:
++
++```go-html-template
++<h2>Dependencies</h2>
++<table class="table table-dark">
++  <thead>
++    <tr>
++      <th scope="col">#</th>
++      <th scope="col">Owner</th>
++      <th scope="col">Path</th>
++      <th scope="col">Version</th>
++      <th scope="col">Time</th>
++      <th scope="col">Vendor</th>
++    </tr>
++  </thead>
++  <tbody>
++    {{ range $index, $element := hugo.Deps }}
++    <tr>
++      <th scope="row">{{ add $index 1 }}</th>
++      <td>{{ with $element.Owner }}{{ .Path }}{{ end }}</td>
++      <td>
++        {{ $element.Path }}
++        {{ with $element.Replace }}
++        => {{ .Path }}
++        {{ end }}
++      </td>
++      <td>{{ $element.Version }}</td>
++      <td>{{ with $element.Time }}{{ . }}{{ end }}</td>
++      <td>{{ $element.Vendor }}</td>
++    </tr>
++    {{ end }}
++  </tbody>
++</table>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f130de787c0d822a60581a2a56e44f465c191370
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++---
++title: hugo.Environment
++description: Returns the current running environment.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/hugo/IsDevelopment
++    - functions/hugo/IsProduction
++  returnType: string
++  signatures: [hugo.Environment]
++---
++
++The `hugo.Environment` function returns the current running [environment] as defined through the `--environment` command line flag.
++
++```go-html-template
++{{ hugo.Environment }} → production
++```
++
++Command line examples:
++
++Command|Environment
++:--|:--
++`hugo`|`production`
++`hugo --environment staging`|`staging`
++`hugo server`|`development`
++`hugo server --environment staging`|`staging`
++
++[environment]: /getting-started/glossary/#environment
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a9496d87fe7bfb35e62649f04416137d191b8f96
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++---
++title: hugo.Generator
++description: Renders an HTML meta element identifying the software that generated the site. 
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: template.HTML
++  signatures: [hugo.Generator]
++---
++
++```go-html-template
++{{ hugo.Generator }} → <meta name="generator" content="Hugo 0.120.3">
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1640c3862eaa3feceddcf9e59a7441cf12e16984
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: hugo.GoVersion
++description: Returns the Go version used to compile the Hugo binary
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: string
++  signatures: [hugo.GoVersion]
++---
++
++{{< new-in 0.101.0 >}}
++
++```go-html-template
++{{ hugo.GoVersion }} → go1.21.1
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9926b67c9e23beb498d29c77b5a99f47d993a4e6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++---
++title: hugo.IsDevelopment
++description: Reports whether the current running environment is "development".
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/hugo/IsProduction
++    - functions/hugo/Environment
++  returnType: bool
++  signatures: [hugo.IsDevelopment]
++---
++
++{{< new-in 0.120.0 >}}
++
++```go-html-template
++{{ hugo.IsDevelopment }} → true/false
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..84b68e6d3254cc873d54027dfc5b96e230c94518
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++---
++title: hugo.IsExtended
++description: Reports whether the Hugo binary is the extended version.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: bool
++  signatures: [hugo.IsExtended]
++---
++
++```go-html-template
++{{ hugo.IsExtended }} → true/false
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7e9bda0e35e7bc36a028c5bdb7008ad0b53dd34f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: hugo.IsProduction
++description: Reports whether the current running environment is "production".
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/hugo/IsDevelopment
++    - functions/hugo/Environment
++  returnType: bool
++  signatures: [hugo.IsProduction]
++---
++
++```go-html-template
++{{ hugo.IsProduction }} → true/false
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9422610078662bbd1434d35ebd29b71a76a85804
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: hugo.IsServer
++description: Reports whether the built-in development server is running.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: bool
++  signatures: [hugo.IsServer]
++---
++
++{{< new-in 0.120.0 >}}
++
++```go-html-template
++{{ hugo.IsServer }} → true/false
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9bb361a7181a2bfef5a99218a3bbd7b3df88aa5a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++---
++title: hugo.Version
++description: Returns the current version of the Hugo binary.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: hugo.VersionString
++  signatures: [hugo.Version]
++---
++
++```go-html-template
++{{ hugo.Version }} → 0.120.3
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ac3835ea8adea54811e55d0d80242639fa4eea87
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++---
++title: hugo.WorkingDir
++description: Returns the project working directory.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: string
++  signatures: [hugo.WorkingDir]
++---
++
++```go-html-template
++{{ hugo.WorkingDir }} → /home/user/projects/my-hugo-site
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c3ad686dac0cc3e62ced8837a064e1a820c5910a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Hugo functions
++linkTitle: hugo
++description: Template functions to access information about the Hugo application and the current environment. 
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to access information about the Hugo application and the current environment.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0001bcba8b009a1e561c836671972b687629efaa
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: images.Brightness
++description: Returns an image filter that changes the brightness of an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Brightness PERCENTAGE]
++toc: true
++---
++
++The percentage must be in the range [-100, 100] where 0 has no effect. A value of `-100` produces a solid black image, and a value of `100` produces a solid white image.
++
++## Usage
++
++Create the image filter:
++
++```go-html-template
++{{ $filter := images.Brightness 12 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Brightness"
++  filterArgs="12"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..29829f9e65365236075b5c45080654577e6377fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: images.ColorBalance
++description: Returns an image filter that changes the color balance of an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.ColorBalance PCTRED PCTGREEN PCTBLUE]
++toc: true
++---
++
++The percentage for each channel (red, green, blue) must be in the range [-100, 500].
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.ColorBalance -10 10 50 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="ColorBalance"
++  filterArgs="-10,10,50"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c974103b9fcc52298cf091ee55f715bafe8f0bd9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,40 @@@
++---
++title: images.Colorize
++description: Returns an image filter that produces a colorized version of an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Colorize HUE SATURATION PERCENTAGE]
++toc: true
++---
++
++The hue is the angle on the color wheel, typically in the range [0, 360].
++
++The saturation must be in the range [0, 100].
++
++The percentage specifies the strength of the effect, and must be in the range [0, 100].
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Colorize 180 50 20 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Colorize"
++  filterArgs="180,50,20"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0a4d225bced032e801278d440d35c54007a7ad7c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: images.Config
++description: Returns an image.Config structure from the image at the specified path, relative to the working directory.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: image.Config
++  signatures: [images.Config PATH]
++aliases: [/functions/imageconfig]
++---
++
++See [image processing] for an overview of Hugo's image pipeline.
++
++[image processing]: /content-management/image-processing/
++
++```go-html-template
++{{ $ic := images.Config "/static/images/a.jpg" }}
++
++{{ $ic.Width }} → 600 (int)
++{{ $ic.Height }} → 400 (int)
++```
++
++Supported image formats include GIF, JPEG, PNG, TIFF, and WebP.
++
++{{% note %}}
++This is a legacy function, superseded by the [`Width`] and [`Height`] methods for [global], [page], and [remote] resources. See the [image processing] section for details.
++
++[`Width`]: /methods/resource/width
++[`Height`]: /methods/resource/height
++[global]: /getting-started/glossary/#global-resource
++[image processing]: /content-management/image-processing
++[page]: /getting-started/glossary/#page-resource
++[remote]: /getting-started/glossary/#remote-resource
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..532ae8c9cbbece3140cca6690f679ce391dd8aa4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: images.Contrast
++description: Returns an image filter that changes the contrast of an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Contrast PERCENTAGE]
++toc: true
++---
++
++The percentage must be in the range [-100, 100] where 0 has no effect. A value of `-100` produces a solid grey image, and a value of `100` produces an over-contrasted image.
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Contrast -20 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Contrast"
++  filterArgs="-20"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..450a6481421d96b3508339f8da2b513f7b54f2c5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,67 @@@
++---
++title: images.Filter
++description: Applies one or more image filters to the given image resource.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - methods/resource/Filter
++  returnType: images.ImageResource
++  signatures: [images.Filter FILTERS... IMAGE]
++toc: true
++---
++
++Apply one or more [image filters](#image-filters) to the given image.
++
++To apply a single filter:
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with images.Filter images.Grayscale . }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++To apply two or more filters, executing from left to right:
++
++```go-html-template
++{{ $filters := slice
++  images.Grayscale
++  (images.GaussianBlur 8)
++}}
++{{ with resources.Get "images/original.jpg" }}
++  {{ with images.Filter $filters . }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++You can also apply image filters using the [`Filter`] method on a `Resource` object.
++
++[`Filter`]: /methods/resource/filter
++
++## Example
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with images.Filter images.Grayscale . }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Grayscale"
++  filterArgs=""
++  example=true
++>}}
++
++## Image filters
++
++Use any of these filters with the `images.Filter` function, or with the `Filter` method on a `Resource` object.
++
++{{< list-pages-in-section path=/functions/images filter=functions_images_no_filters filterType=exclude >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..affbdcfa8fa31598851b870a4affc1ea764b2209
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: images.Gamma
++description: Returns an image filter that performs gamma correction on an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Gamma GAMMA]
++toc: true
++---
++
++The gamma value must be positive. A value greater than 1 lightens the image, while a value less than 1 darkens the image. The filter has no effect when the gamma value is&nbsp;1.
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Gamma 1.667 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Gamma"
++  filterArgs="1.667"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e2f49a847a1e27a30f239f378eb28ce21ccda27c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: images.GaussianBlur
++description: Returns an image filter that applies a gaussian blur to an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.GaussianBlur SIGMA]
++toc: true
++---
++
++The sigma value must be positive, and indicates how much the image will be blurred. The blur-affected radius is approximately 3 times the sigma value.
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.GaussianBlur 5 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="GaussianBlur"
++  filterArgs="5"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d8a89b7f2655269a628416cc4fd1519c8290ca5a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,34 @@@
++---
++title: images.Grayscale
++description: Returns an image filter that produces a grayscale version of an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Grayscale]
++toc: true
++---
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Grayscale }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Grayscale"
++  filterArgs=""
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6eafac43788ab302f3630c76f735fe04a98590ce
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: images.Hue
++description: Returns an image filter that rotates the hue of an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Hue SHIFT]
++toc: true
++---
++
++The hue angle shift is typically in the range [-180, 180] where 0 has no effect.
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Hue -15 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Hue"
++  filterArgs="-15"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1ee85e5145cd73848c6110da801bbeaa4b0d0aa0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,34 @@@
++---
++title: images.Invert
++description: Returns an image filter that negates the colors of an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Invert]
++toc: true
++---
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Invert }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Invert"
++  filterArgs=""
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6a74fd0818f530f84d8ad08e293a57263ebbaf49
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,52 @@@
++---
++title: images.Opacity
++description: Returns an image filter that changes the opacity of an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Opacity OPACITY]
++toc: true
++---
++
++{{< new-in 0.119.0 >}}
++
++The opacity value must be in the range [0, 1]. A value of `0` produces a transparent image, and a value of `1` produces an opaque image (no transparency).
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Opacity 0.65 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++The `images.Opacity` filter is most useful for target formats such as PNG and WebP that support transparency. If the source image does not support transparency, combine this filter with the `images.Process` filter:
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ $filters := slice
++    (images.Opacity 0.65)
++    (images.Process "png")
++  }}
++  {{ with . | images.Filter $filters }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Opacity"
++  filterArgs="0.65"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39e62b121605d954e8fdd259a6a44c0e7d8dde9f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,52 @@@
++---
++title: images.Overlay
++description: Returns an image filter that overlays the source image at the given coordinates, relative to the upper left corner.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Overlay RESOURCE X Y]
++toc: true
++---
++
++## Usage
++
++Capture the overlay image as a resource:
++
++```go-html-template
++{{ $overlay := "" }}
++{{ $path := "images/logo.png" }}
++{{ with resources.Get $path }}
++  {{ $overlay = . }}
++{{ else }}
++  {{ errorf "Unable to get resource %q" $path }}
++{{ end }}
++```
++
++The overlay image can be a [global resource], a [page resource], or a [remote resource].
++
++[global resource]: /getting-started/glossary/#global-resource
++[page resource]: /getting-started/glossary/#page-resource
++[remote resource]: /getting-started/glossary/#remote-resource
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Overlay $overlay 20 20 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Overlay"
++  filterArgs="images/logos/logo-64x64.png,20,20"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..139626596216f061d024ece5f9fc7ac375db7959
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,75 @@@
++---
++title: images.Padding
++description: Returns an image filter that resizes the image canvas without resizing the image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: ['images.Padding V1 [V2] [V3] [V4] [COLOR]']
++toc: true
++---
++
++{{< new-in 0.120.0 >}}
++
++The last argument is the canvas color, expressed as an RGB or RGBA [hexadecimal color]. The default value is `ffffffff` (opaque white). The preceding arguments are the padding values, in pixels, using the CSS [shorthand property] syntax. Negative padding values will crop the image.
++
++[hexadecimal color]: https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color
++[shorthand property]: https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#edges_of_a_box
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Padding 20 40 "#976941" }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++Combine with the [`Colors`] method to create a border with one of the image's most dominant colors:
++
++[`Colors`]: /methods/resource/colors
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ $filter := images.Padding 20 40 (index .Colors 2) }}
++  {{ with . | images.Filter $filter }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Padding"
++  filterArgs="20,40,20,40,#976941"
++  example=true
++>}}
++
++## Other recipes
++
++This example resizes an image to 300px wide, converts it to the WebP format, adds 20px vertical padding and 50px horizontal padding, then sets the canvas color to dark green with 33% opacity.
++
++Conversion to WebP is required to support transparency. PNG and WebP images have an alpha channel; JPEG and GIF do not.
++
++```go-html-template
++{{ $img := resources.Get "images/a.jpg" }}
++{{ $filters := slice
++  (images.Process "resize 300x webp")
++  (images.Padding 20 50 "#0705")
++}}
++{{ $img = $img.Filter $filters }}
++```
++
++To add a 2px gray border to an image:
++
++```go-html-template
++{{ $img = $img.Filter (images.Padding 2 "#777") }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2016877ed85cd2170cce2571e6f7c08436d00af3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,34 @@@
++---
++title: images.Pixelate
++description: Returns an image filter that applies a pixelation effect to an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Pixelate SIZE]
++toc: true
++---
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Pixelate 4 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Pixelate"
++  filterArgs="4"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a5e4d88dd233a8f5844976f99e21d2b1c048175a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,115 @@@
++---
++title: images.Process
++description: Returns an image filter that processes the given image using the given specification.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++    - methods/resource/Process
++  returnType: images.filter
++  signatures: [images.Process SPEC]
++toc: true
++---
++
++{{< new-in 0.119.0 >}}
++
++This filter has the same options as the [`Process`] method on a `Resource` object, but using it as a filter may be more effective if you need to apply multiple filters to an image.
++
++[`Process`]: /methods/resource/process
++
++The process specification is a space-delimited, case-insensitive list of one or more of the following in any sequence:
++
++action
++: Specify zero or one of `crop`, `fill`, `fit`, or `resize`. If you specify an action you must also provide dimensions. See&nbsp;[details](content-management/image-processing/#image-processing-methods).
++
++```go-html-template
++{{ $filter := images.Process "resize 300x" }}
++```
++
++dimensions
++: Required if you specify an action. Provide width _or_ height when using `resize`, else provide both width _and_ height. See&nbsp;[details](/content-management/image-processing/#dimensions).
++
++```go-html-template
++{{ $filter := images.Process "crop 200x200" }}
++```
++
++anchor
++: Use with the `crop` or `fill` action. Specify zero or one of `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. Default is `Smart`. See&nbsp;[details](/content-management/image-processing/#anchor).
++
++```go-html-template
++{{ $filter := images.Process "crop 200x200 center" }}
++```
++
++rotation
++: Typically specify zero or one of `r90`, `r180`, or `r270`. Also supports arbitrary rotation angles. See&nbsp;[details](/content-management/image-processing/#rotation).
++
++```go-html-template
++{{ $filter := images.Process "r90" }}
++{{ $filter := images.Process "crop 200x200 center r90" }}
++```
++
++target format
++: Specify zero or one of `gif`, `jpeg`, `png`, `tiff`, or `webp`. See&nbsp;[details](/content-management/image-processing/#target-format).
++
++```go-html-template
++{{ $filter := images.Process "webp" }}
++{{ $filter := images.Process "crop 200x200 center r90 webp" }}
++```
++
++quality
++: Applicable to JPEG and WebP images. Optionally specify `qN` where `N` is an integer in the range [0, 100]. Default is `75`. See&nbsp;[details](/content-management/image-processing/#quality).
++
++```go-html-template
++{{ $filter := images.Process "q50" }}
++{{ $filter := images.Process "crop 200x200 center r90 webp q50" }}
++```
++
++hint
++: Applicable to WebP images and equivalent to the `-preset` flag for the [`cwebp`] encoder. Specify zero or one of `drawing`, `icon`, `photo`, `picture`, or `text`. Default is `photo`. See&nbsp;[details](/content-management/image-processing/#hint).
++
++[`cwebp`]: https://developers.google.com/speed/webp/docs/cwebp
++
++
++```go-html-template
++{{ $filter := images.Process "webp" "icon" }}
++{{ $filter := images.Process "crop 200x200 center r90 webp q50 icon" }}
++```
++
++background color
++: When converting a PNG or WebP with transparency to a format that does not support transparency, optionally specify a background color using a 3-digit or a 6-digit hexadecimal color code. Default is `#ffffff` (white). See&nbsp;[details](/content-management/image-processing/#background-color).
++
++```go-html-template
++{{ $filter := images.Process "jpeg #000" }}
++{{ $filter := images.Process "crop 200x200 center r90 q50 jpeg #000" }}
++```
++
++resampling filter
++: Typically specify zero or one of `Box`, `Lanczos`, `CatmullRom`, `MitchellNetravali`, `Linear`, or `NearestNeighbor`. Other resampling filters are available. See&nbsp;[details](/content-management/image-processing/#resampling-filter).
++
++```go-html-template
++{{ $filter := images.Process "resize 300x lanczos" }}
++{{ $filter := images.Process "resize 300x r90 q50 jpeg #000 lanczos" }}
++```
++
++## Usage
++
++Create a filter:
++
++```go-html-template
++{{ $filter := images.Process "resize 256x q40 webp" }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Process"
++  filterArgs="resize 256x q40 webp"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..118bd02130309917c85b877eb4811f90ce0dc7d1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: images.Saturation
++description: Returns an image filter that changes the saturation of an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Saturation PERCENTAGE]
++toc: true
++---
++
++The percentage must be in the range [-100, 500] where 0 has no effect.
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Saturation 65 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Saturation"
++  filterArgs="65"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9f0b7adfb94304906d217ac421d12da094a5d037
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: images.Sepia
++description: Returns an image filter that produces a sepia-toned version of an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Sepia PERCENTAGE]
++toc: true
++---
++
++The percentage must be in the range [0, 100] where 0 has no effect.
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Sepia 75 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Sepia"
++  filterArgs="75"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..32765f9238c61efa70b7bdf01ebc3ec81eced227
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,40 @@@
++---
++title: images.Sigmoid
++description: Returns an image filter that changes the contrast of an image using a sigmoidal function.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.Sigmoid MIDPOINT FACTOR]
++toc: true
++---
++
++This is a non-linear contrast change useful for photo adjustments; it preserves highlight and shadow detail.
++
++The midpoint is the midpoint of contrast. It must be in the range [0, 1], typically 0.5.
++
++The factor indicates how much to increase or decrease the contrast, typically in the range [-10, 10] where 0 has no effect. A positive value increases contrast, while a negative value decrease contrast.
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Sigmoid 0.6 -4 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Sigmoid"
++  filterArgs="0.6,-4"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0c1e74bce5eab66d9b1eba8f4b340f1e54321004
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,95 @@@
++---
++title: images.Text
++description: Returns an image filter that adds text to an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: ['images.Text TEXT [OPTIONS]']
++toc: true
++---
++
++## Options
++
++Although none of the options are required, at a minimum you will want to set the `size` to be some reasonable percentage of the image height.
++
++color
++: (`string`) The font color, either a 3-digit or 6-digit hexadecimal color code. Default is `#ffffff` (white).
++
++font
++: (`resource.Resource`) The font can be a [global resource], a [page resource], or a [remote resource]. Default is the "Go Regular" TrueType font.
++
++linespacing
++: (`int`) The number of pixels between each line. For a line height of 1.4, set the `linespacing` to 0.4 multiplied by the `size`. Default is `2`.
++
++size
++: (`int`) The font size in pixels. Default is `20`.
++
++x
++: (`int`) The horizontal offset, in pixels, relative to the left of the image. Default is `10`.
++
++y
++: (`int`) The vertical offset, in pixels, relative to the top of the image. Default is `10`.
++
++[global resource]: /getting-started/glossary/#global-resource
++[page resource]: /getting-started/glossary/#page-resource
++[remote resource]: /getting-started/glossary/#remote-resource
++
++## Usage
++
++Capture the font as a resource:
++
++```go-html-template
++{{ $font := "" }}
++{{ $path := "https://github.com/google/fonts/raw/main/apache/roboto/static/Roboto-Regular.ttf" }}
++{{ with resources.GetRemote $path }}
++  {{ with .Err }}
++    {{ errorf "%s" . }}
++  {{ else }}
++    {{ $font = . }}
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get resource %q" $path }}
++{{ end }}
++```
++
++Create the options map:
++
++```go-html-template
++{{ $opts := dict
++  "color" "#fbfaf5"
++  "font" $font
++  "linespacing" 8
++  "size" 40
++  "x" 25
++  "y" 190
++}}
++```
++
++Set the text:
++
++```go-html-template
++{{ $text := "Zion National Park" }}
++```
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.Text $text $opts }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Text"
++  filterArgs="Zion National Park,25,190,40,1.2,#fbfaf5"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..57a74a54a6a0ead99961e01a67ac3e54d525f011
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,40 @@@
++---
++title: images.UnsharpMask
++description: Returns an image filter that sharpens an image.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/images/Filter
++    - methods/resource/Filter
++  returnType: images.filter
++  signatures: [images.UnsharpMask SIGMA AMOUNT THRESHOLD]
++toc: true
++---
++
++The sigma parameter is used in a gaussian function and affects the radius of effect. Sigma must be positive. The sharpen radius is approximately 3 times the sigma value.
++
++The amount parameter controls how much darker and how much lighter the edge borders become. Typically between 0.5 and 1.5.
++
++The threshold parameter controls the minimum brightness change that will be sharpened. Typically between 0 and 0.05.
++
++## Usage
++
++Create the filter:
++
++```go-html-template
++{{ $filter := images.UnsharpMask 10 0.4 0.03 }}
++```
++
++{{% include "functions/images/_common/apply-image-filter.md" %}}
++
++## Example
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="UnsharpMask"
++  filterArgs="10,0.4,0.03"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..acd3a733dcb726400e6650768fd351554c4f6d3d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,27 @@@
++---
++# Do not remove front matter.
++---
++
++Apply the filter using the [`images.Filter`] function:
++
++[`images.Filter`]: /functions/images/filter
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with . | images.Filter $filter }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++You can also apply the filter using the [`Filter`] method on a `Resource` object:
++
++[`Filter`]: methods/resource/filter
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Filter $filter }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..13542ea730656ee1273432c7b89c48043ce98bef
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Image functions
++linkTitle: images
++description: Use these functions to create an image filter, apply an image filter to an image, and to retrieve image information.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to create an image filter, apply an image filter to an image, and to retrieve image information.
index 74d24f310e228b618c73a278419210e21e9c9445,0000000000000000000000000000000000000000..41d61a4e512e3b92af479fd6a08db1295ab6509b
mode 100644,000000..100644
--- /dev/null
@@@ -1,29 -1,0 +1,26 @@@
- linkTitle: humanize
- description: Returns the humanized version of an argument with the first letter capitalized.
- categories: [functions]
 +---
 +title: inflect.Humanize
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the humanized version of the input with the first letter capitalized.
++categories: []
 +keywords: []
- relatedFunctions:
-   - inflect.Humanize
-   - inflect.Pluralize
-   - inflect.Singularize
++action:
 +  aliases: [humanize]
++  related:
++    - functions/inflect/Pluralize
++    - functions/inflect/Singularize
 +  returnType: string
 +  signatures: [inflect.Humanize INPUT]
- If the input is either an int64 value or the string representation of an integer, humanize returns the number with the proper ordinal appended.
 +aliases: [/functions/humanize]
 +---
 +
- {{ humanize "my-first-post" }} → "My first post"
- {{ humanize "myCamelPost" }} → "My camel post"
- {{ humanize "52" }} → "52nd"
- {{ humanize 103 }} → "103rd"
++```go-html-template
++{{ humanize "my-first-post" }} → My first post
++{{ humanize "myCamelPost" }} → My camel post
++```
 +
++If the input is either an int64 value or the string representation of an integer, humanize returns the number with the proper ordinal appended.
 +
 +```go-html-template
++{{ humanize "52" }} → 52nd
++{{ humanize 103 }} → 103rd
 +```
index 5bb444114a6a32c4c42fd40515697f1d273ef5f5,0000000000000000000000000000000000000000..c25f896170125c21faa6249b1b540213f1ccd9df
mode 100644,000000..100644
--- /dev/null
@@@ -1,23 -1,0 +1,18 @@@
- linkTitle: pluralize
- description: Pluralizes the given word according to a set of common English pluralization rules
- categories: [functions]
 +---
 +title: inflect.Pluralize
- menu:
-   docs:
-     parent: functions
- function:
++description: Pluralizes the given word according to a set of common English pluralization rules.
++categories: []
 +keywords: []
- relatedFunctions:
-   - inflect.Humanize
-   - inflect.Pluralize
-   - inflect.Singularize
++action:
 +  aliases: [pluralize]
++  related:
++    - functions/inflect/Humanize
++    - functions/inflect/Singularize
 +  returnType: string
 +  signatures: [inflect.Pluralize INPUT]
- {{ "cat" | pluralize }} → "cats"
 +aliases: [/functions/pluralize]
 +---
 +
 +```go-html-template
++{{ "cat" | pluralize }} → cats
 +```
index 5aba4e4ee6811076cd9968f1c67f11531e71e3db,0000000000000000000000000000000000000000..29b54325779249ff0abf583af26c75db16c003c4
mode 100644,000000..100644
--- /dev/null
@@@ -1,25 -1,0 +1,20 @@@
- linkTitle: singularize
- description: Converts a word according to a set of common English singularization rules.
- categories: [functions]
 +---
 +title: inflect.Singularize
- menu:
-   docs:
-     parent: functions
- function:
++description: Singularizes the given word according to a set of common English singularization rules.
++categories: []
 +keywords: []
- relatedFunctions:
-   - inflect.Humanize
-   - inflect.Pluralize
-   - inflect.Singularize
++action:
 +  aliases: [singularize]
++  related:
++    - functions/inflect/Humanize
++    - functions/inflect/Pluralize
 +  returnType: string
 +  signatures: [inflect.Singularize INPUT]
- {{ "cats" | singularize }} → "cat"
 +aliases: [/functions/singularize]
 +---
 +
 +```go-html-template
++{{ "cats" | singularize }} → cat
 +```
 +
 +See also the `.Data.Singular` [taxonomy variable](/variables/taxonomy/) for singularizing taxonomy names.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..601b409e6a02a0024b4b8fd78615db9210ba6747
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Inflect functions
++linkTitle: inflect
++description: Template functions to inflect English nouns.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++These functions provide word inflection features such as singularization and pluralization of English nouns.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..835785486147a88c3f1fc355a090489d9e161d7d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,184 @@@
++---
++title: js.Build
++description: Bundles, transpiles, tree shakes, and minifies JavaScript resources.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/resources/Babel
++    - functions/resources/Fingerprint
++    - functions/resources/Minify
++  returnType: resource.Resource
++  signatures: ['js.Build [OPTIONS] RESOURCE']
++toc: true
++---
++
++The `js.Build` function uses the [evanw/esbuild] package to:
++
++- Bundle
++- Transpile (TypeScript and JSX)
++- Tree shake
++- Minify
++- Create source maps
++
++[evanw/esbuild]: https://github.com/evanw/esbuild
++
++```go-html-template
++{{ with resources.Get "js/main.js" }}
++  {{ if hugo.IsDevelopment }}
++    {{ with . | js.Build }}
++      <script src="{{ .RelPermalink }}"></script>
++    {{ end }}
++  {{ else }}
++    {{ $opts := dict "minify" true }}
++    {{ with . | js.Build $opts | fingerprint }}
++      <script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
++    {{ end }}
++  {{ end }}
++{{ end }}
++```
++
++## Options
++
++targetPath
++: (`string`) If not set, the source path will be used as the base target path.
++Note that the target path's extension may change if the target MIME type is different, e.g. when the source is TypeScript.
++
++params
++: (`map` or `slice`) Params that can be imported as JSON in your JS files, e.g.
++
++```go-html-template
++{{ $js := resources.Get "js/main.js" | js.Build (dict "params" (dict "api" "https://example.org/api")) }}
++```
++And then in your JS file:
++
++```js
++import * as params from '@params';
++```
++
++Note that this is meant for small data sets, e.g. configuration settings. For larger data, please put/mount the files into `/assets` and import them directly.
++
++minify
++: (`bool`)Let `js.Build` handle the minification.
++
++inject
++: (`slice`) This option allows you to automatically replace a global variable with an import from another file. The path names must be relative to `assets`. See https://esbuild.github.io/api/#inject
++
++shims
++: (`map`) This option allows swapping out a component with another. A common use case is to load dependencies like React from a CDN  (with _shims_) when in production, but running with the full bundled `node_modules` dependency during development:
++
++```go-html-template
++{{ $shims := dict "react" "js/shims/react.js"  "react-dom" "js/shims/react-dom.js" }}
++{{ $js = $js | js.Build dict "shims" $shims }}
++```
++
++The _shim_ files may look like these:
++
++```js
++// js/shims/react.js
++module.exports = window.React;
++```
++
++```js
++// js/shims/react-dom.js
++module.exports = window.ReactDOM;
++```
++
++With the above, these imports should work in both scenarios:
++
++```js
++import * as React from 'react'
++import * as ReactDOM from 'react-dom';
++```
++
++target
++: (`string`) The language target. One of: `es5`, `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020` or `esnext`. Default is `esnext`.
++
++externals
++: (`slice`) External dependencies. Use this to trim dependencies you know will never be executed. See https://esbuild.github.io/api/#external
++
++defines
++: (`map`) Allow to define a set of string replacement to be performed when building. Should be a map where each key is to be replaced by its value.
++
++```go-html-template
++{{ $defines := dict "process.env.NODE_ENV" `"development"` }}
++```
++
++format
++: (`string`) The output format. One of: `iife`, `cjs`, `esm`. Default is `iife`, a self-executing function, suitable for inclusion as a `<script>` tag.
++
++sourceMap
++: (`string`) Whether to generate `inline` or `external` source maps from esbuild. External source maps will be written to the target with the output file name + ".map". Input source maps can be read from js.Build and node modules and combined into the output source maps. By default, source maps are not created.
++
++### Import JS code from /assets
++
++`js.Build` has full support for the virtual union file system in [Hugo Modules](/hugo-modules/). You can see some simple examples in this [test project](https://github.com/gohugoio/hugoTestProjectJSModImports), but in short this means that you can do this:
++
++```js
++import { hello } from 'my/module';
++```
++
++And it will resolve to the top-most `index.{js,ts,tsx,jsx}` inside `assets/my/module` in the layered file system.
++
++```js
++import { hello3 } from 'my/module/hello3';
++```
++
++Will resolve to `hello3.{js,ts,tsx,jsx}` inside `assets/my/module`.
++
++Any imports starting with `.` is resolved relative to the current file:
++
++```js
++import { hello4 } from './lib';
++```
++
++For other files (e.g. `JSON`, `CSS`) you need to use the relative path including any extension, e.g:
++
++```js
++import * as data from 'my/module/data.json';
++```
++
++Any imports in a file outside `/assets` or that does not resolve to a component inside `/assets` will be resolved by [ESBuild](https://esbuild.github.io/) with the **project directory** as the resolve directory (used as the starting point when looking for `node_modules` etc.). Also see [hugo mod npm pack](/commands/hugo_mod_npm_pack/). If you have any imported npm dependencies in your project, you need to make sure to run `npm install` before you run `hugo`.
++
++Also note the new `params` option that can be passed from template to your JS files, e.g.:
++
++```go-html-template
++{{ $js := resources.Get "js/main.js" | js.Build (dict "params" (dict "api" "https://example.org/api")) }}
++```
++And then in your JS file:
++
++```js
++import * as params from '@params';
++```
++
++Hugo will, by default, generate a `assets/jsconfig.json` file that maps the imports. This is useful for navigation/intellisense help inside code editors, but if you don't need/want it, you can [turn it off](/getting-started/configuration/#configure-build).
++
++## Node.js dependencies
++
++Use the `js.Build` function to include Node.js dependencies.
++
++Any imports in a file outside `/assets` or that does not resolve to a component inside `/assets` will be resolved by [esbuild](https://esbuild.github.io/) with the **project directory** as the resolve directory (used as the starting point when looking for `node_modules` etc.). Also see [hugo mod npm pack](/commands/hugo_mod_npm_pack/). If you have any imported npm dependencies in your project, you need to make sure to run `npm install` before you run `hugo`.
++
++The start directory for resolving npm packages (aka. packages that live inside a `node_modules` folder) is always the main project folder.
++
++{{% note %}}
++If you're developing a theme/component that is supposed to be imported and depends on dependencies inside `package.json`, we recommend reading about [hugo mod npm pack](/commands/hugo_mod_npm_pack/), a tool to consolidate all the npm dependencies in a project.
++{{% /note %}}
++
++## Examples
++
++```go-html-template
++{{ $built := resources.Get "js/index.js" | js.Build "main.js" }}
++```
++
++Or with options:
++
++```go-html-template
++{{ $externals := slice "react" "react-dom" }}
++{{ $defines := dict "process.env.NODE_ENV" `"development"` }}
++
++{{ $opts := dict "targetPath" "main.js" "externals" $externals "defines" $defines }}
++{{ $built := resources.Get "scripts/main.js" | js.Build $opts }}
++<script src="{{ $built.RelPermalink }}" defer></script>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3356e7c7be645d1f282bf2565e8b05eefd9de3f8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: JavaScript functions
++linkTitle: js
++description: Template functions to work with JavaScript and TypeScript files.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to work with JavaScript and TypeScript files.
index 974dc4a1a7852444622c037c846e7f6fc6381fda,0000000000000000000000000000000000000000..70365c21626419c5f63fbf427afcb0eb0f0b6e4f
mode 100644,000000..100644
--- /dev/null
@@@ -1,27 -1,0 +1,21 @@@
- description: Returns a currency representation of a number for the given currency and precision for the current language in accounting notation.
- categories: [functions]
 +---
 +title: lang.FormatAccounting
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns a currency representation of a number for the given currency and precision for the current language and region in accounting notation.
++categories: []
 +keywords: []
- relatedFunctions:
-   - lang.FormatAccounting
-   - lang.FormatCurrency
-   - lang.FormatNumber
-   - lang.FormatNumberCustom
-   - lang.FormatPercent
++action:
 +  aliases: []
++  related:
++    - functions/lang/FormatCurrency
++    - functions/lang/FormatNumber
++    - functions/lang/FormatNumberCustom
++    - functions/lang/FormatPercent
 +  returnType: string
 +  signatures: [lang.FormatAccounting PRECISION CURRENCY NUMBER]
- {{% note %}}
- {{% readfile file="/functions/_common/locales.md" %}}
- {{% /note %}}
 +---
 +
 +```go-html-template
 +{{ 512.5032 | lang.FormatAccounting 2 "NOK" }} → NOK512.50
 +```
 +
++{{% include "functions/_common/locales.md" %}}
index b29a807fee32678058104ff3f6806b1372f065fb,0000000000000000000000000000000000000000..bd83c2ec5bf98c4492087f8024865804fc6035d3
mode 100644,000000..100644
--- /dev/null
@@@ -1,27 -1,0 +1,21 @@@
- description: Returns a currency representation of a number for the given currency and precision for the current language.
- categories: [functions]
 +---
 +title: lang.FormatCurrency
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns a currency representation of a number for the given currency and precision for the current language and region.
++categories: []
 +keywords: []
-   signatures: [lang.FormatAccounting PRECISION CURRENCY NUMBER]
- relatedFunctions:
-   - lang.FormatAccounting
-   - lang.FormatCurrency
-   - lang.FormatNumber
-   - lang.FormatNumberCustom
-   - lang.FormatPercent
++action:
 +  aliases: []
++  related:
++    - functions/lang/FormatAccounting
++    - functions/lang/FormatNumber
++    - functions/lang/FormatNumberCustom
++    - functions/lang/FormatPercent
 +  returnType: string
- {{% note %}}
- {{% readfile file="/functions/_common/locales.md" %}}
- {{% /note %}}
++  signatures: [lang.FormatCurrency PRECISION CURRENCY NUMBER]
 +---
 +
 +```go-html-template
 +{{ 512.5032 | lang.FormatCurrency 2 "USD" }} → $512.50
 +```
 +
++{{% include "functions/_common/locales.md" %}}
index dd878fdefebdee7099ca62e2011f57aeee0f0baa,0000000000000000000000000000000000000000..597df742a3182b917f2cb1dfbbb08469b1e5bea4
mode 100644,000000..100644
--- /dev/null
@@@ -1,27 -1,0 +1,21 @@@
- description: Returns a numeric representation of a number with the given precision for the current language.
- categories: [functions]
 +---
 +title: lang.FormatNumber
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns a numeric representation of a number with the given precision for the current language and region.
++categories: []
 +keywords: []
- relatedFunctions:
-   - lang.FormatAccounting
-   - lang.FormatCurrency
-   - lang.FormatNumber
-   - lang.FormatNumberCustom
-   - lang.FormatPercent
++action:
 +  aliases: []
++  related:
++    - functions/lang/FormatAccounting
++    - functions/lang/FormatCurrency
++    - functions/lang/FormatNumberCustom
++    - functions/lang/FormatPercent
 +  returnType: string
 +  signatures: [lang.FormatNumber PRECISION NUMBER]
- {{% note %}}
- {{% readfile file="/functions/_common/locales.md" %}}
- {{% /note %}}
 +---
 +
 +```go-html-template
 +{{ 512.5032 | lang.FormatNumber 2 }} → 512.50
 +```
 +
++{{% include "functions/_common/locales.md" %}}
index 97b0225670660ba7ea4d1a907ad7542740979a53,0000000000000000000000000000000000000000..0b72f49833c3a56b5e8bdb19dd1e42abf2e20ff9
mode 100644,000000..100644
--- /dev/null
@@@ -1,41 -1,0 +1,34 @@@
- categories: [functions]
 +---
 +title: lang.FormatNumberCustom
 +description: Returns a numeric representation of a number with the given precision using negative, decimal, and grouping options.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - lang.FormatAccounting
-   - lang.FormatCurrency
-   - lang.FormatNumber
-   - lang.FormatNumberCustom
-   - lang.FormatPercent
++action:
 +  aliases: []
++  related:
++    - functions/lang/FormatAccounting
++    - functions/lang/FormatCurrency
++    - functions/lang/FormatNumber
++    - functions/lang/FormatPercent
 +  returnType: string
 +  signatures: ['lang.FormatNumberCustom PRECISION NUMBER [OPTIONS...]']
- Note that numbers are rounded up at 5 or greater. So, with precision set to 0, 1.5 becomes 2, and 1.4 becomes 1.
 +aliases: ['/functions/numfmt/']
 +---
 +
 +This function formats a number with the given precision. The first options parameter is a space-delimited string of characters to represent negativity, the decimal point, and grouping. The default value is `- . ,`. The second options parameter defines an alternate delimiting character.
 +
++Note that numbers are rounded up at 5 or greater. So, with precision set to 0, 1.5 becomes 2, and 1.4 becomes&nbsp;1.
 +
 +For a simpler function that adapts to the current language, see [`lang.FormatNumber`].
 +
- {{% note %}}
- {{% readfile file="/functions/_common/locales.md" %}}
- {{% /note %}}
 +```go-html-template
 +{{ lang.FormatNumberCustom 2 12345.6789 }} → 12,345.68
 +{{ lang.FormatNumberCustom 2 12345.6789 "- , ." }} → 12.345,68
 +{{ lang.FormatNumberCustom 6 -12345.6789 "- ." }} → -12345.678900
 +{{ lang.FormatNumberCustom 0 -12345.6789 "- . ," }} → -12,346
 +{{ lang.FormatNumberCustom 0 -12345.6789 "-|.| " "|" }} → -12 346
 +```
 +
++{{% include "functions/_common/locales.md" %}}
 +
 +[`lang.FormatNumber`]: /functions/lang/formatnumber
index dd20424900516450078de6d078f1ae6e618d0754,0000000000000000000000000000000000000000..529ada67bf7a9e01796c09f01f552174a9adb0ab
mode 100644,000000..100644
--- /dev/null
@@@ -1,27 -1,0 +1,21 @@@
- description: Returns a percentage representation of a number with the given precision for the current language.
- categories: [functions]
 +---
 +title: lang.FormatPercent
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns a percentage representation of a number with the given precision for the current language and region.
++categories: []
 +keywords: []
- relatedFunctions:
-   - lang.FormatAccounting
-   - lang.FormatCurrency
-   - lang.FormatNumber
-   - lang.FormatNumberCustom
-   - lang.FormatPercent
++action:
 +  aliases: []
++  related:
++    - functions/lang/FormatAccounting
++    - functions/lang/FormatCurrency
++    - functions/lang/FormatNumber
++    - functions/lang/FormatNumberCustom
 +  returnType: string
 +  signatures: [lang.FormatPercent PRECISION NUMBER]
- {{% note %}}
- {{% readfile file="/functions/_common/locales.md" %}}
- {{% /note %}}
 +---
 +
 +```go-html-template
 +{{ 512.5032 | lang.FormatPercent 2 }} → 512.50%
 +```
 +
++{{% include "functions/_common/locales.md" %}}
index b3d21cd7ab8874a58f940090e635f4004c4fd417,0000000000000000000000000000000000000000..75f5cdf01ee1bcb650c36414d6b31a94ebe5fb7d
mode 100644,000000..100644
--- /dev/null
@@@ -1,33 -1,0 +1,29 @@@
- categories: [functions]
 +---
 +title: lang.Merge
 +description: Merge missing translations from other languages.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions: []
++action:
 +  aliases: []
++  related: []
 +  returnType: any
 +  signatures: [lang.Merge FROM TO]
- ```bash
 +aliases: [/functions/lang.merge]
 +---
 +
 +As an example:
 +
++```sh
 +{{ $pages := .Site.RegularPages | lang.Merge $frSite.RegularPages | lang.Merge $enSite.RegularPages }}
 +```
 +
 +Will "fill in the gaps" in the current site with, from left to right, content from the French site, and lastly the English.
 +
- ```bash
 +A more practical example is to fill in the missing translations from the other languages:
 +
++```sh
 +{{ $pages := .Site.RegularPages }}
 +{{ range .Site.Home.Translations }}
 +{{ $pages = $pages | lang.Merge .Site.RegularPages }}
 +{{ end }}
 + ```
index 718d8cfb2ca8f8931819b7523f1833cf5046dc4e,0000000000000000000000000000000000000000..630098a9696d2488aa3f02e4f1704ddecaf302c5
mode 100644,000000..100644
--- /dev/null
@@@ -1,126 -1,0 +1,118 @@@
- linkTitle: i18n
 +---
 +title: lang.Translate
- categories: [functions]
 +description: Translates a string using the translation tables in the i18n directory.
- menu:
-   docs:
-     parent: functions
- function:
-   aliases: [i18n,T]
++categories: []
 +keywords: []
- relatedFunctions: []
++action:
++  aliases: [T, i18n]
++  related: []
 +  returnType: string
 +  signatures: ['lang.Translate KEY [CONTEXT]']
- ```
 +aliases: [/functions/i18n]
 +---
 +
 +Let's say your multilingual site supports two languages, English and Polish. Create a translation table for each language in the `i18n` directory.
 +
- {{< code-toggle file=i18n/en copy=false >}}
- # simple translations
++```text
 +i18n/
 +├── en.toml
 +└── pl.toml
 +```
 +
 +The translation tables can contain both:
 +
 +- Simple translations
 +- Translations with pluralization
 +
 +The Unicode [CLDR Plural Rules chart] describes the pluralization categories for each language.
 +
 +[CLDR Plural Rules chart]: https://www.unicode.org/cldr/charts/43/supplemental/language_plural_rules.html
 +
 +The English translation table:
 +
- # translations with pluralization
++{{< code-toggle file=i18n/en >}}
 +privacy = 'privacy'
 +security = 'security'
 +
- {{< code-toggle file=i18n/pl copy=false >}}
- # simple translations
 +[day]
 +one = 'day'
 +other = 'days'
 +
 +[day_with_count]
 +one = '{{ . }} day'
 +other = '{{ . }} days'
 +{{< /code-toggle >}}
 +
 +The Polish translation table:
 +
- # translations with pluralization
++{{< code-toggle file=i18n/pl >}}
 +privacy = 'prywatność'
 +security = 'bezpieczeństwo'
 +
- In the pluralization examples above, we passed an integer in context (the second argument). You can also pass a map in context, creating a `count` key to control pluralization.
 +[day]
 +one = 'miesiąc'
 +few = 'miesiące'
 +many = 'miesięcy'
 +other = 'miesiąca'
 +
 +[day_with_count]
 +one = '{{ . }} miesiąc'
 +few = '{{ . }} miesiące'
 +many = '{{ . }} miesięcy'
 +other = '{{ . }} miesiąca'
 +{{< /code-toggle >}}
 +
 +{{% note %}}
 +The examples below use the `T` alias for brevity.
 +{{% /note %}}
 +
 +When viewing the English language site:
 +
 +```go-html-template
 +{{ T "privacy" }} → privacy
 +{{ T "security" }} → security
 +
 +{{ T "day" 0 }} → days
 +{{ T "day" 1 }} → day
 +{{ T "day" 2 }} → days
 +{{ T "day" 5 }} → days
 +
 +{{ T "day_with_count" 0 }} → 0 days
 +{{ T "day_with_count" 1 }} → 1 day
 +{{ T "day_with_count" 2 }} → 2 days
 +{{ T "day_with_count" 5 }} → 5 days
 +````
 +
 +When viewing the Polish language site:
 +
 +```go-html-template
 +{{ T "privacy" }} → prywatność
 +{{ T "security" }} → bezpieczeństwo
 +
 +{{ T "day" 0 }} → miesięcy
 +{{ T "day" 1 }} → miesiąc
 +{{ T "day" 2 }} → miesiące
 +{{ T "day" 5 }} → miesięcy
 +
 +{{ T "day_with_count" 0 }} → 0 miesięcy
 +{{ T "day_with_count" 1 }} → 1 miesiąc
 +{{ T "day_with_count" 2 }} → 2 miesiące
 +{{ T "day_with_count" 5 }} → 5 miesięcy
 +```
 +
- {{< code-toggle file=i18n/en copy=false >}}
++In the pluralization examples above, we passed an integer in context (the second argument). You can also pass a map in context, providing a `count` key to control pluralization.
 +
 +Translation table:
 +
- Template:
++{{< code-toggle file=i18n/en >}}
 +[age]
 +one = '{{ .name }} is {{ .count }} year old.'
 +other = '{{ .name }} is {{ .count }} years old.'
 +{{< /code-toggle >}}
 +
++Template code:
 +
 +```go-html-template
 +{{ T "age" (dict "name" "Will" "count" 1) }} → Will is 1 year old.
 +{{ T "age" (dict "name" "John" "count" 3) }} → John is 3 years old.
 +```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..934d97bffd2bab71d2d1d988fcb536b23421d1c7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Lang functions
++linkTitle: lang
++description: Template functions to adapt your site to meet language and regional requirements.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to adapt your site to meet language and regional requirements.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..682b8426f2587292f13494955dc559266fff48cb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: math.Abs
++description: Returns the absolute value of the given number.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: float64
++  signatures: [math.Abs VALUE]
++---
++
++{{< new-in 0.112.0 >}}
++
++```go-html-template
++{{ math.Abs -2.1 }} → 2.1
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..afa8d48aabea026cde0e68c651c500fccf29f00f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++---
++title: math.Add
++description: Adds two or more numbers.
++categories: []
++keywords: []
++action:
++  aliases: [add]
++  related:
++    - functions/math/Div
++    - functions/math/Mul
++    - functions/math/Product
++    - functions/math/Sub
++    - functions/math/Sum
++  returnType: any
++  signatures: [math.Add VALUE VALUE...]
++---
++
++If one of the numbers is a [`float`], the result is a `float`.
++
++```go-html-template
++{{ add 12 3 2 }} → 17
++```
++
++[`float`]: /getting-started/glossary/#float
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9f74991c32b7e825b21c4584807e4d3284dd884b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: math.Ceil
++description: Returns the least integer value greater than or equal to the given number.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/math/Floor
++    - functions/math/Round
++  returnType: float64
++  signatures: [math.Ceil VALUE]
++---
++
++```go-html-template
++{{ math.Ceil 2.1 }} → 3
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7f53bdd0c1e500312ac388eef90d29c6a33550cd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,35 @@@
++---
++title: math.Counter
++description: Increments and returns a global counter.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: uint64
++  signatures: [math.Counter]
++---
++
++The counter is global for both monolingual and multilingual sites, and its initial value for each build is&nbsp;1.
++
++```go-html-template
++{{ warnf "single.html called %d times" math.Counter }}
++```
++
++```sh
++WARN  single.html called 1 times
++WARN  single.html called 2 times
++WARN  single.html called 3 times
++```
++
++Use this function to:
++
++- Create unique warnings as shown above; the [`warnf`] function suppresses duplicate messages
++- Create unique target paths for the `resources.FromString` function where the target path is also the cache key
++
++[`warnf`]: /functions/fmt/warnf
++[`resources.FromString`]: /functions/resources/fromstring
++
++{{% note %}}
++Due to concurrency, the value returned in a given template for a given page will vary from one build to the next. You cannot use this function to assign a static id to each page.
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..530474a78a5c83a7a01445abc2f37bf2d6e7037c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++---
++title: math.Div
++description: Divides the first number by one or more numbers.
++categories: []
++keywords: []
++action:
++  aliases: [div]
++  related:
++    - functions/math/Add
++    - functions/math/Mul
++    - functions/math/Product
++    - functions/math/Sub
++    - functions/math/Sum
++  returnType: any
++  signatures: [math.Div VALUE VALUE...]
++---
++
++If one of the numbers is a [`float`], the result is a `float`.
++
++```go-html-template
++{{ div 12 3 2 }} → 2
++```
++
++[`float`]: /getting-started/glossary/#float
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..10ad758b6b9eb6642f47204d2b5d4501f0fe5025
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: math.Floor
++description: Returns the greatest integer value less than or equal to the given number.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/math/Ceil
++    - functions/math/Round
++  returnType: float64
++  signatures: [math.Floor VALUE]
++---
++
++```go-html-template
++{{ math.Floor 1.9 }} → 1
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..84edcb288515eba067a9e071d9717e5e11d75bff
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++---
++title: math.Log
++description: Returns the natural logarithm of the given number.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: float64
++  signatures: [math.Log VALUE]
++---
++
++```go-html-template
++{{ math.Log 42 }} → 3.737
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9beff563006dafea4ed9001a0766d8e3f17cd3dc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: math.Max
++description: Returns the greater of all numbers. Accepts scalars, slices, or both.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/math/Min
++  returnType: float64
++  signatures: [math.Max VALUE...]
++---
++
++```go-html-template
++{{ math.Max 1 (slice 2 3) 4 }} → 4
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..79e464c74ab58db4870f92af9fba8ad7b6e22afe
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: math.Min
++description: Returns the smaller of all numbers. Accepts scalars, slices, or both.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/math/Max
++  returnType: float64
++  signatures: [math.Min VALUE...]
++---
++
++```go-html-template
++{{ math.Min 1 (slice 2 3) 4 }} → 1
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d312730c542120d9960a6c7bbc8c8aff7a2f41e3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: math.Mod
++description: Returns the modulus of two integers.
++categories: []
++keywords: []
++action:
++  aliases: [mod]
++  related:
++    - functions/math/ModBool
++  returnType: int64
++  signatures: [math.Mod VALUE1 VALUE2]
++---
++
++```go-html-template
++{{ mod 15 3 }} → 0
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d915ff6141b1c4cfa691aad532c59afb0dd3c39a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: math.ModBool
++description: Reports whether the modulus of two integers equals 0.
++categories: []
++keywords: []
++action:
++  aliases: [modBool]
++  related:
++    - functions/math/Mod
++  returnType: bool
++  signatures: [math.ModBool VALUE1 VALUE2]
++---
++
++```go-html-template
++{{ modBool 15 3 }} → true
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6824599e363805e02d5d894a8ab0f61bc956f8ae
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++---
++title: math.Mul
++description: Multiplies two or more numbers.
++categories: []
++keywords: []
++action:
++  aliases: [mul]
++  related:
++    - functions/math/Add
++    - functions/math/Div
++    - functions/math/Product
++    - functions/math/Sub
++    - functions/math/Sum
++  returnType: any
++  signatures: [math.Mul VALUE VALUE...]
++---
++
++If one of the numbers is a [`float`], the result is a `float`.
++
++```go-html-template
++{{ mul 12 3 2 }} → 72
++```
++
++[`float`]: /getting-started/glossary/#float
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5a1482d73c7dd270835837360c9b01b1d2b8f8d7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: math.Pow
++description: Returns the first number raised to the power of the second number.
++categories: []
++keywords: []
++action:
++  aliases: [pow]
++  related:
++    - functions/math/Sqrt
++  returnType: float64
++  signatures: [math.Pow VALUE1 VALUE2]
++---
++
++```go-html-template
++{{ math.Pow 2 3 }} → 8
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d94df4f1b8c77bdf48ad8a3c777fdd647788c762
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,22 @@@
++---
++title: math.Product
++description: Returns the product of all numbers. Accepts scalars, slices, or both.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/math/Add
++    - functions/math/Div
++    - functions/math/Mul
++    - functions/math/Sub
++    - functions/math/Sum
++  returnType: float64
++  signatures: [math.Product VALUE...]
++---
++
++{{< new-in 0.114.0 >}}
++
++```go-html-template
++{{ math.Product 1 (slice 2 3) 4 }} → 24
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e0678eb784c89905602b70c8ddd336e3fec08de3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: math.Round
++description: Returns the nearest integer, rounding half away from zero.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/math/Ceil
++    - functions/math/Floor
++  returnType: float64
++  signatures: [math.Round VALUE]
++---
++
++```go-html-template
++{{ math.Round 1.5 }} → 2
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..436cb31c327e563362baebd7b15cd9cc142c74b5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: math.Sqrt
++description: Returns the square root of the given number.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/math/Pow
++  returnType: float64
++  signatures: [math.Sqrt VALUE]
++---
++
++```go-html-template
++{{ math.Sqrt 81 }} → 9
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2865ac191a7fef02f20fee49cb0d9164d4058a04
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++---
++title: math.Sub
++description: Subtracts one or more numbers from the first number. 
++categories: []
++action:
++  aliases: [sub]
++  related:
++    - functions/math/Add
++    - functions/math/Div
++    - functions/math/Mul
++    - functions/math/Product
++    - functions/math/Sum
++  returnType: any
++  signatures: [math.Sub VALUE VALUE...]
++---
++
++If one of the numbers is a [`float`], the result is a `float`.
++
++```go-html-template
++{{ sub 12 3 2 }} → 7
++```
++
++[`float`]: /getting-started/glossary/#float
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..eba03f72d73f8cb57cf4d9f098821a122bafec74
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: math.Sum
++description: Returns the sum of all numbers. Accepts scalars, slices, or both.
++categories: []
++action:
++  aliases: []
++  related:
++    - functions/math/Add
++    - functions/math/Div
++    - functions/math/Mul
++    - functions/math/Product
++    - functions/math/Sub
++  returnType: float64
++  signatures: [math.Sum VALUE...]
++---
++
++{{< new-in 0.114.0 >}}
++
++```go-html-template
++{{ math.Sum 1 (slice 2 3) 4 }} → 10
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..76713bc99a4ffee4bb45a22202980f6d7c9698c6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++---
++title: Math functions
++linkTitle: math
++description: Template functions to perform mathematical operations.
++categories: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to perform mathematical operations.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..50c7936850a5cfb9b3c63acf72e037ef31494a4a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,76 @@@
++---
++title: openapi3.Unmarshal
++description: Unmarshals the given resource into an OpenAPI 3 document.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: openapi3.OpenAPIDocument
++  signatures: ['openapi3.Unmarshal RESOURCE']
++---
++
++Use the `openapi3.Unmarshal` function with [global], [page], or [remote] resources.
++
++[global]: /getting-started/glossary/#global-resource
++[page]: /getting-started/glossary/#page-resource
++[remote]: /getting-started/glossary/#remote-resource
++[OpenAPI]: https://www.openapis.org/
++
++For example, to work with a remote [OpenAPI] defintion:
++
++```go-html-template
++{{ $url := "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json" }}
++{{ $api := "" }}
++{{ with resources.GetRemote $url }}
++  {{ with .Err }}
++    {{ errorf "%s" . }}
++  {{ else }}
++    {{ $api = . | openapi3.Unmarshal }}
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get remote resource %q" $url }}
++{{ end }}
++```
++
++To inspect the data structure:
++
++```go-html-template
++<pre>{{ debug.Dump $api }}</pre>
++```
++
++To list the GET and POST operations for each of the API paths:
++
++```go-html-template
++{{ range $path, $details := $api.Paths }}
++  <p>{{ $path }}</p>
++  <dl>
++    {{ with $details.Get }}
++      <dt>GET</dt>
++      <dd>{{ .Summary }}</dd>
++    {{ end }}
++    {{ with $details.Post }}
++      <dt>POST</dt>
++      <dd>{{ .Summary }}</dd>
++    {{ end }}
++  </dl>
++{{ end }}
++```
++
++Hugo renders this to:
++
++
++```html
++<p>/pets</p>
++<dl>
++  <dt>GET</dt>
++  <dd>List all pets</dd>
++  <dt>POST</dt>
++  <dd>Create a pet</dd>
++</dl>
++<p>/pets/{petId}</p>
++<dl>
++  <dt>GET</dt>
++  <dd>Info for a specific pet</dd>
++</dl>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9b6aa958401959276c48a5719d7da3ffbec75b4d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: OpenAPI functions
++linkTitle: openapi3
++description: Template functions to work with OpenAPI 3 definitions.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to work with OpenAPI 3 definitions.
index 52cfe32c82facdedef395016cd3e8f0ca9033830,0000000000000000000000000000000000000000..b8104a066de379f290523163fa405630e756ed63
mode 100644,000000..100644
--- /dev/null
@@@ -1,46 -1,0 +1,41 @@@
- linkTitle: fileExists
 +---
 +title: os.FileExists
- categories: [functions]
 +description: Reports whether the file or directory exists.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - os.FileExists
-   - os.Getenv
-   - os.ReadDir
-   - os.ReadFile
-   - os.Stat
++action:
 +  aliases: [fileExists]
++  related:
++    - functions/os/Getenv
++    - functions/os/ReadDir
++    - functions/os/ReadFile
++    - functions/os/Stat
 +  returnType: bool
 +  signatures: [os.FileExists PATH]
- {{ os.FileExists "content" }} → true
- {{ os.FileExists "content/news" }} → true
- {{ os.FileExists "content/news/article-1" }} → false
- {{ os.FileExists "content/news/article-1.md" }} → true
- {{ os.FileExists "news" }} → true
- {{ os.FileExists "news/article-1" }} → false
- {{ os.FileExists "news/article-1.md" }} → true
 +aliases: [/functions/fileexists]
 +---
 +
 +The `os.FileExists` function attempts to resolve the path relative to the root of your project directory. If a matching file or directory is not found, it will attempt to resolve the path relative to the [`contentDir`](/getting-started/configuration#contentdir). A leading path separator (`/`) is optional.
 +
 +With this directory structure:
 +
 +```text
 +content/
 +├── about.md
 +├── contact.md
 +└── news/
 +    ├── article-1.md
 +    └── article-2.md
 +```
 +
 +The function returns these values:
 +
 +```go-html-template
++{{ fileExists "content" }} → true
++{{ fileExists "content/news" }} → true
++{{ fileExists "content/news/article-1" }} → false
++{{ fileExists "content/news/article-1.md" }} → true
++{{ fileExists "news" }} → true
++{{ fileExists "news/article-1" }} → false
++{{ fileExists "news/article-1.md" }} → true
 +```
index 16f73f5aad238f82a76cb0552b2cca123a2d8724,0000000000000000000000000000000000000000..084d498ce809f3f6c6b03cf2dfce6d7225f7d26a
mode 100644,000000..100644
--- /dev/null
@@@ -1,49 -1,0 +1,61 @@@
- linkTitle: getenv
 +---
 +title: os.Getenv
- categories: [functions]
 +description: Returns the value of an environment variable, or an empty string if the environment variable is not set.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - os.FileExists
-   - os.Getenv
-   - os.ReadDir
-   - os.ReadFile
-   - os.Stat
++action:
 +  aliases: [getenv]
++  related:
++    - functions/os/FileExists
++    - functions/os/ReadDir
++    - functions/os/ReadFile
++    - functions/os/Stat
 +  returnType: string
 +  signatures: [os.Getenv VARIABLE]
- Examples:
 +aliases: [/functions/getenv]
++toc: true
 +---
 +
- {{ os.Getenv "HOME" }} → /home/victor
- {{ os.Getenv "USER" }} → victor
++## Security
++
++By default, when using the `os.Getenv` function Hugo allows access to:
++
++- The `CI` environment variable
++- Any environment variable beginning with `HUGO_`
++
++To access other environment variables, adjust your site configuration. For example, to allow access to the `HOME` and `USER` environment variables:
++
++{{< code-toggle file=hugo >}}
++[security.funcs]
++getenv = ['^HUGO_', '^CI$', '^USER$', '^HOME$']
++{{< /code-toggle >}}
++
++Read more about Hugo's [security policy].
++
++[security policy]: /about/security-model/#security-policy
++
++## Examples
 +
 +```go-html-template
- ```bash
++{{ getenv "HOME" }} → /home/victor
++{{ getenv "USER" }} → victor
 +```
 +
 +You can pass values when building your site:
 +
- {{ os.Getenv "MY_VAR1" }} → foo
- {{ os.Getenv "MY_VAR2" }} → bar
++```sh
 +MY_VAR1=foo MY_VAR2=bar hugo
 +
 +OR
 +
 +export MY_VAR1=foo
 +export MY_VAR2=bar
 +hugo
 +```
 +
 +And then retrieve the values within a template:
 +
 +```go-html-template
- With Hugo v0.91.0 and later, you must explicitly allow access to environment variables. For details, review [Hugo's Security Policy](/about/security-model/#security-policy). By default, environment variables beginning with `HUGO_` are allowed when using the `os.Getenv` function.
++{{ getenv "MY_VAR1" }} → foo
++{{ getenv "MY_VAR2" }} → bar
 +```
index d0ed87bdfea0319d0f96830334b9735c81e676b6,0000000000000000000000000000000000000000..63af850b7e7065cc21efedd44925cef01b4856be
mode 100644,000000..100644
--- /dev/null
@@@ -1,56 -1,0 +1,51 @@@
- linkTitle: readDir
 +---
 +title: os.ReadDir
- categories: [functions]
 +description: Returns an array of FileInfo structures sorted by file name, one element for each directory entry.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   returnType: FileInfo
++action:
 +  aliases: [readDir]
- relatedFunctions:
-   - os.FileExists
-   - os.Getenv
-   - os.ReadDir
-   - os.ReadFile
-   - os.Stat
++  related:
++    - functions/os/FileExists
++    - functions/os/Getenv
++    - functions/os/ReadFile
++    - functions/os/Stat
++  returnType: os.FileInfo
 +  signatures: [os.ReadDir PATH]
- {{ range os.ReadDir "content" }}
 +aliases: [/functions/readdir]
 +---
 +
 +The `os.ReadDir` function resolves the path relative to the root of your project directory. A leading path separator (`/`) is optional.
 +
 +With this directory structure:
 +
 +```text
 +content/
 +├── about.md
 +├── contact.md
 +└── news/
 +    ├── article-1.md
 +    └── article-2.md
 +```
 +
 +This template code:
 +
 +```go-html-template
++{{ range readDir "content" }}
 +  {{ .Name }} → {{ .IsDir }}
 +{{ end }}
 +```
 +
 +Produces:
 +
 +```html
 +about.md → false
 +contact.md → false
 +news → true
 +```
 +
 +Note that `os.ReadDir` is not recursive.
 +
 +Details of the `FileInfo` structure are available in the [Go documentation](https://pkg.go.dev/io/fs#FileInfo).
 +
 +For more information on using `readDir` and `readFile` in your templates, see [Local File Templates](/templates/files).
index 30f2b30569101b7e347600a971c6b3e4924919cf,0000000000000000000000000000000000000000..654e300ac88a6ffa762b6bbdeff320f15520fd98
mode 100644,000000..100644
--- /dev/null
@@@ -1,45 -1,0 +1,40 @@@
- linkTitle: readFile
 +---
 +title: os.ReadFile
- categories: [functions]
 +description: Returns the contents of a file.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - os.FileExists
-   - os.Getenv
-   - os.ReadDir
-   - os.ReadFile
-   - os.Stat
++action:
 +  aliases: [readFile]
++  related:
++    - functions/os/FileExists
++    - functions/os/Getenv
++    - functions/os/ReadDir
++    - functions/os/Stat
 +  returnType: string
 +  signatures: [os.ReadFile PATH]
- {{ os.ReadFile "README.md" }}
 +aliases: [/functions/readfile]
 +---
 +
 +The `os.ReadFile` function attempts to resolve the path relative to the root of your project directory. If a matching file is not found, it will attempt to resolve the path relative to the [`contentDir`](/getting-started/configuration#contentdir). A leading path separator (`/`) is optional.
 +
 +With a file named README.md in the root of your project directory:
 +
 +```text
 +This is **bold** text.
 +```
 +
 +This template code:
 +
 +```go-html-template
++{{ readFile "README.md" }}
 +```
 +
 +Produces:
 +
 +```html
 +This is **bold** text.
 +```
 +
 +Note that `os.ReadFile` returns raw (uninterpreted) content.
 +
 +For more information on using `readDir` and `readFile` in your templates, see [Local File Templates](/templates/files).
index dfef3c8151d19499bd5c7e490348c3f93f1a7d3f,0000000000000000000000000000000000000000..6b6f668de481139052e0e626f4611eb3e6809fb4
mode 100644,000000..100644
--- /dev/null
@@@ -1,35 -1,0 +1,31 @@@
- categories: [functions]
 +---
 +title: os.Stat
 +description: Returns a FileInfo structure describing a file or directory.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   returnType: FileInfo
++action:
 +  aliases: []
- relatedFunctions:
-   - os.FileExists
-   - os.Getenv
-   - os.ReadDir
-   - os.ReadFile
-   - os.Stat
++  related:
++    - functions/os/FileExists
++    - functions/os/Getenv
++    - functions/os/ReadDir
++    - functions/os/ReadFile
++  returnType: os.FileInfo
 +  signatures: [os.Stat PATH]
 +aliases: [/functions/os.stat]
 +---
 +
 +The `os.Stat` function attempts to resolve the path relative to the root of your project directory. If a matching file or directory is not found, it will attempt to resolve the path relative to the [`contentDir`](/getting-started/configuration#contentdir). A leading path separator (`/`) is optional.
 +
 +```go-html-template
 +{{ $f := os.Stat "README.md" }}
 +{{ $f.IsDir }}    → false (bool)
 +{{ $f.ModTime }}  → 2021-11-25 10:06:49.315429236 -0800 PST (time.Time)
 +{{ $f.Name }}     → README.md (string)
 +{{ $f.Size }}     → 241 (int64)
 +
 +{{ $d := os.Stat "content" }}
 +{{ $d.IsDir }}    → true (bool)
 +```
 +
 +Details of the `FileInfo` structure are available in the [Go documentation](https://pkg.go.dev/io/fs#FileInfo).
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c080d00925aa09df61cdd6906cbac9a2882a98bd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: OS functions
++linkTitle: os
++description: Template functions to interact with the operating system.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to interact with the operating system.
index ea9dfb31aefe1ed86f19daf7e002f21ed10ab075,0000000000000000000000000000000000000000..859f6665baec0fa15f822ec5b2d274bcfb29b393
mode 100644,000000..100644
--- /dev/null
@@@ -1,67 -1,0 +1,85 @@@
- linkTitle: partial
- description: Executes the named partial template. If the partial contains a return statement, returns that value, else returns the rendered output.
- categories: [functions]
 +---
 +title: partials.Include
- menu:
-   docs:
-     parent: functions
- function:
++description: Executes the given partial template, optionally passing context. If the partial template contains a return statement, returns the given value, else returns the rendered output.
++categories: []
 +keywords: []
-   signatures: ['partials.Include LAYOUT [CONTEXT]']
- relatedFunctions:
-   - partials.Include
-   - partials.IncludeCached
++action:
 +  aliases: [partial]
++  related:
++    - functions/go-template/return
++    - functions/partials/IncludeCached
++    - functions/go-template/template
++    - methods/page/Render
 +  returnType: any
++  signatures: ['partials.Include NAME [CONTEXT]']
 +aliases: [/functions/partial]
 +---
 +
++Without a [`return`] statement, the `partial` function returns a string of type `template.HTML`. With a `return` statement, the `partial` function can return any data type.
++
++[`return`]: /functions/go-template/return
++
 +In this example we have three partial templates:
 +
 +```text
 +layouts/
 +└── partials/
 +    ├── average.html
 +    ├── breadcrumbs.html
 +    └── footer.html
 +```
 +
 +The "average" partial returns the average of one or more numbers. We pass the numbers in context:
 +
 +```go-html-template
 +{{ $numbers := slice 1 6 7 42 }}
 +{{ $average := partial "average.html" $numbers }}
 +```
 +
 +The "breadcrumbs" partial renders [breadcrumb navigation], and needs to receive the current page in context:
 +
 +```go-html-template
 +{{ partial "breadcrumbs.html" . }}
 +```
 +
 +The "footer" partial renders the site footer. In this contrived example, the footer does not need access to the current page, so we can omit context:
 +
 +```go-html-template
 +{{ partial "breadcrumbs.html" }}
 +```
 +
 +You can pass anything in context: a page, a page collection, a scalar value, a slice, or a map. For example:
 +
 +```go-html-template
 +{{ $student := dict 
 +  "name" "John Doe" 
 +  "major" "Finance"
 +  "gpa" 4.0
 +}}
 +{{ partial "render-student-info.html" $student }}
 +```
 +
 +Then, within the partial template:
 +
 +```go-html-template
 +<p>{{ .name }} is majoring in {{ .major }}. Their grade point average is {{ .gpa }}.</p>
 +```
 +
++To return a value from a partial template, it must contain only one `return` statement, placed at the end of the template:
++
++```go-html-template
++{{ $result := false }}
++{{ if math.ModBool . 2 }}
++  {{ $result = "even" }}
++{{ else }}
++  {{ $result = "odd" }}
++{{ end }}
++{{ return $result }}
++```
++
++See&nbsp;[details][`return`].
++
++[`return`]: /functions/go-template/return
 +
 +[breadcrumb navigation]: /content-management/sections/#ancestors-and-descendants
++[details]: /functions/go-template/return
index ab9a77835cba067e81f6ebca97c91ff08d95c3cf,0000000000000000000000000000000000000000..db275fa9ea87342a50bdfd80b7c9b0267de80db9
mode 100644,000000..100644
--- /dev/null
@@@ -1,49 -1,0 +1,65 @@@
- linkTitle: partialCached
- description: Allows for caching of partials that do not need to be re-rendered on every invocation.
- categories: [functions]
 +---
 +title: partials.IncludeCached
- menu:
-   docs:
-     parent: functions
- function:
++description: Executes the given template and caches the result, optionally passing context. If the partial template contains a return statement, returns the given value, else returns the rendered output.
++categories: []
 +keywords: []
- relatedFunctions:
-   - partials.Include
-   - partials.IncludeCached
++action:
 +  aliases: [partialCached]
++  related:
++    - functions/go-template/return
++    - functions/partials/Include
++    - functions/go-template/template
++    - methods/page/Render
 +  returnType: any
 +  signatures: ['partials.IncludeCached LAYOUT CONTEXT [VARIANT...]']
-   - partials.IncludeCached LAYOUT CONTEXT [VARIANT...]
-   - partialCached LAYOUT CONTEXT [VARIANT...]
 +signatures: 
- The `partialCached` template function can offer significant performance gains for complex templates that don't need to be re-rendered on every invocation.
++  - partials.IncludeCached NAME CONTEXT [VARIANT...]
++  - partialCached NAME CONTEXT [VARIANT...]
 +aliases: [/functions/partialcached]
 +---
 +
- **Note:** Each Site (or language) has its own `partialCached` cache, so each site will execute a partial once.
++Without a [`return`] statement, the `partialCached` function returns a string of type `template.HTML`. With a `return` statement, the `partialCached` function can return any data type.
 +
- **Note**: Hugo renders pages in parallel, and will render the partial more than once with concurrent calls to the `partialCached` function. After Hugo caches the rendered partial, new pages entering the build pipeline will use the cached result.
++The `partialCached` function can offer significant performance gains for complex templates that don't need to be re-rendered on every invocation.
 +
- You can also pass additional arguments to `partialCached` to create *variants* of the cached partial. For example, if you have a complex partial that should be identical when rendered for pages within the same section, you could use a variant based upon section so that the partial is only rendered once per section:
++{{% note %}}
++Each Site (or language) has its own `partialCached` cache, so each site will execute a partial once.
++
++Hugo renders pages in parallel, and will render the partial more than once with concurrent calls to the `partialCached` function. After Hugo caches the rendered partial, new pages entering the build pipeline will use the cached result.
++{{% /note %}}
 +
 +Here is the simplest usage:
 +
 +```go-html-template
 +{{ partialCached "footer.html" . }}
 +```
 +
- {{< code file="partial-cached-example.html" >}}
++Pass additional arguments to `partialCached` to create variants of the cached partial. For example, if you have a complex partial that should be identical when rendered for pages within the same section, use a variant based on section so that the partial is only rendered once per section:
 +
- If you need to pass additional arguments to create unique variants, you can pass as many variant arguments as you need:
++{{< code file=partial-cached-example.html >}}
 +{{ partialCached "footer.html" . .Section }}
 +{{< /code >}}
 +
- Note that the variant arguments are not made available to the underlying partial template. They are only use to create a unique cache key. Since Hugo `0.61.0` you can use any object as cache key(s), not just strings.
++Pass additional arguments, of any data type, as needed to create unique variants:
 +
 +```go-html-template
 +{{ partialCached "footer.html" . .Params.country .Params.province }}
 +```
 +
- See also [The Full Partial Series Part 1: Caching!](https://regisphilibert.com/blog/2019/12/hugo-partial-series-part-1-caching-with-partialcached/).
++The variant arguments are not available to the underlying partial template; they are only used to create unique cache keys. 
++
++To return a value from a partial template, it must contain only one `return` statement, placed at the end of the template:
++
++```go-html-template
++{{ $result := false }}
++{{ if math.ModBool . 2 }}
++  {{ $result = "even" }}
++{{ else }}
++  {{ $result = "odd" }}
++{{ end }}
++{{ return $result }}
++```
++
++See&nbsp;[details][`return`].
 +
++[`return`]: /functions/go-template/return
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0a7d4d6d0164cedd48bb120bc677980306729172
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Partial functions
++linkTitle: partials
++description: Template functions to call partial templates.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to call partial templates.
index c008735243c8611e3b4387d300f4788cd745de48,0000000000000000000000000000000000000000..2071f8bea71ac6ab8a5493f5172e07607c1beebd
mode 100644,000000..100644
--- /dev/null
@@@ -1,35 -1,0 +1,26 @@@
- description: Base returns the last element of a path.
- categories: [functions]
 +---
 +title: path.Base
- menu:
-   docs:
-     parent: functions
- function:
++description: Replaces path separators with slashes (`/`) and returns the last element of the given path. 
++categories: []
 +keywords: []
- relatedFunctions:
-   - path.Base
-   - path.BaseName
-   - path.Clean
-   - path.Dir
-   - path.Ext
-   - path.Join
-   - path.Split
++action:
 +  aliases: []
++  related:
++    - functions/path/BaseName
++    - functions/path/Clean
++    - functions/path/Dir
++    - functions/path/Ext
++    - functions/path/Join
++    - functions/path/Split
 +  returnType: string
 +  signatures: [path.Base PATH]
- `path.Base` returns the last element of `PATH`.
- If `PATH` is empty, `.` is returned.
- **Note:** On Windows, `PATH` is converted to slash (`/`) separators.
 +aliases: [/functions/path.base]
 +---
 +
- {{ path.Base "a/news.html" }} → "news.html"
- {{ path.Base "news.html" }} → "news.html"
- {{ path.Base "a/b/c" }} → "c"
- {{ path.Base "/x/y/z/" }} → "z"
 +```go-html-template
++{{ path.Base "a/news.html" }} → news.html
++{{ path.Base "news.html" }} → news.html
++{{ path.Base "a/b/c" }} → c
++{{ path.Base "/x/y/z/" }} → z
++{{ path.Base "" }} → .
 +```
index a357ed4037d81e9f77b68fca8421f277ae691f67,0000000000000000000000000000000000000000..4c4340a097de60d92f26d708568719f6e6253700
mode 100644,000000..100644
--- /dev/null
@@@ -1,33 -1,0 +1,28 @@@
- description: BaseName returns the last element of a path, removing the extension if present.
- categories: [functions]
 +---
 +title: path.BaseName
- menu:
-   docs:
-     parent: functions
- function:
++description: Replaces path separators with slashes (`/`) and returns the last element of the given path, removing the extension if present.
++categories: []
 +keywords: []
- relatedFunctions:
-   - path.Base
-   - path.BaseName
-   - path.Clean
-   - path.Dir
-   - path.Ext
-   - path.Join
-   - path.Split
++action:
 +  aliases: []
++  related:
++    - functions/path/Base
++    - functions/path/Clean
++    - functions/path/Dir
++    - functions/path/Ext
++    - functions/path/Join
++    - functions/path/Split
 +  returnType: string
 +  signatures: [path.BaseName PATH]
- If `PATH` is empty, `.` is returned.
- **Note:** On Windows, `PATH` is converted to slash (`/`) separators.
 +aliases: [/functions/path.basename]
 +---
 +
- {{ path.BaseName "a/news.html" }} → "news"
- {{ path.BaseName "news.html" }} → "news"
- {{ path.BaseName "a/b/c" }} → "c"
- {{ path.BaseName "/x/y/z/" }} → "z"
++{{< new-in 0.101.0 >}}
 +
 +```go-html-template
++{{ path.BaseName "a/news.html" }} → news
++{{ path.BaseName "news.html" }} → news
++{{ path.BaseName "a/b/c" }} → c
++{{ path.BaseName "/x/y/z/" }} → z
++{{ path.BaseName "" }} → .
 +```
index 98160c56865aeef78345d241251f6fe606808aa9,0000000000000000000000000000000000000000..57a665c03a157b26c3bcbfa81f29e884e4bb301f
mode 100644,000000..100644
--- /dev/null
@@@ -1,35 -1,0 +1,33 @@@
- description: Replaces path separators with slashes (`/`) and removes extraneous separators.
- categories: [functions]
 +---
 +title: path.Clean
- menu:
-   docs:
-     parent: functions
- function:
++description: Replaces path separators with slashes (`/`) and returns the shortest path name equivalent to the given path.
++categories: []
 +keywords: []
- relatedFunctions:
-   - path.Base
-   - path.BaseName
-   - path.Clean
-   - path.Dir
-   - path.Ext
-   - path.Join
-   - path.Split
++action:
 +  aliases: []
++  related:
++    - functions/path/Base
++    - functions/path/BaseName
++    - functions/path/Dir
++    - functions/path/Ext
++    - functions/path/Join
++    - functions/path/Split
 +  returnType: string
 +  signatures: [path.Clean PATH]
- `path.Clean` replaces path separators with slashes (`/`) and removes extraneous separators, including trailing separators.
 +aliases: [/functions/path.clean]
 +---
 +
- ```go-html-template
- {{ path.Clean "foo//bar" }} → "foo/bar"
- {{ path.Clean "/foo/bar/" }} → "/foo/bar"
- ```
- On a Windows system, if `.File.Path` is `foo\bar.md`, then:
++See Go's [`path.Clean`] documentation for details.
 +
- {{ path.Clean .File.Path }} → "foo/bar.md"
++[`path.Clean`]: https://pkg.go.dev/path#Clean
 +
 +```go-html-template
++{{ path.Clean "foo/bar" }} → foo/bar
++{{ path.Clean "/foo/bar" }} → /foo/bar
++{{ path.Clean "/foo/bar/" }} → /foo/bar
++{{ path.Clean "/foo//bar/" }} → /foo/bar
++{{ path.Clean "/foo/./bar/" }} → /foo/bar
++{{ path.Clean "/foo/../bar/" }} → /bar
++{{ path.Clean "/../foo/../bar/" }} → /bar
++{{ path.Clean "" }} → .
 +```
index 0a29286967307de703f67565f252e6f1fc881f54,0000000000000000000000000000000000000000..6d5e5c97528d46cffbde11d999b92d3d404f1974
mode 100644,000000..100644
--- /dev/null
@@@ -1,36 -1,0 +1,27 @@@
- description: Dir returns all but the last element of a path.
- categories: [functions]
 +---
 +title: path.Dir
- menu:
-   docs:
-     parent: functions
- function:
++description: Replaces path separators with slashes (/) and returns all but the last element of the given path.
++categories: []
 +keywords: []
- relatedFunctions:
-   - path.Base
-   - path.BaseName
-   - path.Clean
-   - path.Dir
-   - path.Ext
-   - path.Join
-   - path.Split
++action:
 +  aliases: []
++  related:
++    - functions/path/Base
++    - functions/path/BaseName
++    - functions/path/Clean
++    - functions/path/Ext
++    - functions/path/Join
++    - functions/path/Split
 +  returnType: string
 +  signatures: [path.Dir PATH]
- `path.Dir` returns all but the last element of `PATH`, typically `PATH`'s directory.
- The returned path will never end in a slash.
- If `PATH` is empty, `.` is returned.
- **Note:** On Windows, `PATH` is converted to slash (`/`) separators.
 +aliases: [/functions/path.dir]
 +---
 +
- {{ path.Dir "a/news.html" }} → "a"
- {{ path.Dir "news.html" }} → "."
- {{ path.Dir "a/b/c" }} → "a/b"
- {{ path.Dir "/x/y/z" }} → "/x/y"
 +```go-html-template
++{{ path.Dir "a/news.html" }} → a
++{{ path.Dir "news.html" }} → .
++{{ path.Dir "a/b/c" }} → a/b
++{{ path.Dir "/a/b/c" }} → /a/b
++{{ path.Dir "/a/b/c/" }} → /a/b/c
++{{ path.Dir "" }} → .
 +```
index 6b5685948416376698a69495b811019e273eb48e,0000000000000000000000000000000000000000..f3e47aecd773e636bf8611f5562895f7d00076bd
mode 100644,000000..100644
--- /dev/null
@@@ -1,33 -1,0 +1,24 @@@
- description: Ext returns the file name extension of a path.
- categories: [functions]
 +---
 +title: path.Ext
- menu:
-   docs:
-     parent: functions
- function:
++description: Replaces path separators with slashes (`/`) and returns the file name extension of the given path.
++categories: []
 +keywords: []
- relatedFunctions:
-   - path.Base
-   - path.BaseName
-   - path.Clean
-   - path.Dir
-   - path.Ext
-   - path.Join
-   - path.Split
++action:
 +  aliases: []
++  related:
++    - functions/path/Base
++    - functions/path/BaseName
++    - functions/path/Clean
++    - functions/path/Dir
++    - functions/path/Join
++    - functions/path/Split
 +  returnType: string
 +  signatures: [path.Ext PATH]
- `path.Ext` returns the file name extension `PATH`.
- The extension is the suffix beginning at the final dot in the final slash-separated element `PATH`;
- it is empty if there is no dot.
- **Note:** On Windows, `PATH` is converted to slash (`/`) separators.
 +aliases: [/functions/path.ext]
 +---
 +
- {{ path.Ext "a/b/c/news.html" }} → ".html"
++The extension is the suffix beginning at the final dot in the final slash-separated element of path; it is empty if there is no dot.
 +
 +```go-html-template
++{{ path.Ext "a/b/c/news.html" }} → .html
 +```
index 4f5c51c0f392f3aca12d4a06689502f5aff5d27b,0000000000000000000000000000000000000000..dc701b7314e7d62ed1611ea5ba597687c3949884
mode 100644,000000..100644
--- /dev/null
@@@ -1,34 -1,0 +1,36 @@@
- description: Join path elements into a single path.
- categories: [functions]
 +---
 +title: path.Join
- menu:
-   docs:
-     parent: functions
- function:
++description: Replaces path separators with slashes (`/`), joins the given path elements into a single path, and returns the shortest path name equivalent to the result.
++categories: []
 +keywords: []
- relatedFunctions:
-   - path.Base
-   - path.BaseName
-   - path.Clean
-   - path.Dir
-   - path.Ext
-   - path.Join
-   - path.Split
-   - urls.JoinPath
++action:
 +  aliases: []
++  related:
++    - functions/path/Base
++    - functions/path/BaseName
++    - functions/path/Clean
++    - functions/path/Dir
++    - functions/path/Ext
++    - functions/path/Split
++    - functions/urls/JoinPath
 +  returnType: string
 +  signatures: [path.Join ELEMENT...]
- `path.Join` joins path elements into a single path, adding a separating slash if necessary.
- All empty strings are ignored.
 +aliases: [/functions/path.join]
 +---
 +
- **Note:** All path elements on Windows are converted to slash ('/') separators.
++See Go's [`path.Join`] and [`path.Clean`] documentation for details.
++
++[`path.Clean`]: https://pkg.go.dev/path#Clean
++[`path.Join`]: https://pkg.go.dev/path#Join
 +
- {{ path.Join "partial" "news.html" }} → "partial/news.html"
- {{ path.Join "partial/" "news.html" }} → "partial/news.html"
- {{ path.Join "foo/baz" "bar" }} → "foo/baz/bar"
 +
 +```go-html-template
++{{ path.Join "partial" "news.html" }} → partial/news.html
++{{ path.Join "partial/" "news.html" }} → partial/news.html
++{{ path.Join "foo/bar" "baz" }} → foo/bar/baz
++{{ path.Join "foo" "bar" "baz" }} → foo/bar/baz
++{{ path.Join "foo" "" "baz" }} → foo/baz
++{{ path.Join "foo" "." "baz" }} → foo/baz
++{{ path.Join "foo" ".." "baz" }} → baz
++{{ path.Join "/.." "foo" ".." "baz" }} → baz
 +```
index bde412743e4a207dd66f51cf00947b1af6d39c41,0000000000000000000000000000000000000000..329d73954a2a8bd986a3aab95d52486eebb3298d
mode 100644,000000..100644
--- /dev/null
@@@ -1,43 -1,0 +1,34 @@@
- description: Split path immediately following the final slash.
- categories: [functions]
 +---
 +title: path.Split
- menu:
-   docs:
-     parent: functions
- function:
++description: Replaces path separators with slashes (`/`) and splits the resulting path immediately following the final slash, separating it into a directory and file name component. 
++categories: []
 +keywords: []
-   returnType: DirFile
++action:
 +  aliases: []
- relatedFunctions:
-   - path.Base
-   - path.BaseName
-   - path.Clean
-   - path.Dir
-   - path.Ext
-   - path.Join
-   - path.Split
++  related:
++    - functions/path/Base
++    - functions/path/BaseName
++    - functions/path/Clean
++    - functions/path/Dir
++    - functions/path/Ext
++    - functions/path/Join
++  returnType: paths.DirFile
 +  signatures: [path.Split PATH]
- `path.Split` splits `PATH` immediately following the final slash, separating it into a directory and a base component.
- The returned values have the property that `PATH` = `DIR`+`BASE`.
- If there is no slash in `PATH`, it returns an empty directory and the base is set to `PATH`.
- **Note:** On Windows, `PATH` is converted to slash (`/`) separators.
 +aliases: [/functions/path.split]
 +---
 +
- {{ $dirFile.Dir }} → "a/" 
- {{ $dirFile.File }} → "news.html"
++If there is no slash in the given path, `path.Split` returns an empty directory, and file set to path. The returned values have the property that path = dir+file.
 +
 +```go-html-template
 +{{ $dirFile := path.Split "a/news.html" }}
- {{ $dirFile.Dir }} → ""
- {{ $dirFile.File }} → "news.html"
++{{ $dirFile.Dir }} → a/
++{{ $dirFile.File }} → news.html
 +
 +{{ $dirFile := path.Split "news.html" }}
- {{ $dirFile.Dir }} → "a/b/"
- {{ $dirFile.File }} → "c"
++{{ $dirFile.Dir }} → "" (empty string)
++{{ $dirFile.File }} → news.html
 +
 +{{ $dirFile := path.Split "a/b/c" }}
++{{ $dirFile.Dir }} → a/b/
++{{ $dirFile.File }} → c
 +```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2d7ce8e90ec2d72b0ac3fe1b3c957938b1361bd5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Path functions
++linkTitle: path
++description: Template functions to work with file paths.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to work with file paths.
index 7d89bb38aacb0518a1418c5da94ce19f56839445,0000000000000000000000000000000000000000..ada5a221d67948be63243470206f3a65ccd5ed2f
mode 100644,000000..100644
--- /dev/null
@@@ -1,23 -1,0 +1,18 @@@
- description: Reports whether the value is a map.
- categories: [functions]
 +---
 +title: reflect.IsMap
- menu:
-   docs:
-     parent: functions
- function:
++description: Reports whether the given value is a map.
++categories: []
 +keywords: []
- namespace: reflect
- relatedFunctions:
-   - reflect.IsMap
-   - reflect.IsSlice
++action:
 +  aliases: []
++  related:
++    - functions/reflect/IsSlice
 +  returnType: bool
 +  signatures: [reflect.IsMap INPUT]
 +aliases: [/functions/reflect.ismap]
 +---
 +
 +```go-html-template
 +{{ reflect.IsMap (dict "key" "value") }} → true
 +{{ reflect.IsMap "yo" }} → false
 +```
index 09bab7127e32f1faeb0cd3fe77a6ad76aa1aa89f,0000000000000000000000000000000000000000..cda24a5e1b75e0f4761525a53dc3cdbd79fd6f3e
mode 100644,000000..100644
--- /dev/null
@@@ -1,23 -1,0 +1,18 @@@
- description: Reports whether the value is a slice.
- categories: [functions]
 +---
 +title: reflect.IsSlice
- menu:
-   docs:
-     parent: functions
- function:
++description: Reports whether the given value is a slice.
++categories: []
 +keywords: []
- namespace: reflect
- relatedFunctions:
-   - reflect.IsMap
-   - reflect.IsSlice
++action:
 +  aliases: []
++  related:
++    - functions/reflect/IsMap
 +  returnType: bool
 +  signatures: [reflect.IsSlice INPUT]
 +aliases: [/functions/reflect.isslice]
 +---
 +
 +```go-html-template
 +{{ reflect.IsSlice (slice 1 2 3) }} → true
 +{{ reflect.IsSlice "yo" }} → false
 +```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..711908ee2b967165c50bed9a0f730ce747bf4d8e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Reflect functions
++linkTitle: reflect
++description: Template functions to determine a value's data type.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to determine a value's data type.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..57ddb7d235979fed69000c544747da82fc82b26c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,88 @@@
++---
++title: resources.Babel
++description: Compiles the given JavaScript resource with Babel.
++categories: []
++keywords: []
++action:
++  aliases: [babel]
++  related:
++    - functions/js/Build
++    - functions/resources/Fingerprint
++    - functions/resources/Minify
++  returnType: resource.Resource
++  signatures: ['resources.Babel [OPTIONS] RESOURCE']
++toc: true
++---
++
++```go-html-template
++{{ with resources.Get "js/main.js" }}
++  {{ if hugo.IsDevelopment }}
++    {{ with . | babel }}
++      <script src="{{ .RelPermalink }}"></script>
++    {{ end }}
++  {{ else }}
++    {{ $opts := dict "minified" true }}
++    {{ with . | babel $opts | fingerprint }}
++      <script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
++    {{ end }}
++  {{ end }}
++{{ end }}
++```
++
++## Setup
++
++Step 1
++: Install [Node.js](https://nodejs.org/en/download)
++
++Step 2
++: Install the required Node.js packages in the root of your project.
++
++```sh
++npm install --save-dev @babel/core @babel/cli
++```
++
++Step 3
++: Add the babel executable to Hugo's `security.exec.allow` list in your site configuration:
++
++{{< code-toggle file=hugo >}}
++[security.exec]
++  allow = ['^(dart-)?sass(-embedded)?$', '^go$', '^npx$', '^postcss$', '^babel$']
++{{< /code-toggle >}}
++
++## Configuration
++
++We add the main project's `node_modules` to `NODE_PATH` when running Babel and similar tools. There are some known [issues](https://github.com/babel/babel/issues/5618) with Babel in this area, so if you have a `babel.config.js` living in a Hugo Module (and not in the project itself), we recommend using `require` to load the presets/plugins, e.g.:
++
++```js
++module.exports = {
++  presets: [
++    [
++      require("@babel/preset-env"),
++      {
++        useBuiltIns: "entry",
++        corejs: 3,
++      },
++    ],
++  ],
++};
++```
++
++## Options
++
++config
++: (`string`) Path to the Babel configuration file. Hugo will, by default, look for a `babel.config.js` in your project. More information on these configuration files can be found here: [babel configuration](https://babeljs.io/docs/en/configuration).
++
++minified
++: (`bool`) Save as many bytes as possible when printing
++
++noComments
++: (`bool`) Write comments to generated output (true by default)
++
++compact
++: (`bool`) Do not include superfluous whitespace characters and line terminators. Defaults to `auto` if not set.
++
++verbose
++: (`bool`) Log everything
++
++sourceMap
++: (`string`) Output `inline` or `external` sourcemap from the babel compile. External sourcemaps will be written to the target with the output file name + ".map". Input sourcemaps can be read from js.Build and node modules and combined into the output sourcemaps.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a5df3befb8338a0a99e8329ad635c7ee919a21f9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,34 @@@
++---
++title: resources.ByType
++description: Returns a collection of global resources of the given media type, or nil if none found.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/resources/Get
++    - functions/resources/GetMatch
++    - functions/resources/GetRemote
++    - functions/resources/Match
++    - methods/page/Resources
++  returnType: resource.Resources
++  signatures: [resources.ByType MEDIATYPE]
++---
++
++The [media type] is typically one of `image`, `text`, `audio`, `video`, or `application`.
++
++```go-html-template
++{{ range resources.ByType "image" }}
++  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++{{ end }}
++```
++
++{{% note %}}
++This function operates on global resources. A global resource is a file within the assets directory, or within any directory mounted to the assets directory.
++
++For page resources, use the [`Resources.ByType`] method on the Page object.
++
++[`Resources.ByType`]: /methods/page/resources
++{{% /note %}}
++
++[media type]: https://en.wikipedia.org/wiki/Media_type
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3bdf975bf9aeab2198672003531888c595236056
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: resources.Concat
++description: Concatenates a slice of resources.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: resource.Resource
++  signatures: ['resources.Concat TARGETPATH [RESOURCE...]']
++---
++
++```go-html-template
++{{ $plugins := resources.Get "js/plugins.js" }}
++{{ $global := resources.Get "js/global.js" }}
++{{ $js := slice $plugins $global | resources.Concat "js/bundle.js" }}
++```
++
++Asset files of the same [media type] can be bundled into one resource using the `resources.Concat` function which takes two arguments, the target path for the created resource bundle and a slice of resource objects to be concatenated.
++
++[media type]: https://en.wikipedia.org/wiki/Media_type
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f8e962aeedeb600bd0571d81e0504205e0ba59bd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,32 @@@
++---
++title: resources.Copy
++description: Copies the given resource to the target path.
++categories: []
++action:
++  aliases: []
++  related: []
++  returnType: resource.Resource
++  signatures: [resources.Copy TARGETPATH RESOURCE]
++---
++
++{{< new-in 0.100.0 >}}
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ with resources.Copy "img/new-image-name.jpg" . }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++The relative URL of the new published resource will be:
++
++```text
++/img/new-image-name.jpg
++```
++
++The target path must be different than the source path, as shown in the example above.
++
++{{% note %}}
++Use the `resources.Copy` function with global, page, and remote resources.
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d17f0580ca5b66dff6edc92c4f0337e2c618b7af
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,56 @@@
++---
++title: resources.ExecuteAsTemplate
++description: Creates a resource from a Go template, parsed and executed with the given context.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/resources/FromString
++  returnType: resource.Resource
++  signatures: [resources.ExecuteAsTemplate TARGETPATH CONTEXT RESOURCE]
++---
++
++Hugo publishes the resource to the target path when you call its`.Publish`, `.Permalink`, or `.RelPermalink` method. The resource is cached, using the target path as the cache key.
++
++Let's say you have a CSS file that you wish to populate with values from your site configuration:
++
++{{< code file=assets/css/template.css lang=go-html-template >}}
++body {
++  background-color: {{ site.Params.style.bg_color }};
++  color: {{ site.Params.style.text_color }};
++}
++{{< /code >}}
++
++And your site configuration contains:
++
++{{< code-toggle file=hugo >}}
++[params.style]
++bg_color = '#fefefe'
++text_color = '#222'
++{{< /code-toggle >}}
++
++Place this in your baseof.html template:
++
++```go-html-template
++{{ with resources.Get "css/template.css" }}
++  {{ with resources.ExecuteAsTemplate "css/main.css" $ . }}
++    <link rel="stylesheet" href="{{ .RelPermalink }}">
++  {{ end }}
++{{ end }}
++```
++
++The example above:
++
++1. Captures the template as a resource
++2. Executes the resource as a template, passing the current page in context
++3. Publishes the resource to css/main.css
++
++The result is:
++
++{{< code file=public/css/main.css >}}
++body {
++  background-color: #fefefe;
++  color: #222;
++}
++{{< /code >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..685214f96ce10b39c3e7ca685d186a2c03ba505c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,42 @@@
++---
++title: resources.Fingerprint
++description: Cryptographically hashes the content of the given resource.
++categories: []
++keywords: []
++action:
++  aliases: [fingerprint]
++  related:
++    - functions/js/Build
++    - functions/resources/Babel
++    - functions/resources/Minify
++    - functions/resources/PostCSS
++    - functions/resources/PostProcess
++    - functions/resources/ToCSS
++  returnType: resource.Resource
++  signatures: ['resources.Fingerprint [ALGORITHM] RESOURCE']
++---
++
++```go-html-template
++{{ with resources.Get "js/main.js" }}
++  {{ with . | fingerprint "sha256" }}
++    <script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
++  {{ end }}
++{{ end }}
++```
++
++Hugo renders this to something like:
++
++```html
++<script src="/js/main.62e...df1.js" integrity="sha256-Yuh...rfE=" crossorigin="anonymous"></script>
++```
++
++Although most commonly used with CSS and JavaScript resources, you can use the `resources.Fingerprint` function with any resource type.
++
++The hash algorithm may be one of `md5`, `sha256` (default), `sha384`, or `sha512`.
++
++After cryptographically hashing the resource content:
++
++1. The values returned by the `.Permalink` and `.RelPermalink` methods include the hash sum
++2. The resource's `.Data.Integrity` method returns a [Subresource Integrity] (SRI) value consisting of the name of the hash algorithm, one hyphen, and the base64-encoded hash sum
++
++[Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6c22b53104c4d60ba5e900e959adc22d3a800c08
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,71 @@@
++---
++title: resources.FromString
++description: Creates a resource from a string.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/resources/ExecuteAsTemplate
++  returnType: resource.Resource
++  signatures: [resources.FromString TARGETPATH STRING]
++---
++
++Hugo publishes the resource to the target path when you call its`.Publish`, `.Permalink`, or `.RelPermalink` method. The resource is cached, using the target path as the cache key.
++
++Let's say you need to publish a file named "site.json" in the root of your public directory, containing the build date, the Hugo version used to build the site, and the date that the content was last modified. For example:
++
++```json
++{
++  "build_date": "2023-10-03T10:50:40-07:00",
++  "hugo_version": "0.120.0",
++  "last_modified": "2023-10-02T15:21:27-07:00"
++}
++```
++
++Place this in your baseof.html template:
++
++```go-html-template
++{{ if .IsHome }}
++  {{ $rfc3339 := "2006-01-02T15:04:05Z07:00" }}
++  {{ $m := dict
++    "hugo_version" hugo.Version
++    "build_date" (now.Format $rfc3339)
++    "last_modified" (site.LastChange.Format $rfc3339)
++  }}
++  {{ $json := jsonify $m }}
++  {{ $r := resources.FromString "site.json" $json }}
++  {{ $r.Publish }}
++{{ end }}
++```
++
++The example above:
++
++1. Creates a map with the relevant key/value pairs using the [`dict`] function
++2. Encodes the map as a JSON string using the [`jsonify`] function
++3. Creates a resource from the JSON string using the `resources.FromString` function
++4. Publishes the file to the root of the public directory using the resource's `.Publish` method
++
++Combine `resources.FromString` with [`resources.ExecuteAsTemplate`] if your string contains template actions. Rewriting the example above:
++
++```go-html-template
++{{ if .IsHome }}
++  {{ $string := `
++    {{ $rfc3339 := "2006-01-02T15:04:05Z07:00" }}
++    {{ $m := dict
++      "hugo_version" hugo.Version
++      "build_date" (now.Format $rfc3339)
++      "last_modified" (site.LastChange.Format $rfc3339)
++    }}
++    {{ $json := jsonify $m }}
++    `
++  }}
++  {{ $r := resources.FromString "" $string }}
++  {{ $r = $r | resources.ExecuteAsTemplate "site.json" . }}
++  {{ $r.Publish }}
++{{ end }}
++```
++
++[`dict`]: /functions/collections/dictionary
++[`jsonify`]: /functions/encoding/jsonify
++[`resources.ExecuteAsTemplate`]: /functions/resources/executeastemplate
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a8b75d52b4d3dada5ffb192273eb1cdc195b705c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++---
++title: resources.Get
++description: Returns a global resource from the given path, or nil if none found.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/resources/ByType
++    - functions/resources/GetMatch
++    - functions/resources/GetRemote
++    - functions/resources/Match
++    - methods/page/Resources
++  returnType: resource.Resource
++  signatures: [resources.Get PATH]
++---
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++{{ end }}
++```
++
++{{% note %}}
++This function operates on global resources. A global resource is a file within the assets directory, or within any directory mounted to the assets directory.
++
++For page resources, use the [`Resources.Get`] method on the Page object.
++
++[`Resources.Get`]: /methods/page/resources
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fde26c09db2d380f96766966791a689df954db38
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: resources.GetMatch
++description: Returns the first global resource from paths matching the given glob pattern, or nil if none found.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/resources/ByType
++    - functions/resources/Get
++    - functions/resources/GetRemote
++    - functions/resources/Match
++    - methods/page/Resources
++  returnType: resource.Resource
++  signatures: [resources.GetMatch PATTERN]
++---
++
++```go-html-template
++{{ with resources.GetMatch "images/*.jpg" }}
++  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++{{ end }}
++```
++
++{{% note %}}
++This function operates on global resources. A global resource is a file within the assets directory, or within any directory mounted to the assets directory.
++
++For page resources, use the [`Resources.GetMatch`] method on the Page object.
++
++[`Resources.GetMatch`]: /methods/page/resources
++{{% /note %}}
++
++Hugo determines a match using a case-insensitive [glob pattern].
++
++{{% include "functions/_common/glob-patterns.md" %}}
++
++[glob pattern]: https://github.com/gobwas/glob#example
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0e6b91b641c63295b44f7c1acc157e566f17c8f1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,177 @@@
++---
++title: resources.GetRemote
++description: Returns a remote resource from the given URL, or nil if none found.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/data/GetCSV
++    - functions/data/GetJSON
++    - functions/resources/ByType
++    - functions/resources/Get
++    - functions/resources/GetMatch
++    - functions/resources/Match
++    - methods/page/Resources
++  returnType: resource.Resource
++  signatures: ['resources.GetRemote URL [OPTIONS]']
++toc: true
++---
++
++```go-html-template
++{{ $url := "https://example.org/images/a.jpg" }}
++{{ with resources.GetRemote $url }}
++  {{ with .Err }}
++    {{ errorf "%s" . }}
++  {{ else }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get remote resource %q" $url }}
++{{ end }}
++```
++
++## Options
++
++The `resources.GetRemote` function takes an optional map of options.
++
++```go-html-template
++{{ $url := "https://example.org/api" }}
++{{ $opts := dict
++  "headers" (dict "Authorization" "Bearer abcd")
++}}
++{{ $resource := resources.GetRemote $url $opts }}
++```
++
++If you need multiple values for the same header key, use a slice:
++
++```go-html-template
++{{ $url := "https://example.org/api" }}
++{{ $opts := dict
++  "headers" (dict "X-List" (slice "a" "b" "c"))
++}}
++{{ $resource := resources.GetRemote $url $opts }}
++```
++
++You can also change the request method and set the request body:
++
++```go-html-template
++{{ $url := "https://example.org/api" }}
++{{ $opts := dict
++  "method" "post"
++  "body" `{"complete": true}` 
++  "headers" (dict  "Content-Type" "application/json")
++}}
++{{ $resource := resources.GetRemote $url $opts }}
++```
++
++## Remote data
++
++When retrieving remote data, use the [`transform.Unmarshal`] function to [unmarshal] the response.
++
++[`transform.Unmarshal`]: /functions/transform/unmarshal
++[unmarshal]: /getting-started/glossary/#unmarshal
++
++```go-html-template
++{{ $data := "" }}
++{{ $url := "https://example.org/books.json" }}
++{{ with resources.GetRemote $url }}
++  {{ with .Err }}
++    {{ errorf "%s" . }}
++  {{ else }}
++    {{ $data = . | transform.Unmarshal }}
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get remote resource %q" $url }}
++{{ end }}
++```
++
++## Error handling
++
++The [`Err`] method on a resource returned by the `resources.GetRemote` function returns an error message if the HTTP request fails, else nil. If you do not handle the error yourself, Hugo will fail the build.
++
++[`Err`]: /methods/resource/err
++
++```go-html-template
++{{ $url := "https://broken-example.org/images/a.jpg" }}
++{{ with resources.GetRemote $url }}
++  {{ with .Err }}
++    {{ errorf "%s" . }}
++  {{ else }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get remote resource %q" $url }}
++{{ end }}
++```
++
++To log an error as a warning instead of an error:
++
++```go-html-template
++{{ $url := "https://broken-example.org/images/a.jpg" }}
++{{ with resources.GetRemote $url }}
++  {{ with .Err }}
++    {{ warnf "%s" . }}
++  {{ else }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get remote resource %q" $url }}
++{{ end }}
++```
++
++## HTTP response
++
++The [`Data`] method on a resource returned by the `resources.GetRemote` function returns information from the HTTP response.
++
++[`Data`]: /methods/resource/data
++
++```go-html-template
++{{ $url := "https://example.org/images/a.jpg" }}
++{{ with resources.GetRemote $url }}
++  {{ with .Err }}
++    {{ errorf "%s" . }}
++  {{ else }}
++    {{ with .Data }}
++      {{ .ContentLength }} → 42764
++      {{ .ContentType }} → image/jpeg
++      {{ .Status }} → 200 OK
++      {{ .StatusCode }} → 200
++      {{ .TransferEncoding }} → []
++    {{ end }}
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get remote resource %q" $url }}
++{{ end }}
++```
++
++ContentLength
++: (`int`) The content length in bytes.
++
++ContentType
++: (`string`) The content type.
++
++Status
++: (`string`) The HTTP status text.
++
++StatusCode
++: (`int`) The HTTP status code.
++
++TransferEncoding
++: (`string`) The transfer encoding.
++
++## Caching
++
++Resources returned from `resources.GetRemote` are cached to disk. See [configure file caches] for details.
++
++By default, Hugo derives the cache key from the arguments passed to the function, the URL and the options map, if any.
++
++Override the cache key by setting a `key` in the options map. Use this approach to have more control over how often Hugo fetches a remote resource.
++
++```go-html-template
++{{ $url := "https://example.org/images/a.jpg" }}
++{{ $cacheKey := print $url (now.Format "2006-01-02") }}
++{{ $resource := resource.GetRemote $url (dict "key" $cacheKey) }}
++```
++
++[configure file caches]: /getting-started/configuration/#configure-file-caches
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0044351f1f0f798592ff7bded2cc77cbb97c72a5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: resources.Match
++description: Returns a collection of global resources from paths matching the given glob pattern, or nil if none found.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/resources/ByType
++    - functions/resources/Get
++    - functions/resources/GetMatch
++    - functions/resources/GetRemote
++    - methods/page/Resources
++  returnType: resource.Resources
++  signatures: [resources.Match PATTERN]
++---
++
++```go-html-template
++{{ range resources.Match "images/*.jpg" }}
++  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++{{ end }}
++```
++
++{{% note %}}
++This function operates on global resources. A global resource is a file within the assets directory, or within any directory mounted to the assets directory.
++
++For page resources, use the [`Resources.Match`] method on the Page object.
++
++[`Resources.Match`]: /methods/page/resources
++{{% /note %}}
++
++Hugo determines a match using a case-insensitive [glob pattern].
++
++{{% include "functions/_common/glob-patterns.md" %}}
++
++[glob pattern]: https://github.com/gobwas/glob#example
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..44f5f990b61bf5b3688514d203d8dfa7868e8851
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++---
++title: resources.Minify
++description: Minifies the given resource.
++categories: []
++keywords: []
++action:
++  aliases: [minify]
++  related:
++    - functions/js/Build
++    - functions/resources/Babel
++    - functions/resources/Fingerprint
++    - functions/resources/PostCSS
++    - functions/resources/ToCSS
++  returnType: resource.Resource
++  signatures: [resources.Minify RESOURCE]
++---
++
++```go-html-template
++{{ $css := resources.Get "css/main.css" }}
++{{ $style := $css | minify }}
++```
++
++Any CSS, JS, JSON, HTML, SVG or XML resource can be minified using resources.Minify which takes for argument the resource object.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a9f9ed3c8d31817e0f9a0e5234eea12912b13bbe
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,129 @@@
++---
++title: resources.PostCSS
++description: Processes the given resource with PostCSS using any PostCSS plugin.
++categories: []
++keywords: []
++action:
++  aliases: [postCSS]
++  related:
++    - functions/resources/Fingerprint
++    - functions/resources/Minify
++    - functions/resources/PostProcess
++    - functions/resources/ToCSS
++  returnType: resource.Resource
++  signatures: ['resources.PostCSS [OPTIONS] RESOURCE']
++toc: true
++---
++
++```go-html-template
++{{ with resources.Get "css/main.css" | postCSS }}
++  <link rel="stylesheet" href="{{ .RelPermalink }}">
++{{ end }}
++```
++
++## Setup
++
++Follow the steps below to transform CSS using any of the available [PostCSS plugins].
++
++Step 1
++: Install [Node.js].
++
++Step 2
++: Install the required Node.js packages in the root of your project. For example, to add vendor prefixes to your CSS rules:
++
++```sh
++npm i -D postcss postcss-cli autoprefixer
++```
++
++Step 3
++: Create a PostCSS configuration file in the root of your project. You must name this file `postcss.config.js` or another [supported file name]. For example:
++
++```js
++module.exports = {
++  plugins: [
++    require('autoprefixer')
++  ]
++};
++```
++
++{{% note %}}
++{{% include "functions/resources/_common/postcss-windows-warning.md" %}}
++{{% /note %}}
++
++Step 4
++: Place your CSS file within the `assets/css` directory.
++
++Step 5
++: Process the resource with PostCSS:
++
++```go-html-template
++{{ with resources.Get "css/main.css" | postCSS }}
++  <link rel="stylesheet" href="{{ .RelPermalink }}">
++{{ end }}
++```
++
++## Options
++
++The `resources.PostCSS` method takes an optional map of options.
++
++config
++: (`string`) The directory that contains the PostCSS configuration file. Default is the root of the project directory.
++
++noMap
++: (`bool`) Default is `false`. If `true`, disables inline sourcemaps.
++
++inlineImports
++: (`bool`) Default is `false`. Enable inlining of @import statements. It does so recursively, but will only import a file once. URL imports (e.g. `@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');`) and imports with media queries will be ignored. Note that this import routine does not care about the CSS spec, so you can have @import anywhere in the file. Hugo will look for imports relative to the module mount and will respect theme overrides.
++
++skipInlineImportsNotFound
++: (`bool`) Default is `false`. Before Hugo 0.99.0 when `inlineImports` was enabled and we failed to resolve an import, we logged it as a warning. We now fail the build. If you have regular CSS imports in your CSS that you want to preserve, you can either use imports with URL or media queries (Hugo does not try to resolve those) or set `skipInlineImportsNotFound` to true.
++
++```go-html-template
++{{ $opts := dict "config" "config-directory" "noMap" true }}
++{{ with resources.Get "css/main.css" | postCSS $opts }}
++  <link rel="stylesheet" href="{{ .RelPermalink }}">
++{{ end }}
++```
++
++## No configuration file
++
++To avoid using a PostCSS configuration file, you can specify a minimal configuration using the options map.
++
++use
++: (`string`) A space-delimited list of PostCSS plugins to use.
++
++parser
++: (`string`) A custom PostCSS parser.
++
++stringifier
++: (`string`) A custom PostCSS stringifier.
++
++syntax
++: (`string`) Custom postcss syntax.
++
++```go-html-template
++{{ $opts := dict "use" "autoprefixer postcss-color-alpha" }}
++{{ with resources.Get "css/main.css" | postCSS $opts }}
++  <link rel="stylesheet" href="{{ .RelPermalink }}">
++{{ end }}
++```
++
++## Check environment
++
++The current Hugo environment name (set by `--environment` or in configuration or OS environment) is available in the Node context, which allows constructs like this:
++
++```js
++const autoprefixer = require('autoprefixer');
++const purgecss = require('@fullhuman/postcss-purgecss');
++module.exports = {
++  plugins: [
++    autoprefixer,
++    process.env.HUGO_ENVIRONMENT !== 'development' ? purgecss : null
++  ]
++}
++```
++
++[node.js]: https://nodejs.org/en/download
++[postcss plugins]: https://www.postcss.parts/
++[supported file name]: https://github.com/postcss/postcss-load-config#usage
++[transpile to CSS]: /functions/resources/tocss.md
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f765ea9af3fb843d042244d306aa0d2429cb22be
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,160 @@@
++---
++title: resources.PostProcess
++description: Processes the given resource after the build.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/resources/Fingerprint
++    - functions/resources/Minify
++    - functions/resources/PostCSS
++    - functions/resources/ToCSS
++  returnType: postpub.PostPublishedResource
++  signatures: [resources.PostProcess RESOURCE]
++toc: true
++---
++
++```go-html-template
++{{ with resources.Get "css/main.css" }}
++  {{ if hugo.IsDevelopment }}
++    <link rel="stylesheet" href="{{ .RelPermalink }}">
++  {{ else }}
++    {{ with . | postCSS | minify | fingerprint | resources.PostProcess }}
++      <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
++    {{ end }}
++  {{ end }}
++{{ end }}
++```
++
++Marking a resource with `resources.PostProcess` postpones transformations until the build has finished.
++
++Call `resources.PostProcess` when one or more of the steps in the transformation chain depends on the result of the build.
++
++A prime use case for this is purging unused CSS rules using the [PurgeCSS] plugin for the PostCSS Node.js package.
++
++## CSS Purging
++
++{{% note %}}
++There are several ways to set up CSS purging with PostCSS in Hugo. If you have a simple project, you should consider going the simpler route and drop the use of `resources.PostProcess` and just extract keywords from the templates. See the [Tailwind documentation](https://tailwindcss.com/docs/controlling-file-size/#app) for examples.
++{{% /note %}}
++
++Step 1
++: Install [Node.js].
++
++Step 2
++: Install the required Node.js packages in the root of your project:
++
++```sh
++npm i -D postcss postcss-cli autoprefixer @fullhuman/postcss-purgecss
++```
++
++Step 3
++: Create a PostCSS configuration file in the root of your project. You must name this file `postcss.config.js` or another [supported file name]. For example:
++
++```js
++const autoprefixer = require('autoprefixer');
++const purgecss = require('@fullhuman/postcss-purgecss')({
++  content: ['./hugo_stats.json'],
++  defaultExtractor: content => {
++    const els = JSON.parse(content).htmlElements;
++    return [
++      ...(els.tags || []),
++      ...(els.classes || []),
++      ...(els.ids || []),
++    ];
++  },
++  // https://purgecss.com/safelisting.html
++  safelist: []
++});
++
++module.exports = {
++  plugins: [
++    autoprefixer,
++    process.env.HUGO_ENVIRONMENT !== 'development' ? purgecss : null
++  ]
++};
++```
++
++{{% note %}}
++{{% include "functions/resources/_common/postcss-windows-warning.md" %}}
++{{% /note %}}
++
++Step 4
++: Enable creation of the `hugo_stats.json` file when building the site. If you are only using this for the production build, consider placing it below [config/production].
++
++{{< code-toggle file=hugo >}}
++[build.buildStats]
++enable = true
++{{< /code-toggle >}}
++
++See the [configure build] documentation for details and options.
++
++Step 5
++: Place your CSS file within the `assets/css` directory.
++
++Step 6
++: If the current environment is not `development`, process the resource with PostCSS:
++
++```go-html-template
++{{ with resources.Get "css/main.css" }}
++  {{ if hugo.IsDevelopment }}
++    <link rel="stylesheet" href="{{ .RelPermalink }}">
++  {{ else }}
++    {{ with . | postCSS | minify | fingerprint | resources.PostProcess }}
++      <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
++    {{ end }}
++  {{ end }}
++{{ end }}
++```
++
++## Environment variables
++
++Hugo passes these environment variables to PostCSS, which allows you to do something like:
++
++```js
++process.env.HUGO_ENVIRONMENT === 'production' ? [autoprefixer] : []
++```
++
++PWD
++: The absolute path to the project working directory.
++
++HUGO_ENVIRONMENT
++: The current Hugo environment, set with the `--environment` command line flag.
++Default is `production` for `hugo` and `development` for `hugo server`.
++
++HUGO_PUBLISHDIR
++: The absolute path to the publish directory (the `public` directory). Note that the value will always point to a directory on disk even when running `hugo server` in memory mode. If you write to this folder from PostCSS when running the server, you could run the server with one of these flags:
++
++```sh
++hugo server --renderToDisk
++hugo server --renderStaticToDisk
++```
++
++Also, Hugo will add environment variables for all files mounted below `assets/_jsconfig`. A default mount will be set up with files in the project root matching this regexp: `(babel|postcss|tailwind)\.config\.js`.
++
++These will get environment variables named on the form `HUGO_FILE_:filename:` where `:filename:` is all upper case with periods replaced with underscore. This allows you to do something like:
++
++```js
++let tailwindConfig = process.env.HUGO_FILE_TAILWIND_CONFIG_JS || './tailwind.config.js';
++```
++
++## Limitations
++
++Do not use `resources.PostProcess` when running Hugo's built-in development server. The examples above specifically prevent this by verifying that the current environment is not "development".
++
++The `resources.PostProcess` function only works within templates that produce HTML files.
++
++You cannot manipulate the values returned from the resource’s methods. For example, the `strings.ToUpper` function in this example will not work as expected:
++
++```go-html-template
++{{ $css := resources.Get "css/main.css" }}
++{{ $css = $css | resources.PostCSS | minify | fingerprint | resources.PostProcess }}
++{{ $css.RelPermalink | strings.ToUpper }}
++```
++
++[node.js]: https://nodejs.org/en/download
++[supported file name]: https://github.com/postcss/postcss-load-config#usage
++[config/production]: /getting-started/configuration/#configuration-directory
++[configure build]: /getting-started/configuration/#configure-build
++[purgecss]: https://github.com/FullHuman/purgecss#readme
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..872bf996b8a49d392c371567b5a68b03c03255fc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,224 @@@
++---
++title: resources.ToCSS
++description: Transpiles Sass to CSS.
++categories: []
++keywords: []
++action:
++  aliases: [toCSS]
++  related:
++    - functions/resources/Fingerprint
++    - functions/resources/Minify
++    - functions/resources/PostCSS
++    - functions/resources/PostProcess
++  returnType: resource.Resource
++  signatures: ['resources.ToCSS [OPTIONS] RESOURCE']
++toc: true
++---
++
++```go-html-template
++{{ with resources.Get "sass/main.scss" }}
++  {{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }}
++  {{ with . | toCSS $opts }}
++    {{ if hugo.IsDevelopment }}
++      <link rel="stylesheet" href="{{ .RelPermalink }}">
++    {{ else }}
++      {{ with . | minify | fingerprint }}
++        <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
++      {{ end }}
++    {{ end }}
++  {{ end }}
++{{ end }}
++```
++
++Transpile Sass to CSS using the LibSass transpiler included in Hugo's extended edition, 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.
++
++[scss]: https://sass-lang.com/documentation/syntax#scss
++[indented]: https://sass-lang.com/documentation/syntax#the-indented-syntax
++
++## Options
++
++transpiler
++: (`string`) The transpiler to use, either `libsass` (default) or `dartsass`. Hugo's extended edition includes 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";
++
++// Dart Sass
++@use "hugo:vars" as v;
++```
++
++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`.
++
++precision
++: (`int`) Precision of floating point math. Not applicable to Dart Sass.
++
++enableSourceMap
++: (`bool`) If `true`, generates a source map.
++
++sourceMapIncludeSources
++: (`bool`) If `true`, embeds sources in the generated source map. Not applicable to LibSass.
++
++includePaths
++: (`slice`) A slice of paths, relative to the project root, that the transpiler will use when resolving `@use` and `@import` statements.
++
++```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">
++{{ end }}
++```
++
++## Dart Sass
++
++The extended version of Hugo includes [LibSass] to transpile Sass to CSS. In 2020, the Sass team deprecated LibSass in favor of [Dart Sass].
++
++Use the latest features of the Sass language by installing Dart Sass in your development and production environments.
++
++### Installation overview
++
++Dart Sass is compatible with Hugo v0.114.0 and later.
++
++If you have been using Embedded Dart Sass[^1] with Hugo v0.113.0 and earlier, uninstall Embedded Dart Sass, then install Dart Sass. If you have installed both, Hugo will use Dart Sass.
++
++If you install Hugo as a [Snap package] there is no need to install Dart Sass. The Hugo Snap package includes Dart Sass.
++
++[^1]: In 2023, the Sass team deprecated Embedded Dart Sass in favor of Dart Sass.
++
++### Installing in a development environment
++
++When you install Dart Sass somewhere in your PATH, Hugo will find it.
++
++OS|Package manager|Site|Installation
++:--|:--|:--|:--
++Linux|Homebrew|[brew.sh]|`brew install sass/sass/sass`
++Linux|Snap|[snapcraft.io]|`sudo snap install dart-sass`
++macOS|Homebrew|[brew.sh]|`brew install sass/sass/sass`
++Windows|Chocolatey|[chocolatey.org]|`choco install sass`
++Windows|Scoop|[scoop.sh]|`scoop install sass`
++
++You may also install [prebuilt binaries] for Linux, macOS, and Windows.
++
++Run `hugo env` to list the active transpilers.
++
++### Installing in a production environment
++
++For [CI/CD] 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.
++
++[^2]: You do not have to do this if (a) you have not modified the assets cache location, and (b) you have not set `useResourceCacheWhen` to `never` in your [site configuration], and (c) you add and commit your resources directory to your repository.
++
++#### GitHub Pages
++
++To install Dart Sass for your builds on GitHub Pages, add this step to the GitHub Pages workflow file:
++
++```yaml
++- name: Install Dart Sass
++  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:
++
++```yaml
++variables:
++  HUGO_VERSION: 0.115.1
++  DART_SASS_VERSION: 1.63.6
++  GIT_DEPTH: 0
++  GIT_STRATEGY: clone
++  GIT_SUBMODULE_STRATEGY: recursive
++  TZ: America/Los_Angeles
++image:
++  name: golang:1.20-buster
++pages:
++  script:
++    # Install Dart Sass
++    - curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
++    - tar -xf dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
++    - cp -r dart-sass/* /usr/local/bin
++    - rm -rf dart-sass*
++    # Install Hugo
++    - curl -LJO https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
++    - apt install -y ./hugo_extended_${HUGO_VERSION}_linux-amd64.deb
++    - rm hugo_extended_${HUGO_VERSION}_linux-amd64.deb
++    # Build
++    - hugo --gc --minify
++  artifacts:
++    paths:
++      - public
++  rules:
++    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
++```
++
++#### Netlify
++
++To install Dart Sass for your builds on Netlify, the `netlify.toml` file should look something like this:
++
++```toml
++[build.environment]
++HUGO_VERSION = "0.115.1"
++DART_SASS_VERSION = "1.63.6"
++TZ = "America/Los_Angeles"
++
++[build]
++publish = "public"
++command = """\
++  curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz && \
++  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 && \
++  hugo --gc --minify \
++  """
++```
++
++### Example
++
++To transpile with Dart Sass, set `transpiler` to `dartsass` in the options map passed to `resources.ToCSS`. For example:
++
++```go-html-template
++{{ with resources.Get "sass/main.scss" }}
++  {{ $opts := dict "transpiler" "dartsass" "targetPath" "css/style.css" }}
++  {{ with . | toCSS $opts }}
++    {{ if hugo.IsDevelopment }}
++      <link rel="stylesheet" href="{{ .RelPermalink }}">
++    {{ else }}
++      {{ with . | minify | fingerprint }}
++        <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
++      {{ end }}
++    {{ 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
++[ci/cd]: https://en.wikipedia.org/wiki/CI/CD
++[dart sass]: https://sass-lang.com/dart-sass
++[libsass]: https://sass-lang.com/libsass
++[prebuilt binaries]: https://github.com/sass/dart-sass/releases/latest
++[scoop.sh]: https://scoop.sh/#/apps?q=sass
++[site configuration]: /getting-started/configuration/#configure-build
++[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
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b57b688b310e550b0c0f6a49260cf3f50dd84d09
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++_build:
++  list: never
++  publishResources: false
++  render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1b72e74db328be97f1e5d19919a277ee9dfe9890
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,8 @@@
++---
++# Do not remove front matter.
++---
++
++If you are a Windows user, and the path to your project contains a space, you must place the PostCSS configuration within the package.json file. See [this example] and issue [#7333].
++
++[this example]: https://github.com/postcss/postcss-load-config#packagejson
++[#7333]: https://github.com/gohugoio/hugo/issues/7333
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..364b9448d4f3357b423613d34ff567300c1a2c06
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Resource functions
++linkTitle: resources
++description: Template functions to work with resources.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to work with resources.
index d5dcdfb660e298b0b71d89fbb8521cf3ff0e850b,0000000000000000000000000000000000000000..08307fb159a28f9f663ef6cb5dd137f39d55f7d2
mode 100644,000000..100644
--- /dev/null
@@@ -1,38 -1,0 +1,33 @@@
- linkTitle: safeCSS
- description: Declares the provided string as a known "safe" CSS string.
- categories: [functions]
 +---
 +title: safe.CSS
- menu:
-   docs:
-     parent: functions
- function:
++description: Declares the given string as safe CSS string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - safe.CSS
-   - safe.HTML
-   - safe.HTMLAttr
-   - safe.JS
-   - safe.JSStr
-   - safe.URL
++action:
 +  aliases: [safeCSS]
++  related:
++    - functions/safe/HTML
++    - functions/safe/HTMLAttr
++    - functions/safe/JS
++    - functions/safe/JSStr
++    - functions/safe/URL
 +  returnType: template.CSS
 +  signatures: [safe.CSS INPUT]
- * <span class="good">`<p style="{{ .Params.style | safeCSS }}">…</p>` &rarr; `<p style="color: red;">…</p>`</span>
- * <span class="bad">`<p style="{{ .Params.style }}">…</p>` &rarr; `<p style="ZgotmplZ">…</p>`</span>
 +aliases: [/functions/safecss]
 +---
 +
 +In this context, *safe* means CSS content that matches any of the following:
 +
 +1. The CSS3 stylesheet production, such as `p { color: purple }`.
 +2. The CSS3 rule production, such as `a[href=~"https:"].foo#bar`.
 +3. CSS3 declaration productions, such as `color: red; margin: 2px`.
 +4. The CSS3 value production, such as `rgba(0, 0, 255, 127)`.
 +
 +Example: Given `style = "color: red;"` defined in the front matter of your `.md` file:
 +
- "ZgotmplZ" is a special value that indicates that unsafe content reached a CSS or URL context.
++* `<p style="{{ .Params.style | safeCSS }}">…</p>` &rarr; `<p style="color: red;">…</p>`
++* `<p style="{{ .Params.style }}">…</p>` &rarr; `<p style="ZgotmplZ">…</p>`
 +
 +{{% note %}}
++`ZgotmplZ` is a special value that indicates that unsafe content reached a CSS or URL context.
 +{{% /note %}}
index ea3afe8f3ee32a92d44405d9ab43724ef37438e2,0000000000000000000000000000000000000000..ecc4f1346c1518f94cad9c1e91ca4ec920cb79d3
mode 100644,000000..100644
--- /dev/null
@@@ -1,44 -1,0 +1,39 @@@
- linkTitle: safeHTML
- description: Declares a provided string as a "safe" HTML document to avoid escaping by Go templates.
- categories: [functions]
 +---
 +title: safe.HTML
- menu:
-   docs:
-     parent: functions
- function:
++description: Declares the given string as a safeHTML string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - safe.CSS
-   - safe.HTML
-   - safe.HTMLAttr
-   - safe.JS
-   - safe.JSStr
-   - safe.URL
++action:
 +  aliases: [safeHTML]
++  related:
++    - functions/safe/CSS
++    - functions/safe/HTMLAttr
++    - functions/safe/JS
++    - functions/safe/JSStr
++    - functions/safe/URL
 +  returnType: template.HTML
 +  signatures: [safe.HTML INPUT]
- {{< code-toggle file="hugo" >}}
 +aliases: [/functions/safehtml]
 +---
 +
 +It should not be used for HTML from a third-party, or HTML with unclosed tags or comments.
 +
 +Given a site-wide [`hugo.toml`][config] with the following `copyright` value:
 +
++{{< code-toggle file=hugo >}}
 +copyright = "© 2015 Jane Doe.  <a href=\"https://creativecommons.org/licenses/by/4.0/\">Some rights reserved</a>."
 +{{< /code-toggle >}}
 +
 +`{{ .Site.Copyright | safeHTML }}` in a template would then output:
 +
 +```html
 +© 2015 Jane Doe.  <a href="https://creativecommons.org/licenses/by/4.0/">Some rights reserved</a>.
 +```
 +
 +However, without the `safeHTML` function, html/template assumes `.Site.Copyright` to be unsafe and therefore escapes all HTML tags and renders the whole string as plain text:
 +
 +```html
 +<p>© 2015 Jane Doe.  &lt;a href=&#34;https://creativecommons.org/licenses by/4.0/&#34;&gt;Some rights reserved&lt;/a&gt;.</p>
 +```
 +
 +[config]: /getting-started/configuration/
index 7d1b06c472f257c90b14006e2ee09665523f9b42,0000000000000000000000000000000000000000..6e1fd2af76599927ea86d2313574b177f0e81a92
mode 100644,000000..100644
--- /dev/null
@@@ -1,60 -1,0 +1,55 @@@
- linkTitle: safeHTMLAttr
- description: Declares the provided string as a safe HTML attribute.
- categories: [functions]
 +---
 +title: safe.HTMLAttr
- menu:
-   docs:
-     parent: functions
- function:
++description: Declares the given key/value pair as a safe HTML attribute.
++categories: []
 +keywords: []
- relatedFunctions:
-   - safe.CSS
-   - safe.HTML
-   - safe.HTMLAttr
-   - safe.JS
-   - safe.JSStr
-   - safe.URL
++action:
 +  aliases: [safeHTMLAttr]
++  related:
++    - functions/safe/CSS
++    - functions/safe/HTML
++    - functions/safe/JS
++    - functions/safe/JSStr
++    - functions/safe/URL
 +  returnType: template.HTMLAttr
 +  signatures: [safe.HTMLAttr INPUT]
- {{< code-toggle file="hugo" >}}
 +aliases: [/functions/safehtmlattr]
 +---
 +
 +Given a site configuration that contains this menu entry:
 +
- ``` 
++{{< code-toggle file=hugo >}}
 +[[menu.main]]
 +  name = "IRC"
 +  url = "irc://irc.freenode.net/#golang"
 +{{< /code-toggle >}}
 +
 +Attempting to use the `url` value directly in an attribute:
 +
 +```go-html-template
 +{{ range site.Menus.main }}
 +  <a href="{{ .URL }}">{{ .Name }}</a>
 +{{ end }}
++```
 +
 +Will produce:
 +
 +```html
 +<a href="#ZgotmplZ">IRC</a>
 +```
 +
 +`ZgotmplZ` is a special value, inserted by Go's [template/html] package, that indicates that unsafe content reached a CSS or URL context.
 +
 +To indicate that the HTML attribute is safe:
 +
 +```go-html-template
 +{{ range site.Menus.main }}
 +  <a {{ printf "href=%q" .URL | safeHTMLAttr }}>{{ .Name }}</a>
 +{{ end }}
 +```
 +
 +{{% note %}}
 +As demonstrated above, you must pass the HTML attribute name _and_ value through the function. Applying `safeHTMLAttr` to the attribute value has no effect.
 +{{% /note %}}
 +
 +[template/html]: https://pkg.go.dev/html/template
index e679b5f852f27938999996d5e043886536b9dbf9,0000000000000000000000000000000000000000..65279b89be533df49144da6adc4fe76cd3fa1129
mode 100644,000000..100644
--- /dev/null
@@@ -1,31 -1,0 +1,26 @@@
- linkTitle: safeJS
- description: Declares the provided string as a known safe JavaScript string.
- categories: [functions]
 +---
 +title: safe.JS
- menu:
-   docs:
-     parent: functions
- function:
++description: Declares the given string as a safe JavaScript expression.
++categories: []
 +keywords: []
- relatedFunctions:
-   - safe.CSS
-   - safe.HTML
-   - safe.HTMLAttr
-   - safe.JS
-   - safe.JSStr
-   - safe.URL
++action:
 +  aliases: [safeJS]
++  related:
++    - functions/safe/CSS
++    - functions/safe/HTML
++    - functions/safe/HTMLAttr
++    - functions/safe/JSStr
++    - functions/safe/URL
 +  returnType: template.JS
 +  signatures: [safe.JS INPUT]
- * <span class="good">`<script>var form_{{ .Params.hash | safeJS }};…</script>` &rarr; `<script>var form_619c16f;…</script>`</span>
- * <span class="bad">`<script>var form_{{ .Params.hash }};…</script>` &rarr; `<script>var form_"619c16f";…</script>`</span>
 +aliases: [/functions/safejs]
 +---
 +
 +In this context, *safe* means the string encapsulates a known safe EcmaScript5 Expression (e.g., `(x + y * z())`).
 +
 +Template authors are responsible for ensuring that typed expressions do not break the intended precedence and that there is no statement/expression ambiguity as when passing an expression like `{ foo:bar() }\n['foo']()`, which is both a valid expression and a valid program with a very different meaning.
 +
 +Example: Given `hash = "619c16f"` defined in the front matter of your `.md` file:
 +
++* `<script>var form_{{ .Params.hash | safeJS }};…</script>` &rarr; `<script>var form_619c16f;…</script>`
++* `<script>var form_{{ .Params.hash }};…</script>` &rarr; `<script>var form_"619c16f";…</script>`
index 790de3a73883e9ae699d16156051f7c6bf372f48,0000000000000000000000000000000000000000..36d2b36fa8d66133798287f7130b836f1b2b6389
mode 100644,000000..100644
--- /dev/null
@@@ -1,61 -1,0 +1,55 @@@
- linkTitle: safeJSStr
- description: Declares the provided string as a known safe JavaScript string.
- categories: [functions]
 +---
 +title: safe.JSStr
- menu:
-   docs:
-     parent: functions
- function:
++description: Declares the given string as a safe JavaScript string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - safe.CSS
-   - safe.HTML
-   - safe.HTMLAttr
-   - safe.JS
-   - safe.JSStr
-   - safe.URL
++action:
 +  aliases: [safeJSStr]
++  related:
++    - functions/safe/CSS
++    - functions/safe/HTML
++    - functions/safe/HTMLAttr
++    - functions/safe/JS
++    - functions/safe/URL
 +  returnType: template.JSStr
 +  signatures: [safe.JSStr INPUT]
 +aliases: [/functions/safejsstr]
 +---
 +
 +Encapsulates a sequence of characters meant to be embedded between quotes in a JavaScript expression. Use of this type presents a security risk: the encapsulated content should come from a trusted source, as it will be included verbatim in the template output.
 +  
 +Without declaring a variable to be a safe JavaScript string:
 +
 +```go-html-template
 +{{ $title := "Lilo & Stitch" }}
 +<script>
 +  const a = "Title: " + {{ $title }};
 +</script>
 +```
 +
 +Rendered:
 +
 +```html
 +<script>
 +  const a = "Title: " + "Lilo \u0026 Stitch";
 +</script>
 +```
 +
 +To avoid escaping by Go's [html/template] package:
 +
 +```go-html-template
 +{{ $title := "Lilo & Stitch" }}
 +<script>
 +  const a = "Title: " + {{ $title | safeJSStr }};
 +</script>
 +```
 +
 +Rendered:
 +
 +```html
 +<script>
 +  const a = "Title: " + "Lilo & Stitch";
 +</script>
 +```
 +
 +[html/template]: https://pkg.go.dev/html/template
index edc62ff9dbe6e4c54ea84c1d0d02f1e19e2d3fe3,0000000000000000000000000000000000000000..2ae67bd7fd29350ca475ed43580f5b035db31c7a
mode 100644,000000..100644
--- /dev/null
@@@ -1,75 -1,0 +1,70 @@@
- linkTitle: safeURL
- description: Declares the provided string as a safe URL or URL substring.
- categories: [functions]
 +---
 +title: safe.URL
- menu:
-   docs:
-     parent: functions
- function:
++description: Declares the given string as a safe URL or URL substring.
++categories: []
 +keywords: []
- relatedFunctions:
-   - safe.CSS
-   - safe.HTML
-   - safe.HTMLAttr
-   - safe.JS
-   - safe.JSStr
-   - safe.URL
++action:
 +  aliases: [safeURL]
++  related:
++    - functions/safe/CSS
++    - functions/safe/HTML
++    - functions/safe/HTMLAttr
++    - functions/safe/JS
++    - functions/safe/JSStr
 +  returnType: template.URL
 +  signatures: [safe.URL INPUT]
- {{< code-toggle file="hugo" copy=false >}}
 +aliases: [/functions/safeurl]
 +---
 +
 +`safeURL` declares the provided string as a "safe" URL or URL substring (see [RFC 3986]). A URL like `javascript:checkThatFormNotEditedBeforeLeavingPage()` from a trusted source should go in the page, but by default dynamic `javascript:` URLs are filtered out since they are a frequently exploited injection vector.
 +
 +Without `safeURL`, only the URI schemes `http:`, `https:` and `mailto:` are considered safe by Go templates. If any other URI schemes (e.g., `irc:` and `javascript:`) are detected, the whole URL will be replaced with `#ZgotmplZ`. This is to "defang" any potential attack in the URL by rendering it useless.
 +
 +The following examples use a [site `hugo.toml`][configuration] with the following [menu entry][menus]:
 +
- {{< code file="layouts/partials/bad-url-sidebar-menu.html" copy=false >}}
++{{< code-toggle file=hugo >}}
 +[[menu.main]]
 +name = "IRC: #golang at freenode"
 +url = "irc://irc.freenode.net/#golang"
 +{{< /code-toggle >}}
 +
 +The following is an example of a sidebar partial that may be used in conjunction with the preceding front matter example:
 +
- {{< code file="layouts/partials/correct-url-sidebar-menu.html" copy=false >}}
++{{< code file=layouts/partials/bad-url-sidebar-menu.html >}}
 +<!-- This unordered list may be part of a sidebar menu -->
 +<ul>
 +  {{ range .Site.Menus.main }}
 +    <li><a href="{{ .URL }}">{{ .Name }}</a></li>
 +  {{ end }}
 +</ul>
 +{{< /code >}}
 +
 +This partial would produce the following HTML output:
 +
 +```html
 +<!-- This unordered list may be part of a sidebar menu -->
 +<ul>
 +  <li><a href="#ZgotmplZ">IRC: #golang at freenode</a></li>
 +</ul>
 +```
 +
 +The odd output can be remedied by adding ` | safeURL` to our `.URL` page variable:
 +
++{{< code file=layouts/partials/correct-url-sidebar-menu.html >}}
 +<!-- This unordered list may be part of a sidebar menu -->
 +<ul>
 +    <li><a href="{{ .URL | safeURL }}">{{ .Name }}</a></li>
 +</ul>
 +{{< /code >}}
 +
 +With the `.URL` page variable piped through `safeURL`, we get the desired output:
 +
 +```html
 +<ul class="sidebar-menu">
 +  <li><a href="irc://irc.freenode.net/#golang">IRC: #golang at freenode</a></li>
 +</ul>
 +```
 +
 +[configuration]: /getting-started/configuration/
 +[menus]: /content-management/menus/
 +[RFC 3986]: https://tools.ietf.org/html/rfc3986
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f80a2cff45cc877cf6cd2f52e62b98de1a45cf00
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++---
++title: Safe functions
++linkTitle: safe
++description: Template functions to declare a value as safe in the context of Go's html/template package.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to declare a value as safe in the context of Go's [html/template] package.
++
++[html/template]: https://pkg.go.dev/html/template
index 22e2b546b5bb1c186754d007dd02d19a2bec53e7,0000000000000000000000000000000000000000..349f1e9b7145545a29fd0b06b807fb2f57317bbd
mode 100644,000000..100644
--- /dev/null
@@@ -1,31 -1,0 +1,27 @@@
- title: chomp
- linkTitle: chomp
- description: Removes any trailing newline characters.
- categories: [functions]
 +---
- menu:
-   docs:
-     parent: functions
- function:
++title: strings.Chomp
++description: Returns the given string, removing all trailing newline characters and carriage returns.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.Chomp
-   - strings.Trim
-   - strings.TrimLeft
-   - strings.TrimPrefix
-   - strings.TrimRight
-   - strings.TrimSuffix
++action:
 +  aliases: [chomp]
++  related:
++    - functions/strings/Trim
++    - functions/strings/TrimLeft
++    - functions/strings/TrimPrefix
++    - functions/strings/TrimRight
++    - functions/strings/TrimSuffix
 +  returnType: any
 +  signatures: [strings.Chomp STRING]
- If the argument is of type template.HTML, returns template.HTML, else returns a string.
- Useful in a pipeline to remove newlines added by other processing (e.g., [`markdownify`](/functions/transform/markdownify)).
 +aliases: [/functions/chomp]
 +---
 +
- {{ chomp "<p>Blockhead</p>\n" }} → "<p>Blockhead</p>"
++If the argument is of type `template.HTML`, returns `template.HTML`, else returns a `string`.
 +
 +```go-html-template
++{{ chomp | "foo\n" }} → foo
++{{ chomp | "foo\n\n" }} → foo
++
++{{ chomp | "foo\r\n" }} → foo
++{{ chomp | "foo\r\n\r\n" }} → foo
 +```
index 66a90aeea31a562f206c022fec9b48f6e54240aa,0000000000000000000000000000000000000000..0344b298182fcb55b5a4bbc6154ad6e150eedd59
mode 100644,000000..100644
--- /dev/null
@@@ -1,29 -1,0 +1,27 @@@
- description: Reports whether the string contains a substring.
- categories: [functions]
 +---
 +title: strings.Contains
- menu:
-   docs:
-     parent: functions
- function:
++description: Reports whether the given string contains the given substring.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.Contains
-   - strings.ContainsAny
-   - strings.ContainsNonSpace
-   - strings.HasPrefix
-   - strings.HasSuffix
++action:
 +  aliases: []
++  related:
++    - functions/strings/ContainsAny
++    - functions/strings/ContainsNonSpace
++    - functions/strings/HasPrefix
++    - functions/strings/HasSuffix
++    - functions/collections/In
 +  returnType: bool
 +  signatures: [strings.Contains STRING SUBSTRING]
- The check is case sensitive: 
 +aliases: [/functions/strings.contains]
 +---
 +
 +```go-html-template
 +{{ strings.Contains "Hugo" "go" }} → true
 +```
++
++The check is case sensitive:
 +
 +```go-html-template
 +{{ strings.Contains "Hugo" "Go" }} → false
 +```
index 4f324358adb7faea9080969b7bd4b2dfdb49990c,0000000000000000000000000000000000000000..f331d09f789b12585373f77d7c4328160bd008d5
mode 100644,000000..100644
--- /dev/null
@@@ -1,30 -1,0 +1,27 @@@
- description: Reports whether a string contains any character from a given string.
- categories: [functions]
 +---
 +title: strings.ContainsAny
- menu:
-   docs:
-     parent: functions
- function:
++description: Reports whether the given string contains any character within the given set.
++categories: []
 +keywords: []
-   signatures: [strings.ContainsAny STRING CHARACTERS]
- relatedFunctions:
-   - strings.Contains
-   - strings.ContainsAny
-   - strings.ContainsNonSpace
-   - strings.HasPrefix
-   - strings.HasSuffix
++action:
 +  aliases: []
++  related:
++    - functions/strings/Contains
++    - functions/strings/ContainsNonSpace
++    - functions/strings/HasPrefix
++    - functions/strings/HasSuffix
++    - functions/collections/In
 +  returnType: bool
- The check is case sensitive: 
++  signatures: [strings.ContainsAny STRING SET]
 +aliases: [/functions/strings.containsany]
 +---
 +
 +```go-html-template
 +{{ strings.ContainsAny "Hugo" "gm" }} → true
 +```
 +
++The check is case sensitive:
 +
 +```go-html-template
 +{{ strings.ContainsAny "Hugo" "Gm" }} → false
 +```
index d2e6114b38c2ea2d5ffe4b819f3a811ec5bcc2aa,0000000000000000000000000000000000000000..188aa14ba63354c2dc2e65f61aeaf543c5ae5325
mode 100644,000000..100644
--- /dev/null
@@@ -1,36 -1,0 +1,35 @@@
- description: Reports whether a string contains any non-space characters as defined by Unicode’s White Space property.
- categories: [functions]
 +---
 +title: strings.ContainsNonSpace
- menu:
-   docs:
-     parent: functions
- function:
++description: Reports whether the given string contains any non-space characters as defined by Unicode’s White Space property.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.Contains
-   - strings.ContainsAny
-   - strings.ContainsNonSpace
-   - strings.HasPrefix
-   - strings.HasSuffix
++action:
 +  aliases: []
++  related:
++    - functions/strings/Contains
++    - functions/strings/ContainsAny
++    - functions/strings/HasPrefix
++    - functions/strings/HasSuffix
++    - functions/collections/In
 +  returnType: bool
 +  signatures: [strings.ContainsNonSpace STRING]
- {{ strings.ContainsNonSpace "\n" }}     → false
- {{ strings.ContainsNonSpace " " }}      → false
 +aliases: [/functions/strings.containsnonspace]
 +---
 +
++{{< new-in 0.111.0 >}}
++
 +```go-html-template
++{{ strings.ContainsNonSpace "\n" }} → false
++{{ strings.ContainsNonSpace " " }} → false
 +{{ strings.ContainsNonSpace "\n abc" }} → true
 +```
 +
 +Common white space characters include:
 +
 +```text
 +'\t', '\n', '\v', '\f', '\r', ' '
 +```
 +
 +See the [Unicode Character Database] for a complete list.
 +
 +[Unicode Character Database]: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
index 25ea589677356bad27292995336152c499b360f9,0000000000000000000000000000000000000000..43b5baeffc814dde3975cc8076aab2c9d3687a1e
mode 100644,000000..100644
--- /dev/null
@@@ -1,29 -1,0 +1,25 @@@
- description: Returns the number of non-overlapping instances of a substring within a string.
- categories: [functions]
 +---
 +title: strings.Count
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the number of non-overlapping instances of the given substring within the given string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - len
-   - strings.Count
-   - strings.CountRunes
-   - strings.CountWords
-   - strings.RuneCount
++action:
 +  aliases: []
++  related:
++    - functions/go-template/len
++    - functions/strings/CountRunes
++    - functions/strings/CountWords
++    - functions/strings/RuneCount
 +  returnType: int
 +  signatures: [strings.Count SUBSTR STRING]
 +aliases: [/functions/strings.count]
 +---
 +
 +If `SUBSTR` is an empty string, this function returns 1 plus the number of Unicode code points in `STRING`.
 +
 +```go-html-template
 +{{ "aaabaab" | strings.Count "a" }} → 5
 +{{ "aaabaab" | strings.Count "aa" }} → 2
 +{{ "aaabaab" | strings.Count "aaa" }} → 1
 +{{ "aaabaab" | strings.Count "" }} → 8
 +```
index 4a17d04ab9b25062c60d1e323b814e84f49b0612,0000000000000000000000000000000000000000..10788e1746fc90db80ecc5bd1cf78b4017c3dc54
mode 100644,000000..100644
--- /dev/null
@@@ -1,29 -1,0 +1,24 @@@
- linkTitle: countrunes
- description: Returns the number of runes in a string excluding whitespace.
- categories: [functions]
 +---
 +title: strings.CountRunes
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the number of runes in the given string excluding whitespace.
++categories: []
 +keywords: []
- relatedFunctions:
-   - len
-   - strings.Count
-   - strings.CountRunes
-   - strings.CountWords
-   - strings.RuneCount
++action:
 +  aliases: [countrunes]
++  related:
++    - functions/go-template/len
++    - functions/strings/Count
++    - functions/strings/CountWords
++    - functions/strings/RuneCount
 +  returnType: int
 +  signatures: [strings.CountRunes INPUT]
 +aliases: [/functions/countrunes]
 +---
 +
 +In contrast with the [`strings.RuneCount`] function, which counts every rune in a string, `strings.CountRunes` excludes whitespace.
 +
 +```go-html-template
 +{{ "Hello, 世界" | strings.CountRunes }} → 8
 +```
 +
 +[`strings.RuneCount`]: /functions/strings/runecount
index e6915e6cd47fc280415e4b62212ad5229f064d99,0000000000000000000000000000000000000000..3e4ec0465885e258f289bc7d2d5ae53cd389ea48
mode 100644,000000..100644
--- /dev/null
@@@ -1,31 -1,0 +1,20 @@@
- linkTitle: countwords
- description: Counts the number of words in a string.
- categories: [functions]
 +---
 +title: strings.CountWords
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the number of words in the given string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - len
-   - strings.Count
-   - strings.CountRunes
-   - strings.CountWords
-   - strings.RuneCount
++action:
 +  aliases: [countwords]
++  related:
++    - functions/go-template/len
++    - functions/strings/Count
++    - functions/strings/CountRunes
++    - functions/strings/RuneCount
 +  returnType: int
 +  signatures: [strings.CountWords INPUT]
- The template function works similar to the [.WordCount page variable][pagevars].
 +aliases: [/functions/countwords]
 +---
 +
- {{ "Hugo is a static site generator." | countwords }}
- <!-- outputs a content length of 6 words.  -->
 +```go-html-template
- [pagevars]: /variables/page/
++{{ "Hugo is a static site generator." | countwords }} → 6
 +```
index 5a0410fdb7d0d850f6fd4ba3b06c8dcae3014f2c,0000000000000000000000000000000000000000..029cb323e1a03bbe7b6ebe0cfce28d90c31f218d
mode 100644,000000..100644
--- /dev/null
@@@ -1,95 -1,0 +1,90 @@@
- linkTitle: findRESubmatch
 +---
 +title: strings.FindRESubmatch
- categories: [functions]
 +description: Returns a slice of all successive matches of the regular expression. Each element is a slice of strings holding the text of the leftmost match of the regular expression and the matches, if any, of its subexpressions.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.FindRE
-   - strings.FindRESubmatch
-   - strings.Replace
-   - strings.ReplaceRE
++action:
 +  aliases: [findRESubmatch]
++  related:
++    - functions/strings/FindRE
++    - functions/strings/Replace
++    - functions/strings/ReplaceRE
 +  returnType: '[]string'
 +  signatures: ['strings.FindRESubmatch PATTERN INPUT [LIMIT]']
- {{% readfile file="/functions/_common/regular-expressions.md" %}}
 +aliases: [/functions/findresubmatch]
 +---
 +
 +By default, `findRESubmatch` finds all matches. You can limit the number of matches with an optional LIMIT argument. A return value of nil indicates no match.
 +
++{{% include "functions/_common/regular-expressions.md" %}}
 +
 +## Demonstrative examples
 +
 +```go-html-template
 +{{ findRESubmatch `a(x*)b` "-ab-" }} → [["ab" ""]]
 +{{ findRESubmatch `a(x*)b` "-axxb-" }} → [["axxb" "xx"]]
 +{{ findRESubmatch `a(x*)b` "-ab-axb-" }} → [["ab" ""] ["axb" "x"]]
 +{{ findRESubmatch `a(x*)b` "-axxb-ab-" }} → [["axxb" "xx"] ["ab" ""]]
 +{{ findRESubmatch `a(x*)b` "-axxb-ab-" 1 }} → [["axxb" "xx"]]
 +```
 +
 +## Practical example
 +
 +This markdown:
 +
 +```text
 +- [Example](https://example.org)
 +- [Hugo](https://gohugo.io)
 +```
 +
 +Produces this HTML:
 +
 +```html
 +<ul>
 +  <li><a href="https://example.org">Example</a></li>
 +  <li><a href="https://gohugo.io">Hugo</a></li>
 +</ul>
 +```
 +
 +To match the anchor elements, capturing the link destination and text:
 +
 +```go-html-template
 +{{ $regex := `<a\s*href="(.+?)">(.+?)</a>` }}
 +{{ $matches := findRESubmatch $regex .Content }}
 +```
 +
 +Viewed as JSON, the data structure of `$matches` in the code above is:
 +
 +```json
 +[
 +  [
 +    "<a href=\"https://example.org\"></a>Example</a>",
 +    "https://example.org",
 +    "Example"
 +  ],
 +  [
 +    "<a href=\"https://gohugo.io\">Hugo</a>",
 +    "https://gohugo.io",
 +    "Hugo"
 +  ]
 +]
 +```
 +
 +To render the `href` attributes:
 +
 +```go-html-template
 +{{ range $matches }}
 +  {{ index . 1 }}
 +{{ end }}
 +```
 +
 +Result:
 +
 +```text
 +https://example.org
 +https://gohugo.io
 +```
 +
 +{{% note %}}
 +You can write and test your regular expression using [regex101.com](https://regex101.com/). Be sure to select the Go flavor before you begin.
 +{{% /note %}}
index 4a7811f3d88936f008b60a64a15a3ddf84fa5ea2,0000000000000000000000000000000000000000..d26bae4a36c644f0a3b7bd24e89ce4cc5527e897
mode 100644,000000..100644
--- /dev/null
@@@ -1,41 -1,0 +1,36 @@@
- linkTitle: findRE
 +---
 +title: strings.FindRE
- categories: [functions]
 +description: Returns a slice of strings that match the regular expression.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.FindRE
-   - strings.FindRESubmatch
-   - strings.Replace
-   - strings.ReplaceRE
++action:
 +  aliases: [findRE]
++  related:
++    - functions/strings/FindRESubmatch
++    - functions/strings/Replace
++    - functions/strings/ReplaceRE
 +  returnType: string
 +  signatures: ['strings.FindRE PATTERN INPUT [LIMIT]']
- {{% readfile file="/functions/_common/regular-expressions.md" %}}
 +aliases: [/functions/findre]
 +---
 +By default, `findRE` finds all matches. You can limit the number of matches with an optional LIMIT argument.
 +
++{{% include "functions/_common/regular-expressions.md" %}}
 +
 +This example returns a slice of all second level headings (`h2` elements) within the rendered `.Content`:
 +
 +```go-html-template
 +{{ findRE `(?s)<h2.*?>.*?</h2>` .Content }}
 +```
 +
 +The `s` flag causes `.` to match `\n` as well, allowing us to find an `h2` element that contains newlines.
 +
 +To limit the number of matches to one:
 +
 +```go-html-template
 +{{ findRE `(?s)<h2.*?>.*?</h2>` .Content 1 }}
 +```
 +
 +{{% note %}}
 +You can write and test your regular expression using [regex101.com](https://regex101.com/). Be sure to select the Go flavor before you begin.
 +{{% /note %}}
index 320f01edaf67ef96d15f0406375c6f5ee4eb671b,0000000000000000000000000000000000000000..8826b4f18515689e08601061472b4f3715229dfb
mode 100644,000000..100644
--- /dev/null
@@@ -1,23 -1,0 +1,19 @@@
- description: Capitalizes the first character of a given string.
- categories: [functions]
 +---
 +title: strings.FirstUpper
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, capitalizing the first character.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.FirstUpper
-   - strings.Title
-   - strings.ToLower
-   - strings.ToUpper
++action:
 +  aliases: []
++  related:
++    - functions/strings/Title
++    - functions/strings/ToLower
++    - functions/strings/ToUpper
 +  returnType: string
 +  signatures: [strings.FirstUpper STRING]
- {{ strings.FirstUpper "foo" }} → "Foo"
 +aliases: [/functions/strings.firstupper]
 +---
 +
 +```go-html-template
++{{ strings.FirstUpper "foo" }} → Foo
 +```
index 88a79a935b53075e019375df243fd8bf13500372,0000000000000000000000000000000000000000..455de05861c2d7db8cb2c28de4096101456f1bc1
mode 100644,000000..100644
--- /dev/null
@@@ -1,24 -1,0 +1,21 @@@
- description: Reports whether a string begins with prefix.
- categories: [functions]
 +---
 +title: strings.HasPrefix
- menu:
-   docs:
-     parent: functions
- function:
++description: Reports whether the given string begins with the given prefix.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.Contains
-   - strings.ContainsAny
-   - strings.ContainsNonSpace
-   - strings.HasPrefix
-   - strings.HasSuffix
++action:
 +  aliases: [hasPrefix]
++  related:
++    - functions/strings/Contains
++    - functions/strings/ContainsAny
++    - functions/strings/ContainsNonSpace
++    - functions/strings/HasSuffix
++    - functions/collections/In
 +  returnType: bool
 +  signatures: [strings.HasPrefix STRING PREFIX]
 +aliases: [/functions/hasprefix,/functions/strings.hasprefix]
 +---
 +
 +```go-html-template
 +{{ hasPrefix "Hugo" "Hu" }} → true
 +```
index d11f3e8cf95504090356399877dd7a7f4c8f60ca,0000000000000000000000000000000000000000..e7f253ce92800b7d9d83959a30b02b931ffc1a23
mode 100644,000000..100644
--- /dev/null
@@@ -1,24 -1,0 +1,21 @@@
- description: Reports whether a string ends with suffix.
- categories: [functions]
 +---
 +title: strings.HasSuffix
- menu:
-   docs:
-     parent: functions
- function:
++description: Reports whether the given string begins with the given suffix.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.Contains
-   - strings.ContainsAny
-   - strings.ContainsNonSpace
-   - strings.HasPrefix
-   - strings.HasSuffix
++action:
 +  aliases: [hasSuffix]
++  related:
++    - functions/strings/Contains
++    - functions/strings/ContainsAny
++    - functions/strings/ContainsNonSpace
++    - functions/strings/HasPrefix
++    - functions/collections/In
 +  returnType: bool
 +  signatures: [strings.HasSuffix STRING SUFFIX]
 +aliases: [/functions/hassuffix,/functions/strings/hassuffix]
 +---
 +
 +```go-html-template
 +{{ hasSuffix "Hugo" "go" }} → true
 +```
index 718f2498496dd52f849ec91be69804f59a1b409c,0000000000000000000000000000000000000000..530b0d14b3bfc953792e72a797f27d51262de473
mode 100644,000000..100644
--- /dev/null
@@@ -1,20 -1,0 +1,16 @@@
- categories: [functions]
 +---
 +title: strings.Repeat
 +description: Returns a new string consisting of zero or more copies of another string.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions: []
++action:
 +  aliases: []
++  related: []
 +  returnType: string
 +  signatures: [strings.Repeat COUNT INPUT]
- {{ strings.Repeat 3 "yo" }} → "yoyoyo"
- {{ "yo" | strings.Repeat 3 }} → "yoyoyo"
 +aliases: [/functions/strings.repeat]
 +---
 +
 +```go-html-template
++{{ strings.Repeat 3 "yo" }} → yoyoyo
 +```
index 8d5e548594a5c9f3b38caf73c4512014bc93fd95,0000000000000000000000000000000000000000..9add6e12b354e98ed27a011849cc7b9c05c574fb
mode 100644,000000..100644
--- /dev/null
@@@ -1,30 -1,0 +1,26 @@@
- linkTitle: replace
- description: Replaces all occurrences of the search string with the replacement string.
- categories: [functions]
 +---
 +title: strings.Replace
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns a copy of INPUT, replacing all occurrences of OLD with NEW.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.FindRE
-   - strings.FindRESubmatch
-   - strings.Replace
-   - strings.ReplaceRE
++action:
 +  aliases: [replace]
++  related:
++    - functions/strings/FindRE
++    - functions/strings/FindRESubmatch
++    - functions/strings/ReplaceRE
 +  returnType: string
 +  signatures: ['strings.Replace INPUT OLD NEW [LIMIT]']
- Replace returns a copy of `INPUT` with all occurrences of `OLD` replaced with `NEW`.
- The number of replacements can be limited with an optional `LIMIT` argument.
 +aliases: [/functions/replace]
 +---
 +
- {{ replace "Batman and Robin" "Robin" "Catwoman" }}
- → "Batman and Catwoman"
++```go-html-template
++{{ $s := "Batman and Robin" }}
++{{ replace $s "Robin" "Catwoman" }} → Batman and Catwoman
 +```
- {{ replace "aabbaabb" "a" "z" 2 }} → "zzbbaabb"
 +
++Limit the number of replacements using the `LIMIT` argument:
++
++```go-html-template
++{{ replace "aabbaabb" "a" "z" 2 }} → zzbbaabb
 +```
index 247595877a613b881b5e84efd7ca4898a22b171d,0000000000000000000000000000000000000000..1c32c34fb7303abcac52fa59cd9827e53656e661
mode 100644,000000..100644
--- /dev/null
@@@ -1,51 -1,0 +1,43 @@@
- linkTitle: replaceRE
- description: Returns a string, replacing all occurrences of a regular expression with a replacement pattern.
- categories: [functions]
 +---
 +title: strings.ReplaceRE
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns a copy of INPUT, replacing all occurrences of a regular expression with a replacement pattern.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.FindRE
-   - strings.FindRESubmatch
-   - strings.Replace
-   - strings.ReplaceRE
++action:
 +  aliases: [replaceRE]
++  related:
++    - functions/strings/FindRE
++    - functions/strings/FindRESubmatch
++    - functions/strings/Replace
 +  returnType: string
 +  signatures: ['strings.ReplaceRE PATTERN REPLACEMENT INPUT [LIMIT]']
- By default, `replaceRE` replaces all matches. You can limit the number of matches with an optional LIMIT argument.
 +aliases: [/functions/replacere]
 +---
- {{% readfile file="/functions/_common/regular-expressions.md" %}}
- This example replaces two or more consecutive hyphens with a single hyphen:
 +
- To limit the number of replacements to one:
++{{% include "functions/_common/regular-expressions.md" %}}
 +
 +```go-html-template
 +{{ $s := "a-b--c---d" }}
 +{{ replaceRE `(-{2,})` "-" $s }} → a-b-c-d
 +```
 +
- You can use `$1`, `$2`, etc. within the replacement string to insert the groups captured within the regular expression:
++Limit the number of replacements using the LIMIT argument:
 +
 +```go-html-template
 +{{ $s := "a-b--c---d" }}
 +{{ replaceRE `(-{2,})` "-" $s 1 }} → a-b-c---d
 +```
 +
++Use `$1`, `$2`, etc. within the replacement string to insert the content of each capturing group within the regular expression:
 +
 +```go-html-template
 +{{ $s := "http://gohugo.io/docs" }}
 +{{ replaceRE "^https?://([^/]+).*" "$1" $s }} → gohugo.io
 +```
 +
 +{{% note %}}
 +You can write and test your regular expression using [regex101.com](https://regex101.com/). Be sure to select the Go flavor before you begin.
 +{{% /note %}}
 +
 +[RE2]: https://github.com/google/re2/wiki/Syntax
 +[string literal]: https://go.dev/ref/spec#String_literals
index a4d5a8dbec49ad712918ad0646f8e8da9b4eff3b,0000000000000000000000000000000000000000..46fedf01f41dfc6f42098c9375f80632801f3da4
mode 100644,000000..100644
--- /dev/null
@@@ -1,28 -1,0 +1,24 @@@
- description: Returns the number of runes in a string.
- categories: [functions]
 +---
 +title: strings.RuneCount
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the number of runes in the given string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - len
-   - strings.Count
-   - strings.CountRunes
-   - strings.CountWords
-   - strings.RuneCount
++action:
 +  aliases: []
++  related:
++    - functions/go-template/len
++    - functions/strings/Count
++    - functions/strings/CountRunes
++    - functions/strings/CountWords
 +  returnType: int
 +  signatures: [strings.RuneCount INPUT]
 +aliases: [/functions/strings.runecount]
 +---
 +
 +In contrast with the [`strings.CountRunes`] function, which excludes whitespace, `strings.RuneCount` counts every rune in a string.
 +
 +```go-html-template
 +{{ "Hello, 世界" | strings.RuneCount }} → 9
 +```
 +
 +[`strings.CountRunes`]: /functions/strings/countrunes
index 8d26d76e473121f43ff66837c10576936e70399c,0000000000000000000000000000000000000000..2f33f8f6561c1bb27a6d43043891ad2133edf1a0
mode 100644,000000..100644
--- /dev/null
@@@ -1,24 -1,0 +1,20 @@@
- linkTitle: slicestr
 +---
 +title: strings.SliceString
- categories: [functions]
 +description: Creates a slice of a half-open range, including start and end indices.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions: []
++action:
 +  aliases: [slicestr]
++  related: []
 +  returnType: string
 +  signatures: ['strings.SliceString STRING START [END]']
- For example, 1 and 4 creates a slice including elements 1 through 3.
 +aliases: [/functions/slicestr]
 +---
 +
- {{ slicestr "BatMan" 3 }}` → "Man"
- {{ slicestr "BatMan" 0 3 }}` → "Bat"
++For example, 1 and 4 creates a slice including elements 1 through&nbsp;3.
 +The `end` index can be omitted; it defaults to the string's length.
 +
 +```go-html-template
++{{ slicestr "BatMan" 3 }}` → Man
++{{ slicestr "BatMan" 0 3 }}` → Bat
 +```
index 7d15704b2b03448da49b7693655ed86166b5754d,0000000000000000000000000000000000000000..a9973ea63b23abf88371b9b7803c83af5230173e
mode 100644,000000..100644
--- /dev/null
@@@ -1,30 -1,0 +1,26 @@@
- linkTitle: split
- description: Returns a slice of strings by splitting STRING by DELIM.
- categories: [functions]
 +---
 +title: strings.Split
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns a slice of strings by splitting the given string by a delimiter.
++categories: []
 +keywords: []
- relatedFunctions:
-   - collections.Delimit
-   - strings.Split
++action:
 +  aliases: [split]
++  related:
++    - functions/collections/Delimit
 +  returnType: string
 +  signatures: [strings.Split STRING DELIM]
 +aliases: [/functions/split]
 +---
 +
 +Examples:
 +
 +```go-html-template
 +{{ split "tag1,tag2,tag3" "," }} → ["tag1", "tag2", "tag3"]
 +{{ split "abc" "" }} → ["a", "b", "c"]
 +```
 +
- `split` essentially does the opposite of [delimit](/functions/collections/delimit). While `split` creates a slice from a string, `delimit` creates a string from a slice.
 +{{% note %}}
++The `strings.Split` function essentially does the opposite of the [`collections.Delimit`] function. While `split` creates a slice from a string, `delimit` creates a string from a slice.
++
++[`collections.Delimit`]: /functions/collections/delimit
 +{{% /note %}}
index 9dafa0737e98e3ff59c6ab3ce3df4e198af798a8,0000000000000000000000000000000000000000..6c1852f5800d9c484b1e2e0da4334d2f0cbf4da1
mode 100644,000000..100644
--- /dev/null
@@@ -1,42 -1,0 +1,38 @@@
- linkTitle: substr
 +---
 +title: strings.Substr
- categories: [functions]
 +description: Extracts parts of a string from a specified character's position and returns the specified number of characters.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions: []
++action:
 +  aliases: [substr]
++  related: []
 +  returnType: string
 +  signatures: ['strings.Substr STRING START [LENGTH]']
- {{ substr "abcdef" 0 }} → "abcdef"
- {{ substr "abcdef" 1 }} → "bcdef"
 +aliases: [/functions/substr]
 +---
 +
 +It normally takes two argument: `start` and `length`. It can also take one argument: `start`, i.e. `length` is omitted, in which case the substring starting from start until the end of the string will be returned.
 +
 +To extract characters from the end of the string, use a negative start number.
 +
 +If `length` is given and is negative, that number of characters will be omitted from the end of string.
 +
 +```go-html-template
- {{ substr "abcdef" 0 1 }} → "a"
- {{ substr "abcdef" 1 1 }} → "b"
++{{ substr "abcdef" 0 }} → abcdef
++{{ substr "abcdef" 1 }} → bcdef
 +
- {{ substr "abcdef" 0 -1 }} → "abcde"
- {{ substr "abcdef" 1 -1 }} → "bcde"
++{{ substr "abcdef" 0 1 }} → a
++{{ substr "abcdef" 1 1 }} → b
 +
- {{ substr "abcdef" -1 }} → "f"
- {{ substr "abcdef" -2 }} → "ef"
++{{ substr "abcdef" 0 -1 }} → abcde
++{{ substr "abcdef" 1 -1 }} → bcde
 +
- {{ substr "abcdef" -1 1 }} → "f"
- {{ substr "abcdef" -2 1 }} → "e"
++{{ substr "abcdef" -1 }} → f
++{{ substr "abcdef" -2 }} → ef
 +
- {{ substr "abcdef" -3 -1 }} → "de"
- {{ substr "abcdef" -3 -2 }} → "d"
++{{ substr "abcdef" -1 1 }} → f
++{{ substr "abcdef" -2 1 }} → e
 +
++{{ substr "abcdef" -3 -1 }} → de
++{{ substr "abcdef" -3 -2 }} → d
 +```
index 1e20d1f596f8546e573cab8ca37dd369954f2ee9,0000000000000000000000000000000000000000..b7f1f9e5c7638dc08378ee978cd2f6c252a26f89
mode 100644,000000..100644
--- /dev/null
@@@ -1,30 -1,0 +1,32 @@@
- linkTitle: title
- description: Converts the provided string to title case.
- categories: [functions]
 +---
 +title: strings.Title
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, converting it to title case.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.FirstUpper
-   - strings.Title
-   - strings.ToLower
-   - strings.ToUpper
++action:
 +  aliases: [title]
++  related:
++    - functions/strings/FirstUpper
++    - functions/strings/ToLower
++    - functions/strings/ToUpper
 +  returnType: string
 +  signatures: [strings.Title STRING]
- {{ title "table of contents (TOC)" }} → "Table of Contents (TOC)"
 +aliases: [/functions/title]
 +---
 +
 +```go-html-template
- By default, Hugo adheres to the capitalization rules in the [Associated Press (AP) Stylebook]. Change your [site configuration] if you would prefer to follow the [Chicago Manual of Style], or to use Go's convention of capitalizing every word.
++{{ title "table of contents (TOC)" }} → Table of Contents (TOC)
 +```
 +
- [Associated Press (AP) Stylebook]: https://www.apstylebook.com/
++By default, Hugo follows the capitalization rules published in the [Associated Press Stylebook]. Change your [site configuration] if you would prefer to:
 +
++- Follow the capitalization rules published in the [Chicago Manual of Style]
++- Capitalize the first letter of every word
++- Capitalize the first letter of the first word
++- Disable the effects of the `title` function
++
++The last option is useful if your theme uses the `title` function, and you would prefer to manually capitalize strings as needed.
++
++[Associated Press Stylebook]: https://www.apstylebook.com/
 +[Chicago Manual of Style]: https://www.chicagomanualofstyle.org/home.html
 +[site configuration]: /getting-started/configuration/#configure-title-case
index cb76462ea6537e54f39aca844b3144009601928f,0000000000000000000000000000000000000000..3da047ae4b52289d321a1371af8c5a3b2c9645bd
mode 100644,000000..100644
--- /dev/null
@@@ -1,28 -1,0 +1,19 @@@
- linkTitle: lower
- description: Converts all characters in the provided string to lowercase.
- categories: [functions]
 +---
 +title: strings.ToLower
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, converting all characters to lowercase.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.FirstUpper
-   - strings.Title
-   - strings.ToLower
-   - strings.ToUpper
++action:
 +  aliases: [lower]
++  related:
++    - functions/strings/FirstUpper
++    - functions/strings/Title
++    - functions/strings/ToUpper
 +  returnType: string
 +  signatures: [strings.ToLower INPUT]
- Note that `lower` can be applied in your templates in more than one way:
 +aliases: [/functions/lower]
 +---
 +
- {{ lower "BatMan" }} → "batman"
- {{ "BatMan" | lower }} → "batman"
 +```go-html-template
++{{ lower "BatMan" }} → batman
 +```
index d464916372db575ac6473dcad1983a6fc153f14c,0000000000000000000000000000000000000000..617e1e68a2507f28b346410a5c3c9af62bf00f6a
mode 100644,000000..100644
--- /dev/null
@@@ -1,27 -1,0 +1,19 @@@
- linkTitle: upper
- description: Converts all characters in a string to uppercase
- categories: [functions]
 +---
 +title: strings.ToUpper
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, converting all characters to uppercase.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.FirstUpper
-   - strings.Title
-   - strings.ToLower
-   - strings.ToUpper
++action:
 +  aliases: [upper]
++  related:
++    - functions/strings/FirstUpper
++    - functions/strings/Title
++    - functions/strings/ToLower
 +  returnType: string
 +  signatures: [strings.ToUpper INPUT]
- Note that `upper` can be applied in your templates in more than one way:
 +aliases: [/functions/upper]
 +---
 +
- {{ upper "BatMan" }} → "BATMAN"
- {{ "BatMan" | upper }} → "BATMAN"
 +```go-html-template
++{{ upper "BatMan" }} → BATMAN
 +```
index 9eae9ee4580b274bebfc4ea3b7415ef9aa2c2efb,0000000000000000000000000000000000000000..6dfac024b1e249fbdb5299123882a421f51e9c54
mode 100644,000000..100644
--- /dev/null
@@@ -1,45 -1,0 +1,59 @@@
- linkTitle: trim
- description: Returns a slice of a passed string with all leading and trailing characters from cutset removed.
- categories: [functions]
 +---
 +title: strings.Trim
- menu:
-   docs:
-     parent: functions
- function:
-   aliases: [title]
++description: Returns the given string, removing leading and trailing characters specified in the cutset.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.Chomp
-   - strings.Trim
-   - strings.TrimLeft
-   - strings.TrimPrefix
-   - strings.TrimRight
-   - strings.TrimSuffix
++action:
++  aliases: [trim]
++  related:
++    - functions/strings/Chomp
++    - functions/strings/TrimLeft
++    - functions/strings/TrimPrefix
++    - functions/strings/TrimRight
++    - functions/strings/TrimSuffix
 +  returnType: string
 +  signatures: [strings.Trim INPUT CUTSET]
- {{ trim "++Batman--" "+-" }} → "Batman"
 +aliases: [/functions/trim]
 +---
 +
 +```go-html-template
- `trim` *requires* the second argument, which tells the function specifically what to remove from the first argument. There is no default value for the second argument, so **the following usage will not work**:
++{{ trim "++foo--" "+-" }} → foo
 +```
 +
- {{ trim .Inner }}
++To remove leading and trailing newline characters and carriage returns:
 +
 +```go-html-template
- Instead, the following example tells `trim` to remove extra new lines from the content contained in the [shortcode `.Inner` variable][shortcodevars]:
++{{ trim "\nfoo\n" "\n\r" }} → foo
++{{ trim "\n\nfoo\n\n" "\n\r" }} → foo
++
++{{ trim "\r\nfoo\r\n" "\n\r" }} → foo
++{{ trim "\r\n\r\nfoo\r\n\r\n" "\n\r" }} → foo
 +```
 +
- ```go-html-template
- {{ trim .Inner "\n" }}
++The `strings.Trim` function is commonly used in shortcodes to remove leading and trailing newlines characters and carriage returns from the content within the opening and closing shortcode tags.
 +
- {{% note %}}
- Go templates also provide a simple [method for trimming whitespace](/templates/introduction/#whitespace) from either side of a Go tag by including a hyphen (`-`).
- {{% /note %}}
++For example, with this markdown:
++
++```text
++{{</* my-shortcode */>}}
++Able was I ere I saw Elba.
++{{</* /my-shortcode */>}}
++```
++
++The value of `.Inner` in the shortcode template is:
++
++```text
++\nAble was I ere I saw Elba.\n
 +```
 +
- [shortcodevars]: /variables/shortcodes/
++If authored on a Windows system the value of `.Inner` might, depending on the editor configuration, be:
++
++```text
++\r\nAble was I ere I saw Elba.\r\n
++```
 +
++This construct is common in shortcode templates:
 +
++```go-html-template
++{{ trim .Inner "\n\r" }}
++```
index 3924e492fe00fcc1cc4423a70ad18800a316fe67,0000000000000000000000000000000000000000..07cdf00641944cc770fdcebb3678dee31ad36610
mode 100644,000000..100644
--- /dev/null
@@@ -1,33 -1,0 +1,28 @@@
- description: Returns a slice of a given string with all leading characters contained in the cutset removed.
- categories: [functions]
 +---
 +title: strings.TrimLeft
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, removing leading characters specified in the cutset.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.Chomp
-   - strings.Trim
-   - strings.TrimLeft
-   - strings.TrimPrefix
-   - strings.TrimRight
-   - strings.TrimSuffix
++action:
 +  aliases: []
++  related:
++    - functions/strings/Chomp
++    - functions/strings/Trim
++    - functions/strings/TrimPrefix
++    - functions/strings/TrimRight
++    - functions/strings/TrimSuffix
 +  returnType: string
 +  signatures: [strings.TrimLeft CUTSET STRING]
- Given the string `"abba"`, leading `"a"`'s can be removed a follows:
 +aliases: [/functions/strings.trimleft]
 +---
 +
- {{ strings.TrimLeft "a" "abba" }} → "bba"
 +```go-html-template
- Numbers can be handled as well:
++{{ strings.TrimLeft "a" "abba" }} → bba
 +```
 +
- {{ strings.TrimLeft 12 1221341221 }} → "341221"
++The `strings.TrimLeft` function converts the arguments to strings if possible:
 +
 +```go-html-template
++{{ strings.TrimLeft 21 12345 }} → 345 (string)
++{{ strings.TrimLeft "rt" true }} → ue
 +```
index 37657732d6709f8b7411f935f4d4eed3f291e6bf,0000000000000000000000000000000000000000..917cf06f57234cbf07173fd6783af82c4078d8f9
mode 100644,000000..100644
--- /dev/null
@@@ -1,29 -1,0 +1,23 @@@
- description: Returns a given string s without the provided leading prefix string. If s doesn't start with prefix, s is returned unchanged.
- categories: [functions]
 +---
 +title: strings.TrimPrefix
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, removing the prefix from the beginning of the string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.Chomp
-   - strings.Trim
-   - strings.TrimLeft
-   - strings.TrimPrefix
-   - strings.TrimRight
-   - strings.TrimSuffix
++action:
 +  aliases: []
++  related:
++    - functions/strings/Chomp
++    - functions/strings/Trim
++    - functions/strings/TrimLeft
++    - functions/strings/TrimRight
++    - functions/strings/TrimSuffix
 +  returnType: string
 +  signatures: [strings.TrimPrefix PREFIX STRING]
- Given the string `"aabbaa"`, the specified prefix is only removed if `"aabbaa"` starts with it:
 +aliases: [/functions/strings.trimprefix]
 +---
 +
- {{ strings.TrimPrefix "a" "aabbaa" }} → "abbaa"
- {{ strings.TrimPrefix "aa" "aabbaa" }} → "bbaa"
- {{ strings.TrimPrefix "aaa" "aabbaa" }} → "aabbaa"
 +```go-html-template
++{{ strings.TrimPrefix "a" "aabbaa" }} → abbaa
++{{ strings.TrimPrefix "aa" "aabbaa" }} → bbaa
++{{ strings.TrimPrefix "aaa" "aabbaa" }} → aabbaa
 +```
index fa538b605fa08c453f994c7883cb6ac395cb8693,0000000000000000000000000000000000000000..b244925ef6de6726b70b2090107bca9940a5978e
mode 100644,000000..100644
--- /dev/null
@@@ -1,33 -1,0 +1,28 @@@
- description: Returns a slice of a given string with all trailing characters contained in the cutset removed.
- categories: [functions]
 +---
 +title: strings.TrimRight
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, removing trailing characters specified in the cutset.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.Chomp
-   - strings.Trim
-   - strings.TrimLeft
-   - strings.TrimPrefix
-   - strings.TrimRight
-   - strings.TrimSuffix
++action:
 +  aliases: []
++  related:
++    - functions/strings/Chomp
++    - functions/strings/Trim
++    - functions/strings/TrimLeft
++    - functions/strings/TrimPrefix
++    - functions/strings/TrimSuffix
 +  returnType: string
 +  signatures: [strings.TrimRight CUTSET STRING]
- Given the string `"abba"`, trailing `"a"`'s can be removed a follows:
 +aliases: [/functions/strings.trimright]
 +---
 +
- {{ strings.TrimRight "a" "abba" }} → "abb"
 +```go-html-template
- Numbers can be handled as well:
++{{ strings.TrimRight "a" "abba" }} → abb
 +```
 +
- {{ strings.TrimRight 12 1221341221 }} → "122134"
++The `strings.TrimRight` function converts the arguments to strings if possible:
 +
 +```go-html-template
++{{ strings.TrimRight 54 12345 }} → 123 (string)
++{{ strings.TrimRight "eu" true }} → tr
 +```
index 6dc9becfc15a70dd6a232fce41dc03dbc1f0e51c,0000000000000000000000000000000000000000..704bbd2d22de8dfd64b1d20447b07aca7f30cdc7
mode 100644,000000..100644
--- /dev/null
@@@ -1,29 -1,0 +1,23 @@@
- description: Returns a given string s without the provided trailing suffix string. If s doesn't end with suffix, s is returned unchanged.
- categories: [functions]
 +---
 +title: strings.TrimSuffix
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, removing the suffix from the end of the string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - strings.Chomp
-   - strings.Trim
-   - strings.TrimLeft
-   - strings.TrimPrefix
-   - strings.TrimRight
-   - strings.TrimSuffix
++action:
 +  aliases: []
++  related:
++    - functions/strings/Chomp
++    - functions/strings/Trim
++    - functions/strings/TrimLeft
++    - functions/strings/TrimPrefix
++    - functions/strings/TrimRight
 +  returnType: string
 +  signatures: [strings.TrimSuffix SUFFIX STRING]
- Given the string `"aabbaa"`, the specified suffix is only removed if `"aabbaa"` ends with it:
 +aliases: [/functions/strings.trimsuffix]
 +---
 +
- {{ strings.TrimSuffix "a" "aabbaa" }} → "aabba"
- {{ strings.TrimSuffix "aa" "aabbaa" }} → "aabb"
- {{ strings.TrimSuffix "aaa" "aabbaa" }} → "aabbaa"
 +```go-html-template
++{{ strings.TrimSuffix "a" "aabbaa" }} → aabba
++{{ strings.TrimSuffix "aa" "aabbaa" }} → aabb
++{{ strings.TrimSuffix "aaa" "aabbaa" }} → aabbaa
 +```
index 0bd78d8407cb40439ac692695410ad95b7cf5e99,0000000000000000000000000000000000000000..17ae0afc6125a3597047c1fb2db79cefd9fc21b1
mode 100644,000000..100644
--- /dev/null
@@@ -1,26 -1,0 +1,24 @@@
- linkTitle: truncate
- description: Truncates a text to a max length without cutting words or leaving unclosed HTML tags.
- categories: [functions]
 +---
 +title: strings.Truncate
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, truncating it to a maximum length without cutting words or leaving unclosed HTML tags.
++categories: []
 +keywords: []
- relatedFunctions: []
++action:
 +  aliases: [truncate]
++  related: []
 +  returnType: template.HTML
 +  signatures: ['strings.Truncate SIZE [ELLIPSIS] INPUT']
- If you have a raw string that contains HTML tags you want to remain treated as HTML, you will need to convert the string to HTML using the [`safeHTML` template function](/functions/safe/html) before sending the value to truncate. Otherwise, the HTML tags will be escaped when passed through the `truncate` function.
 +aliases: [/functions/truncate]
 +---
 +
 +Since Go templates are HTML-aware, `truncate` will intelligently handle normal strings vs HTML strings:
 +
 +```go-html-template
 +{{ "<em>Keep my HTML</em>" | safeHTML | truncate 10 }} → <em>Keep my …</em>
 +```
 +
 +{{% note %}}
++If you have a raw string that contains HTML tags you want to remain treated as HTML, you will need to convert the string to HTML using the [`safeHTML`]function before sending the value to `truncate`. Otherwise, the HTML tags will be escaped when passed through the `truncate` function.
++
++[`safeHTML`]: /functions/safe/html
 +{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..364522a3abf2c770a290d26108d81b81debdad4e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: String functions
++linkTitle: strings
++description: Template functions to work with strings.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to work with strings.
index d4a8fab76007da41b14af47b53d37dfe25e21c92,0000000000000000000000000000000000000000..e576104884157734b5e463872f15acf5e29da3d8
mode 100644,000000..100644
--- /dev/null
@@@ -1,29 -1,0 +1,27 @@@
- description: Reports whether a template file exists under the given path relative to the `layouts` directory.
- categories: [functions]
 +---
 +title: templates.Exists
- menu:
-   docs:
-     parent: functions
- function:
++description: Reports whether a template file exists under the given path relative to the layouts directory.
++categories: []
 +keywords: []
- namespace: templates
- relatedFunctions: []
++action:
 +  aliases: []
++  related: []
 +  returnType: bool
 +  signatures: [templates.Exists PATH]
- A template file is any file living below the `layouts` directories of either the project or any of its theme components including partials and shortcodes.
 +aliases: [/functions/templates.exists]
 +---
 +
- The function is particularly handy with dynamic path. The following example ensures the build will not break on a `.Type` missing its dedicated `header` partial.
++A template file is any file within the `layouts` directory of either the project or any of its theme components.
 +
++Use the `templates.Exists` function with dynamic template paths:
 +
 +```go-html-template
 +{{ $partialPath := printf "headers/%s.html" .Type }}
 +{{ if templates.Exists ( printf "partials/%s" $partialPath ) }}
 +  {{ partial $partialPath . }}
 +{{ else }}
 +  {{ partial "headers/default.html" . }}
 +{{ end }}
 +```
++
++In the example above, if a "headers" partial does not exist for the given content type, Hugo falls back to a default template.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..89da6c38ffff934a1092cde2b0d57dfcce611166
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++title: Template functions
++linkTitle: templates
++description:
++categories: []
++keywords: []
++menu:
++  docs:
++    identifier: templates-functions
++    parent: functions
++---
++
++Use these functions to query the template system.
index 1244eeb5c1a1a2f3ccef6e185980b4fc58acce19,0000000000000000000000000000000000000000..23e5304a510024425189c24cb3f1cacfa0b0ab92
mode 100644,000000..100644
--- /dev/null
@@@ -1,64 -1,0 +1,61 @@@
- linkTitle: time
- description: Converts a timestamp string into a `time.Time` structure.
- categories: [functions]
 +---
 +title: time.AsTime
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string representation of a date/time value as a time.Time value.
++categories: []
 +keywords: []
- relatedFunctions:
-   - time.AsTime
-   - time.Duration
-   - time.Format
-   - time.Now
-   - time.ParseDuration
++action:
 +  aliases: [time]
++  related:
++    - functions/time/Duration
++    - functions/time/Format
++    - functions/time/Now
++    - functions/time/ParseDuration
 +  returnType: time.Time
 +  signatures: ['time.AsTime INPUT [TIMEZONE]']
- `time` converts a timestamp string with an optional default location into a [`time.Time`](https://godoc.org/time#Time) structure so you can access its fields:
 +aliases: [/functions/time]
++toc: true
 +---
 +
++## Overview
 +
- {{ time "2016-05-28" }} → "2016-05-28T00:00:00Z"
- {{ (time "2016-05-28").YearDay }} → 149
- {{ mul 1000 (time "2016-05-28T10:30:00.00+10:00").Unix }} → 1464395400000, or Unix time in milliseconds
++Hugo provides [functions] and [methods] to format, localize, parse, compare, and manipulate date/time values. Before you can do any of these with string representations of date/time values, you must first convert them to [`time.Time`] values using the `time.AsTime` function.
 +
 +```go-html-template
- ## Using locations
++{{ $t := "2023-10-15T14:20:28-07:00" }}
++{{ time.AsTime $t }} → 2023-10-15 14:20:28 -0700 PDT (time.Time)
 +```
 +
- The optional `TIMEZONE` argument is a string that sets a default time zone (or more specific, the location, which represents the collection of time offsets in a geographical area) that is associated with the specified time value. If the time value has an explicit timezone or offset specified, it will take precedence over the `TIMEZONE` argument.
++## Parsable strings
 +
- The list of valid locations may be system dependent, but should include `UTC`, `Local`, or any location in the [IANA Time Zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
++As shown above, the first argument must be a *parsable* string representation of a date/time value. For example:
 +
- If no `TIMEZONE` is set, the `timeZone` from site configuration will be used.
++{{% include "functions/time/_common/parsable-date-time-strings.md" %}}
 +
- ```go-html-template
- {{ time "2020-10-20" }} → 2020-10-20 00:00:00 +0000 UTC
- {{ time "2020-10-20" "America/Los_Angeles" }} → 2020-10-20 00:00:00 -0700 PDT
- {{ time "2020-01-20" "America/Los_Angeles" }} → 2020-01-20 00:00:00 -0800 PST
- ```
++## Time zones
 +
- ## Example: Using `time` to get month index
++When the parsable string does not contain a time zone offset, you can do either of the following to assign a time zone other than Etc/UTC:
++
++- Provide a second argument to the `time.AsTime` function
++
++  ```go-html-template
++  {{ time.AsTime "15 Oct 2023" "America/Chicago" }}
++  ```
 +
- The following example takes a UNIX timestamp---set as `utimestamp: "1489276800"` in a content's front matter---converts the timestamp (string) to an integer using the [`int` function][int], and then uses [`printf`] to convert the `Month` property of `time` into an index.
++- Set the default time zone in your site configuration
 +
- The following example may be useful when setting up [multilingual sites][multilingual]:
++  {{< code-toggle file=hugo >}}
++  timeZone = 'America/New_York'
++  {{< /code-toggle >}}
 +
- {{< code file="unix-to-month-integer.html" >}}
- {{ $time := time (int .Params.addDate)}}
- => $time = 1489276800
- {{ $time.Month }}
- => "March"
- {{ $monthindex := printf "%d" $time.Month }}
- => $monthindex = 3
- {{< /code >}}
++The order of precedence for determining the time zone is:
 +
- [int]: /functions/cast/toint
- [multilingual]: /content-management/multilingual/
- [`printf`]: /functions/fmt/printf
++1. The time zone offset in the date/time string
++2. The time zone provide as the second argument to the `time.AsTime` function
++3. The time zone specified in your site configuration
 +
++The list of valid time zones may be system dependent, but should include `UTC`, `Local`, or any location in the [IANA Time Zone database].
 +
++[`time.Time`]: https://pkg.go.dev/time#Time
++[functions]: /functions/time/
++[iana time zone database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
++[methods]: /methods/time/
index 921f25a968f2c5fda3b17ba394f92cc48627a8b8,0000000000000000000000000000000000000000..f9c26d294e34762dbff4fb9a48cfd31a86ddbb2f
mode 100644,000000..100644
--- /dev/null
@@@ -1,46 -1,0 +1,46 @@@
- linkTitle: duration
- description: Returns a `time.Duration` structure, using the given time unit and duration number.
- categories: [functions]
 +---
 +title: time.Duration
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns a time.Duration value using the given time unit and  number.
++categories: []
 +keywords: []
-   signatures: [time.Duration TIME_UNIT DURATION_NUMBER]
- relatedFunctions:
-   - time.AsTime
-   - time.Duration
-   - time.Format
-   - time.Now
-   - time.ParseDuration
++action:
 +  aliases: [duration]
++  related:
++    - functions/time/AsTime
++    - functions/time/Format
++    - functions/time/Now
++    - functions/time/ParseDuration
 +  returnType: time.Duration
- `time.Duration` converts a given number into a [`time.Duration`](https://pkg.go.dev/time#Duration) structure so you can access its fields. E.g. you can perform [time operations](https://pkg.go.dev/time#Duration) on the returned `time.Duration` value:
++  signatures: [time.Duration TIME_UNIT NUMBER]
 +aliases: [/functions/duration]
 +---
 +
- {{ printf "There are %.0f seconds in one day." (duration "hour" 24).Seconds }}
- <!-- Output: There are 86400 seconds in one day. -->
++The `time.Duration` function returns a [`time.Duration`] value that you can use with any of the `Duration` [methods].
++
++This template:
 +
 +```go-html-template
- Make your code simpler to understand by using a [chained pipeline](https://pkg.go.dev/text/template#hdr-Pipelines):
++{{ $duration := time.Duration "hour" 24 }}
++{{ printf "There are %.0f seconds in one day." $duration.Seconds }}
 +```
 +
- ```go-html-template
- {{ mul 7.75 60 | duration "minute" }} → 7h45m0s
- {{ mul 120 60 | mul 1000 | duration "millisecond" }} → 2h0m0s
++Is rendered to:
 +
- You have to specify a time unit for the number given to the function. Valid time units are:
++```text
++There are 86400 seconds in one day.
 +```
 +
++The time unit must be one of the following:
++
 +
 +Duration|Valid time units
 +:--|:--
 +hours|`hour`, `h`
 +minutes|`minute`, `m`
 +seconds|`second`, `s`
 +milliseconds|`millisecond`, `ms`
 +microseconds|`microsecond`, `us`, `µs`
 +nanoseconds|`nanosecond`, `ns`
++
++[`time.Duration`]: https://pkg.go.dev/time#Duration
++[methods]: /methods/duration
index 3a0b1eb2ac7f97779bc9950dbf468d8762f6eaba,0000000000000000000000000000000000000000..74384959b04d65a3fd90474fc00e1d6ac584646d
mode 100644,000000..100644
--- /dev/null
@@@ -1,76 -1,0 +1,77 @@@
- description: Returns a formatted and localized time.Time value.
- categories: [functions]
 +---
 +title: time.Format
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given date/time as a formatted and localized string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - time.AsTime
-   - time.Duration
-   - time.Format
-   - time.Now
-   - time.ParseDuration
++action:
 +  aliases: [dateFormat]
++  related:
++    - functions/time/AsTime
++    - functions/time/Duration
++    - functions/time/Now
++    - functions/time/ParseDuration
 +  returnType: string
 +  signatures: [time.Format LAYOUT INPUT]
- ```go-template
- {{ $t := "2023-01-27T23:44:58-08:00" }}
- {{ $format := "2 Jan 2006" }}
 +aliases: [/functions/dateformat]
 +toc: true
 +---
 +
- {{ $t | time.Format $format }} → 27 Jan 2023
++Use the `time.Format` function with `time.Time` values:
 +
- {{ $t = time.AsTime $t }}
- {{ $t | time.Format $format }} → 27 Jan 2023
++```go-html-template
++{{ $t := time.AsTime "2023-02-27T23:44:58-08:00" }}
++{{ time.Format "2 Jan 2006" $t }} → 27 Feb 2023
++```
++
++Or use `time.Format` with a *parsable* string representation of a date/time value:
 +
- {{% readfile file="/functions/_common/time-layout-string.md" %}}
++```go-html-template
++{{ $t := "27 Feb 2023" }}
++{{ time.Format "January 2, 2006" $t }} → February 27, 2023
 +```
 +
++Examples of parsable string representations:
++
++{{% include "functions/time/_common/parsable-date-time-strings.md" %}}
++
 +## Layout string
 +
- {{% note %}}
- {{% readfile file="/functions/_common/locales.md" %}}
- {{% /note %}}
++{{% include "functions/_common/time-layout-string.md" %}}
 +
 +## Localization
 +
 +Use the `time.Format` function to localize `time.Time` values for the current language and region.
 +
- ```go-template
++{{% include "functions/_common/locales.md" %}}
 +
 +Use the layout string as described above, or one of the tokens below. For example:
 +
++```go-html-template
 +{{ .Date | time.Format ":date_medium" }} → Jan 27, 2023
 +```
 +
 +Localized to en-US:
 +
 +Token|Result
 +:--|:--
 +`:date_full`|`Friday, January 27, 2023`
 +`:date_long`|`January 27, 2023`
 +`:date_medium`|`Jan 27, 2023`
 +`:date_short`|`1/27/23`
 +`:time_full`|`11:44:58 pm Pacific Standard Time`
 +`:time_long`|`11:44:58 pm PST`
 +`:time_medium`|`11:44:58 pm`
 +`:time_short`|`11:44 pm`
 +
 +Localized to de-DE:
 +
 +Token|Result
 +:--|:--
 +`:date_full`|`Freitag, 27. Januar 2023`
 +`:date_long`|`27. Januar 2023`
 +`:date_medium`|`27.01.2023`
 +`:date_short`|`27.01.23`
 +`:time_full`|`23:44:58 Nordamerikanische Westküsten-Normalzeit`
 +`:time_long`|`23:44:58 PST`
 +`:time_medium`|`23:44:58`
 +`:time_short`|`23:44`
index 74b01ecc5b1f441094ffa932da55b043e728ff52,0000000000000000000000000000000000000000..60e45a91c149a695765a2f60aacc39b2db3a3ab8
mode 100644,000000..100644
--- /dev/null
@@@ -1,51 -1,0 +1,48 @@@
- linkTitle: now
- description: Returns the current local time 
- categories: [functions]
 +---
 +title: time.Now
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the current local time.
++categories: []
 +keywords: []
- relatedFunctions:
-   - time.AsTime
-   - time.Duration
-   - time.Format
-   - time.Now
-   - time.ParseDuration
++action:
 +  aliases: [now]
++  related:
++    - functions/time/AsTime
++    - functions/time/Duration
++    - functions/time/Format
++    - functions/time/ParseDuration
 +  returnType: time.Time
 +  signatures: [time.Now]
- See [`time.Time`](https://godoc.org/time#Time).
- For example, building your site on June 24, 2017, with the following templating:
 +aliases: [/functions/now]
 +---
 +
- <div>
-     <small>&copy; {{ now.Format "2006" }}</small>
- </div>
++For example, when building a site on October 15, 2023 in the America/Los_Angeles time zone:
 +
 +```go-html-template
- would produce the following:
++{{ time.Now }}
 +```
 +
- ```html
- <div>
-     <small>&copy; 2017</small>
- </div>
++This produces a `time.Time` value, with a string representation such as:
 +
- The above example uses the [`.Format` function](/functions/format), which page includes a full listing of date formatting using Go's layout string.
++```text
++2023-10-15 12:59:28.337140706 -0700 PDT m=+0.041752605
 +```
 +
- {{% note %}}
- Older Hugo themes may still be using the obsolete Page’s `.Now` (uppercase with leading dot), which causes build error that looks like the following:
++To format and [localize] the value, pass it through the [`time.Format`] function:
++
++```go-html-template
++{{ time.Now | time.Format "Jan 2006" }} → Oct 2023
++```
 +
-     ERROR ... Error while rendering "..." in "...": ...
-     executing "..." at <.Now.Format>:
-     can't evaluate field Now in type *hugolib.PageOutput
++The `time.Now` function returns a `time.Time` value, so you can chain any of the [time methods] to the resulting value. For example:
 +
- Be sure to use `now` (lowercase with _**no**_ leading dot) in your templating.
- {{% /note %}}
 +
++```go-html-template
++{{ time.Now.Year }} → 2023 (int)
++{{ time.Now.Weekday.String }} → Sunday
++{{ time.Now.Month.String }} → October
++{{ time.Now.Unix }} → 1697400955 (int64)
++```
++
++[`time.Format`]: /functions/time/format
++[localize]: /getting-started/glossary/#localization
++[time methods]: /methods/time/
index e3abc7c1521de833c798311b582a95b213ae1383,0000000000000000000000000000000000000000..0919141322d862d5ef30b2b751c3b9fb6faa959c
mode 100644,000000..100644
--- /dev/null
@@@ -1,30 -1,0 +1,37 @@@
- description: Parses a given duration string into a `time.Duration` structure.
- categories: [functions]
 +---
 +title: time.ParseDuration
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns a time.Duration value by parsing the given duration string.
++categories: []
 +keywords: []
- relatedFunctions:
-   - time.AsTime
-   - time.Duration
-   - time.Format
-   - time.Now
-   - time.ParseDuration
++action:
 +  aliases: []
++  related:
++    - functions/time/AsTime
++    - functions/time/Duration
++    - functions/time/Format
++    - functions/time/Now
 +  returnType: time.Duration
 +  signatures: [time.ParseDuration DURATION]
- `time.ParseDuration` parses a duration string into a [`time.Duration`](https://pkg.go.dev/time#Duration) structure so you can access its fields.
 +aliases: [/functions/time.parseduration]
 +---
 +
- You can perform [time operations](https://pkg.go.dev/time#Duration) on the returned `time.Duration` value:
++The `time.ParseDuration` function returns a time.Duration value that you can use with any of the `Duration` [methods].
++
++
 +A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as `300ms`, `-1.5h` or `2h45m`. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
 +
- {{ printf "There are %.0f seconds in one day." (time.ParseDuration "24h").Seconds }}
- <!-- Output: There are 86400 seconds in one day. -->
++This template:
 +
 +```go-html-template
++{{ $duration := time.ParseDuration "24h" }}
++{{ printf "There are %.0f seconds in one day." $duration.Seconds }}
++```
++
++Is rendered to:
++
++```text
++There are 86400 seconds in one day.
 +```
++
++[`time.Duration`]: https://pkg.go.dev/time#Duration
++[methods]: /methods/duration
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a38b9983eda0c1dae4c5be19712936d13f72df28
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++---
++# Do not remove front matter.
++---
++
++String representation|Time zone
++:--|:--
++2023-10-15T14:20:28-07:00|America/Los_Angeles
++2023-10-15T13:18:50-0700|America/Los_Angeles
++2023-10-15T13:18:50Z|Etc/UTC
++2023-10-15T13:18:50|Etc/UTC
++2023-10-15|Etc/UTC
++15 Oct 2023|Etc/UTC
++
++The last four examples are not fully qualified. Without a time zone offset, the time zone is set to Etc/UTC (Coordinated Universal Time).
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7e0b82f917cb43b58f74adfda2b4c4316df90938
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Time functions
++linkTitle: time
++description: Template functions to work with time values.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to work with time values.
index eabef933b893677e7c038a7c9b78227d024bef3e,0000000000000000000000000000000000000000..039cb12b74951c211bb92ab3111a73204646f785
mode 100644,000000..100644
--- /dev/null
@@@ -1,22 -1,0 +1,18 @@@
- categories: [functions]
 +---
 +title: transform.CanHighlight
 +description: Reports whether the given code language is supported by the Chroma highlighter.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - transform.CanHighlight
-   - transform.Highlight
-   - transform.HighlightCodeBlock
++action:
 +  aliases: []
++  related:
++    - functions/transform/Highlight
++    - functions/transform/HighlightCodeBlock
 +  returnType: bool
 +  signatures: [transform.CanHighlight LANGUAGE]
 +---
 +
 +```go-html-template
 +{{ transform.CanHighlight "go" }} → true
 +{{ transform.CanHighlight "klingon" }} → false
 +```
index 324c418512518f5db75f9be1ba476b7b704d2808,0000000000000000000000000000000000000000..d9f0adf67d2a690a9e2624f5f3a8dc59b0edc9f6
mode 100644,000000..100644
--- /dev/null
@@@ -1,31 -1,0 +1,30 @@@
- linkTitle: emojify
 +---
 +title: transform.Emojify 
- categories: [functions]
 +description: Runs a string through the Emoji emoticons processor.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- namespace: transform
- relatedFunctions: []
++action:
 +  aliases: [emojify]
++  related: []
 +  returnType: template.HTML
 +  signatures: [transform.Emojify INPUT]
- See the [Emoji cheat sheet][emojis] for available emoticons.
 +aliases: [/functions/emojify]
 +---
 +
 +`emojify` runs a passed string through the Emoji emoticons processor.
 +
- The `emojify` function can be called in your templates but not directly in your content files by default. For emojis in content files, set `enableEmoji` to `true` in your site's [configuration]. Then you can write emoji shorthand directly into your content files; e.g. <code>I :</code><code>heart</code><code>: Hugo!</code>:
++See the list of [emoji shortcodes] for available emoticons.
 +
- [emojis]: https://www.webfx.com/tools/emoji-cheat-sheet/
++The `emojify` function can be called in your templates but not directly in your content files by default. For emojis in content files, set `enableEmoji` to `true` in your site's [configuration]. Then you can write emoji shorthand directly into your content files;
 +
++
++```text
 +I :heart: Hugo!
++```
 +
++I :heart: Hugo!
 +
 +[configuration]: /getting-started/configuration/
++[emoji shortcodes]: /quick-reference/emojis/
 +[sc]: /templates/shortcode-templates/
 +[scsource]: https://github.com/gohugoio/hugo/tree/master/docs/layouts/shortcodes
index 62249367bb9e4bef55ffdcb36c61624c550ef446,0000000000000000000000000000000000000000..bb522769c5d923045d8532e9d82c27046b31a281
mode 100644,000000..100644
--- /dev/null
@@@ -1,24 -1,0 +1,30 @@@
- linkTitle: htmlEscape
- description: Returns the given string with the reserved HTML codes escaped.
- categories: [functions]
 +---
 +title: transform.HTMLEscape
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, escaping special characters by replacing them with HTML entities.
++categories: []
 +keywords: []
- relatedFunctions:
-   - transform.HTMLEscape
-   - transform.HTMLUnescape
++action:
 +  aliases: [htmlEscape]
++  related:
++    - functions/transform/HTMLUnescape
 +  returnType: string
 +  signatures: [transform.HTMLEscape INPUT]
- In the result `&` becomes `&amp;` and so on. It escapes only: `<`, `>`, `&`, `'` and `"`.
 +aliases: [/functions/htmlescape]
 +---
 +
- {{ htmlEscape "Hugo & Caddy > WordPress & Apache" }} → "Hugo &amp; Caddy &gt; WordPress &amp; Apache"
++The `transform.HTMLEscape` function escapes five special characters by replacing them with [HTML entities]:
++
++- `&` → `&amp;`
++- `<` → `&lt;`
++- `>` → `&gt;`
++- `'` → `&#39;`
++- `"` → `&#34;`
++
++For example:
 +
 +```go-html-template
++{{ htmlEscape "Lilo & Stitch" }} → Lilo &amp; Stitch
++{{ htmlEscape "7 > 6" }} → 7 &gt; 6
 +```
++
++[html entities]: https://developer.mozilla.org/en-US/docs/Glossary/Entity
index c0774232fcbf59cf43df875d221caadd174a897b,0000000000000000000000000000000000000000..1803180771032a5e530689230d7b48a6df1a7bbf
mode 100644,000000..100644
--- /dev/null
@@@ -1,24 -1,0 +1,30 @@@
- linkTitle: htmlUnescape
- description: Returns the given string with HTML escape codes un-escaped.
- categories: [functions]
 +---
 +title: transform.HTMLUnescape
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, replacing each HTML entity with its corresponding character.
++categories: []
 +keywords: []
- relatedFunctions:
-   - transform.HTMLEscape
-   - transform.HTMLUnescape
++action:
 +  aliases: [htmlUnescape]
++  related:
++    - functions/transform/HTMLEscape
 +  returnType: string
 +  signatures: [transform.HTMLUnescape INPUT]
- Remember to pass the output of this to `safeHTML` if fully un-escaped characters are desired. Otherwise, the output will be escaped again as normal.
 +aliases: [/functions/htmlunescape]
 +---
 +
- {{ htmlUnescape "Hugo &amp; Caddy &gt; WordPress &amp; Apache" }} → "Hugo & Caddy > WordPress & Apache"
++The `transform.HTMLUnescape` function replaces [HTML entities] with their corresponding characters.
 +
 +```go-html-template
++{{ htmlUnescape "Lilo &amp; Stitch" }} → Lilo & Stitch
++{{ htmlUnescape "7 &gt; 6" }} → 7 > 6
 +```
++
++In most contexts Go's [html/template] package will escape special characters. To bypass this behavior, pass the unescaped string through the [`safeHTML`] function.
++
++```go-html-template
++{{ htmlUnescape "Lilo &amp; Stitch" | safeHTML }}
++```
++
++[`safehtml`]: /functions/safe/html
++[html entities]: https://developer.mozilla.org/en-us/docs/glossary/entity
++[html/template]: https://pkg.go.dev/html/template
index 93043b4a1df50a64c17db5b764020e09ad99d591,0000000000000000000000000000000000000000..29d0efdef261fd7c5ae643370db5cdad233a403b
mode 100644,000000..100644
--- /dev/null
@@@ -1,113 -1,0 +1,107 @@@
- linkTitle: highlight
 +---
 +title: transform.Highlight
- categories: [functions]
 +description: Renders code with a syntax highlighter.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- namespace: transform
- relatedFunctions:
-   - transform.CanHighlight
-   - transform.Highlight
-   - transform.HighlightCodeBlock
++action:
 +  aliases: [highlight]
++  related:
++    - functions/transform/CanHighlight
++    - functions/transform/HighlightCodeBlock
 +  returnType: template.HTML
 +  signatures: ['transform.Highlight INPUT LANG [OPTIONS]']
- : An optional, comma-separated list of zero or more [options]. Set default values in [site configuration].
 +aliases: [/functions/highlight]
 +toc: true
 +---
 +
 +The `highlight` function uses the [Chroma] syntax highlighter, supporting over 200 languages with more than 40 available styles.
 +
 +## Arguments
 +
 +INPUT
 +: The code to highlight.
 +
 +LANG
 +: The language of the code to highlight. Choose from one of the [supported languages]. Case-insensitive.
 +
 +OPTIONS
- A space-separated list of lines to emphasize within the highlighted code. To emphasize lines 2, 3, 4, and 7, set this value to `2-4 7`. This option is independent of the `lineNoStart` option.
++: A map, or comma-separated list, of zero or more [options]. Set default values in [site configuration].
 +
 +## Options
 +
 +lineNos
 +: Boolean. Default is `false`.\
 +Display a number at the beginning of each line.
 +
 +lineNumbersInTable
 +: Boolean. Default is `true`.\
 +Render the highlighted code in an HTML table with two cells. The left table cell contains the line numbers. The right table cell contains the code, allowing a user to select and copy the code without line numbers. Irrelevant if `lineNos` is `false`.
 +
 +anchorLineNos
 +: Boolean. Default is `false`.\
 +Render each line number as an HTML anchor element, and set the `id` attribute of the surrounding `<span>` to the line number. Irrelevant if `lineNos` is `false`.
 +
 +lineAnchors
 +: String. Default is `""`.\
 +When rendering a line number as an HTML anchor element, prepend this value to the `id` attribute of the surrounding `<span>`. This provides unique `id` attributes when a page contains two or more code blocks. Irrelevant if `lineNos` or `anchorLineNos` is `false`.
 +
 +lineNoStart
 +: Integer. Default is `1`.\
 +The number to display at the beginning of the first line. Irrelevant if `lineNos` is `false`.
 +
 +hl_Lines
 +: String. Default is `""`.\
- `lineNos=inline`
++A space-delimited list of lines to emphasize within the highlighted code. To emphasize lines 2, 3, 4, and 7, set this value to `2-4 7`. This option is independent of the `lineNoStart` option.
 +
 +hl_inline
 +: Boolean. Default is `false`.\
 +Render the highlighted code without a wrapping container.
 +
 +style
 +: String. Default is `monokai`.\
 +The CSS styles to apply to the highlighted code. See the [style gallery] for examples. Case-sensitive.
 +
 +noClasses
 +: Boolean. Default is `true`.\
 +Use inline CSS styles instead of an external CSS file. To use an external CSS file, set this value to `false` and [generate the file with the hugo client][hugo client].
 +
 +tabWidth
 +: Integer. Default is `4`.\
 +Substitute this number of spaces for each tab character in your highlighted code. Irrelevant if `noClasses` is `false`.
 +
 +guessSyntax
 +: Boolean. Default is `false`.\
 +If the `LANG` argument is blank or an unrecognized language, auto-detect the language if possible, otherwise use a fallback language.
 +
 +{{% note %}}
 +Instead of specifying both `lineNos` and `lineNumbersInTable`, you can use the following shorthand notation:
 +
- `lineNos=table`
++lineNos=inline
 +: equivalent to `lineNos=true` and `lineNumbersInTable=false`
 +
- {{ $options := dict "lineNos" "table" "style" "dracula" }}
- {{ transform.Highlight $input $lang $options }}
++lineNos=table
 +: equivalent to `lineNos=true` and `lineNumbersInTable=true`
 +{{% /note %}}
 +
 +## Examples
 +
 +```go-html-template
 +{{ $input := `fmt.Println("Hello World!")` }}
 +{{ transform.Highlight $input "go" }}
 +
 +{{ $input := `console.log('Hello World!');` }}
 +{{ $lang := "js" }}
 +{{ transform.Highlight $input $lang "lineNos=table, style=api" }}
 +
 +{{ $input := `echo "Hello World!"` }}
 +{{ $lang := "bash" }}
++{{ $opts := dict "lineNos" "table" "style" "dracula" }}
++{{ transform.Highlight $input $lang $opts }}
 +```
 +
 +[Chroma]: https://github.com/alecthomas/chroma
 +[hugo client]: /commands/hugo_gen_chromastyles
 +[options]: #options
 +[site configuration]: /getting-started/configuration-markup#highlight
 +[style gallery]: https://xyproto.github.io/splash/docs/
 +[supported languages]: /content-management/syntax-highlighting#list-of-chroma-highlighting-languages
index fa70456418f0a6d649a3680d02e4ca7743ea161f,0000000000000000000000000000000000000000..dc396bad070038e897addd3613071dc696d42de7
mode 100644,000000..100644
--- /dev/null
@@@ -1,43 -1,0 +1,38 @@@
- categories: [functions]
 +---
 +title: transform.HighlightCodeBlock
 +description: Highlights code received in context within a code block render hook.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - transform.CanHighlight
-   - transform.Highlight
-   - transform.HighlightCodeBlock
++action:
 +  aliases: []
++  related:
++    - functions/transform/CanHighlight
++    - functions/transform/Highlight
 +  returnType: highlight.HighlightResult 
 +  signatures: ['transform.HighlightCodeBlock CONTEXT [OPTIONS]']
 +---
 +
 +This function is only useful within a code block render hook.
 +
 +Given the context passed into a code block render hook, `transform.HighlightCodeBlock` returns a `HighlightResult` object with two methods.
 +
 +.Wrapped
 +: (`template.HTML`) Returns highlighted code wrapped in `<div>`, `<pre>`, and `<code>` elements. This is identical to the value returned by the transform.Highlight function.
 +
 +.Inner
 +: (`template.HTML`) Returns highlighted code without any wrapping elements, allowing you to create your own wrapper.
 +
- {{ $options := merge .Options (dict "linenos" true) }}
- {{ $result := transform.HighlightCodeBlock . $options }}
 +```go-html-template
 +{{ $result := transform.HighlightCodeBlock . }}
 +{{ $result.Wrapped }}
 +```
 +
 +To override the default [highlighting options]:
 +
 +```go-html-template
++{{ $opts := merge .Options (dict "linenos" true) }}
++{{ $result := transform.HighlightCodeBlock . $opts }}
 +{{ $result.Wrapped }}
 +```
 +
 +[highlighting options]: /functions/transform/highlight/#options
index b0be902ce9d305fd020934af5750f8864dc0f92a,0000000000000000000000000000000000000000..8fb1e48ce38842f50dda57f80f3e12415886ea9e
mode 100644,000000..100644
--- /dev/null
@@@ -1,35 -1,0 +1,31 @@@
- linkTitle: markdownify
 +---
 +title: transform.Markdownify
- categories: [functions]
 +description: Renders markdown to HTML.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions: []
++action:
 +  aliases: [markdownify]
++  related:
++    - methods/page/RenderString
++    - methods/page/RenderShortcodes
 +  returnType: template.HTML
 +  signatures: [transform.Markdownify INPUT]
- {{ .Title | markdownify }}
 +aliases: [/functions/markdownify]
 +---
 +
 +```go-html-template
- To keep the wrapping `p` tags for a single paragraph, use the [`.Page.RenderString`] method, setting the `display` option to `block`.
++<h2>{{ .Title | markdownify }}</h2>
 +```
 +
 +If the resulting HTML is a single paragraph, Hugo removes the wrapping `p` tags to produce inline HTML as required per the example above.
 +
- If the resulting HTML is two or more paragraphs, Hugo leaves the wrapping `p` tags in place.
- [`.Page.RenderString`]: /functions/renderstring/
++To keep the wrapping `p` tags for a single paragraph, use the [`RenderString`] method on the `Page` object, setting the `display` option to `block`.
 +
- Although the `markdownify` function honors [markdown render hooks] when rendering markdown to HTML, use the `.Page.RenderString` method instead of `markdownify` if a render hook accesses `.Page` context. See issue [#9692] for details.
++[`RenderString`]: /methods/page/renderstring/
 +
 +{{% note %}}
++Although the `markdownify` function honors [markdown render hooks] when rendering markdown to HTML, use the `RenderString` method instead of `markdownify` if a render hook accesses `.Page` context. See issue [#9692] for details.
 +
 +[markdown render hooks]: /templates/render-hooks/
 +[#9692]: https://github.com/gohugoio/hugo/issues/9692
 +{{% /note %}}
index 163233d4ab132c080e9fc6b22f9ed892da1400c3,0000000000000000000000000000000000000000..040145170b894529fbc225c043206347f5004ec3
mode 100644,000000..100644
--- /dev/null
@@@ -1,24 -1,0 +1,16 @@@
- linkTitle: plainify
 +---
 +title: transform.Plainify
- categories: [functions]
 +description: Returns a string with all HTML tags removed.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions: []
++action:
 +  aliases: [plainify]
++  related: []
 +  returnType: string
 +  signatures: [transform.Plainify INPUT]
- {{ "<b>BatMan</b>" | plainify }} → "BatMan"
 +aliases: [/functions/plainify]
 +---
 +
 +```go-html-template
- See also the `.PlainWords`, `.Plain`, and `.RawContent` [page variables][pagevars].
- [pagevars]: /variables/page/
++{{ "<b>BatMan</b>" | plainify }} → BatMan
 +```
index 8f6e58247f3485f2c9e477bc449e64f60613a539,0000000000000000000000000000000000000000..24ef4381d49d69a12102676fa9d37c2e6123df1d
mode 100644,000000..100644
--- /dev/null
@@@ -1,96 -1,0 +1,92 @@@
- categories: [functions]
 +---
 +title: transform.Remarshal
 +description: Marshals a string of serialized data, or a map, into a string of serialized data in the specified format.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - encoding.Jsonify
-   - transform.Remarshal
-   - transform.Unmarshal
++action:
 +  aliases: []
++  related:
++    - functions/encoding/Jsonify
++    - functions/transform/Unmarshal
 +  returnType: string
 +  signatures: [transform.Remarshal FORMAT INPUT]
- The FORMAT must be one of `json`, `toml`, `yaml`, or `xml`. If the INPUT is a string of serialized data, it must be valid JSON, TOML, YAML, or XML.
 +aliases: [/functions/transform.remarshal]
 +---
 +
++The format must be one of `json`, `toml`, `yaml`, or `xml`. If the input is a string of serialized data, it must be valid JSON, TOML, YAML, or XML.
 +
 +{{% note %}}
 +This function is primarily a helper for Hugo's documentation, used to convert configuration and front matter examples to JSON, TOML, and YAML.
 +
 +This is not a general purpose converter, and may change without notice if required for Hugo's documentation site.
 +{{% /note %}}
 +
 +Example 1
 +: Convert a string of TOML to JSON.
 +
 +```go-html-template
 +{{ $s := `
 +  baseURL = 'https://example.org/'
 +  languageCode = 'en-US'
 +  title = 'ABC Widgets'
 +`}}
 +<pre>{{ transform.Remarshal "json" $s }}</pre>
 +```
 +
 +Resulting HTML:
 +
 +```html
 +<pre>{
 +   &#34;baseURL&#34;: &#34;https://example.org/&#34;,
 +   &#34;languageCode&#34;: &#34;en-US&#34;,
 +   &#34;title&#34;: &#34;ABC Widgets&#34;
 +}
 +</pre>
 +```
 +
 +Rendered in browser:
 +
 +```text
 +{
 +   "baseURL": "https://example.org/",
 +   "languageCode": "en-US",
 +   "title": "ABC Widgets"
 +}
 +```
 +
 +Example 2
 +: Convert a map to YAML.
 +
 +```go-html-template
 +{{ $m := dict
 +  "a" "Hugo rocks!"
 +  "b" (dict "question" "What is 6x7?" "answer" 42)
 +  "c" (slice "foo" "bar")
 +}}
 +<pre>{{ transform.Remarshal "yaml" $m }}</pre>
 +```
 +
 +Resulting HTML:
 +
 +```html
 +<pre>a: Hugo rocks!
 +b:
 +  answer: 42
 +  question: What is 6x7?
 +c:
 +- foo
 +- bar
 +</pre>
 +```
 +
 +Rendered in browser:
 +
 +```text
 +a: Hugo rocks!
 +b:
 +  answer: 42
 +  question: What is 6x7?
 +c:
 +- foo
 +- bar
 +```
index ab32d13de86893a0fa7f6c85d8c69e463891fbd2,0000000000000000000000000000000000000000..02524509b74f9a046b04edc9302c011709bca54a
mode 100644,000000..100644
--- /dev/null
@@@ -1,83 -1,0 +1,289 @@@
- description: Parses the input and converts it into a map or an array. Supported formats are JSON, TOML, YAML, XML and CSV.
- categories: [functions]
 +---
 +title: transform.Unmarshal
- menu:
-   docs:
-     parent: functions
- function:
++description: Parses serialized data and returns a map or an array. Supports CSV, JSON, TOML, YAML, and XML.
++categories: []
 +keywords: []
-   signatures:
-     - RESOURCE or STRING | transform.Unmarshal [OPTIONS]
-     - RESOURCE or STRING | unmarshal [OPTIONS]
- relatedFunctions:
-   - encoding.Jsonify
-   - transform.Remarshal
-   - transform.Unmarshal
++action:
 +  aliases: [unmarshal]
++  related:
++    - functions/transform/Remarshal
++    - functions/resources/Get
++    - functions/resources/GetRemote
++    - functions/encoding/Jsonify
 +  returnType: any
- The function accepts either a `Resource` created in [Hugo Pipes](/hugo-pipes/) or via [Page Bundles](/content-management/page-bundles/), or simply a string. The two examples below will produce the same map:
++  signatures: ['transform.Unmarshal [OPTIONS] INPUT']
++toc: true
 +aliases: [/functions/transform.unmarshal]
 +---
 +
- {{ $greetings := "hello = \"Hello Hugo\"" | transform.Unmarshal }}`
++The input can be a string or a [resource].
++
++## Unmarshal a string
++
++```go-html-template
++{{ $string := `
++title: Les Misérables
++author: Victor Hugo
++`}}
++
++{{ $book := unmarshal $string }}
++{{ $book.title }} → Les Misérables
++{{ $book.author }} → Victor Hugo
++```
++
++## Unmarshal a resource
++
++Use the `transform.Unmarshal` function with global, page, and remote resources.
++
++### Global resource
++
++A global resource is a file within the assets directory, or within any directory mounted to the assets directory.
++
++```text
++assets/
++└── data/
++    └── books.json
++```
 +
 +```go-html-template
- {{ $greetings := "hello = \"Hello Hugo\"" | resources.FromString "data/greetings.toml" | transform.Unmarshal }}
++{{ $data := "" }}
++{{ $path := "data/books.json" }}
++{{ with resources.Get $path }}
++  {{ with unmarshal . }}
++    {{ $data = . }}
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get global resource %q" $path }}
++{{ end }}
++
++{{ range where $data "author" "Victor Hugo" }}
++  {{ .title }} → Les Misérables
++{{ end }}
++```
++
++### Page resource
++
++A page resource is a file within a [page bundle].
++
++```text
++content/
++├── post/
++│   └── book-reviews/
++│       ├── books.json
++│       └── index.md
++└── _index.md
 +```
 +
 +```go-html-template
- In both the above examples, you get a map you can work with:
++{{ $data := "" }}
++{{ $path := "books.json" }}
++{{ with .Resources.Get $path }}
++  {{ with unmarshal . }}
++    {{ $data = . }}
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get page resource %q" $path }}
++{{ end }}
++
++{{ range where $data "author" "Victor Hugo" }}
++  {{ .title }} → Les Misérables
++{{ end }}
 +```
 +
- {{ $greetings.hello }}
++### Remote resource
++
++A remote resource is a file on a remote server, accessible via HTTP or HTTPS.
 +
 +```go-html-template
- The above prints `Hello Hugo`.
++{{ $data := "" }}
++{{ $url := "https://example.org/books.json" }}
++{{ with resources.GetRemote $url }}
++  {{ with .Err }}
++    {{ errorf "%s" . }}
++  {{ else }}
++    {{ $data = . | transform.Unmarshal }}
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get remote resource %q" $url }}
++{{ end }}
++
++{{ range where $data "author" "Victor Hugo" }}
++  {{ .title }} → Les Misérables
++{{ end }}
 +```
 +
- ## CSV options
++[resource]: /getting-started/glossary/#resource
++[page bundle]: /content-management/page-bundles
 +
- Unmarshal with CSV as input has some options you can set:
++## Options
 +
- : The delimiter used, default is `,`.
++When unmarshaling a CSV file, provide an optional map of options.
 +
 +delimiter
- : The comment character used in the CSV. If set, lines beginning with the comment character without preceding whitespace are ignored.:
- Example:
++: (`string`) The delimiter used, default is `,`.
 +
 +comment
- ## XML data
- As a convenience, Hugo allows you to access XML data in the same way that you access JSON, TOML, and YAML: you do not need to specify the root node when accessing the data.
++: (`string`) The comment character used in the CSV. If set, lines beginning with the comment character without preceding whitespace are ignored.
 +
 +```go-html-template
 +{{ $csv := "a;b;c" | transform.Unmarshal (dict "delimiter" ";") }}
 +```
 +
- To get the contents of `<title>` in the document below, you use `{{ .message.title }}`:
++## Working with XML
 +
- <root>
-     <message>
-         <title>Hugo rocks!</title>
-         <description>Thanks for using Hugo</description>
-     </message>
- </root>
++When unmarshaling an XML file, do not include the root node when accessing data. For example, after unmarshaling the RSS feed below, access the feed title with `$data.channel.title`.
 +
 +```xml
- The following example lists the items of an RSS feed:
++<?xml version="1.0" encoding="utf-8" standalone="yes"?>
++<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
++  <channel>
++    <title>Books on Example Site</title>
++    <link>https://example.org/books/</link>
++    <description>Recent content in Books on Example Site</description>
++    <language>en-US</language>
++    <atom:link href="https://example.org/books/index.xml" rel="self" type="application/rss+xml" />
++    <item>
++      <title>The Hunchback of Notre Dame</title>
++      <description>Written by Victor Hugo</description>
++      <link>https://example.org/books/the-hunchback-of-notre-dame/</link>
++      <pubDate>Mon, 09 Oct 2023 09:27:12 -0700</pubDate>
++      <guid>https://example.org/books/the-hunchback-of-notre-dame/</guid>
++    </item>
++    <item>
++      <title>Les Misérables</title>
++      <description>Written by Victor Hugo</description>
++      <link>https://example.org/books/les-miserables/</link>
++      <pubDate>Mon, 09 Oct 2023 09:27:11 -0700</pubDate>
++      <guid>https://example.org/books/les-miserables/</guid>
++    </item>
++  </channel>
++</rss>
 +```
 +
- {{ with resources.GetRemote "https://example.com/rss.xml" | transform.Unmarshal }}
-   {{ range .channel.item }}
-     <strong>{{ .title | plainify | htmlUnescape }}</strong><br>
-     <p>{{ .description | plainify | htmlUnescape }}</p>
-     {{ $link := .link | plainify | htmlUnescape }}
-     <a href="{{ $link }}">{{ $link }}</a><br>
-     <hr>
++Get the remote data:
 +
 +```go-html-template
++{{ $data := "" }}
++{{ $url := "https://example.org/books/index.xml" }}
++{{ with resources.GetRemote $url }}
++  {{ with .Err }}
++    {{ errorf "%s" . }}
++  {{ else }}
++    {{ $data = . | transform.Unmarshal }}
 +  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get remote resource %q" $url }}
 +{{ end }}
 +```
++
++Inspect the data structure:
++
++```go-html-template
++<pre>{{ jsonify (dict "indent" "  ") $data }}</pre>
++```
++
++List the book titles:
++
++```go-html-template
++{{ with $data.channel.item }}
++  <ul>
++    {{ range . }}
++      <li>{{ .title }}</li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++Hugo renders this to:
++
++```html
++<ul>
++  <li>The Hunchback of Notre Dame</li>
++  <li>Les Misérables</li>
++</ul>
++```
++
++### XML attributes and namespaces
++
++Let's add a `lang` attribute to the `title` nodes of our RSS feed, and a namespaced node for the ISBN number:
++
++```xml
++<?xml version="1.0" encoding="utf-8" standalone="yes"?>
++<rss version="2.0"
++  xmlns:atom="http://www.w3.org/2005/Atom"
++  xmlns:isbn="http://schemas.isbn.org/ns/1999/basic.dtd"
++>
++  <channel>
++    <title>Books on Example Site</title>
++    <link>https://example.org/books/</link>
++    <description>Recent content in Books on Example Site</description>
++    <language>en-US</language>
++    <atom:link href="https://example.org/books/index.xml" rel="self" type="application/rss+xml" />
++    <item>
++      <title lang="fr">The Hunchback of Notre Dame</title>
++      <description>Written by Victor Hugo</description>
++      <isbn:number>9780140443530</isbn:number>
++      <link>https://example.org/books/the-hunchback-of-notre-dame/</link>
++      <pubDate>Mon, 09 Oct 2023 09:27:12 -0700</pubDate>
++      <guid>https://example.org/books/the-hunchback-of-notre-dame/</guid>
++    </item>
++    <item>
++      <title lang="en">Les Misérables</title>
++      <description>Written by Victor Hugo</description>
++      <isbn:number>9780451419439</isbn:number>
++      <link>https://example.org/books/les-miserables/</link>
++      <pubDate>Mon, 09 Oct 2023 09:27:11 -0700</pubDate>
++      <guid>https://example.org/books/les-miserables/</guid>
++    </item>
++  </channel>
++</rss>
++```
++
++After retrieving the remote data, inspect the data structure:
++
++```go-html-template
++<pre>{{ jsonify (dict "indent" "  ") $data }}</pre>
++```
++
++Each item node looks like this:
++
++```json
++{
++  "description": "Written by Victor Hugo",
++  "guid": "https://example.org/books/the-hunchback-of-notre-dame/",
++  "link": "https://example.org/books/the-hunchback-of-notre-dame/",
++  "number": "9780140443530",
++  "pubDate": "Mon, 09 Oct 2023 09:27:12 -0700",
++  "title": {
++    "#text": "The Hunchback of Notre Dame",
++    "-lang": "fr"
++  }
++}
++```
++
++The title keys do not begin with an underscore or a letter---they are not valid [identifiers]. Use the [`index`] function to access the values:
++
++```go-html-template
++{{ with $data.channel.item }}
++  <ul>
++    {{ range . }}
++      {{ $title := index .title "#text" }}
++      {{ $lang := index .title "-lang" }}
++      {{ $ISBN := .number }}
++      <li>{{ $title }} ({{ $lang }}) {{ $ISBN }}</li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++Hugo renders this to:
++
++```html
++<ul>
++  <li>The Hunchback of Notre Dame (fr) 9780140443530</li>
++  <li>Les Misérables (en) 9780451419439</li>
++</ul>
++```
++
++[`index`]: /functions/collections/indexfunction
++[identifiers]: https://go.dev/ref/spec#Identifiers
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..70e286b2454192d4a8a66a26141cba04424d2a72
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Transform functions
++linkTitle: transform
++description: Template functions to transform values from one format to another.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to transform values from one format to another.
index ad73bbff08be9ba418033104c8b554730eb36720,0000000000000000000000000000000000000000..876552bb7b1325a1ff4d4a70f488fd13628b7d0b
mode 100644,000000..100644
--- /dev/null
@@@ -1,72 -1,0 +1,67 @@@
- linkTitle: absLangURL
 +---
 +title: urls.AbsLangURL
- categories: [functions]
 +description: Returns an absolute URL with a language prefix, if any.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   returnType: template.HTML
++action:
 +  aliases: [absLangURL]
- relatedFunctions:
-   - urls.AbsLangURL
-   - urls.AbsURL 
-   - urls.RelLangURL
-   - urls.RelURL
++  related:
++    - functions/urls/AbsURL 
++    - functions/urls/RelLangURL
++    - functions/urls/RelURL
++  returnType: string
 +  signatures: [urls.AbsLangURL INPUT]
 +aliases: [/functions/abslangurl]
 +---
 +
 +Use this function with both monolingual and multilingual configurations. The URL returned by this function depends on:
 +
 +- Whether the input begins with a slash
 +- The `baseURL` in site configuration
 +- The language prefix, if any
 +
 +In examples that follow, the project is multilingual with content in both Español (`es`) and English (`en`). The default language is Español. The returned values are from the English site.
 +
 +### Input does not begin with a slash
 +
 +If the input does not begin with a slash, the resulting URL will be correct regardless of the `baseURL`.
 +
 +With `baseURL = https://example.org/`
 +
 +```go-html-template
 +{{ absLangURL "" }}           →   https://example.org/en/
 +{{ absLangURL "articles" }}   →   https://example.org/en/articles
 +{{ absLangURL "style.css" }}  →   https://example.org/en/style.css
 +```
 +
 +With `baseURL = https://example.org/docs/`
 +
 +```go-html-template
 +{{ absLangURL "" }}           →   https://example.org/docs/en/
 +{{ absLangURL "articles" }}   →   https://example.org/docs/en/articles
 +{{ absLangURL "style.css" }}  →   https://example.org/docs/en/style.css
 +```
 +
 +### Input begins with a slash
 +
 +If the input begins with a slash, the resulting URL will be incorrect when the `baseURL` includes a subdirectory. With a leading slash, the function returns a URL relative to the protocol+host section of the `baseURL`.
 +
 +With `baseURL = https://example.org/`
 +
 +```go-html-template
 +{{ absLangURL "/" }}          →   https://example.org/en/
 +{{ absLangURL "/articles" }}  →   https://example.org/en/articles
 +{{ absLangURL "/style.css" }} →   https://example.org/en/style.css
 +```
 +
 +With `baseURL = https://example.org/docs/`
 +
 +```go-html-template
 +{{ absLangURL "/" }}          →   https://example.org/en/
 +{{ absLangURL "/articles" }}  →   https://example.org/en/articles
 +{{ absLangURL "/style.css" }} →   https://example.org/en/style.css
 +```
 +
 +{{% note %}}
 +The last three examples are not desirable in most situations. As a best practice, never include a leading slash when using this function.
 +{{% /note %}}
index bb6816f577e9f779834b83d6de604a0cce5c3f9c,0000000000000000000000000000000000000000..5b027ae84ec8352921fabfaba2d1687e66b15fe7
mode 100644,000000..100644
--- /dev/null
@@@ -1,71 -1,0 +1,66 @@@
- linkTitle: absURL
 +---
 +title: urls.AbsURL 
- categories: [functions]
 +description: Returns an absolute URL.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   returnType: template.html
++action:
 +  aliases: [absURL]
- relatedFunctions:
-   - urls.AbsLangURL
-   - urls.AbsURL 
-   - urls.RelLangURL
-   - urls.RelURL
++  related:
++    - functions/urls/AbsLangURL
++    - functions/urls/RelLangURL
++    - functions/urls/RelURL
++  returnType: string
 +  signatures: [urls.AbsURL INPUT]
- With multilingual configurations, use the [`absLangURL`] function instead.  The URL returned by this function depends on:
 +aliases: [/functions/absurl]
 +---
 +
++With multilingual configurations, use the [`absLangURL`] function instead. The URL returned by this function depends on:
 +
 +- Whether the input begins with a slash
 +- The `baseURL` in site configuration
 +
 +### Input does not begin with a slash
 +
 +If the input does not begin with a slash, the resulting URL will be correct regardless of the `baseURL`.
 +
 +With `baseURL = https://example.org/`
 +
 +```go-html-template
 +{{ absURL "" }}           →   https://example.org/
 +{{ absURL "articles" }}   →   https://example.org/articles
 +{{ absURL "style.css" }}  →   https://example.org/style.css
 +```
 +
 +With `baseURL = https://example.org/docs/`
 +
 +```go-html-template
 +{{ absURL "" }}           →   https://example.org/docs/
 +{{ absURL "articles" }}   →   https://example.org/docs/articles
 +{{ absURL "style.css" }}  →   https://example.org/docs/style.css
 +```
 +
 +#### Input begins with a slash
 +
 +If the input begins with a slash, the resulting URL will be incorrect when the `baseURL` includes a subdirectory. With a leading slash, the function returns a URL relative to the protocol+host section of the `baseURL`.
 +
 +With `baseURL = https://example.org/`
 +
 +```go-html-template
 +{{ absURL "/" }}          →   https://example.org/
 +{{ absURL "/articles" }}  →   https://example.org/articles
 +{{ absURL "/style.css" }} →   https://example.org/style.css
 +```
 +
 +With `baseURL = https://example.org/docs/`
 +
 +```go-html-template
 +{{ absURL "/" }}          →   https://example.org/
 +{{ absURL "/articles" }}  →   https://example.org/articles
 +{{ absURL "/style.css" }} →   https://example.org/style.css
 +```
 +
 +{{% note %}}
 +The last three examples are not desirable in most situations. As a best practice, never include a leading slash when using this function.
 +{{% /note %}}
 +
 +[`absLangURL`]: /functions/urls/abslangurl/
index 15efe9a5ed9b0436da26c33ab34c02fb5abd6198,0000000000000000000000000000000000000000..72b3d54a9eb777c2b1dbab7901c575f834cb9e8e
mode 100644,000000..100644
--- /dev/null
@@@ -1,31 -1,0 +1,37 @@@
- linkTitle: anchorize
- description: Takes a string and sanitizes it the same way as the [`defaultMarkdownHandler`](/getting-started/configuration-markup#default-configuration) does for markdown headers.
- categories: [functions]
 +---
 +title: urls.Anchorize
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, sanitized for usage in an HTML id attribute.
++categories: []
 +keywords: []
- relatedFunctions:
-   - urls.Anchorize
-   - urls.URLize
++action:
 +  aliases: [anchorize]
++  related:
++    - functions/urls/URLize
 +  returnType: string
 +  signatures: [urls.Anchorize INPUT]
- If [Goldmark](/getting-started/configuration-markup#goldmark) is set as `defaultMarkdownHandler`, the sanitizing logic adheres to the setting [`markup.goldmark.parser.autoHeadingIDType`](/getting-started/configuration-markup#goldmark).
 +aliases: [/functions/anchorize]
 +---
 +
- Since the `defaultMarkdownHandler` and this template function use the same sanitizing logic, you can use the latter to determine the ID of a header for linking with anchor tags.
++{{% include "/functions/urls/_common/anchorize-vs-urlize.md" %}}
 +
- ```go-html-template
- {{ anchorize "This is a header" }} → "this-is-a-header"
- {{ anchorize "This is also    a header" }} → "this-is-also----a-header"
- {{ anchorize "main.go" }} → "maingo"
- {{ anchorize "Article 123" }} → "article-123"
- {{ anchorize "<- Let's try this, shall we?" }} → "--lets-try-this-shall-we"
- {{ anchorize "Hello, 世界" }} → "hello-世界"
- ```
++## Sanitizing logic
 +
++With the default markdown renderer, Goldmark, the sanitizing logic is controlled by your site configuration:
++
++{{< code-toggle file=hugo >}}
++[markup.goldmark.parser]
++autoHeadingIDType = 'github'
++{{< /code-toggle >}}
++
++This controls the behavior of the `anchorize` function and the generation of heading IDs when rendering markdown to HTML.
++
++Set `autoHeadingIDType` to one of:
++
++github
++: Compatible with GitHub. This is the default, and strongly recommended.
++
++github-ascii
++: Similar to the "github" setting, but removes non-ASCII characters. 
++
++blackfriday
++: Provided for backwards compatibility with Hugo v0.59.1 and earlier. This option will be removed in a future release.
index 41adf7ee7950820f13297783a7d2d2b9b8dbbea1,0000000000000000000000000000000000000000..7acecb5068fc23fbace73e3344b2f8e4c8029a26
mode 100644,000000..100644
--- /dev/null
@@@ -1,32 -1,0 +1,30 @@@
- categories: [functions]
 +---
 +title: urls.JoinPath
 +description: Joins the provided elements into a URL string and cleans the result of any ./ or ../ elements. If the argument list is empty, JoinPath returns an empty string.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
- relatedFunctions:
-   - path.Join
-   - urls.JoinPath
++action:
 +  aliases: []
++  related:
++    - functions/path/Join
 +  returnType: string
 +  signatures: [urls.JoinPath ELEMENT...]
- {{ urls.JoinPath }} → ""
- {{ urls.JoinPath "" }} → "/"
- {{ urls.JoinPath "a" }} → "a"
- {{ urls.JoinPath "a" "b" }} → "a/b"
- {{ urls.JoinPath "/a" "b" }} → "/a/b"
- {{ urls.JoinPath "https://example.org" "b" }} → "https://example.org/b"
 +aliases: [/functions/urls.joinpath]
 +---
 +
++{{< new-in 0.112.0 >}}
++
 +```go-html-template
- {{ urls.JoinPath (slice "a" "b") }} → "a/b"
++{{ urls.JoinPath }} → "" (empty string)
++{{ urls.JoinPath "" }} → /
++{{ urls.JoinPath "a" }} → a
++{{ urls.JoinPath "a" "b" }} → a/b
++{{ urls.JoinPath "/a" "b" }} → /a/b
++{{ urls.JoinPath "https://example.org" "b" }} → https://example.org/b
 +
++{{ urls.JoinPath (slice "a" "b") }} → a/b
 +```
 +
 +Unlike the [`path.Join`] function, `urls.JoinPath` retains consecutive leading slashes.
 +
 +[`path.Join`]: /functions/path/join
index 17c924d5125e5e7ce142788f9776ee86e5f0fe3a,0000000000000000000000000000000000000000..2eb4eeadf191f4f46d9d2fc2d11ca072dcc411f9
mode 100644,000000..100644
--- /dev/null
@@@ -1,37 -1,0 +1,33 @@@
- categories: [functions]
 +---
 +title: urls.Parse
 +description: Parses a URL into a URL structure.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   returnType: URL
++action:
 +  aliases: []
- relatedFunctions: []
++  related: []
++  returnType: url.URL
 +  signatures: [urls.Parse URL]
 +aliases: [/functions/urls.parse]
 +---
 +
 +The `urls.Parse` function parses a URL into a [URL structure](https://godoc.org/net/url#URL). The URL may be relative (a path, without a host) or absolute (starting with a [scheme]). Hugo throws an error when parsing an invalid URL.
 +
 +[scheme]: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml#uri-schemes-1
 +
 +```go-html-template
 +{{ $url := "https://example.org:123/foo?a=6&b=7#bar" }}
 +{{ $u := urls.Parse $url }}
 +
 +{{ $u.IsAbs }} → true
 +{{ $u.Scheme }} → https
 +{{ $u.Host }} → example.org:123
 +{{ $u.Hostname }} → example.org
 +{{ $u.RequestURI }} → /foo?a=6&b=7
 +{{ $u.Path }} → /foo
 +{{ $u.Query }} → map[a:[6] b:[7]]
 +{{ $u.Query.a }} → [6]
 +{{ $u.Query.Get "a" }} → 6
 +{{ $u.Query.Has "b" }} → true
 +{{ $u.Fragment }} → bar
 +```
index 908fd6ca8cbb59a40291b319556c6ff058c23b22,0000000000000000000000000000000000000000..6cd97f03009370b77e5f8f4c957fcc845cb9ee8c
mode 100644,000000..100644
--- /dev/null
@@@ -1,49 -1,0 +1,63 @@@
- linkTitle: ref
- description: Returns the absolute permalink to a page.
- categories: [functions]
 +---
 +title: urls.Ref
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the absolute permalink to a page at the given path.
++categories: []
 +keywords: []
-   returnType: template.HTML
-   signatures: [urls.Ref . PAGE]
- relatedFunctions:
-   - urls.Ref
-   - urls.RelRef
++action:
 +  aliases: [ref]
- This function takes two arguments:
++  related:
++    - functions/urls/RelRef
++    - methods/page/Ref
++    - methods/page/RelRef
++  returnType: string
++  signatures:
++    - urls.Ref PAGE PATH
++    - urls.Ref PAGE OPTIONS
 +aliases: [/functions/ref]
 +---
 +
- - The context of the page from which to resolve relative paths, typically the current page (`.`)
- - The path to a page, with or without a file extension, with or without an anchor. A path without a leading `/` is first resolved relative to the given context, then to the remainder of the site.
++The first argument is the context of the page from which to resolve relative paths, typically the current page.
 +
- Hugo emits an error or warning if the page cannot be uniquely resolved. The error behavior is configurable; see [Ref and RelRef Configuration](/content-management/cross-references/#ref-and-relref-configuration).
++The second argument is a path to a page, with or without a file extension, with or without an anchor. A path without a leading `/` is first resolved relative to the given context, then to the remainder of the site. Alternatively, provide an [options map](#options) instead of a path.
 +
 +```go-html-template
 +{{ ref . "about" }}
 +{{ ref . "about#anchor" }}
 +{{ ref . "about.md" }}
 +{{ ref . "about.md#anchor" }}
 +{{ ref . "#anchor" }}
 +{{ ref . "/blog/my-post" }}
 +{{ ref . "/blog/my-post.md" }}
 +```
 +
++## Options
++
++Instead of specifying a path, you can also provide an options map:
++
++path
++: (`string`) The path to the page, relative to the content directory. Required.
++
++lang
++: (`string`) The language (site) to search for the page. Default is the current language. Optional.
++
++outputFormat
++: (`string`) The output format to search for the page. Default is the current output format. Optional.
++
 +To return the absolute permalink to another language version of a page:
 +
 +```go-html-template
 +{{ ref . (dict "path" "about.md" "lang" "fr") }}
 +```
 +
 +To return the absolute permalink to another Output Format of a page:
 +
 +```go-html-template
 +{{ ref . (dict "path" "about.md" "outputFormat" "rss") }}
 +```
 +
- This function is used by Hugo's built-in [`ref`](/content-management/shortcodes/#ref-and-relref) shortcode. For a detailed explanation of how to leverage this shortcode for content management, see [Links and Cross References](/content-management/cross-references/).
++By default, Hugo will throw an error and fail the build if it cannot resolve the path. You can change this to a warning in your site configuration, and specify a URL to return when the path cannot be resolved.
 +
++{{< code-toggle file=hugo >}}
++refLinksErrorLevel = 'warning'
++refLinksNotFoundURL = '/some/other/url'
++{{< /code-toggle >}}
index b8850c71dd7befa6dea1e10233dfaaee7f34a077,0000000000000000000000000000000000000000..2c10370384b88df7a08fe2b4c1916307216a7345
mode 100644,000000..100644
--- /dev/null
@@@ -1,72 -1,0 +1,67 @@@
- linkTitle: relLangURL
 +---
 +title: urls.RelLangURL
- categories: [functions]
 +description: Returns a relative URL with a language prefix, if any.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   returnType: template.HTML
++action:
 +  aliases: [relLangURL]
- relatedFunctions:
-   - urls.AbsLangURL
-   - urls.AbsURL 
-   - urls.RelLangURL
-   - urls.RelURL
++  related:
++    - functions/urls/AbsLangURL
++    - functions/urls/AbsURL 
++    - functions/urls/RelURL
++  returnType: string
 +  signatures: [urls.RelLangURL INPUT]
- ``` 
 +aliases: [/functions/rellangurl]
 +---
 +
 +Use this function with both monolingual and multilingual configurations. The URL returned by this function depends on:
 +
 +- Whether the input begins with a slash
 +- The `baseURL` in site configuration
 +- The language prefix, if any
 +
 +In examples that follow, the project is multilingual with content in both Español (`es`) and English (`en`). The default language is Español. The returned values are from the English site.
 +
 +### Input does not begin with a slash
 +
 +If the input does not begin with a slash, the resulting URL will be correct regardless of the `baseURL`.
 +
 +With `baseURL = https://example.org/`
 +
 +```go-html-template
 +{{ relLangURL "" }}           →   /en/
 +{{ relLangURL "articles" }}   →   /en/articles
 +{{ relLangURL "style.css" }}  →   /en/style.css
- ``` 
++```
 +
 +With `baseURL = https://example.org/docs/`
 +
 +```go-html-template
 +{{ relLangURL "" }}           →   /docs/en/
 +{{ relLangURL "articles" }}   →   /docs/en/articles
 +{{ relLangURL "style.css" }}  →   /docs/en/style.css
 +```
 +
 +#### Input begins with a slash
 +
 +If the input begins with a slash, the resulting URL will be incorrect when the `baseURL` includes a subdirectory. With a leading slash, the function returns a URL relative to the protocol+host section of the `baseURL`.
 +
 +With `baseURL = https://example.org/`
 +
 +```go-html-template
 +{{ relLangURL "/" }}          →   /en/
 +{{ relLangURL "/articles" }}  →   /en/articles
 +{{ relLangURL "/style.css" }} →   /en/style.css
++```
 +
 +With `baseURL = https://example.org/docs/`
 +
 +```go-html-template
 +{{ relLangURL "/" }}          →   /en/
 +{{ relLangURL "/articles" }}  →   /en/articles
 +{{ relLangURL "/style.css" }} →   /en/style.css
 +```
 +
 +{{% note %}}
 +The last three examples are not desirable in most situations. As a best practice, never include a leading slash when using this function.
 +{{% /note %}}
index 1ff213b70b1e52c4116cd4dc0f5944165539080e,0000000000000000000000000000000000000000..6b45b2131163c116cd6a55779d7cfad2505aa59f
mode 100644,000000..100644
--- /dev/null
@@@ -1,56 -1,0 +1,70 @@@
- linkTitle: relref
- description: Returns the relative permalink to a page.
- categories: [functions]
 +---
 +title: urls.RelRef
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the relative permalink to a page at the given path.
++categories: []
 +keywords: []
-   returnType: template.HTML
-   signatures: [urls.RelRef . PAGE]
- relatedFunctions:
-   - urls.Ref
-   - urls.RelRef
++action:
 +  aliases: [relref]
- This function takes two arguments:
- - The context of the page from which to resolve relative paths, typically the current page (`.`)
- - The path to a page, with or without a file extension, with or without an anchor. A path without a leading `/` is first resolved relative to the given context, then to the remainder of the site.
++  related:
++    - functions/urls/Ref
++    - methods/page/Ref
++    - methods/page/RelRef
++  returnType: string
++  signatures:
++    - urls.RelRef PAGE PATH
++    - urls.RelRef PAGE OPTIONS
 +aliases: [/functions/relref]
 +---
 +
- `{{ relref . "/about" }}`|`http://example.org/`|`/about/`
- `{{ relref . "/about" }}`|`http://example.org/x/`|`/x/about/`
++The first argument is the context of the page from which to resolve relative paths, typically the current page.
 +
++The second argument is a path to a page, with or without a file extension, with or without an anchor. A path without a leading `/` is first resolved relative to the given context, then to the remainder of the site. Alternatively, provide an [options map](#options) instead of a path.
++.
 +```go-html-template
 +{{ relref . "about" }}
 +{{ relref . "about#anchor" }}
 +{{ relref . "about.md" }}
 +{{ relref . "about.md#anchor" }}
 +{{ relref . "#anchor" }}
 +{{ relref . "/blog/my-post" }}
 +{{ relref . "/blog/my-post.md" }}
 +```
 +
 +The permalink returned is relative to the protocol+host portion of the baseURL specified in the site configuration. For example:
 +
 +Code|baseURL|Permalink
 +:--|:--|:--
- Hugo emits an error or warning if the page cannot be uniquely resolved. The error behavior is configurable; see [Ref and RelRef Configuration](/content-management/cross-references/#ref-and-relref-configuration).
++`{{ relref . "/about" }}`|`https://example.org/`|`/about/`
++`{{ relref . "/about" }}`|`https://example.org/x/`|`/x/about/`
++
++## Options
++
++Instead of specifying a path, you can also provide an options map:
++
++path
++: (`string`) The path to the page, relative to the content directory. Required.
++
++lang
++: (`string`) The language (site) to search for the page. Default is the current language. Optional.
++
++outputFormat
++: (`string`) The output format to search for the page. Default is the current output format. Optional.
 +
 +To return the relative permalink to another language version of a page:
 +
 +```go-html-template
 +{{ relref . (dict "path" "about.md" "lang" "fr") }}
 +```
 +
 +To return the relative permalink to another Output Format of a page:
 +
 +```go-html-template
 +{{ relref . (dict "path" "about.md" "outputFormat" "rss") }}
 +```
 +
- This function is used by Hugo's built-in [`relref`](/content-management/shortcodes/#ref-and-relref) shortcode. For a detailed explanation of how to leverage this shortcode for content management, see [Links and Cross References](/content-management/cross-references/).
++By default, Hugo will throw an error and fail the build if it cannot resolve the path. You can change this to a warning in your site configuration, and specify a URL to return when the path cannot be resolved.
 +
++{{< code-toggle file=hugo >}}
++refLinksErrorLevel = 'warning'
++refLinksNotFoundURL = '/some/other/url'
++{{< /code-toggle >}}
index fa1f9af73555777c6ff3fabb3e9202faec3d5b3b,0000000000000000000000000000000000000000..9320c2827fc53ce4dd033d1991f061c647e56110
mode 100644,000000..100644
--- /dev/null
@@@ -1,71 -1,0 +1,66 @@@
- linkTitle: relURL
 +---
 +title: urls.RelURL
- categories: [functions]
 +description: Returns a relative URL.
- menu:
-   docs:
-     parent: functions
- function:
++categories: []
 +keywords: []
-   returnType: template.HTML
++action:
 +  aliases: [relURL]
- relatedFunctions:
-   - urls.AbsLangURL
-   - urls.AbsURL 
-   - urls.RelLangURL
-   - urls.RelURL
++  related:
++    - functions/urls/AbsLangURL
++    - functions/urls/AbsURL 
++    - functions/urls/RelLangURL
++  returnType: string
 +  signatures: [urls.RelURL INPUT]
 +aliases: [/functions/relurl]
 +---
 +
 +With multilingual configurations, use the [`relLangURL`] function instead. The URL returned by this function depends on:
 +
 +- Whether the input begins with a slash
 +- The `baseURL` in site configuration
 +
 +### Input does not begin with a slash
 +
 +If the input does not begin with a slash, the resulting URL will be correct regardless of the `baseURL`.
 +
 +With `baseURL = https://example.org/`
 +
 +```go-html-template
 +{{ relURL "" }}           →   /
 +{{ relURL "articles" }}   →   /articles
 +{{ relURL "style.css" }}  →   /style.css
 +```
 +
 +With `baseURL = https://example.org/docs/`
 +
 +```go-html-template
 +{{ relURL "" }}           →   /docs/
 +{{ relURL "articles" }}   →   /docs/articles
 +{{ relURL "style.css" }}  →   /docs/style.css
 +```
 +
 +#### Input begins with a slash
 +
 +If the input begins with a slash, the resulting URL will be incorrect when the `baseURL` includes a subdirectory. With a leading slash, the function returns a URL relative to the protocol+host section of the `baseURL`.
 +
 +With `baseURL = https://example.org/`
 +
 +```go-html-template
 +{{ relURL "/" }}          →   /
 +{{ relURL "/articles" }}  →   /articles
 +{{ relURL "style.css" }}  →   /style.css
 +```
 +
 +With `baseURL = https://example.org/docs/`
 +
 +```go-html-template
 +{{ relURL "/" }}          →   /
 +{{ relURL "/articles" }}  →   /articles
 +{{ relURL "/style.css" }} →   /style.css
 +```
 +
 +{{% note %}}
 +The last three examples are not desirable in most situations. As a best practice, never include a leading slash when using this function.
 +{{% /note %}}
 +
 +[`relLangURL`]: /functions/urls/rellangurl/
index 3c80a92f80727ef41a70ac2971b42f88f8e5733e,0000000000000000000000000000000000000000..bf44a82d1ce5b16f1db3bd6b0a692011dc41508f
mode 100644,000000..100644
--- /dev/null
@@@ -1,69 -1,0 +1,63 @@@
- linkTitle: urlize
- description: Takes a string, sanitizes it for usage in URLs, and converts spaces to hyphens.
- categories: [functions]
 +---
 +title: urls.URLize
- menu:
-   docs:
-     parent: functions
- function:
++description: Returns the given string, sanitized for usage in a URL.
++categories: []
 +keywords: []
- relatedFunctions:
-   - urls.Anchorize
-   - urls.URLize
++action:
 +  aliases: [urlize]
++  related:
++    - functions/urls/Anchorize
 +  returnType: string
 +  signatures: [urls.URLize INPUT]
- The following examples pull from a content file with the following front matter:
 +aliases: [/functions/urlize]
 +---
 +
- {{< code-toggle file="content/blog/greatest-city.md" fm=true copy=false >}}
- title = "The World's Greatest City"
- location = "Chicago IL"
- tags = ["pizza","beer","hot dogs"]
++{{% include "/functions/urls/_common/anchorize-vs-urlize.md" %}}
 +
- The following might be used as a partial within a [single page template][singletemplate]:
++## Example
++
++Use the `urlize` function to create a link to a [term] page.
++
++Consider this site configuration:
++
++{{< code-toggle file=hugo >}}
++[taxonomies]
++author = 'authors'
++{{< /code-toggle >}}
++
++And this front matter:
++
++{{< code-toggle file=content/books/les-miserables.md fm=true >}}
++title = 'Les Misérables'
++authors = ['Victor Hugo']
 +{{< /code-toggle >}}
 +
- {{< code file="layouts/partials/content-header.html" >}}
- <header>
-   <h1>{{ .Title }}</h1>
-   {{ with .Params.location }}
-     <div><a href="/locations/{{ . | urlize }}">{{ . }}</a></div>
-   {{ end }}
-   <!-- Creates a list of tags for the content and links to each of their pages -->
-   {{ with .Params.tags }}
-     <ul>
-       {{ range .}}
-         <li>
-           <a href="/tags/{{ . | urlize }}">{{ . }}</a>
-         </li>
-       {{ end }}
-     </ul>
-   {{ end }}
- </header>
- {{< /code >}}
++The published site will have this structure:
 +
- The preceding partial would then output to the rendered page as follows:
++```text
++public/
++├── authors/
++│   ├── victor-hugo/
++│   │   └── index.html
++│   └── index.html
++├── books/
++│   ├── les-miserables/
++│   │   └── index.html
++│   └── index.html
++└── index.html
++```
 +
- ```html
- <header>
-   <h1>The World&#39;s Greatest City</h1>
-   <div><a href="/locations/chicago-il">Chicago IL</a></div>
-   <ul>
-     <li>
-       <a href="/tags/pizza">pizza</a>
-     </li>
-     <li>
-       <a href="/tags/beer">beer</a>
-     </li>
-     <li>
-       <a href="/tags/hot-dogs">hot dogs</a>
-     </li>
-   </ul>
- </header>
++To create a link to the term page:
 +
- [singletemplate]: /templates/single-page-templates/
++```go-html-template
++{{ $taxonomy := "authors" }}
++{{ $term := "Victor Hugo" }}
++{{ with index .Site.Taxonomies $taxonomy (urlize $term) }}
++  <a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a>
++{{ end }}
 +```
 +
++To generate a list of term pages associated with a given content page, use the [`GetTerms`] method on a `Page` object.
++
++[`GetTerms`]: /methods/page/getterms/
++[term]: /getting-started/glossary/#term
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0f01bcf78eef311c5f2a96d27930793fb8b0dc2a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,35 @@@
++---
++# Do not remove front matter.
++---
++
++The [`anchorize`] and [`urlize`] functions are similar: 
++
++[`anchorize`]: /functions/urls/anchorize
++[`urlize`]: /functions/urls/urlize
++
++- Use the `anchorize` function to generate an HTML `id` attribute value
++- Use the `urlize` function to sanitize a string for usage in a URL
++
++For example:
++
++```go-html-template
++{{ $s := "A B C" }}
++{{ $s | anchorize }} → a-b-c
++{{ $s | urlize }} → a-b-c
++
++{{ $s := "a b   c" }}
++{{ $s | anchorize }} → a-b---c
++{{ $s | urlize }} → a-b-c
++
++{{ $s := "< a, b, & c >" }}
++{{ $s | anchorize }} → -a-b--c-
++{{ $s | urlize }} → a-b-c
++
++{{ $s := "main.go" }}
++{{ $s | anchorize }} → maingo
++{{ $s | urlize }} → main.go
++
++{{ $s := "Hugö" }}
++{{ $s | anchorize }} → hugö
++{{ $s | urlize }} → hug%C3%B6
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5f16feeeb33f2e9289438684dcc475d38848868b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: URL functions
++linkTitle: urls
++description: Template functions to work with URLs.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: functions
++---
++
++Use these functions to work with URLs.
index 3265e1782626b527cd8de9e7555a8e29ae69939d,0000000000000000000000000000000000000000..780b96a623c2340a0aa1e0aa5ff082d277fdf1cb
mode 100644,000000..100644
--- /dev/null
@@@ -1,20 -1,0 +1,20 @@@
- categories: [getting started]
- keywords: [usage,docs]
 +---
 +title: Getting started
 +linkTitle: Overview
 +description: Quick start and guides for installing Hugo on your preferred operating system.
++categories: []
++keywords: []
 +menu:
 +  docs:
 +    identifier: getting-started-overview
 +    parent: getting-started
 +    weight: 10
 +weight: 10
 +aliases: [/overview/introduction/]
 +---
 +
 +If this is your first time using Hugo and you've [already installed Hugo on your machine][installed], we recommend the [quick start]. You can also use [external learning resources] to learn Hugo.
 +
 +[installed]: /installation/
 +[quick start]: /getting-started/quick-start/
 +[external learning resources]: /getting-started/external-learning-resources/
index 02c4ea9986e34958b6868df86265d6beeb4b8164,0000000000000000000000000000000000000000..607301d3afd97af417d0258d5a852d5dace65eb6
mode 100644,000000..100644
--- /dev/null
@@@ -1,219 -1,0 +1,218 @@@
- categories: [fundamentals, getting started]
 +---
 +title: Configure markup
 +description: Configure rendering of markup to HTML.
- {{< code-toggle file=hugo copy=false >}}
++categories: [getting started,fundamentals]
 +keywords: [configuration,highlighting]
 +menu:
 +  docs:
 +    parent: getting-started
 +    weight: 50
 +weight: 50
 +slug: configuration-markup
 +toc: true
 +---
 +
 +## Default handler
 +
 +By default, Hugo uses [Goldmark] to render markdown to HTML.
 +
- {{< code-toggle config="markup.goldmark" />}}
++{{< code-toggle file=hugo >}}
 +[markup]
 +defaultMarkdownHandler = 'goldmark'
 +{{< /code-toggle >}}
 +
 +Files with the `.md` or `.markdown` extension are processed as markdown, provided that you have not specified a different [content format] using the `markup` field in front matter.
 +
 +To use a different renderer for markdown files, specify one of `asciidocext`, `org`, `pandoc`, or `rst` in your site configuration.
 +
 +defaultMarkdownHandler|Description
 +:--|:--
 +`asciidocext`|[AsciiDoc]
 +`goldmark`|[Goldmark]
 +`org`|[Emacs Org Mode]
 +`pandoc`|[Pandoc]
 +`rst`|[reStructuredText]
 +
 +To use Asciidoc, Pandoc, or reStructuredText you must install the relevant renderer and update your [security policy].
 +
 +{{% note %}}
 +Unless you need a unique capability provided by one of the alternate markdown handlers, we strongly recommend that you use the default setting. Goldmark is fast, well maintained, conforms to the [CommonMark] specification, and is compatible with [GitHub Flavored Markdown] (GFM).
 +
 +[commonmark]: https://spec.commonmark.org/0.30/
 +[github flavored markdown]: https://github.github.com/gfm/
 +{{% /note %}}
 +
 +[asciidoc]: https://asciidoc.org/
 +[content format]: /content-management/formats/#list-of-content-formats
 +[emacs org mode]: https://orgmode.org/
 +[goldmark]: https://github.com/yuin/goldmark/
 +[pandoc]: https://pandoc.org/
 +[restructuredtext]: https://docutils.sourceforge.io/rst.html
 +[security policy]: /about/security-model/#security-policy
 +
 +## Goldmark
 +
 +This is the default configuration for the Goldmark markdown renderer:
 +
- For details on the extensions, refer to [this section](https://github.com/yuin/goldmark/#built-in-extensions) of the Goldmark documentation
++{{< code-toggle config=markup.goldmark />}}
 +
++For details on the extensions, refer to the [Goldmark documentation](https://github.com/yuin/goldmark/#built-in-extensions).
 +
 +Some settings explained:
 +
 +hardWraps
 +: By default, Goldmark ignores newlines within a paragraph. Set to `true` to render newlines as `<br>` elements.
 +
 +unsafe
 +: By default, Goldmark does not render raw HTML and potentially dangerous links. If you have lots of inline HTML and/or JavaScript, you may need to turn this on.
 +
 +typographer
 +: The typographer extension replaces certain character combinations with HTML entities as specified below:
 +
 +Markdown|Replaced by|Description
 +:--|:--|:--
 +`...`|`&hellip;`|horizontal ellipsis
 +`'`|`&rsquo;`|apostrophe
 +`--`|`&ndash;`|en dash
 +`---`|`&mdash;`|em dash
 +`«`|`&laquo;`|left angle quote
 +`“`|`&ldquo;`|left double quote
 +`‘`|`&lsquo;`|left single quote
 +`»`|`&raquo;`|right angle quote
 +`”`|`&rdquo;`|right double quote
 +`’`|`&rsquo;`|right single quote
 +
- : The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-Ascii characters after accent normalization, and `blackfriday` will make the IDs compatible with Blackfriday, the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/urls/anchorize) template func.
 +attribute
 +: Enable custom attribute support for titles and blocks by adding attribute lists inside single curly brackets (`{.myclass class="class1 class2" }`) and placing it _after the Markdown element it decorates_, on the same line for titles and on a new line directly below for blocks.
 +
 +Hugo supports adding attributes (e.g. CSS classes) to Markdown blocks, e.g. tables, lists, paragraphs etc.
 +
 +A blockquote with a CSS class:
 +
 +```md
 +> foo
 +> bar
 +{.myclass}
 +```
 +
 +There are some current limitations: For tables you can currently only apply it to the full table, and for lists the `ul`/`ol`-nodes only, e.g.:
 +
 +```md
 +* Fruit
 +  * Apple
 +  * Orange
 +  * Banana
 +  {.fruits}
 +* Dairy
 +  * Milk
 +  * Cheese
 +  {.dairies}
 +{.list}
 +```
 +
 +Note that attributes in [code fences](/content-management/syntax-highlighting/#highlighting-in-code-fences) must come after the opening tag, with any other highlighting processing instruction, e.g.:
 +
 +````txt
 +```go {.myclass linenos=table,hl_lines=[8,"15-17"],linenostart=199}
 +// ... code
 +```
 +````
 +
 +autoHeadingIDType ("github")
- {{< code-toggle config="markup.asciidocExt" />}}
++: The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-ASCII characters after accent normalization, and `blackfriday` will make the IDs compatible with Blackfriday, the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/urls/anchorize) template func.
 +
 +## Asciidoc
 +
 +This is the default configuration for the AsciiDoc markdown renderer:
 +
- {{< code-toggle config="markup.highlight" />}}
++{{< code-toggle config=markup.asciidocExt />}}
 +
 +attributes
 +: (`map`) Variables to be referenced in your AsciiDoc file. This is a list of variable name/value maps. See Asciidoctor’s [attributes].
 +
 +[attributes]: https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#attributes-and-substitutions
 +
 +backend:
 +: (`string`) Don’t change this unless you know what you are doing.
 +
 +extensions
 +: (`[]string`) Possible extensions are `asciidoctor-html5s`, `asciidoctor-bibtex`, `asciidoctor-diagram`, `asciidoctor-interdoc-reftext`, `asciidoctor-katex`, `asciidoctor-latex`, `asciidoctor-mathematical`, and `asciidoctor-question`.
 +
 +failureLevel
 +: (`string`) The minimum logging level that triggers a non-zero exit code (failure).
 +
 +noHeaderOrFooter
 +: (`bool`) Output an embeddable document, which excludes the header, the footer, and everything outside the body of the document. Don’t change this unless you know what you are doing.
 +
 +preserveTOC
 +: (`bool`) By default, Hugo removes the table of contents generated by Asciidoctor and provides it through the built-in variable `.TableOfContents` to enable further customization and better integration with the various Hugo themes. This option can be set to true to preserve Asciidoctor’s TOC in the generated page.
 +
 +safeMode
 +: (`string`) Safe mode level `unsafe`, `safe`, `server`, or `secure`. Don’t change this unless you know what you are doing.
 +
 +sectionNumbers
 +: (`bool`) Auto-number section titles.
 +
 +trace
 +: (`bool`) Include backtrace information on errors.
 +
 +verbose
 +: (`bool`) Verbosely print processing information and configuration file checks to stderr.
 +
 +workingFolderCurrent
 +: (`bool`) Sets the working directory to be the same as that of the AsciiDoc file being processed, so that [include] will work with relative paths. This setting uses the asciidoctor cli parameter --base-dir and attribute outdir=. For rendering diagrams with [asciidoctor-diagram], `workingFolderCurrent` must be set to `true`.
 +
 +[asciidoctor-diagram]: https://asciidoctor.org/docs/asciidoctor-diagram/
 +[include]: https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#include-files
 +
 +Notice that for security concerns only extensions that do not have path separators (either `\`, `/` or `.`) are allowed. That means that extensions can only be invoked if they are in the Ruby's `$LOAD_PATH` (ie. most likely, the extension has been installed by the user). Any extension declared relative to the website's path will not be accepted.
 +
 +Example of how to set extensions and attributes:
 +
 +```yml
 +[markup.asciidocExt]
 +    extensions = ["asciidoctor-html5s", "asciidoctor-diagram"]
 +    workingFolderCurrent = true
 +    [markup.asciidocExt.attributes]
 +        my-base-url = "https://example.com/"
 +        my-attribute-name = "my value"
 +```
 +
 +In a complex Asciidoctor environment it is sometimes helpful to debug the exact call to your external helper with all
 +parameters. Run Hugo with `-v`. You will get an output like
 +
 +```txt
 +INFO 2019/12/22 09:08:48 Rendering book-as-pdf.adoc with C:\Ruby26-x64\bin\asciidoctor.bat using asciidoc args [--no-header-footer -r asciidoctor-html5s -b html5s -r asciidoctor-diagram --base-dir D:\prototypes\hugo_asciidoc_ddd\docs -a outdir=D:\prototypes\hugo_asciidoc_ddd\build -] ...
 +```
 +
 +## Highlight
 +
 +This is the default `highlight` configuration. Note that some of these settings can be set per code block, see [Syntax Highlighting](/content-management/syntax-highlighting/).
 +
- {{< code-toggle config="markup.tableOfContents" />}}
++{{< code-toggle config=markup.highlight />}}
 +
 +For `style`, see these galleries:
 +
 +* [Short snippets](https://xyproto.github.io/splash/docs/all.html)
 +* [Long snippets](https://xyproto.github.io/splash/docs/longer/all.html)
 +
 +For CSS, see [Generate Syntax Highlighter CSS](/content-management/syntax-highlighting/#generate-syntax-highlighter-css).
 +
 +## Table of contents
 +
++{{< code-toggle config=markup.tableOfContents />}}
 +
 +These settings only works for the Goldmark renderer:
 +
 +startLevel
 +: The heading level, values starting at 1 (`h1`), to start render the table of contents.
 +
 +endLevel
 +: The heading level, inclusive, to stop render the table of contents.
 +
 +ordered
 +: If `true`, generates an ordered list instead of an unordered list.
 +
 +## Render hooks
 +
 +See [Markdown Render Hooks](/templates/render-hooks/).
index 2187540ae6434432c7dc3435b0909c01da563807,0000000000000000000000000000000000000000..5e861759b001621cb2e775a5c727099496b07e88
mode 100644,000000..100644
--- /dev/null
@@@ -1,848 -1,0 +1,851 @@@
- categories: [fundamentals,getting started]
 +---
 +title: Configure Hugo
 +linkTitle: Configuration
 +description: How to configure your Hugo site.
- aliases: [/overview/source-directory/,/overview/configuration/]
++categories: [getting started,fundamentals]
 +keywords: [configuration,toml,yaml,json]
 +menu:
 +  docs:
 +    parent: getting-started
 +    weight: 40
 +weight: 40
- {{< new-in "0.110.0" >}}
 +toc: true
++aliases: [/overview/source-directory/,/overview/configuration/]
 +---
 +
 +## Configuration file
 +
 +Hugo uses the `hugo.toml`, `hugo.yaml`, or `hugo.json` (if found in the
 +site root) as the default site configuration file.
 +
 +The user can choose to override that default with one or more site configuration files using the command-line `--config` switch.
 +
 +Examples:
 +
 +```txt
 +hugo --config debugconfig.toml
 +hugo --config a.toml,b.toml,c.toml
 +```
 +
 +{{% note %}}
 +Multiple site configuration files can be specified as a comma-separated string to the `--config` switch.
 +{{% /note %}}
 +
 +## hugo.toml vs config.toml
 +
 +In Hugo 0.110.0 we changed the default configuration base file name to `hugo`, e.g. `hugo.toml`. We will still look for `config.toml` etc., but we recommend you eventually rename it (but you need to wait if you want to support older Hugo versions). The main reason we're doing this is to make it easier for code editors and build tools to identify this as a Hugo configuration file and project.
 +
- {{< code-toggle file="hugo" dataKey="config_helpers.mergeStrategy" skipHeader=true />}}
++{{< new-in 0.110.0 >}}
 +
 +## Configuration directory
 +
 +In addition to using a single site configuration file, one can use the `configDir` directory (default to `config/`) to maintain easier organization and environment specific settings.
 +
 +- Each file represents a configuration root object, such as `params.toml` for `[Params]`, `menu(s).toml` for `[Menu]`, `languages.toml` for `[Languages]` etc...
 +- Each file's content must be top-level, for example:
 +
 +{{< code-toggle file="hugo" copy=false >}}
 +[Params]
 +  foo = "bar"
 +{{< /code-toggle >}}
 +
 +{{< code-toggle file="params" copy=false >}}
 +foo = "bar"
 +{{< /code-toggle >}}
 +
 +- Each directory holds a group of files containing settings unique to an environment.
 +- Files can be localized to become language specific.
 +
 +```txt
 +├── config
 +│   ├── _default
 +│   │   ├── hugo.toml
 +│   │   ├── languages.toml
 +│   │   ├── menus.en.toml
 +│   │   ├── menus.zh.toml
 +│   │   └── params.toml
 +│   ├── production
 +│   │   ├── hugo.toml
 +│   │   └── params.toml
 +│   └── staging
 +│       ├── hugo.toml
 +│       └── params.toml
 +```
 +
 +Considering the structure above, when running `hugo --environment staging`, Hugo will use every setting from `config/_default` and merge `staging`'s on top of those.
 +
 +Let's take an example to understand this better. Let's say you are using Google Analytics for your website. This requires you to specify a [Google tag ID] in your site configuration:
 +
 +[Google tag ID]: https://support.google.com/tagmanager/answer/12326985?hl=en
 +
 +{{< code-toggle file=hugo copy=false >}}
 +[services.googleAnalytics]
 +ID = 'G-XXXXXXXXX'
 +{{< /code-toggle >}}
 +
 +Now consider the following scenario:
 +
 +1. You don't want to load the analytics code when running `hugo server`.
 +2. You want to use different Google tag IDs for your production and staging environments. For example:
 +
 +    - `G-PPPPPPPPP` for production
 +    - `G-SSSSSSSSS` for staging
 +
 +To satisfy these requirements, configure your site as follows:
 +
 +1. `config/_default/hugo.toml`
 +
 +    Exclude the `services.googleAnalytics` section. This will prevent loading of the analytics code when you run `hugo server`.
 +
 +    By default, Hugo sets its `environment` to `development` when running `hugo server`. In the absence of a `config/development` directory, Hugo uses the `config/_default` directory.
 +
 +2. `config/production/hugo.toml`
 +
 +    Include this section only:
 +
 +    {{< code-toggle file=hugo copy=false >}}
 +    [services.googleAnalytics]
 +    ID = 'G-PPPPPPPPP'
 +    {{< /code-toggle >}}
 +
 +    You do not need to include other parameters in this file. Include only those parameters that are specific to your production environment. Hugo will merge these parameters with the default configuration.
 +
 +    By default, Hugo sets its `environment` to `production` when running `hugo`. The analytics code will use the `G-PPPPPPPPP` tag ID.
 +
 +3. `config/staging/hugo.toml`
 +
 +    Include this section only:
 +
 +    {{< code-toggle file=hugo copy=false >}}
 +    [services.googleAnalytics]
 +    ID = 'G-SSSSSSSSS'
 +    {{< /code-toggle >}}
 +
 +    You do not need to include other parameters in this file. Include only those parameters that are specific to your staging environment. Hugo will merge these parameters with the default configuration.
 +
 +    To build your staging site, run `hugo --environment staging`. The analytics code will use the `G-SSSSSSSSS` tag ID.
 +
 +## Merge configuration from themes
 +
 +The configuration value for `_merge` can be one of:
 +
 +none
 +: No merge.
 +
 +shallow
 +: Only add values for new keys.
 +
 +deep
 +: Add values for new keys, merge existing.
 +
 +Note that you don't need to be so verbose as in the default setup below; a `_merge` value higher up will be inherited if not set.
 +
- Pass down default configuration values (front matter) to pages in the content tree. The options in site configuration is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
++{{< code-toggle file=hugo dataKey="config_helpers.mergeStrategy" skipHeader=true />}}
 +
 +## All configuration settings
 +
 +The following is the full list of Hugo-defined variables. Users may choose to override those values in their site configuration file(s).
 +
 +### archetypeDir
 +
 +**Default value:** "archetypes"
 +
 +The directory where Hugo finds archetype files (content templates). {{% module-mounts-note %}}
 +
 +### assetDir
 +
 +**Default value:** "assets"
 +
 +The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/). {{% module-mounts-note %}}
 +
 +### baseURL
 +
 +The absolute URL (protocol, host, path, and trailing slash) of your published site (e.g., `https://www.example.org/docs/`).
 +
 +### build
 +
 +See [Configure Build](#configure-build)
 +
 +### buildDrafts (false)
 +
 +**Default value:** false
 +
 +Include drafts when building.
 +
 +### buildExpired
 +
 +**Default value:** false
 +
 +Include content already expired.
 +
 +### buildFuture
 +
 +**Default value:** false
 +
 +Include content with publishdate in the future.
 +
 +### caches
 +
 +See [Configure File Caches](#configure-file-caches)
 +
 +### cascade
 +
- Enable to turn relative URLs into absolute. See [details](/content-management/urls/#canonical-urls).
++Pass down down default configuration values (front matter) to pages in the content tree. The options in site config is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
++
++{{% note %}}
++For a website in a single language, define the `[[cascade]]` in [Front Matter](/content-management/front-matter#front-matter-cascade). For a multilingual website, define the `[[cascade]]` in [Site Config](../../getting-started/configuration/#cascade).
++
++To remain consistent and prevent unexpected behaviour, do not mix these strategies.
++{{% /note %}}
 +
 +### canonifyURLs
 +
 +**Default value:** false
 +
- Enable Emoji emoticons support for page content; see the [Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet/).
++Enable to turn relative URLs into absolute. See&nbsp;[details](/content-management/urls/#canonical-urls).
 +
 +### cleanDestinationDir
 +
 +**Default value:** false
 +
 +When building, removes files from destination not found in static directories.
 +
 +### contentDir
 +
 +**Default value:** "content"
 +
 +The directory from where Hugo reads content files. {{% module-mounts-note %}}
 +
 +### copyright
 +
 +**Default value:** ""
 +
 +Copyright notice for your site, typically displayed in the footer.
 +
 +### dataDir
 +
 +**Default value:** "data"
 +
 +The directory from where Hugo reads data files. {{% module-mounts-note %}}
 +
 +### defaultContentLanguage
 +
 +**Default value:** "en"
 +
 +Content without language indicator will default to this language.
 +
 +### defaultContentLanguageInSubdir
 +
 +**Default value:** false
 +
 +Render the default content language in subdir, e.g. `content/en/`. The site root `/` will then redirect to `/en/`.
 +
 +### disableAliases
 +
 +**Default value:** false
 +
 +Will disable generation of alias redirects. Note that even if `disableAliases` is set, the aliases themselves are preserved on the page. The motivation with this is to be able to generate 301 redirects in an `.htaccess`, a Netlify `_redirects` file or similar using a custom output format.
 +
 +### disableHugoGeneratorInject
 +
 +**Default value:** false
 +
 +Hugo will, by default, inject a generator meta tag in the HTML head on the _home page only_. You can turn it off, but we would really appreciate if you don't, as this is a good way to watch Hugo's popularity on the rise.
 +
 +### disableKinds
 +
 +**Default value:** []
 +
 +Enable disabling of all pages of the specified *Kinds*. Allowed values in this list: `"page"`, `"home"`, `"section"`, `"taxonomy"`, `"term"`, `"RSS"`, `"sitemap"`, `"robotsTXT"`, `"404"`.
 +
 +### disableLiveReload
 +
 +**Default value:**  false
 +
 +Disable automatic live reloading of browser window.
 +
 +### disablePathToLower
 +
 +**Default value:** false
 +
 +Do not convert the url/path to lowercase.
 +
 +### enableEmoji
 +
 +**Default value:** false
 +
- ### googleAnalytics
- **Default value:** ""
- Google Analytics tracking ID.
++Enable Emoji emoticons support for page content; see the [emoji shortcode quick reference guide](/quick-reference/emojis/).
 +
 +### enableGitInfo
 +
 +**Default value:** false
 +
 +Enable `.GitInfo` object for each page (if the Hugo site is versioned by Git). This will then update the `Lastmod` parameter for each page using the last git commit date for that content file.
 +
 +### enableInlineShortcodes
 +
 +**Default value:** false
 +
 +Enable inline shortcode support. See [Inline Shortcodes](/templates/shortcode-templates/#inline-shortcodes).
 +
 +### enableMissingTranslationPlaceholders
 +
 +**Default value:** false
 +
 +Show a placeholder instead of the default value or an empty string if a translation is missing.
 +
 +### enableRobotsTXT
 +
 +**Default value:** false
 +
 +Enable generation of `robots.txt` file.
 +
 +### frontmatter
 +
 +See [Front matter Configuration](#configure-front-matter).
 +
- The path element used during pagination (`https://example.com/page/2`).
 +### hasCJKLanguage
 +
 +**Default value:** false
 +
 +If true, auto-detect Chinese/Japanese/Korean Languages in the content. This will make `.Summary` and `.WordCount` behave correctly for CJK languages.
 +
 +### imaging
 +
 +See [image processing configuration](/content-management/image-processing/#imaging-configuration).
 +
 +### languageCode
 +
 +**Default value:** ""
 +
 +A language tag as defined by [RFC 5646](https://datatracker.ietf.org/doc/html/rfc5646). This value is used to populate:
 +
 +- The `<language>` element in the internal [RSS template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml)
 +- The `lang` attribute of the `<html>` element in the internal [alias template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/alias.html)
 +
 +### languages
 +
 +See [Configure Languages](/content-management/multilingual/#configure-languages).
 +
 +### disableLanguages
 +
 +See [Disable a Language](/content-management/multilingual/#disable-a-language)
 +
 +### markup
 +
 +See [Configure Markup](/getting-started/configuration-markup).
 +
 +### mediaTypes
 +
 +See [Configure Media Types](/templates/output-formats/#media-types).
 +
 +### menus
 +
 +See [Menus](/content-management/menus/#define-in-site-configuration).
 +
 +### minify
 +
 +See [Configure Minify](#configure-minify)
 +
 +### module
 +
 +Module configuration see [module configuration](/hugo-modules/configuration/).
 +
 +### newContentEditor
 +
 +**Default value:** ""
 +
 +The editor to use when creating new content.
 +
 +### noChmod
 +
 +**Default value:** false
 +
 +Don't sync permission mode of files.
 +
 +### noTimes
 +
 +**Default value:** false
 +
 +Don't sync modification time of files.
 +
 +### outputFormats
 +
 +See [Configure Output Formats](#configure-additional-output-formats).
 +
 +### paginate
 +
 +**Default value:** 10
 +
 +Default number of elements per page in [pagination](/templates/pagination/).
 +
 +### paginatePath
 +
 +**Default value:** "page"
 +
- Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs. See [details](/content-management/urls/#relative-urls).
++The path element used during pagination (`https://example.org/page/2`).
 +
 +### permalinks
 +
 +See [Content Management](/content-management/urls/#permalinks).
 +
 +### pluralizeListTitles
 +
 +**Default value:** true
 +
 +Pluralize titles in lists.
 +
 +### publishDir
 +
 +**Default value:** "public"
 +
 +The directory to where Hugo will write the final static site (the HTML files etc.).
 +
 +### related
 +
 +See [Related Content](/content-management/related/#configure-related-content).
 +
 +### relativeURLs
 +
 +**Default value:** false
 +
- ### rssLimit
- **Default value:** -1 (unlimited)
- Maximum number of items in the RSS feed.
++Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs. See&nbsp;[details](/content-management/urls/#relative-urls).
 +
 +### refLinksErrorLevel
 +
 +**Default value:** "ERROR"
 +
 +When using `ref` or `relref` to resolve page links and a link cannot be resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
 +
 +### refLinksNotFoundURL
 +
 +URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
 +
 +### removePathAccents
 +
 +**Default value:** false
 +
 +Removes [non-spacing marks](https://www.compart.com/en/unicode/category/Mn) from [composite characters](https://en.wikipedia.org/wiki/Precomposed_character) in content paths.
 +
 +```text
 +content/post/hügó.md → https://example.org/post/hugo/
 +```
 +
- {{< code-toggle config="build" />}}
 +### sectionPagesMenu
 +
 +See [Menus](/content-management/menus/#define-automatically).
 +
 +### security
 +
 +See [Security Policy](/about/security-model/#security-policy)
 +
 +### sitemap
 +
 +Default [sitemap configuration](/templates/sitemap-template/#configuration).
 +
 +### summaryLength
 +
 +**Default value:** 70
 +
 +The length of text in words to show in a [`.Summary`](/content-management/summaries/#automatic-summary-splitting).
 +
 +### taxonomies
 +
 +See [Configure Taxonomies](/content-management/taxonomies#configure-taxonomies).
 +
 +### theme
 +
 +: See [module configuration](/hugo-modules/configuration/#module-configuration-imports) for how to import a theme.
 +
 +### themesDir
 +
 +**Default value:** "themes"
 +
 +The directory where Hugo reads the themes from.
 +
 +### timeout
 +
 +**Default value:** "30s"
 +
 +Timeout for generating page contents, specified as a [duration](https://pkg.go.dev/time#Duration) or in seconds. *Note:*&nbsp;this is used to bail out of recursive content generation. You might need to raise this limit if your pages are slow to generate (e.g., because they require large image processing or depend on remote contents).
 +
 +### timeZone
 +
 +The time zone (or location), e.g. `Europe/Oslo`, used to parse front matter dates without such information and in the [`time`] function. The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
 +
 +### title
 +
 +Site title.
 +
 +### titleCaseStyle
 +
 +**Default value:** "ap"
 +
 +See [Configure Title Case](#configure-title-case)
 +
 +### uglyURLs
 +
 +**Default value:** false
 +
 +When enabled, creates URL of the form `/filename.html` instead of `/filename/`.
 +
 +### watch
 +
 +**Default value:** false
 +
 +Watch filesystem for changes and recreate as needed.
 +
 +{{% note %}}
 +If you are developing your site on a \*nix machine, here is a handy shortcut for finding a configuration option from the command line:
 +```txt
 +cd ~/sites/yourhugosite
 +hugo config | grep emoji
 +```
 +
 +which shows output like
 +
 +```txt
 +enableemoji: true
 +```
 +{{% /note %}}
 +
 +## Configure build
 +
 +The `build` configuration section contains global build-related configuration options.
 +
- buildStats {{< new-in "0.115.1" >}}
++{{< code-toggle config=build />}}
 +
- {{< new-in "0.112.0" >}}
++buildStats {{< new-in 0.115.1 >}}
 +: When enabled, creates a `hugo_stats.json` file in the root of your project. This file contains arrays of the `class` attributes, `id` attributes, and tags of every HTML element within your published site. Use this file as data source when [removing unused CSS] from your site. This process is also known as pruning, purging, or tree shaking.
 +
 +[removing unused CSS]: /hugo-pipes/postprocess/#css-purging-with-postcss
 +
 +Exclude `class` attributes, `id` attributes, or tags from `hugo_stats.json` with the `disableClasses`, `disableIDs`, and `disableTags` keys.
 +
 +{{% note %}}
 +With v0.115.0 and earlier this feature was enabled by setting `writeStats` to `true`. Although still functional, the `writeStats` key will be deprecated in a future release.
 +
 +Given that CSS purging is typically limited to production builds, place the `buildStats` object below [config/production].
 +
 +[config/production]: /getting-started/configuration/#configuration-directory
 +
 +Built for speed, there may be "false positive" detections (e.g., HTML elements that are not HTML elements) while parsing the published site. These "false positives" are infrequent and inconsequential.
 +{{% /note %}}
 +
 +Due to the nature of partial server builds, new HTML entities are added while the server is running, but old values will not be removed until you restart the server or run a regular `hugo` build.
 +
 +cachebusters
 +: See [Configure Cache Busters](#configure-cache-busters)
 +
 +noJSConfigInAssets
 +: Turn off writing a `jsconfig.json` into your `/assets` folder with mapping of imports from running [js.Build](/hugo-pipes/js). This file is intended to help with intellisense/navigation inside code editors such as [VS Code](https://code.visualstudio.com/). Note that if you do not use `js.Build`, no file will be written.
 +
 +useResourceCacheWhen
 +: When to use the cached resources in `/resources/_gen` for PostCSS and ToCSS. Valid values are `never`, `always` and `fallback`. The last value means that the cache will be tried if PostCSS/extended version is not available.
 +
 +## Configure cache busters
 +
- {{< code-toggle file="hugo" >}}
++{{< new-in 0.112.0 >}}
 +
 +The `build.cachebusters` configuration option was added to support development using Tailwind 3.x's JIT compiler where a `build` configuration may look like this:
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle file=hugo >}}
 +[build]
 +  [build.buildStats]
 +    enable = true
 +  [[build.cachebusters]]
 +    source = "assets/watching/hugo_stats\\.json"
 +    target = "styles\\.css"
 +  [[build.cachebusters]]
 +    source = "(postcss|tailwind)\\.config\\.js"
 +    target = "css"
 +  [[build.cachebusters]]
 +    source = "assets/.*\\.(js|ts|jsx|tsx)"
 +    target = "js"
 +  [[build.cachebusters]]
 +    source = "assets/.*\\.(.*)$"
 +    target = "$1"
 +{{< /code-toggle >}}
 +
 +Some key points in the above are `writeStats = true`, which writes a `hugo_stats.json` file on each build with HTML classes etc. that's used in the rendered output. Changes to this file will trigger a rebuild of the `styles.css` file. You also need to add `hugo_stats.json` to Hugo's server watcher. See [Hugo Starter Tailwind Basic](https://github.com/bep/hugo-starter-tailwind-basic) for a running example.
 +
 +source
 +: A regexp matching file(s) relative to one of the virtual component directories in Hugo, typically `assets/...`.
 +
 +target
 +: A regexp matching the keys in the resource cache that should be expired when `source` changes. You can use the matching regexp groups from `source` in the expression, e.g. `$1`.
 +
 +## Configure server
 +
 +This is only relevant when running `hugo server`, and it allows to set HTTP headers during development, which allows you to test out your Content Security Policy and similar. The configuration format matches [Netlify's](https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file) with slightly more powerful [Glob matching](https://github.com/gobwas/glob):
 +
- {{< code-toggle file="config/development/server">}}
++{{< code-toggle file=hugo >}}
 +[server]
 +[[server.headers]]
 +for = "/**"
 +
 +[server.headers.values]
 +X-Frame-Options = "DENY"
 +X-XSS-Protection = "1; mode=block"
 +X-Content-Type-Options = "nosniff"
 +Referrer-Policy = "strict-origin-when-cross-origin"
 +Content-Security-Policy = "script-src localhost:1313"
 +{{< /code-toggle >}}
 +
 +Since this is "development only", it may make sense to put it below the `development` environment:
 +
- {{< code-toggle file="config/development/server">}}
++{{< code-toggle file=config/development/server >}}
 +[[headers]]
 +for = "/**"
 +
 +[headers.values]
 +X-Frame-Options = "DENY"
 +X-XSS-Protection = "1; mode=block"
 +X-Content-Type-Options = "nosniff"
 +Referrer-Policy = "strict-origin-when-cross-origin"
 +Content-Security-Policy = "script-src localhost:1313"
 +{{< /code-toggle >}}
 +
 +You can also specify simple redirects rules for the server. The syntax is again similar to Netlify's.
 +
 +Note that a `status` code of 200 will trigger a [URL rewrite](https://docs.netlify.com/routing/redirects/rewrites-proxies/), which is what you want in SPA situations, e.g:
 +
- {{< new-in "0.103.0" >}}
++{{< code-toggle file=config/development/server >}}
 +[[redirects]]
 +from = "/myspa/**"
 +to = "/myspa/"
 +status = 200
 +force = false
 +{{< /code-toggle >}}
 +
 +Setting `force=true` will make a redirect even if there is existing content in the path. Note that before Hugo 0.76 `force` was the default behavior, but this is inline with how Netlify does it.
 +
 +## 404 server error page {#_404-server-error-page}
 +
- {{< code-toggle file="config/development/server" copy=false >}}
++{{< new-in 0.103.0 >}}
 +
 +Hugo will, by default, render all 404 errors when running `hugo server` with the `404.html` template. Note that if you have already added one or more redirects to your [server configuration](#configure-server), you need to add the 404 redirect explicitly, e.g:
 +
- Set `titleCaseStyle` to specify the title style used by the [title](/functions/strings/title) template function and the automatic section titles in Hugo.
++{{< code-toggle file=config/development/server >}}
 +[[redirects]]
 +from   = "/**"
 +to     = "/404.html"
 +status = 404
 +{{< /code-toggle >}}
 +
 +## Configure title case
 +
- Can be one of:
++By default, Hugo follows the capitalization rules published in the [Associated Press Stylebook] when creating automatic section titles, and when transforming strings with the [`strings.Title`] function.
++
++Change this behavior by setting `titleCaseStyle` in your site configuration to any of the values below:
 +
- * `ap` (default), the capitalization rules in the [Associated Press (AP) Stylebook]
- * `chicago`, the [Chicago Manual of Style]
- * `go`, Go's convention of capitalizing every word.
- * `firstupper`, capitalize the first letter of the first word.
- * `none`, no capitalization.
++ap
++: Use the capitalization rules published in the [Associated Press Stylebook].
 +
- [Associated Press (AP) Stylebook]: https://www.apstylebook.com/
++chicago
++: Use the capitalization rules published in the [Chicago Manual of Style].
 +
- {{< code-toggle file="hugo" >}}
++go
++: Capitalize the first letter of every word.
++
++firstupper
++: Capitalize the first letter of the first word.
++
++none
++: Disable transformation of automatic section titles, and disable the transformation performed by the `strings.Title` function. This is useful if you would prefer to manually capitalize section titles as needed, and to bypass opinionated theme usage of the `strings.Title` function.
++
++[`strings.Title`]: /functions/strings/title
++[Associated Press Stylebook]: https://www.apstylebook.com/
 +[Chicago Manual of Style]: https://www.chicagomanualofstyle.org/home.html
 +[site configuration]: /getting-started/configuration/#configure-title-case
 +
 +## Configuration environment variables
 +
 +HUGO_NUMWORKERMULTIPLIER
 +: Can be set to increase or reduce the number of workers used in parallel processing in Hugo. If not set, the number of logical CPUs will be used.
 +
 +## Configuration lookup order
 +
 +Similar to the template [lookup order], Hugo has a default set of rules for searching for a configuration file in the root of your website's source directory as a default behavior:
 +
 +1. `./hugo.toml`
 +2. `./hugo.yaml`
 +3. `./hugo.json`
 +
 +In your configuration file, you can direct Hugo as to how you want your website rendered, control your website's menus, and arbitrarily define site-wide parameters specific to your project.
 +
 +## Example configuration
 +
 +The following is a typical example of a configuration file. The values nested under `params:` will populate the [`.Site.Params`] variable for use in [templates]:
 +
- **Note:** This works, but we recommend you use the newer and more powerful [includeFiles and excludeFiles](/hugo-modules/configuration/#module-configuration-mounts) mount options.
++{{< code-toggle file=hugo >}}
 +baseURL: "https://yoursite.example.com/"
 +title: "My Hugo Site"
 +permalinks:
 +  posts: /:year/:month/:title/
 +params:
 +  Subtitle: "Hugo is Absurdly Fast!"
 +  AuthorName: "Jon Doe"
 +  GitHubUser: "spf13"
 +  ListOfFoo:
 +    - "foo1"
 +    - "foo2"
 +  SidebarRecentLimit: 5
 +{{< /code-toggle >}}
 +
 +## Configure with environment variables
 +
 +In addition to the 3 configuration options already mentioned, configuration key-values can be defined through operating system environment variables.
 +
 +For example, the following command will effectively set a website's title on Unix-like systems:
 +
 +```txt
 +$ env HUGO_TITLE="Some Title" hugo
 +```
 +
 +This is really useful if you use a service such as Netlify to deploy your site. Look at the Hugo docs [Netlify configuration file](https://github.com/gohugoio/hugoDocs/blob/master/netlify.toml) for an example.
 +
 +{{% note %}}
 +Names must be prefixed with `HUGO_` and the configuration key must be set in uppercase when setting operating system environment variables.
 +
 +To set configuration parameters, prefix the name with `HUGO_PARAMS_`
 +{{% /note %}}
 +
 +If you are using snake_cased variable names, the above will not work. Hugo determines the delimiter to use by the first character after `HUGO`. This allows you to define environment variables on the form `HUGOxPARAMSxAPI_KEY=abcdefgh`, using any [allowed](https://stackoverflow.com/questions/2821043/allowed-characters-in-linux-environment-variable-names#:~:text=So%20names%20may%20contain%20any,not%20begin%20with%20a%20digit.) delimiter.
 +
 +## Ignore content and data files when rendering
 +
- {{< code-toggle copy=false file="hugo" >}}
++{{% note %}}
++This works, but we recommend you use the newer and more powerful [includeFiles and excludeFiles](/hugo-modules/configuration/#module-configuration-mounts) mount options.
++{{% /note %}}
 +
 +To exclude specific files from the `content`, `data`, and `i18n` directories when rendering your site, set `ignoreFiles` to one or more regular expressions to match against the absolute file path.
 +
 +To ignore files ending with `.foo` or `.boo`:
 +
- {{< code-toggle copy=false file="hugo" >}}
++{{< code-toggle file=hugo >}}
 +ignoreFiles = ['\.foo$', '\.boo$']
 +{{< /code-toggle >}}
 +
 +To ignore a file using the absolute file path:
 +
- {{< code-toggle config="frontmatter" />}}
++{{< code-toggle file=hugo >}}
 +ignoreFiles = ['^/home/user/project/content/test\.md$']
 +{{< /code-toggle >}}
 +
 +## Configure front matter
 +
 +### Configure dates
 +
 +Dates are important in Hugo, and you can configure how Hugo assigns dates to your content pages. You do this by adding a `frontmatter` section to your `hugo.toml`.
 +
 +The default configuration is:
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle config=frontmatter />}}
 +
 +If you, as an example, have a non-standard date parameter in some of your content, you can override the setting for `date`:
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle file=hugo >}}
 +[frontmatter]
 +date = ["myDate", ":default"]
 +{{< /code-toggle >}}
 +
 +The `:default` is a shortcut to the default settings. The above will set `.Date` to the date value in `myDate` if present, if not we will look in `date`,`publishDate`, `lastmod` and pick the first valid date.
 +
 +In the list to the right, values starting with ":" are date handlers with a special meaning (see below). The others are just names of date parameters (case insensitive) in your front matter configuration. Also note that Hugo have some built-in aliases to the above: `lastmod` => `modified`, `publishDate` => `pubdate`, `published` and `expiryDate` => `unpublishdate`. With that, as an example, using `pubDate` as a date in front matter, will, by default, be assigned to `.PublishDate`.
 +
 +The special date handlers are:
 +
 +`:fileModTime`
 +: Fetches the date from the content file's last modification timestamp.
 +
 +An example:
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle file=hugo >}}
 +[frontmatter]
 +lastmod = ["lastmod", ":fileModTime", ":default"]
 +{{< /code-toggle >}}
 +
 +The above will try first to extract the value for `.Lastmod` starting with the `lastmod` front matter parameter, then the content file's modification timestamp. The last, `:default` should not be needed here, but Hugo will finally look for a valid date in `:git`, `date` and then `publishDate`.
 +
 +`:filename`
 +: Fetches the date from the content file's file name. For example, `2018-02-22-mypage.md` will extract the date `2018-02-22`. Also, if `slug` is not set, `mypage` will be used as the value for `.Slug`.
 +
 +An example:
 +
- {{< code-toggle config="minify" />}}
++{{< code-toggle file=hugo >}}
 +[frontmatter]
 +date  = [":filename", ":default"]
 +{{< /code-toggle >}}
 +
 +The above will try first to extract the value for `.Date` from the file name, then it will look in front matter parameters `date`, `publishDate` and lastly `lastmod`.
 +
 +`:git`
 +: This is the Git author date for the last revision of this content file. This will only be set if `--enableGitInfo` is set or `enableGitInfo = true` is set in site configuration.
 +
 +## Configure additional output formats
 +
 +Hugo v0.20 introduced the ability to render your content to multiple output formats (e.g., to JSON, AMP html, or CSV). See [Output Formats] for information on how to add these values to your Hugo project's configuration file.
 +
 +## Configure minify
 +
 +Default configuration:
 +
- {{< code-toggle config="caches" />}}
++{{< code-toggle config=minify />}}
 +
 +## Configure file caches
 +
 +Since Hugo 0.52 you can configure more than just the `cacheDir`. This is the default configuration:
 +
- `:cacheDir`
- : See [Configure cacheDir](#configure-cachedir).
++{{< code-toggle config=caches />}}
 +
 +You can override any of these cache settings in your own `hugo.toml`.
 +
 +### The keywords explained
 +
- `:project`
- : The base directory name of the current Hugo project. This means that, in its default setting, every project will have separated file caches, which means that when you do `hugo --gc` you will not touch files related to other Hugo projects running on the same PC.
++cacheDir
++: (`string`) See [Configure cacheDir](#configure-cachedir).
 +
- `:resourceDir`
- : This is the value of the `resourceDir` configuration option.
++project
++: (`string`) The base directory name of the current Hugo project. This means that, in its default setting, every project will have separated file caches, which means that when you do `hugo --gc` you will not touch files related to other Hugo projects running on the same PC.
 +
- : This is the duration before a cache entry will be evicted, -1 means forever and 0 effectively turns that particular cache off. Uses Go's `time.Duration`, so valid values are `"10s"` (10 seconds), `"10m"` (10 minutes) and `"10h"` (10 hours).
++resourceDir
++: (`string`) This is the value of the `resourceDir` configuration option.
 +
 +maxAge
- : The absolute path to where the files for this cache will be stored. Allowed starting placeholders are `:cacheDir` and `:resourceDir` (see above).
++: (`string`) This is the duration before a cache entry will be evicted, -1 means forever and 0 effectively turns that particular cache off. Uses Go's `time.Duration`, so valid values are `"10s"` (10 seconds), `"10m"` (10 minutes) and `"10h"` (10 hours).
 +
 +dir
++: (`string`) The absolute path to where the files for this cache will be stored. Allowed starting placeholders are `:cacheDir` and `:resourceDir` (see above).
 +
 +## Configuration format specs
 +
 +- [TOML Spec][toml]
 +- [YAML Spec][yaml]
 +- [JSON Spec][json]
 +
 +[`.Site.Params`]: /variables/site/
 +[directory structure]: /getting-started/directory-structure
 +[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf
 +[lookup order]: /templates/lookup-order/
 +[Output Formats]: /templates/output-formats/
 +[templates]: /templates/
 +[toml]: https://toml.io/en/latest
 +[yaml]: https://yaml.org/spec/
 +[static-files]: /content-management/static-files/
 +
- 1. In a `hugo_cache` directory below the OS user cache directory as defined by Go's [os.UserCacheDir](https://pkg.go.dev/os#UserCacheDir). On Unix systems, this is `$XDG_CACHE_HOME` as specified by [basedir-spec-latest](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) if non-empty, else `$HOME/.cache`. On MacOS, this is `$HOME/Library/Caches`. On Windows, this is`%LocalAppData%`. On Plan 9, this is `$home/lib/cache`. {{< new-in "0.116.0" >}}
 +## Configure cacheDir
 +
 +This is the directory where Hugo by default will store its file caches. See [Configure File Caches](#configure-file-caches).
 +
 +This can be set using the `cacheDir` config option or via the OS env variable `HUGO_CACHEDIR`.
 +
 +If this is not set, Hugo will use, in order of preference:
 +
 +1. If running on Netlify: `/opt/build/cache/hugo_cache/`. This means that if you run your builds on Netlify, all caches configured with `:cacheDir` will be saved and restored on the next build. For other CI vendors, please read their documentation. For an CircleCI example, see [this configuration](https://github.com/bep/hugo-sass-test/blob/6c3960a8f4b90e8938228688bc49bdcdd6b2d99e/.circleci/config.yml).
++1. In a `hugo_cache` directory below the OS user cache directory as defined by Go's [os.UserCacheDir](https://pkg.go.dev/os#UserCacheDir). On Unix systems, this is `$XDG_CACHE_HOME` as specified by [basedir-spec-latest](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) if non-empty, else `$HOME/.cache`. On MacOS, this is `$HOME/Library/Caches`. On Windows, this is`%LocalAppData%`. On Plan 9, this is `$home/lib/cache`. {{< new-in 0.116.0 >}}
 +1. In a  `hugo_cache_$USER` directory below the OS temp dir.
 +
 +If you want to know the current value of `cacheDir`, you can run `hugo config`, e.g: `hugo config | grep cachedir`.
 +
 +[`time`]: /functions/time/astime
index ecdda25cdb983c78dcb212bb2c805c4116ef12fb,0000000000000000000000000000000000000000..f91849375df90993b464dd0b10f4b0f4fd3ccb4f
mode 100644,000000..100644
--- /dev/null
@@@ -1,213 -1,0 +1,212 @@@
- categories: [fundamentals,getting started]
 +---
 +title: Directory structure
 +description: Each Hugo project is a directory, with subdirectories that contribute to the content, structure, behavior, and presentation of your site.
- aliases: [/overview/source-directory/]
++categories: [getting started,fundamentals]
 +keywords: [source, organization, directories]
 +menu:
 +  docs:
 +    parent: getting-started
 +    weight: 30
 +weight: 30
- ```text
 +toc: true
++aliases: [/overview/source-directory/]
 +---
 +
 +## Site skeleton
 +
 +Hugo generates a project skeleton when you create a new site. For example, this command:
 +
- │   └── default.md
++```sh
 +hugo new site my-site
 +```
 +
 +Creates this directory structure:
 +
 +```txt
 +my-site/
 +├── archetypes/
- │   └── default.md
++│   └── default.md
 +├── assets/
 +├── content/
 +├── data/
 +├── i18n/
 +├── layouts/
 +├── static/
 +├── themes/
 +└── hugo.toml         <-- site configuration
 +```
 +
 +Depending on requirements, you may wish to organize your site configuration into subdirectories:
 +
 +```txt
 +my-site/
 +├── archetypes/
- │   └── _default/
- │       └── hugo.toml
++│   └── default.md
 +├── assets/
 +├── config/           <-- site configuration
- │   └── default.md
++│   └── _default/
++│       └── hugo.toml
 +├── content/
 +├── data/
 +├── i18n/
 +├── layouts/
 +├── static/
 +└── themes/
 +```
 +
 +When you build your site, Hugo creates a `public` directory, and typically a `resources` directory as well:
 +
 +```txt
 +my-site/
 +├── archetypes/
- │   └── _default/
- │       └── hugo.toml
++│   └── default.md
 +├── assets/
 +├── config/       
-     │   ├── content/
-     │   │   ├── books/
-     │   │   │   ├── _index.md
-     │   │   │   ├── book-1.md
-     │   │   │   └── book-2.md
-     │   │   └── _index.md
-     │   ├── themes/
-     │   │   └── my-theme/
-     │   └── hugo.toml
++│   └── _default/
++│       └── hugo.toml
 +├── content/
 +├── data/
 +├── i18n/
 +├── layouts/
 +├── public/       <-- created when you build your site
 +├── resources/    <-- created when you build your site
 +├── static/
 +└── themes/
 +```
 +
 +## Directories
 +
 +Each of the subdirectories contributes to the content, structure, behavior, or presentation of your site.
 +
 +archetypes
 +: The `archetypes` directory contains templates for new content. See&nbsp;[details](/content-management/archetypes/).
 +
 +assets
 +: The `assets` directory contains global resources typically passed through an asset pipeline. This includes resources such as images, CSS, Sass, JavaScript, and TypeScript. See&nbsp;[details](/hugo-pipes/introduction/).
 +
 +config
 +: The `config` directory contains your site configuration, possibly split into multiple subdirectories and files. For projects with minimal configuration or projects that do not need to behave differently in different environments, a single configuration file named `hugo.toml` in the root of the project is sufficient. See&nbsp;[details](/getting-started/configuration/#configuration-directory).
 +
 +content
 +: The `content` directory contains the markup files (typically markdown) and page resources that comprise the content of your site. See&nbsp;[details](/content-management/organization/).
 +
 +data
 +: The `data` directory contains data files (JSON, TOML, YAML, or XML) that augment content, configuration, localization, and navigation. See&nbsp;[details](/templates/data-templates/).
 +
 +i18n
 +: The `i18n` directory contains translation tables for multilingual sites. See&nbsp;[details](/content-management/multilingual/).
 +
 +layouts
 +: The layouts directory contains templates to transform content, data, and resources into a complete website. See&nbsp;[details](/templates/).
 +
 +public
 +: The `public` directory contains the published website, generated when you run the `hugo` command. Hugo recreates this directory and its content as needed. See&nbsp;[details](/getting-started/usage/#build-your-site).
 +
 +resources
 +: The `resources` directory contains cached output from Hugo's asset pipelines, generated when you run the `hugo` or `hugo server` commands. By default this cache directory includes CSS and images. Hugo recreates this directory and its content as needed.
 +
 +static
 +: The `static` directory contains files that will be copied to the public directory when you build your site. For example: `favicon.ico`, `robots.txt`, and files that verify site ownership. Before the introduction of [page bundles](/getting-started/glossary/#page-bundle) and [asset pipelines](/hugo-pipes/introduction/), the `static` directory was also used for images, CSS, and JavaScript. See&nbsp;[details](/content-management/static-files/).
 +
 +themes
 +: The `themes` directory contains one or more [themes](/getting-started/glossary/#theme), each in its own subdirectory.
 +
 +## Union file system
 +
 +Hugo creates a union file system, allowing you to mount two or more directories to the same location. For example, let's say your home directory contains a Hugo project in one directory, and shared content in another:
 +
 +```text
 +home/
 +└── user/
 +    ├── my-site/            
- {{< code-toggle file=hugo copy=false >}}
++    │   ├── content/
++    │   │   ├── books/
++    │   │   │   ├── _index.md
++    │   │   │   ├── book-1.md
++    │   │   │   └── book-2.md
++    │   │   └── _index.md
++    │   ├── themes/
++    │   │   └── my-theme/
++    │   └── hugo.toml
 +    └── shared-content/     
 +        └── films/
 +            ├── _index.md
 +            ├── film-1.md
 +            └── film-2.md
 +```
 +
 +You can include the shared content when you build your site using mounts. In your site configuration:
 +
-         │   ├── books/
-         │   │   ├── _index.md
-         │   │   ├── book-1.md
-         │   │   └── book-2.md
-         │   ├── films/
-         │   │   ├── _index.md
-         │   │   ├── film-1.md
-         │   │   └── film-2.md
-         │   └── _index.md
++{{< code-toggle file=hugo >}}
 +[[module.mounts]]
 +source = 'content'
 +target = 'content'
 +
 +[[module.mounts]]
 +source = '/home/user/shared-content'
 +target = 'content'
 +{{< /code-toggle >}}
 +
 +{{% note %}}
 +When you overlay one directory on top of another, you must mount both directories.
 +
 +If you think you need a symbolic link in your project directory, use Hugo's union file system instead.
 +{{% /note %}}
 +
 +After mounting, the union file system has this structure:
 +
 +```text
 +home/
 +└── user/
 +    └── my-site/
 +        ├── content/
-         │   └── my-theme/
++        │   ├── books/
++        │   │   ├── _index.md
++        │   │   ├── book-1.md
++        │   │   └── book-2.md
++        │   ├── films/
++        │   │   ├── _index.md
++        │   │   ├── film-1.md
++        │   │   └── film-2.md
++        │   └── _index.md
 +        ├── themes/
++        │   └── my-theme/
 +        └── hugo.toml
 +```
 +
 +{{% note %}}
 +When two or more files have the same path, the order of precedence follows the order of the mounts. For example, if the shared content directory contains `books/book-1.md`, it will be ignored because the project's content directory was mounted first.
 +{{% /note %}}
 +
 +You can mount directories to `archetypes`, `assets`, `content`, `data`, `i18n`, `layouts`, and `static`. See&nbsp;[details](/hugo-modules/configuration/#module-configuration-mounts).
 +
 +You can also mount directories from Git repositories using Hugo Modules. See&nbsp;[details](/hugo-modules/).
 +
 +## Theme skeleton
 +
 +Hugo generates a functional theme skeleton when you create a new theme. For example, this command:
 +
 +```text
 +hugo new theme my-theme
 +```
 +
 +Creates this directory structure (subdirectories not shown):
 +
 +```text
 +my-theme/
 +├── archetypes/
 +├── assets/
 +├── content/
 +├── data/
 +├── i18n/
 +├── layouts/
 +├── static/
 +├── LICENSE
 +├── README.md
 +├── hugo.toml
 +└── theme.toml
 +```
 +
 +Using the union file system described above, Hugo mounts each of these directories to the corresponding location in the project. When two files have the same path, the file in the project directory takes precedence. This allows you, for example, to override a theme's template by placing a copy in the same location within the project directory.
 +
 +If you are simultaneously using components from two or more themes or modules, and there's a path collision, the first mount takes precedence.
index 4337c51a4f0b881281cb316b947d5404d87e4e1f,0000000000000000000000000000000000000000..634439bc6a35ce9ec71ba914b445cc95807e2144
mode 100644,000000..100644
--- /dev/null
@@@ -1,36 -1,0 +1,37 @@@
 +---
 +title: External learning resources
 +description: A list of tutorials and books on Hugo.
++categories: [getting started]
 +keywords: [books, tutorials, learning, usage]
 +menu:
 +  docs:
 +    parent: getting-started
 +    weight: 70
 +weight: 70
 +---
 +
 +## Books
 +
 +### Hugo In Action
 +
 +[![Hugo In Action](hia.jpg)](https://www.manning.com/books/hugo-in-action)
 +
 +Hugo in Action is a step-by-step guide to using Hugo to create static websites. Working with a complete example website and source code samples, you’ll learn how to build and host a low-maintenance, high-performance site that will wow your users and stay stable without relying on a third-party server.
 +
 +[Hugo In Action Home Page](https://www.manning.com/books/hugo-in-action)
 +
 +### Build Websites with Hugo
 +
 +[Build Websites with Hugo - Fast Web Development with Markdown (2020)](https://pragprog.com/titles/bhhugo/) by Brian P. Hogan.
 +
 +## Beginner tutorials
 +
 +### Hugo tutorial by CloudCannon
 +
 +[Step-by-step written tutorial](https://cloudcannon.com/community/learn/hugo-beginner-tutorial/) to teach you the basics of creating a Hugo site.
 +
 +## Video tutorials
 +
 +* Mike Dane explains the various features of Hugo via dedicated tutorials on [YouTube](https://www.youtube.com/watch?list=PLLAZ4kZ9dFpOnyRlyS-liKL5ReHDcj4G3&v=qtIqKaDlqXo).
 +
 +* [Introduction to building your first Hugo site](https://cloudcannon.com/community/learn/hugo-beginner-tutorial/) by Mike Neumegen.
index 759cb1cd132d22c6d494a407f08fb0da47c9c355,0000000000000000000000000000000000000000..edf64ab8946139f7b887718002421c34f7336fb7
mode 100644,000000..100644
--- /dev/null
@@@ -1,274 -1,0 +1,375 @@@
- type: glossary
 +---
 +title: Glossary of terms
 +description: Terms commonly used throughout the documentation.
++categories: [getting started]
 +keywords: [glossary]
 +menu:
 +  docs:
 +    parent: getting-started
 +    weight: 60
 +weight: 60
- <!-- Use level 3 headings for each term in the glossary. -->
- ### action
++# Use level 6 headings for each term in the glossary.
 +---
 +
- ### archetype
++###### action
 +
 +See [template action](#template-action).
 +
- A template for new content. See [details](/content-management/archetypes/).
++###### archetype
 +
- ### argument
++A template for new content. See&nbsp;[details](/content-management/archetypes/).
 +
- ### array
++###### argument
 +
 +A [scalar](#scalar), [array](#array), [slice](#slice), [map](#map), or [object](#object) passed to a [function](#function), [method](#method), or [shortcode](#shortcode).
 +
- A numbered sequence of elements. Unlike Go's [slice](#slice) data type, an array has a fixed length. See the [Go&nbsp;documentation](https://go.dev/ref/spec#Array_types) for details.
++###### array
 +
- ### bool
++A numbered sequence of elements. Unlike Go's [slice](#slice) data type, an array has a fixed length. [Elements](#element) within an array can be [scalars](#scalar), slices, [maps](#map), pages, or other arrays. See the [Go&nbsp;documentation](https://go.dev/ref/spec#Array_types) for details.
 +
- ### boolean
++###### bool
 +
 +See [boolean](#boolean).
 +
- ### branch bundle
++###### boolean
 +
 +A data type with two possible values, either `true` or `false`.
 +
- A [page bundle](#page-bundle) with an&nbsp;_index.md file and zero or more [resources](#resource). Analogous to a physical branch, a branch bundle may have descendants including regular pages, [leaf bundles](/getting-started/glossary/#leaf-bundle), and other branch bundles. See [details](/content-management/page-bundles/).
++###### branch bundle
 +
- ### build
++A [page bundle](#page-bundle) with an&nbsp;_index.md file and zero or more [resources](#resource). Analogous to a physical branch, a branch bundle may have descendants including regular pages, [leaf bundles](/getting-started/glossary/#leaf-bundle), and other branch bundles. See&nbsp;[details](/content-management/page-bundles/).
 +
- ### bundle
++###### build
 +
 +To generate a static site that includes HTML files and assets such as images, CSS, and JavaScript. The build process includes rendering and resource transformations.
 +
- ### cache
++###### bundle
 +
 +See [page bundle](#page-bundle).
 +
- ### collection
++###### cache
 +
 +A software component that stores data so that future requests for the same data are faster.
 +
- Typically, a collection of pages, but may also refer to an [array](#array),  [slice](#slice), or [map](#map). For example, the pages within a site's "articles" section are a page collection.
++###### chain
++
++Within a template, to connect one or more [identifiers](#identifier) with a dot. An identifier can represent a method, object, or field. For example, `.Site.Params.author.name` or `.Date.UTC.Hour`.
 +
- ### content format
++###### collection
 +
- A markup language for creating content. Typically markdown, but may also be HTML, AsciiDoc, Org, Pandoc, or reStructuredText. See [details](/content-management/formats/).
++An [array](#array), [slice](#slice), or [map](#map).
 +
- ### content type
++###### content format
 +
- ### content view
++A markup language for creating content. Typically markdown, but may also be HTML, AsciiDoc, Org, Pandoc, or reStructuredText. See&nbsp;[details](/content-management/formats/).
++
++###### content type
 +
 +A classification of content inferred from the top-level directory name or the `type` set in [front matter](#front-matter). Pages in the root of the content directory, including the home page, are of type "page". Accessed via `.Page.Type` in [templates](#template). See&nbsp;[details](/content-management/types/).
 +
- ### context
++###### content view
 +
 +A template called with the `.Page.Render` method. See&nbsp;[details](/templates/views/).
 +
- Represented by a period "." within a [template action](#template-action), context is the current location in a data structure. For example, while iterating over a [collection](#collection) of pages, the context within each iteration is the page's data structure. The context received by each template depends on template type and/or how it was called. See [details](/templates/introduction/#the-dot).
++###### context
++
++Represented by a dot "." within a [template action](#template-action), context is the current location in a data structure. For example, while iterating over a [collection](#collection) of pages, the context within each iteration is the page's data structure. The context received by each template depends on template type and/or how it was called. See&nbsp;[details](/templates/introduction/#the-dot).
++
++###### default sort order
++
++The default sort order for page collections. Hugo sorts by [weight](#weight), then by date (descending), then by link title, and then by file path.
++
++###### element
++
++A member of a slice or array.
++
++###### environment
++
++Typically one of `development`, `staging`, or `production`, each environment may exhibit different behavior depending on configuration and template logic. For example, in a production environment you might minify and fingerprint CSS, but that probably doesn't make sense in a development environment.
++
++When running the built-in development server with the `hugo server` command, the environment is set to `development`. When building your site with the `hugo` command, the environment is set to `production`. To override the environment value, use the `--environment` command line flag.
++
++To determine the current environment within a template, use the [`hugo.Environment`] function.
++
++[`hugo.Environment`]: /functions/hugo/environment
 +
- ### flag
++###### field
 +
- An option passed to a command-line program, beginning with one or two hyphens. See [details](/commands/hugo/).
++A predefined key/value pair in front matter such as `date` or `title`. See&nbsp;also&nbsp;[parameter](#parameter).
 +
- ### float
 +
- ### floating point
++###### flag
++
++An option passed to a command-line program, beginning with one or two hyphens. See&nbsp;[details](/commands/hugo/).
++
++###### float
 +
 +See [floating point](#floating-point).
 +
- ### function
++###### floating point
 +
 +A numeric data type with a fractional component. For example, `3.14159`.
 +
- Used within a [template action](#template-action), a function takes one or more [arguments](#argument) and returns a value. Unlike [methods](#method), functions are not associated with an [object](#object). See [details](/functions/).
++###### fragment
 +
- ### front matter
++The final segment of a URL, beginning with a hash (`#`) mark, that references an `id` attribute of an HTML element on the page.
 +
- ### identifier
++###### front matter
 +
 +Metadata at the beginning of each content page, separated from the content by format-specific delimiters. See&nbsp;[details](/content-management/front-matter/).
 +
- ### int
++###### function
++
++Used within a [template action](#template-action), a function takes one or more [arguments](#argument) and returns a value. Unlike [methods](#method), functions are not associated with an [object](#object). See&nbsp;[details](/functions/).
++
++###### global resource
++
++A file within the assets directory, or within any directory [mounted](/hugo-modules/configuration/#module-configuration-mounts) to the assets directory. Capture one or more global resources using the [`resources.Get`], [`resources.GetMatch`], [`resources.Match`], or [`resources.ByType`] functions.
++
++[`resources.Get`]: /functions/resources/get
++[`resources.GetMatch`]: /functions/resources/getmatch
++[`resources.Match`]: /functions/resources/match
++[`resources.ByType`]: /functions/resources/byType
++
++###### identifier
 +
 +A string that represents a variable, method, object, or field. It must conform to Go's [language specification](https://go.dev/ref/spec#Identifiers), beginning with a letter or underscore, followed by zero or more letters, digits, or underscores.
 +
- ### integer
++###### int
 +
 +See [integer](#integer).
 +
- ### internationalization
++###### integer
 +
 +A numeric data type without a fractional component. For example, `42`.
 +
- ### kind
++###### internationalization
 +
 +Software design and development efforts that enable [localization](#localization). See the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated i18n.
 +
- ### layout
++###### kind
 +
 +See [page kind](#page-kind).
 +
- ### leaf bundle
++###### layout
 +
 +See [template](#template).
 +
- A [page bundle](#page-bundle) with an index.md file and zero or more [resources](#resource). Analogous to a physical leaf, a leaf bundle is at the end of a branch. Hugo ignores content (but not resources) beneath the leaf bundle. See [details](/content-management/page-bundles/).
++###### leaf bundle
 +
- ### list page
++A [page bundle](#page-bundle) with an index.md file and zero or more [resources](#resource). Analogous to a physical leaf, a leaf bundle is at the end of a branch. Hugo ignores content (but not resources) beneath the leaf bundle. See&nbsp;[details](/content-management/page-bundles/).
 +
- ### localization
++###### list page
 +
 +Any [page kind](#page-kind) that receives a page [collection](#collection) in [context](#context). This includes the home page, [section pages](#section-page), [taxonomy pages](#taxonomy-page), and [term pages](#term-page).
 +
- Adaptation of a site to meet language and regional requirements. This includes translations, language-specific media, date and currency formats, etc. See [details](/content-management/multilingual/) and the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated l10n.
++###### localization
 +
- ### map
++Adaptation of a site to meet language and regional requirements. This includes translations, language-specific media, date and currency formats, etc. See&nbsp;[details](/content-management/multilingual/) and the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated l10n.
 +
- ### method
++###### map
 +
 +An unordered group of elements, each indexed by a unique key. See the [Go&nbsp;documentation](https://go.dev/ref/spec#Map_types) for details.
 +
- ### module
++###### markdown attribute
++
++A list of attributes, containing one or more key/value pairs, separated by spaces or commas, and wrapped by braces. Apply markdown attributes to images and block-level elements including blockquotes, fenced code blocks, headings, horizontal rules, lists, paragraphs, and tables. See&nbsp;[details](/getting-started/configuration-markup/#goldmark).
++
++###### marshal
++
++To transform a data structure into a serialized object. For example, transforming a [map](#map) into a JSON string. See [unmarshal](#unmarshal).
++
++###### method
 +
 +Used within a [template action](#template-action) and associated with an [object](#object), a method takes zero or more [arguments](#argument) and either returns a value or performs an action. For example, `.IsHome` is a method on the `.Page` object which returns `true` if the current page is the home page. See also [function](#function).
 +
- Like a [theme](#theme), a module is a packaged combination of [archetypes](#archetype), assets, content, data, [templates](#template), translation tables, static files, or configuration settings. A module may serve as the basis for a new site, or to augment an existing site. See [details](/hugo-modules/).
++###### module
 +
- ### object
++Like a [theme](#theme), a module is a packaged combination of [archetypes](#archetype), assets, content, data, [templates](#template), translation tables, static files, or configuration settings. A module may serve as the basis for a new site, or to augment an existing site. See&nbsp;[details](/hugo-modules/).
 +
- ### page bundle
++###### object
 +
 +A data structure with or without associated [methods](#method).
 +
- A directory that encapsulates both content and associated [resources](#resource). There are two types of page bundles: [leaf bundles](/getting-started/glossary/#leaf-bundle) and [branch bundles](/getting-started/glossary/#branch-bundle). See [details](/content-management/page-bundles/).
++###### ordered taxonomy
++
++Created by invoking the [`Alphabetical`] or [`ByCount`] method on a [taxonomy object](#taxonomy-object), which is a [map](#map), an ordered taxonomy is a [slice](#slice), where each element is an object that contains the [term](#term) and a slice of its [weighted pages](#weighted-page).
++
++[`Alphabetical`]: /methods/taxonomy/alphabetical
++[`ByCount`]: /methods/taxonomy/bycount
 +
- ### page kind
++###### output format
 +
- A classification of rendered pages, one of "home", "page", "section", "taxonomy", or "term". Accessed via `.Page.Kind` in [templates](#template). See&nbsp;[details](/templates/section-templates/#page-kinds).
++{{% include "methods/page/_common/output-format-definition.md" %}}
 +
- ### pager
++###### page bundle
 +
- ### paginate
++A directory that encapsulates both content and associated [resources](#resource). There are two types of page bundles: [leaf bundles](#leaf-bundle) and [branch bundles](#branch-bundle). See&nbsp;[details](/content-management/page-bundles/).
++
++###### page kind
++
++A classification of pages, one of `home`, `page`, `section`, `taxonomy`, or `term`. See&nbsp;[details](/templates/section-templates/#page-kinds).
++
++Note that there are also `RSS`, `sitemap`, `robotsTXT`, and `404` page kinds, but these are only available during the rendering of each of these respective page's kind and therefore *not* available in any of the `Pages` collections.
++
++###### page resource
++
++A file within a [page bundle](#page-bundle). Capture one or more page resources using any of the [`Resources`] methods on a `Page` object.
++
++[`Resources`]: /methods/page/resources/#methods
++
++###### pager
 +
 +Created during [pagination](#pagination), a pager contains a subset of a section list, and navigation links to other pagers.
 +
- ### pagination
++###### paginate
 +
 +To split a [section](#section) list into two or more [pagers](#pager) See&nbsp;[details](/templates/pagination/).
 +
- ### parameter
++###### pagination
 +
 +The process of [paginating](#paginate) a [section](#section) list.
 +
- Typically, a user-defined key/value pair at the site or page level, but may also refer to a configuration setting or an [argument](#argument).
++###### parameter
 +
- ### partial
++Typically, a user-defined key/value pair at the site or page level, but may also refer to a configuration setting or an [argument](#argument). See&nbsp;also&nbsp;[field](#field).
 +
- ### permalink
++###### partial
 +
 +A [template](#template) called from any other template including [shortcodes](#shortcode), [render hooks](#render-hook), and other partials. A partial either renders something or returns something. A partial can also call itself, for example, to [walk](#walk) a data structure.
 +
- The absolute URL of a rendered page, including scheme and host.
++###### permalink
 +
- ### pipe
++The absolute URL of a published resource or a rendered page, including scheme and host.
 +
- ### pipeline
++###### pipe
 +
 +See [pipeline](#pipeline).
 +
- ### publish
++###### pipeline
 +
 +Within a [template action](#template-action), a pipeline is a possibly chained sequence of values, [function](#function) calls, or [method](#method) calls. Functions and methods in the pipeline may take multiple [arguments](#argument).
 +
 +A pipeline may be *chained* by separating a sequence of commands with pipeline characters "|". In a chained pipeline, the result of each command is passed as the last argument to the following command. The output of the final command in the pipeline is the value of the pipeline. See the [Go&nbsp;documentation](https://pkg.go.dev/text/template#hdr-Pipelines) for details.
 +
- ### regular page
++###### publish
 +
 +See [build](#build).
 +
- ### render hook
++###### regular page
 +
 +Content with the "page" [page kind](#page-kind). See also [section page](#section-page).
 +
- A [template](#template) that overrides standard markdown rendering. See [details](/templates/render-hooks/).
++###### relative permalink
 +
- ### resource
++The host-relative URL of a published resource or a rendered page.
 +
- Hugo supports three types of resources: page resources (located in a [page bundle](/getting-started/glossary/#page-bundle)), global resources (located in the assets directory), and remote resources (typically accessed via HTTPS).
++###### render hook
++
++A [template](#template) that overrides standard markdown rendering. See&nbsp;[details](/templates/render-hooks/).
++
++###### remote resource
++
++A file on a remote server, accessible via HTTP or HTTPS with the [`resources.GetRemote`](/functions/resources/getremote) function.
++
++###### resource
 +
 +Any file consumed by the build process to augment or generate content, structure, behavior, or presentation. For example: images, videos, content snippets, CSS, Sass, JavaScript, and data.
 +
- ### scalar
++Hugo supports three types of resources: [global](#global-resource), [page](#page-resource), and [remote](#remote-resource)
 +
- ### section
++###### scalar
 +
 +A single value, one of [string](#string), [integer](#integer), [floating point](#floating-point), or [boolean](#boolean).
 +
- A top-level content directory, or any content directory with an&nbsp;_index.md file. A content directory with an&nbsp;_index.md file is also known as a [branch bundle](/getting-started/glossary/#branch-bundle). Section templates receive one or more page [collections](#collection) in [context](#context). See [details](/content-management/sections/).
++###### scratch pad
++
++Conceptually, a [map](#map) with [methods](#method) to set, get, update, and delete values. Attach the data structure to a `Page` object using the [`Scratch`] or [`Store`] methods, or created a locally scoped scratch pad using the [`newScratch`] function.
++
++[`Scratch`]: /methods/page/scratch
++[`Store`]: /methods/page/store
++[`newScratch`]: /functions/collections/newscratch
 +
- ### section page
++###### section
 +
- ### shortcode
++A top-level content directory, or any content directory with an&nbsp;_index.md file. A content directory with an&nbsp;_index.md file is also known as a [branch bundle](/getting-started/glossary/#branch-bundle). Section templates receive one or more page [collections](#collection) in [context](#context). See&nbsp;[details](/content-management/sections/).
++
++###### section page
 +
 +Content with the "section" [page kind](#page-kind). Typically a listing of [regular pages](#regular-page) and/or [section pages](#section-page) within the current [section](#section). See also [regular page](#regular-page).
 +
- A [template](#template) called from within markdown, taking zero or more [arguments](#argument). See [details](/content-management/shortcodes/).
++###### shortcode
 +
- ### slice
++A [template](#template) called from within markdown, taking zero or more [arguments](#argument). See&nbsp;[details](/content-management/shortcodes/).
 +
- A numbered sequence of elements. Unlike Go's [array](#array) data type, slices are dynamically sized. See the [Go&nbsp;documentation](https://go.dev/ref/spec#Slice_types) for details.
++###### slice
 +
- ### string
++A numbered sequence of elements. Unlike Go's [array](#array) data type, slices are dynamically sized. [Elements](#element) within a slice can be [scalars](#scalar), [arrays](#array), [maps](#map), pages, or other slices. See the [Go&nbsp;documentation](https://go.dev/ref/spec#Slice_types) for details.
 +
- ### taxonomy
++###### string
 +
 +A sequence of bytes. For example, `"What is 6 times 7?"`&nbsp;.
 +
- ### taxonomy page
++###### taxonomic weight
++
++Defined in front matter and unique to each taxonomy, this [weight](#weight) determines the sort order of page collections contained within a [taxonomy object](#taxonomy-object). See&nbsp;[details](/templates/taxonomy-templates/#assign-weight).
++
++###### taxonomy
 +
 +A group of related [terms](#term) used to classify content. For example, a "colors" taxonomy might include the terms "red", "green", and "blue". See&nbsp;[details](/content-management/taxonomies/).
 +
- ### template
++###### taxonomy object
++
++A [map](#map) of [terms](#term) and the [weighted pages](#weighted-page) associated with each term.
++
++###### taxonomy page
 +
 +Content with the "taxonomy" [page kind](#page-kind). Typically a listing of [terms](#term) within a given [taxonomy](#taxonomy).
 +
- ### template action
++###### template
 +
 +A file with [template actions](#template-action), located within the layouts directory of a project, theme, or module. See&nbsp;[details](/templates/).
 +
- ### term
++###### template action
 +
 +A data evaluation or control structure within a [template](#template), delimited by "{{"&nbsp;and&nbsp;"}}". See the [Go&nbsp;documentation](https://pkg.go.dev/text/template#hdr-Actions) for details.
 +
- ### term page
++###### term
 +
 +A member of a [taxonomy](#taxonomy), used to classify content. See&nbsp;[details](/content-management/taxonomies/).
 +
- ### theme
++###### term page
 +
 +Content with the "term" [page kind](#page-kind). Typically a listing of [regular pages](#regular-page) and [section pages](#section-page) with a given [term](#term).
 +
- ### token
++###### theme
 +
 +A packaged combination of [archetypes](#archetype), assets, content, data, [templates](#template), translation tables, static files, or configuration settings. A theme may serve as the basis for a new site, or to augment an existing site. See also [module](#module).
 +
- ### type
++###### token
 +
 +An identifier within a format string, beginning with a colon and replaced with a value when rendered. For example, use tokens in format strings for both [permalinks](/content-management/urls/#permalinks) and [dates](/functions/time/format/#localization).
 +
- ### variable
++###### type
 +
 +See [content type](#content-type).
 +
- A variable initialized within a [template action](#template-action).
++###### unmarshal
 +
- ### walk
++To transform a serialized object into a data structure. For example, transforming a JSON file into a [map](#map) that you can access within a template. See [marshal](#marshal).
 +
++###### variable
++
++A user-defined [identifier](#identifier) prefaced with a `$` symbol, representing a value of any data type, initialized or assigned within a [template action](#template-action). For example, `$foo`&nbsp;and&nbsp;`$bar` are variables.
++
++###### walk
 +
 +To recursively traverse a nested data structure. For example, rendering a multilevel menu.
++
++###### weight
++
++Used to position an element within a collection sorted by weight. Assign weights using non-zero integers. Lighter items float to the top, while heavier items sink to the bottom. Unweighted or zero-weighted elements are placed at the end of the collection. Weights are typically assigned to pages, menu entries, languages, and output formats.
++
++###### weighted page
++
++Contained within a [taxonomy object](#taxonomy-object), a weighted page is a [map](#map) with two elements: a `Page` object, and its [taxonomic weight](#taxonomic-weight) as defined in front matter. Access the elements using the `Page` and `Weight` keys.
index 24f2ba1fcbf7d69ea0e53edbdbafce6f1cf70b4a,0000000000000000000000000000000000000000..ce43124558b82f5b53888b6849fc3829cce4e4f6
mode 100644,000000..100644
--- /dev/null
@@@ -1,225 -1,0 +1,225 @@@
- baseURL = 'http://example.org/'
 +---
 +title: Quick start
 +description: Learn to create a Hugo site in minutes.
 +categories: [getting started]
 +keywords: [quick start,usage]
 +menu:
 +  docs:
 +    parent: getting-started
 +    weight: 20
 +weight: 20
 +toc: true
 +aliases: [/quickstart/,/overview/quickstart/]
 +---
 +
 +In this tutorial you will:
 +
 +1. Create a site
 +2. Add content
 +3. Configure the site
 +4. Publish the site
 +
 +## Prerequisites
 +
 +Before you begin this tutorial you must:
 +
 +1. [Install Hugo] (extended edition, v0.112.0 or later)
 +1. [Install Git]
 +
 +You must also be comfortable working from the command line.
 +
 +## Create a site
 +
 +### Commands
 +
 +{{% note %}}
 +**If you are a Windows user:**
 +
 +- Do not use the Command Prompt
 +- Do not use Windows PowerShell
 +- Run these commands from [PowerShell] or a Linux terminal such as WSL or Git Bash
 +
 +PowerShell and Windows PowerShell [are different applications].
 +
 +[PowerShell]: https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows
 +[are different applications]: https://learn.microsoft.com/en-us/powershell/scripting/whats-new/differences-from-windows-powershell?view=powershell-7.3
 +{{% /note %}}
 +
 +Run these commands to create a Hugo site with the [Ananke] theme. The next section provides an explanation of each command.
 +
 +```text
 +hugo new site quickstart
 +cd quickstart
 +git init
 +git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
 +echo "theme = 'ananke'" >> hugo.toml
 +hugo server
 +```
 +
 +View your site at the URL displayed in your terminal. Press `Ctrl + C` to stop Hugo's development server.
 +
 +### Explanation of commands
 +
 +Create the [directory structure] for your project in the `quickstart` directory.
 +
 +```text
 +hugo new site quickstart
 +```
 +
 +Change the current directory to the root of your project.
 +
 +```text
 +cd quickstart
 +```
 +
 +Initialize an empty Git repository in the current directory.
 +
 +```text
 +git init
 +```
 +
 +Clone the [Ananke] theme into the `themes` directory, adding it to your project as a [Git submodule].
 +
 +```text
 +git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
 +```
 +
 +Append a line to the site configuration file, indicating the current theme.
 +
 +```text
 +echo "theme = 'ananke'" >> hugo.toml
 +```
 +
 +Start Hugo's development server to view the site.
 +
 +```text
 +hugo server
 +```
 +
 +Press `Ctrl + C` to stop Hugo's development server.
 +
 +## Add content
 +
 +Add a new page to your site.
 +
 +```text
 +hugo new content posts/my-first-post.md
 +```
 +
 +Hugo created the file in the `content/posts` directory. Open the file with your editor.
 +
 +```text
 +---
 +title: "My First Post"
 +date: 2022-11-20T09:03:20-08:00
 +draft: true
 +---
 +```
 +
 +Notice the `draft` value in the [front matter] is `true`. By default, Hugo does not publish draft content when you build the site. Learn more about [draft, future, and expired content].
 +
 +Add some [markdown] to the body of the post, but do not change the `draft` value.
 +
 +[markdown]: https://commonmark.org/help/
 +
 +```text
 +---
 +title: "My First Post"
 +date: 2022-11-20T09:03:20-08:00
 +draft: true
 +---
 +## Introduction
 +
 +This is **bold** text, and this is *emphasized* text.
 +
 +Visit the [Hugo](https://gohugo.io) website!
 +```
 +
 +Save the file, then start Hugo’s development server to view the site. You can run either of the following commands to include draft content.
 +
 +```text
 +hugo server --buildDrafts
 +hugo server -D
 +```
 +
 +View your site at the URL displayed in your terminal. Keep the development server running as you continue to add and change content.
 +
 +{{% note %}}
 +Hugo's rendering engine conforms to the CommonMark [specification] for markdown. The CommonMark organization provides a useful [live testing tool] powered by the reference implementation.
 +
 +[live testing tool]: https://spec.commonmark.org/dingus/
 +[specification]: https://spec.commonmark.org/
 +{{% /note %}}
 +
 +## Configure the site
 +
 +With your editor, open the [site configuration] file (`hugo.toml`) in the root of your project.
 +
 +```text
++baseURL = 'https://example.org/'
 +languageCode = 'en-us'
 +title = 'My New Hugo Site'
 +theme = 'ananke'
 +```
 +
 +Make the following changes:
 +
 +1. Set the `baseURL` for your production site. This value must begin with the protocol and end with a slash, as shown above.
 +
 +2. Set the `languageCode` to your language and region.
 +
 +3. Set the `title` for your production site.
 +
 +Start Hugo's development server to see your changes, remembering to include draft content.
 +
 +```text
 +hugo server -D
 +```
 +
 +{{% note %}}
 +Most theme authors provide configuration guidelines and options. Make sure to visit your theme's repository or documentation site for details.
 +
 +[The New Dynamic], authors of the Ananke theme, provide [documentation] for configuration and usage. They also provide a [demonstration site].
 +
 +[demonstration site]: https://gohugo-ananke-theme-demo.netlify.app/
 +[documentation]: https://github.com/theNewDynamic/gohugo-theme-ananke#readme
 +[The New Dynamic]: https://www.thenewdynamic.com/
 +{{% /note %}}
 +
 +## Publish the site
 +
 +In this step you will _publish_ your site, but you will not _deploy_ it.
 +
 +When you _publish_ your site, Hugo creates the entire static site in the `public` directory in the root of your project. This includes the HTML files, and assets such as images, CSS files, and JavaScript files.
 +
 +When you publish your site, you typically do _not_ want to include [draft, future, or expired content]. The command is simple.
 +
 +```text
 +hugo
 +```
 +
 +To learn how to _deploy_ your site, see the [hosting and deployment] section.
 +
 +## Ask for help
 +
 +Hugo's [forum] is an active community of users and developers who answer questions, share knowledge, and provide examples. A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help] before asking your first question.
 +
 +## Other resources
 +
 +For other resources to help you learn Hugo, including books and video tutorials, see the [external learning resources](/getting-started/external-learning-resources/) page.
 +
 +[Ananke]: https://github.com/theNewDynamic/gohugo-theme-ananke
 +[directory structure]: /getting-started/directory-structure
 +[draft, future, and expired content]: /getting-started/usage/#draft-future-and-expired-content
 +[draft, future, or expired content]: /getting-started/usage/#draft-future-and-expired-content
 +[external learning resources]:/getting-started/external-learning-resources/
 +[forum]: https://discourse.gohugo.io/
 +[forum]: https://discourse.gohugo.io/
 +[front matter]: /content-management/front-matter
 +[Git submodule]: https://git-scm.com/book/en/v2/Git-Tools-Submodules
 +[hosting and deployment]: /hosting-and-deployment/
 +[Install Git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
 +[Install Hugo]: /installation/
 +[Requesting Help]: https://discourse.gohugo.io/t/requesting-help/9132
 +[Requesting Help]: https://discourse.gohugo.io/t/requesting-help/9132
 +[site configuration]: /getting-started/configuration/
index 11f28c6b2529db44d0b44a7ad995cc420f5c1ae6,0000000000000000000000000000000000000000..f1d26edc299a26f0773ff3fd8d8e05bc9db8dcab
mode 100644,000000..100644
--- /dev/null
@@@ -1,170 -1,0 +1,169 @@@
- aliases: [/overview/usage/,/extras/livereload/,/doc/usage/,/usage/]
 +---
 +title: Basic usage
 +description: Hugo's command line interface (CLI) is fully featured but simple to use, even for those with limited experience working from the command line.
 +categories: [getting started]
 +keywords: [usage,livereload,command,flags]
 +menu:
 +  docs:
 +    parent: getting-started
 +    weight: 30
 +weight: 30
- ```bash
 +toc: true
++aliases: [/overview/usage/,/extras/livereload/,/doc/usage/,/usage/]
 +---
 +
 +## Test your installation
 +
 +After [installing] Hugo, test your installation by running:
 +
- ```bash
++```sh
 +hugo version
 +```
 +
 +You should see something like:
 +
 +```text
 +hugo v0.105.0-0e3b42b4a9bdeb4d866210819fc6ddcf51582ffa+extended linux/amd64 BuildDate=2022-10-28T12:29:05Z VendorInfo=snap:0.105.0
 +```
 +
 +## Display available commands
 +
 +To see a list of the available commands and flags:
 +
- ```bash
++```sh
 +hugo help
 +```
 +
 +To get help with a subcommand, use the `--help` flag. For example:
 +
- ```bash
++```sh
 +hugo server --help
 +```
 +
 +## Build your site
 +
 +To build your site, `cd` into your project directory and run:
 +
++```sh
 +hugo
 +```
 +
 +The [`hugo`] command builds your site, publishing the files to the `public` directory. To publish your site to a different directory, use the [`--destination`] flag or set [`publishDir`] in your site configuration.
 +
 +{{% note %}}
 +Hugo does not clear the `public` directory before building your site. Existing files are overwritten, but not deleted. This behavior is intentional to prevent the inadvertent removal of files that you may have added to the `public` directory after the build.
 +
 +Depending on your needs, you may wish to manually clear the contents of the public directory before every build.
 +{{% /note %}}
 +
 +## Draft, future, and expired content
 +
 +Hugo allows you to set `draft`, `date`, `publishDate`, and `expiryDate` in the [front matter] of your content. By default, Hugo will not publish content when:
 +
- ```bash
 +- The `draft` value is `true`
 +- The `date` is in the future
 +- The `publishDate` is in the future
 +- The `expiryDate` is in the past
 +
 +You can override the default behavior when running `hugo` or `hugo server` with command line flags:
 +
- ```bash
++```sh
 +hugo --buildDrafts    # or -D
 +hugo --buildExpired   # or -E
 +hugo --buildFuture    # or -F
 +```
 +
 +Although you can also set these values in your site configuration, it can lead to unwanted results unless all content authors are aware of, and understand, the settings.
 +
 +{{% note %}}
 +As noted above, Hugo does not clear the `public` directory before building your site. Depending on the _current_ evaluation of the four conditions above, after the build your `public` directory may contain extraneous files from a previous build.
 +
 +A common practice is to manually clear the contents of the `public` directory before each build to remove draft, expired, and future content.
 +{{% /note %}}
 +
 +## Develop and test your site
 +
 +To view your site while developing layouts or creating content, `cd` into your project directory and run:
 +
- ```bash
++```sh
 +hugo server
 +```
 +
 +The [`hugo server`] command builds your site into memory, and serves your pages using a minimal HTTP server. When you run `hugo server` it will display the URL of your local site:
 +
 +```text
 +Web Server is available at http://localhost:1313/ 
 +```
 +
 +While the server is running, it watches your project directory for changes to assets, configuration, content, data, layouts, translations, and static files. When it detects a change, the server rebuilds your site and refreshes your browser using [LiveReload].
 +
 +Most Hugo builds are so fast that you may not notice the change unless you are looking directly at your browser.
 +
 +### LiveReload
 +
 +While the server is running, Hugo injects JavaScript into the generated HTML pages. The LiveReload script creates a connection from the browser to the server via web sockets. You do not need to install any software or browser plugins, nor is any configuration required.
 +
 +### Automatic redirection
 +
 +When editing content, if you want your browser to automatically redirect to the page you last modified, run:
 +
- ```bash
++```sh
 +hugo server --navigateToChanged
 +```
 +
 +## Deploy your site
 +
 +{{% note %}}
 +As noted above, Hugo does not clear the public directory before building your site. Manually clear the contents of the public directory before each build to remove draft, expired, and future content.
 +{{% /note %}}
 +
 +When you are ready to deploy your site, run:
 +
- │   ├── index.html
- │   └── index.xml  <-- RSS feed for this section
++```sh
 +hugo
 +```
 +
 +This builds your site, publishing the files to the public directory. The directory structure will look something like this:
 +
 +```text
 +public/
 +├── categories/
- │   ├── my-first-post/
- │   │   └── index.html
- │   ├── index.html
- │   └── index.xml  <-- RSS feed for this section
++│   ├── index.html
++│   └── index.xml  <-- RSS feed for this section
 +├── post/
- │   ├── index.html
- │   └── index.xml  <-- RSS feed for this section
++│   ├── my-first-post/
++│   │   └── index.html
++│   ├── index.html
++│   └── index.xml  <-- RSS feed for this section
 +├── tags/
++│   ├── index.html
++│   └── index.xml  <-- RSS feed for this section
 +├── index.html
 +├── index.xml      <-- RSS feed for the site
 +└── sitemap.xml
 +```
 +
 +In a simple hosting environment, where you typically `ftp`, `rsync`, or `scp` your files to the root of a virtual host, the contents of the `public` directory are all that you need.
 +
 +Most of our users deploy their sites using a CI/CD workflow, where a push[^1] to their GitHub or GitLab repository triggers a build and deployment. Popular providers include [AWS Amplify], [CloudCannon], [Cloudflare Pages], [GitHub Pages], [GitLab Pages], and [Netlify].
 +
 +Learn more in the [hosting and deployment] section.
 +
 +[^1]: The Git repository contains the entire project directory, typically excluding the public directory because the site is built _after_ the push.
 +
 +[`--destination`]: /commands/hugo/#options
 +[`hugo server`]: /commands/hugo_server/
 +[`hugo`]: /commands/hugo/
 +[`publishDir`]: /getting-started/configuration/#publishdir
 +[AWS Amplify]: https://aws.amazon.com/amplify/
 +[CloudCannon]: https://cloudcannon.com/
 +[Cloudflare Pages]: https://pages.cloudflare.com/
 +[commands]: /commands/
 +[front matter]: /content-management/front-matter/
 +[GitHub Pages]: https://pages.github.com/
 +[GitLab Pages]: https://docs.gitlab.com/ee/user/project/pages/
 +[hosting and deployment]: /hosting-and-deployment/
 +[hosting]: /hosting-and-deployment/
 +[installing]: /installation/
 +[LiveReload]: https://github.com/livereload/livereload-js
 +[Netlify]: https://www.netlify.com/
index 4329469a571a0d14b6220e30a7060c95a969e4b0,0000000000000000000000000000000000000000..35fd3cf057a2fc6701b18744b5974b2010bd37ad
mode 100644,000000..100644
--- /dev/null
@@@ -1,15 -1,0 +1,15 @@@
- categories: [hosting and deployment]
 +---
 +title: Hosting and deployment
 +linkTitle: Overview
 +description: Site builds, automated deployments, and popular hosting solutions.
++categories: []
 +keywords: []
 +menu:
 +  docs:
 +    identifier: hosting-and-deployment-overview
 +    parent: hosting-and-deployment
 +    weight: 1
 +weight: 1
 +---
 +
 +Because Hugo renders *static* websites, you can host your new Hugo website virtually anywhere. The following represent only a few of the more popular hosting and automated deployment solutions used by the Hugo community.
index 6d45a0883dbbb720a4c1c9f06c6e61dacb7a8310,0000000000000000000000000000000000000000..4108515533b686d37b11706cbb833029dcbda5bb
mode 100644,000000..100644
--- /dev/null
@@@ -1,47 -1,0 +1,47 @@@
- keywords: [rclone,sftp,deployment]
 +---
 +title: Deploy with Rclone
 +description: If you have access to your web host with SFTP/FTP/SSH/HTTP(DAV), you can use rclone to incrementally deploy your entire Hugo website.
 +categories: [hosting and deployment]
- aliases: [/tutorials/deployment-with-rclone/]
++keywords: [deployment,rclone,sftp]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
 +toc: true
++aliases: [/tutorials/deployment-with-rclone/]
 +---
 +
 +## Assumptions
 +
 +* A web host running a web server. This could be a shared hosting environment or a VPS.
 +* Access to your web host with any of the [protocols supported by rclone](https://rclone.org/#providers), such as SFTP.
 +* A functional static website built with Hugo
 +* Deploying from an [Rclone](https://rclone.org) compatible operating system
 +* You have [installed Rclone](https://rclone.org/install/).
 +
 +**NB**: You can remove ``--interactive`` in the commands below once you are comfortable with rclone, if you wish. Also, ``--gc`` and ``--minify`` are optional in the ``hugo`` commands below.
 +
 +## Getting started
 +
 +The spoiler is that you can even deploy your entire website from any compatible OS with no configuration. Using SFTP for example:
 +
 +```txt
 +hugo --gc --minify
 +rclone sync --interactive --sftp-host sftp.example.com --sftp-user www-data --sftp-ask-password public/ :sftp:www/
 +```
 +
 +## Configure Rclone for even easier usage
 +
 +The easiest way is simply to run `rclone config`.
 +
 +The [Rclone docs](https://rclone.org/docs/) provide [an example of configuring Rclone to use SFTP](https://rclone.org/sftp/).
 +
 +For the next commands, we will assume you configured a remote you named ``hugo-www``
 +
 +The above 'spoiler' commands could become:
 +
 +```txt
 +hugo --gc --minify
 +rclone sync --interactive public/ hugo-www:www/
 +```
 +
 +After you issue the above commands (and respond to any prompts), check your website and you will see that it is deployed.
index 7c4cbda076ef18381ecb1212d45ae34657aeb79f,0000000000000000000000000000000000000000..f341ad6189801b2483868da8438e1ca4711a5e89
mode 100644,000000..100644
--- /dev/null
@@@ -1,139 -1,0 +1,139 @@@
- keywords: [rsync,deployment]
 +---
 +title: Deploy with Rsync
 +description: If you have access to your web host with SSH, you can use a simple rsync one-liner to incrementally deploy your entire Hugo website.
 +categories: [hosting and deployment]
- aliases: [/tutorials/deployment-with-rsync/]
++keywords: [deployment,rsync]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
- {{< code file="install-openssh.sh" >}}
 +toc: true
++aliases: [/tutorials/deployment-with-rsync/]
 +---
 +
 +## Assumptions
 +
 +* A web host running a web server. This could be a shared hosting environment or a VPS.
 +* Access to your web host with SSH
 +* A functional static website built with Hugo
 +
 +The spoiler is that you can deploy your entire website with a command that looks like the following:
 +
 +```txt
 +hugo && rsync -avz --delete public/ www-data@ftp.topologix.fr:~/www/
 +```
 +
 +As you will see, we'll put this command in a shell script file, which makes building and deployment as easy as executing `./deploy`.
 +
 +## Copy Your SSH Key to your host
 +
 +To make logging in to your server more secure and less interactive, you can upload your SSH key. If you have already installed your SSH key to your server, you can move on to the next section.
 +
 +First, install the ssh client. On Debian distributions, use the following command:
 +
- ```bash
++{{< code file=install-openssh.sh >}}
 +sudo apt-get install openssh-client
 +{{< /code >}}
 +
 +Then generate your ssh key. First, create the `.ssh` directory in your home directory if it doesn't exist:
 +
 +```txt
 +~$ cd && mkdir .ssh & cd .ssh
 +```
 +
 +Next, execute this command to generate a new keypair called `rsa_id`:
 +
 +```txt
 +~/.ssh/$ ssh-keygen -t rsa -q -C "For SSH" -f rsa_id
 +```
 +
 +You'll be prompted for a passphrase, which is an extra layer of protection. Enter the passphrase you'd like to use, and then enter it again when prompted, or leave it blank if you don't want to have a passphrase. Not using a passphrase will let you transfer files non-interactively, as you won't be prompted for a password when you log in, but it is slightly less secure.
 +
 +To make logging in easier, add a definition for your web host to the file  `~/.ssh/config` with the following command, replacing `HOST` with the IP address or hostname of your web host, and `USER` with the username you use to log in to your web host when transferring files:
 +
 +```txt
 +~/.ssh/$ cat >> config <<EOF
 +Host HOST
 +     Hostname HOST
 +     Port 22
 +     User USER
 +     IdentityFile ~/.ssh/rsa_id
 +EOF
 +```
 +
 +Then copy your ssh public key to the remote server with the `ssh-copy-id` command:
 +
 +```txt
 +~/.ssh/$ ssh-copy-id -i rsa_id.pub USER@HOST.com
 +```
 +
 +Now you can easily connect to the remote server:
 +
 +```txt
 +~$ ssh user@host
 +Enter passphrase for key '/home/mylogin/.ssh/rsa_id':
 +```
 +
 +Now that you can log in with your SSH key, let's create a script to automate deployment of your Hugo site.
 +
 +## Shell script
 +
 +Create a new script called `deploy` the root of your Hugo tree:
 +
 +```txt
 +~/websites/topologix.fr$ editor deploy
 +```
 +
 +Add the following content. Replace the `USER`, `HOST`, and `DIR` values with your own values:
 +
- You can incorporate other proprocessing tasks into this deployment script as well.
++```sh
 +#!/bin/sh
 +USER=my-user
 +HOST=my-server.com
 +DIR=my/directory/to/topologix.fr/   # the directory where your web site files should go
 +
 +hugo && rsync -avz --delete public/ ${USER}@${HOST}:~/${DIR} # this will delete everything on the server that's not in the local public folder 
 +
 +exit 0
 +```
 +
 +Note that `DIR` is the relative path from the remote user's home. If you have to specify a full path (for instance `/var/www/mysite/`) you must change `~/${DIR}` to `${DIR}` inside the command-line. For most cases you should not have to.
 +
 +Save and close, and make the `deploy` file executable:
 +
 +```txt
 +~/websites/topologix.fr$ chmod +x deploy
 +```
 +
 +Now you only have to enter the following command to deploy and update your website:
 +
 +```txt
 +~/websites/topologix.fr$ ./deploy
 +```
 +
 +Your site builds and deploys:
 +
 +```txt
 +Started building sites ...
 +Built site for language en:
 +0 draft content
 +0 future content
 +0 expired content
 +5 pages created
 +0 non-page files copied
 +0 paginator pages created
 +0 tags created
 +0 categories created
 +total in 56 ms
 +sending incremental file list
 +404.html
 +index.html
 +index.xml
 +sitemap.xml
 +posts/
 +posts/index.html
 +
 +sent 9,550 bytes  received 1,708 bytes  7,505.33 bytes/sec
 +total size is 966,557  speedup is 85.86
 +```
 +
++You can incorporate other processing tasks into this deployment script as well.
index d6dfb666d86b4f2c14406c1fbca3d96419c8ed47,0000000000000000000000000000000000000000..2ab0a196480da21170811e19ce1d564af903cdbe
mode 100644,000000..100644
--- /dev/null
@@@ -1,56 -1,0 +1,56 @@@
- keywords: [21yunbox,hosting,deployment]
 +---
 +title: Host on 21YunBox
 +description: Host your Hugo site with 21YunBox's blazing fast Chinese CDN, fully-managed SSL and auto deploys from Gitee.
 +categories: [hosting and deployment]
++keywords: [hosting,21yunbox]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
 +toc: true
 +---
 +
 +[21YunBox](https://www.21yunbox.com) is a fully-managed cloud platform dedicated to make web deployment easy within the Chinese Great Firewall where you can host static sites, backend APIs, databases, cron jobs, and all your other apps in one place. It provides blazing fast Chinese CDN, continuous deployment, one-click HTTPS and [other services like managed databases and backend web services](https://www.21yunbox.com/docs/), providing an avenue to launch web projects in China.
 +
 +21YunBox includes the following features:
 +
 +- Continuous, automatic builds & deploys from GitHub and Gitee
 +- Automatic SSL certificates through [Let's Encrypt](https://letsencrypt.org)
 +- Instant cache invalidation with a blazing fast, Chinese CDN
 +- Unlimited [custom domains](https://www.21yunbox.com/docs/#/custom-domains)
 +- Automatic [Brotli compression](https://en.wikipedia.org/wiki/Brotli) for faster sites
 +- Native HTTP/2 support
 +- Automatic HTTP → HTTPS redirects
 +- Custom URL redirects and rewrites
 +
 +## Prerequisites
 +
 +This guide assumes you already have a Hugo project to deploy. If you need a project, use the [Quick Start](/getting-started/quick-start/) to get started or fork 21YunBox's [Hugo Example](https://gitee.com/eryiyunbox-examples/hello-hugo) before continuing.
 +
 +## Setup
 +
 +You can set up a Hugo site on 21YunBox in two quick steps:
 +
 +1. Create a new web service on 21YunBox, and give 21YunBox permission to access your GitHub or Gitee repo.
 +2. Use the following values during creation:
 +
 +   |    Field              | Value                                            |
 +   | --------------------- | ------------------------------------------------ |
 +   | **Environment**       | `Static Site`                                    |
 +   | **Build Command**     | `hugo --gc --minify` (or your own build command) |
 +   | **Publish Directory** | `./public` (or your own output directory)        |
 +
 +That's it! Your site will be live on your 21YunBox URL (which looks like `yoursite.21yunbox.com`) as soon as the build is done.
 +
 +## Continuous deploys
 +
 +Now that 21YunBox is connected to your repo, it will automatically build and publish your site any time you push to GitHub.
 +
 +Every deploy automatically and instantly invalidates the CDN cache, so your users can always access the latest content on your site.
 +
 +## Custom domains
 +
 +Add your own domains to your site easily using 21YunBox's [custom domains](https://www.21yunbox.com/docs/#/custom-domains) guide.
 +
 +## Support
 +
 +Click [here](https://www.21yunbox.com/docs/#/contact) to contact with 21YunBox' experts if you need help.
index 0255c1723da1c9ea229b8389eb351e6fcee30859,0000000000000000000000000000000000000000..43d75312ae7931ea09324605371198382018f4b9
mode 100644,000000..100644
--- /dev/null
@@@ -1,46 -1,0 +1,46 @@@
- keywords: [amplify,hosting,deployment]
 +---
 +title: Host on AWS Amplify
 +description: Develop and deploy a cloud-powered web app with AWS Amplify.
 +categories: [hosting and deployment]
++keywords: [hosting,amplify]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
 +toc: true
 +---
 +
 +In this guide we'll walk through how to deploy and host your Hugo site using the [AWS Amplify Console](https://console.amplify.aws).
 +
 +AWS Amplify is a combination of client library, CLI toolchain, and a Console for continuous deployment and hosting. The Amplify CLI and library allow developers to get up & running with full-stack cloud-powered applications with features like authentication, storage, serverless GraphQL or REST APIs, analytics, Lambda functions, & more. The Amplify Console provides continuous deployment and hosting for modern web apps (single page apps and static site generators). Continuous deployment allows developers to deploy updates to their web app on every code commit to their Git repository. Hosting includes features such as globally available CDNs, easy custom domain setup + HTTPS, feature branch deployments, and password protection.
 +
 +## Pre-requisites
 +
 +* [Sign up for an AWS Account](https://portal.aws.amazon.com/billing/signup?redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation). There are no upfront charges or any term commitments to create an AWS account and signing up gives you immediate access to the AWS Free Tier.
 +* You have an account with GitHub, GitLab, or Bitbucket.
 +* You have completed the [Quick Start] or have a Hugo website you are ready to deploy and share with the world.
 +
 +## Hosting
 +
 +1. Log in to the [AWS Amplify Console](https://console.aws.amazon.com/amplify/home) and choose Get Started under Deploy.
 +   ![Hugo Amplify](/images/hosting-and-deployment/hosting-on-aws-amplify/amplify-gettingstarted.png)
 +
 +1. Connect a branch from your GitHub, Bitbucket, GitLab, or AWS CodeCommit repository. Connecting your repository allows Amplify to deploy updates on every code commit to a branch.
 +   ![Hugo Amplify](/images/hosting-and-deployment/hosting-on-aws-amplify/amplify-connect-repo.gif)
 +
 +1. Accept the default build settings. The Amplify Console automatically detects your Hugo build settings and output directory.
 +   ![Hugo Amplify](/images/hosting-and-deployment/hosting-on-aws-amplify/amplify-build-settings.png)
 +
 +1. Review your changes and then choose **Save and deploy**. The Amplify Console will pull code from your repository, build changes to the backend and frontend, and deploy your build artifacts at `https://master.unique-id.amplifyapp.com`. Bonus: Screenshots of your app on different devices to find layout issues.
 +
 +## Using a newer version of Hugo
 +
 +If you need to use a different, perhaps newer, version of Hugo than the version currently supported by AWS Amplify:
 +
 +1. Visit the [AWS Amplify Console](https://console.aws.amazon.com/amplify/home), and click the app you would like to modify
 +1. In the side navigation bar, Under App Settings, click **Build settings**
 +1. On the Build settings page, near the bottom, there is a section called **Build image settings**. Click **Edit**
 +1. Under **Live package updates**, click **Add package version override**
 +1. From the selection, click **Hugo** and ensure the version field says `latest`
 +1. Click **Save** to save the changes.
 +
 +[Quick Start]: /getting-started/quick-start/
index ec8cd996fe8e6108f7e93095bee148dba9738017,0000000000000000000000000000000000000000..922cbfef2a863120a80c342eeee3dd2c6f75f0a7
mode 100644,000000..100644
--- /dev/null
@@@ -1,14 -1,0 +1,14 @@@
- keywords: [hosting,Azure Static Web Apps]
 +---
 +title: Host on Azure Static Web Apps
 +description: Publish a Hugo site to Azure Static Web Apps.
 +categories: [hosting and deployment]
++keywords: [hosting,azure]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
 +toc: true
 +---
 +
 +You can create and deploy a Hugo web application to Azure Static Web Apps. The final result is a new Azure Static Web App with associated GitHub Actions that give you control over how the app is built and published. You'll learn how to create a Hugo app, set up an Azure Static Web App and deploy the Hugo app to Azure.
 +
 +Here's the tutorial on how to [Publish a Hugo site to Azure Static Web Apps](https://docs.microsoft.com/en-us/azure/static-web-apps/publish-hugo).
index 5c927ec99e95c8c464b8e56ed904cad4e2ca883a,0000000000000000000000000000000000000000..e50143db7629d70dc36691d99487834ef3dc5907
mode 100644,000000..100644
--- /dev/null
@@@ -1,13 -1,0 +1,14 @@@
 +---
 +title: Host on Cloudflare Pages
 +description: Cloudflare Pages can host your Hugo site with CDN, continuous deployment, 1-click HTTPS, an admin GUI, and its own environment variables.
 +categories: [hosting and deployment]
++keywords: [hosting,cloudflare]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
 +toc: true
 +---
 +
 +[Cloudflare Pages](https://developers.cloudflare.com/pages/) are super fast, always up-to-date, and deployed directly from your [Git provider](https://developers.cloudflare.com/pages/get-started/#connect-your-git-provider-to-pages).
 +
 +Cloudflare Pages docs have a detailed tutorial on [how to deploy a Hugo site](https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site/).
index c58f4b7520e9ad745de8329699c0ed3133294ca6,0000000000000000000000000000000000000000..028964bcfce61612d7d6b3823873d35202210629
mode 100644,000000..100644
--- /dev/null
@@@ -1,111 -1,0 +1,110 @@@
- description: You can use Firebase's free tier to host your static website; this also gives you access to Firebase's NOSQL API.
 +---
 +title: Host on Firebase
- ```txt
++description: You can use Firebase's free tier to host your static website; this also gives you access to Firebase's NoSQL API.
 +categories: [hosting and deployment]
 +keywords: [hosting,firebase]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
 +toc: true
 +---
 +
 +## Assumptions
 +
 +1. You have an account with [Firebase][signup]. (If you don't, you can sign up for free using your Google account.)
 +2. You have completed the [Quick Start] or have a completed Hugo website ready for deployment.
 +
 +## Initial setup
 +
 +Go to the [Firebase console][console] and create a new project (unless you already have a project). You will need to globally install `firebase-tools` (node.js):
 +
- ```txt
++```sh
 +npm install -g firebase-tools
 +```
 +
 +Log in to Firebase (setup on your local machine) using `firebase login`, which opens a browser where you can select your account. Use `firebase logout` in case you are already logged in but to the wrong account.
 +
- ```txt
++```sh
 +firebase login
 +```
 +
 +In the root of your Hugo project, initialize the Firebase project with the `firebase init` command:
 +
- ```txt
++```sh
 +firebase init
 +```
 +
 +From here:
 +
 +1. Choose Hosting in the feature question
 +2. Choose the project you just set up
 +3. Accept the default for your database rules file
 +4. Accept the default for the publish directory, which is `public`
 +5. Choose "No" in the question if you are deploying a single-page app
 +
 +## Using Firebase & GitHub CI/CD
 +
 +In new versions of Firebase, some other questions apply:
 +
 +6. Set up automatic builds and deploys with GitHub?
 +
 +Here you will be redirected to login in your GitHub account to get permissions. Confirm.
 +
 +7. For which GitHub repository would you like to set up a GitHub workflow? (format: user/repository)
 +
 +Include the repository you will use in the format above (Account/Repo)
 +Firebase script with retrieve credentials, create a service account you can later manage in your GitHub settings.
 +
 +8. Set up the workflow to run a build script before every deploy?
 +
 +Here is your opportunity to include some commands before you run the deploy.
 +
 +9. Set up automatic deployment to your site's live channel when a PR is merged?
 +
 +You can let in the default option (main)
 +
 +After that Firebase has been set in your project with CI/CD. After that run:
 +
 +```sh
 +hugo && firebase deploy
 +```
 +
 +With this you will have the app initialized manually. After that you can manage and fix your GitHub workflow from: https://github.com/your-account/your-repo/actions
 +
 +Don't forget to update your static pages before push!
 +
 +## Manual deploy
 +
 +To deploy your Hugo site, execute the `firebase deploy` command, and your site will be up in no time:
 +
- ```txt
++```sh
 +hugo && firebase deploy
 +```
 +
 +## CI setup (other tools)
 +
 +You can generate a deploy token using
 +
- ```txt
++```sh
 +firebase login:ci
 +```
 +
 +You can also set up your CI and add the token to a private variable like `$FIREBASE_DEPLOY_TOKEN`.
 +
 +{{% note %}}
 +This is a private secret and it should not appear in a public repository. Make sure you understand your chosen CI and that it's not visible to others.
 +{{% /note %}}
 +
 +You can then add a step in your build to do the deployment using the token:
 +
++```sh
 +firebase deploy --token $FIREBASE_DEPLOY_TOKEN
 +```
 +
 +## Reference links
 +
 +* [Firebase CLI Reference](https://firebase.google.com/docs/cli/#administrative_commands)
 +
 +[console]: https://console.firebase.google.com/
 +[Quick Start]: /getting-started/quick-start/
 +[signup]: https://console.firebase.google.com/
index 4dc88faf14bc50a05135c95135423f551c830629,0000000000000000000000000000000000000000..f41250279bb4bc5a3098c93ddb481b94a65c2cf3
mode 100644,000000..100644
--- /dev/null
@@@ -1,191 -1,0 +1,190 @@@
- keywords: [github,git,deployment,hosting]
 +---
 +title: Host on GitHub Pages
 +description: Deploy Hugo as a GitHub Pages project or personal/organizational site and automate the whole process with GitHub Actions
 +categories: [hosting and deployment]
++keywords: [hosting,github]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
 +toc: true
 +aliases: [/tutorials/github-pages-blog/]
 +---
 +
 +GitHub provides free and fast static hosting over SSL for personal, organization, or project pages directly from a GitHub repository via its GitHub Pages service and automating development workflows and build with GitHub Actions.
 +
 +## Prerequisites
 +
 +1. [Create a GitHub account]
 +2. [Install Git]
 +3. [Create a Hugo site] and test it locally with `hugo server`.
 +
 +[Create a GitHub account]: https://github.com/signup
 +[Install Git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
 +[Create a Hugo site]: /getting-started/quick-start/
 +
 +## Types of sites
 +
 +There are three types of GitHub Pages sites: project, user, and organization. Project sites are connected to a specific project hosted on GitHub. User and organization sites are connected to a specific account on GitHub.com.
 +
 +{{% note %}}
 +See the [GitHub Pages documentation] to understand the requirements for repository ownership and naming.
 +
 +[GitHub Pages documentation]: https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites
 +{{% /note %}}
 +
- : Visit your GitHub repository. From the main menu choose **Settings**&nbsp;>&nbsp;**Pages**. In then center of your screen you will see this:
 +[GitHub Pages documentation]: https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites
 +
 +## Procedure
 +
 +Step 1
 +: Create a GitHub repository.
 +
 +Step 2
 +: Push your local repository to GitHub.
 +
 +Step 3
- {{< code file=".github/workflows/hugo.yaml" >}}
++: Visit your GitHub repository. From the main menu choose **Settings**&nbsp;>&nbsp;**Pages**. In the center of your screen you will see this:
 +
 +![screen capture](gh-pages-1.png)
 +{style="max-width: 280px"}
 +
 +Step 4
 +: Change the **Source** to `GitHub Actions`. The change is immediate; you do not have to press a Save button.
 +
 +![screen capture](gh-pages-2.png)
 +{style="max-width: 280px"}
 +
 +Step 5
 +: Create an empty file in your local repository.
 +
 +```text
 +.github/workflows/hugo.yaml
 +```
 +
 +Step 6
 +: Copy and paste the YAML below into the file you created. Change the branch name and Hugo version as needed.
 +
-       HUGO_VERSION: 0.115.4
++{{< code file=.github/workflows/hugo.yaml copy=true >}}
 +# Sample workflow for building and deploying a Hugo site to GitHub Pages
 +name: Deploy Hugo site to Pages
 +
 +on:
 +  # Runs on pushes targeting the default branch
 +  push:
 +    branches:
 +      - main
 +
 +  # Allows you to run this workflow manually from the Actions tab
 +  workflow_dispatch:
 +
 +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
 +permissions:
 +  contents: read
 +  pages: write
 +  id-token: write
 +
 +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
 +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
 +concurrency:
 +  group: "pages"
 +  cancel-in-progress: false
 +
 +# Default to bash
 +defaults:
 +  run:
 +    shell: bash
 +
 +jobs:
 +  # Build job
 +  build:
 +    runs-on: ubuntu-latest
 +    env:
-         uses: actions/checkout@v3
++      HUGO_VERSION: 0.120.2
 +    steps:
 +      - name: Install Hugo CLI
 +        run: |
 +          wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
 +          && sudo dpkg -i ${{ runner.temp }}/hugo.deb
 +      - name: Install Dart Sass
 +        run: sudo snap install dart-sass
 +      - name: Checkout
-         uses: actions/upload-pages-artifact@v1
++        uses: actions/checkout@v4
 +        with:
 +          submodules: recursive
 +          fetch-depth: 0
 +      - name: Setup Pages
 +        id: pages
 +        uses: actions/configure-pages@v3
 +      - name: Install Node.js dependencies
 +        run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
 +      - name: Build with Hugo
 +        env:
 +          # For maximum backward compatibility with Hugo modules
 +          HUGO_ENVIRONMENT: production
 +          HUGO_ENV: production
 +        run: |
 +          hugo \
 +            --gc \
 +            --minify \
 +            --baseURL "${{ steps.pages.outputs.base_url }}/"
 +      - name: Upload artifact
++        uses: actions/upload-pages-artifact@v2
 +        with:
 +          path: ./public
 +
 +  # Deployment job
 +  deploy:
 +    environment:
 +      name: github-pages
 +      url: ${{ steps.deployment.outputs.page_url }}
 +    runs-on: ubuntu-latest
 +    needs: build
 +    steps:
 +      - name: Deploy to GitHub Pages
 +        id: deployment
 +        uses: actions/deploy-pages@v2
 +{{< /code >}}
 +
 +Step 7
 +: Commit the change to your local repository with a commit message of something like "Add workflow", and push to GitHub.
 +
 +Step 8
 +: From GitHub's main menu, choose **Actions**. You will see something like this:
 +
 +![screen capture](gh-pages-3.png)
 +{style="max-width: 350px"}
 +
 +Step 9
 +: When GitHub has finished building and deploying your site, the color of the status indicator will change to green.
 +
 +![screen capture](gh-pages-4.png)
 +{style="max-width: 350px"}
 +
 +Step 10
 +: Click on the commit message as shown above. You will see this:
 +
 +![screen capture](gh-pages-5.png)
 +{style="max-width: 611px"}
 +
 +Under the deploy step, you will see a link to your live site.
 +
 +In the future, whenever you push a change from your local repository, GitHub will rebuild your site and deploy the changes.
 +
 +## Customize the workflow
 +
 +The example workflow above includes this step, which typically takes 10&#8209;15 seconds:
 +
 +```yaml
 +- name: Install Dart Sass
 +  run: sudo snap install dart-sass
 +```
 +
 +You may remove this step if your site, themes, and modules do not transpile Sass to CSS using the [Dart Sass] transpiler.
 +
 +[Dart Sass]: /hugo-pipes/transpile-sass-to-css/#dart-sass
 +
 +## Additional resources
 +
 +- [Learn more about GitHub Actions](https://docs.github.com/en/actions)
 +- [Caching dependencies to speed up workflows](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows)
 +- [Manage a custom domain for your GitHub Pages site](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages)
index 964e656ed069d343afe265ffa192a889975e49cd,0000000000000000000000000000000000000000..dce306253c818a8a25cc53fbc8abd58eeaf74ba4
mode 100644,000000..100644
--- /dev/null
@@@ -1,101 -1,0 +1,101 @@@
- keywords: [hosting,deployment,git,gitlab]
 +---
 +title: Host on GitLab Pages
 +description: GitLab makes it easy to build, deploy, and host your Hugo website via their free GitLab Pages service, which provides native support for Hugo.
 +categories: [hosting and deployment]
- {{< code file=".gitlab-ci.yml" >}}
++keywords: [hosting,gitlab]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
 +toc: true
 +aliases: [/tutorials/hosting-on-gitlab/]
 +---
 +
 +## Assumptions
 +
 +* Working familiarity with Git for version control
 +* Completion of the Hugo [Quick Start]
 +* A [GitLab account](https://gitlab.com/users/sign_in)
 +* A Hugo website on your local machine that you are ready to publish
 +
 +## BaseURL
 +
 +The `baseURL` in your [site configuration](/getting-started/configuration/) must reflect the full URL of your GitLab pages repository if you are using the default GitLab Pages URL (e.g., `https://<YourUsername>.gitlab.io/<your-hugo-site>/`) and not a custom domain.
 +
 +## Configure GitLab CI/CD
 +
 +Define your [CI/CD](https://docs.gitlab.com/ee/ci/quick_start/) jobs by creating a `.gitlab-ci.yml` file in the root of your project.
 +
- ```bash
++{{< code file=.gitlab-ci.yml copy=true >}}
 +variables:
 +  DART_SASS_VERSION: 1.64.1
 +  HUGO_VERSION: 0.115.4
 +  NODE_VERSION: 20.x
 +  GIT_DEPTH: 0
 +  GIT_STRATEGY: clone
 +  GIT_SUBMODULE_STRATEGY: recursive
 +  TZ: America/Los_Angeles
 +
 +image:
 +  name: golang:1.20.6-bookworm
 +
 +pages:
 +  script:
 +    # Install brotli
 +    - apt-get update
 +    - apt-get install -y brotli
 +    # Install Dart Sass
 +    - curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
 +    - tar -xf dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
 +    - cp -r dart-sass/ /usr/local/bin
 +    - rm -rf dart-sass*
 +    - export PATH=/usr/local/bin/dart-sass:$PATH
 +    # Install Hugo
 +    - curl -LJO https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
 +    - apt-get install -y ./hugo_extended_${HUGO_VERSION}_linux-amd64.deb
 +    - rm hugo_extended_${HUGO_VERSION}_linux-amd64.deb
 +    # Install Node.js
 +    - curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
 +    - apt-get install -y nodejs
 +    # Install Node.js dependencies
 +    - "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
 +    # Build
 +    - hugo --gc --minify
 +    # Compress
 +    - find public -type f -regex '.*\.\(css\|html\|js\|txt\|xml\)$' -exec gzip -f -k {} \;
 +    - find public -type f -regex '.*\.\(css\|html\|js\|txt\|xml\)$' -exec brotli -f -k {} \;
 +  artifacts:
 +    paths:
 +      - public
 +  rules:
 +    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
 +{{% /code %}}
 +
 +## Push your Hugo website to GitLab
 +
 +Next, create a new repository on GitLab. It is *not* necessary to make the repository public. In addition, you might want to add `/public` to your .gitignore file, as there is no need to push compiled assets to GitLab or keep your output website in version control.
 +
++```sh
 +# initialize new git repository
 +git init
 +
 +# add /public directory to our .gitignore file
 +echo "/public" >> .gitignore
 +
 +# commit and push code to master branch
 +git add .
 +git commit -m "Initial commit"
 +git remote add origin https://gitlab.com/YourUsername/your-hugo-site.git
 +git push -u origin master
 +```
 +
 +## Wait for your page to build
 +
 +That's it! You can now follow the CI agent building your page at `https://gitlab.com/<YourUsername>/<your-hugo-site>/pipelines`.
 +
 +After the build has passed, your new website is available at `https://<YourUsername>.gitlab.io/<your-hugo-site>/`.
 +
 +## Next steps
 +
 +GitLab supports using custom CNAME's and TLS certificates. For more details on GitLab Pages, see the [GitLab Pages setup documentation](https://about.gitlab.com/2016/04/07/gitlab-pages-setup/).
 +
 +[Quick Start]: /getting-started/quick-start/
index 87f66acf55fb04d337334b92387475956937d35a,0000000000000000000000000000000000000000..e811299818d0cac715aaadb7b2ae5629e7e7c7d4
mode 100644,000000..100644
--- /dev/null
@@@ -1,88 -1,0 +1,88 @@@
- keywords: [keycdn,hosting,deployment,cdn]
 +---
 +title: Host on KeyCDN
 +description: "Accelerate your Hugo site globally with a KeyCDN integration. This tutorial shows you how to set up your static site as a GitLab page behind a KeyCDN pull zone."
 +categories: [hosting and deployment]
++keywords: [hosting,keycdn]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
 +---
 +
 +[KeyCDN](https://www.keycdn.com/) provides a multitude of features to help accelerate and secure your Hugo site globally including Brotli compression, Let's Encrypt support, Origin Shield, and more.
 +
 +## Assumptions
 +
 +- You already have a Hugo page configured
 +- You have a GitLab account
 +- You have a KeyCDN account
 +
 +## Create a KeyCDN Pull Zone
 +
 +The first step will be to log in to your KeyCDN account and create a new zone. Name this whatever you like and select the [Pull Zone](https://www.keycdn.com/support/create-a-pull-zone/) option. As for the origin URL, your site will be running on [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/getting_started_part_one.html) with a URL of `https://youruser.gitlab.io/reponame/`. Use this as the Origin URL.
 +
 +![Screenshot of KeyCDN's pull zone creation page](/images/hosting-and-deployment/hosting-on-keycdn/keycdn-pull-zone.png)
 +
 +While the origin location doesn’t exist yet, you will need to use your new Zone URL address (or [Zone Alias](https://www.keycdn.com/support/create-a-zone-alias/)) in the `.gitlab-ci.yml` file that will be uploaded to your GitLab project.
 +
 +Ensure that you use your Zone URL or Zone alias as the `BASEURL` variable in the example below. This will be the user-visible website address.
 +
 +## Configure Your .gitlab-ci.yml File
 +
 +Your `.gitlab-ci.yml` file should look similar to the example below. Be sure to modify any variables that are specific to your setup.
 +
 +```yml
 +image: alpine:latest
 +
 +variables:
 +    BASEURL: "https://cipull-7bb7.kxcdn.com/"
 +    HUGO_VERSION: "0.26"
 +    HUGO_CHECKSUM: "67e4ba5ec2a02c8164b6846e30a17cc765b0165a5b183d5e480149baf54e1a50"
 +    KEYCDN_ZONE_ID: "75544"
 +
 +before_script:
 +    - apk update
 +    - apk add curl
 +
 +pages:
 +    stage: deploy
 +    script:
 +    - apk add git
 +    - git submodule update --init
 +    - curl -sSL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -o /tmp/hugo.tar.gz
 +    - echo "${HUGO_CHECKSUM}  /tmp/hugo.tar.gz" | sha256sum -c
 +    - tar xf /tmp/hugo.tar.gz hugo -C /tmp/ && cp /tmp/hugo /usr/bin
 +    - hugo --baseURL ${BASEURL}
 +    - curl "https://api.keycdn.com/zones/purge/${KEYCDN_ZONE_ID}.json" -u "${KEYCDN_API_KEY}:"
 +    artifacts:
 +    paths:
 +    - public
 +    only:
 +    - master
- ```bash
 +```
++
 +Using this integration method,  you will have to specify the Zone ID and your [KeyCDN API](https://www.keycdn.com/api) key as secret variables. To do this, navigate to the top-left menu bar in GitLab and select Projects. Then, select your project and click on the Settings page. Finally, select Pipelines from the sub-menu and scroll down to the Secret Variable section.
 +
 +The Secret Variable for your Zone ID should look similar to:
 +
 +![Screenshot of setting the Zone ID secret variable](/images/hosting-and-deployment/hosting-on-keycdn/secret-zone-id.png)
 +
 +While the Secret Variable for your API Key will look similar to:
 +
 +![Screenshot of setting the API Key secret variable](/images/hosting-and-deployment/hosting-on-keycdn/secret-api-key.png)
 +
 +The Zone ID and API key are used to purge your zone – it’s not strictly needed but otherwise, the CDN might deliver older versions of your assets for quite a while.
 +
 +## Push your changes to GitLab
 +
 +Now it’s time to push the newly created repository to GitLab:
 +
++```sh
 +git remote add origin git@gitlab.com:youruser/ci-example.git
 +git push -u origin master
 +```
 +
 +You can watch the progress and CI job output in your GitLab project under “Pipelines”.
 +
 +After verifying your CI job ran without issues, first check that your GitLab page shows up under `https://youruser.gitlab.io/reponame/` (it might look broken depending on your browser settings as all links point to your KeyCDN zone – don’t worry about that) and then by heading to whatever Zone alias / Zone URL you defined.
 +
 +To learn more about Hugo hosting options with KeyCDN, check out the complete [Hugo hosting with KeyCDN integration guide](https://www.keycdn.com/support/hugo-hosting/).
index 91d0447558631761df9c3a5202ec3fafe243411b,0000000000000000000000000000000000000000..9b01f4cd87d1c50ad0335ba6d0dd35c74506adcd
mode 100644,000000..100644
--- /dev/null
@@@ -1,145 -1,0 +1,145 @@@
- keywords: [netlify,hosting,deployment]
 +---
 +title: Host on Netlify
 +description: Netlify can host your Hugo site with CDN, continuous deployment, 1-click HTTPS, an admin GUI, and its own CLI.
 +categories: [hosting and deployment]
- Go to [app.netlify.com] and select your preferred signup method. This will likely be a hosted Git provider, although you also have the option to sign up with an email address.
++keywords: [hosting,netlify]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
 +toc: true
 +---
 +
 +[Netlify][netlify] provides continuous deployment services, global CDN, ultra-fast DNS, atomic deploys, instant cache invalidation, one-click SSL, a browser-based interface, a CLI, and many other features for managing your Hugo website.
 +
 +## Assumptions
 +
 +* You have an account with GitHub, GitLab, or Bitbucket.
 +* You have completed the [Quick Start] or have a Hugo website you are ready to deploy and share with the world.
 +* You do not already have a Netlify account.
 +
 +## Create a Netlify account
 +
- {{< code file="netlify.toml" >}}
++Go to [app.netlify.com] and select your preferred sign up method. This will likely be a hosted Git provider, although you also have the option to sign up with an email address.
 +
 +The following examples use GitHub, but other git providers will follow a similar process.
 +
 +![Screenshot of the homepage for app.netlify.com, containing links to the most popular hosted git solutions.](/images/hosting-and-deployment/hosting-on-netlify/netlify-signup.jpg)
 +
 +Selecting GitHub will bring up an authorization modal for authentication. Select "Authorize application."
 +
 +![Screenshot of the authorization popup for Netlify and GitHub.](/images/hosting-and-deployment/hosting-on-netlify/netlify-first-authorize.jpg)
 +
 +## Create a new site with continuous deployment
 +
 +You're now already a Netlify member and should be brought to your new dashboard. Select "New site from git."
 +
 +![Screenshot of the blank Netlify admin panel with no sites and highlighted 'add new site' button'](/images/hosting-and-deployment/hosting-on-netlify/netlify-add-new-site.jpg)
 +
 +Netlify will then start walking you through the steps necessary for continuous deployment. First, you'll need to select your git provider again, but this time you are giving Netlify added permissions to your repositories.
 +
 +![Screenshot of step 1 of create a new site for Netlify: selecting the git provider](/images/hosting-and-deployment/hosting-on-netlify/netlify-create-new-site-step-1.jpg)
 +
 +And then again with the GitHub authorization modal:
 +
 +![Screenshot of step 1 of create a new site for Netlify: selecting the git provider](/images/hosting-and-deployment/hosting-on-netlify/netlify-authorize-added-permissions.jpg)
 +
 +Select the repo you want to use for continuous deployment. If you have a large number of repositories, you can filter through them in real time using repo search:
 +
 +![Screenshot of step 1 of create a new site for Netlify: selecting the git provider](/images/hosting-and-deployment/hosting-on-netlify/netlify-create-new-site-step-2.jpg)
 +
 +Once selected, you'll be brought to a screen for basic setup. Here you can select the branch you want to publish, your [build command], and your publish (i.e. deploy) directory. The publish directory should mirror that of what you've set in your [site configuration], the default of which is `public`. The following steps assume you are publishing from the `master` branch.
 +
 +## Configure Hugo version in Netlify
 +
 +You can [set Hugo version](https://www.netlify.com/blog/2017/04/11/netlify-plus-hugo-0.20-and-beyond/) for your environments in `netlify.toml` file or set `HUGO_VERSION` as a build environment variable in the Netlify console.
 +
 +For production:
 +
- {{< code file="netlify.toml" >}}
++{{< code file=netlify.toml >}}
 +[context.production.environment]
 +  HUGO_VERSION = "0.115.4"
 +{{< /code >}}
 +
 +For testing:
 +
- {{< readfile file="netlify.toml" highlight="toml" >}}
++{{< code file=netlify.toml >}}
 +[context.deploy-preview.environment]
 +  HUGO_VERSION = "0.115.4"
 +{{< /code >}}
 +
 +The Netlify configuration file can be a little hard to understand and get right for the different environment, and you may get some inspiration and tips from this site's `netlify.toml`:
 +
++{{< readfile file=netlify.toml highlight=toml >}}
 +
 +## Build and deploy site
 +
 +In the Netlify console, selecting "Deploy site" will immediately take you to a terminal for your build:.
 +
 +![Animated gif of deploying a site to Netlify, including the terminal read out for the build.](/images/hosting-and-deployment/hosting-on-netlify/netlify-deploying-site.gif)
 +
 +Once the build is finished---this should only take a few seconds--you should now see a "Hero Card" at the top of your screen letting you know the deployment is successful. The Hero Card is the first element that you see in most pages. It allows you to see a quick summary of the page and gives access to the most common/pertinent actions and information. You'll see that the URL is automatically generated by Netlify. You can update the URL in "Settings."
 +
 +![Screenshot of successful deploy badge at the top of a deployments screen from within the Netlify admin.](/images/hosting-and-deployment/hosting-on-netlify/netlify-deploy-published.jpg)
 +
 +![Screenshot of homepage to https://hugo-netlify-example.netlify.com, which is mostly dummy text](/images/hosting-and-deployment/hosting-on-netlify/netlify-live-site.jpg)
 +
 +[Visit the live site][visit].
 +
 +Now every time you push changes to your hosted git repository, Netlify will rebuild and redeploy your site.
 +
 +See [this blog post](https://www.netlify.com/blog/2017/04/11/netlify-plus-hugo-0.20-and-beyond/) for more details about how Netlify handles Hugo versions.
 +
 +## Use Hugo themes with Netlify
 +
 +The `git clone` method for installing themes is not supported by Netlify. If you were to use `git clone`, it would require you to recursively remove the `.git` subdirectory from the theme folder and would therefore prevent compatibility with future versions of the theme.
 +
 +A *better* approach is to install a theme as a proper git submodule. You can [read the GitHub documentation for submodules][ghsm] or those found on [Git's website][gitsm] for more information, but the command is similar to that of `git clone`:
 +
 +```txt
 +cd themes
 +git submodule add https://github.com/<THEMECREATOR>/<THEMENAME>
 +```
 +
 +It is recommended to only use stable versions of a theme (if it’s versioned) and always check the changelog. This can be done by checking out a specific release within the theme's directory.
 +
 +Switch to the theme's directory and list all available versions:
 +
 +```txt
 +cd themes/<theme>
 +git tag
 +# exit with q
 +```
 +
 +You can checkout a specific version as follows:
 +
 +```txt
 +git checkout tags/<version-name>
 +```
 +
 +You can update a theme to the latest version by executing the following command in the *root* directory of your project:
 +
 +```txt
 +git submodule update --rebase --remote
 +```
 +
 +## Next steps
 +
 +You now have a live website served over HTTPS, distributed through CDN, and configured for continuous deployment. Dig deeper into the Netlify documentation:
 +
 +1. [Using a Custom Domain]
 +2. [Setting up HTTPS on Custom Domains][httpscustom]
 +3. [Redirects and Rewrite Rules]
 +
 +[app.netlify.com]: https://app.netlify.com
 +[build command]: /getting-started/usage/#build-your-site
 +[site configuration]: /getting-started/configuration/
 +[ghsm]: https://github.com/blog/2104-working-with-submodules
 +[gitsm]: https://git-scm.com/book/en/v2/Git-Tools-Submodules
 +[httpscustom]: https://www.netlify.com/docs/ssl/
 +[hugoversions]: https://github.com/netlify/build-image/blob/master/Dockerfile#L216
 +[netlify]: https://www.netlify.com/
 +[netlifysignup]: https://app.netlify.com/signup
 +[Quick Start]: /getting-started/quick-start/
 +[Redirects and Rewrite Rules]: https://www.netlify.com/docs/redirects/
 +[Using a Custom Domain]: https://www.netlify.com/docs/custom-domains/
 +[visit]: https://hugo-netlify-example.netlify.com
index 8965ad786179e67dcf9c6b37c920d8bd2cae8890,0000000000000000000000000000000000000000..b43261c8d28bc95a2d922996878e1b5d08e115ee
mode 100644,000000..100644
--- /dev/null
@@@ -1,81 -1,0 +1,81 @@@
- keywords: [hosting,deployment]
 +---
 +title: Host on Render
 +description: Host your Hugo site for free with Render's global CDN, fully-managed SSL and auto deploys from GitHub.
 +categories: [hosting and deployment]
++keywords: [hosting]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
 +toc: true
 +---
 +
 +## Introduction
 +
 +[Render](https://render.com) is a fully-managed cloud platform where you can host static sites, backend APIs, databases, cron jobs, and all your other apps in one place.
 +
 +Static sites are **completely free** on Render and include the following:
 +
 +- Continuous, automatic builds & deploys from [GitHub](https://render.com/docs/github) and [GitLab](https://render.com/docs/gitlab).
 +- Automatic SSL certificates through [Let's Encrypt](https://letsencrypt.org).
 +- Instant cache invalidation with a lightning fast, global CDN.
 +- Unlimited collaborators.
 +- Unlimited [custom domains](https://render.com/docs/custom-domains).
 +- Automatic [Brotli compression](https://en.wikipedia.org/wiki/Brotli) for faster sites.
 +- Native HTTP/2 support.
 +- [Pull Request Previews](https://render.com/docs/pull-request-previews).
 +- Automatic HTTP → HTTPS redirects.
 +- Custom URL redirects and rewrites.
 +
 +## Assumptions
 +
 +- You have an account with GitHub or GitLab.
 +- You have completed the [Quick Start] or have a Hugo website you are ready to deploy and share with the world.
 +- You have a Render account. You can sign up at https://render.com/register.
 +
 +## Deployment
 +
 +You can set up a Hugo site on Render in two quick steps:
 +
 +1. Create a new **Static Site** on Render, and give Render permission to access your GitHub/GitLab repo.
 +2. Use the following values during creation:
 +
 +  Field                | Value
 +  -------------------  |  -------------------
 + **Build Command**     | `hugo --gc --minify` (or your own build command)
 + **Publish Directory** | `public` (or your own output directory)
 +
 +That's it! Your site will be live on your Render URL (which looks like `yoursite.onrender.com`) as soon as the build is done.
 +
 +## Continuous deploys
 +
 +Now that Render is connected to your repo, it will **automatically build and publish your site** any time you push to your GitHub/GitLab.
 +
 +You can choose to disable auto deploys under the **Settings** section for your site and deploy it manually from the Render dashboard.
 +
 +## CDN and cache invalidation
 +
 +Render hosts your site on a global, lightning fast CDN which ensures the fastest possible download times for all your users across the globe.
 +
 +Every deploy automatically and instantly invalidates the CDN cache, so your users can always access the latest content on your site.
 +
 +## Custom domains
 +
 +Add your own domains to your site easily using Render's [custom domains](https://render.com/docs/custom-domains) guide.
 +
 +## Pull Request previews
 +
 +With Pull Request (PR) previews, you can visualize changes introduced in a pull request instead of simply relying on code reviews.
 +
 +Once enabled, every PR for your site will automatically generate a new static site based on the code in the PR. It will have its own URL, and it will be deleted automatically when the PR is closed.
 +
 +Read more about [Pull Request Previews](https://render.com/docs/pull-request-previews) on Render.
 +
 +## Hugo themes
 +
 +Render automatically downloads all Git submodules defined in your Git repo on every build. This way Hugo themes added as submodules work as expected.
 +
 +## Support
 +
 +Chat with Render developers at https://render.com/chat or email `support@render.com` if you need help.
 +
 +[Quick Start]: /getting-started/quick-start/
index ed603012b3d0facb4b4384378e1badffda1fe53a,0000000000000000000000000000000000000000..45b917f1e28fa6d4d1bd96197a69c2b05a718e03
mode 100644,000000..100644
--- /dev/null
@@@ -1,134 -1,0 +1,249 @@@
- description: You can upload your site to GCS, S3, or Azure using the Hugo CLI.
 +---
 +title: Hugo Deploy
- keywords: [s3,gcs,azure,hosting,deployment]
++description: Upload your site to GCS, S3, or Azure
 +categories: [hosting and deployment]
- ## Create a bucket to deploy to
++keywords: [deployment,s3,gcs,azure]
 +menu:
 +  docs:
 +    parent: hosting-and-deployment
 +    weight: 20
 +weight: 20
 +toc: true
 +---
 +
 +You can use the "hugo deploy" command to upload your site directly to a Google Cloud Storage (GCS) bucket, an AWS S3 bucket, and/or an Azure Storage container.
 +
++
 +## Assumptions
 +
 +* You have completed the [Quick Start] or have a Hugo website you are ready to deploy and share with the world.
 +* You have an account with the service provider ([Google Cloud](https://cloud.google.com/), [AWS](https://aws.amazon.com), or [Azure](https://azure.microsoft.com)) that you want to deploy to.
 +* You have authenticated.
 +  * Google Cloud: [Install the CLI](https://cloud.google.com/sdk) and run [`gcloud auth login`](https://cloud.google.com/sdk/gcloud/reference/auth/login).
 +  * AWS: [Install the CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html) and run [`aws configure`](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html).
 +  * Azure: [Install the CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) and run [`az login`](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli).
 +  * NOTE: Each service supports alternatives for authentication, including using environment variables. See [here](https://gocloud.dev/howto/blob/#services) for more details.
++* You have created a bucket to deploy to. If you want your site to be
++  public, be sure to configure the bucket to be publicly readable as a static website.
++  * Google Cloud: [create a bucket](https://cloud.google.com/storage/docs/creating-buckets) and [host a static website](https://cloud.google.com/storage/docs/hosting-static-website)
++  * Amazon S3: [create a bucket](https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html) and [host a static website](https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteHosting.html)
++  * Microsoft Azure: [create a storage container](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal) and [host a static website](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website)
++
++
++## Configuring your first deployment
++
++In the configuration file for your site, add a `[deployment]` section
++and a `[[deployment.targets]]` subsection. The only required parameters are
++the name and URL:
++
++```toml
++[deployment]
++
++[[deployment.targets]]
++# An arbitrary name for this target.
++name = "production"
++
++# URL specifies the Go Cloud Development Kit URL to deploy to. Examples:
++URL = "<FILL ME IN>"
++
++# Google Cloud Storage -- see https://gocloud.dev/howto/blob/#gcs
++#URL = "gs://<Bucket Name>"
++
++# Amazon Web Services S3; see https://gocloud.dev/howto/blob/#s3
++# For S3-compatible endpoints, see https://gocloud.dev/howto/blob/#s3-compatible
++#URL = "s3://<Bucket Name>?region=<AWS region>"
++
++# Microsoft Azure Blob Storage; see https://gocloud.dev/howto/blob/#azure
++#URL = "azblob://$web"
++
++```
++
++## Deploy
++
++To deploy to a target:
++
++```bash
++hugo deploy [--target=<target name>]
++```
++
++The deploy process recursively walks through your local publish directory
++(`public` by default) and syncs it to the destination bucket, to ensure
++that the local and remote contents match.
++
++If you don't specify a target, Hugo will deploy to the first target in your
++configuration.
++
++See `hugo help deploy` or [the deploy command-line documentation][commandline] for more command-line options.
++
++
++### How the file list works
 +
- Create a storage bucket to deploy your site to. If you want your site to be
- public, be sure to configure the bucket to be publicly readable.
++The first thing `hugo deploy` does is create file lists for local and remote by
++traversing the local publish directory and remote bucket.
 +
- ### Google Cloud Storage (GCS)
++For both local and remote, the file list includes and excludes files according to
++the [deployment target's configuration][config] --
++* If the configuration specifies an `include` pattern, all files
++  are skipped by default except those matching the pattern.
++* If the configuration specifies an `exclude` pattern, files matching the
++  pattern are skipped.
 +
- Follow the [GCS instructions for how to create a bucket](https://cloud.google.com/storage/docs/creating-buckets).
 +
- ### AWS S3
++{{% note %}}
++When creating the local file list, a few additional skips apply: first, Hugo always
++skips files named `.DS_Store`. 
 +
- Follow the [AWS instructions for how to create a bucket](https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html).
++Second, Hugo always skips local hidden directories
++(directories with names starting with a period, e.g. `.git`) and does not
++traverse into them, except for the special [hidden directory named
++`.well-known`](https://en.wikipedia.org/wiki/Well-known_URI), which is
++traversed if it exists.
++{{% /note %}}
 +
- ### Azure Storage
 +
- Follow the [Azure instructions for how to create a storage container](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal).
 +
- ## Configure the deployment
++### How the local and remote file lists are compared
 +
- In the configuration file for your site, add a `[deployment]` section with one
- or more `[[deployment.targets]]` section, one for each deployment target. Here's
- a detailed example:
++In the second step, Hugo compares the two file lists to figure out what changes
++actually need to be made on the remote. File names are compared first; if the
++local and remote files both exist then the sizes and md5sums are compared. Any
++difference means that the file will be (re-)uploaded.
 +
- # Files that match the regular expressions in the "Order" list
- # will be uploaded first, in the listed order.
++Specifying the `--force` flag will ensure all files are re-uploaded even
++if Hugo cannot detect any differences between local and remote.
++
++Files are deleted from the remote bucket if they are not present in the local
++file list.
++
++{{% note %}}
++If a remote file is excluded from the file list generation using the
++exclude/include configs, then the comparison step will not know to delete the
++file -- so it will remain on the remote even if it isn't present locally.
++{{% /note %}}
++
++If the [`--confirm` or `--dryRun` flags][commandline] are given, Hugo displays 
++what differences it has found and either pauses or stops here.
++
++### How synchronization works
++
++Hugo applies the list of changes to the remote storage bucket. Missing and/or
++changed files are uploaded, and files missing locally but present remotely are
++deleted. As files are uploaded, their headers are also configured on the remote
++according to the matchers configuration.
++
++{{% note %}}
++As a safety measure to help prevent accidents, if there are more than 256 files
++to delete, Hugo won't delete any files from the remote. Use the `--maxDeletes`
++command line flag to override this.
++{{% /note %}}
++
++## Advanced configuration
++
++Here's a full example deployment configuration:
 +
 +```toml
 +[deployment]
++
 +# By default, files are uploaded in an arbitrary order.
++# If you specify an `order` list, files that match regular expressions 
++# in this list will be uploaded first, in the specified order.
 +order = [".jpg$", ".gif$"]
 +
- # URL = "gs://<Bucket Name>"
 +[[deployment.targets]]
++# Define one or more targets, e.g., staging and production.
++# Each target gets its own [[deployment.targets]] section.
++
 +# An arbitrary name for this target.
 +name = "mydeployment"
 +# The Go Cloud Development Kit URL to deploy to. Examples:
++URL = "<FILL ME IN>"
++
 +# GCS; see https://gocloud.dev/howto/blob/#gcs
- # URL = "s3://<Bucket Name>?region=<AWS region>"
++#URL = "gs://<Bucket Name>"
 +
 +# S3; see https://gocloud.dev/howto/blob/#s3
 +# For S3-compatible endpoints, see https://gocloud.dev/howto/blob/#s3-compatible
- # URL = "azblob://$web"
++#URL = "s3://<Bucket Name>?region=<AWS region>"
 +
 +# Azure Blob Storage; see https://gocloud.dev/howto/blob/#azure
- # URL = "gs://<Bucket Name>?prefix=a/subfolder/"
++#URL = "azblob://$web"
 +
 +# You can use a "prefix=" query parameter to target a subfolder of the bucket:
- cloudFrontDistributionID = <ID>
++#URL = "gs://<Bucket Name>?prefix=a/subfolder/"
 +
 +# If you are using a CloudFront CDN, deploy will invalidate the cache as needed.
- # Optionally, you can include or exclude specific files.
- # See https://godoc.org/github.com/gobwas/glob#Glob for the glob pattern syntax.
- # If non-empty, the pattern is matched against the local path.
- # All paths are matched against in their filepath.ToSlash form.
++#cloudFrontDistributionID = "<FILL ME IN>"
 +
- # As a result, local files that don't pass the include/exclude filters are not uploaded to remote,
++# Include or exclude specific files when deploying to this target:
 +# If exclude is non-empty, and a local or remote file's path matches it, that file is not synced.
 +# If include is non-empty, and a local or remote file's path does not match it, that file is not synced.
- # include = "**.html" # would only include files with ".html" suffix
- # exclude = "**.{jpg, png}" # would exclude files with ".jpg" or ".png" suffix
++# Note: local files that don't pass the include/exclude filters are not uploaded to remote,
 +# and remote files that don't pass the include/exclude filters are not deleted.
- # [[deployment.matchers]] configure behavior for files that match the Pattern.
++# 
++# The pattern syntax is documented here: https://godoc.org/github.com/gobwas/glob#Glob
++# Patterns should be written with forward slashes as separator.
++# 
++#include = "**.html" # would only include files with ".html" suffix
++#exclude = "**.{jpg, png}" # would exclude files with ".jpg" or ".png" suffix
++
 +
++#######################
++[[deployment.matchers]] 
++# Matchers enable special caching, content type and compression behavior for
++# specified file types. You can include any number of matcher blocks; the first one
++# matching a given file pattern will be used.
 +
- ## Deploy
- To deploy to a target:
- ```bash
- hugo deploy [--target=<target name>, defaults to first target]
- ```
- Hugo will identify and apply any local changes that need to be reflected to the
- remote target. You can use `--dryRun` to see the changes without applying them,
- or `--confirm` to be prompted before making changes.
- See `hugo help deploy` for more command-line options.
 +# See https://golang.org/pkg/regexp/syntax/ for pattern syntax.
 +# Pattern searching is stopped on first match.
++pattern = "<FILL ME IN>"
++
++# If true, Hugo will gzip the file before uploading it to the bucket.
++# With many storage services, this will save on storage and bandwidth costs
++# for uncompressed file types.
++#gzip = false 
++
++# If true, Hugo always re-uploads this file even if size and md5 match.
++# This is useful if Hugo isn't reliably able to determine whether to re-upload
++# the file on its own.
++#force = false
++
++# Content-type header to configure for this file when served.
++# By default this can be determined from the file extension.
++#contentType = ""
++
++# Cache-control header to configure for this file when served.
++# The default is the empty string.
++#cacheControl = ""
++
++# Content-encoding header to configure for this file when served.
++# By default, if gzip is True, this will be filled with "gzip".
++#contentEncoding = ""
++
 +
 +# Samples:
 +
 +[[deployment.matchers]]
 +# Cache static assets for 1 year.
 +pattern = "^.+\\.(js|css|svg|ttf)$"
 +cacheControl = "max-age=31536000, no-transform, public"
 +gzip = true
 +
 +[[deployment.matchers]]
 +pattern = "^.+\\.(png|jpg)$"
 +cacheControl = "max-age=31536000, no-transform, public"
 +gzip = false
 +
 +[[deployment.matchers]]
 +# Set custom content type for /sitemap.xml
 +pattern = "^sitemap\\.xml$"
 +contentType = "application/xml"
 +gzip = true
 +
 +[[deployment.matchers]]
 +pattern = "^.+\\.(html|xml|json)$"
 +gzip = true
 +```
 +
- [Google Cloud]: [https://cloud.google.com]
- [AWS]: [https://aws.amazon.com]
- [Azure]: [https://azure.microsoft.com]
 +[Quick Start]: /getting-started/quick-start/
++[commandline]: /commands/hugo_deploy/
++[config]: #advanced-configuration
index 87dca37b8d305be9ca428f5649d0ed705065ea48,0000000000000000000000000000000000000000..cbff13ad0999a0f4b3b19c4a5de8b55ee3c75e61
mode 100644,000000..100644
--- /dev/null
@@@ -1,29 -1,0 +1,29 @@@
- categories: [hugo modules]
- keywords: [themes,modules]
- aliases: [/themes/overview/,/themes/]
 +---
 +title: Hugo Modules
 +linkTitle: Overview
 +description: How to use Hugo Modules.
++categories: []
++keywords: []
 +menu:
 +  docs:
 +    identifier: hugo-modules-overview
 +    parent: modules
 +    weight: 10
 +weight: 10
 +toc: true
++aliases: [/themes/overview/,/themes/]
 +---
 +
 +**Hugo Modules** are the core building blocks in Hugo. A _module_ can be your main project or a smaller module providing one or more of the 7 component types defined in Hugo: **static**, **content**, **layouts**, **data**, **assets**, **i18n**, and **archetypes**.
 +
 +You can combine modules in any combination you like, and even mount directories from non-Hugo projects, forming a big, virtual union file system.
 +
 +Hugo Modules are powered by Go Modules. For more information about Go Modules, see:
 +
 +- [https://github.com/golang/go/wiki/Modules](https://github.com/golang/go/wiki/Modules)
 +- [https://go.dev/blog/using-go-modules](https://go.dev/blog/using-go-modules)
 +
 +Some example projects:
 +
 +- [https://github.com/bep/docuapi](https://github.com/bep/docuapi) is a theme that has been ported to Hugo Modules while testing this feature. It is a good example of a non-Hugo-project mounted into Hugo’s folder structure. It even shows a JS Bundler implementation in regular Go templates.
 +- [https://github.com/bep/my-modular-site](https://github.com/bep/my-modular-site) is a very simple site used for testing.
index b1a3f4bf83966b5cb42e0c2761999a26bb59e671,0000000000000000000000000000000000000000..d707e749829352a7a303e6cf416a21e2adce2963
mode 100644,000000..100644
--- /dev/null
@@@ -1,180 -1,0 +1,180 @@@
- keywords: [themes, source, organization, directories]
 +---
 +title: Configure Hugo modules
 +description: This page describes the configuration options for a module.
 +categories: [hugo modules]
- {{< code-toggle file="hugo" >}}
++keywords: [modules,themes]
 +menu:
 +  docs:
 +    parent: modules
 +    weight: 20
 +weight: 20
 +toc: true
 +---
 +
 +## Module configuration: top level
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle file=hugo >}}
 +[module]
 +noVendor = ""
 +proxy = "direct"
 +noProxy = "none"
 +private = "*.*"
 +replacements = ""
 +workspace = "off"
 +{{< /code-toggle >}}
 +
 +noVendor
 +: A optional Glob pattern matching module paths to skip when vendoring, e.g. "github.com/**"
 +
 +vendorClosest
 +: When enabled, we will pick the vendored module closest to the module using it. The default behavior is to pick the first. Note that there can still be only one dependency of a given module path, so once it is in use it cannot be redefined.
 +
 +proxy
 +: Defines the proxy server to use to download remote modules. Default is `direct`, which means "git clone" and similar.
 +
 +noProxy
 +: Comma separated glob list matching paths that should not use the proxy configured above.
 +
 +private
 +: Comma separated glob list matching paths that should be treated as private.
 +
 +workspace
 +: The workspace file to use. This enables Go workspace mode. Note that this can also be set via OS env, e.g. `export HUGO_MODULE_WORKSPACE=/my/hugo.work` This only works with Go 1.18+. In Hugo `v0.109.0` we changed the default to `off` and we now resolve any relative work file names relative to the working directory.
 +
 +replacements
 +: A comma-separated list of mappings from module paths to directories, e.g. `github.com/bep/my-theme -> ../..,github.com/bep/shortcodes -> /some/path`. This is mostly useful for temporary local development of a module, in which case you might want to save it as an environment variable, e.g: `env HUGO_MODULE_REPLACEMENTS="github.com/bep/my-theme -> ../.."`. Relative paths are relative to [themesDir](/getting-started/configuration/#all-configuration-settings). Absolute paths are allowed.
 +
 +Note that the above terms maps directly to their counterparts in Go Modules. Some of these setting may be natural to set as OS environment variables. To set the proxy server to use, as an example:
 +
 +```txt
 +env HUGO_MODULE_PROXY=https://proxy.example.org hugo
 +```
 +
 +{{< gomodules-info >}}
 +
 +## Module configuration: hugoVersion
 +
 +If your module requires a particular version of Hugo to work, you can indicate that in the `module` section and the user will be warned if using a too old/new version.
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle file=hugo >}}
 +[module]
 +[module.hugoVersion]
 +  min = ""
 +  max = ""
 +  extended = false
 +
 +{{< /code-toggle >}}
 +
 +Any of the above can be omitted.
 +
 +min
 +: The minimum Hugo version supported, e.g. `0.55.0`
 +
 +max
 +: The maximum Hugo version supported, e.g. `0.55.0`
 +
 +extended
 +: Whether the extended version of Hugo is required.
 +
 +## Module configuration: imports
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle file=hugo >}}
 +[module]
 +[[module.imports]]
 +  path = "github.com/gohugoio/hugoTestModules1_linux/modh1_2_1v"
 +  ignoreConfig = false
 +  ignoreImports = false
 +  disable = false
 +[[module.imports]]
 +  path = "my-shortcodes"
 +{{< /code-toggle >}}
 +
 +path
 +: Can be either a valid Go Module module path, e.g. `github.com/gohugoio/myShortcodes`, or the directory name for the module as stored in your themes folder.
 +
 +ignoreConfig
 +: If enabled, any module configuration file, e.g. `hugo.toml`, will not be loaded. Note that this will also stop the loading of any transitive module dependencies.
 +
 +ignoreImports
 +: If enabled, module imports will not be followed.
 +
 +disable
 +: Set to `true` to disable the module while keeping any version info in the `go.*` files.
 +
 +noMounts
 +:  Do not mount any folder in this import.
 +
 +noVendor
 +:  Never vendor this import (only allowed in main project).
 +
 +{{< gomodules-info >}}
 +
 +## Module configuration: mounts
 +
 +{{% note %}}
 +When the `mounts` configuration was introduced in Hugo 0.56.0, we were careful to preserve the existing `contentDir`, `staticDir`, and similar configuration to make sure all existing sites just continued to work. But you should not have both: if you add a `mounts` section you should remove the old `contentDir`, `staticDir`, etc. settings.
 +{{% /note %}}
 +
 +{{% note %}}
 +When you add a mount, the default mount for the concerned target root is ignored: be sure to explicitly add it.
 +{{% /note %}}
 +
 +**Default mounts**
- {{< code-toggle file="hugo" >}}
++{{< code-toggle file=hugo >}}
 +[module]
 +[[module.mounts]]
 +    source="content"
 +    target="content"
 +[[module.mounts]]
 +    source="static"
 +    target="static"
 +[[module.mounts]]
 +    source="layouts"
 +    target="layouts"
 +[[module.mounts]]
 +    source="data"
 +    target="data"
 +[[module.mounts]]
 +    source="assets"
 +    target="assets"
 +[[module.mounts]]
 +    source="i18n"
 +    target="i18n"
 +[[module.mounts]]
 +    source="archetypes"
 +    target="archetypes"
 +{{< /code-toggle >}}
 +
 +source
 +: The source directory of the mount. For the main project, this can be either project-relative or absolute and even a symbolic link. For other modules it must be project-relative.
 +
 +target
 +: Where it should be mounted into Hugo's virtual filesystem. It must start with one of Hugo's component folders: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, or `archetypes`. E.g. `content/blog`.
 +
 +lang
 +: The language code, e.g. "en". Only relevant for `content` mounts, and `static` mounts when in multihost mode.
 +
 +includeFiles (string or slice)
 +: One or more [glob](https://github.com/gobwas/glob) patterns matching files or directories to include. If `excludeFiles` is not set, the files matching `includeFiles` will be the files mounted.
 +
 +The glob patterns are matched to the file names starting from the `source` root, they should have Unix styled slashes even on Windows, `/` matches the mount root and `**` can be used as a  super-asterisk to match recursively down all directories, e.g `/posts/**.jpg`.
 +
 +The search is case-insensitive.
 +
 +excludeFiles (string or slice)
 +: One or more glob patterns matching files to exclude.
 +
 +**Example**
++{{< code-toggle file=hugo >}}
 +[module]
 +[[module.mounts]]
 +    source="content"
 +    target="content"
 +    excludeFiles="docs/*"
 +[[module.mounts]]
 +    source="node_modules"
 +    target="assets"
 +[[module.mounts]]
 +    source="assets"
 +    target="assets"
 +{{< /code-toggle >}}
index d0a986b7e7945ddff761f81fc6788838c6d482c4,0000000000000000000000000000000000000000..947a0ff7908b8ec0ac2ed59600e27f7212fac0f5
mode 100644,000000..100644
--- /dev/null
@@@ -1,48 -1,0 +1,45 @@@
- keywords: [themes, theme, source, organization, directories]
 +---
 +title: Theme components
 +description: Hugo provides advanced theming support with Theme Components.
 +categories: [hugo modules]
++keywords: [modules,themes]
 +menu:
 +  docs:
 +    parent: modules
 +    weight: 40
 +weight: 40
 +aliases: [/themes/customize/,/themes/customizing/]
 +toc: true
 +---
 +
- {{< code-toggle file="hugo" >}}
 +{{% note %}}
 +This section contain information that may be outdated and is in the process of being rewritten.
 +{{% /note %}}
 +Since Hugo `0.42` a project can configure a theme as a composite of as many theme components you need:
 +
- Hugo uses two different algorithms to merge the filesystems, depending on the file type:
++{{< code-toggle file=hugo >}}
 +theme = ["my-shortcodes", "base-theme", "hyde"]
 +{{< /code-toggle >}}
 +
 +You can even nest this, and have the theme component itself include theme components in its own `hugo.toml` (theme inheritance).[^1]
 +
 +The theme definition example above in `hugo.toml` creates a theme with 3 theme components with precedence from left to right.
 +
 +For any given file, data entry, etc., Hugo will look first in the project and then in `my-shortcodes`, `base-theme`, and lastly `hyde`.
 +
++Hugo uses two different algorithms to merge the file systems, depending on the file type:
 +
 +* For `i18n` and `data` files, Hugo merges deeply using the translation ID and data key inside the files.
 +* For `static`, `layouts` (templates), and `archetypes` files, these are merged on file level. So the left-most file will be chosen.
 +
 +The name used in the `theme` definition above must match a folder in `/your-site/themes`, e.g. `/your-site/themes/my-shortcodes`. There are plans to improve on this and get a URL scheme so this can be resolved automatically.
 +
 +Also note that a component that is part of a theme can have its own configuration file, e.g. `hugo.toml`. There are currently some restrictions to what a theme component can configure:
 +
 +* `params` (global and per language)
 +* `menu` (global and per language)
 +* `outputformats` and `mediatypes`
 +
 +The same rules apply here: The left-most parameter/menu etc. with the same ID will win. There are some hidden and experimental namespace support in the above, which we will work to improve in the future, but theme authors are encouraged to create their own namespaces to avoid naming conflicts.
 +
 +[^1]: For themes hosted on the [Hugo Themes Showcase](https://themes.gohugo.io/) components need to be added as git submodules that point to the directory `exampleSite/themes`
index db269a5db4f5463867fa4716cd264bbab63fc38e,0000000000000000000000000000000000000000..9e8f1d4d0daf741a34152ecdd3346c2009f1177b
mode 100644,000000..100644
--- /dev/null
@@@ -1,162 -1,0 +1,161 @@@
- keywords: [install, themes, source, organization, directories,usage,modules]
 +---
 +title: Use Hugo Modules
 +description: How to use Hugo Modules to build and manage your site.
 +categories: [hugo modules]
- ```bash
++keywords: [modules,themes]
 +menu:
 +  docs:
 +    parent: modules
 +    weight: 30
 +weight: 30
 +aliases: [/themes/usage/,/themes/installing/,/installing-and-using-themes/]
 +toc: true
 +---
 +
 +## Prerequisite
 +
 +{{< gomodules-info >}}
 +
 +## Initialize a new module
 +
 +Use `hugo mod init` to initialize a new Hugo Module. If it fails to guess the module path, you must provide it as an argument, e.g.:
 +
- {{< code-toggle file="hugo" >}}
++```sh
 +hugo mod init github.com/gohugoio/myShortcodes
 +```
 +
 +Also see the [CLI Doc](/commands/hugo_mod_init/).
 +
 +## Use a module for a theme
 +
 +The easiest way to use a Module for a theme is to import it in the configuration.
 +
 +1. Initialize the hugo module system: `hugo mod init github.com/<your_user>/<your_project>`
 +2. Import the theme:
 +
- ```bash
++{{< code-toggle file=hugo >}}
 +[module]
 +  [[module.imports]]
 +    path = "github.com/spf13/hyde"
 +{{< /code-toggle >}}
 +
 +## Update modules
 +
 +Modules will be downloaded and added when you add them as imports to your configuration, see [Module Imports](/hugo-modules/configuration/#module-configuration-imports).
 +
 +To update or manage versions, you can use `hugo mod get`.
 +
 +Some examples:
 +
 +### Update all modules
 +
- ```bash
++```sh
 +hugo mod get -u
 +```
 +
 +### Update all modules recursively
 +
- ```bash
++```sh
 +hugo mod get -u ./...
 +```
 +
 +### Update one module
 +
- ```bash
++```sh
 +hugo mod get -u github.com/gohugoio/myShortcodes
 +```
 +
 +### Get a specific version
 +
- ```bash
++```sh
 +hugo mod get github.com/gohugoio/myShortcodes@v1.0.7
 +```
 +
 +Also see the [CLI Doc](/commands/hugo_mod_get/).
 +
 +## Make and test changes in a module
 +
 +One way to do local development of a module imported in a project is to add a replace directive to a local directory with the source in `go.mod`:
 +
++```sh
 +replace github.com/bep/hugotestmods/mypartials => /Users/bep/hugotestmods/mypartials
 +```
 +
 +If you have the `hugo server` running, the configuration will be reloaded and `/Users/bep/hugotestmods/mypartials` put on the watch list.
 +
 +Instead of modifying the `go.mod` files, you can also use the modules configuration [`replacements`](/hugo-modules/configuration/#module-configuration-top-level) option.
 +
 +## Print dependency graph
 +
 +Use `hugo mod graph` from the relevant module directory and it will print the dependency graph, including vendoring, module replacement or disabled status.
 +
 +E.g.:
 +
 +```txt
 +hugo mod graph
 +
 +github.com/bep/my-modular-site github.com/bep/hugotestmods/mymounts@v1.2.0
 +github.com/bep/my-modular-site github.com/bep/hugotestmods/mypartials@v1.0.7
 +github.com/bep/hugotestmods/mypartials@v1.0.7 github.com/bep/hugotestmods/myassets@v1.0.4
 +github.com/bep/hugotestmods/mypartials@v1.0.7 github.com/bep/hugotestmods/myv2@v1.0.0
 +DISABLED github.com/bep/my-modular-site github.com/spf13/hyde@v0.0.0-20190427180251-e36f5799b396
 +github.com/bep/my-modular-site github.com/bep/hugo-fresh@v1.0.1
 +github.com/bep/my-modular-site in-themesdir
- {{< new-in "0.109.0" >}}
 +```
 +
 +Also see the [CLI Doc](/commands/hugo_mod_graph/).
 +
 +## Vendor your modules
 +
 +`hugo mod vendor` will write all the module dependencies to a `_vendor` folder, which will then be used for all subsequent builds.
 +
 +Note that:
 +
 +* You can run `hugo mod vendor` on any level in the module tree.
 +* Vendoring will not store modules stored in your `themes` folder.
 +* Most commands accept a `--ignoreVendorPaths` flag, which will then not use the vendored modules in `_vendor` for the module paths matching the [Glob](https://github.com/gobwas/glob) pattern given.
 +
 +Also see the [CLI Doc](/commands/hugo_mod_vendor/).
 +
 +## Tidy go.mod, go.sum
 +
 +Run `hugo mod tidy` to remove unused entries in `go.mod` and `go.sum`.
 +
 +Also see the [CLI Doc](/commands/hugo_mod_clean/).
 +
 +## Clean module cache
 +
 +Run `hugo mod clean` to delete the entire modules cache.
 +
 +Note that you can also configure the `modules` cache with a `maxAge`, see [File Caches](/getting-started/configuration/#configure-file-caches).
 +
 +Also see the [CLI Doc](/commands/hugo_mod_clean/).
 +
 +## Module workspaces
 +
- ```bash
++{{< new-in 0.109.0 >}}
 +
 +Workspace support was added in [Go 1.18](https://go.dev/blog/get-familiar-with-workspaces) and Hugo got solid support for it in the `v0.109.0` version.
 +
 +A common use case for a workspace is to simplify local development of a site with its theme modules.
 +
 +A workspace can be configured in a `*.work` file and activated with the [module.workspace](/hugo-modules/configuration/) setting, which for this use is commonly controlled via the `HUGO_MODULE_WORKSPACE` OS environment variable.
 +
 +See the [hugo.work](https://github.com/gohugoio/hugo/blob/master/docs/hugo.work) file in the Hugo Docs repo for an example:
 +
 +```text
 +go 1.19
 +
 +use .
 +use ../gohugoioTheme
 +```
 +
 +Using the `use` directive, list all the modules you want to work on, pointing to its relative location. As in the example above, it's recommended to always include the main project (the ".") in the list.
 +
 +With that you can start the Hugo server with that workspace enabled:
 +
++```sh
 +HUGO_MODULE_WORKSPACE=hugo.work hugo server --ignoreVendorPaths "**"
 +```
 +
 +The `--ignoreVendorPaths` flag is added above to ignore any of the vendored dependencies inside `_vendor`. If you don't use vendoring, you don't need that flag. But now the server is set up watching the files and directories in the workspace and you can see your local edits reloaded.
index b649a5bf6bd0ad3974336582bdd253a93fcc699b,0000000000000000000000000000000000000000..edc41b7a2d58c49fc406fcbfaf1780962da2071d
mode 100755,000000..100755
--- /dev/null
@@@ -1,12 -1,0 +1,12 @@@
- categories: [asset management]
 +---
 +title: Hugo Pipes
 +linkTitle: Overview
++categories: []
 +keywords: []
 +menu:
 +  docs:
 +    identifier: hugo-pipes-overview
 +    parent: hugo-pipes
 +    weight: 10
 +weight: 10
 +---
index 44b4e670e31a24a780748191a4299f2d85e4fb6e,0000000000000000000000000000000000000000..73ccf01d451753e1983338797a7f4404cd90963d
mode 100755,000000..100755
--- /dev/null
@@@ -1,76 -1,0 +1,76 @@@
- signatures: ["resources.Babel RESOURCE [OPTIONS]", "babel RESOURCE [OPTIONS]"]
 +---
 +title: Babel
 +description: Hugo Pipes can process JS files with Babel.
 +categories: [asset management]
 +keywords: []
 +menu:
 +  docs:
 +    parent: hugo-pipes
 +    weight: 70
 +weight: 70
++function:
++  aliases: [babel]
++  returnType: resource.Resource
++  signatures: ['resources.Babel [OPTIONS] RESOURCE']
 +---
 +
 +## Usage
 +
 +Any JavaScript resource file can be transpiled to another JavaScript version using `resources.Babel` which takes for argument the resource object and an optional dict of options listed below. Babel uses the [babel cli](https://babeljs.io/docs/en/babel-cli).
 +
 +{{% note %}}
 +Hugo Pipe's Babel requires the `@babel/cli` and `@babel/core` JavaScript packages to be installed in the project or globally (`npm install -g @babel/cli @babel/core`) along with any Babel plugin(s) or preset(s) used (e.g., `npm install @babel/preset-env --save-dev`).
 +
 +If you are using the Hugo Snap package, Babel and plugin(s) need to be installed locally within your Hugo site directory, e.g., `npm install @babel/cli @babel/core --save-dev` without the `-g` flag.
 +{{% /note %}}
 +
 +### configuration
 +
 +We add the main project's `node_modules` to `NODE_PATH` when running Babel and similar tools. There are some known [issues](https://github.com/babel/babel/issues/5618) with Babel in this area, so if you have a `babel.config.js` living in a Hugo Module (and not in the project itself), we recommend using `require` to load the presets/plugins, e.g.:
 +
- config [string]
- : Path to the Babel configuration file. Hugo will, by default, look for a `babel.config.js` in your project. More information on these configuration files can be found here: [babel configuration](https://babeljs.io/docs/en/configuration).
- minified [bool]
- : Save as many bytes as possible when printing
 +```js
 +module.exports = {
 +  presets: [
 +    [
 +      require("@babel/preset-env"),
 +      {
 +        useBuiltIns: "entry",
 +        corejs: 3,
 +      },
 +    ],
 +  ],
 +};
 +```
 +
 +### Options
 +
- noComments [bool]
- : Write comments to generated output (true by default)
++config
++: (`string`) Path to the Babel configuration file. Hugo will, by default, look for a `babel.config.js` in your project. More information on these configuration files can be found here: [babel configuration](https://babeljs.io/docs/en/configuration).
 +
- compact [bool]
- : Do not include superfluous whitespace characters and line terminators. Defaults to `auto` if not set.
++minified
++: (`bool`) Save as many bytes as possible when printing
 +
- verbose [bool]
- : Log everything
++noComments
++: (`bool`) Write comments to generated output (true by default)
 +
- sourceMap [string]
- : Output `inline` or `external` sourcemap from the babel compile. External sourcemaps will be written to the target with the output file name + ".map". Input sourcemaps can be read from js.Build and node modules and combined into the output sourcemaps.
++compact
++: (`bool`) Do not include superfluous whitespace characters and line terminators. Defaults to `auto` if not set.
 +
++verbose
++: (`bool`) Log everything
 +
++sourceMap
++: (`string`) Output `inline` or `external` sourcemap from the babel compile. External sourcemaps will be written to the target with the output file name + ".map". Input sourcemaps can be read from js.Build and node modules and combined into the output sourcemaps.
 +
 +### Examples
 +
 +```go-html-template
 +{{- $transpiled := resources.Get "scripts/main.js" | babel  -}}
 +```
 +
 +Or with options:
 +
 +```go-html-template
 +{{ $opts := dict "noComments" true }}
 +{{- $transpiled := resources.Get "scripts/main.js" | babel $opts -}}
 +```
index f3ff42f9c742f2c04833ade38f2d23968512d65f,0000000000000000000000000000000000000000..7fc9fc9dfbd24e007e12ba50bf75fb64242790a6
mode 100755,000000..100755
--- /dev/null
@@@ -1,23 -1,0 +1,26 @@@
- signatures: ["resources.Concat TARGET_PATH SLICE_RESOURCES"]
 +---
 +title: Concat
 +linkTitle: Concatenating assets
 +description: Bundle any number of assets into one resource.
 +categories: [asset management]
 +keywords: []
 +menu:
 +  docs:
 +    parent: hugo-pipes
 +    weight: 90
 +weight: 90
++action:
++  aliases: []
++  returnType: resource.Resource
++  signatures: ['resources.Concat TARGETPATH [RESOURCE...]']
 +---
 +
 +## Usage
 +
 +Asset files of the same MIME type can be bundled into one resource using `resources.Concat` which takes two arguments, the target path for the created resource bundle and a slice of resource objects to be concatenated.
 +
 +```go-html-template
 +{{ $plugins := resources.Get "js/plugins.js" }}
 +{{ $global := resources.Get "js/global.js" }}
 +{{ $js := slice $plugins $global | resources.Concat "js/bundle.js" }}
 +```
index c492d4c70ac448fa27098caade835cf9dd94ab8e,0000000000000000000000000000000000000000..68e41acd10c8d61efc746f2c8e8bcaa347d7ddc3
mode 100755,000000..100755
--- /dev/null
@@@ -1,27 -1,0 +1,30 @@@
- signatures: ["resources.Fingerprint RESOURCE [ALGORITHM]", "fingerprint RESOURCE [ALGORITHM]"]
 +---
 +title: Fingerprint
 +linkTitle: Fingerprinting and SRI hashing
 +description: Process a given resource, adding a hash string of the resource's content.
 +categories: [asset management]
 +keywords: []
 +menu:
 +  docs:
 +    parent: hugo-pipes
 +    weight: 100
 +weight: 100
++action:
++  aliases: [fingerprint]
++  returnType: resource.Resource
++  signatures: ['resources.Fingerprint [ALGORITHM] RESOURCE']
 +---
 +
 +## Usage
 +
 +Fingerprinting and [SRI](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) can be applied to any asset file using `resources.Fingerprint` which takes two arguments, the resource object and an optional [hash algorithm](https://en.wikipedia.org/wiki/Secure_Hash_Algorithms).
 +
 +The default hash algorithm is `sha256`. Other available algorithms are `sha384` and (as of Hugo `0.55`) `sha512` and `md5`.
 +
 +Any so processed asset will bear a `.Data.Integrity` property containing an integrity string, which is made up of the name of the hash algorithm, one hyphen and the base64-encoded hash sum.
 +
 +```go-html-template
 +{{ $js := resources.Get "js/global.js" }}
 +{{ $secureJS := $js | resources.Fingerprint "sha512" }}
 +<script src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
 +```
index 2cbb85e32cea3f3938f960f76a067c4f9d1ec768,0000000000000000000000000000000000000000..c993377f8de60b33b6c3c070b80ebde5be294cd7
mode 100755,000000..100755
--- /dev/null
@@@ -1,183 -1,0 +1,79 @@@
- ## Find resources in /assets
 +---
 +title: Hugo Pipes
 +linkTitle: Introduction
 +description: Hugo Pipes is Hugo's asset processing set of functions.
 +categories: [asset management]
 +keywords: []
 +menu:
 +  docs:
 +    parent: hugo-pipes
 +    weight: 20
 +weight: 20
 +toc: true
 +aliases: [/assets/]
 +---
 +
- This is about the global Resources mounted inside `/assets`. For the `.Page` scoped Resources, see [Page Resources](/content-management/page-resources/).
++## Find resources in assets
 +
- Note that you can mount any directory into Hugo's virtual `assets` folder using the [Mount Configuration](/hugo-modules/configuration/#module-configuration-mounts).
++This is about global and remote resources.
 +
- | Function  | Description |
- | ------------- | ------------- |
- | `resources.Get`  | Get locates the file name given in Hugo's assets filesystem and creates a `Resource` object that can be used for further transformations. See [Get a resource](#get-a-resource).  |
- | `resources.GetRemote`  | Same as `Get`, but it accepts remote URLs. See [Get a resource](#get-a-resource).|
- | `resources.GetMatch`  | `GetMatch` finds the first Resource matching the given pattern, or nil if none found. See Match for a more complete explanation about the rules used. |
- | `resources.Match`  | `Match` gets all resources matching the given base path prefix, e.g "*.png" will match all png files. The "*" does not match path delimiters (/), so if you organize your resources in sub-folders, you need to be explicit about it, e.g.: "images/*.png". To match any PNG image anywhere in the bundle you can do "\*\*.png", and to match all PNG images below the images folder, use "images/\*\*.jpg". The matching is case insensitive. Match matches by using the files name with path relative to the file system root with Unix style slashes (/) and no leading slash, e.g. "images/logo.png". See https://github.com/gobwas/glob for the full rules set.|
++global resource
++: A file within the assets directory, or within any directory [mounted] to the assets directory.
 +
- See the [GoDoc Page](https://pkg.go.dev/github.com/gohugoio/hugo/tpl/resources) for the `resources` package for an up to date overview of all template functions in this namespace.
- ## Get a resource
- In order to process an asset with Hugo Pipes, it must be retrieved as a `Resource` using `resources.Get` or `resources.GetRemote`.
- With `resources.Get`, the first argument is a local path relative to the `assets` directory/directories:
- ```go-html-template
- {{ $local := resources.Get "sass/main.scss" }}
- ```
- With `resources.GetRemote`, the first argument is a remote URL:
- ```go-html-template
- {{ $remote := resources.GetRemote "https://www.example.com/styles.scss" }}
- ```
- `resources.Get` and `resources.GetRemote` return `nil` if the resource is not found.
- {{< new-in "0.110.0" >}} You can get information about the HTTP Response using `.Data` in the returned `Resource`. This is especially useful for HEAD request without any body. The Data object contains:
- StatusCode
- : The HTTP status code, e.g. 200
- Status
- : The HTTP status text, e.g. "200 OK"
- TransferEncoding
- : The transfer encoding, e.g. "chunked"
- ContentLength
- : The content length, e.g. 1234
- ContentType
- : The content type, e.g. "text/html"
- ### Caching
- By default, Hugo calculates a cache key based on the `URL` and the `options` (e.g. headers) given.
- {{< new-in "0.97.0" >}} You can override this by setting a `key` in the options map. This can be used to get more fine grained control over how often a remote resource is fetched, e.g.:
- ```go-html-template
- {{ $cacheKey := print $url (now.Format "2006-01-02") }}
- {{ $resource := resource.GetRemote $url (dict "key" $cacheKey) }}
- ```
- ### Error handling
++remote resource
++: A file on a remote server, accessible via HTTP or HTTPS.
 +
- The return value from `resources.GetRemote` includes an `.Err` method that will return an error if the call failed. If you want to just log any error as a `WARNING` you can use a construct similar to the one below.
++For `.Page` scoped resources, see the [page resources] section.
 +
- ```go-html-template
- {{ with resources.GetRemote "https://gohugo.io/images/gohugoio-card-1.png" }}
-   {{ with .Err }}
-     {{ warnf "%s" . }}
-   {{ else }}
-     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
-   {{ end }}
- {{ end }}
- ```
- Note that if you do not handle `.Err` yourself, Hugo will fail the build the first time you start using the `Resource` object.
- ### Remote options
- When fetching a remote `Resource`, `resources.GetRemote` takes an optional options map as the second argument, e.g.:
- ```go-html-template
- {{ $resource := resources.GetRemote "https://example.org/api" (dict "headers" (dict "Authorization" "Bearer abcd")) }}
- ```
++[mounted]: /hugo-modules/configuration/#module-configuration-mounts
++[page resources]: /content-management/page-resources/
 +
- If you need multiple values for the same header key, use a slice:
++## Get a resource
 +
- ```go-html-template
- {{ $resource := resources.GetRemote "https://example.org/api"  (dict "headers" (dict "X-List" (slice "a" "b" "c"))) }}
- ```
++In order to process an asset with Hugo Pipes, it must be retrieved as a resource.
 +
- You can also change the request method and set the request body:
++For global resources, use:
 +
- ```go-html-template
- {{ $postResponse := resources.GetRemote "https://example.org/api"  (dict 
-     "method" "post"
-     "body" `{"complete": true}` 
-     "headers" (dict 
-         "Content-Type" "application/json"
-     )
- )}}
- ```
++- [`resources.ByType`](/functions/resources/bytype/)
++- [`resources.Get`](/functions/resources/get/)
++- [`resources.GetMatch`](/functions/resources/getmatch/)
++- [`resources.Match`](/functions/resources/match/)
 +
- ### Caching of remote resources
++For remote resources, use:
 +
- Remote resources fetched with `resources.GetRemote` will be cached on disk. See [Configure File Caches](/getting-started/configuration/#configure-file-caches) for details.
++- [`resources.GetRemote`](/functions/resources/getremote/)
 +
- {{< new-in "0.100.0" >}}
- Use `resources.Copy` to copy a page resource or a global resource. Commonly used to change a resource's published path, `resources.Copy` takes two arguments: the target path relative to the root of the `publishDir` (with or without a leading `/`), and the resource to copy.
- ```go-html-template
- {{ with resources.Get "img/a.jpg" }}
-   {{ with .Resize "300x" }}
-     {{ with resources.Copy "img/a-new.jpg" . }}
-       <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
-     {{ end }}
-   {{ end }}
- {{ end }}
- ```
- {{% note %}}
- The target path must be different than the source path, as shown in the example above. See GitHub issue [#10412](https://github.com/gohugoio/hugo/issues/10412).
- {{% /note %}}
++See the [GoDoc Page](https://pkg.go.dev/github.com/gohugoio/hugo/tpl/resources) for the `resources` package for an up to date overview of all template functions in this namespace.
 +
 +## Copy a resource
 +
- ### Asset publishing
++See the [`resources.Copy`](/functions/resources/copy/) function.
 +
 +## Asset directory
 +
 +Asset files must be stored in the asset directory. This is `/assets` by default, but can be configured via the configuration file's `assetDir` key.
 +
- ## Method aliases
- Each Hugo Pipes `resources` transformation method uses a __camelCased__ alias (`toCSS` for `resources.ToCSS`).
- Non-transformation methods deprived of such aliases are `resources.Get`, `resources.FromString`, `resources.ExecuteAsTemplate` and `resources.Concat`.
- The example above can therefore also be written as follows:
- ```go-html-template
- {{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint }}
- <link rel="stylesheet" href="{{ $style.Permalink }}">
- ```
++## Asset publishing
 +
 +Hugo publishes assets to the `publishDir` (typically `public`) when you invoke `.Permalink`, `.RelPermalink`, or `.Publish`. You can use `.Content` to inline the asset.
 +
 +## Go Pipes
 +
 +For improved readability, the Hugo Pipes examples of this documentation will be written using [Go Pipes](/templates/introduction/#pipes):
 +
 +```go-html-template
 +{{ $style := resources.Get "sass/main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
 +<link rel="stylesheet" href="{{ $style.Permalink }}">
 +```
 +
 +## Caching
 +
 +Hugo Pipes invocations are cached based on the entire *pipe chain*.
 +
 +An example of a pipe chain is:
 +
 +```go-html-template
 +{{ $mainJs := resources.Get "js/main.js" | js.Build "main.js" | minify | fingerprint }}
 +```
 +
 +The pipe chain is only invoked the first time it is encountered in a site build, and results are otherwise loaded from cache. As such, Hugo Pipes can be used in templates which are executed thousands or millions of times without negatively impacting the build performance.
index ecf6dc33f723849a792f486e13dcc71f19709004,0000000000000000000000000000000000000000..c9366ce8a658467a9169d5d9a94760726cd73764
mode 100644,000000..100644
--- /dev/null
@@@ -1,164 -1,0 +1,166 @@@
- description: Process a JavaScript file with [ESBuild](https://github.com/evanw/esbuild).
 +---
 +title: js.Build
 +linkTitle: JavaScript building
- signatures: ["js.Build RESOURCE [OPTIONS]"]
++description: Bundle, transpile, tree shake, and minify JavaScript resources.
 +categories: [asset management]
 +keywords: []
 +menu:
 +  docs:
 +    parent: hugo-pipes
 +    weight: 60
 +weight: 60
- targetPath [string]
- : If not set, the source path will be used as the base target path.
++action:
++  aliases: []
++  returnType: resource.Resource
++  signatures: ['js.Build [OPTIONS] RESOURCE']
 +---
 +
 +## Usage
 +
 +Any JavaScript resource file can be transpiled and "tree shaken" using `js.Build` which takes for argument either a string for the filepath or a dict of options listed below.
 +
 +### Options
 +
- params [map or slice]
- : Params that can be imported as JSON in your JS files, e.g.:
++targetPath
++: (`string`) If not set, the source path will be used as the base target path.
 +Note that the target path's extension may change if the target MIME type is different, e.g. when the source is TypeScript.
 +
- minify [bool]
- : Let `js.Build` handle the minification.
++params
++: (`map` or `slice`) Params that can be imported as JSON in your JS files, e.g.:
 +
 +```go-html-template
 +{{ $js := resources.Get "js/main.js" | js.Build (dict "params" (dict "api" "https://example.org/api")) }}
 +```
 +And then in your JS file:
 +
 +```js
 +import * as params from '@params';
 +```
 +
 +Note that this is meant for small data sets, e.g. configuration settings. For larger data, please put/mount the files into `/assets` and import them directly.
 +
- inject [slice]
- : This option allows you to automatically replace a global variable with an import from another file. The path names must be relative to `assets`.  See https://esbuild.github.io/api/#inject
++minify
++: (`bool`) Let `js.Build` handle the minification.
 +
- shims [map]
- : This option allows swapping out a component with another. A common use case is to load dependencies like React from a CDN  (with _shims_) when in production, but running with the full bundled `node_modules` dependency during development:
++inject
++: (`slice`) This option allows you to automatically replace a global variable with an import from another file. The path names must be relative to `assets`. See https://esbuild.github.io/api/#inject
 +
- target [string]
- : The language target.
++shims
++: (`map`) This option allows swapping out a component with another. A common use case is to load dependencies like React from a CDN  (with _shims_) when in production, but running with the full bundled `node_modules` dependency during development:
 +
 +```go-html-template
 +{{ $shims := dict "react" "js/shims/react.js"  "react-dom" "js/shims/react-dom.js" }}
 +{{ $js = $js | js.Build dict "shims" $shims }}
 +```
 +
 +The _shim_ files may look like these:
 +
 +```js
 +// js/shims/react.js
 +module.exports = window.React;
 +```
 +
 +```js
 +// js/shims/react-dom.js
 +module.exports = window.ReactDOM;
 +```
 +
 +With the above, these imports should work in both scenarios:
 +
 +```js
 +import * as React from 'react'
 +import * as ReactDOM from 'react-dom';
 +```
 +
- externals [slice]
- : External dependencies. Use this to trim dependencies you know will never be executed. See https://esbuild.github.io/api/#external
++target
++: (`string`) The language target.
 +  One of: `es5`, `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020` or `esnext`.
 +  Default is `esnext`.
 +
- defines [map]
- : Allow to define a set of string replacement to be performed when building. Should be a map where each key is to be replaced by its value.
++externals
++: (`slice`) External dependencies. Use this to trim dependencies you know will never be executed. See https://esbuild.github.io/api/#external
 +
- format [string]
- : The output format.
++defines
++: (`map`) Allow to define a set of string replacement to be performed when building. Should be a map where each key is to be replaced by its value.
 +
 +```go-html-template
 +{{ $defines := dict "process.env.NODE_ENV" `"development"` }}
 +```
 +
-   Default is `iife`, a self-executing function, suitable for inclusion as a <script> tag.
++format
++: (`string`) The output format.
 +  One of: `iife`, `cjs`, `esm`.
- sourceMap [string]
- : Whether to generate `inline` or `external` source maps from esbuild. External source maps will be written to the target with the output file name + ".map". Input source maps can be read from js.Build and node modules and combined into the output source maps. By default, source maps are not created.
++  Default is `iife`, a self-executing function, suitable for inclusion as a `<script>` tag.
 +
- Any imports in a file outside `/assets` or that does not resolve to a component inside `/assets` will be resolved by [ESBuild](https://esbuild.github.io/) with the **project directory** as the resolve directory (used as the starting point when looking for `node_modules` etc.). Also see [hugo mod npm pack](/commands/hugo_mod_npm_pack/).  If you have any imported npm dependencies in your project, you need to make sure to run `npm install` before you run `hugo`.
++sourceMap
++: (`string`) Whether to generate `inline` or `external` source maps from esbuild. External source maps will be written to the target with the output file name + ".map". Input source maps can be read from js.Build and node modules and combined into the output source maps. By default, source maps are not created.
 +
 +### Import JS code from /assets
 +
 +`js.Build` has full support for the virtual union file system in [Hugo Modules](/hugo-modules/). You can see some simple examples in this [test project](https://github.com/gohugoio/hugoTestProjectJSModImports), but in short this means that you can do this:
 +
 +```js
 +import { hello } from 'my/module';
 +```
 +
 +And it will resolve to the top-most `index.{js,ts,tsx,jsx}` inside `assets/my/module` in the layered file system.
 +
 +```js
 +import { hello3 } from 'my/module/hello3';
 +```
 +
 +Will resolve to `hello3.{js,ts,tsx,jsx}` inside `assets/my/module`.
 +
 +Any imports starting with `.` is resolved relative to the current file:
 +
 +```js
 +import { hello4 } from './lib';
 +```
 +
 +For other files (e.g. `JSON`, `CSS`) you need to use the relative path including any extension, e.g:
 +
 +```js
 +import * as data from 'my/module/data.json';
 +```
 +
++Any imports in a file outside `/assets` or that does not resolve to a component inside `/assets` will be resolved by [ESBuild](https://esbuild.github.io/) with the **project directory** as the resolve directory (used as the starting point when looking for `node_modules` etc.). Also see [hugo mod npm pack](/commands/hugo_mod_npm_pack/). If you have any imported npm dependencies in your project, you need to make sure to run `npm install` before you run `hugo`.
 +
 +Also note the new `params` option that can be passed from template to your JS files, e.g.:
 +
 +```go-html-template
 +{{ $js := resources.Get "js/main.js" | js.Build (dict "params" (dict "api" "https://example.org/api")) }}
 +```
 +And then in your JS file:
 +
 +```js
 +import * as params from '@params';
 +```
 +
 +Hugo will, by default, generate a `assets/jsconfig.json` file that maps the imports. This is useful for navigation/intellisense help inside code editors, but if you don't need/want it, you can [turn it off](/getting-started/configuration/#configure-build).
 +
- Any imports in a file outside `/assets` or that does not resolve to a component inside `/assets` will be resolved by [ESBuild](https://esbuild.github.io/) with the **project directory** as the resolve directory (used as the starting point when looking for `node_modules` etc.). Also see [hugo mod npm pack](/commands/hugo_mod_npm_pack/).  If you have any imported npm dependencies in your project, you need to make sure to run `npm install` before you run `hugo`.
 +### Include dependencies In package.json / node_modules
 +
- **Note:** If you're developing a theme/component that is supposed to be imported and depends on dependencies inside `package.json`, we recommend reading about [hugo mod npm pack](/commands/hugo_mod_npm_pack/), a tool to consolidate all the npm dependencies in a project.
++Any imports in a file outside `/assets` or that does not resolve to a component inside `/assets` will be resolved by [ESBuild](https://esbuild.github.io/) with the **project directory** as the resolve directory (used as the starting point when looking for `node_modules` etc.). Also see [hugo mod npm pack](/commands/hugo_mod_npm_pack/). If you have any imported npm dependencies in your project, you need to make sure to run `npm install` before you run `hugo`.
 +
 +The start directory for resolving npm packages (aka. packages that live inside a `node_modules` folder) is always the main project folder.
 +
++{{% note %}}
++If you're developing a theme/component that is supposed to be imported and depends on dependencies inside `package.json`, we recommend reading about [hugo mod npm pack](/commands/hugo_mod_npm_pack/), a tool to consolidate all the npm dependencies in a project.
++{{% /note %}}
 +
 +### Examples
 +
 +```go-html-template
 +{{ $built := resources.Get "js/index.js" | js.Build "main.js" }}
 +```
 +
 +Or with options:
 +
 +```go-html-template
 +{{ $externals := slice "react" "react-dom" }}
 +{{ $defines := dict "process.env.NODE_ENV" `"development"` }}
 +
 +{{ $opts := dict "targetPath" "main.js" "externals" $externals "defines" $defines }}
 +{{ $built := resources.Get "scripts/main.js" | js.Build $opts }}
 +<script src="{{ $built.RelPermalink }}" defer></script>
 +```
index 74ddfaa891100976e80d1eb6cd95cf8cccbf3352,0000000000000000000000000000000000000000..f8cedcde55860c78fee4819a6d695f226a232fcd
mode 100755,000000..100755
--- /dev/null
@@@ -1,24 -1,0 +1,27 @@@
- signatures: ["resources.Minify RESOURCE", "minify RESOURCE"]
 +---
 +title: Minify
 +linkTitle: Asset minification
 +description: Minifies a given resource.
 +categories: [asset management]
 +keywords: []
 +menu:
 +  docs:
 +    parent: hugo-pipes
 +    weight: 80
 +weight: 80
++action:
++  aliases: [minify]
++  returnType: resource.Resource
++  signatures: [resources.Minify RESOURCE]
 +---
 +
 +## Usage
 +
 +Any CSS, JS, JSON, HTML, SVG or XML resource can be minified using `resources.Minify` which takes for argument the resource object.
 +
 +```go-html-template
 +{{ $css := resources.Get "css/main.css" }}
 +{{ $style := $css | resources.Minify }}
 +```
 +
 +Note that you can also minify the final HTML output to `/public` by running `hugo --minify`.
index 2a08c7ad431ea3e0d832a8f5a8c4c9f5c05eacfb,0000000000000000000000000000000000000000..148b30a7eaefa5cf120c63d69ea47a0fc2746306
mode 100755,000000..100755
--- /dev/null
@@@ -1,128 -1,0 +1,131 @@@
- toc: true
 +---
 +title: PostCSS
 +description: Process CSS files with PostCSS, using any of the available plugins.
 +categories: [asset management]
 +keywords: []
 +menu:
 +  docs:
 +    parent: hugo-pipes
 +    weight: 40
- signatures: ["resources.PostCSS RESOURCE [OPTIONS]", "postCSS RESOURCE [OPTIONS]"]
 +weight: 40
- ```bash
- npm install postcss postcss-cli autoprefixer
++toc: true
++action:
++  aliases: [postCSS]
++  returnType: resource.Resource
++  signatures: ['resources.PostCSS [OPTIONS] RESOURCE']
 +---
 +
 +## Setup
 +
 +Follow the steps below to transform CSS using any of the [available PostCSS plugins](https://www.postcss.parts/).
 +
 +Step 1
 +: Install [Node.js](https://nodejs.org/en/download).
 +
 +Step 2
 +: Install the required Node.js packages in the root of your project. For example, to add vendor prefixes to CSS rules:
 +
- {{< code file="postcss.config.js" >}}
++```sh
++npm i -D postcss postcss-cli autoprefixer
 +```
 +
 +Step 3
 +: Create a PostCSS configuration file in the root of your project. You must name this file `postcss.config.js` or one of the other [supported file names]. For example:
 +
 +[supported file names]: https://github.com/postcss/postcss-load-config#usage
 +
- {{< code file="layouts/partials/css.html" >}}
++{{< code file=postcss.config.js >}}
 +module.exports = {
 +  plugins: [
 +    require('autoprefixer')
 +  ]
 +};
 +{{< /code >}}
 +
 +{{% note %}}
 +If you are a Windows user, and the path to your project contains a space, you must place the PostCSS configuration within the package.json file. See [this example](https://github.com/postcss/postcss-load-config#packagejson) and issue [#7333](https://github.com/gohugoio/hugo/issues/7333).
 +{{% /note %}}
 +
 +Step 4
 +: Place your CSS file within the `assets` directory.
 +
 +Step 5
 +: Capture the CSS file as a resource and pipe it through `resources.PostCSS` (alias `postCSS`):
 +
- {{< code file="layouts/partials/css.html" >}}
++{{< code file=layouts/partials/css.html >}}
 +{{ with resources.Get "css/main.css" | postCSS }}
 +  <link rel="stylesheet" href="{{ .RelPermalink }}">
 +{{ end }}
 +{{< /code >}}
 +
 +If starting with a Sass file within the `assets` directory:
 +
- skipInlineImportsNotFound {{< new-in "0.99.0" >}}
++{{< code file=layouts/partials/css.html >}}
 +{{ with resources.Get "sass/main.scss" | toCSS | postCSS }}
 +  <link rel="stylesheet" href="{{ .RelPermalink }}">
 +{{ end }}
 +{{< /code >}}
 +
 +## Options
 +
 +The `resources.PostCSS` method takes an optional map of options.
 +
 +config
 +: (`string`) The directory that contains the PostCSS configuration file. Default is the root of the project directory.
 +
 +noMap
 +: (`bool`) Default is `false`. If `true`, disables inline sourcemaps.
 +
 +inlineImports
 +: (`bool`) Default is `false`. Enable inlining of @import statements. It does so recursively, but will only import a file once.
 +URL imports (e.g. `@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');`) and imports with media queries will be ignored.
 +Note that this import routine does not care about the CSS spec, so you can have @import anywhere in the file.
 +Hugo will look for imports relative to the module mount and will respect theme overrides.
 +
- {{< code file="layouts/partials/css.html" >}}
++skipInlineImportsNotFound {{< new-in 0.99.0 >}}
 +: (`bool`) Default is `false`. Before Hugo 0.99.0 when `inlineImports` was enabled and we failed to resolve an import, we logged it as a warning. We now fail the build. If you have regular CSS imports in your CSS that you want to preserve, you can either use imports with URL or media queries (Hugo does not try to resolve those) or set `skipInlineImportsNotFound` to true.
 +
- {{< code file="layouts/partials/css.html" >}}
++{{< code file=layouts/partials/css.html >}}
 +{{ $opts := dict "config" "config-directory" "noMap" true }}
 +{{ with resources.Get "css/main.css" | postCSS $opts }}
 +  <link rel="stylesheet" href="{{ .RelPermalink }}">
 +{{ end }}
 +{{< /code >}}
 +
 +## No configuration file
 +
 +To avoid using a PostCSS configuration file, you can specify a minimal configuration using the options map.
 +
 +use
 +: (`string`) A space-delimited list of PostCSS plugins to use.
 +
 +parser
 +: (`string`) A custom PostCSS parser.
 +
 +stringifier
 +: (`string`) A custom PostCSS stringifier.
 +
 +syntax
 +: (`string`) Custom postcss syntax.
 +
- {{< code file="postcss.config.js" >}}
++{{< code file=layouts/partials/css.html >}}
 +{{ $opts := dict "use" "autoprefixer postcss-color-alpha" }}
 +{{ with resources.Get "css/main.css" | postCSS $opts }}
 +  <link rel="stylesheet" href="{{ .RelPermalink }}">
 +{{ end }}
 +{{< /code >}}
 +
 +## Check Hugo environment
 +
 +The current Hugo environment name (set by `--environment` or in configuration or OS environment) is available in the Node context, which allows constructs like this:
 +
++{{< code file=postcss.config.js >}}
 +module.exports = {
 +  plugins: [
 +    require('autoprefixer'),
 +    ...process.env.HUGO_ENVIRONMENT === 'production'
 +      ? [purgecss]
 +      : []
 +  ]
 +}
 +{{< /code >}}
index 4b3cb8ad41aaf8ff3f6147857f204cdc8ede4dee,0000000000000000000000000000000000000000..e84c6d72d388169ebfbf5e4b790e949f449c0638
mode 100755,000000..100755
--- /dev/null
@@@ -1,102 -1,0 +1,104 @@@
- signatures: ["resources.PostProcess RESOURCE"]
 +---
 +title: PostProcess
 +description: Allows delaying of resource transformations to after the build.
 +categories: [asset management]
 +keywords: []
 +menu:
 +  docs:
 +    parent: hugo-pipes
 +    weight: 50
 +weight: 50
- {{< code-toggle file="hugo" >}}
++action:
++  aliases: []
++  returnType: postpub.PostPublishedResource
++  signatures: [resources.PostProcess RESOURCE]
 +---
 +
 +## Usage
 +
 +Marking a resource with `resources.PostProcess` delays any transformations to after the build, typically because one or more of the steps in the transformation chain depends on the result of the build (e.g. files in `public`).
 +
 +A prime use case for this is [CSS purging with PostCSS](#css-purging-with-postcss).
 +
 +There are currently two limitations to this:
 +
 +1. This only works in `*.html` templates (i.e. templates that produces HTML files).
 +2. You cannot manipulate the values returned from the resource's methods. E.g. the `upper` in this example will not work as expected:
 +
 +    ```go-html-template
 +    {{ $css := resources.Get "css/main.css" }}
 +    {{ $css = $css | resources.PostCSS | minify | fingerprint | resources.PostProcess }}
 +    {{ $css.RelPermalink | upper }}
 +    ```
 +
 +## CSS purging with PostCSS
 +
 +{{% note %}}
 +There are several ways to set up CSS purging with PostCSS in Hugo. If you have a simple project, you should consider going the simpler route and drop the use of `resources.PostProcess` and just extract keywords from the templates. See the [Tailwind documentation](https://tailwindcss.com/docs/controlling-file-size/#app) for some examples.
 +{{% /note %}}
 +
 +The below configuration will write a `hugo_stats.json` file to the project root as part of the build. If you're only using this for the production build, you should consider placing it below [config/production](/getting-started/configuration/#configuration-directory).
 +
++{{< code-toggle file=hugo >}}
 +[build.buildStats]
 +  enable = true
 +{{< /code-toggle >}}
 +
 +See the [configure build] documentation for details and options.
 +
 +[configure build]: /getting-started/configuration/#configure-build
 +
 +`postcss.config.js`
 +
 +```js
 +const purgecss = require('@fullhuman/postcss-purgecss')({
 +    content: [ './hugo_stats.json' ],
 +    defaultExtractor: (content) => {
 +        let els = JSON.parse(content).htmlElements;
 +        return els.tags.concat(els.classes, els.ids);
 +    }
 +});
 +
 +module.exports = {
 +     plugins: [
 +         ...(process.env.HUGO_ENVIRONMENT === 'production' ? [ purgecss ] : [])
 +     ]
 + };
 +```
 +
 +Note that in the example above, the "CSS purge step" will only be applied to the production build. This means that you need to do something like this in your head template to build and include your CSS:
 +
 +```go-html-template
 +{{ $css := resources.Get "css/main.css" }}
 +{{ $css = $css | resources.PostCSS }}
 +{{ if hugo.IsProduction }}
 +{{ $css = $css | minify | fingerprint | resources.PostProcess }}
 +{{ end }}
 +<link href="{{ $css.RelPermalink }}" rel="stylesheet" />
 +```
 +
- : {{< new-in "0.109.0" >}} The absolute path to the publish directory (the `public` directory). Note that the value will always point to a directory on disk even when running `hugo server` in memory mode. If you write to this folder from PostCSS when running the server, you could run the server with one of these flags:
 +## Hugo environment variables available in PostCSS
 +
 +These are the environment variables Hugo passes down to PostCSS (and Babel), which allows you do do `process.env.HUGO_ENVIRONMENT === 'production' ? [autoprefixer] : []` and similar:
 +
 +PWD
 +: The absolute path to the project working directory.
 +
 +HUGO_ENVIRONMENT
 +: The value e.g. set with `hugo -e production` (defaults to `production` for `hugo` and `development` for `hugo server`).
 +
 +HUGO_PUBLISHDIR
- ```text
++: {{< new-in 0.109.0 >}} The absolute path to the publish directory (the `public` directory). Note that the value will always point to a directory on disk even when running `hugo server` in memory mode. If you write to this folder from PostCSS when running the server, you could run the server with one of these flags:
 +
++```sh
 +hugo server --renderToDisk
 +hugo server --renderStaticToDisk
 +```
 +
 +Also, Hugo will add environment variables for all files mounted below `assets/_jsconfig`. A default mount will be set up with files in the project root matching this regexp: `(babel|postcss|tailwind)\.config\.js`.
 +
 +These will get environment variables named on the form `HUGO_FILE_:filename:` where `:filename:` is all upper case with periods replaced with underscore. This allows you to do this and similar:
 +
 +```js
 +let tailwindConfig = process.env.HUGO_FILE_TAILWIND_CONFIG_JS || './tailwind.config.js';
 +```
index fa472715cd116373d2d1c3ae82acdcad8fcbce8f,0000000000000000000000000000000000000000..53bcfff74437754183d6fe5f15454bc22b2c274b
mode 100755,000000..100755
--- /dev/null
@@@ -1,31 -1,0 +1,34 @@@
- signatures: ["resources.FromString TARGET_PATH CONTENT"]
 +---
 +title: FromString
 +linkTitle: Resource from string
 +description: Creates a resource from a string.
 +categories: [asset management]
 +keywords: []
 +menu:
 +  docs:
 +    parent: hugo-pipes
 +    weight: 110
 +weight: 110
++action:
++  aliases: []
++  returnType: resource.Resource
++  signatures: [resources.FromString TARGETPATH STRING]
 +---
 +
 +## Usage
 +
 +It is possible to create a resource directly from the template using `resources.FromString` which takes two arguments, the target path for the created resource and the given content string.
 +
 +The result is cached using the target path as the cache key.
 +
 +The following example creates a resource file containing localized variables for every project's languages.
 +
 +```go-html-template
 +{{ $string := (printf "var rootURL = '%s'; var apiURL = '%s';" (absURL "/") (.Param "API_URL")) }}
 +{{ $targetPath := "js/vars.js" }}
 +{{ $vars := $string | resources.FromString $targetPath }}
 +{{ $global := resources.Get "js/global.js" | resources.Minify }}
 +
 +<script src="{{ $vars.Permalink }}"></script>
 +<script src="{{ $global.Permalink }}"></script>
 +```
index c1c4cb316d7a11ad7b384ac3951af69116762a7e,0000000000000000000000000000000000000000..1627fa7d4ba719b2abfeba0fd1c86096a392fd6b
mode 100755,000000..100755
--- /dev/null
@@@ -1,35 -1,0 +1,38 @@@
- signatures: ["resources.ExecuteAsTemplate TARGET_PATH CONTEXT RESOURCE"]
 +---
 +title: ExecuteAsTemplate
 +linkTitle: Resource from template
 +description: Creates a resource from a template
 +categories: [asset management]
 +keywords: []
 +menu:
 +  docs:
 +    parent: hugo-pipes
 +    weight: 120
 +weight: 120
++action:
++  aliases: []
++  returnType: resource.Resource
++  signatures: [resources.ExecuteAsTemplate TARGETPATH CONTEXT RESOURCE]
 +---
 +
 +## Usage
 +
 +In order to use Hugo Pipes function on an asset file containing Go Template magic the function `resources.ExecuteAsTemplate` must be used.
 +
 +The function takes three arguments: the target path for the created resource, the template context, and the resource object. The target path is used to cache the result.
 +
 +```go-html-template
 +// assets/sass/template.scss
 +$backgroundColor: {{ .Param "backgroundColor" }};
 +$textColor: {{ .Param "textColor" }};
 +body{
 +  background-color:$backgroundColor;
 +  color: $textColor;
 +}
 +// [...]
 +```
 +
 +```go-html-template
 +{{ $sassTemplate := resources.Get "sass/template.scss" }}
 +{{ $style := $sassTemplate | resources.ExecuteAsTemplate "main.scss" . | resources.ToCSS }}
 +```
index b09cc165bcb44081555378c814dba636b8f186ab,0000000000000000000000000000000000000000..7ddbe573d1a850a7c8a816c3060f21d722ea15e3
mode 100644,000000..100644
--- /dev/null
@@@ -1,210 -1,0 +1,213 @@@
- signatures: ["resources.ToCSS RESOURCE [OPTIONS]", "toCSS RESOURCE [OPTIONS]"]
 +---
 +title: ToCSS
 +linkTitle: Transpile Sass to CSS
 +description: Transpile Sass to CSS.
 +categories: [asset management]
 +keywords: []
 +menu:
 +  docs:
 +    parent: hugo-pipes
++    returnType: resource.Resource
 +    weight: 30
 +weight: 30
- {{ $options := dict "transpiler" "libsass" "targetPath" "css/style.css" }}
- {{ with resources.Get "sass/main.scss" | toCSS $options | minify | fingerprint }}
++action:
++  aliases: [toCSS]
++  returnType: resource.Resource
++  signatures: ['resources.ToCSS [OPTIONS] RESOURCE']
 +toc: true
 +aliases: [/hugo-pipes/transform-to-css/]
 +---
 +
 +## Usage
 +
 +Transpile Sass to CSS using the LibSass transpiler included in Hugo's extended edition, or [install Dart Sass](#dart-sass) to use the latest features of the Sass language.
 +
 +```go-html-template
++{{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }}
++{{ with resources.Get "sass/main.scss" | toCSS $opts | minify | fingerprint }}
 +  <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
 +{{ end }}
 +```
 +
 +Sass has two forms of syntax: [SCSS] and [indented]. Hugo supports both.
 +
 +[scss]: https://sass-lang.com/documentation/syntax#scss
 +[indented]: https://sass-lang.com/documentation/syntax#the-indented-syntax
 +
- vars {{< new-in "0.109.0" >}}
 +## Options
 +
 +transpiler
 +: (`string`) The transpiler to use, either `libsass` (default) or `dartsass`. Hugo's extended edition includes 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`.
 +
- sourceMapIncludeSources {{< new-in "0.108.0" >}}
++vars {{< new-in 0.109.0 >}}
 +: (`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;
 +```
 +
 +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`.
 +
 +precision
 +: (`int`) Precision of floating point math. Not applicable to Dart Sass.
 +
 +enableSourceMap
 +: (`bool`) If `true`, generates a source map.
 +
- {{ $options := dict
++sourceMapIncludeSources {{< new-in 0.108.0 >}}
 +: (`bool`) If `true`, embeds sources in the generated source map. Not applicable to LibSass.
 +
 +includePaths
 +: (`slice`) A slice of paths, relative to the project root, that the transpiler will use when resolving `@use` and `@import` statements.
 +
 +```go-html-template
- {{ with resources.Get "sass/main.scss" | toCSS $options | minify | fingerprint }}
++{{ $opts := dict
 +  "transpiler" "dartsass"
 +  "targetPath" "css/style.css"
 +  "vars" site.Params.styles
 +  "enableSourceMap" (not hugo.IsProduction) 
 +  "includePaths" (slice "node_modules/bootstrap/scss")
 +}}
- {{ $options := dict "transpiler" "dartsass" "targetPath" "css/style.css" }}
- {{ with resources.Get "sass/main.scss" | toCSS $options | minify | fingerprint }}
++{{ with resources.Get "sass/main.scss" | toCSS $opts | minify | fingerprint }}
 +  <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
 +{{ end }}
 +```
 +
 +## Dart Sass
 +
 +The extended version of Hugo includes [LibSass] to transpile Sass to CSS. In 2020, the Sass team deprecated LibSass in favor of [Dart Sass].
 +
 +Use the latest features of the Sass language by installing Dart Sass in your development and production environments.
 +
 +### Installation overview
 +
 +Dart Sass is compatible with Hugo v0.114.0 and later.
 +
 +If you have been using Embedded Dart Sass[^1] with Hugo v0.113.0 and earlier, uninstall Embedded Dart Sass, then install Dart Sass. If you have installed both, Hugo will use Dart Sass.
 +
 +If you install Hugo as a [Snap package] there is no need to install Dart Sass. The Hugo Snap package includes Dart Sass.
 +
 +[^1]: In 2023, the Sass team deprecated Embedded Dart Sass in favor of Dart Sass.
 +
 +### Installing in a development environment
 +
 +When you install Dart Sass somewhere in your PATH, Hugo will find it.
 +
 +OS|Package manager|Site|Installation
 +:--|:--|:--|:--
 +Linux|Homebrew|[brew.sh]|`brew install sass/sass/sass`
 +Linux|Snap|[snapcraft.io]|`sudo snap install dart-sass`
 +macOS|Homebrew|[brew.sh]|`brew install sass/sass/sass`
 +Windows|Chocolatey|[chocolatey.org]|`choco install sass`
 +Windows|Scoop|[scoop.sh]|`scoop install sass`
 +
 +You may also install [prebuilt binaries] for Linux, macOS, and Windows.
 +
 +Run `hugo env` to list the active transpilers.
 +
 +### Installing in a production environment
 +
 +For [CI/CD] 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.
 +
 +[^2]: You do not have to do this if (a) you have not modified the assets cache location, and (b) you have not set `useResourceCacheWhen` to `never` in your [site configuration], and (c) you add and commit your resources directory to your repository.
 +
 +#### GitHub Pages
 +
 +To install Dart Sass for your builds on GitHub Pages, add this step to the GitHub Pages workflow file:
 +
 +```yaml
 +- name: Install Dart Sass
 +  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:
 +
 +```yaml
 +variables:
 +  HUGO_VERSION: 0.115.1
 +  DART_SASS_VERSION: 1.63.6
 +  GIT_DEPTH: 0
 +  GIT_STRATEGY: clone
 +  GIT_SUBMODULE_STRATEGY: recursive
 +  TZ: America/Los_Angeles
 +image:
 +  name: golang:1.20-buster
 +pages:
 +  script:
 +    # Install Dart Sass
 +    - curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
 +    - tar -xf dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
 +    - cp -r dart-sass/* /usr/local/bin
 +    - rm -rf dart-sass*
 +    # Install Hugo
 +    - curl -LJO https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
 +    - apt install -y ./hugo_extended_${HUGO_VERSION}_linux-amd64.deb
 +    - rm hugo_extended_${HUGO_VERSION}_linux-amd64.deb
 +    # Build
 +    - hugo --gc --minify
 +  artifacts:
 +    paths:
 +      - public
 +  rules:
 +    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
 +```
 +
 +#### Netlify
 +
 +To install Dart Sass for your builds on Netlify, the `netlify.toml` file should look something like this:
 +
 +```toml
 +[build.environment]
 +HUGO_VERSION = "0.115.1"
 +DART_SASS_VERSION = "1.63.6"
 +TZ = "America/Los_Angeles"
 +
 +[build]
 +publish = "public"
 +command = """\
 +  curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz && \
 +  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 && \
 +  hugo --gc --minify \
 +  """
 +```
 +
 +### Example
 +
 +To transpile with Dart Sass, set `transpiler` to `dartsass` in the options map passed to `resources.ToCSS`. For example:
 +
 +```go-html-template
++{{ $opts := dict "transpiler" "dartsass" "targetPath" "css/style.css" }}
++{{ with resources.Get "sass/main.scss" | toCSS $opts | minify | fingerprint }}
 +  <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
 +{{ 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
 +[ci/cd]: https://en.wikipedia.org/wiki/CI/CD
 +[dart sass]: https://sass-lang.com/dart-sass
 +[libsass]: https://sass-lang.com/libsass
 +[prebuilt binaries]: https://github.com/sass/dart-sass/releases/latest
 +[scoop.sh]: https://scoop.sh/#/apps?q=sass
 +[site configuration]: /getting-started/configuration/#configure-build
 +[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
index cbc3386655ba7671011b5dd4c9a342f645ca126c,0000000000000000000000000000000000000000..deec8cc833a53e0c4b1bea7965d1a1e45e434e10
mode 100644,000000..100644
--- /dev/null
@@@ -1,12 -1,0 +1,16 @@@
++---
++# Do not remove front matter.
++---
++
 +## Editions
 +
 +Hugo is available in two editions: standard and extended. With the extended edition you can:
 +
 +- Encode to the WebP format when [processing images]. You can decode WebP images with either edition.
 +- [Transpile Sass to CSS] using the embedded LibSass transpiler. The extended edition is not required to use the [Dart Sass] transpiler.
 +
 +We recommend that you install the extended edition.
 +
 +[dart sass]: /hugo-pipes/transpile-sass-to-css/#dart-sass
 +[processing images]: /content-management/image-processing/
 +[transpile sass to css]: /hugo-pipes/transpile-sass-to-css/
index 423950113837d6427559262b11c7b5ec84e28933,0000000000000000000000000000000000000000..ea6eaa8fe45be8e877b9bf9bb54b321962c7c47b
mode 100644,000000..100644
--- /dev/null
@@@ -1,36 -1,0 +1,40 @@@
++---
++# Do not remove front matter.
++---
++
 +## Prerequisites
 +
 +Although not required in all cases, [Git], [Go], and [Dart Sass] are commonly used when working with Hugo.
 +
 +Git is required to:
 +
 +- Build Hugo from source
 +- Use the [Hugo Modules] feature
 +- Install a theme as a Git submodule
 +- Access [commit information] from a local Git repository
 +- Host your site with services such as [CloudCannon], [Cloudflare Pages], [GitHub Pages], [GitLab Pages], and [Netlify]
 +
 +Go is required to:
 +
 +- Build Hugo from source
 +- Use the Hugo Modules feature
 +
 +Dart Sass is required to transpile Sass to CSS when using the latest features of the Sass language.
 +
 +Please refer to the relevant documentation for installation instructions:
 +
 +- [Git][git install]
 +- [Go][go install]
 +- [Dart Sass][dart sass install]
 +
 +[cloudcannon]: https://cloudcannon.com/
 +[cloudflare pages]: https://pages.cloudflare.com/
 +[dart sass install]: /hugo-pipes/transpile-sass-to-css/#dart-sass
 +[dart sass]: https://sass-lang.com/dart-sass
 +[git install]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
 +[git]: https://git-scm.com/
 +[github pages]: https://pages.github.com/
 +[gitlab pages]: https://docs.gitlab.com/ee/user/project/pages/
 +[go install]: https://go.dev/doc/install
 +[go]: https://go.dev/
 +[netlify]: https://www.netlify.com/
index 884869e1e5a56ea168a8939e6f905766d2d0e523,0000000000000000000000000000000000000000..d3465fa5d07383a4754a982a793c038ae0f65afb
mode 100644,000000..100644
--- /dev/null
@@@ -1,21 -1,0 +1,23 @@@
- <!-- markdownlint-disable-next-line MD051 -->
- 1. Download the archive for the desired [edition], operating system, and architecture
++---
++# Do not remove front matter.
++---
++
 +## Prebuilt binaries
 +
 +Prebuilt binaries are available for a variety of operating systems and architectures. Visit the [latest release] page, and scroll down to the Assets section.
 +
- [edition]: #editions
++1. Download the archive for the desired edition, operating system, and architecture
 +1. Extract the archive
 +1. Move the executable to the desired directory
 +1. Add this directory to the PATH environment variable
 +1. Verify that you have _execute_ permission on the file
 +
 +Please consult your operating system documentation if you need help setting file permissions or modifying your PATH environment variable.
 +
 +If you do not see a prebuilt binary for the desired edition, operating system, and architecture, install Hugo using one of the methods described below.
 +
 +[commit information]: /variables/git
 +[Git]: https://git-scm.com/
 +[Go]: https://go.dev/
 +[Hugo Modules]: /hugo-modules/
 +[latest release]: https://github.com/gohugoio/hugo/releases/latest
index 7537882fda0fa2f5860b1636c0068bf5d29074f7,0000000000000000000000000000000000000000..f670a575263d5873bc69976da1dcb6cc7c17ca1b
mode 100644,000000..100644
--- /dev/null
@@@ -1,23 -1,0 +1,27 @@@
++---
++# Do not remove front matter.
++---
++
 +## Build from source
 +
 +To build the extended edition of Hugo from source you must:
 +
 +1. Install [Git]
 +1. Install [Go] version 1.19 or later
 +1. Install a C compiler, either [GCC] or [Clang]
 +1. Update your `PATH` environment variable as described in the [Go documentation]
 +
 +> The install directory is controlled by the `GOPATH` and `GOBIN` environment variables. If `GOBIN` is set, binaries are installed to that directory. If `GOPATH` is set, binaries are installed to the bin subdirectory of the first directory in the `GOPATH` list. Otherwise, binaries are installed to the bin subdirectory of the default `GOPATH` (`$HOME/go` or `%USERPROFILE%\go`).
 +
 +Then build and test:
 +
 +```sh
 +CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest
 +hugo version
 +```
 +
 +[Clang]: https://clang.llvm.org/
 +[GCC]: https://gcc.gnu.org/
 +[Git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
 +[Go documentation]: https://go.dev/doc/code#Command
 +[Go]: https://go.dev/doc/install
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 7178a9f4fc1d1799bcf9cad5a223182e4d9e0f1f,0000000000000000000000000000000000000000..8d6ff90fc7b6278db0830b7e97d0740f3fb70274
mode 100644,000000..100644
--- /dev/null
@@@ -1,9 -1,0 +1,13 @@@
- [Homebrew] is a free and open source package manager for macOS and Linux. This will install the extended edition of Hugo:
++---
++# Do not remove front matter.
++---
++
 +### Homebrew
 +
++[Homebrew] is a free and open-source package manager for macOS and Linux. This will install the extended edition of Hugo:
 +
 +```sh
 +brew install hugo
 +```
 +
 +[Homebrew]: https://brew.sh/
index e2d2c96a357ec1a0ca9d98458a3f0dde87ea1590,0000000000000000000000000000000000000000..ca405b755eac6555d184004582d54341de817ee9
mode 100644,000000..100644
--- /dev/null
@@@ -1,16 -1,0 +1,16 @@@
- categories: [installation]
- keywords: [installation]
 +---
 +title: Installation
 +linkTitle: Overview
 +description: Install Hugo on macOS, Linux, Windows, BSD, and on any machine that can run the Go compiler tool chain.
 +aliases: [/getting-started/installing/]
- {{% param "description" %}}
++categories: []
++keywords: []
 +menu:
 +  docs:
 +    identifier: installation-overview
 +    parent: installation
 +    weight: 10
 +weight: 10
 +---
 +
++Install Hugo on macOS, Linux, Windows, BSD, and on any machine that can run the Go compiler tool chain.
index 999e52ad6ddd1ac9d088696b772b00f25478c7d3,0000000000000000000000000000000000000000..a3b179d25561a7c355cf5b2583c850d1fbd4ae90
mode 100644,000000..100644
--- /dev/null
@@@ -1,74 -1,0 +1,75 @@@
- toc: true
 +---
 +title: BSD
 +description: Install Hugo on BSD derivatives.
 +categories: [installation]
++keywords: []
 +menu:
 +  docs:
 +    parent: installation
 +    weight: 50
- {{% readfile file="/installation/_common/01-editions.md" %}}
 +weight: 50
++toc: true
 +---
- {{% readfile file="/installation/_common/02-prerequisites.md" %}}
++{{% include "installation/_common/01-editions.md" %}}
 +
- {{% readfile file="/installation/_common/03-prebuilt-binaries.md" %}}
++{{% include "installation/_common/02-prerequisites.md" %}}
 +
- {{% readfile file="/installation/_common/04-build-from-source.md" %}}
++{{% include "installation/_common/03-prebuilt-binaries.md" %}}
 +
 +## Repository packages
 +
 +Most BSD derivatives maintain a repository for commonly installed applications. Please note that these repositories may not contain the [latest release].
 +
 +[latest release]: https://github.com/gohugoio/hugo/releases/latest
 +
 +### DragonFly BSD
 +
 +[DragonFly BSD] includes Hugo in its package repository. This will install the extended edition of Hugo:
 +
 +```sh
 +sudo pkg install gohugo
 +```
 +
 +[DragonFly BSD]: https://www.dragonflybsd.org/
 +
 +### FreeBSD
 +
 +[FreeBSD] includes Hugo in its package repository. This will install the extended edition of Hugo:
 +
 +```sh
 +sudo pkg install gohugo
 +```
 +
 +[FreeBSD]: https://www.freebsd.org/
 +
 +### NetBSD
 +
 +[NetBSD] includes Hugo in its package repository. This will install the extended edition of Hugo:
 +
 +```sh
 +sudo pkgin install go-hugo
 +```
 +
 +[NetBSD]: https://www.netbsd.org/
 +
 +### OpenBSD
 +
 +[OpenBSD] includes Hugo in its package repository. This will prompt you to select which edition of Hugo to install:
 +
 +```sh
 +doas pkg_add hugo
 +```
 +
 +[OpenBSD]: https://www.openbsd.org/
 +
++{{% include "installation/_common/04-build-from-source.md" %}}
 +
 +## Comparison
 +
 +||Prebuilt binaries|Repository packages|Build from source
 +:--|:--:|:--:|:--:
 +Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
 +Easy to upgrade?|:heavy_check_mark:|varies|:heavy_check_mark:
 +Easy to downgrade?|:heavy_check_mark:|varies|:heavy_check_mark:
 +Automatic updates?|:x:|varies|:x:
 +Latest version available?|:heavy_check_mark:|varies|:heavy_check_mark:
index 2dbbd3720079329c360cb4647c35086e517c5af6,0000000000000000000000000000000000000000..bb8f4b555c65247a07938756d1e509de230f00a4
mode 100644,000000..100644
--- /dev/null
@@@ -1,140 -1,0 +1,143 @@@
- toc: true
 +---
 +title: Linux
 +description: Install Hugo on Linux.
 +categories: [installation]
++keywords: []
 +menu:
 +  docs:
 +    parent: installation
 +    weight: 30
- {{% readfile file="/installation/_common/01-editions.md" %}}
 +weight: 30
++toc: true
 +---
- {{% readfile file="/installation/_common/02-prerequisites.md" %}}
++{{% include "installation/_common/01-editions.md" %}}
 +
- {{% readfile file="/installation/_common/03-prebuilt-binaries.md" %}}
++{{% include "installation/_common/02-prerequisites.md" %}}
 +
- [Snap] is a free and open source package manager for Linux. Available for [most distributions], snap packages are simple to install and are automatically updated.
++{{% include "installation/_common/03-prebuilt-binaries.md" %}}
 +
 +## Package managers
 +
 +### Snap
 +
- {{% readfile file="/installation/_common/homebrew.md" %}}
++[Snap] is a free and open-source package manager for Linux. Available for [most distributions], snap packages are simple to install and are automatically updated.
 +
 +The Hugo snap package is [strictly confined]. Strictly confined snaps run in complete isolation, up to a minimal access level that’s deemed always safe. The sites you create and build must be located within your home directory, or on removable media.
 +
 +This will install the extended edition of Hugo:
 +
 +```sh
 +sudo snap install hugo
 +```
 +
 +To enable or revoke access to removable media:
 +
 +```sh
 +sudo snap connect hugo:removable-media
 +sudo snap disconnect hugo:removable-media
 +```
 +
 +To enable or revoke access to SSH keys:
 +
 +```sh
 +sudo snap connect hugo:ssh-keys
 +sudo snap disconnect hugo:ssh-keys
 +```
 +
 +[most distributions]: https://snapcraft.io/docs/installing-snapd
 +[strictly confined]: https://snapcraft.io/docs/snap-confinement
 +[Snap]: https://snapcraft.io/
 +
- Most Linux distributions maintain a repository for commonly installed applications. Please note that these repositories may not contain the [latest release].
++{{% include "installation/_common/homebrew.md" %}}
 +
 +## Repository packages
 +
++Most Linux distributions maintain a repository for commonly installed applications.
++
++{{% note %}}
++Due to Long Term Release (LTR) guidelines, most Linux package repositories will not contain the [latest release].
 +
 +[latest release]: https://github.com/gohugoio/hugo/releases/latest
++{{% /note %}}
 +
 +### Arch Linux
 +
 +Derivatives of the [Arch Linux] distribution of Linux include [EndeavourOS], [Garuda Linux], [Manjaro], and others. This will install the extended edition of Hugo:
 +
 +```sh
 +sudo pacman -S hugo
 +```
 +
 +[Arch Linux]: https://archlinux.org/
 +[EndeavourOS]: https://endeavouros.com/
 +[Manjaro]: https://manjaro.org/
 +[Garuda Linux]: https://garudalinux.org/
 +
 +### Debian
 +
 +Derivatives of the [Debian] distribution of Linux include [elementary OS], [KDE neon], [Linux Lite], [Linux Mint], [MX Linux], [Pop!_OS], [Ubuntu], [Zorin OS], and others. This will install the extended edition of Hugo:
 +
 +```sh
 +sudo apt install hugo
 +```
 +
 +You can also download Debian packages from the [latest release] page.
 +
 +[Debian]: https://www.debian.org/
 +[elementary OS]: https://elementary.io/
 +[KDE neon]: https://neon.kde.org/
 +[Linux Lite]: https://www.linuxliteos.com/
 +[Linux Mint]: https://linuxmint.com/
 +[MX Linux]: https://mxlinux.org/
 +[Pop!_OS]: https://pop.system76.com/
 +[Ubuntu]: https://ubuntu.com/
 +[Zorin OS]: https://zorin.com/os/
 +
 +### Fedora
 +
 +Derivatives of the [Fedora] distribution of Linux include [CentOS], [Red Hat Enterprise Linux], and others. This will install the extended edition of Hugo:
 +
 +```sh
 +sudo dnf install hugo
 +```
 +
 +[CentOS]: https://www.centos.org/
 +[Fedora]: https://getfedora.org/
 +[Red Hat Enterprise Linux]: https://www.redhat.com/
 +
 +### openSUSE
 +
 +Derivatives of the [openSUSE] distribution of Linux include [GeckoLinux], [Linux Karmada], and others. This will install the extended edition of Hugo:
 +
- {{% readfile file="/installation/_common/04-build-from-source.md" %}}
 +```sh
 +sudo zypper install hugo
 +```
 +
 +[GeckoLinux]: https://geckolinux.github.io/
 +[Linux Karmada]: https://linuxkamarada.com/
 +[openSUSE]: https://www.opensuse.org/
 +
 +### Solus
 +
 +The [Solus] distribution of Linux includes Hugo in its package repository. This will install the _standard_ edition of Hugo:
 +
 +```sh
 +sudo eopkg install hugo
 +```
 +
 +[Solus]: https://getsol.us/
 +
++{{% include "installation/_common/04-build-from-source.md" %}}
 +
 +## Comparison
 +
 +||Prebuilt binaries|Package managers|Repository packages|Build from source
 +:--|:--:|:--:|:--:|:--:
 +Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
 +Easy to upgrade?|:heavy_check_mark:|:heavy_check_mark:|varies|:heavy_check_mark:
 +Easy to downgrade?|:heavy_check_mark:|:heavy_check_mark: [^1]|varies|:heavy_check_mark:
 +Automatic updates?|:x:|varies [^2]|:x:|:x:
 +Latest version available?|:heavy_check_mark:|:heavy_check_mark:|varies|:heavy_check_mark:
 +
 +[^1]: Easy if a previous version is still installed.
 +[^2]: Snap packages are automatically updated. Homebrew requires advanced configuration.
index ccae90b36baef70d5ea64a290cb839373b4ecc79,0000000000000000000000000000000000000000..eba977481ca2803e7cdc39e0b718c54ce2530c8c
mode 100644,000000..100644
--- /dev/null
@@@ -1,45 -1,0 +1,46 @@@
- toc: true
 +---
 +title: macOS
 +description: Install Hugo on macOS.
 +categories: [installation]
++keywords: []
 +menu:
 +  docs:
 +    parent: installation
 +    weight: 20
- {{% readfile file="/installation/_common/01-editions.md" %}}
 +weight: 20
++toc: true
 +---
- {{% readfile file="/installation/_common/02-prerequisites.md" %}}
++{{% include "installation/_common/01-editions.md" %}}
 +
- {{% readfile file="/installation/_common/03-prebuilt-binaries.md" %}}
++{{% include "installation/_common/02-prerequisites.md" %}}
 +
- {{% readfile file="/installation/_common/homebrew.md" %}}
++{{% include "installation/_common/03-prebuilt-binaries.md" %}}
 +
 +## Package managers
 +
- [MacPorts] is a free and open source package manager for macOS. This will install the extended edition of Hugo:
++{{% include "installation/_common/homebrew.md" %}}
 +
 +### MacPorts
 +
- {{% readfile file="/installation/_common/04-build-from-source.md" %}}
++[MacPorts] is a free and open-source package manager for macOS. This will install the extended edition of Hugo:
 +
 +```sh
 +sudo port install hugo
 +```
 +
 +[MacPorts]: https://www.macports.org/
 +
++{{% include "installation/_common/04-build-from-source.md" %}}
 +
 +## Comparison
 +
 +||Prebuilt binaries|Package managers|Build from source
 +:--|:--:|:--:|:--:
 +Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
 +Easy to upgrade?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
 +Easy to downgrade?|:heavy_check_mark:|:heavy_check_mark: [^1]|:heavy_check_mark:
 +Automatic updates?|:x:|:x: [^2]|:x:
 +Latest version available?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
 +
 +[^1]: Easy if a previous version is still installed.
 +[^2]: Possible but requires advanced configuration.
index 48c5f7006c29820c9b76987adb8ad11a8d0a9d79,0000000000000000000000000000000000000000..97e767af814a7c2de2d7c0ef2cacd007cf477057
mode 100644,000000..100644
--- /dev/null
@@@ -1,67 -1,0 +1,68 @@@
- toc: true
 +---
 +title: Windows
 +description: Install Hugo on Windows.
 +categories: [installation]
++keywords: []
 +menu:
 +  docs:
 +    parent: installation
 +    weight: 40
- {{% readfile file="/installation/_common/01-editions.md" %}}
 +weight: 40
++toc: true
 +---
- {{% readfile file="/installation/_common/02-prerequisites.md" %}}
++{{% include "installation/_common/01-editions.md" %}}
 +
- {{% readfile file="/installation/_common/03-prebuilt-binaries.md" %}}
++{{% include "installation/_common/02-prerequisites.md" %}}
 +
- [Chocolatey] is a free and open source package manager for Windows. This will install the extended edition of Hugo:
++{{% include "installation/_common/03-prebuilt-binaries.md" %}}
 +
 +## Package managers
 +
 +### Chocolatey
 +
- [Scoop] is a free and open source package manager for Windows. This will install the extended edition of Hugo:
++[Chocolatey] is a free and open-source package manager for Windows. This will install the extended edition of Hugo:
 +
 +```sh
 +choco install hugo-extended
 +```
 +
 +[Chocolatey]: https://chocolatey.org/
 +
 +### Scoop
 +
- [Winget] is Microsoft's official free and open source package manager for Windows. This will install the extended edition of Hugo:
++[Scoop] is a free and open-source package manager for Windows. This will install the extended edition of Hugo:
 +
 +```sh
 +scoop install hugo-extended
 +```
 +
 +[Scoop]: https://scoop.sh/
 +
 +### Winget
 +
- {{% readfile file="/installation/_common/04-build-from-source.md" %}}
++[Winget] is Microsoft's official free and open-source package manager for Windows. This will install the extended edition of Hugo:
 +
 +```sh
 +winget install Hugo.Hugo.Extended
 +```
 +
 +[Winget]: https://learn.microsoft.com/en-us/windows/package-manager/
 +
++{{% include "installation/_common/04-build-from-source.md" %}}
 +
 +{{% note %}}
 +See these [detailed instructions](https://discourse.gohugo.io/t/41370) to install GCC on Windows.
 +{{% /note %}}
 +
 +## Comparison
 +
 +||Prebuilt binaries|Package managers|Build from source
 +:--|:--:|:--:|:--:
 +Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
 +Easy to upgrade?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
 +Easy to downgrade?|:heavy_check_mark:|:heavy_check_mark: [^2]|:heavy_check_mark:
 +Automatic updates?|:x:|:x: [^1]|:x:
 +Latest version available?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
 +
 +[^1]: Possible but requires advanced configuration.
 +[^2]: Easy if a previous version is still installed.
index fd8828bb2c021f6eecf63a28aa60d735399b0a2d,0000000000000000000000000000000000000000..aaee3987d0fdad1f36250064d481b1898a1dc1d7
mode 100644,000000..100644
--- /dev/null
@@@ -1,10 -1,0 +1,10 @@@
- categories: [maintenance]
- keywords: [maintenance]
 +---
 +title: Maintenance
 +description: Some lists useful for the maintenance of the Hugo docs site.
++categories: []
++keywords: []
 +menu:
 +  docs:
 +    weight: 200
 +toc: true
 +---
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4ae3a0f399a97b1223a89ee50ab1cbd3538740bc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,37 @@@
++---
++# Do not remove front matter.
++---
++
++The `Next` and `Prev` methods on a `Pages` object are more flexible than the `Next` and `Prev` methods on a `Page` object.
++
++||Page collection|Custom sort order
++:--|:--|:-:
++[`PAGES.Next`] and [`PAGES.Prev`]|locally defined|✔️
++[`PAGE.Next`] and [`PAGE.Prev`]|globally defined|❌
++
++[`PAGES.Next`]: /methods/pages/next
++[`PAGES.Prev`]: /methods/pages/prev
++[`PAGE.Next`]: /methods/page/next
++[`PAGE.Prev`]: /methods/page/prev
++
++locally defined
++: Build the page collection every time you call `PAGES.Next` and `PAGES.Prev`. Navigation between pages is relative to the current page's position within the local collection, independent of the global collection.
++
++With a local collection, the navigation sort order is the same as the collection sort order.
++
++globally defined
++: Build the page collection once, on a list page. Navigation between pages is relative to the current page's position within the global collection.
++
++With a global collection, the navigation sort order is fixed, using Hugo's default sort order. In order of precedence:
++
++1. Page [weight]
++2. Page [date] (descending)
++3. Page [linkTitle], falling back to page [title]
++4. Page file path if the page is backed by a file
++
++For example, with a global collection sorted by title, the navigation sort order will use Hugo's default sort order. This is probably not what you want or expect. For this reason, the `Next` and `Prev` methods on a `Pages` object are generally a better choice.
++
++[date]: /methods/page/date
++[weight]: /methods/page/weight
++[linkTitle]: /methods/page/linktitle
++[title]: /methods/page/title
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c12bd9d4d4a56363a34427641e3e3e25d3b38074
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: Methods
++linkTitle: Overview
++description: A list of Hugo template methods including examples.
++categories: []
++keywords: []
++menu:
++  docs:
++    identifier: methods-overview
++    parent: methods
++    weight: 10
++weight: 10
++showSectionMenu: true
++---
++
++Use these methods within your templates.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d035f97b669a97d48b3318d298b3a0bb78f5e6fc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: Abs
++description: Returns the absolute value of the given time.Duration value.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/Duration
++    - functions/time/ParseDuration
++  returnType: time.Duration
++  signatures: [DURATION.Abs]
++---
++
++```go-html-template
++{{ $d = time.ParseDuration "-3h" }}
++{{ $d.Abs }} → 3h0m0s
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5b2d893b961ab2cc3fe73cd64e82ae732d874117
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: Hours
++description: Returns the time.Duration value as a floating point number of hours.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/Duration
++    - functions/time/ParseDuration
++  returnType: float64
++  signatures: [DURATION.Hours]
++---
++
++```go-html-template
++{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
++{{ $d.Hours }} → 3.5420833333333333
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c8b210c94beec40595f6151c50f742ca4eb6aa30
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: Microseconds
++description: Returns the time.Duration value as an integer microsecond count.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/Duration
++    - functions/time/ParseDuration
++  returnType: int64
++  signatures: [DURATION.Microseconds]
++---
++
++```go-html-template
++{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
++{{ $d.Microseconds }} → 12751500000
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..32809027aebfd84c77632047d9a7a33d731fd6be
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: Milliseconds
++description: Returns the time.Duration value as an integer millisecond count.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/Duration
++    - functions/time/ParseDuration
++  returnType: int64
++  signatures: [DURATION.Milliseconds]
++---
++
++```go-html-template
++{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
++{{ $d.Milliseconds }} → 12751500
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d3e57fba55633500bfea0090c1a08114434bdc0d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: Minutes
++description: Returns the time.Duration value as a floating point number of minutes.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/Duration
++    - functions/time/ParseDuration
++  returnType: float64
++  signatures: [DURATION.Minutes]
++---
++
++```go-html-template
++{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
++{{ $d.Minutes }} → 212.525
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..66d2981f22fd54e4020800467f33564ee40ef08c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: Nanoseconds
++description: Returns the time.Duration value as an integer nanosecond count.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/Duration
++    - functions/time/ParseDuration
++  returnType: int64
++  signatures: [DURATION.Nanoseconds]
++---
++
++```go-html-template
++{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
++{{ $d.Nanoseconds }} → 12751500000000
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0722a60760a9a9089d161c5a9a1630737eb10ed4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++---
++title: Round
++description: Returns the result of rounding DURATION1 to the nearest multiple of DURATION2.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/Duration
++    - functions/time/ParseDuration
++  returnType:
++  signatures: [DURATION1.Round DURATION2]
++---
++
++```go-html-template
++{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
++
++{{ $d.Round (time.ParseDuration "2h") }} → 4h0m0s
++{{ $d.Round (time.ParseDuration "3m") }} → 3h33m0s
++{{ $d.Round (time.ParseDuration "4s") }} → 3h32m32s
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d23d5ec15e8a710a5c22a89f9c072c0474834f1b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: Seconds
++description: Returns the time.Duration value as a floating point number of seconds.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/Duration
++    - functions/time/ParseDuration
++  returnType: float64
++  signatures: [DURATION.Seconds]
++---
++
++```go-html-template
++{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
++{{ $d.Seconds }} → 12751.5
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..795fcad769552063c23362ae9ce4239dc7443bb2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: Truncate
++description: Returns the result of rounding DURATION1 toward zero to a multiple of DURATION2.
++categories: []
++keywords: []
++action:
++  related:
++  related:
++    - functions/time/Duration
++    - functions/time/ParseDuration
++  returnType: time.Duration
++  signatures: [DURATION1.Truncate DURATION2]
++---
++
++```go-html-template
++{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
++
++{{ $d.Truncate (time.ParseDuration "2h") }} → 2h0m0s
++{{ $d.Truncate (time.ParseDuration "3m") }} → 3h30m0s
++{{ $d.Truncate (time.ParseDuration "4s") }} → 3h32m28s
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9fc4f814ccd887dd7df0f7cfb6ca7c53fd932156
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Duration methods
++linkTitle: Duration
++description: Use these methods with time.Duration values.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: methods
++---
++
++Use these methods with time.Duration values.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..af2af6dce5147b448b6b6d1355d6c3c6caeb4a1f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,67 @@@
++---
++title: Children
++description: Returns a collection of child menu entries, if any, under the given menu entry.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/menu-entry/HasChildren
++  returnType: navigation.Menu
++  signatures: [MENUENTRY.Children]
++---
++
++Use the `Children` method when rendering a nested menu.
++
++With this site configuration:
++
++{{< code-toggle file=hugo >}}
++[[menu.main]]
++name = 'Products'
++pageRef = '/product'
++weight = 10
++
++[[menu.main]]
++name = 'Product 1'
++pageRef = '/products/product-1'
++parent = 'Products'
++weight = 1
++
++[[menu.main]]
++name = 'Product 2'
++pageRef = '/products/product-2'
++parent = 'Products'
++weight = 2
++{{< /code-toggle >}}
++
++And this template:
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main }}
++    <li>
++      <a href="{{ .URL }}">{{ .Name }}</a>
++      {{ if .HasChildren }}
++        <ul>
++          {{ range .Children }}
++            <li><a href="{{ .URL }}">{{ .Name }}</a></li>
++          {{ end }}
++        </ul>
++      {{ end }}
++    </li>
++  {{ end }}
++</ul>
++```
++
++Hugo renders this HTML:
++
++```html
++<ul>
++  <li>
++    <a href="/products/">Products</a>
++    <ul>
++      <li><a href="/products/product-1/">Product 1</a></li>
++      <li><a href="/products/product-2/">Product 2</a></li>
++    </ul>
++  </li>
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d906987e8ad03868021692a77c790d31d04e9f19
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,67 @@@
++---
++title: HasChildren
++description: Reports whether the given menu entry has child menu entries.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/menu-entry/Children
++  returnType: bool
++  signatures: [MENUENTRY.HasChildren]
++---
++
++Use the `HasChildren` method when rendering a nested menu.
++
++With this site configuration:
++
++{{< code-toggle file=hugo >}}
++[[menu.main]]
++name = 'Products'
++pageRef = '/product'
++weight = 10
++
++[[menu.main]]
++name = 'Product 1'
++pageRef = '/products/product-1'
++parent = 'Products'
++weight = 1
++
++[[menu.main]]
++name = 'Product 2'
++pageRef = '/products/product-2'
++parent = 'Products'
++weight = 2
++{{< /code-toggle >}}
++
++And this template:
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main }}
++    <li>
++      <a href="{{ .URL }}">{{ .Name }}</a>
++      {{ if .HasChildren }}
++        <ul>
++          {{ range .Children }}
++            <li><a href="{{ .URL }}">{{ .Name }}</a></li>
++          {{ end }}
++        </ul>
++      {{ end }}
++    </li>
++  {{ end }}
++</ul>
++```
++
++Hugo renders this HTML:
++
++```html
++<ul>
++  <li>
++    <a href="/products/">Products</a>
++    <ul>
++      <li><a href="/products/product-1/">Product 1</a></li>
++      <li><a href="/products/product-2/">Product 2</a></li>
++    </ul>
++  </li>
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a4d7e129eec28fd890c0bb3fb17f4a1c2b5e72dd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,44 @@@
++---
++title: Identifier
++description: Returns the `identifier` property of the given menu entry. 
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: string
++  signatures: [MENUENTRY.Identifier]
++---
++
++The `Identifier` method returns the `identifier` property of the menu entry. If you define the menu entry [automatically], it returns the page's section.
++
++[automatically]: /content-management/menus/#define-automatically
++
++{{< code-toggle file=hugo >}}
++[[menu.main]]
++identifier = 'about'
++name = 'About'
++pageRef = '/about'
++weight = 10
++
++[[menu.main]]
++identifier = 'contact'
++name = 'Contact'
++pageRef = '/contact'
++weight = 20
++{{< /code-toggle >}}
++
++This example uses the `Identifier` method when querying the translation table on a multilingual site, falling back the `name` property if a matching key in the translation table does not exist:
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main }}
++    <li><a href="{{ .URL }}">{{ or (T .Identifier) .Name }}</a></li>
++  {{ end }}
++</ul>
++```
++
++{{% note %}}
++In the menu definition above, note that the `identifier` property is only required when two or more menu entries have the same name, or when localizing the name using translation tables.
++
++[details]: /content-management/menus/#properties-front-matter
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8031441b961c4c58da7b75ba50e28f7c3456feac
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,39 @@@
++---
++title: KeyName
++description: Returns the `identifier` property of the given menu entry, falling back to its `name` property. 
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: string
++  signatures: [MENUENTRY.KeyName]
++---
++
++In this menu definition, the second entry does not contain an `identifier`, so the `Identifier` method returns its `name` property instead:
++
++{{< code-toggle file=hugo >}}
++[[menu.main]]
++identifier = 'about'
++name = 'About'
++pageRef = '/about'
++weight = 10
++
++[[menu.main]]
++name = 'Contact'
++pageRef = '/contact'
++weight = 20
++{{< /code-toggle >}}
++
++This example uses the `KeyName` method when querying the translation table on a multilingual site, falling back the `name` property if a matching key in the translation table does not exist:
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main }}
++    <li><a href="{{ .URL }}">{{ or (T (.KeyName | lower)) .Name }}</a></li>
++  {{ end }}
++</ul>
++```
++
++In the example above, we need to pass the value returned by `.KeyName` through the [`lower`] function because the keys in the translation table are lowercase.
++
++[`lower`]: functions/strings/tolower
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6827519bd96f8c66f51005cc5163972b1b218b92
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++---
++title: Menu
++description: Returns the identifier of the menu that contains the given menu entry.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/IsMenuCurrent
++    - methods/page/HasMenuCurrent
++  returnType: string
++  signatures: [MENUENTRY.Menu]
++---
++
++```go-html-template
++{{ range .Site.Menus.main }}
++  {{ .Menu }} → main
++{{ end }}
++```
++
++Use this method with the [`IsMenuCurrent`] and [`HasMenuCurrent`] methods on a `Page` object to set "active" and "ancestor" classes on a rendered entry. See [this example].
++
++[`HasMenuCurrent`]: /methods/page/hasmenucurrent
++[`IsMenuCurrent`]: /methods/page/ismenucurrent
++[this example]: /templates/menu-templates/#example
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d722da07cd662da7d0db85bc053d847278cd34c7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,28 @@@
++---
++title: Name
++description: Returns the `name` property of the given menu entry.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: string
++  signatures: [MENUENTRY.Name]
++---
++
++If you define the menu entry [automatically], the `Name` method returns the page’s [`LinkTitle`], falling back to its [`Title`].
++
++If you define the menu entry [in front matter] or [in site configuration], the `Name` method returns the `name` property, falling back to the page’s `LinkTitle`, then to its `Title`.
++
++[`LinkTitle`]: /methods/page/linktitle
++[`Title`]: /methods/page/title
++[automatically]: /content-management/menus/#define-automatically
++[in front matter]: /content-management/menus/#define-in-front-matter
++[in site configuration]: /content-management/menus/#define-in-site-configuration
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main }}
++    <li><a href="{{ .URL }}">{{ .Name }}</a></li>
++  {{ end }}
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9b23f7b7326a9284d49e8cbb9c225e9d115e22fe
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,53 @@@
++---
++title: Page
++description: Returns the Page object associated with the given menu entry.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: hugolib.pageState
++  signatures: [MENUENTRY.Page]
++---
++
++Regardless of how you [define menu entries], an entry associated with a page has access to its [methods].
++
++In this menu definition, the first two entries are associated with a page, the last entry is not:
++
++{{< code-toggle file=hugo >}}
++[[menu.main]]
++pageRef = '/about'
++weight = 10
++
++[[menu.main]]
++pageRef = '/contact'
++weight = 20
++
++[[menu.main]]
++name = 'Hugo'
++url = 'https://gohugo.io'
++weight = 30
++{{< /code-toggle >}}
++
++In this example, if the menu entry is associated with a page, we use page's [`RelPermalink`] and [`LinkTitle`] when rendering the anchor element.
++
++If the entry is not associated with a page, we use its `url` and `name` properties.
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main }}
++    {{ with .Page }}
++      <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
++    {{ else }}
++      <li><a href="{{ .URL }}">{{ .Name }}</a></li>
++    {{ end }}
++  {{ end }}
++</ul>
++```
++
++See the [menu templates] section for more information.
++
++[`LinkTitle`]: /methods/page/linktitle
++[`RelPermalink`]: /methods/page/relpermalink
++[define menu entries]: /content-management/menus/
++[menu templates]: /templates/menu-templates/#page-references
++[methods]: /methods/page
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1486c12cb6afd20253d82dc6e115133b32c3cca1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,62 @@@
++---
++title: Params
++description: Returns the `params` property of the given menu entry.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: maps.Params
++  signatures: [MENUENTRY.Params]
++---
++
++When you define menu entries [in site configuration] or [in front matter], you can include a `params` key to attach additional information to the entry. For example:
++
++{{< code-toggle file=hugo >}}
++[[menu.main]]
++name = 'About'
++pageRef = '/about'
++weight = 10
++
++[[menu.main]]
++name = 'Contact'
++pageRef = '/contact'
++weight = 20
++
++[[menu.main]]
++name = 'Hugo'
++url = 'https://gohugo.io'
++weight = 30
++[menu.main.params]
++  rel = 'external'
++{{< /code-toggle >}}
++
++With this template:
++
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main }}
++    <li>
++      <a href="{{ .URL }}" {{ with .Params.rel }}rel="{{ . }}"{{ end }}>
++        {{ .Name }}
++      </a>
++    </li>
++  {{ end }}
++</ul>
++```
++
++Hugo renders:
++
++```html
++<ul>
++  <li><a href="/about/">About</a></li>
++  <li><a href="/contact/">Contact</a></li>
++  <li><a href="https://gohugo.io" rel="external">Hugo</a></li>
++</ul>
++```
++
++See the [menu templates] section for more information.
++
++[menu templates]: /templates/menu-templates/#menu-entry-parameters
++[in front matter]: /content-management/menus/#define-in-front-matter
++[in site configuration]: /content-management/menus/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..897712831f9329d078fab95185fc4c9d848df7b1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,51 @@@
++---
++title: Parent
++description: Returns the `parent` property of the given menu entry.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: string
++  signatures: [MENUENTRY.Parent]
++---
++
++With this menu definition:
++
++{{< code-toggle file=hugo >}}
++[menu]
++[[menu.main]]
++name = 'Products'
++pageRef = '/product'
++weight = 10
++
++[[menu.main]]
++name = 'Product 1'
++pageRef = '/products/product-1'
++parent = 'Products'
++weight = 1
++
++[[menu.main]]
++name = 'Product 2'
++pageRef = '/products/product-2'
++parent = 'Products'
++weight = 2
++{{< /code-toggle >}}
++
++This template renders the nested menu, listing the `parent` property next each of the child entries:
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main }}
++    <li>
++      <a href="{{ .URL }}">{{ .Name }}</a>
++      {{ if .HasChildren }}
++        <ul>
++          {{ range .Children }}
++            <li><a href="{{ .URL }}">{{ .Name }}</a> ({{ .Parent  }})</li>
++          {{ end }}
++        </ul>
++      {{ end }}
++    </li>
++  {{ end }}
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b2fa2da5becf69b1f33aacd626cf56a929d0ac83
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++title: Post
++description: Returns the `post` property of the given menu entry. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/menu-entry/Pre
++  returnType: template.HTML
++  signatures: [MENUENTRY.Post]
++---
++
++{{% include "methods/menu-entry/_common/pre-post.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..df7c8f16e124c3eda875edec0dd7904fc4842182
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++title: Pre
++description:  Returns the `pre` property of the given menu entry. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/menu-entry/Post
++  returnType: template.HTML
++  signatures: [MENUENTRY.Pre]
++---
++
++{{% include "methods/menu-entry/_common/pre-post.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c1eec2cc05fbc0eff4ee7e0d03a2639428508995
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,28 @@@
++---
++title: Title
++description: Returns the `title` property of the given menu entry.  
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: string
++  signatures: [MENUENTRY.Title]
++---
++
++If you define the menu entry [automatically], the `Title` method returns the page’s [`LinkTitle`], falling back to its [`Title`].
++
++If you define the menu entry [in front matter] or [in site configuration], the `Name` method returns the `title` property, falling back to the page’s `LinkTitle`, then to its `Title`.
++
++[`LinkTitle`]: /methods/page/linktitle
++[`Title`]: /methods/page/title
++[automatically]: /content-management/menus/#define-automatically
++[in front matter]: /content-management/menus/#define-in-front-matter
++[in site configuration]: /content-management/menus/#define-in-site-configuration
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main }}
++    <li><a href="{{ .URL }}">{{ .Title }}</a></li>
++  {{ end }}
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c2b314b580c2e05481a203eb5f89ce45e7985aa2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++---
++title: URL
++description: Returns the relative permalink of the page associated with the given menu entry, else its `url` property.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: string
++  signatures: [MENUENTRY.URL]
++---
++
++For menu entries associated with a page, the `URL` method returns the page's [`RelPermalink`], otherwise it returns the entry's `url` property.
++
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main }}
++    <li><a href="{{ .URL }}">{{ .Name }}</a></li>
++  {{ end }}
++</ul>
++```
++
++[`RelPermalink`]: /methods/page/relpermalink
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7b0c24ae8801fb72a7dadc4ba0cac2396d2d5639
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++---
++title: Weight
++description:  Returns the `weight` property of the given menu entry.   
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: int
++  signatures: [MENUENTRY.Weight]
++---
++
++If you define the menu entry [automatically], the `Weight` method returns the page’s [`Weight`].
++
++If you define the menu entry [in front matter] or [in site configuration], the `Weight` method returns the `weight` property, falling back to the page’s `Weight`.
++
++[`Weight`]: /methods/page/weight
++[automatically]: /content-management/menus/#define-automatically
++[in front matter]: /content-management/menus/#define-in-front-matter
++[in site configuration]: /content-management/menus/#define-in-site-configuration
++
++In this contrived example, we limit the number of menu entries based on weight:
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main }}
++    {{ if le .Weight 42 }}
++      <li><a href="{{ .URL }}">{{ .Name }}</a></li>
++    {{ end }}
++  {{ end }}
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8cc787ea9bb67459f2e8c4bfd9153ed9d1860561
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,39 @@@
++---
++# Do not remove front matter.
++---
++
++In this site configuration we enable rendering of [emoji shortcodes], and add emoji shortcodes before (pre) and after (post) each menu entry:
++
++{{< code-toggle file=hugo >}}
++enableEmoji = true
++
++[[menu.main]]
++name = 'About'
++pageRef = '/about'
++post = ':point_left:'
++pre = ':point_right:'
++weight = 10
++
++[[menu.main]]
++name = 'Contact'
++pageRef = '/contact'
++post = ':arrow_left:'
++pre = ':arrow_right:'
++weight = 20
++{{< /code-toggle >}}
++
++To render the menu:
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main }}
++    <li>
++      {{ .Pre | markdownify }}
++      <a href="{{ .URL }}">{{ .Name }}</a>
++      {{ .Post | markdownify }}
++    </li>
++  {{ end }}
++</ul>
++```
++
++[emoji shortcodes]: /quick-reference/emojis/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d89663593bf6532c52bfeecf3273fb4ad6f0ffaf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Menu entry methods
++linkTitle: Menu entry
++description: Use these methods in your menu templates.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: methods
++---
++
++Use these methods in your menu templates.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3f1c52b2ee1a29e7c94b2859674b2bab531d9a5d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,65 @@@
++---
++title: ByName
++description: Returns the given menu with its entries sorted by name.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: navigation.Menu
++  signatures: [MENU.ByName]
++---
++
++The `Sort` method returns the given menu with its entries sorted by `name`.
++
++Consider this menu definition:
++
++{{< code-toggle file=hugo >}}
++[[menu.main]]
++name = 'Services'
++pageRef = '/services'
++weight = 10
++
++[[menu.main]]
++name = 'About'
++pageRef = '/about'
++weight = 20
++
++[[menu.main]]
++name = 'Contact'
++pageRef = '/contact'
++weight = 30
++{{< /code-toggle >}}
++
++To sort the entries by `name`:
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main.ByName }}
++    <li><a href="{{ .URL }}">{{ .Name }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Hugo renders this to:
++
++```html
++<ul>
++  <li><a href="/about/">About</a></li>
++  <li><a href="/contact">Contact</a></li>
++  <li><a href="/services/">Services</a></li>
++</ul>
++```
++
++You can also sort menu entries using the [`sort`] function. For example, to sort by `name` in descending order:
++
++```go-html-template
++<ul>
++  {{ range sort .Site.Menus.main "Name" "desc" }}
++    <li><a href="{{ .URL }}">{{ .Name }}</a></li>
++  {{ end }}
++</ul>
++```
++
++When using the sort function with menu entries, specify any of the following keys: `Identifier`, `Name`, `Parent`, `Post`, `Pre`, `Title`, `URL`, or `Weight`.
++
++[`sort`]: /functions/collections/sort
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c915914db554856f66354b86e8bb0022347aed58
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,76 @@@
++---
++title: ByWeight
++description: Returns the given menu with its entries sorted by weight, then by name, then by identifier.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: navigation.Menu
++  signatures: [MENU.ByWeight]
++---
++
++The `ByWeight` method returns the given menu with its entries sorted by [`weight`], then by `name`, then by `identifier`. This is the default sort order.
++
++[`weight`]: /getting-started/glossary/#weight
++
++Consider this menu definition:
++
++{{< code-toggle file=hugo >}}
++[[menu.main]]
++identifier = 'about'
++name = 'About'
++pageRef = '/about'
++weight = 20
++
++[[menu.main]]
++identifier = 'services'
++name = 'Services'
++pageRef = '/services'
++weight = 10
++
++[[menu.main]]
++identifier = 'contact'
++name = 'Contact'
++pageRef = '/contact'
++weight = 30
++{{< /code-toggle >}}
++
++To sort the entries by `weight`, then by `name`, then by `identifier`:
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main.ByWeight }}
++    <li><a href="{{ .URL }}">{{ .Name }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Hugo renders this to:
++
++```html
++<ul>
++  <li><a href="/services/">Services</a></li>
++  <li><a href="/about/">About</a></li>
++  <li><a href="/contact">Contact</a></li>
++</ul>
++```
++
++{{% note %}}
++In the menu definition above, note that the `identifier` property is only required when two or more menu entries have the same name, or when localizing the name using translation tables.
++
++[details]: /content-management/menus/#properties-front-matter
++{{% /note %}}
++
++You can also sort menu entries using the [`sort`] function. For example, to sort by `weight` in descending order:
++
++```go-html-template
++<ul>
++  {{ range sort .Site.Menus.main "Weight" "desc" }}
++    <li><a href="{{ .URL }}">{{ .Name }}</a></li>
++  {{ end }}
++</ul>
++```
++
++When using the sort function with menu entries, specify any of the following keys: `Identifier`, `Name`, `Parent`, `Post`, `Pre`, `Title`, `URL`, or `Weight`.
++
++[`sort`]: /functions/collections/sort
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..12263e81137c634b76b4c8a68a35c1a054b978e0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,50 @@@
++---
++title: Limit
++description: Returns the given menu, limited to the first N entries.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: navigation.Menu
++  signatures: [MENU.Limit N]
++---
++
++The `Limit` method returns the given menu, limited to the first N entries.
++
++Consider this menu definition:
++
++{{< code-toggle file=hugo >}}
++[[menu.main]]
++name = 'Services'
++pageRef = '/services'
++weight = 10
++
++[[menu.main]]
++name = 'About'
++pageRef = '/about'
++weight = 20
++
++[[menu.main]]
++name = 'Contact'
++pageRef = '/contact'
++weight = 30
++{{< /code-toggle >}}
++
++To sort the entries by name, and limit to the first 2 entries:
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main.ByName.Limit 2 }}
++    <li><a href="{{ .URL }}">{{ .Name }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Hugo renders this to:
++
++```html
++<ul>
++  <li><a href="/about/">About</a></li>
++  <li><a href="/contact">Contact</a></li>
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..989132d60e368f8ec0027367feb61e1b0b9ae0f6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,51 @@@
++---
++title: Reverse
++description: Returns the given menu, reversing the sort order of its entries.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: navigation.Menu
++  signatures: [MENU.Reverse]
++---
++
++The `Reverse` method returns the given menu, reversing the sort order of its entries.
++
++Consider this menu definition:
++
++{{< code-toggle file=hugo >}}
++[[menu.main]]
++name = 'Services'
++pageRef = '/services'
++weight = 10
++
++[[menu.main]]
++name = 'About'
++pageRef = '/about'
++weight = 20
++
++[[menu.main]]
++name = 'Contact'
++pageRef = '/contact'
++weight = 30
++{{< /code-toggle >}}
++
++To sort the entries by name in descending order:
++
++```go-html-template
++<ul>
++  {{ range .Site.Menus.main.ByName.Reverse }}
++    <li><a href="{{ .URL }}">{{ .Name }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Hugo renders this to:
++
++```html
++<ul>
++  <li><a href="/services/">Services</a></li>
++  <li><a href="/contact">Contact</a></li>
++  <li><a href="/about/">About</a></li>
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f5b925fd6152fbf7db272f6fec4b69f80e758ed7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Menu methods
++linkTitle: Menu
++description: Use these methods when ranging through menu entries.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: methods
++---
++
++Use these methods when ranging through menu entries.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..15e73384b15b50ebf8ad5eb2beae11073af2c49d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,29 @@@
++---
++title: Aliases
++description: Returns the URL aliases as defined in front matter.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: '[]string'
++  signatures: [PAGE.Aliases]
++---
++
++The `Aliases` method on a `Page` object returns the URL [aliases] as defined in front matter.
++
++For example:
++
++{{< code-toggle file=content/about.md fm=true >}}
++title = 'About'
++aliases = ['/old-url','/really-old-url']
++{{< /code-toggle >}}
++
++To list the aliases:
++
++```go-html-template
++{{ range .Aliases }}
++  {{ . }}
++{{ end }}
++```
++
++[aliases]: /content-management/urls/#aliases
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b9c156127841a390706ba488c4005789df818ef5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,90 @@@
++---
++title: AllTranslations
++description: Returns all translation of the given page, including the given page. 
++categories: []
++keywords: []
++action:
++  related:
++   - methods/page/Translations
++   - methods/page/IsTranslated
++   - methods/page/TranslationKey
++  returnType: page.Pages
++  signatures: [PAGE.AllTranslations]
++---
++
++With this site configuration:
++
++{{< code-toggle file=hugo >}}
++defaultContentLanguage = 'en'
++
++[languages.en]
++contentDir = 'content/en'
++languageCode = 'en-US'
++languageName = 'English'
++weight = 1
++
++[languages.de]
++contentDir = 'content/de'
++languageCode = 'de-DE'
++languageName = 'Deutsch'
++weight = 2
++
++[languages.fr]
++contentDir = 'content/fr'
++languageCode = 'fr-FR'
++languageName = 'Français'
++weight = 3
++{{< /code-toggle >}}
++
++And this content:
++
++```text
++content/
++├── de/
++│   ├── books/
++│   │   ├── book-1.md
++│   │   └── book-2.md
++│   └── _index.md
++├── en/
++│   ├── books/
++│   │   ├── book-1.md
++│   │   └── book-2.md
++│   └── _index.md
++├── fr/
++│   ├── books/
++│   │   └── book-1.md
++│   └── _index.md
++└── _index.md
++```
++
++And this template:
++
++```go-html-template
++{{ with .AllTranslations }}
++  <ul>
++    {{ range . }}
++      {{ $lang := .Language.LanguageName}}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }} ({{ $lang }})</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++Hugo will render this list on the "Book 1" page of each site:
++
++```html
++<ul>
++  <li><a href="/books/book-1/">Book 1 (English)</a></li>
++  <li><a href="/de/books/book-1/">Book 1 (Deutsch)</a></li>
++  <li><a href="/fr/books/book-1/">Book 1 (Français)</a></li>
++</ul>
++```
++
++On the "Book 2" page of the English and German sites, Hugo will render this:
++
++```html
++<ul>
++  <li><a href="/books/book-1/">Book 1 (English)</a></li>
++  <li><a href="/de/books/book-1/">Book 1 (Deutsch)</a></li>
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b48d1adf4a24a889fa0c3f70bedc4998431350d2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,43 @@@
++---
++title: AlternativeOutputFormats
++description: Returns a slice of OutputFormat objects, excluding the current output format, each representing one of the output formats enabled for the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/OutputFormats
++  returnType: page.OutputFormats
++  signatures: [PAGE.AlternativeOutputFormats]
++---
++
++{{% include "methods/page/_common/output-format-definition.md" %}}
++
++The `AlternativeOutputFormats` method on a `Page` object returns a slice of `OutputFormat` objects, excluding the current output format, each representing one of the output formats enabled for the given page.. See&nbsp;[details](/templates/output-formats/).
++
++## Methods
++
++{{% include "methods/page/_common/output-format-methods.md" %}}
++
++## Example
++
++Generate a `link` element in the `<head>` of each page for each of the alternative output formats:
++
++```go-html-template
++<head>
++  ...
++  {{ $title := printf "%s | %s" .Title site.Title }}
++  {{ if .IsHome }}
++    {{ $title = site.Title }}
++  {{ end }}
++  {{ range .AlternativeOutputFormats -}}
++    {{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink $title | safeHTML }}
++  {{ end }}
++  ...
++</head>
++```
++
++On the site's home page, Hugo renders this to:
++
++```html
++<link rel="alternate" type="application/rss+xml" href="https://example.org/index.xml" title="ABC Widgets, Inc.">
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3bf36d9aaa22033df272921e68bee30ab052d3e6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,87 @@@
++---
++title: Ancestors
++description: Returns a collection of Page objects, one for each ancestor section of the given page. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/CurrentSection
++    - methods/page/FirstSection
++    - methods/page/InSection
++    - methods/page/IsAncestor
++    - methods/page/IsDescendant
++    - methods/page/Parent
++    - methods/page/Sections
++  returnType: page.Pages
++  signatures: [PAGE.Ancestors]
++---
++
++{{< new-in 0.109.0 >}}
++
++{{% include "methods/page/_common/definition-of-section.md" %}}
++
++With this content structure:
++
++```text
++content/
++├── auctions/
++│   ├── 2023-11/
++│   │   ├── _index.md     <-- front matter: weight = 202311
++│   │   ├── auction-1.md
++│   │   └── auction-2.md
++│   ├── 2023-12/
++│   │   ├── _index.md     <-- front matter: weight = 202312
++│   │   ├── auction-3.md
++│   │   └── auction-4.md
++│   ├── _index.md         <-- front matter: weight = 30
++│   ├── bidding.md
++│   └── payment.md
++├── books/
++│   ├── _index.md         <-- front matter: weight = 10
++│   ├── book-1.md
++│   └── book-2.md
++├── films/
++│   ├── _index.md         <-- front matter: weight = 20
++│   ├── film-1.md
++│   └── film-2.md
++└── _index.md
++```
++
++And this template:
++
++```go-html-template
++{{ range .Ancestors }}
++  <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
++{{ end }}
++```
++
++On the November 2023 auctions page, Hugo renders:
++
++```html
++<a href="/auctions/2023-11/">Auctions in November 2023</a>
++<a href="/auctions/">Auctions</a>
++<a href="/">Home</a>
++```
++
++In the example above, notice that Hugo orders the ancestors from closest to furthest. This makes breadcrumb navigation simple:
++
++```go-html-template
++<nav aria-label="breadcrumb" class="breadcrumb">
++  <ol>
++    {{ range .Ancestors.Reverse }}
++      <li>
++        <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
++      </li>
++    {{ end }}
++    <li class="active">
++      <a aria-current="page" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
++    </li>
++  </ol>
++</nav>
++```
++
++With some CSS, the code above renders something like this, where each breadcrumb links to its page:
++
++```text
++Home > Auctions > Auctions in November 2023 > Auction 1
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..77d1d72eb33526b268405dc7e6b1ef8c6b0f001d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,37 @@@
++---
++title: BundleType
++description: Returns the bundle type of the given page, or an empty string if the page is not a page bundle.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: files.ContentClass
++  signatures: [PAGE.BundleType]
++---
++
++A page bundle is a directory that encapsulates both content and associated [resources]. There are two types of page bundles: [leaf bundles] and [branch bundles]. See&nbsp;[details](/content-management/page-bundles/).
++
++The `BundleType` method on a `Page` object returns `branch` for branch bundles, `leaf` for leaf bundles, and an empty string if the page is not a page bundle.
++
++```text
++content/
++├── films/
++│   ├── film-1/
++│   │   ├── a.jpg
++│   │   └── index.md  <-- leaf bundle
++│   ├── _index.md     <-- branch bundle
++│   ├── b.jpg
++│   ├── film-2.md
++│   └── film-3.md
++└── _index.md         <-- branch bundle
++```
++
++To get the value within a template:
++
++```go-html-template
++{{ .BundleType }}
++```
++
++[resources]: /getting-started/glossary/#resource
++[leaf bundles]: /getting-started/glossary/#leaf-bundle
++[branch bundles]: /getting-started/glossary/#branch-bundle
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ec7e5c8bf3417f58fcfcc0185d22b7036935234f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,66 @@@
++---
++title: CodeOwners
++description: Returns of slice of code owners for the given page, derived from the CODEOWNERS file in the root of the project directory.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/GitInfo
++  returnType: '[]string'
++  signatures: [PAGE.CodeOwners]
++---
++
++GitHub and GitLab support CODEOWNERS files. This file specifies the users responsible for developing and maintaining software and documentation. This definition can apply to the entire repository, specific directories, or to individual files. To learn more:
++
++- [GitHub CODEOWNERS documentation]
++- [GitLab CODEOWNERS documentation]
++
++Use the `CodeOwners` method on a `Page` object to determine the code owners for the given page.
++
++[GitHub CODEOWNERS documentation]: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
++[GitLab CODEOWNERS documentation]: https://docs.gitlab.com/ee/user/project/code_owners.html
++
++To use the `CodeOwners` method you must enable access to your local Git repository:
++
++{{< code-toggle file=hugo >}}
++enableGitInfo = true
++{{< /code-toggle >}}
++
++Consider this project structure:
++
++```text
++hugo-testing/
++├── content/
++│   ├── books/
++│   │   └── les-miserables.md
++│   └── films/
++│       └── the-hunchback-of-notre-dame.md
++└── CODEOWNERS
++```
++
++And this CODEOWNERS file:
++
++```text
++* @jdoe
++/content/books/ @tjones
++/content/films/ @mrichards @rsmith
++```
++
++The table below shows the slice of code owners returned for each file:
++
++Path|Code owners
++:--|:--
++`books/les-miserables.md`|`[@tjones]`
++`films/the-hunchback-of-notre-dame.md`|`[@mrichards @rsmith]`
++
++Render the code owners for each content page:
++
++```go-html-template
++{{ range .CodeOwners }}
++  {{ . }}
++{{ end }}
++```
++
++Combine this method with [`resources.GetRemote`] to retrieve names and avatars from your Git provider by querying their API.
++
++[`resources.GetRemote`]: functions/resources/getremote
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..40a057f02634b289fd193f707ee342276ce7da55
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,22 @@@
++---
++title: Content
++description: Returns the rendered content of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/RawContent
++    - methods/page/Plain
++    - methods/page/PlainWords
++    - methods/page/RenderShortcodes
++  returnType: template.HTML
++  signatures: [PAGE.Content]
++---
++
++The `Content` method on a `Page` object renders markdown and shortcodes to HTML. The content does not include front matter.
++
++[shortcodes]: /getting-started/glossary/#shortcode
++
++```go-html-template
++{{ .Content }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..03cb9eb3dc859d7d7bb67b66b77283afde88807b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,60 @@@
++---
++title: CurrentSection
++description: Returns the Page object of the section in which the given page resides.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Ancestors
++    - methods/page/FirstSection
++    - methods/page/InSection
++    - methods/page/IsAncestor
++    - methods/page/IsDescendant
++    - methods/page/Parent
++    - methods/page/Sections
++  returnType: hugolib.pageState
++  signatures: [PAGE.CurrentSection]
++---
++
++{{% include "methods/page/_common/definition-of-section.md" %}}
++
++{{% note %}}
++The current section of a [section] page, [taxonomy] page, [term] page, or the home page, is itself.
++
++[section]: /getting-started/glossary/#section
++[taxonomy]: /getting-started/glossary/#taxonomy
++[term]: /getting-started/glossary/#term
++{{% /note %}}
++
++Consider this content structure:
++
++```text
++content/
++├── auctions/
++│   ├── 2023-11/
++│   │   ├── _index.md     <-- current section: 2023-11
++│   │   ├── auction-1.md
++│   │   └── auction-2.md  <-- current section: 2023-11
++│   ├── 2023-12/
++│   │   ├── _index.md     
++│   │   ├── auction-3.md
++│   │   └── auction-4.md
++│   ├── _index.md         <-- current section: auctions
++│   ├── bidding.md
++│   └── payment.md        <-- current section: auctions
++├── books/
++│   ├── _index.md         <-- current section: books
++│   ├── book-1.md
++│   └── book-2.md         <-- current section: books
++├── films/
++│   ├── _index.md         <-- current section: films 
++│   ├── film-1.md
++│   └── film-2.md         <-- current section: films
++└── _index.md             <-- current section: home
++```
++
++To create a link to the current section page:
++
++```go-html-template
++<a href="{{ .CurrentSection.RelPermalink }}">{{ .CurrentSection.LinkTitle }}</a>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4eccde6ff44ba233992db432d11cbe9c6645d65d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,111 @@@
++---
++title: Data
++description: Returns a unique data object for each page kind.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.Data
++  signatures: [PAGE.Data]
++toc: true
++---
++
++The `Data` method on a `Page` object returns a unique data object for each [page kind].
++
++[page kind]: /getting-started/glossary/#page-kind
++
++{{% note %}}
++The `Data` method is only useful within [taxonomy] and [term] templates.
++
++Themes that are not actively maintained may still use `.Data.Pages` in list templates. Although that syntax remains functional, use one of these methods instead: [`Pages`], [`RegularPages`], or [`RegularPagesRecursive`]
++
++[`Pages`]: /methods/page/pages/
++[`RegularPages`]: /methods/page/regularpages/
++[`RegularPagesRecursive`]: /methods/page/regularpagesrecursive/
++[term]: /getting-started/glossary/#term
++[taxonomy]: /getting-started/glossary/#taxonomy
++{{% /note %}}
++
++The examples that follow are based on this site configuration:
++
++{{< code-toggle file=hugo >}}
++[taxonomies]
++genre = 'genres'
++author = 'authors'
++{{< /code-toggle >}}
++
++And this content structure:
++
++```text
++content/
++├── books/
++│   ├── and-then-there-were-none.md --> genres: suspense
++│   ├── death-on-the-nile.md        --> genres: suspense
++│   └── jamaica-inn.md              --> genres: suspense, romance
++│   └── pride-and-prejudice.md      --> genres: romance
++└── _index.md
++```
++
++## In a taxonomy template
++
++Use these methods on the `Data` object within a taxonomy template.
++
++Singular
++: (`string`) Returns the singular name of the taxonomy.
++
++```go-html-template
++{{ .Data.Singular }} → genre
++```
++
++Plural
++: (`string`) Returns the plural name of the taxonomy.
++
++```go-html-template
++{{ .Data.Plural }} → genres
++```
++
++Terms
++: (`page.Taxonomy`) Returns the taxonomy object, consisting of a map of terms and the [weighted pages] associated with each term.
++
++```go-html-template
++{{ $taxonomyObject := .Data.Terms }} 
++```
++
++{{% note %}}
++Once you have captured the taxonomy object, use any of the [taxonomy methods] to sort, count, or capture a subset of its weighted pages.
++
++[taxonomy methods]: /methods/taxonomy
++{{% /note %}}
++
++Learn more about [taxonomy templates].
++
++## In a term template
++
++Use these methods on the `Data` object within a term template.
++
++Singular
++: (`string`) Returns the singular name of the taxonomy.
++
++```go-html-template
++{{ .Data.Singular }} → genre
++```
++
++Plural
++: (`string`) Returns the plural name of the taxonomy.
++
++```go-html-template
++{{ .Data.Plural }} → genres
++```
++
++Term
++: (`string`) Returns the name of the term.
++
++```go-html-template
++{{ .Data.Term }} → suspense
++```
++
++Learn more about [term templates].
++
++[taxonomy templates]: /templates/taxonomy-templates/
++[term templates]: /templates/taxonomy-templates/
++[weighted pages]: /getting-started/glossary/#weighted-page
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..83192f94cbbeadb673dd3c33c3f3fb33bb67d0a2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,39 @@@
++---
++title: Date
++description: Returns the date of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/ExpiryDate
++    - methods/page/LastMod
++    - methods/page/PublishDate
++  returnType: time.Time
++  signatures: [PAGE.Date]
++---
++
++Set the date in front matter:
++
++{{< code-toggle file=content/news/article-1.md fm=true >}}
++title = 'Article 1'
++date = 2023-10-19T00:40:04-07:00
++{{< /code-toggle >}}
++
++{{% note %}}
++The date field in front matter is often considered to be the creation date, You can change its meaning, and its effect on your site, in the site configuration. See&nbsp;[details].
++
++[details]: /getting-started/configuration/#configure-dates
++{{% /note %}}
++
++The date is a [time.Time] value. Format and localize the value with the [`time.Format`] function, or use it with any of the [time methods].
++
++```go-html-template
++{{ .Date | time.Format ":date_medium" }} → Oct 19, 2023
++```
++
++In the example above we explicitly set the date in front matter. With Hugo's default configuration, the `Date` method returns the front matter value. This behavior is configurable, allowing you to set fallback values if the date is not defined in front matter. See&nbsp;[details].
++
++[`time.Format`]: /functions/time/format
++[details]: /getting-started/configuration/#configure-dates
++[time methods]: /methods/time
++[time.Time]: https://pkg.go.dev/time#Time
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fbb43b8b53f43c087f761135a1d7245daa0e650d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,28 @@@
++---
++title: Description
++description: Returns the description of the given page as defined in front matter.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Summary
++  returnType: string
++  signatures: [PAGE.Description]
++---
++
++Conceptually different that a [content summary], a page description is typically used in metadata about the page.
++
++{{< code-toggle file=content/recipes/sushi.md fm=true >}}
++title = 'How to make spicy tuna hand rolls'
++description = 'Instructions for making spicy tuna hand rolls.'
++{{< /code-toggle >}}
++
++{{< code file=layouts/baseof.html  >}}
++<head>
++  ...
++  <meta name="description" content="{{ .Description }}">
++  ...
++</head>
++{{< /code >}}
++
++[content summary]: /content-management/summaries
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fd55a9bc97bde4bb5606b2af1228a5dce42f34db
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: Draft
++description: Reports whether the given page is a draft as defined in front matter.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: bool
++  signatures: [PAGE.Draft]
++---
++
++By default, Hugo does not publish draft pages when you build your site. To include draft pages when you build your site, use the `--buildDrafts` command line flag.
++
++{{< code-toggle file=content/posts/post-1.md fm=true >}}
++title = 'Post 1'
++draft = true
++{{< /code-toggle >}}
++
++```go-html-template
++{{ .Draft }} → true
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1be4162950da149355af9c82e72eeb3eb134e8c9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: Eq
++description: Reports whether two Page objects are equal.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: bool
++  signatures: [PAGE1.Eq PAGE2]
++---
++
++In this contrived example from a single page template, we list all pages in the current section except for the current page.
++
++```go-html-template
++{{ $currentPage := . }}
++{{ range .CurrentSection.Pages  }}
++  {{ if not (.Eq $currentPage) }}
++    <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
++  {{ end }}
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..353546449a335e5498830da25f944aedb2b5856b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,35 @@@
++---
++title: ExpiryDate
++description: Returns the expiry date of the given page. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Date
++    - methods/page/LastMod
++    - methods/page/PublishDate
++  returnType: time.Time
++  signatures: [PAGE.ExpiryDate]
++---
++
++By default, Hugo excludes expired pages when building your site. To include expired pages, use the `--buildExpired` command line flag.
++
++Set the expiry date in front matter:
++
++{{< code-toggle file=content/news/article-1.md fm=true >}}
++title = 'Article 1'
++expiryDate = 2024-10-19T00:32:13-07:00
++{{< /code-toggle >}}
++
++The expiry date is a [time.Time] value. Format and localize the value with the [`time.Format`] function, or use it with any of the [time methods].
++
++```go-html-template
++{{ .ExpiryDate | time.Format ":date_medium" }} → Oct 19, 2024
++```
++
++In the example above we explicitly set the expiry date in front matter. With Hugo's default configuration, the `ExpiryDate` method returns the front matter value. This behavior is configurable, allowing you to set fallback values if the expiry date is not defined in front matter. See&nbsp;[details].
++
++[`time.Format`]: /functions/time/format
++[details]: /getting-started/configuration/#configure-dates
++[time methods]: /methods/time
++[time.Time]: https://pkg.go.dev/time#Time
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c39d1a64d5ef3613bfeafa2bda2c2f3dde834900
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,180 @@@
++---
++title: File
++description: For pages backed by a file, returns file information for the given page.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: hugolib.fileInfo
++  signatures: [PAGE.File]
++toc: true
++---
++
++By default, not all pages are backed by a file, including top level [section] pages, [taxonomy] pages, and [term] pages. By definition, you cannot retrieve file information when the file does not exist.
++
++To back one of the pages above with a file, create an _index.md file in the corresponding directory. For example:
++
++```text
++content/
++└── books/
++    ├── _index.md  <-- the top level section page
++    ├── book-1.md
++    └── book-2.md
++```
++
++Code defensively by verifying file existence as shown in each of the examples below.
++
++## Methods
++
++{{% note %}}
++The path separators (slash or backslash) in `Path`, `Dir`, and `Filename` depend on the operating system.
++{{% /note %}}
++
++BaseFileName
++: (`string`) The file name, excluding the extension.
++
++```go-html-template
++{{ with .File }}
++  {{ .BaseFileName }}
++{{ end }}
++```
++
++ContentBaseName
++: (`string`) If the page is a branch or leaf bundle, the name of the containing directory, else the `TranslationBaseName`.
++
++```go-html-template
++{{ with .File }}
++  {{ .ContentBaseName }}
++{{ end }}
++```
++
++Dir
++: (`string`) The file path, excluding the file name, relative to the `content` directory.
++
++```go-html-template
++{{ with .File }}
++  {{ .Dir }}
++{{ end }}
++```
++
++Ext
++: (`string`) The file extension.
++
++```go-html-template
++{{ with .File }}
++  {{ .Ext }}
++{{ end }}
++```
++
++Filename
++: (`string`) The absolute file path.
++
++```go-html-template
++{{ with .File }}
++  {{ .Filename }}
++{{ end }}
++```
++
++Lang
++: (`string`) The language associated with the given file.
++
++```go-html-template
++{{ with .File }}
++  {{ .Lang }}
++{{ end }}
++```
++
++LogicalName
++: (`string`) The file name.
++
++```go-html-template
++{{ with .File }}
++  {{ .LogicalName }}
++{{ end }}
++```
++
++Path
++: (`string`) The file path, relative to the `content` directory.
++
++```go-html-template
++{{ with .File }}
++  {{ .Path }}
++{{ end }}
++```
++
++TranslationBaseName
++: (`string`) The file name, excluding the extension and language identifier.
++
++```go-html-template
++{{ with .File }}
++  {{ .TranslationBaseName }}
++{{ end }}
++```
++
++UniqueID
++: (`string`) The MD5 hash of `.File.Path`.
++
++```go-html-template
++{{ with .File }}
++  {{ .UniqueID }}
++{{ end }}
++```
++
++## Examples
++
++Consider this content structure in a multilingual project:
++
++```text
++content/
++├── news/
++│   ├── b/
++│   │   ├── index.de.md   <-- leaf bundle
++│   │   └── index.en.md   <-- leaf bundle
++│   ├── a.de.md           <-- regular content
++│   ├── a.en.md           <-- regular content
++│   ├── _index.de.md      <-- branch bundle
++│   └── _index.en.md      <-- branch bundle
++├── _index.de.md
++└── _index.en.md
++```
++
++With the English language site:
++
++&nbsp;|regular content|leaf bundle|branch bundle
++:--|:--|:--|:--
++BaseFileName|a.en|index.en|_index.en
++ContentBaseName|a|b|news
++Dir|news/|news/b/|news/
++Ext|md|md|md
++Filename|/home/user/...|/home/user/...|/home/user/...
++Lang|en|en|en
++LogicalName|a.en.md|index.en.md|_index.en.md
++Path|news/a.en.md|news/b/index.en.md|news/_index.en.md
++TranslationBaseName|a|index|_index
++UniqueID|15be14b...|186868f...|7d9159d...
++
++## Defensive coding
++
++Some of the pages on a site may not be backed by a file. For example:
++
++- Top level section pages
++- Taxonomy pages
++- Term pages
++
++Without a backing file, Hugo will throw a warning if you attempt to access a `.File` property. For example:
++
++```text
++WARN .File.ContentBaseName on zero object. Wrap it in if or with...
++```
++
++To code defensively, first check for file existence:
++
++```go-html-template
++{{ with .File }}
++  {{ .ContentBaseName }}
++{{ end }}
++```
++
++[section]: /getting-started/glossary/#section
++[taxonomy]: /getting-started/glossary/#taxonomy
++[term]: /getting-started/glossary/#term
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f757aa2d28ffb6a96f19c57c6f6762d4d894baaa
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,56 @@@
++---
++title: FirstSection
++description: Returns the Page object of the top level section of which the given page is a descendant.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Ancestors
++    - methods/page/CurrentSection
++    - methods/page/InSection
++    - methods/page/IsAncestor
++    - methods/page/IsDescendant
++    - methods/page/Parent
++    - methods/page/Sections
++  returnType: hugolib.pageState
++  signatures: [PAGE.FirstSection]
++---
++
++{{% include "methods/page/_common/definition-of-section.md" %}}
++
++{{% note %}}
++When called on the home page, the `FirstSection` method returns the `Page` object of the home page itself.
++{{% /note %}}
++
++Consider this content structure:
++
++```text
++content/
++├── auctions/
++│   ├── 2023-11/
++│   │   ├── _index.md     <-- first section: auctions
++│   │   ├── auction-1.md
++│   │   └── auction-2.md  <-- first section: auctions
++│   ├── 2023-12/
++│   │   ├── _index.md     
++│   │   ├── auction-3.md
++│   │   └── auction-4.md
++│   ├── _index.md         <-- first section: auctions
++│   ├── bidding.md
++│   └── payment.md        <-- first section: auctions
++├── books/
++│   ├── _index.md         <-- first section: books
++│   ├── book-1.md
++│   └── book-2.md         <-- first section: books
++├── films/
++│   ├── _index.md         <-- first section: films
++│   ├── film-1.md
++│   └── film-2.md         <-- first section: films
++└── _index.md             <-- first section: home
++```
++
++To link to the top level section of which the current page is a descendant:
++
++```go-html-template
++<a href="{{ .FirstSection.RelPermalink }}">{{ .FirstSection.LinkTitle }}</a>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bae1c7d0392204cecdd961c7d8bb5eef308c7d44
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,106 @@@
++---
++title: Fragments
++description: Returns a data structure of the fragments in the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/TableOfContents
++  returnType: tableofcontents.Fragments
++  signatures: [PAGE.Fragments]
++toc: true
++---
++
++{{< new-in 0.111.0 >}}
++
++In a URL, whether absolute or relative, the [fragment] links to an `id` attribute of an HTML element on the page.
++
++```text
++/articles/article-1#section-2
++------------------- ---------
++       path         fragment
++```
++
++Hugo assigns an `id` attribute to each markdown [ATX] and [setext] heading within the page content. You can override the `id` with a [markdown attribute] as needed. This creates the relationship between an entry in the [table of contents] (TOC) and a heading on the page.
++
++Use the `Fragments` method on a `Page` object to create a table of contents with the `Fragments.ToHTML` method, or by [walking] the `Fragments.Map` data structure.
++
++## Methods
++
++Headings
++: (`map`) A nested map of all headings on the page. Each map contains the following keys: `ID`, `Title` and `Headings`. To inspect the data structure:
++
++```go-html-template
++<pre>{{ .Fragments.Headings | jsonify (dict "indent" "  ") }}</pre>
++```
++
++HeadingsMap
++: (`slice`) A slice of maps of all headings on the page, with first-level keys for each heading. Each map contains the following keys: `ID`, `Title` and `Headings`. To inspect the data structure:
++
++```go-html-template
++<pre>{{ .Fragments.HeadingsMap | jsonify (dict "indent" "  ") }}</pre>
++```
++
++Identifiers
++: (`slice`) A slice containing the `id` of each heading on the page. To inspect the data structure:
++
++```go-html-template
++<pre>{{ .Fragments.Identifiers | jsonify (dict "indent" "  ") }}</pre>
++```
++
++Identifiers.Contains ID
++: (`bool`) Reports whether one or more headings on the page has the given `id` attribute, useful for validating fragments within a link [render hook].
++
++```go-html-template
++{{ .Fragments.Identifiers.Contains "section-2" }} → true
++```
++
++Identifiers.Count ID
++: (`int`) The number of headings on a page with the given `id` attribute, useful for detecting duplicates.
++
++```go-html-template
++{{ .Fragments.Identifiers.Count "section-2" }} → 1
++```
++
++ToHTML
++: (`template.HTML`) Returns a TOC as a nested list, either ordered or unordered, identical to the HTML returned by the [`TableOfContents`] method. This method take three arguments: the start level&nbsp;(`int`), the end level&nbsp;(`int`), and a boolean (`true` to return an ordered list, `false` to return an unordered list).
++
++Use this method when you want to control the start level, end level, or list type independently from the table of contents settings in your site configuration.
++
++```go-html-template
++{{ $startLevel := 2 }}
++{{ $endLevel := 3 }}
++{{ $ordered := true }}
++{{ .Fragments.ToHTML $startLevel $endLevel $ordered }}
++```
++
++Hugo renders this to:
++
++```html
++<nav id="TableOfContents">
++  <ol>
++    <li><a href="#section-1">Section 1</a>
++      <ol>
++        <li><a href="#section-11">Section 1.1</a></li>
++        <li><a href="#section-12">Section 1.2</a></li>
++      </ol>
++    </li>
++    <li><a href="#section-2">Section 2</a></li>
++  </ol>
++</nav>
++```
++
++{{% note %}}
++It is safe to use the `Fragments` methods within a render hook, even for the current page.
++
++When using the `Fragments` methods within a shortcode, call the shortcode using the `{{</* */>}}` notation. If you use the `{{%/* */%}}` notation, the rendered shortcode is included in the creation of the fragments map, resulting in a circular loop.
++{{% /note %}}
++
++[atx]: https://spec.commonmark.org/0.30/#atx-headings
++[fragment]: /getting-started/glossary/#fragment
++[markdown attribute]: /getting-started/glossary/#markdown-attribute
++[setext]: https://spec.commonmark.org/0.30/#setext-headings
++[table of contents]: /methods/page/tableofcontents
++[walking]: /getting-started/glossary/#walk
++[`tableofcontents`]: /methods/page/tableofcontents
++[render hook]: /getting-started/glossary/#render-hook
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..600ad48d50e26d93b8279c87ed30a3a42a97bffd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++---
++title: FuzzyWordCount
++description: Returns the number of words in the content of the given page, rounded up to the nearest multiple of 100. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/WordCount
++    - methods/page/ReadingTime
++  returnType: int
++  signatures: [PAGE.FuzzyWordCount]
++---
++
++```go-html-template
++{{ .FuzzyWordCount }} → 200
++```
++
++To get the exact word count, use the [`WordCount`] method.
++
++[`WordCount`]: /methods/page/wordcount
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ed072932a23eb7dc5b45f893b812adf6af7abdb0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,65 @@@
++---
++title: GetPage
++description: Returns a Page object from the given path. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/site/GetPage
++  returnType: hugolib.pageState
++  signatures: [PAGE.GetPage PATH]
++aliases: [/functions/getpage]
++---
++
++The `GetPage` method is also available on a `Site` object. See&nbsp;[details].
++
++[details]: /methods/site/getpage
++
++When using the `GetPage` method on the `Page` object, specify a path relative to the current directory or relative to the content directory.
++
++If Hugo cannot resolve the path to a page, the method returns nil. If the path is ambiguous, Hugo throws an error and fails the build.
++
++Consider this content structure:
++
++```text
++content/
++├── works/
++│   ├── paintings/
++│   │   ├── _index.md
++│   │   ├── starry-night.md
++│   │   └── the-mona-lisa.md
++│   ├── sculptures/
++│   │   ├── _index.md
++│   │   ├── david.md
++│   │   └── the-thinker.md
++│   └── _index.md
++└── _index.md
++```
++
++The examples below depict the result of rendering works/paintings/the-mona-list.md with a single page template:
++
++```go-html-template
++{{ with .GetPage "starry-night" }}
++  {{ .Title }} → Starry Night
++{{ end }}
++
++{{ with .GetPage "./starry-night" }}
++  {{ .Title }} → Starry Night
++{{ end }}
++
++{{ with .GetPage "../paintings/starry-night" }}
++  {{ .Title }} → Starry Night
++{{ end }}
++
++{{ with .GetPage "/works/paintings/starry-night" }}
++  {{ .Title }} → Starry Night
++{{ end }}
++
++{{ with .GetPage "../sculptures/david" }}
++  {{ .Title }} → David
++{{ end }}
++
++{{ with .GetPage "/works/sculptures/david" }}
++  {{ .Title }} → David
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3020e4c2edb97c5de37426e685782f6f63b67a90
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,41 @@@
++---
++title: GetTerms
++description: Returns a collection of term pages for terms defined on the given page in the given taxonomy, ordered according to the sequence in which they appear in front matter.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.Pages
++  signatures: [PAGE.GetTerms TAXONOMY]
++---
++
++Given this front matter:
++
++{{< code-toggle file=content/books/les-miserables.md fm=true >}}
++title = 'Les Misérables'
++tags = ['historical','classic','fiction']
++{{< /code-toggle >}}
++
++This template code:
++
++```go-html-template
++{{ with .GetTerms "tags" }}
++  <p>Tags</p>
++  <ul>
++    {{ range . }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++Is rendered to:
++
++```html
++<p>Tags</p>
++<ul>
++  <li><a href="/tags/historical/">historical</a></li>
++  <li><a href="/tags/classic/">classic</a></li>
++  <li><a href="/tags/fiction/">fiction</a></li>
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..88137614ca615e71a94b763d8d94d24e0e6c4d36
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,130 @@@
++---
++title: GitInfo
++description: Returns Git information related to the last commit of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/CodeOwners
++  returnType: source.GitInfo
++  signatures: [PAGE.GitInfo]
++toc: true
++---
++
++The `GitInfo` method on a `Page` object returns an object with additional methods.
++
++{{% note %}}
++Hugo's Git integration is performant, but may increase build times on large sites.
++{{% /note %}}
++
++## Prerequisites
++
++Install [Git], create a repository, and commit your project files.
++
++You must also allow Hugo to access your repository. In your site configuration:
++
++{{< code-toggle file=hugo >}}
++enableGitInfo = true
++{{< /code-toggle >}}
++
++Alternatively, use the command line flag when building your site:
++
++```sh
++hugo --enableGitInfo
++```
++
++{{% note %}}
++When you set `enableGitInto` to `true`, or enable the feature with the command line flag, the last modification date for each content page will be the Author Date of the last commit for that file.
++
++This is configurable. See&nbsp;[details].
++
++[details]: /getting-started/configuration/#configure-dates
++{{% /note %}}
++
++## Methods
++
++AbbreviatedHash
++: (`string`) The abbreviated commit hash.
++
++```go-html-template
++{{ with .GitInfo }}
++  {{ .AbbreviatedHash }} → aab9ec0b3
++{{ end }}
++```
++
++AuthorDate
++: (`time.Time`) The author date.
++
++```go-html-template
++{{ with .GitInfo }}
++  {{ .AuthorDate.Format "2006-01-02" }} → 2023-10-09
++{{ end }}
++```
++
++AuthorEmail
++: (`string`) The author's email address, respecting [gitmailmap].
++
++```go-html-template
++{{ with .GitInfo }}
++  {{ .AuthorEmail }} → jsmith@example.org
++{{ end }}
++```
++
++AuthorName
++: (`string`) The author's name, respecting [gitmailmap].
++
++```go-html-template
++{{ with .GitInfo }}
++  {{ .AuthorName }} → John Smith
++{{ end }}
++```
++
++Hash
++: (`string`) The commit hash.
++
++```go-html-template
++{{ with .GitInfo }}
++  {{ .Hash }} → aab9ec0b31ebac916a1468c4c9c305f2bebf78d4
++{{ end }}
++```
++
++Subject
++: (`string`) The commit message subject.
++
++```go-html-template
++{{ with .GitInfo }}
++  {{ .Subject }} → Add tutorials
++{{ end }}
++```
++
++## Last modified date
++
++By default, when `enableGitInfo` is `true`, the `Lastmod` method on a `Page` object returns the Git AuthorDate of the last commit that included the file.
++
++You can change this behavior in your [site configuration].
++
++[git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
++[gitmailmap]: https://git-scm.com/docs/gitmailmap
++[site configuration]: /getting-started/configuration/#configure-front-matter
++
++## Hosting considerations
++
++When hosting your site in a CI/CD environment, the step that clones your project repository must perform a deep clone. If the clone is shallow, the Git information for a given file may not be accurate---it may reflect the most recent repository commit, not the commit that last modified the file.
++
++Some providers perform deep clones by default, others allow you to configure the clone depth, and some providers only perform shallow clones.
++
++Hosting service | Default clone depth | Configurable
++:-- | :-- | :--
++Cloudflare Pages | Shallow | Yes [^CFP]
++DigitalOcean App Platform | Deep | N/A
++GitHub Pages | Shallow | Yes [^GHP]
++GitLab Pages | Shallow | Yes [^GLP]
++Netlify | Deep | N/A
++Render | Shallow | No
++Vercel | Shallow | No
++
++[^CFP]: To configure a Cloudflare Pages site for deep cloning, preface the site's normal Hugo build command with `git fetch --unshallow &&` (*e.g.*, `git fetch --unshallow && hugo`).
++
++[^GHP]: You can configure the GitHub Action to do a deep clone by specifying `fetch-depth: 0` in the applicable "checkout" step of your workflow file, as shown in the Hugo documentation's [example workflow file](/hosting-and-deployment/hosting-on-github/#procedure).
++
++[^GLP]: You can configure the GitLab Runner's clone depth [as explained in the GitLab documentation](https://docs.gitlab.com/ee/ci/large_repositories/#shallow-cloning); see also the Hugo documentation's [example workflow file](/hosting-and-deployment/hosting-on-gitlab/#configure-gitlab-cicd).
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..68b645905ea8639331ab25ea3ef91a54cc03d260
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++---
++title: HasMenuCurrent
++description: Reports whether the given page object matches the page object associated with one of the child menu entries under the given menu entry in the given menu.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/IsMenuCurrent
++  returnType: bool
++  signatures: [PAGE.HasMenuCurrent MENU MENUENTRY]
++aliases: [/functions/hasmenucurrent]
++---
++
++If the page object associated with the menu entry is a section, this method also returns `true` for any descendant of that section.
++
++```go-html-template
++{{ $currentPage := . }}
++{{ range site.Menus.main }}
++  {{ if $currentPage.IsMenuCurrent .Menu . }}
++    <a class="active" aria-current="page" href="{{ .URL }}">{{ .Name }}</a>
++  {{ else if $currentPage.HasMenuCurrent .Menu . }}
++    <a class="ancestor" aria-current="true" href="{{ .URL }}">{{ .Name }}</a>
++  {{ else }}
++    <a href="{{ .URL }}">{{ .Name }}</a>
++  {{ end }}
++{{ end }}
++```
++
++See [menu templates] for a complete example.
++
++[menu templates]: /templates/menu-templates/#example
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..81268ecba2359b68f44ac05023b0daac4f3f0bb7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,50 @@@
++---
++title: HasShortcode
++description: Reports whether the given shortcode is called by the given page.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: bool
++  signatures: [PAGE.HasShortcode NAME]
++---
++
++By example, let's use [MathJax] to render a LaTeX mathematical expression:
++
++[MathJax]: https://www.mathjax.org/
++
++{{< code file=contents/physics/lesson-1.md lang=markdown >}}
++Albert Einstein’s theory of special relativity expresses
++the fact that mass and energy are the same physical entity
++and can be changed into each other.
++
++{{</* math */>}}
++$$
++E=mc^2
++$$
++{{</* /math */>}}
++
++In the equation, the increased relativistic mass (m) of a
++body times the speed of light squared (c2) is equal to
++the kinetic energy (E) of that body.
++{{< /code >}}
++
++The shortcode is simple:
++
++{{< code file=layouts/shortcodes/math.html  >}}
++{{ trim .Inner "\r\n" }}
++{{< /code >}}
++
++Now we can selectively load the required CSS and JavaScript on pages that call the "math" shortcode:
++
++
++{{< code file=layouts/baseof.html  >}}
++<head>
++  ...
++  {{ if .HasShortcode "math" }}
++    <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
++    <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
++  {{ end }}
++  ...
++</head>
++{{< /code >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a39c48da1ffd305ac0dfe7a4b07c24b97bd1d572
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,18 @@@
++---
++title: HeadingsFiltered
++description: Returns a slice of headings for each page related to the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/Related
++    - methods/page/Fragments
++  returnType: tableofcontents.Headings
++  signatures: [PAGE.HeadingsFiltered]
++---
++
++Use in conjunction with the [`Related`] method on a [`Pages`] object. See&nbsp;[details].
++
++[`Pages`]: /methods/pages/
++[`Related`]: /methods/pages/related
++[details]: /content-management/related/#index-content-headings-in-related-content
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b98fbc808c58c878d09e86f7278a78350b244c9e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,102 @@@
++---
++title: InSection
++description: Reports whether the given page is in the given section.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Ancestors
++    - methods/page/CurrentSection
++    - methods/page/FirstSection
++    - methods/page/IsAncestor
++    - methods/page/IsDescendant
++    - methods/page/Parent
++    - methods/page/Sections
++  returnType: bool
++  signatures: [PAGE.InSection SECTION]
++toc: true
++---
++
++The `InSection` method on a page object reports whether the given page is in the given section. Note that the method returns `true` when comparing a page to a sibling.
++
++{{% include "methods/page/_common/definition-of-section.md" %}}
++
++With this content structure:
++
++```text
++content/
++├── auctions/
++│   ├── 2023-11/
++│   │   ├── _index.md
++│   │   ├── auction-1.md
++│   │   └── auction-2.md
++│   ├── 2023-12/
++│   │   ├── _index.md
++│   │   ├── auction-3.md
++│   │   └── auction-4.md
++│   ├── _index.md
++│   ├── bidding.md
++│   └── payment.md
++└── _index.md
++```
++
++When rendering the "auction-1" page:
++
++```go-html-template
++{{ with .Site.GetPage "/" }}
++  {{ $.InSection . }} → false
++{{ end }}
++
++{{ with .Site.GetPage "/auctions" }}
++  {{ $.InSection . }} → false
++{{ end }}
++
++{{ with .Site.GetPage "/auctions/2023-11" }}
++  {{ $.InSection . }} → true
++{{ end }}
++
++{{ with .Site.GetPage "/auctions/2023-11/auction-2" }}
++  {{ $.InSection . }} → true
++{{ end }}
++```
++
++In the examples above we are coding defensively using the [`with`] statement, returning nothing if the page does not exist. By adding an [`else`] clause we can do some error reporting:
++
++```go-html-template
++{{ $path := "/auctions/2023-11" }}
++{{ with .Site.GetPage $path }}
++  {{ $.InSection . }} → true
++{{ else }}
++  {{ errorf "Unable to find the section with path %s" $path }}
++{{ end }}
++  ```
++
++## Understanding context
++
++Inside of the `with` block, the [context] (the dot) is the section `Page` object, not the `Page` object passed into the template. If we were to use this syntax:
++
++```go-html-template
++{{ with .Site.GetPage "/auctions" }}
++  {{ .InSection . }} → true
++{{ end }}
++```
++
++The result would be wrong when rendering the "auction-1" page because we are comparing the section page to itself.
++
++{{% note %}}
++Use the `$` to get the context passed into the template.
++{{% /note %}}
++
++```go-html-template
++{{ with .Site.GetPage "/auctions" }}
++  {{ $.InSection . }} → true
++{{ end }}
++```
++
++{{% note %}}
++Gaining a thorough understanding of context is critical for anyone writing template code.
++{{% /note %}}
++
++[context]: /getting-started/glossary/#context
++[`with`]: /functions/go-template/with
++[`else`]: /functions/go-template/else
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ca23c0868cc67feab7482395338ca1de7112c541
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,100 @@@
++---
++title: IsAncestor
++description: Reports whether PAGE1 in an ancestor of PAGE2.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Ancestors
++    - methods/page/CurrentSection
++    - methods/page/FirstSection
++    - methods/page/InSection
++    - methods/page/IsDescendant
++    - methods/page/Parent
++    - methods/page/Sections
++  returnType: bool
++  signatures: [PAGE1.IsAncestor PAGE2]
++toc: true
++---
++
++{{% include "methods/page/_common/definition-of-section.md" %}}
++
++With this content structure:
++
++```text
++content/
++├── auctions/
++│   ├── 2023-11/
++│   │   ├── _index.md
++│   │   ├── auction-1.md
++│   │   └── auction-2.md
++│   ├── 2023-12/
++│   │   ├── _index.md
++│   │   ├── auction-3.md
++│   │   └── auction-4.md
++│   ├── _index.md
++│   ├── bidding.md
++│   └── payment.md
++└── _index.md
++```
++
++When rendering the "auctions" page:
++
++```go-html-template
++{{ with .Site.GetPage "/" }}
++  {{ $.IsAncestor . }} → false
++{{ end }}
++
++{{ with .Site.GetPage "/auctions" }}
++  {{ $.IsAncestor . }} → false
++{{ end }}
++
++{{ with .Site.GetPage "/auctions/2023-11" }}
++  {{ $.IsAncestor . }} → true
++{{ end }}
++
++{{ with .Site.GetPage "/auctions/2023-11/auction-2" }}
++  {{ $.IsAncestor . }} → true
++{{ end }}
++```
++
++In the examples above we are coding defensively using the [`with`] statement, returning nothing if the page does not exist. By adding an [`else`] clause we can do some error reporting:
++
++```go-html-template
++{{ $path := "/auctions/2023-11" }}
++{{ with .Site.GetPage $path }}
++  {{ $.IsAncestor . }} → true
++{{ else }}
++  {{ errorf "Unable to find the section with path %s" $path }}
++{{ end }}
++  ```
++
++## Understanding context
++
++Inside of the `with` block, the [context] (the dot) is the section `Page` object, not the `Page` object passed into the template. If we were to use this syntax:
++
++```go-html-template
++{{ with .Site.GetPage "/auctions" }}
++  {{ .IsAncestor . }} → true
++{{ end }}
++```
++
++The result would be wrong when rendering the "auction-1" page because we are comparing the section page to itself.
++
++{{% note %}}
++Use the `$` to get the context passed into the template.
++{{% /note %}}
++
++```go-html-template
++{{ with .Site.GetPage "/auctions" }}
++  {{ $.IsAncestor . }} → true
++{{ end }}
++```
++
++{{% note %}}
++Gaining a thorough understanding of context is critical for anyone writing template code.
++{{% /note %}}
++
++[context]: /getting-started/glossary/#context
++[`with`]: /functions/go-template/with
++[`else`]: /functions/go-template/else
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f1042564e40bad1ec5e73d0a2a750d0966f2cc93
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,99 @@@
++---
++title: IsDescendant
++description: Reports whether PAGE1 in a descendant of PAGE2.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Ancestors
++    - methods/page/CurrentSection
++    - methods/page/FirstSection
++    - methods/page/InSection
++    - methods/page/IsAncestor
++    - methods/page/Parent
++    - methods/page/Sections
++  returnType: bool
++  signatures: [PAGE1.IsDescendant PAGE2]
++---
++
++{{% include "methods/page/_common/definition-of-section.md" %}}
++
++With this content structure:
++
++```text
++content/
++├── auctions/
++│   ├── 2023-11/
++│   │   ├── _index.md
++│   │   ├── auction-1.md
++│   │   └── auction-2.md
++│   ├── 2023-12/
++│   │   ├── _index.md
++│   │   ├── auction-3.md
++│   │   └── auction-4.md
++│   ├── _index.md
++│   ├── bidding.md
++│   └── payment.md
++└── _index.md
++```
++
++When rendering the "auctions" page:
++
++```go-html-template
++{{ with .Site.GetPage "/" }}
++  {{ $.IsDescendant . }} → true
++{{ end }}
++
++{{ with .Site.GetPage "/auctions" }}
++  {{ $.IsDescendant . }} → false
++{{ end }}
++
++{{ with .Site.GetPage "/auctions/2023-11" }}
++  {{ $.IsDescendant . }} → false
++{{ end }}
++
++{{ with .Site.GetPage "/auctions/2023-11/auction-2" }}
++  {{ $.IsDescendant . }} → false
++{{ end }}
++```
++
++In the examples above we are coding defensively using the [`with`] statement, returning nothing if the page does not exist. By adding an [`else`] clause we can do some error reporting:
++
++```go-html-template
++{{ $path := "/auctions/2023-11" }}
++{{ with .Site.GetPage $path }}
++  {{ $.IsDescendant . }} → true
++{{ else }}
++  {{ errorf "Unable to find the section with path %s" $path }}
++{{ end }}
++  ```
++
++## Understanding context
++
++Inside of the `with` block, the [context] (the dot) is the section `Page` object, not the `Page` object passed into the template. If we were to use this syntax:
++
++```go-html-template
++{{ with .Site.GetPage "/auctions" }}
++  {{ .IsDescendant . }} → true
++{{ end }}
++```
++
++The result would be wrong when rendering the "auction-1" page because we are comparing the section page to itself.
++
++{{% note %}}
++Use the `$` to get the context passed into the template.
++{{% /note %}}
++
++```go-html-template
++{{ with .Site.GetPage "/auctions" }}
++  {{ $.IsDescendant . }} → true
++{{ end }}
++```
++
++{{% note %}}
++Gaining a thorough understanding of context is critical for anyone writing template code.
++{{% /note %}}
++
++[context]: /getting-started/glossary/#context
++[`with`]: /functions/go-template/with
++[`else`]: /functions/go-template/else
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b688f88c0e6f1479ed537d87c66c2a33f74b52d8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++---
++title: IsHome
++description: Reports whether the given page is the home page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/IsNode
++    - methods/page/IsPage
++    - methods/page/IsSection
++  returnType: bool
++  signatures: [PAGE.IsHome]
++---
++
++The `IsHome` method on a `Page` object returns `true` if the [page kind] is `home`.
++
++```text
++content/
++├── books/
++│   ├── book-1/
++│   │   └── index.md  <-- kind = page
++│   ├── book-2.md     <-- kind = page
++│   └── _index.md     <-- kind = section
++└── _index.md         <-- kind = home
++```
++
++```go-html-template
++{{ .IsHome }}
++```
++
++[page kind]: /getting-started/glossary/#page-kind
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..61283fd8ba184430a5b702adb351a73ed17a0e7e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,29 @@@
++---
++title: IsMenuCurrent
++description: Reports whether the given page object matches the page object associated with the given menu entry in the given menu.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/HasMenuCurrent
++  returnType: bool
++  signatures: [PAGE.IsMenuCurrent MENU MENUENTRY]
++aliases: [/functions/ismenucurrent]
++---
++
++```go-html-template
++{{ $currentPage := . }}
++{{ range site.Menus.main }}
++  {{ if $currentPage.IsMenuCurrent .Menu . }}
++    <a class="active" aria-current="page" href="{{ .URL }}">{{ .Name }}</a>
++  {{ else if $currentPage.HasMenuCurrent .Menu . }}
++    <a class="ancestor" aria-current="true" href="{{ .URL }}">{{ .Name }}</a>
++  {{ else }}
++    <a href="{{ .URL }}">{{ .Name }}</a>
++  {{ end }}
++{{ end }}
++```
++
++See [menu templates] for a complete example.
++
++[menu templates]: /templates/menu-templates/#example
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..dfdf435c50da9843685ea1b4cad0feb27c76c8f7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: IsNode
++description: Reports whether the given page is a node.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/IsHome
++    - methods/page/IsPage
++    - methods/page/IsSection
++  returnType: bool
++  signatures: [PAGE.IsNode]
++---
++
++The `IsNode` method on a `Page` object returns `true` if the [page kind] is `home`, `section`, `taxonomy`, or `term`.
++
++It returns `false` is the page kind is `page`.
++
++```text
++content/
++├── books/
++│   ├── book-1/
++│   │   └── index.md    <-- kind = page, node = false
++│   ├── book-2.md       <-- kind = page, node = false
++│   └── _index.md       <-- kind = section, node = true
++├── tags/
++│   ├── fiction/
++│   │   └── _index.md   <-- kind = term, node = true
++│   └── _index.md       <-- kind = taxonomy, node = true
++└── _index.md           <-- kind = home, node = true
++```
++
++```go-html-template
++{{ .IsNode }}
++```
++[page kind]: /getting-started/glossary/#page-kind
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..672ee61f47e8a8c003674cbeb05acedbdbc1d724
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++---
++title: IsPage
++description: Reports whether the given page is a regular page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/IsHome
++    - methods/page/IsNode
++    - methods/page/IsSection
++  returnType: bool
++  signatures: [PAGE.IsPage]
++---
++
++The `IsPage` method on a `Page` object returns `true` if the [page kind] is `page`.
++
++```text
++content/
++├── books/
++│   ├── book-1/
++│   │   └── index.md  <-- kind = page
++│   ├── book-2.md     <-- kind = page
++│   └── _index.md     <-- kind = section
++└── _index.md         <-- kind = home
++```
++
++```go-html-template
++{{ .IsPage }}
++```
++
++[page kind]: /getting-started/glossary/#page-kind
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b02e58a4521d453f50d6f7325808521afacd7684
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++---
++title: IsSection
++description: Reports whether the given page is a section page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/IsHome
++    - methods/page/IsNode
++    - methods/page/IsPage
++  returnType: bool
++  signatures: [PAGE.IsSection]
++---
++
++The `IsSection` method on a `Page` object returns `true` if the [page kind] is `section`.
++
++```text
++content/
++├── books/
++│   ├── book-1/
++│   │   └── index.md  <-- kind = page
++│   ├── book-2.md     <-- kind = page
++│   └── _index.md     <-- kind = section
++└── _index.md         <-- kind = home
++```
++
++```go-html-template
++{{ .IsSection }}
++```
++
++[page kind]: /getting-started/glossary/#page-kind
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6a8f3f69e03e82eba9682b43deaf381817b792a9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,59 @@@
++---
++title: IsTranslated
++description: Reports whether the given page has one or more translations.
++categories: []
++keywords: []
++action:
++  related:
++   - methods/page/Translations
++   - methods/page/AllTranslations
++   - methods/page/TranslationKey
++  returnType: bool
++  signatures: [PAGE.IsTranslated]
++---
++
++With this site configuration:
++
++{{< code-toggle file=hugo >}}
++defaultContentLanguage = 'en'
++
++[languages.en]
++contentDir = 'content/en'
++languageCode = 'en-US'
++languageName = 'English'
++weight = 1
++
++[languages.de]
++contentDir = 'content/de'
++languageCode = 'de-DE'
++languageName = 'Deutsch'
++weight = 2
++{{< /code-toggle >}}
++
++And this content:
++
++```text
++content/
++├── de/
++│   ├── books/
++│   │   └── book-1.md
++│   └── _index.md
++├── en/
++│   ├── books/
++│   │   ├── book-1.md
++│   │   └── book-2.md
++│   └── _index.md
++└── _index.md
++```
++
++When rendering content/en/books/book-1.md:
++
++```go-html-template
++{{ .IsTranslated }} → true
++```
++
++When rendering content/en/books/book-2.md:
++
++```go-html-template
++{{ .IsTranslated }} → false
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5ad37ce51e6767a4aeb7d00f48bfb54b06dda06b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,46 @@@
++---
++title: Keywords
++description: Returns a slice of keywords as defined in front matter.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: '[]string'
++  signatures: [PAGE.Keywords]
++---
++
++By default, Hugo evaluates the keywords when creating collections of [related content].
++
++[related content]: /content-management/related
++
++{{< code-toggle file=content/recipes/sushi.md fm=true >}}
++title = 'How to make spicy tuna hand rolls'
++keywords = ['tuna','sriracha','nori','rice']
++{{< /code-toggle >}}
++
++To list the keywords within a template:
++
++```go-html-template
++{{ range .Keywords }}
++  {{ . }}
++{{ end }}
++```
++
++Or use the [delimit] function:
++
++```go-html-template
++{{ delimit .Keywords ", " ", and " }} → tuna, sriracha, nori, and rice
++```
++
++[delimit]: /functions/collections/delimit
++
++Keywords are also a useful [taxonomy]:
++
++{{< code-toggle file=hugo >}}
++[taxonomies]
++tag = 'tags'
++keyword = 'keywords'
++category = 'categories'
++{{< /code-toggle >}}
++
++[taxonomy]: /content-management/taxonomies
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d901e9a7d395b9b7f17408984a5f3006cf7279c5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,35 @@@
++---
++title: Kind
++description: Returns the kind of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Type
++  returnType: string
++  signatures: [PAGE.Kind]
++---
++
++The [page kind] is one of `home`, `page`, `section`, `taxonomy`, or `term`.
++
++```text
++content/
++├── books/
++│   ├── book-1/
++│   │   └── index.md    <-- kind = page
++│   ├── book-2.md       <-- kind = page
++│   └── _index.md       <-- kind = section
++├── tags/
++│   ├── fiction/
++│   │   └── _index.md   <-- kind = term
++│   └── _index.md       <-- kind = taxonomy
++└── _index.md           <-- kind = home
++```
++
++To get the value within a template:
++
++```go-html-template
++{{ .Kind }}
++```
++
++[page kind]: /getting-started/glossary/#page-kind
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4e65107da0c94bcc3345c2f27e2c8af4aee6a2bb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,65 @@@
++---
++title: Language
++description: Returns the language object for the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/site/Language
++  returnType: langs.Language
++  signatures: [PAGE.Language]
++---
++
++The `Language` method on a `Page` object returns the language object for the given page. The language object points to the language definition in the site configuration.
++
++You can also use the `Language` method on a `Site` object. See&nbsp;[details].
++
++## Methods
++
++The examples below assume the following in your site configuration:
++
++{{< code-toggle file=hugo >}}
++[languages.de]
++languageCode = 'de-DE'
++languageDirection = 'ltr'
++languageName = 'Deutsch'
++weight = 2
++{{< /code-toggle >}}
++
++Lang
++: (`string`) The language tag as defined by [RFC 5646].
++
++```go-html-template
++{{ .Language.Lang }} → de
++```
++
++LanguageCode
++: (`string`) The language code from the site configuration.
++
++```go-html-template
++{{ .Language.LanguageCode }} → de-DE
++```
++
++LanguageDirection
++: (`string`) The language direction from the site configuration, either `ltr` or `rtl`.
++
++```go-html-template
++{{ .Language.LanguageDirection }} → ltr
++```
++
++LanguageName
++: (`string`) The language name from the site configuration.
++
++```go-html-template
++{{ .Language.LanguageName }} → Deutsch
++```
++
++Weight
++: (`int`) The language weight from the site configuration which determines its order in the slice of languages returned by the `Languages` method on a `Site` object.
++
++```go-html-template
++{{ .Language.Weight }} → 2
++```
++
++[details]: /methods/site/language
++[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c1692233d4b5e5df590a23c20769ad7eeb00d228
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,40 @@@
++---
++title: Lastmod
++description: Returns the last modification date of the given page. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Date
++    - methods/page/ExpiryDate
++    - methods/page/PublishDate
++    - methods/page/GitInfo
++  returnType: time.Time
++  signatures: [PAGE.Lastmod]
++---
++
++Set the last modification date in front matter:
++
++{{< code-toggle file=content/news/article-1.md fm=true >}}
++title = 'Article 1'
++lastmod = 2023-10-19T00:40:04-07:00
++{{< /code-toggle >}}
++
++The last modification date is a [time.Time] value. Format and localize the value with the [`time.Format`] function, or use it with any of the [time methods].
++
++```go-html-template
++{{ .Lastmod | time.Format ":date_medium" }} → Oct 19, 2023
++```
++
++In the example above we explicitly set the last modification date in front matter. With Hugo's default configuration, the `Lastmod` method returns the front matter value. This behavior is configurable, allowing you to:
++
++- Set the last modification date to the Author Date of the last Git commit for that file. See [`GitInfo`] for details.
++- Set fallback values if the last modification date is not defined in front matter.
++
++Learn more about [date configuration].
++
++[`gitinfo`]: /methods/page/gitinfo
++[`time.format`]: /functions/time/format
++[date configuration]: /getting-started/configuration/#configure-dates
++[time methods]: /methods/time
++[time.time]: https://pkg.go.dev/time#time
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3d0cdc43769341a0f0436c2e75ed23cc533715ca
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,40 @@@
++---
++title: Layout
++description: Returns the layout for the given page as defined in front matter.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Type
++  returnType: string
++  signatures: [PAGE.Layout]
++---
++
++Specify the `layout` field in front matter to target a particular template. See&nbsp;[details].
++
++[details]: /templates/lookup-order/#target-a-template
++
++{{< code-toggle file=content/contact.md >}}
++title = 'Contact'
++layout = 'contact'
++{{< /code-toggle >}}
++
++Hugo will render the page using contact.html.
++
++```text
++layouts/
++└── _default/
++    ├── baseof.html
++    ├── contact.html
++    ├── home.html
++    ├── list.html
++    └── single.html
++```
++
++Although rarely used within a template, you can access the value with:
++
++```go-html-template
++{{ .Layout }}
++```
++
++The `Layout` method returns an empty string if the `layout` field in front matter is not defined.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d4270bda3d737fad1915ec82067af0cad7ad5d91
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++---
++title: Len
++description: Returns the length, in bytes, of the rendered content of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Content
++  returnType: int
++  signatures: [PAGE.Len]
++---
++
++```go-html-template
++{{ .Len }} → 42
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..746e433bb8082af853a29a1cdde940f0de0c1bae
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++---
++title: LinkTitle
++description: Returns the link title of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Title
++  returnType: string
++  signatures: [PAGE.LinkTitle]
++---
++
++The `LinkTitle` method returns the `linkTitle` field as defined in front matter, falling back to the value returned by the [`Title`] method.
++
++[`Title`]: /methods/page/title
++
++{{< code-toggle file=content/articles/healthy-desserts.md fm=true >}}
++title = 'Seventeen delightful recipes for healthy desserts'
++linkTitle = 'Dessert recipes'
++{{< /code-toggle >}}
++
++```go-html-template
++{{ .LinkTitle }} → Dessert recipes
++```
++
++As demonstrated above, defining a link title in front matter is advantageous when the page title is long. Use it when generating anchor elements in your templates:
++
++```go-html-template
++<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3c9e3495acc1581806633bd71de258974cf74d6f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,53 @@@
++---
++title: Next
++description: Returns the next page in a global page collection, relative to the given page. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Prev
++    - methods/page/NextInSection
++    - methods/page/PrevInSection
++    - methods/pages/Next
++    - methods/pages/Prev
++  returnType: hugolib.pageState
++  signatures: [PAGE.Next]
++toc: true
++---
++
++The behavior of the `Prev` and `Next` methods on a `Page` object is probably the reverse of what you expect.
++
++With this content structure:
++
++```text
++content/
++├── pages/
++│   ├── _index.md
++│   ├── page-1.md   <-- front matter: weight = 10
++│   ├── page-2.md   <-- front matter: weight = 20
++│   └── page-3.md   <-- front matter: weight = 30
++└── _index.md
++```
++
++When you visit page-2:
++
++- The `Prev` method points to page-3
++- The `Next` method points to page-1
++
++{{% note %}}
++Use the opposite label in your navigation links as shown in the example below.
++{{% /note %}}
++
++```go-html-template
++{{ with .Next }}
++  <a href="{{ .RelPermalink }}">Prev</a>
++{{ end }}
++
++{{ with .Prev }}
++  <a href="{{ .RelPermalink }}">Next</a>
++{{ end }}
++```
++
++## Compare to Pages methods
++
++{{% include "methods/_common/next-prev-on-page-vs-next-prev-on-pages.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b48ddcc624404b101da3c524714bb3a2b5cc9be0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,71 @@@
++---
++title: NextInSection
++description: Returns the next page within a section, relative to the given page. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/PrevInSection
++    - methods/page/Next
++    - methods/page/Prev
++    - methods/pages/Next
++    - methods/pages/Prev
++  returnType: hugolib.pageState
++  signatures: [PAGE.NextInSection]
++---
++
++The behavior of the `PrevInSection` and `NextInSection` methods on a `Page` object is probably the reverse of what you expect.
++
++With this content structure:
++
++```text
++content/
++├── books/
++│   ├── _index.md
++│   ├── book-1.md
++│   ├── book-2.md
++│   └── book-3.md
++├── films/
++│   ├── _index.md
++│   ├── film-1.md
++│   ├── film-2.md
++│   └── film-3.md
++└── _index.md
++```
++
++When you visit book-2:
++
++- The `PrevInSection` method points to book-3
++- The `NextInSection` method points to book-1
++
++{{% note %}}
++Use the opposite label in your navigation links as shown in the example below.
++{{% /note %}}
++
++```go-html-template
++{{ with .NextInSection }}
++  <a href="{{ .RelPermalink }}">Previous in section</a>
++{{ end }}
++
++{{ with .PrevInSection }}
++  <a href="{{ .RelPermalink }}">Next in section</a>
++{{ end }}
++```
++
++{{% note %}}
++The navigation sort order may be different than the page collection sort order.
++{{% /note %}}
++
++With the `PrevInSection` and `NextInSection` methods, the navigation sort order is fixed, using Hugo’s default sort order. In order of precedence:
++
++1. Page [weight]
++2. Page [date] (descending)
++3. Page [linkTitle], falling back to page [title]
++4. Page file path if the page is backed by a file
++
++For example, with a page collection sorted by title, the navigation sort order will use Hugo’s default sort order. This is probably not what you want or expect. For this reason, the Next and Prev methods on a Pages object are generally a better choice.
++
++[date]: /methods/page/date
++[weight]: /methods/page/weight
++[linkTitle]: /methods/page/linktitle
++[title]: /methods/page/title
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..03343cf8c078a76dab3ddce09d95634ef7989900
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,40 @@@
++---
++title: OutputFormats
++description: Returns a slice of OutputFormat objects, each representing one of the output formats enabled for the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/AlternativeOutputFormats
++  returnType: '[]OutputFormat'
++  signatures: [PAGE.OutputFormats]
++toc: true
++---
++
++{{% include "methods/page/_common/output-format-definition.md" %}}
++
++The `OutputFormats` method on a `Page` object returns a slice of `OutputFormat` objects, each representing one of the output formats enabled for the given page. See&nbsp;[details](/templates/output-formats/).
++
++## Methods
++
++{{% include "methods/page/_common/output-format-methods.md" %}}
++
++## Example
++
++To link to the RSS feed for the current page:
++
++```go-html-template
++{{ with .OutputFormats.Get "rss" -}}
++  <a href="{{ .RelPermalink }}">RSS Feed</a>
++{{ end }}
++```
++
++On the site's home page, Hugo renders this to:
++
++```html
++<a href="/index.xml">RSS Feed</a>
++```
++
++Please see the [link to output formats] section to understand the importance of the construct above.
++
++[link to output formats]: /templates/output-formats/#link-to-output-formats
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2c0536bee082281a1ae99f5b80337b8a31f65469
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,40 @@@
++---
++title: Page
++description: Returns the Page object of the given page.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: hugolib.pageState
++  signatures: [PAGE.Page]
++---
++
++This is a convenience method, useful within partial templates that are called from both [shortcodes] and page templates.
++
++{{< code file=layouts/shortcodes/foo.html  >}}
++{{ partial "my-partial.html" . }}
++{{< /code >}}
++
++When the shortcode calls the partial, it passes the current [context] (the dot). The context includes identifiers such as `Page`, `Params`, `Inner`, and `Name`.
++
++{{< code file=layouts/_default/single.html  >}}
++{{ partial "my-partial.html" . }}
++{{< /code >}}
++
++When the page template calls the partial, it also passes the current context (the dot). But in this case, the dot _is_ the `Page` object.
++
++{{< code file=layouts/partials/my-partial.html  >}}
++The page title is: {{ .Page.Title }}
++{{< /code >}}
++
++To handle both scenarios, the partial template must be able to access the `Page` object with `Page.Page`.
++
++{{% note %}}
++And yes, that means you can do `.Page.Page.Page.Page.Title` too.
++
++But don't.
++{{% /note %}}
++
++
++[context]: getting-started/glossary/#context
++[shortcodes]: /getting-started/glossary/#shortcode
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2f329eeec6b5301a82b9e1bb70340f2f6b64e357
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,90 @@@
++---
++title: Pages
++description: Returns a collection of regular pages within the current section, and section pages of immediate descendant sections.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/RegularPages
++    - methods/page/RegularPagesRecursive
++  returnType: page.Pages
++  signatures: [PAGE.Pages]
++---
++
++The `Pages` method on a `Page` object is available to these [page kinds]: `home`, `section`, `taxonomy`, and `term`. The templates for these page kinds receive a page [collection] in [context].
++
++Range through the page collection in your template:
++
++```go-html-template
++{{ range .Pages.ByTitle }}
++  <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
++{{ end }}
++```
++
++Consider this content structure:
++
++```text
++content/
++├── lessons/
++│   ├── lesson-1/
++│   │   ├── _index.md
++│   │   ├── part-1.md
++│   │   └── part-2.md
++│   ├── lesson-2/
++│   │   ├── resources/
++│   │   │   ├── task-list.md
++│   │   │   └── worksheet.md
++│   │   ├── _index.md
++│   │   ├── part-1.md
++│   │   └── part-2.md
++│   ├── _index.md
++│   ├── grading-policy.md
++│   └── lesson-plan.md
++├── _index.md
++├── contact.md
++└── legal.md
++```
++
++When rendering the home page, the `Pages` method returns:
++
++    contact.md
++    legal.md
++    lessons/_index.md
++
++When rendering the lessons page, the `Pages` method returns:
++
++    lessons/grading-policy.md
++    lessons/lesson-plan.md
++    lessons/lesson-1/_index.md
++    lessons/lesson-2/_index.md
++
++When rendering lesson-1, the `Pages` method returns:
++
++    lessons/lesson-1/part-1.md
++    lessons/lesson-1/part-2.md
++
++When rendering lesson-2, the `Pages` method returns:
++
++    lessons/lesson-2/part-1.md
++    lessons/lesson-2/part-2.md
++    lessons/lesson-2/resources/task-list.md
++    lessons/lesson-2/resources/worksheet.md
++
++In the last example, the collection includes pages in the resources subdirectory. That directory is not a [section]---it does not contain an _index.md file. Its contents are part of the lesson-2 section.
++
++{{% note %}}
++When used with a `Site` object, the `Pages` method recursively returns all pages within the site. See&nbsp;[details].
++
++[details]: /methods/site/pages
++{{% /note %}}
++
++```go-html-template
++{{ range .Site.Pages.ByTitle }}
++  <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
++{{ end }}
++```
++
++[collection]: /getting-started/glossary/#collection
++[context]: /getting-started/glossary/#context
++[page kinds]: /getting-started/glossary/#page-kind
++[section]: /getting-started/glossary/#section
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6b43b99ddc3af8d47439e60fa95af02162af490d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,50 @@@
++---
++title: Paginate
++description: Paginates a collection of pages.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Paginator
++  returnType: page.Pager
++  signatures: ['PAGE.Paginate COLLECTION [N]']
++---
++
++[Pagination] is the process of splitting a list page into two or more pagers, where each pager contains a subset of the page collection and navigation links to other pagers.
++
++By default, the number of elements on each pager is determined by the value of the `paginate` setting in your site configuration. The default value is `10`. Override the value in your site configuration by providing a second argument, an integer, when calling the `Paginate` method.
++
++{{% note %}}
++There is also a `Paginator` method on `Page` objects, but it can neither filter nor sort the page collection.
++
++The `Paginate` method is more flexible.
++{{% /note %}}
++
++You can invoke pagination on the home page template, [`section`] templates, [`taxonomy`] templates, and [`term`] templates.
++
++{{< code file=layouts/_default/list.html >}}
++{{ $pages := where .Site.RegularPages "Section" "articles" }}
++{{ $pages = $pages.ByTitle }}
++{{ range (.Paginate $pages 7).Pages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
++{{ end }}
++{{ template "_internal/pagination.html" . }}
++{{< /code >}}
++
++In the example above, we:
++
++1. Build a page collection
++2. Sort the collection by title
++3. Paginate the collection, with 7 elements per pager
++4. Range over the paginated page collection, rendering a link to each page
++5. Call the internal "pagination" template to create the navigation links between pagers.
++
++{{% note %}}
++Please note that the results of pagination are cached. Once you have invoked either the `Paginator` or `Paginate` method, the paginated collection is immutable. Additional invocations of these methods will have no effect.
++{{% /note %}}
++
++[context]: /getting-started/glossary/#context
++[pagination]: /templates/pagination/
++[`section`]: /getting-started/glossary/#section
++[`taxonomy`]: /getting-started/glossary/#taxonomy
++[`term`]: /getting-started/glossary/#term
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b1540286ad586a8ff91e52ed333ff68f71e702f8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,42 @@@
++---
++title: Paginator
++description: Paginates the collection of regular pages received in context. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Paginate
++  returnType: page.Pager
++  signatures: [PAGE.Paginator]
++---
++
++[Pagination] is the process of splitting a list page into two or more pagers, where each pager contains a subset of the page collection and navigation links to other pagers. The number of elements on each pager is determined by the value of the `paginate` setting in your site configuration. The default value is `10`.
++
++You can invoke pagination on the home page template, [`section`] templates, [`taxonomy`] templates, and [`term`] templates. Each of these receive a collection of regular pages in [context]. When you invoke the `Paginator` method, it paginates the page collection received in context.
++
++{{< code file=layouts/_default/list.html >}}
++{{ range .Paginator.Pages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++{{ template "_internal/pagination.html" . }}
++{{< /code >}}
++
++In the example above, the internal "pagination" template creates the navigation links between pagers.
++
++{{% note %}}
++Although simple to invoke, with the `Paginator` method you can neither filter nor sort the page collection. It acts upon the page collection received in context.
++
++The [`Paginate`] method is more flexible, and strongly recommended.
++
++[`paginate`]: /methods/page/paginate
++{{% /note %}}
++
++{{% note %}}
++Please note that the results of pagination are cached. Once you have invoked either the `Paginator` or `Paginate` method, the paginated collection is immutable. Additional invocations of these methods will have no effect.
++{{% /note %}}
++
++[context]: /getting-started/glossary/#context
++[pagination]: /templates/pagination/
++[`section`]: /getting-started/glossary/#section
++[`taxonomy`]: /getting-started/glossary/#taxonomy
++[`term`]: /getting-started/glossary/#term
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b2932d98102c9dbed6edd345a837fd23f84b784e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,47 @@@
++---
++title: Param
++description: Returns a page parameter with the given key, falling back to a site parameter if present.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: any
++  signatures: [PAGE.Param KEY]
++aliases: [/functions/param]
++---
++
++The `Param` method on a `Page` object looks for the given `KEY` in page parameters, and returns the corresponding value. If it cannot find the `KEY` in page parameters, it looks for the `KEY` in site parameters. If it cannot find the `KEY` in either location, the `Param` method returns `nil`.
++
++Site and theme developers commonly set parameters at the site level, allowing content authors to override those parameters at the page level.
++
++For example, to show a table of contents on every page, but allow authors to hide the table of contents as needed:
++
++Configuration:
++
++{{< code-toggle file=hugo >}}
++[params]
++display_toc = true
++{{< /code-toggle >}}
++
++Content:
++
++{{< code-toggle file=content/example.md fm=true >}}
++title = 'Example'
++date = 2023-01-01
++draft = false
++display_toc = false
++{{< /code-toggle >}}
++
++Template:
++
++```go-html-template
++{{ if .Param "display_toc" }}
++  {{ .TableOfContents }}
++{{ end }}
++```
++
++The `Param` method returns the value associated with the given `KEY`, regardless of whether the value is truthy or falsy. If you need to ignore falsy values, use this construct instead:
++
++```go-html-template
++{{ or .Params.foo site.Params.foo }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ce624c3944cf959cb1bf34b117950a044fd4b719
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,43 @@@
++---
++title: Params
++description: Returns a map of custom parameters as defined in the front matter of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/collections/IndexFunction
++    - methods/site/Params
++    - methods/page/Param
++  returnType: maps.Params
++  signatures: [PAGE.Params]
++---
++
++With this front matter:
++
++{{< code-toggle file=content/news/annual-conference.md >}}
++title = 'Annual conference'
++date = 2023-10-17T15:11:37-07:00
++display_related = true
++event-date = '2023'
++[params.author]
++  email = 'jsmith@example.org'
++  name = 'John Smith'
++{{< /code-toggle >}}
++
++The `title` and `date` fields are standard parameters---the other fields are user-defined.
++
++Access the custom parameters by [chaining] the [identifiers]:
++
++```go-html-template
++{{ .Params.display_related }} → true
++{{ .Params.author.name }} → John Smith
++```
++
++In the template example above, each of the keys is a valid identifier. For example, none of the keys contains a hyphen. To access a key that is not a valid identifier, use the [`index`] function:
++
++```go-html-template
++{{ index .Params "event-date" }} → 2023
++```
++[`index`]: /functions/collections/indexfunction
++[chaining]: /getting-started/glossary/#chain
++[identifiers]: /getting-started/glossary/#identifier
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..dbd2cb9b3f548642eab8e6f3837926e1c4b8823b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,60 @@@
++---
++title: Parent
++description: Returns the Page object of the parent section of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Ancestors
++    - methods/page/CurrentSection
++    - methods/page/FirstSection
++    - methods/page/InSection
++    - methods/page/IsAncestor
++    - methods/page/IsDescendant
++    - methods/page/Sections
++  returnType: hugolib.pageState
++  signatures: [PAGE.Parent]
++---
++
++{{% include "methods/page/_common/definition-of-section.md" %}}
++
++{{% note %}}
++The parent section of a regular page is the [current section].
++
++[current section]: /methods/page/currentsection
++{{% /note %}}
++
++Consider this content structure:
++
++```text
++content/
++├── auctions/
++│   ├── 2023-11/
++│   │   ├── _index.md     <-- parent: auctions
++│   │   ├── auction-1.md
++│   │   └── auction-2.md  <-- parent: 2023-11
++│   ├── 2023-12/
++│   │   ├── _index.md     
++│   │   ├── auction-3.md
++│   │   └── auction-4.md
++│   ├── _index.md         <-- parent: home
++│   ├── bidding.md
++│   └── payment.md        <-- parent: auctions
++├── books/
++│   ├── _index.md         <-- parent: home
++│   ├── book-1.md
++│   └── book-2.md         <-- parent: books
++├── films/
++│   ├── _index.md         <-- parent: home 
++│   ├── film-1.md
++│   └── film-2.md         <-- parent: films
++└── _index.md             <-- parent: nil
++```
++
++In the example above, note the parent section of the home page is nil. Code defensively by verifying existence of the parent section before calling methods on its `Page` object. To create a link to the parent section page of the current page:
++
++```go-html-template
++{{ with .Parent }}
++  <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..be6df5aadfd7da79396805d3704ac13f333b182a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++---
++title: Permalink
++description: Returns the permalink of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/RelPermalink
++  returnType: string
++  signatures: [PAGE.Permalink]
++---
++
++Site configuration:
++
++{{< code-toggle file=hugo >}}
++title = 'Documentation'
++baseURL = 'https://example.org/docs/'
++{{< /code-toggle >}}
++
++Template:
++
++```go-html-template
++{{ $page := .Site.GetPage "/about" }}
++{{ $page.RelPermalink }} → https://example.org/docs/about/
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6fdf60b62cfbebbb1e20c7b7554f9e544c5f1542
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,28 @@@
++---
++title: Plain
++description: Returns the rendered content of the given page, removing all HTML tags.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Content
++    - methods/page/RawContent
++    - methods/page/PlainWords
++    - methods/page/RenderShortcodes
++  returnType: string
++  signatures: [PAGE.Plain]
++---
++
++The `Plain` method on a `Page` object renders markdown and [shortcodes] to HTML, then strips the HTML [tags]. It does not strip HTML [entities]. The plain content does not include front matter.
++
++To prevent Go's [html/template] package from escaping HTML entities, pass the result through the [`htmlUnescape`] function.
++
++```go-html-template
++{{ .Plain | htmlUnescape }}
++```
++
++[shortcodes]: /getting-started/glossary/#shortcode
++[html/template]: https://pkg.go.dev/html/template
++[entities]: https://developer.mozilla.org/en-US/docs/Glossary/Entity
++[tags]: https://developer.mozilla.org/en-US/docs/Glossary/Tag
++[`htmlUnescape`]: /functions/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4bc79d2412dff1122c96cdc6092a60ddfdb73e6e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: PlainWords
++description: Calls the Plain method, splits the result into a slice of words, and returns the slice.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Content
++    - methods/page/RawContent
++    - methods/page/Plain
++  returnType: '[]string'
++  signatures: [PAGE.PlainWords]
++---
++
++The `PlainWords` method on a `Page` object calls the [`Plain`] method, then uses Go's [`strings.Fields`] function to split the result into words.
++
++{{% note %}}
++_Fields splits the string s around each instance of one or more consecutive white space characters, as defined by [`unicode.IsSpace`], returning a slice of substrings of s or an empty slice if s contains only white space._
++
++[`unicode.IsSpace`]: https://pkg.go.dev/unicode#IsSpace
++{{% /note %}}
++
++As a result, elements within the slice may contain leading or trailing punctuation.
++
++```go-html-template
++{{ .PlainWords }}
++```
++
++To determine the approximate number of unique words on a page:
++
++```go-html-template
++{{ .PlainWords | uniq }} → 42
++```
++
++[`Plain`]: /methods/page/plain
++[`strings.Fields`]: https://pkg.go.dev/strings#Fields
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cde83b0f27554f54ab8aad6d5b9408c43e3ef69d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,53 @@@
++---
++title: Prev
++description: Returns the previous page in a global page collection, relative to the given page. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Next
++    - methods/page/PrevInSection
++    - methods/page/NextInSection
++    - methods/pages/Prev
++    - methods/pages/Next
++  returnType: hugolib.pageState
++  signatures: [PAGE.Prev]
++toc: true
++---
++
++The behavior of the `Prev` and `Next` methods on a `Page` object is probably the reverse of what you expect.
++
++With this content structure:
++
++```text
++content/
++├── pages/
++│   ├── _index.md
++│   ├── page-1.md   <-- front matter: weight = 10
++│   ├── page-2.md   <-- front matter: weight = 20
++│   └── page-3.md   <-- front matter: weight = 30
++└── _index.md
++```
++
++When you visit page-2:
++
++- The `Prev` method points to page-3
++- The `Next` method points to page-1
++
++{{% note %}}
++Use the opposite label in your navigation links as shown in the example below.
++{{% /note %}}
++
++```go-html-template
++{{ with .Next }}
++  <a href="{{ .RelPermalink }}">Prev</a>
++{{ end }}
++
++{{ with .Prev }}
++  <a href="{{ .RelPermalink }}">Next</a>
++{{ end }}
++```
++
++## Compare to Pages methods
++
++{{% include "methods/_common/next-prev-on-page-vs-next-prev-on-pages.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..30b813350e36c7a12b1ff5e13e76c59342713de2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,72 @@@
++---
++title: PrevInSection
++description: Returns the previous page within a section, relative to the given page.  
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/NextInSection
++    - methods/page/Next
++    - methods/pages/Next
++    - methods/page/Prev
++    - methods/pages/Prev
++  returnType: hugolib.pageState
++  signatures: [PAGE.PrevInSection]
++---
++
++
++The behavior of the `PrevInSection` and `NextInSection` methods on a `Page` object is probably the reverse of what you expect.
++
++With this content structure:
++
++```text
++content/
++├── books/
++│   ├── _index.md
++│   ├── book-1.md
++│   ├── book-2.md
++│   └── book-3.md
++├── films/
++│   ├── _index.md
++│   ├── film-1.md
++│   ├── film-2.md
++│   └── film-3.md
++└── _index.md
++```
++
++When you visit book-2:
++
++- The `PrevInSection` method points to book-3
++- The `NextInSection` method points to book-1
++
++{{% note %}}
++Use the opposite label in your navigation links as shown in the example below.
++{{% /note %}}
++
++```go-html-template
++{{ with .NextInSection }}
++  <a href="{{ .RelPermalink }}">Previous in section</a>
++{{ end }}
++
++{{ with .PrevInSection }}
++  <a href="{{ .RelPermalink }}">Next in section</a>
++{{ end }}
++```
++
++{{% note %}}
++The navigation sort order may be different than the page collection sort order.
++{{% /note %}}
++
++With the `PrevInSection` and `NextInSection` methods, the navigation sort order is fixed, using Hugo’s default sort order. In order of precedence:
++
++1. Page [weight]
++2. Page [date] (descending)
++3. Page [linkTitle], falling back to page [title]
++4. Page file path if the page is backed by a file
++
++For example, with a page collection sorted by title, the navigation sort order will use Hugo’s default sort order. This is probably not what you want or expect. For this reason, the Next and Prev methods on a Pages object are generally a better choice.
++
++[date]: /methods/page/date
++[weight]: /methods/page/weight
++[linkTitle]: /methods/page/linktitle
++[title]: /methods/page/title
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b1c0717a9b887666545c612f2643346a860090cb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,35 @@@
++---
++title: PublishDate
++description: Returns the publish date of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Date
++    - methods/page/ExpiryDate
++    - methods/page/LastMod
++  returnType: time.Time
++  signatures: [PAGE.PublishDate]
++---
++
++By default, Hugo excludes pages with future publish dates when building your site. To include future pages, use the `--buildFuture` command line flag.
++
++Set the publish date in front matter:
++
++{{< code-toggle file=content/news/article-1.md fm=true >}}
++title = 'Article 1'
++publishDate = 2023-10-19T00:40:04-07:00
++{{< /code-toggle >}}
++
++The publish date is a [time.Time] value. Format and localize the value with the [`time.Format`] function, or use it with any of the [time methods].
++
++```go-html-template
++{{ .PublishDate | time.Format ":date_medium" }} → Oct 19, 2023
++```
++
++In the example above we explicitly set the publish date in front matter. With Hugo's default configuration, the `PublishDate` method returns the front matter value. This behavior is configurable, allowing you to set fallback values if the publish date is not defined in front matter. See&nbsp;[details].
++
++[`time.Format`]: /functions/time/format
++[details]: /getting-started/configuration/#configure-dates
++[time methods]: /methods/time
++[time.Time]: https://pkg.go.dev/time#Time
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..258a294d094ed326868e5096b095f5aa4f39e08a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++---
++title: RawContent
++description: Returns the raw content of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Content
++    - methods/page/Plain
++    - methods/page/PlainWords
++    - methods/page/RenderShortcodes
++  returnType: string
++  signatures: [PAGE.RawContent]
++---
++
++The `RawContent` method on a `Page` object returns the raw content. The raw content does not include front matter.
++
++```go-html-template
++{{ .RawContent }}
++```
++
++This is useful when rendering a page in a plain text [output format].
++
++{{% note %}}
++[Shortcodes] within the content are not rendered. To get the raw content with shortcodes rendered, use the [`RenderShortcodes`] method on a `Page` object.
++
++[shortcodes]: /getting-started/glossary/#shortcode
++[`RenderShortcodes`]: /methods/page/rendershortcodes
++{{% /note %}}
++
++[output format]: /templates/output-formats
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..531824b9b58a5a34f8d2c47586ed6315ef9fa324
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,49 @@@
++---
++title: ReadingTime
++description: Returns the estimated reading time, in minutes, for the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/WordCount
++    - methods/page/FuzzyWordCount
++  returnType: int
++  signatures: [PAGE.ReadingTime]
++---
++
++The estimated reading time is calculated by dividing the number of words in the content by the reading speed.
++
++By default, Hugo assumes a reading speed of 212 words per minute. For CJK languages, it assumes 500 words per minute.
++
++```go-html-template
++{{ printf "Estimated reading time: %d minutes" .ReadingTime }}
++```
++
++Reading speed varies by language. Create language-specific estimated reading times on your multilingual site using site parameters.
++
++{{< code-toggle file=hugo >}}
++[languages]
++  [languages.de]
++    contentDir = 'content/de'
++    languageCode = 'de-DE'
++    languageName = 'Deutsch'
++    weight = 2
++    [languages.de.params]
++    reading_speed = 179
++  [languages.en]
++    contentDir = 'content/en'
++    languageCode = 'en-US'
++    languageName = 'English'
++    weight = 1
++    [languages.en.params]
++      reading_speed = 228
++{{< /code-toggle >}}
++
++Then in your template:
++
++```go-html-template
++{{ $readingTime := div (float .WordCount) .Site.Params.reading_speed }}
++{{ $readingTime = math.Ceil $readingTime }}
++```
++
++We cast the `.WordCount` to a float to obtain a float when we divide by the reading speed. Then round up to the nearest integer.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e3c5569a44b80c5c23d2969f0b1145dc4e84b939
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,44 @@@
++---
++title: Ref
++description: Returns the absolute URL of the page with the given path, language, and output format.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/RelRef
++    - functions/urls/RelRef
++    - functions/urls/Ref
++  returnType: string
++  signatures: [PAGE.Ref OPTIONS]
++---
++
++The map of option contains:
++
++path
++: (`string`) The path to the page, relative to the content directory. Required.
++
++lang
++: (`string`) The language (site) to search for the page. Default is the current language. Optional.
++
++outputFormat
++: (`string`) The output format to search for the page. Default is the current output format. Optional.
++
++The examples below show the rendered output when visiting a page on the English language version of the site:
++
++```go-html-template
++{{ $opts := dict "path" "/books/book-1" }}
++{{ .Ref $opts }} → https://example.org/en/books/book-1/
++
++{{ $opts := dict "path" "/books/book-1" "lang" "de" }}
++{{ .Ref $opts }} → https://example.org/de/books/book-1/
++
++{{ $opts := dict "path" "/books/book-1" "lang" "de" "outputFormat" "json" }}
++{{ .Ref $opts }} → https://example.org/de/books/book-1/index.json
++```
++
++By default, Hugo will throw an error and fail the build if it cannot resolve the path. You can change this to a warning in your site configuration, and specify a URL to return when the path cannot be resolved.
++
++{{< code-toggle file=hugo >}}
++refLinksErrorLevel = 'warning'
++refLinksNotFoundURL = '/some/other/url'
++{{< /code-toggle >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b0ca7b1e1936bc0a907940c8c57af65eacc6b613
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,87 @@@
++---
++title: RegularPages
++description: Returns a collection of regular pages within the current section.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Pages
++    - methods/page/RegularPagesRecursive
++  returnType: page.Pages
++  signatures: [PAGE.RegularPages]
++---
++
++The `RegularPages` method on a `Page` object is available to these [page kinds]: `home`, `section`, `taxonomy`, and `term`. The templates for these page kinds receive a page [collection] in [context].
++
++Range through the page collection in your template:
++
++```go-html-template
++{{ range .RegularPages.ByTitle }}
++  <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
++{{ end }}
++```
++
++Consider this content structure:
++
++```text
++content/
++├── lessons/
++│   ├── lesson-1/
++│   │   ├── _index.md
++│   │   ├── part-1.md
++│   │   └── part-2.md
++│   ├── lesson-2/
++│   │   ├── resources/
++│   │   │   ├── task-list.md
++│   │   │   └── worksheet.md
++│   │   ├── _index.md
++│   │   ├── part-1.md
++│   │   └── part-2.md
++│   ├── _index.md
++│   ├── grading-policy.md
++│   └── lesson-plan.md
++├── _index.md
++├── contact.md
++└── legal.md
++```
++
++When rendering the home page, the `RegularPages` method returns:
++
++    contact.md
++    legal.md
++
++When rendering the lessons page, the `RegularPages` method returns:
++
++    lessons/grading-policy.md
++    lessons/lesson-plan.md
++
++When rendering lesson-1, the `RegularPages` method returns:
++
++    lessons/lesson-1/part-1.md
++    lessons/lesson-1/part-2.md
++
++When rendering lesson-2, the `RegularPages` method returns:
++
++    lessons/lesson-2/part-1.md
++    lessons/lesson-2/part-2.md
++    lessons/lesson-2/resources/task-list.md
++    lessons/lesson-2/resources/worksheet.md
++
++In the last example, the collection includes pages in the resources subdirectory. That directory is not a [section]---it does not contain an _index.md file. Its contents are part of the lesson-2 section.
++
++{{% note %}}
++When used with the `Site` object, the `RegularPages` method recursively returns all regular pages within the site. See&nbsp;[details].
++
++[details]: /methods/site/regularpages
++{{% /note %}}
++
++```go-html-template
++{{ range .Site.RegularPages.ByTitle }}
++  <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
++{{ end }}
++```
++
++[collection]: /getting-started/glossary/#collection
++[context]: /getting-started/glossary/#context
++[page kinds]: /getting-started/glossary/#page-kind
++[section]: /getting-started/glossary/#section
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3dac8c85edcc9753810fcd06a8ad31772d21409c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,90 @@@
++---
++title: RegularPagesRecursive
++description: Returns a collection of regular pages within the current section, and regular pages within all descendant sections.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Pages
++    - methods/page/RegularPages
++  returnType: page.Pages
++  signatures: [PAGE.RegularPagesRecursive]
++---
++
++The `RegularPagesRecursive` method on a `Page` object is available to these [page kinds]: `home`, `section`, `taxonomy`, and `term`. The templates for these page kinds receive a page [collection] in [context].
++
++Range through the page collection in your template:
++
++```go-html-template
++{{ range .RegularPagesRecursive.ByTitle }}
++  <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
++{{ end }}
++```
++
++Consider this content structure:
++
++```text
++content/
++├── lessons/
++│   ├── lesson-1/
++│   │   ├── _index.md
++│   │   ├── part-1.md
++│   │   └── part-2.md
++│   ├── lesson-2/
++│   │   ├── resources/
++│   │   │   ├── task-list.md
++│   │   │   └── worksheet.md
++│   │   ├── _index.md
++│   │   ├── part-1.md
++│   │   └── part-2.md
++│   ├── _index.md
++│   ├── grading-policy.md
++│   └── lesson-plan.md
++├── _index.md
++├── contact.md
++└── legal.md
++```
++
++When rendering the home page, the `RegularPagesRecursive` method returns:
++
++    contact.md
++    lessons/grading-policy.md
++    legal.md
++    lessons/lesson-plan.md
++    lessons/lesson-2/part-1.md
++    lessons/lesson-1/part-1.md
++    lessons/lesson-2/part-2.md
++    lessons/lesson-1/part-2.md
++    lessons/lesson-2/resources/task-list.md
++    lessons/lesson-2/resources/worksheet.md
++
++When rendering the lessons page, the `RegularPagesRecursive` method returns:
++
++    lessons/grading-policy.md
++    lessons/lesson-plan.md
++    lessons/lesson-2/part-1.md
++    lessons/lesson-1/part-1.md
++    lessons/lesson-2/part-2.md
++    lessons/lesson-1/part-2.md
++    lessons/lesson-2/resources/task-list.md
++    lessons/lesson-2/resources/worksheet.md
++
++When rendering lesson-1, the `RegularPagesRecursive` method returns:
++
++    lessons/lesson-1/part-1.md
++    lessons/lesson-1/part-2.md
++
++When rendering lesson-2, the `RegularPagesRecursive` method returns:
++
++    lessons/lesson-2/part-1.md
++    lessons/lesson-2/part-2.md
++    lessons/lesson-2/resources/task-list.md
++    lessons/lesson-2/resources/worksheet.md
++
++{{% note %}}
++The `RegularPagesRecursive` method in not available on a `Site` object.
++{{% /note %}}
++
++[collection]: /getting-started/glossary/#collection
++[context]: /getting-started/glossary/#context
++[page kinds]: /getting-started/glossary/#page-kind
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8a5972ccc22c57b161949c31be8b5be246b84dac
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++---
++title: RelPermalink
++description: Returns the relative permalink of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Permalink
++  returnType: string
++  signatures: [PAGE.RelPermalink]
++---
++
++Site configuration:
++
++{{< code-toggle file=hugo >}}
++title = 'Documentation'
++baseURL = 'https://example.org/docs/'
++{{< /code-toggle >}}
++
++Template:
++
++```go-html-template
++{{ $page := .Site.GetPage "/about" }}
++{{ $page.Permalink }} → /docs/about/
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4c635e0e28c0ea7cadc28753a7e3bc6834fd86ea
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,44 @@@
++---
++title: RelRef
++description: Returns the relative URL of the page with the given path, language, and output format.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Ref
++    - functions/urls/Ref
++    - functions/urls/RelRef
++  returnType: string
++  signatures: [PAGE.RelRef OPTIONS]
++---
++
++The map of option contains:
++
++path
++: (`string`) The path to the page, relative to the content directory. Required.
++
++lang
++: (`string`) The language (site) to search for the page. Default is the current language. Optional.
++
++outputFormat
++: (`string`) The output format to search for the page. Default is the current output format. Optional.
++
++The examples below show the rendered output when visiting a page on the English language version of the site:
++
++```go-html-template
++{{ $opts := dict "path" "/books/book-1" }}
++{{ .RelRef $opts }} → /en/books/book-1/
++
++{{ $opts := dict "path" "/books/book-1" "lang" "de" }}
++{{ .RelRef $opts }} → /de/books/book-1/
++
++{{ $opts := dict "path" "/books/book-1" "lang" "de" "outputFormat" "json" }}
++{{ .RelRef $opts }} → /de/books/book-1/index.json
++```
++
++By default, Hugo will throw an error and fail the build if it cannot resolve the path. You can change this to a warning in your site configuration, and specify a URL to return when the path cannot be resolved.
++
++{{< code-toggle file=hugo >}}
++refLinksErrorLevel = 'warning'
++refLinksNotFoundURL = '/some/other/url'
++{{< /code-toggle >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bc3f58352c0895a20d3b3d570e13dfc56a74c584
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,75 @@@
++---
++title: Render
++description: Renders the given template with the given page as context.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/partials/Include
++    - functions/partials/IncludeCached
++  returnType: template.HTML
++  signatures: [PAGE.Render NAME]
++aliases: [/functions/render]
++---
++
++Typically used when ranging over a page collection, the `Render` method on a `Page` object renders the given template, passing the given page as context.
++
++```go-html-template
++{{ range site.RegularPages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++  {{ .Render "summary" }}
++{{ end }}
++```
++
++In the example above, note that the template ("summary") is identified by its file name without directory or extension.
++
++Although similar to the [`partial`] function, there are key differences.
++
++`Render` method|`partial` function|
++:--|:--
++The `Page` object is automatically passed to the given template. You cannot pass additional context.| You must specify the context, allowing you to pass a combination of objects, slices, maps, and scalars.
++The path to the template is determined by the [content type].|You must specify the path to the template, relative to the layouts/partials directory.
++
++Consider this layout structure:
++
++```text
++layouts/
++├── _default/
++│   ├── baseof.html
++│   ├── home.html
++│   ├── li.html      <-- used for other content types
++│   ├── list.html
++│   ├── single.html
++│   └── summary.html
++└── books/
++    ├── li.html      <-- used when content type is "books"
++    └── summary.html
++```
++
++And this template:
++
++```go-html-template
++<ul>
++  {{ range site.RegularPages.ByDate }}
++    {{ .Render "li" }}
++  {{ end }}
++</ul>
++```
++
++When rendering content of type "books" the `Render` method calls:
++
++```text
++layouts/books/li.html
++```
++
++For all other content types the `Render` methods calls:
++
++```text
++layouts/_default/li.html
++```
++
++See [content views] for more examples.
++
++[content views]: /templates/views
++[`partial`]: /functions/partials/include
++[content type]: /getting-started/glossary/#content-type
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4636bf8f5ba9ec7b02461008e08e4fbee929158d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,78 @@@
++---
++title: RenderShortcodes
++description: Renders all shortcodes in the content of the given page, preserving the surrounding markup.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/RenderString
++    - methods/page/Content
++    - methods/page/RawContent
++    - methods/page/Plain
++    - methods/page/PlainWords
++  returnType: template.HTML
++  signatures: [PAGE.RenderShortcodes]
++toc: true
++---
++
++{{< new-in 0.117.0 >}}
++
++Use this method in shortcode templates to compose a page from multiple content files, while preserving a global context for footnotes and the table of contents.
++
++For example:
++
++{{< code file=layouts/shortcodes/include.html >}}
++{{ $p := site.GetPage (.Get 0) }}
++{{ $p.RenderShortcodes }}
++{{< /code >}}
++
++Then in your markdown:
++
++{{< code file=content/about.md lang=md >}}
++{{%/* include "/snippets/services.md" */%}}
++{{%/* include "/snippets/values.md" */%}}
++{{%/* include "/snippets/leadership.md" */%}}
++{{< /code >}}
++
++Each of the included markdown files can contain calls to other shortcodes.
++
++## Shortcode notation
++
++In the example above it's important to understand the difference between the two delimiters used when calling a shortcode:
++
++- `{{</* myshortcode */>}}` tells Hugo that the rendered shortcode does not need further processing. For example, the shortcode content is HTML.
++- `{{%/* myshortcode */%}}` tells Hugo that the rendered shortcode needs further processing. For example, the shortcode content is markdown.
++
++Use the latter for the "include" shortcode described above.
++
++## Further explanation
++
++To understand what is returned by the `RenderShortcodes` method, consider this content file
++
++{{< code file=content/about.md lang=text >}}
+++++
++title = 'About'
++date = 2023-10-07T12:28:33-07:00
+++++
++
++{{</* ref "privacy" */>}}
++
++An *emphasized* word.
++{{< /code >}}
++
++With this template code:
++
++```go-html-template
++{{ $p := site.GetPage "/about" }}
++{{ $p.RenderShortcodes }}
++```
++
++Hugo renders this:;
++
++```html
++https://example.org/privacy/
++
++An *emphasized* word.
++```
++
++Note that the shortcode within the content file was rendered, but the surrounding markdown was preserved.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5782cd2b1ac18f9a5e8c5106776da5ed1219dd13
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,51 @@@
++---
++title: RenderString
++description: Renders markup to HTML.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/RenderShortcodes
++    - functions/transform/Markdownify
++  returnType: template.HTML
++  signatures: ['PAGE.RenderString [OPTIONS] MARKUP']
++aliases: [/functions/renderstring]
++---
++
++```go-html-template
++{{ $s := "An *emphasized* word" }}
++{{ $s | .RenderString }} → An <em>emphasized</em> word
++```
++
++This method takes an optional map of options:
++
++display
++: (`string`) Specify either `inline` or `block`. If `inline`, removes surrounding `p` tags from short snippets. Default is `inline`.
++
++markup
++: (`string`) Specify a [markup identifier] for the provided markup. Default is the `markup` front matter value, falling back to the value derived from the page's file extension.
++
++Render with the default markup renderer:
++
++```go-html-template
++{{ $s := "An *emphasized* word" }}
++{{ $s | .RenderString }} → An <em>emphasized</em> word
++
++{{ $opts := dict "display" "block" }}
++{{ $s | .RenderString $opts }} → <p>An <em>emphasized</em> word</p>
++```
++
++Render with [Pandoc]:
++
++```go-html-template
++{{ $s := "H~2~O" }}
++
++{{ $opts := dict "markup" "pandoc" }}
++{{ $s | .RenderString $opts }} → H<sub>2</sub>O
++
++{{ $opts := dict "display" "block" "markup" "pandoc" }}
++{{ .RenderString $opts $s }} → <p>H<sub>2</sub>O</p>
++```
++
++[markup identifier]: /content-management/formats/#list-of-content-formats
++[pandoc]: https://www.pandoc.org/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a9fa3dab2f59834864753f20ce8bf11c4e77a4c5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,81 @@@
++---
++title: Resources
++description: Returns a collection of page resources.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/resources/ByType
++    - functions/resources/Get
++    - functions/resources/GetMatch
++    - functions/resources/GetRemote
++    - functions/resources/Match
++  returnType: resource.Resources
++  signatures: [PAGE.Resources]
++toc: true
++---
++
++The `Resources` method on a `Page` object returns a collection of page resources. A page resource is a file within a [page bundle].
++
++To work with global or remote resources, see the [`resources`] functions.
++
++## Methods
++
++ByType
++: (`resource.Resources`) Returns a collection of page resources of the given [media type], or nil if none found. The media type is typically one of `image`, `text`, `audio`, `video`, or `application`.
++
++```go-html-template
++{{ range .Resources.ByType "image" }}
++  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++{{ end }}
++```
++
++When working with global resources instead of page resources, use the [`resources.ByType`] function.
++
++Get
++: (`resource.Resource`) Returns a page resource from the given path, or nil if none found.
++
++```go-html-template
++{{ with .Resources.Get "images/a.jpg" }}
++  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++{{ end }}
++```
++
++When working with global resources instead of page resources, use the [`resources.Get`] function.
++
++GetMatch
++: (`resource.Resource`) Returns the first page resource from paths matching the given [glob pattern], or nil if none found.
++
++```go-html-template
++{{ with .Resources.GetMatch "images/*.jpg" }}
++  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++{{ end }}
++```
++
++When working with global resources instead of page resources, use the [`resources.GetMatch`] function.
++
++Match
++: (`resource.Resources`) Returns a collection of page resources from paths matching the given [glob pattern], or nil if none found.
++
++```go-html-template
++{{ range .Resources.Match "images/*.jpg" }}
++  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++{{ end }}
++```
++
++When working with global resources instead of page resources, use the [`resources.Match`] function.
++
++## Pattern matching
++
++With the `GetMatch` and `Match` methods, Hugo determines a match using a case-insensitive [glob pattern].
++
++{{% include "functions/_common/glob-patterns.md" %}}
++
++[`resources.ByType`]: /functions/resources/ByType
++[`resources.GetMatch`]: /functions/resources/ByType
++[`resources.Get`]: /functions/resources/ByType
++[`resources.Match`]: /functions/resources/ByType
++[`resources`]: /functions/resources
++[glob pattern]: https://github.com/gobwas/glob#example
++[media type]: https://en.wikipedia.org/wiki/Media_type
++[page bundle]: /getting-started/glossary/#page-bundle
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f9ce7f7fb68125382bef3eda530b6d93465afa20
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++---
++title: Scratch
++description: Creates a "scratch pad" on the given page to store and manipulate data.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Store
++    - functions/collections/NewScratch
++  returnType: maps.Scratch
++  signatures: [PAGE.Scratch]
++aliases: [/extras/scratch/,/doc/scratch/,/functions/scratch]
++---
++
++The `Scratch` method on a `Page` object creates a [scratch pad] to store and manipulate data. To create a scratch pad that is not reset on server rebuilds, use the [`Store`] method instead.
++
++To create a locally scoped scratch pad that is not attached to a `Page` object, use the [`newScratch`] function.
++
++[`Store`]: /methods/page/store
++[`newScratch`]: functions/collections/newscratch
++[scratch pad]: /getting-started/glossary/#scratch-pad
++
++{{% include "methods/page/_common/scratch-methods.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..30c8a9837886e8f4461acb9e8d89f83a4bcdb3a4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,54 @@@
++---
++title: Section
++description: Returns the name of the top level section in which the given page resides.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Type
++  returnType: string
++  signatures: [PAGE.Section]
++---
++
++With this content structure:
++
++```text
++content/
++├── lessons/
++│   ├── math/
++│   │   ├── _index.md
++│   │   ├── lesson-1.md
++│   │   └── lesson-2.md
++│   └── _index.md
++└── _index.md
++```
++
++When rendering lesson-1.md:
++
++```go-html-template
++{{ .Section }} → lessons
++```
++
++In the example above "lessons" is the top level section.
++
++The `Section` method is often used with the [`where`] function to build a page collection.
++
++```go-html-template
++{{ range where .Site.RegularPages "Section" "lessons" }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++This is similar to using the [`Type`] method with the `where` function
++
++```go-html-template
++{{ range where .Site.RegularPages "Type" "lessons" }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++However, if the `type` field in front matter has been defined on one or more pages, the page collection based on `Type` will be different than the page collection based on `Section`.
++
++
++[`where`]: /functions/collections/where
++[`Type`]: /methods/page/type
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d64440038bd21acfc415b9f3515897b812ba2b4c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,69 @@@
++---
++title: Sections
++description: Returns a collection of section pages, one for each immediate descendant section of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Ancestors
++    - methods/page/CurrentSection
++    - methods/page/FirstSection
++    - methods/page/InSection
++    - methods/page/IsAncestor
++    - methods/page/IsDescendant
++    - methods/page/Parent
++  returnType: page.Pages
++  signatures: [PAGE.Sections]
++---
++
++{{% include "methods/page/_common/definition-of-section.md" %}}
++
++With this content structure:
++
++```text
++content/
++├── auctions/
++│   ├── 2023-11/
++│   │   ├── _index.md     <-- front matter: weight = 202311
++│   │   ├── auction-1.md
++│   │   └── auction-2.md
++│   ├── 2023-12/
++│   │   ├── _index.md     <-- front matter: weight = 202312
++│   │   ├── auction-3.md
++│   │   └── auction-4.md
++│   ├── _index.md         <-- front matter: weight = 30
++│   ├── bidding.md
++│   └── payment.md
++├── books/
++│   ├── _index.md         <-- front matter: weight = 10
++│   ├── book-1.md
++│   └── book-2.md
++├── films/
++│   ├── _index.md         <-- front matter: weight = 20
++│   ├── film-1.md
++│   └── film-2.md
++└── _index.md
++```
++
++And this template:
++
++```go-html-template
++{{ range .Sections.ByWeight }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++On the home page, Hugo renders:
++
++```html
++<h2><a href="/films/">Films</a></h2>
++<h2><a href="/books/">Books</a></h2>
++<h2><a href="/auctions/">Auctions</a></h2>
++```
++
++On the auctions page, Hugo renders:
++
++```html
++<h2><a href="/auctions/2023-11/">Auctions in November 2023</a></h2>
++<h2><a href="/auctions/2023-12/">Auctions in December 2023</a></h2>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..34748facd52124e44f43d80601878bb387d85fce
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++---
++title: Site
++description: Returns the Site object.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Sites
++  returnType: page.siteWrapper
++  signatures: [PAGE.Site]
++---
++
++See [Site methods].
++
++[Site methods]: /methods/site
++
++```go-html-template
++{{ .Site.Title }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..08ff3f5d06740e763e664716bf8fc67d53175a02
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,70 @@@
++---
++title: Sitemap
++description: Returns the sitemap settings for the given page as defined in front matter, falling back to the sitemap settings as defined in the site configuration.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: config.SitemapConfig
++  signatures: [PAGE.Sitemap]
++toc: true
++---
++
++Access to the `Sitemap` method on a `Page` object is restricted to [sitemap templates].
++
++## Methods
++
++ChangeFreq
++: (`string`) How frequently a page is likely to change. Valid values are `always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly`, and `never`. Default is "" (change frequency omitted from rendered sitemap).
++
++```go-html-template
++{{ .Sitemap.ChangeFreq }}
++```
++
++Priority
++: (`float`) The priority of a page relative to any other page on the site. Valid values range from 0.0 to 1.0. Default is -1 (priority omitted from rendered sitemap).
++
++```go-html-template
++{{ .Sitemap.Priority }}
++```
++
++## Example
++
++With this site configuration:
++
++{{< code-toggle file=hugo >}}
++[sitemap]
++changeFreq = 'monthly'
++{{< /code-toggle >}}
++
++And this content:
++
++{{< code-toggle file=content/news.md fm=true >}}
++title = 'News'
++[sitemap]
++changeFreq = 'hourly'
++{{< /code-toggle >}}
++
++And this simplistic sitemap template:
++
++{{< code file=layouts/_default/sitemap.xml >}}
++{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
++<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
++  xmlns:xhtml="http://www.w3.org/1999/xhtml">
++  {{ range .Pages }}
++    <url>
++      <loc>{{ .Permalink }}</loc>
++      {{ if not .Lastmod.IsZero }}
++        <lastmod>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</lastmod>
++      {{ end }}
++      {{ with .Sitemap.ChangeFreq }}
++        <changefreq>{{ . }}</changefreq>
++      {{ end }}
++    </url>
++  {{ end }}
++</urlset>
++{{< /code >}}
++
++The change frequency will be `hourly` for the news page, and `monthly` for other pages.
++
++[sitemap templates]: /templates/sitemap-template/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1fbdfcdcde8bfa43af83a227dee6a82eed6e746f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,69 @@@
++---
++title: Sites
++description: Returns a collection of all Site objects, one for each language, ordered by language weight.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Site
++  returnType: page.Sites
++  signatures: [PAGE.Sites]
++---
++
++This is a convenience method to access `.Site.Sites`.
++
++With this site configuration:
++
++{{< code-toggle file=hugo >}}
++defaultContentLanguage = 'de'
++defaultContentLanguageInSubdir = false
++
++[languages.de]
++languageCode = 'de-DE'
++languageDirection = 'ltr'
++languageName = 'Deutsch'
++title = 'Projekt Dokumentation'
++weight = 1
++
++[languages.en]
++languageCode = 'en-US'
++languageDirection = 'ltr'
++languageName = 'English'
++title = 'Project Documentation'
++weight = 2
++{{< /code-toggle >}}
++
++This template:
++
++```go-html-template
++<ul>
++  {{ range .Sites }}
++    <li><a href="{{ .Home.Permalink }}">{{ .Title }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Produces a list of links to each home page:
++
++```html
++<ul>
++  <li><a href="https://example.org/de/">Projekt Dokumentation</a></li>
++  <li><a href="https://example.org/en/">Project Documentation</a></li>
++</ul>
++```
++
++To render a link to home page of the primary (first) language:
++
++```go-html-template
++{{ with .Sites.First }}
++  <a href="{{ .Home.Permalink }}">{{ .Title }}</a>
++{{ end }}
++```
++
++This is equivalent to:
++
++```go-html-template
++{{ with index .Sites 0 }}
++  <a href="{{ .Home.Permalink }}">{{ .Title }}</a>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9fdb09b5774071416beab3733f5a456bb4d4d80d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++---
++title: Slug
++description: Returns the URL slug of the given page as defined in front matter.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: string
++  signatures: [PAGE.Slug]
++---
++
++{{< code-toggle file=content/recipes/spicy-tuna-hand-rolls.md fm=true >}}
++title = 'How to make spicy tuna hand rolls'
++slug = 'sushi'
++{{< /code-toggle >}}
++
++This page will be served from:
++
++    https://example.org/recipes/sushi
++
++To get the slug value within a template:
++
++```go-html-template
++{{ .Slug }} → sushi
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..04e1d52566344236f0bb620eb117801c73fbdbf7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,97 @@@
++---
++title: Store
++description: Creates a persistent "scratch pad" on the given page to store and manipulate data.
++categories: []
++keywords: []
++action:
++  related:
++  - methods/page/scratch
++  - functions/collections/NewScratch
++  returnType: maps.Scratch
++  signatures: [PAGE.Store]
++aliases: [/functions/store]
++---
++
++The `Store` method on a `Page` object creates a persistent [scratch pad] to store and manipulate data. In contrast with the [`Scratch`] method, the scratch pad created by the `Store` method is not reset on server rebuilds.
++
++To create a locally scoped scratch pad that is not attached to a `Page` object, use the [`newScratch`] function.
++
++[`Scratch`]: /methods/page/scratch
++[`newScratch`]: functions/collections/newscratch
++[scratch pad]: /getting-started/glossary/#scratch-pad
++
++## Methods
++
++Set
++: Sets the value of a given key.
++
++```go-html-template
++{{ .Store.Set "greeting" "Hello" }}
++```
++
++Get
++: Gets the value of a given key.
++
++```go-html-template
++{{ .Store.Set "greeting" "Hello" }}
++{{ .Store.Get "greeting" }} → Hello
++```
++
++Add
++: Adds a given value to existing value(s) of the given key.
++
++: For single values, `Add` accepts values that support Go's `+` operator. If the first `Add` for a key is an array or slice, the following adds will be appended to that list.
++
++```go-html-template
++{{ .Store.Set "greeting" "Hello" }}
++{{ .Store.Add "greeting" "Welcome" }}
++{{ .Store.Get "greeting" }} → HelloWelcome
++```
++
++```go-html-template
++{{ .Store.Set "total" 3 }}
++{{ .Store.Add "total" 7 }}
++{{ .Store.Get "total" }} → 10
++```
++
++```go-html-template
++{{ .Store.Set "greetings" (slice "Hello") }}
++{{ .Store.Add "greetings" (slice "Welcome" "Cheers") }}
++{{ .Store.Get "greetings" }} → [Hello Welcome Cheers]
++```
++
++SetInMap
++: Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`.
++
++```go-html-template
++{{ .Store.SetInMap "greetings" "english" "Hello" }}
++{{ .Store.SetInMap "greetings" "french" "Bonjour" }}
++{{ .Store.Get "greetings" }} → map[english:Hello french:Bonjour]
++```
++
++DeleteInMap
++: Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`.
++
++```go-html-template
++{{ .Store.SetInMap "greetings" "english" "Hello" }}
++{{ .Store.SetInMap "greetings" "french" "Bonjour" }}
++{{ .Store.DeleteInMap "greetings" "english" }}
++{{ .Store.Get "greetings" }} → map[french:Bonjour]
++```
++
++GetSortedMapValues
++: Returns an array of values from `key` sorted by `mapKey`.
++
++```go-html-template
++{{ .Store.SetInMap "greetings" "english" "Hello" }}
++{{ .Store.SetInMap "greetings" "french" "Bonjour" }}
++{{ .Store.GetSortedMapValues "greetings" }} → [Hello Bonjour]
++```
++
++Delete
++: Removes the given key.
++
++```go-html-template
++{{ .Store.Set "greeting" "Hello" }}
++{{ .Store.Delete "greeting" }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..37ce865893b6995a1138a5e4a67ddcc205c1ebae
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,29 @@@
++---
++title: Summary
++description: Returns the content summary of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Truncated
++    - methods/page/Description
++  returnType: template.HTML
++  signatures: [PAGE.Summary]
++---
++
++There are three ways to define the [content summary]:
++
++1. Let Hugo create the summary based on the first 70 words. You can change the number of words by setting the `summaryLength` in your site configuration.
++2. Manually split the content with a `<--more-->` tag in markdown. Everything before the tag is included in the summary.
++3. Create a `summary` field in front matter.
++
++To list the pages in a section with a summary beneath each link:
++
++```go-html-template
++{{ range .Pages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++  {{ .Summary }}
++{{ end }}
++```
++
++[content summary]: /content-management/summaries
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2ab182e8ca7f30f521b0e7f265fede1bf51681a9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,47 @@@
++---
++title: TableOfContents
++description: Returns a table of contents for the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Fragments
++  returnType: template.HTML
++  signatures: [PAGE.TableOfContents]
++---
++
++The `TableOfContents` method on a `Page` object returns an ordered or unordered list of the markdown [ATX] and [setext] headings within the page content.
++
++[atx]: https://spec.commonmark.org/0.30/#atx-headings
++[setext]: https://spec.commonmark.org/0.30/#setext-headings
++
++This template code:
++
++```go-html-template
++{{ .TableOfContents }}
++```
++
++Produces this HTML:
++
++```html
++<nav id="TableOfContents">
++  <ul>
++    <li><a href="#section-1">Section 1</a>
++      <ul>
++        <li><a href="#section-11">Section 1.1</a></li>
++        <li><a href="#section-12">Section 1.2</a></li>
++      </ul>
++    </li>
++    <li><a href="#section-2">Section 2</a></li>
++  </ul>
++</nav>
++```
++
++By default, the `TableOfContents` method returns an unordered list of level 2 and level 3 headings. You can adjust this in your site configuration:
++
++{{< code-toggle file=hugo >}}
++[markup.tableOfContents]
++endLevel = 3
++ordered = false
++startLevel = 2
++{{< /code-toggle >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..52e46ff44bef650c16730f7f3b17474f986d25cd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,38 @@@
++---
++title: Title
++description: Returns the title of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/LinkTitle
++  returnType: string
++  signatures: [PAGE.Title]
++---
++
++With pages backed by a file, the `Title` method returns the `title` field as defined in front matter:
++
++{{< code-toggle file=content/about.md fm=true >}}
++title = 'About us'
++{{< /code-toggle >}}
++
++```go-html-template
++{{ .Title }} → About us
++```
++
++With section pages not backed by a file, the `Title` method returns the section name, pluralized and converted to title case.
++
++To disable [pluralization]:
++
++{{< code-toggle file=hugo >}}
++pluralizeListTitles = false
++{{< /code-toggle >}}
++
++To change the [title case style], specify one of `ap`, `chicago`, `go`, `firstupper`, or `none`:
++
++{{< code-toggle file=hugo >}}
++titleCaseStyle = "ap"
++{{< /code-toggle >}}
++
++[pluralization]: /functions/inflect/pluralize
++[title case style]: /getting-started/configuration/#configure-title-case
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a9e4b97e9aaeced1903eb629c13e9cb14d3b53b7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,74 @@@
++---
++title: TranslationKey
++description: Returns the translation key of the given page.
++categories: []
++keywords: []
++action:
++  related:
++   - methods/page/Translations
++   - methods/page/AllTranslations
++   - methods/page/IsTranslated
++  returnType: string
++  signatures: [PAGE.TranslationKey]
++---
++
++The translation key creates a relationship between all translations of a given page. The translation key is derived from the file path, or from the `translationKey` parameter if defined in front matter.
++
++With this site configuration:
++
++{{< code-toggle file=hugo >}}
++defaultContentLanguage = 'en'
++
++[languages.en]
++contentDir = 'content/en'
++languageCode = 'en-US'
++languageName = 'English'
++weight = 1
++
++[languages.de]
++contentDir = 'content/de'
++languageCode = 'de-DE'
++languageName = 'Deutsch'
++weight = 2
++{{< /code-toggle >}}
++
++And this content:
++
++```text
++content/
++├── de/
++│   ├── books/
++│   │   ├── buch-1.md
++│   │   └── book-2.md
++│   └── _index.md
++├── en/
++│   ├── books/
++│   │   ├── book-1.md
++│   │   └── book-2.md
++│   └── _index.md
++└── _index.md
++```
++
++And this front matter:
++
++{{< code-toggle file=content/en/books/book-1.md fm=true >}}
++title = 'Book 1'
++translationKey = 'foo'
++{{< /code-toggle >}}
++
++{{< code-toggle file=content/de/books/buch-1.md fm=true >}}
++title = 'Buch 1'
++translationKey = 'foo'
++{{< /code-toggle >}}
++
++When rendering either either of the pages above:
++
++```go-html-template
++{{ .TranslationKey }} → page/foo
++```
++
++If the front matter of Book 2, in both languages, does not include a translation key:
++
++```go-html-template
++{{ .TranslationKey }} → page/books/book-2
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7aaee75ab7aa62e592f78dd01139bb866da0f377
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,88 @@@
++---
++title: Translations
++description: Returns all translation of the given page, excluding the current language.  
++categories: []
++keywords: []
++action:
++  related:
++   - methods/page/AllTranslations
++   - methods/page/IsTranslated
++   - methods/page/TranslationKey
++  returnType: page.Pages
++  signatures: [PAGE.Translations]
++---
++
++With this site configuration:
++
++{{< code-toggle file=hugo >}}
++defaultContentLanguage = 'en'
++
++[languages.en]
++contentDir = 'content/en'
++languageCode = 'en-US'
++languageName = 'English'
++weight = 1
++
++[languages.de]
++contentDir = 'content/de'
++languageCode = 'de-DE'
++languageName = 'Deutsch'
++weight = 2
++
++[languages.fr]
++contentDir = 'content/fr'
++languageCode = 'fr-FR'
++languageName = 'Français'
++weight = 3
++{{< /code-toggle >}}
++
++And this content:
++
++```text
++content/
++├── de/
++│   ├── books/
++│   │   ├── book-1.md
++│   │   └── book-2.md
++│   └── _index.md
++├── en/
++│   ├── books/
++│   │   ├── book-1.md
++│   │   └── book-2.md
++│   └── _index.md
++├── fr/
++│   ├── books/
++│   │   └── book-1.md
++│   └── _index.md
++└── _index.md
++```
++
++And this template:
++
++```go-html-template
++{{ with .Translations }}
++  <ul>
++    {{ range . }}
++      {{ $lang := .Language.LanguageName}}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }} ({{ $lang }})</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++Hugo will render this list on the "Book 1" page of the English site:
++
++```html
++<ul>
++  <li><a href="/de/books/book-1/">Book 1 (Deutsch)</a></li>
++  <li><a href="/fr/books/book-1/">Book 1 (Français)</a></li>
++</ul>
++```
++
++Hugo will render this list on the "Book 2" page of the English site:
++
++```html
++<ul>
++  <li><a href="/de/books/book-1/">Book 1 (Deutsch)</a></li>
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e6051f0cd4a274713bc9cdc8e93634384a7088c5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,35 @@@
++---
++title: Truncated
++description: Reports whether the content length exceeds the summary length.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Summary
++  returnType: bool
++  signatures: [PAGE.Truncated]
++---
++
++There are three ways to define the [content summary]:
++
++1. Let Hugo create the summary based on the first 70 words. You can change the number of words by setting the `summaryLength` in your site configuration.
++2. Manually split the content with a `<--more-->` tag in markdown. Everything before the tag is included in the summary.
++3. Create a `summary` field in front matter.
++
++{{% note %}}
++The `Truncated` method returns `false` if you define the summary in front matter.
++{{% /note %}}
++
++The `Truncated` method returns `true` if the content length exceeds the summary length. This is useful for rendering a "read more" link:
++
++```go-html-template
++{{ range .Pages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++  {{ .Summary }}
++  {{ if .Truncated }}
++    <a href="{{ .RelPermalink }}">Read more...</a>
++  {{ end }}
++{{ end }}
++```
++
++[content summary]: /content-management/summaries
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b7c62372b4f07f4955388cc54a0c554302f7d822
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,56 @@@
++---
++title: Type
++description: Returns the content type of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Kind
++    - methods/page/Layout
++    - methods/page/Type
++  returnType: string
++  signatures: [PAGE.Type]
++---
++
++The `Type` method on a `Page` object returns the [content type] of the given page. The content type is defined by the `type` field in front matter,  or inferred from the top-level directory name if the `type` field in front matter is not defined.
++
++With this content structure:
++
++```text
++content/
++├── auction/
++│   ├── _index.md
++│   ├── item-1.md
++│   └── item-2.md  <-- front matter: type = books
++├── books/
++│   ├── _index.md
++│   ├── book-1.md
++│   └── book-2.md
++├── films/
++│   ├── _index.md
++│   ├── film-1.md 
++│   └── film-2.md
++└── _index.md
++```
++
++To list the books, regardless of [section]:
++
++```go-html-template
++{{ range where .Site.RegularPages.ByTitle "Type" "books" }}
++  <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
++{{ end }}
++```
++
++Hugo renders this to;
++
++```html
++<h2><a href="/books/book-1/">Book 1</a></h2>
++<h2><a href="/books/book-2/">Book 2</a></h2>
++<h2><a href="/auction/item-2/">Item 2</a></h2>
++```
++
++The `type` field in front matter is also useful for targeting a template. See&nbsp;[details].
++
++[content type]: /getting-started/glossary/#content-type
++[details]: /templates/lookup-order/#target-a-template
++[section]: /getting-started/glossary/#section
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..75c75db86a94af192034762fc188f074e6429c88
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,27 @@@
++---
++title: Weight
++description: Returns the weight of the given page as defined in front matter.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: int
++  signatures: [PAGE.Weight]
++---
++
++The `Weight` method on a `Page` object returns the [weight] of the given page as defined in front matter.
++
++[weight]: /getting-started/glossary/#weight
++
++{{< code-toggle file=content/recipes/sushi.md fm=true >}}
++title = 'How to make spicy tuna hand rolls'
++weight = 42
++{{< /code-toggle >}}
++
++Page weight controls the position of a page within a collection that is sorted by weight. Assign weights using non-zero integers. Lighter items float to the top, while heavier items sink to the bottom. Unweighted or zero-weighted elements are placed at the end of the collection.
++
++Although rarely used within a template, you can access the value with:
++
++```go-html-template
++{{ .Weight }} → 42
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bb1fdcf9414eeefcc1563d83e042a79b5090bec6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++---
++title: WordCount
++description: Returns the number of words in the content of the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/FuzzyWordCount
++    - methods/page/ReadingTime
++  returnType: int
++  signatures: [PAGE.WordCount]
++---
++
++```go-html-template
++{{ .WordCount }} → 103
++```
++
++To round up to nearest multiple of 100, use the [`FuzzyWordCount`] method.
++
++[`FuzzyWordCount`]: /methods/page/fuzzywordcount
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7dc60078939450a9bf83148ceda3b0bc4122fea8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++---
++# Do not remove front matter.
++---
++
++A _section_ is a top-level content directory, or any content directory with an&nbsp;_index.md&nbsp;file.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..25944464a7cfd039d21b3bf62471fb2e16968a32
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,11 @@@
++---
++# Do not remove front matter.
++---
++
++Hugo generates one or more files per page when building a site. For example, when rendering home, [section], [taxonomy], and [term] pages, Hugo generates an HTML file and an RSS file. Both HTML and RSS are built-in _output formats_. Create multiple output formats, and control generation based on [page kind], or by enabling one or more output formats for one or more pages. See&nbsp;[details].
++
++[section]: /getting-started/glossary/#section
++[taxonomy]: /getting-started/glossary/#taxonomy
++[term]: /getting-started/glossary/#term
++[page kind]: /getting-started/glossary/#page-kind
++[details]: /templates/output-formats
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5e7111fe52bd3a7b7229de60742396c2c72703b3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,27 @@@
++---
++# Do not remove front matter.
++---
++
++Get IDENTIFIER
++: (`any`) Returns the `OutputFormat` object with the given identifier.
++
++MediaType
++: (`media.Type`) Returns the media type of the output format.
++
++MediaType.MainType
++: (`string`) Returns the main type of the output format's media type.
++
++MediaType.SubType
++: (`string`) Returns the subtype of the current format's media type.
++
++Name
++: (`string`) Returns the output identifier of the output format.
++
++Permalink
++: (`string`) Returns the permalink of the page generated by the current output format.
++
++Rel
++: (`string`) Returns the `rel` value of the output format, either the default or as defined in the site configuration.
++
++RelPermalink
++: (`string`) Returns the relative permalink of the page generated by the current output format.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c09b4aadc4b5cceff934ddc825e29e0df137b916
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,79 @@@
++---
++# Do not remove front matter.
++---
++
++## Methods
++
++Set
++: Sets the value of a given key.
++
++```go-html-template
++{{ .Scratch.Set "greeting" "Hello" }}
++```
++
++Get
++: Gets the value of a given key.
++
++```go-html-template
++{{ .Scratch.Set "greeting" "Hello" }}
++{{ .Scratch.Get "greeting" }} → Hello
++```
++
++Add
++: Adds a given value to existing value(s) of the given key.
++
++: For single values, `Add` accepts values that support Go's `+` operator. If the first `Add` for a key is an array or slice, the following adds will be appended to that list.
++
++```go-html-template
++{{ .Scratch.Set "greeting" "Hello" }}
++{{ .Scratch.Add "greeting" "Welcome" }}
++{{ .Scratch.Get "greeting" }} → HelloWelcome
++```
++
++```go-html-template
++{{ .Scratch.Set "total" 3 }}
++{{ .Scratch.Add "total" 7 }}
++{{ .Scratch.Get "total" }} → 10
++```
++
++```go-html-template
++{{ .Scratch.Set "greetings" (slice "Hello") }}
++{{ .Scratch.Add "greetings" (slice "Welcome" "Cheers") }}
++{{ .Scratch.Get "greetings" }} → [Hello Welcome Cheers]
++```
++
++SetInMap
++: Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`.
++
++```go-html-template
++{{ .Scratch.SetInMap "greetings" "english" "Hello" }}
++{{ .Scratch.SetInMap "greetings" "french" "Bonjour" }}
++{{ .Scratch.Get "greetings" }} → map[english:Hello french:Bonjour]
++```
++
++DeleteInMap
++: Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`.
++
++```go-html-template
++{{ .Scratch.SetInMap "greetings" "english" "Hello" }}
++{{ .Scratch.SetInMap "greetings" "french" "Bonjour" }}
++{{ .Scratch.DeleteInMap "greetings" "english" }}
++{{ .Scratch.Get "greetings" }} → map[french:Bonjour]
++```
++
++GetSortedMapValues
++: Returns an array of values from `key` sorted by `mapKey`.
++
++```go-html-template
++{{ .Scratch.SetInMap "greetings" "english" "Hello" }}
++{{ .Scratch.SetInMap "greetings" "french" "Bonjour" }}
++{{ .Scratch.GetSortedMapValues "greetings" }} → [Hello Bonjour]
++```
++
++Delete
++: Removes the given key.
++
++```go-html-template
++{{ .Scratch.Set "greeting" "Hello" }}
++{{ .Scratch.Delete "greeting" }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..278541c5ab835c8100c5dbfd856e1eb23e6ad817
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Page methods
++linkTitle: Page
++description: Use these methods with a Page object.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: methods
++---
++
++Use these methods with a Page object.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..eb4e8653547562423d7740b39d82d5dbc2223fac
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++---
++title: ByDate
++description: Returns the given page collection sorted by date in ascending order.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/ByExpiryDate
++    - methods/pages/ByLastMod
++    - methods/pages/ByPublishDate
++  returnType: page.Pages
++  signatures: [PAGES.ByDate]
++---
++
++When sorting by date, the value is determined by your [site configuration], defaulting to the `date` field in front matter.
++
++[site configuration]: /getting-started/configuration/#configure-dates
++
++```go-html-template
++{{ range .Pages.ByDate }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++To sort in descending order:
++
++```go-html-template
++{{ range .Pages.ByDate.Reverse }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..41753c340055e8460595e82edf209a23d3d4412a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++---
++title: ByExpiryDate
++description: Returns the given page collection sorted by expiration date in ascending order.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/ByDate
++    - methods/pages/ByLastMod
++    - methods/pages/ByPublishDate
++  returnType: page.Pages
++  signatures: [PAGES.ByExpiryDate]
++---
++
++When sorting by expiration date, the value is determined by your [site configuration], defaulting to the `expiryDate` field in front matter.
++
++[site configuration]: /getting-started/configuration/#configure-dates
++
++```go-html-template
++{{ range .Pages.ByExpiryDate }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++To sort in descending order:
++
++```go-html-template
++{{ range .Pages.ByExpiryDate.Reverse }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..30d87f95434fc220190f25f4885a246b689167e6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++---
++title: ByLanguage
++description: Returns the given page collection sorted by language in ascending order.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.Pages
++  signatures: [PAGES.ByLanguage]
++---
++
++```go-html-template
++{{ range .Site.AllPages.ByLanguage }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++To sort in descending order:
++
++```go-html-template
++{{ range .Site.AllPages.ByLanguage.Reverse }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..385093134e01106a38582cca3e32277b757b0894
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++---
++title: ByLastmod
++description: Returns the given page collection sorted by last modification date in ascending order.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/ByDate
++    - methods/pages/ByExpiryDate
++    - methods/pages/ByPublishDate
++  returnType: page.Pages
++  signatures: [PAGES.ByLastmod]
++---
++
++When sorting by last modification date, the value is determined by your [site configuration], defaulting to the `lastmod` field in front matter.
++
++[site configuration]: /getting-started/configuration/#configure-dates
++
++```go-html-template
++{{ range .Pages.ByLastmod }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++To sort in descending order:
++
++```go-html-template
++{{ range .Pages.ByLastmod.Reverse }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..602b548c26134e2e4c9d7cc7f92d5fd51d094c10
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++---
++title: ByLength
++description: Returns the given page collection sorted by content length in ascending order.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.Pages
++  signatures: [PAGES.ByLength]
++---
++
++```go-html-template
++{{ range .Pages.ByLength }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++To sort in descending order:
++
++```go-html-template
++{{ range .Pages.ByLength.Reverse }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..073b1e1ba336777939ed771c451d26b51db8bea1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++---
++title: ByLinkTitle
++description: Returns the given page collection sorted by link title in ascending order, falling back to title if link title is not defined.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/ByTitle
++    - methods/pages/ByParam
++  returnType: page.Pages
++  signatures: [PAGES.ByLinkTitle]
++---
++
++```go-html-template
++{{ range .Pages.ByLinkTitle }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++To sort in descending order:
++
++```go-html-template
++{{ range .Pages.ByLinkTitle.Reverse }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9a919cc886f86845cdd17ae35afce22827e7dcdb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: ByParam
++description: Returns the given page collection sorted by the given parameter in ascending order.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/ByTitle
++    - methods/pages/ByLinkTitle
++  returnType: page.Pages
++  signatures: [PAGES.ByParam PARAM]
++---
++
++If the given parameter is not present in front matter, Hugo will use the matching parameter in your site configuration if present.
++
++```go-html-template
++{{ range .Pages.ByParam "author" }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++To sort in descending order:
++
++```go-html-template
++{{ range (.Pages.ByParam "author").Reverse }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++If the targeted parameter is nested, access the field using dot notation:
++
++```go-html-template
++{{ range .Pages.ByParam "author.last_name" }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e622636a28fa466af613da66ed2f7edf462e6b37
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++---
++title: ByPublishDate
++description: Returns the given page collection sorted by publish date in ascending order.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/ByDate
++    - methods/pages/ByExpiryDate
++    - methods/pages/ByLastMod
++  returnType: page.Pages
++  signatures: [PAGES.ByPublishDate]
++---
++
++When sorting by publish date, the value is determined by your [site configuration], defaulting to the `publishDate` field in front matter.
++
++[site configuration]: /getting-started/configuration/#configure-dates
++
++```go-html-template
++{{ range .Pages.ByPublishDate }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++To sort in descending order:
++
++```go-html-template
++{{ range .Pages.ByPublishDate.Reverse }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ee54d5cdaec62043bf1efbc486cef6e94439a75e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++---
++title: ByTitle
++description: Returns the given page collection sorted by title in ascending order.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/ByLinkTitle
++    - methods/pages/ByParam
++  returnType: page.Pages
++  signatures: [PAGES.ByTitle]
++---
++
++```go-html-template
++{{ range .Pages.ByTitle }}
++  <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
++{{ end }}
++```
++
++To sort in descending order:
++
++```go-html-template
++{{ range .Pages.ByTitle.Reverse }}
++  <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4eafee11f12531de89c3b6500b6967ee3f86cb7f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,28 @@@
++---
++title: ByWeight
++description: Returns the given page collection sorted by weight in ascending order.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.Pages
++  signatures: [PAGES.ByWeight]
++---
++
++Assign a [weight] to a page using the `weight` field in front matter. The weight must be a non-zero integer. Lighter items float to the top, while heavier items sink to the bottom. Unweighted or zero-weighted pages are placed at the end of the collection.
++
++[weight]: /getting-started/glossary/#weight
++
++```go-html-template
++{{ range .Pages.ByWeight }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++To sort in descending order:
++
++```go-html-template
++{{ range .Pages.ByWeight.Reverse }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b46a39bdfb21b937c23fd92bb88132a8d9d0ff96
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: GroupBy
++description: Returns the given page collection grouped by the given field in ascending order.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.PagesGroup
++  signatures: ['PAGES.GroupBy FIELD [SORT]']
++---
++
++{{% include "methods/pages/_common/group-sort-order.md" %}}
++
++```go-html-template
++{{ range .Pages.GroupBy "Section" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++To sort the groups in descending order:
++
++```go-html-template
++{{ range .Pages.GroupBy "Section" "desc" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8b5fcd6f15aac754e5dc804d012b76c92c422a77
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,68 @@@
++---
++title: GroupByDate
++description: Returns the given page collection grouped by date in descending order.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/GroupByExpiryDate
++    - methods/pages/GroupByLastMod
++    - methods/pages/GroupByParamDate
++    - methods/pages/GroupByPublishDate
++  returnType: page.PagesGroup
++  signatures: ['PAGES.GroupByDate LAYOUT [SORT]']
++---
++
++When grouping by date, the value is determined by your [site configuration], defaulting to the `date` field in front matter.
++
++The [layout string] has the same format as the layout string for the [`time.Format`] function. The resulting group key is [localized] for language and region.
++
++[`time.Format`]: /functions/time/format/
++[layout string]: #layout-string
++[localized]: /getting-started/glossary/#localization
++[site configuration]: /getting-started/configuration/#configure-dates
++
++{{% include "methods/pages/_common/group-sort-order.md" %}}
++
++To group content by year and month:
++
++```go-html-template
++{{ range .Pages.GroupByDate "January 2006" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++To sort the groups in ascending order:
++
++```go-html-template
++{{ range .Pages.GroupByDate "January 2006" "asc" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++The pages within each group will also be sorted by date, either ascending or descending depending on the grouping option. To sort the pages within each group, use one of the sorting methods. For example, to sort the pages within each group by title:
++
++```go-html-template
++{{ range .Pages.GroupByDate "January 2006" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages.ByTitle }}
++      <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++## Layout string
++
++{{% include "functions/_common/time-layout-string.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a9b248297c07843e0e560378bb05a2d276fe72cd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,68 @@@
++---
++title: GroupByExpiryDate
++description: Returns the given page collection grouped by expiration date in descending order.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/GroupByDate
++    - methods/pages/GroupByLastMod
++    - methods/pages/GroupByParamDate
++    - methods/pages/GroupByPublishDate
++  returnType: page.PagesGroup
++  signatures: ['PAGES.GroupByExpiryDate LAYOUT [SORT]']
++---
++
++When grouping by expiration date, the value is determined by your [site configuration], defaulting to the `expiryDate` field in front matter.
++
++The [layout string] has the same format as the layout string for the [`time.Format`] function. The resulting group key is [localized] for language and region.
++
++[`time.Format`]: /functions/time/format/
++[layout string]: #layout-string
++[localized]: /getting-started/glossary/#localization
++[site configuration]: /getting-started/configuration/#configure-dates
++
++{{% include "methods/pages/_common/group-sort-order.md" %}}
++
++To group content by year and month:
++
++```go-html-template
++{{ range .Pages.GroupByExpiryDate "January 2006" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++To sort the groups in ascending order:
++
++```go-html-template
++{{ range .Pages.GroupByExpiryDate "January 2006" "asc" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++The pages within each group will also be sorted by expiration date, either ascending or descending depending on your grouping option. To sort the pages within each group, use one of the sorting methods. For example, to sort the pages within each group by title:
++
++```go-html-template
++{{ range .Pages.GroupByExpiryDate "January 2006" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages.ByTitle }}
++      <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++## Layout string
++
++{{% include "functions/_common/time-layout-string.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..87769252163cb8649e97dc0fe452515492e8d3d3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,68 @@@
++---
++title: GroupByLastmod
++description: Returns the given page collection grouped by last modification date in descending order.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/GroupByDate
++    - methods/pages/GroupByExpiryDate
++    - methods/pages/GroupByParamDate
++    - methods/pages/GroupByPublishDate
++  returnType: page.PagesGroup
++  signatures: ['PAGES.GroupByLastmod LAYOUT [SORT]']
++---
++
++When grouping by last modification date, the value is determined by your [site configuration], defaulting to the `lastmod` field in front matter.
++
++The [layout string] has the same format as the layout string for the [`time.Format`] function. The resulting group key is [localized] for language and region.
++
++[`time.Format`]: /functions/time/format/
++[layout string]: #layout-string
++[localized]: /getting-started/glossary/#localization
++[site configuration]: /getting-started/configuration/#configure-dates
++
++{{% include "methods/pages/_common/group-sort-order.md" %}}
++
++To group content by year and month:
++
++```go-html-template
++{{ range .Pages.GroupByLastmod "January 2006" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++To sort the groups in ascending order:
++
++```go-html-template
++{{ range .Pages.GroupByLastmod "January 2006" "asc" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++The pages within each group will also be sorted by last modification date, either ascending or descending depending on your grouping option. To sort the pages within each group, use one of the sorting methods. For example, to sort the pages within each group by title:
++
++```go-html-template
++{{ range .Pages.GroupByLastmod "January 2006" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages.ByTitle }}
++      <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++## Layout string
++
++{{% include "functions/_common/time-layout-string.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9c63ab902d7d9872714b44dbf24d4154c2585f2d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: GroupByParam
++description: Returns the given page collection grouped by the given parameter in ascending order.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.PagesGroup
++  signatures: ['PAGES.GroupByParam PARAM [SORT]']
++---
++
++{{% include "methods/pages/_common/group-sort-order.md" %}}
++
++```go-html-template
++{{ range .Pages.GroupByParam "color" }}
++  <p>{{ .Key | title }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++To sort the groups in descending order:
++
++```go-html-template
++{{ range .Pages.GroupByParam "color" "desc" }}
++  <p>{{ .Key | title }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c7fedbb1a64f6e5cec742a4d2725623fc3cfd0a1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,65 @@@
++---
++title: GroupByParamDate
++description: Returns the given page collection grouped by the given date parameter in descending order.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/GroupByDate
++    - methods/pages/GroupByExpiryDate
++    - methods/pages/GroupByLastMod
++    - methods/pages/GroupByPublishDate
++  returnType: page.PagesGroup
++  signatures: ['PAGES.GroupByParamDate PARAM LAYOUT [SORT]']
++---
++
++The [layout string] has the same format as the layout string for the [`time.Format`] function. The resulting group key is [localized] for language and region.
++
++[`time.Format`]: /functions/time/format/
++[layout string]: #layout-string
++[localized]: /getting-started/glossary/#localization
++
++{{% include "methods/pages/_common/group-sort-order.md" %}}
++
++To group content by year and month:
++
++```go-html-template
++{{ range .Pages.GroupByParamDate "eventDate" "January 2006" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++To sort the groups in ascending order:
++
++```go-html-template
++{{ range .Pages.GroupByParamDate "eventDate" "January 2006" "asc" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++The pages within each group will also be sorted by the parameter date, either ascending or descending depending on your grouping option. To sort the pages within each group, use one of the sorting methods. For example, to sort the pages within each group by title:
++
++```go-html-template
++{{ range .Pages.GroupByParamDate "eventDate" "January 2006" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages.ByTitle }}
++      <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++## Layout string
++
++{{% include "functions/_common/time-layout-string.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f6603e8580657e2796ec4aeb676e6b66645b758e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,68 @@@
++---
++title: GroupByPublishDate
++description: Returns the given page collection grouped by publish date in descending order.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/GroupByDate
++    - methods/pages/GroupByExpiryDate
++    - methods/pages/GroupByLastMod
++    - methods/pages/GroupByParamDate
++  returnType: page.PagesGroup
++  signatures: ['PAGES.GroupByPublishDate LAYOUT [SORT]']
++---
++
++When grouping by publish date, the value is determined by your [site configuration], defaulting to the `publishDate` field in front matter.
++
++The [layout string] has the same format as the layout string for the [`time.Format`] function. The resulting group key is [localized] for language and region.
++
++[`time.Format`]: /functions/time/format/
++[layout string]: #layout-string
++[localized]: /getting-started/glossary/#localization
++[site configuration]: /getting-started/configuration/#configure-dates
++
++{{% include "methods/pages/_common/group-sort-order.md" %}}
++
++To group content by year and month:
++
++```go-html-template
++{{ range .Pages.GroupByPublishDate "January 2006" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++To sort the groups in ascending order:
++
++```go-html-template
++{{ range .Pages.GroupByPublishDate "January 2006" "asc" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++The pages within each group will also be sorted by publish date, either ascending or descending depending on your grouping option. To sort the pages within each group, use one of the sorting methods. For example, to sort the pages within each group by title:
++
++```go-html-template
++{{ range .Pages.GroupByPublishDate "January 2006" }}
++  <p>{{ .Key }}</p>
++  <ul>
++    {{ range .Pages.ByTitle }}
++      <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++## Layout string
++
++{{% include "functions/_common/time-layout-string.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0a5989a1a6792a1078633e00abf4fb47cda53f86
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++---
++title: Len
++description: Returns the number of pages in the given page collection.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: int
++  signatures: [PAGES.Len]
++---
++
++```go-html-template
++{{ .Pages.Len }} → 42
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bf889fd7eb41ed520ec601bfbab25f8ab038d6b3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: Limit
++description: Returns the first N pages from the given page collection.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.Pages
++  signatures: [PAGES.Limit NUMBER]
++---
++
++```go-html-template
++{{ range .Pages.Limit 3 }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..638822e5de25168544a13491dcc08ad86cad4c0d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,55 @@@
++---
++title: Next
++description: Returns the next page in a local page collection, relative to the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/Prev
++    - methods/page/Next
++    - methods/page/NextInSection
++    - methods/page/Prev
++    - methods/page/PrevInSection
++  returnType: hugolib.pageState
++  signatures: [PAGES.Next PAGE]
++toc: true
++---
++
++The behavior of the `Prev` and `Next` methods on a `Pages` objects is probably the reverse of what you expect.
++
++With this content structure and the page collection sorted by weight in ascending order:
++
++```text
++content/
++├── pages/
++│   ├── _index.md
++│   ├── page-1.md   <-- front matter: weight = 10
++│   ├── page-2.md   <-- front matter: weight = 20
++│   └── page-3.md   <-- front matter: weight = 30
++└── _index.md
++```
++
++When you visit page-2:
++
++- The `Prev` method points to page-3
++- The `Next` method points to page-1
++
++{{% note %}}
++Use the opposite label in your navigation links as shown in the example below.
++{{% /note %}}
++
++```go-html-template
++{{ $pages := where .Site.RegularPages.ByWeight "Section" "pages" }}
++
++{{ with $pages.Next . }}
++  <a href="{{ .RelPermalink }}">Previous</a>
++{{ end }}
++
++{{ with $pages.Prev . }}
++  <a href="{{ .RelPermalink }}">Next</a>
++{{ end }}
++```
++
++## Compare to Page methods
++
++{{% include "methods/_common/next-prev-on-page-vs-next-prev-on-pages.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3a4dcfd1d685d0f20fa7be53de09971314e3b6c2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,55 @@@
++---
++title: Prev
++description: Returns the previous page in a local page collection, relative to the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/pages/Next
++    - methods/page/Next
++    - methods/page/NextInSection
++    - methods/page/Prev
++    - methods/page/PrevInSection
++  returnType: hugolib.pageStates
++  signatures: [PAGES.Prev PAGE]
++toc: true
++---
++
++The behavior of the `Prev` and `Next` methods on a `Pages` objects is probably the reverse of what you expect.
++
++With this content structure and the page collection sorted by weight in ascending order:
++
++```text
++content/
++├── pages/
++│   ├── _index.md
++│   ├── page-1.md   <-- front matter: weight = 10
++│   ├── page-2.md   <-- front matter: weight = 20
++│   └── page-3.md   <-- front matter: weight = 30
++└── _index.md
++```
++
++When you visit page-2:
++
++- The `Prev` method points to page-3
++- The `Next` method points to page-1
++
++{{% note %}}
++Use the opposite label in your navigation links as shown in the example below.
++{{% /note %}}
++
++```go-html-template
++{{ $pages := where .Site.RegularPages.ByWeight "Section" "pages" }}
++
++{{ with $pages.Next . }}
++  <a href="{{ .RelPermalink }}">Previous</a>
++{{ end }}
++
++{{ with $pages.Prev . }}
++  <a href="{{ .RelPermalink }}">Next</a>
++{{ end }}
++```
++
++## Compare to Page methods
++
++{{% include "methods/_common/next-prev-on-page-vs-next-prev-on-pages.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1cee8874577c44cac35384cc9e4fb0621918f4cc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,79 @@@
++---
++title: Related
++description: Returns a collection of pages related to the given page.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/HeadingsFiltered
++    - functions/collections/KeyVals
++  returnType: page.Pages
++  signatures:
++    - PAGES.Related PAGE
++    - PAGES.Related OPTIONS
++---
++
++Based on front matter, Hugo uses several factors to identify content related to the given page. Use the default [related content configuration], or tune the results to the desired indices and parameters. See&nbsp;[details].
++
++The argument passed to the `Related` method may be a `Page` or an options map. For example, to pass the current page:
++
++{{< code file=layouts/_default/single.html  >}}
++{{ with .Site.RegularPages.Related . | first 5 }}
++  <p>Related pages:</p>
++  <ul>
++    {{ range . }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++{{< /code >}}
++
++To pass an options map:
++
++{{< code file=layouts/_default/single.html  >}}
++{{ $opts := dict
++  "document" .
++  "indices" (slice "tags" "keywords")
++}}
++{{ with .Site.RegularPages.Related $opts | first 5 }}
++  <p>Related pages:</p>
++  <ul>
++    {{ range . }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++{{< /code >}}
++
++
++## Options
++
++indices
++: (`slice`) The indices to search within.
++
++document
++: (`page`) The page for which to find related content. Required when specifying an options map.
++
++namedSlices
++: (`slice`) The keywords to search for, expressed as a slice of `KeyValues` using the [`keyVals`] function.
++
++[`keyVals`]: /functions/collections/keyvals/
++
++fragments
++: (`slice`) A list of special keywords that is used for indices configured as type "fragments". This will match the [fragment] identifiers of the documents.
++
++A contrived example using all of the above:
++
++```go-html-template
++{{ $page := . }}
++{{ $opts := dict
++  "indices" (slice "tags" "keywords")
++  "document" $page
++  "namedSlices" (slice (keyVals "tags" "hugo" "rocks") (keyVals "date" $page.Date))
++  "fragments" (slice "heading-1" "heading-2")
++}}
++```
++
++[details]: /content-management/related/
++[fragment]: /getting-started/glossary/#fragment
++[related content configuration]: /content-management/related/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e03e0ea472f8ad2ca225d8d0057d91bb17db4389
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: Reverse
++description: Returns the given page collection in reverse order.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.Pages
++  signatures: [PAGES.Reverse]
++---
++
++```go-html-template
++{{ range .Pages.ByDate.Reverse }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bb5be82f6c340dd6a95f003fff04ff2bea432652
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,5 @@@
++---
++# Do not remove front matter.
++---
++
++For the optional sort order, specify either `asc` for ascending order, or `desc` for descending order.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d8a64f5d5f8f8d86dc8b816b7ec7260819b54080
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++title: Pages methods
++linkTitle: Pages
++description: Use these methods with a collection of Page objects.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: methods
++aliases: [/variables/pages]
++---
++
++Use these methods with a collection of Page objects.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1452d558f78a28013d389031151e06709e807a68
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,22 @@@
++---
++title: Colors
++description: Applicable to images, returns a slice of the most dominant colors using a simple histogram method.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: '[]string'
++  signatures: [RESOURCE.Colors]
++---
++
++{{< new-in 0.104.0 >}}
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ .Colors }} → [#bebebd #514947 #768a9a #647789 #90725e #a48974]
++{{ end }}
++```
++
++This method is fast, but if you also scale down your images, it would be good for performance to extract the colors from the scaled image.
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a5945ff6568ddfc347cf4a63521036f416d1e1eb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,61 @@@
++---
++title: Content
++description: Returns the content of the given resource.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: any
++  signatures: [RESOURCE.Content]
++toc:
++---
++
++The `Content` method on a `Resource` object returns `template.HTML` when the resource type is `page`, otherwise it returns a `string`.
++
++[resource type]: /methods/resource/resourcetype
++
++{{< code file=assets/quotations/kipling.txt >}}
++He travels the fastest who travels alone.
++{{< /code >}}
++
++To get the content:
++
++```go-html-template
++{{ with resources.Get "quotations/kipling.txt" }}
++  {{ .Content }} → He travels the fastest who travels alone.
++{{ end }}
++```
++
++To get the size in bytes:
++
++```go-html-template
++{{ with resources.Get "quotations/kipling.txt" }}
++  {{ .Content | len }} → 42
++{{ end }}
++```
++
++To create an inline image:
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  <img src="data:{{ .MediaType.Type }};base64,{{ .Content | base64Encode }}">
++{{ end }}
++```
++
++To create inline CSS:
++
++```go-html-template
++{{ with resources.Get "css/style.css" }}
++  <style>{{ .Content | safeCSS }}</style>
++{{ end }}
++```
++
++To create inline JavaScript:
++
++```go-html-template
++{{ with resources.Get "js/script.js" }}
++  <script>{{ .Content | safeJS }}</script>
++{{ end }}
++```
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..711fc07b0d8cc8263dd1d65f3d78ddc173d37b54
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,48 @@@
++---
++title: Crop
++description: Applicable to images, returns an image resource cropped to the given dimensions without resizing.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/Fit
++    - methods/resource/Fill
++    - methods/resource/Resize
++    - methods/resource/Process
++    - functions/images/Process
++  returnType: images.ImageResource
++  signatures: [RESOURCE.Crop SPEC]
++toc: true
++---
++
++Crop an image to match the given dimensions without resizing. You must provide both width and height.
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Crop "200x200" }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
++
++{{% include "/methods/resource/_common/processing-spec.md" %}}
++
++## Example
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Crop "200x200 topright webp q85 lanczos" }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Process"
++  filterArgs="crop 200x200 topright webp q85 lanczos"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0fbaf61990604d3b61fc43d19b3bcc3c48dfe9de
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,53 @@@
++---
++title: Data
++description: Applicable to resources returned by the resources.GetRemote function, returns information from the HTTP response.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/resources/GetRemote
++    - methods/resource/Err
++  returnType: map
++  signatures: [RESOURCE.Data]
++---
++
++The `Data` method on a resource returned by the [`resources.GetRemote`] function returns information from the HTTP response.
++
++[`resources.GetRemote`]: functions/resources/getremote
++
++```go-html-template
++{{ $url := "https://example.org/images/a.jpg" }}
++{{ with resources.GetRemote $url }}
++  {{ with .Err }}
++    {{ errorf "%s" . }}
++  {{ else }}
++    {{ with .Data }}
++      {{ .ContentLength }} → 42764
++      {{ .ContentType }} → image/jpeg
++      {{ .Status }} → 200 OK
++      {{ .StatusCode }} → 200
++      {{ .TransferEncoding }} → []
++    {{ end }}
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get remote resource %q" $url }}
++{{ end }}
++```
++
++ContentLength
++: (`int`) The content length in bytes.
++
++ContentType
++: (`string`) The content type.
++
++Status
++: (`string`) The HTTP status text.
++
++StatusCode
++: (`int`) The HTTP status code.
++
++TransferEncoding
++: (`string`) The transfer encoding.
++
++
++[`resources.GetRemote`]: functions/resources/getremote
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f4b410aa7ab47a2fa750a13e550c850056a81346
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,56 @@@
++---
++title: Err
++description: Applicable to resources returned by the resources.GetRemote function, returns an error message if the HTTP request fails, else nil. 
++categories: []
++keywords: []
++action:
++  related:
++    - functions/resources/GetRemote
++    - methods/resource/Data
++  returnType: resource.resourceError
++  signatures: [RESOURCE.Err]
++---
++
++The `Err` method on a resource returned by the [`resources.GetRemote`] function returns an error message if the HTTP request fails, else nil. If you do not handle the error yourself, Hugo will fail the build.
++
++[`resources.GetRemote`]: functions/resources/getremote
++
++In this example we send an HTTP request to a nonexistent domain:
++
++```go-html-template
++{{ $url := "https://broken-example.org/images/a.jpg" }}
++{{ with resources.GetRemote $url }}
++  {{ with .Err }}
++    {{ errorf "%s" . }}
++  {{ else }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get remote resource %q" $url }}
++{{ end }}
++```
++
++The code above captures the error from the HTTP request, then fails the build:
++
++```text
++ERROR error calling resources.GetRemote: Get "https://broken-example.org/images/a.jpg": dial tcp: lookup broken-example.org on 127.0.0.53:53: no such host
++```
++
++To log an error as a warning instead of an error:
++
++```go-html-template
++{{ $url := "https://broken-example.org/images/a.jpg" }}
++{{ with resources.GetRemote $url }}
++  {{ with .Err }}
++    {{ warnf "%s" . }}
++  {{ else }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ else }}
++  {{ errorf "Unable to get remote resource %q" $url }}
++{{ end }}
++```
++
++{{% note %}}
++An HTTP response with a 404 status code is not an HTTP request error. To handle 404 status codes, code defensively using the nested `with-else-end` construct as shown above.
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..75071153a8f86dc664a7d103a60ba7a7f942da05
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,78 @@@
++---
++title: Exif
++description: Applicable to images, returns an EXIF object containing image metadata.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: exif.ExifInfo
++  signatures: [RESOURCE.Exif]
++toc: true
++---
++
++Applicable to images, the `Exif` method on an image `Resource` object returns an [EXIF] object containing image metadata.
++
++## Methods
++
++Date
++: (`time.Time`) Returns the image creation date/time. Format with the [`time.Format`]function.
++
++Lat
++: (`float64`) Returns the GPS latitude in degrees.
++
++Long
++: (`float64`) Returns the GPS longitude in degrees.
++
++Tags
++: (`exif.Tags`) Returns a collection of the available EXIF tags for this image. You may include or exclude specific tags from this collection in the [site configuration].
++
++## Examples
++
++To list the creation date, location, and EXIF tags:
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ with .Exif }}
++    <p>Date: {{ .Date }}</p>
++    <p>Lat/Long: {{ .Lat }}/{{ .Long }}</p>
++    {{ with .Tags }}
++      <p>Tags</p>
++      <table>
++        <thead>
++          <tr><th>Tag</th><th>Value</th></tr>
++        </thead>
++        <tbody>
++          {{ range $k, $v := . }}
++          <tr><td>{{ $k }}</td><td>{{ $v }}</td></tr>
++          {{ end }}
++        </tbody>
++      </table>
++    {{ end }}
++  {{ end }}
++{{ end }}
++```
++
++To list specific values:
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ with .Exif }}
++    <ul>
++      {{ with .Date }}<li>Date: {{ .Format "January 02, 2006" }}</li>{{ end }}
++      {{ with .Tags.ApertureValue }}<li>Aperture: {{ lang.FormatNumber 2 . }}</li>{{ end }}
++      {{ with .Tags.BrightnessValue }}<li>Brightness: {{ lang.FormatNumber 2 . }}</li>{{ end }}
++      {{ with .Tags.ExposureTime }}<li>Exposure Time: {{ . }}</li>{{ end }}
++      {{ with .Tags.FNumber }}<li>F Number: {{ . }}</li>{{ end }}
++      {{ with .Tags.FocalLength }}<li>Focal Length: {{ . }}</li>{{ end }}
++      {{ with .Tags.ISOSpeedRatings }}<li>ISO Speed Ratings: {{ . }}</li>{{ end }}
++      {{ with .Tags.LensModel }}<li>Lens Model: {{ . }}</li>{{ end }}
++    </ul>
++  {{ end }}
++{{ end }}
++```
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
++
++[exif]: https://en.wikipedia.org/wiki/Exif
++[site configuration]: /content-management/image-processing/#exif-data
++[`time.Format`]: /functions/time/format
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8bbaf93eec5c8192f2810f83536c4bf0a78bcacb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,48 @@@
++---
++title: Fill
++description:  Applicable to images, returns an image resource cropped and resized to the given dimensions.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/Crop
++    - methods/resource/Fit
++    - methods/resource/Resize
++    - methods/resource/Process
++    - functions/images/Process
++  returnType: images.ImageResource
++  signatures: [RESOURCE.Fill SPEC]
++toc: true
++---
++
++Crop and resize an image to match the given dimensions. You must provide both width and height.
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Fill "200x200" }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
++
++{{% include "/methods/resource/_common/processing-spec.md" %}}
++
++## Example
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Fill "200x200 top webp q85 lanczos" }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Process"
++  filterArgs="fill 200x200 top webp q85 lanczos"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..329168da7c925e0538d1e0d4c3f3535358f2627b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,68 @@@
++---
++title: Filter
++description: Applicable to images, applies one or more image filters to the given image resource.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/images/Filter
++  returnType: resources.resourceAdapter
++  signatures: [RESOURCE.Filter FILTER...]
++toc: true
++---
++
++Apply one or more [image filters](#image-filters) to the given image.
++
++To apply a single filter:
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Filter images.Grayscale }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++To apply two or more filters, executing from left to right:
++
++```go-html-template
++{{ $filters := slice
++  images.Grayscale
++  (images.GaussianBlur 8)
++}}
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Filter $filters }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++You can also apply image filters using the [`images.Filter`] function.
++
++[`images.Filter`]: /functions/images/filter
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
++
++## Example
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Filter images.Grayscale }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Grayscale"
++  filterArgs=""
++  example=true
++>}}
++
++## Image filters
++
++Use any of these filters with the `Filter` method.
++
++{{< list-pages-in-section path=/functions/images filter=functions_images_no_filters filterType=exclude >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..13354fe5a3137853f4dfb9d0db08f83d2f78394d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,48 @@@
++---
++title: Fit
++description: Applicable to images, returns an image resource downscaled to fit the given dimensions while maintaining aspect ratio. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/Crop
++    - methods/resource/Fill
++    - methods/resource/Resize
++    - methods/resource/Process
++    - functions/images/Process
++  returnType: images.ImageResource
++  signatures: [RESOURCE.Fit SPEC]
++toc: true
++---
++
++Downscale an image to fit the given dimensions while maintaining aspect ratio. You must provide both width and height.
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Fit "200x200" }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
++
++{{% include "/methods/resource/_common/processing-spec.md" %}}
++
++## Example
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Fit "300x175 webp q85 lanczos" }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Process"
++  filterArgs="fit 300x175 webp q85 lanczos"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..dcaf6c514ff261f65ec236f0ce273bbef133fd26
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,27 @@@
++---
++title: Height
++description: Applicable to images, returns the height of the given resource.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/Width
++  returnType: int
++  signatures: [RESOURCE.Height]
++---
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ .Height }} → 400
++{{ end }}
++```
++
++Use the `Width` and `Height` methods together when rendering an `img` element:
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
++{{ end }}
++```
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..15927aea90907c235f1b8f568b0a1610c66ba912
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,45 @@@
++---
++title: Key
++description: Returns the unique key for the given resource, equivalent to its publishing path.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/Permalink
++    - methods/resource/RelPermalink
++    - methods/resource/Publish
++  returnType: string
++  signatures: [RESOURCE.Key]
++---
++
++By way of example, consider this site configuration:
++
++{{< code-toggle file=hugo >}}
++baseURL = 'https://example.org/docs/'
++{{< /code-toggle >}}
++
++And this template:
++
++```go-html-template
++  {{ with resources.Get "images/a.jpg" }}
++    {{ with resources.Copy "foo/bar/b.jpg" . }}
++      {{ .Key }} → foo/bar/b.jpg
++
++      {{ .Name }} → images/a.jpg
++      {{ .Title }} → images/a.jpg
++
++      {{ .RelPermalink }} → /docs/foo/bar/b.jpg
++    {{ end }}
++  {{ end }}
++```
++
++We used the [`resources.Copy`] function to change the publishing path. The `Key` method returns the updated path, but note that it is different than the value returned by [`RelPermalink`]. The `RelPermalink` value includes the subdirectory segment of the `baseURL` in the site configuration.
++
++The `Key` method is useful if you need to get the resource's publishing path without publishing the resource. Unlike the `Permalink`, `RelPermalink`, or `Publish` methods, calling `Key` will not publish the resource.
++
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
++
++[`Permalink`]: /methods/resource/permalink
++[`RelPermalink`]: /methods/resource/relpermalink
++[`resources.Copy`]: /functions/resources/copy
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6dea8706cd958215564570094b876d8ad589fca4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,52 @@@
++---
++title: MediaType
++description: Returns a media type object for the given resource.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: media.Type
++  signatures: [RESOURCE.MediaType]
++---
++
++The `MediaType` method on a `Resource` object returns an object with additional methods.
++
++## Methods
++
++Type
++: (`string`) The resource's media type.
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ .MediaType.Type }} → image/jpeg
++{{ end }}
++```
++
++MainType
++: (`string`) The main type of the resource’s media type.
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ .MediaType.MainType }} → image
++{{ end }}
++```
++
++SubType
++: (`string`) The subtype of the resource’s media type. This may or may not correspond to the file suffix.
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ .MediaType.SubType }} → jpeg
++{{ end }}
++```
++
++Suffixes
++: (`slice`) A slice of possible file suffixes for the resource’s media type.
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ .MediaType.Suffixes }} → [jpg jpeg jpe jif jfif]
++{{ end }}
++```
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..01b75e5b2445ac88289a8997afc2dd345f380142
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,82 @@@
++---
++title: Name
++description: Returns the name of the given resource as optionally defined in front matter, falling back to a relative path or hashed file name depending on resource type.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/Title
++  returnType: string
++  signatures: [RESOURCE.Name]
++toc: true
++---
++
++The value returned by the `Name` method on a `Resource` object depends on the resource type.
++
++## Global resource
++
++With a [global resource], the `Name` method returns the path to the resource, relative to the assets directory.
++
++```text
++assets/
++└── images/
++    └── a.jpg
++```
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ .Name }} → images/a.jpg
++{{ end }}
++```
++
++## Page resource
++
++With a [page resource], the `Name` method returns the path to the resource, relative to the page bundle.
++
++```text
++content/
++├── posts/
++│   ├── post-1/
++│   │   ├── images/
++│   │   │   └── a.jpg
++│   │   └── index.md
++│   └── _index.md
++└── _index.md
++```
++
++```go-html-template
++{{ with .Resources.Get "images/a.jpg" }}
++  {{ .Name }} → images/a.jpg
++{{ end }}
++```
++
++If you create an element in the `resources` array in front matter, the `Name` method returns the value of the `name` parameter:
++
++{{< code-toggle file=content/posts/post-1.md fm=true >}}
++title = 'Post 1'
++[[resources]]
++src = 'images/a.jpg'
++name = 'cat'
++title = 'Felix the cat'
++[resources.params]
++temperament = 'malicious'
++{{< /code-toggle >}}
++
++```go-html-template
++{{ with .Resources.Get "cat" }}
++  {{ .Name }} →  cat
++{{ end }}
++```
++## Remote resource
++
++With a [remote resource], the `Name` method returns a hashed file name.
++
++```go-html-template
++{{ with resources.GetRemote "https://example.org/images/a.jpg" }}
++  {{ .Name }} → a_18432433023265451104.jpg
++{{ end }}
++```
++
++[global resource]: /getting-started/glossary/#global-resource
++[page resource]: /getting-started/glossary/#page-resource
++[remote resource]: /getting-started/glossary/#remote-resource
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..275182c46910689ac9568f9219aacd9670269357
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,65 @@@
++---
++title: Params
++description: Returns a map of resource parameters as defined in front matter.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: map
++  signatures: [RESOURCE.Params]
++---
++
++Use the `Params` method with [page resources]. It is not applicable to either [global] or [remote] resources.
++
++[global]: /getting-started/glossary/#global-resource
++[page resources]: /getting-started/glossary/#page-resource
++[remote]: /getting-started/glossary/#remote-resource
++
++With this content structure:
++
++```text
++content/
++├── posts/
++│   ├── cats/
++│   │   ├── images/
++│   │   │   └── a.jpg
++│   │   └── index.md
++│   └── _index.md
++└── _index.md
++```
++
++And this front matter:
++
++{{< code-toggle file=content/posts/cats.md fm=true >}}
++title = 'Cats'
++[[resources]]
++  src = 'images/a.jpg'
++  title = 'Felix the cat'
++  [resources.params]
++    alt = 'Photograph of black cat'
++    temperament = 'vicious'
++{{< /code-toggle >}}
++
++And this template:
++
++```go-html-template
++{{ with .Resources.Get "images/a.jpg" }}
++  <figure>
++    <img alt="{{ .Params.alt }}" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
++    <figcaption>{{ .Title }} is {{ .Params.temperament }}</figcaption>
++  </figure>
++{{ end }}
++```
++
++Hugo renders:
++
++```html
++<figure>
++  <img alt="Photograph of black cat" src="/posts/post-1/images/a.jpg" width="600" height="400">
++  <figcaption>Felix the cat is vicious</figcaption>
++</figure>
++```
++
++See the [page resources] section for more information.
++
++[page resources]: /content-management/page-resources
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ab0ad41b0e4fb9d8c06feb98acf62f63239c3938
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++---
++title: Permalink
++description:  Publishes the given resource and returns its permalink.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/RelPermalink
++    - methods/resource/Publish
++    - methods/resource/Key
++  returnType: string
++  signatures: [RESOURCE.Permalink]
++---
++
++The `Permalink` method on a `Resource` object writes the resource to the publish directory, typically `public`, and returns its [permalink].
++
++[permalink]: /getting-started/glossary/#permalink
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ .Permalink }} → https://example.org/images/a.jpg
++{{ end }}
++```
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3c88492df44d8de80bb907db3c25509ac215e0ac
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,66 @@@
++---
++title: Process
++description: Applicable to images, returns an image resource processed with the given specification.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/Crop
++    - methods/resource/Fit
++    - methods/resource/Fill
++    - methods/resource/Resize
++    - functions/images/Process
++  returnType: images.ImageResource
++  signatures: [RESOURCE.Process SPEC]
++toc: true
++---
++
++Process an image with the given specification. The specification can contain an optional action, one of `crop`, `fill`, `fit`, or `resize`. This means that you can use this method instead of [`Crop`], [`Fill`], [`Fit`], or [`Resize`].
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Process "crop 200x200" }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++You can also use this method to apply simple transformations such as rotation and conversion:
++
++```go-html-template
++{{/* Rotate 90 degrees counter-clockwise. */}}
++{{ $image := $image.Process "r90" }}
++
++{{/* Convert to WebP. */}}
++{{ $image := $image.Process "webp" }}
++```
++
++The `Process` method is also available as a filter, which is more effective if you need to apply multiple filters to an image. See [`images.Process`].
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
++
++{{% include "/methods/resource/_common/processing-spec.md" %}}
++
++## Example
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Process "crop 200x200 topright webp q85 lanczos" }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Process"
++  filterArgs="crop 200x200 topright webp q85 lanczos"
++  example=true
++>}}
++
++[`Crop`]: /methods/resource/crop
++[`Fill`]: /methods/resource/fill
++[`Fit`]: /methods/resource/fit
++[`Resize`]: /methods/resource/resize
++[`images.Process`]: /functions/images/process
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b090bfe5ab94bd70778d5d4d5665e0dd6b3c889d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,35 @@@
++---
++title: Publish
++description: Publishes the given resource.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/Permalink
++    - methods/resource/RelPermalink
++    - methods/resource/Key
++  returnType: nil
++  signatures: [RESOURCE.Publish]
++---
++
++The `Publish` method on a `Resource` object writes the resource to the publish directory, typically `public`.
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ .Publish }}
++{{ end }}
++```
++
++The `Permalink` and `RelPermalink` methods also publish a resource. `Publish` is a convenience method for publishing without a return value. For example, this:
++
++```go-html-template
++{{ $resource.Publish }}
++```
++
++Instead of this:
++
++```go-html-template
++{{ $noop := $resource.Permalink }}
++```
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2b96c35d739280856c959c637bf05cad41a488e5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++---
++title: RelPermalink
++description: Publishes the given resource and returns its relative permalink.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/Permalink
++    - methods/resource/Publish
++    - methods/resource/Key
++  returnType: string
++  signatures: [RESOURCE.RelPermalink]
++---
++
++The `Permalink` method on a `Resource` object writes the resource to the publish directory, typically `public`, and returns its [relative permalink].
++
++[relative permalink]: /getting-started/glossary/#relative-permalink
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ .RelPermalink }} → /images/a.jpg
++{{ end }}
++```
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4ba054bb5029beb3c97529545ff73c4857a327fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,49 @@@
++---
++title: Resize
++description: Applicable to images, returns an image resource resized to the given width and/or height.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/Crop
++    - methods/resource/Fit
++    - methods/resource/Fill
++    - methods/resource/Process
++    - functions/images/Process
++  returnType: images.ImageResource
++  signatures: [RESOURCE.Resize SPEC]
++---
++
++Resize an image to the given width and/or height.
++
++If you specify both width and height, the resulting image will be disproportionally scaled unless the original image has the same aspect ratio.
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Resize "300x" }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
++
++{{% include "/methods/resource/_common/processing-spec.md" %}}
++
++## Example
++
++```go-html-template
++{{ with resources.Get "images/original.jpg" }}
++  {{ with .Resize "300x webp q85 lanczos" }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++{{< img
++  src="images/examples/zion-national-park.jpg"
++  alt="Zion National Park"
++  filter="Process"
++  filterArgs="resize 300x webp q85 lanczos"
++  example=true
++>}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..db52e7b10b29a2d1a94ef474e559a55da243ef3d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,43 @@@
++---
++title: ResourceType
++description: Returns the main type of the given resource's media type.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: string
++  signatures: [RESOURCE.ResourceType]
++---
++
++Common resource types include `audio`, `image`, `text`, and `video`.
++
++```go-html-template
++{{ with resources.Get "image/a.jpg" }}
++  {{ .ResourceType }} → image
++  {{ .MediaType.MainType }} → image
++{{ end }}
++```
++
++When working with content files, the resource type is `page`.
++
++```text
++content/
++├── lessons/
++│   ├── lesson-1/
++│   │   ├── _objectives.md  <-- resource type = page
++│   │   ├── _topics.md      <-- resource type = page
++│   │   ├── _example.jpg    <-- resource type = image
++│   │   └── index.md
++│   └── _index.md
++└── _index.md
++```
++
++With the structure above, we can range through page resources of type `page` to build content:
++
++{{< code file=layouts/lessons/single.html  >}}
++{{ range .Resources.ByType "page" }}
++  {{ .Content }}
++{{ end }}
++{{< /code >}}
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e30f86d2e2947ab0e536ef895f5f942cd4b0738d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,95 @@@
++---
++title: Title
++description: Returns the title of the given resource as optionally defined in front matter, falling back to a relative path or hashed file name depending on resource type.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/Name
++  returnType: string
++  signatures: [RESOURCE.Title]
++toc: true
++---
++
++The value returned by the `Title` method on a `Resource` object depends on the resource type.
++
++## Global resource
++
++With a [global resource], the `Title` method returns the path to the resource, relative to the assets directory.
++
++```text
++assets/
++└── images/
++    └── a.jpg
++```
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ .Title }} → images/a.jpg
++{{ end }}
++```
++
++## Page resource
++
++With a [page resource], the `Title` method returns the path to the resource, relative to the page bundle.
++
++```text
++content/
++├── posts/
++│   ├── post-1/
++│   │   ├── images/
++│   │   │   └── a.jpg
++│   │   └── index.md
++│   └── _index.md
++└── _index.md
++```
++
++```go-html-template
++{{ with .Resources.Get "images/a.jpg" }}
++  {{ .Title }} → images/a.jpg
++{{ end }}
++```
++
++If you create an element in the `resources` array in front matter, the `Title` method returns the value of the `title` parameter:
++
++{{< code-toggle file=content/posts/post-1.md fm=true >}}
++title = 'Post 1'
++[[resources]]
++src = 'images/a.jpg'
++name = 'cat'
++title = 'Felix the cat'
++[resources.params]
++temperament = 'malicious'
++{{< /code-toggle >}}
++
++```go-html-template
++{{ with .Resources.Get "cat" }}
++  {{ .Title }} →  Felix the cat
++{{ end }}
++```
++
++If the page resource is a content file, the `Title` methods return the `title` field as defined in front matter.
++
++```text
++content/
++├── lessons/
++│   ├── lesson-1/
++│   │   ├── _objectives.md  <-- resource type = page
++│   │   └── index.md
++│   └── _index.md
++└── _index.md
++```
++
++## Remote resource
++
++With a [remote resource], the `Title` method returns a hashed file name.
++
++```go-html-template
++{{ with resources.GetRemote "https://example.org/images/a.jpg" }}
++  {{ .Title }} → a_18432433023265451104.jpg
++{{ end }}
++```
++
++[global resource]: /getting-started/glossary/#global-resource
++[page resource]: /getting-started/glossary/#page-resource
++[remote resource]: /getting-started/glossary/#remote-resource
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8b96c95e84242051f815a689e5524dcc3a360333
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,27 @@@
++---
++title: Width
++description: Applicable to images, returns the width of the given resource.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/resource/Height
++  returnType: int
++  signatures: [RESOURCE.Width]
++---
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  {{ .Width }} → 600
++{{ end }}
++```
++
++Use the `Width` and `Height` methods together when rendering an `img` element:
++
++```go-html-template
++{{ with resources.Get "images/a.jpg" }}
++  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
++{{ end }}
++```
++
++{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4ea4d1b8745e5fadbec5fc1732fc37e237396f11
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++# Do not remove front matter.
++---
++
++{{% note %}}
++
++Use this method with [global], [page], or [remote] resources.
++
++[global]: /getting-started/glossary/#global-resource
++[page]: /getting-started/glossary/#page-resource
++[remote]: /getting-started/glossary/#remote-resource
++
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b12a21d3a607e7d8d87331d03e8db14acd6653b5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++# Do not remove front matter.
++---
++
++## Process specification
++
++The process specification is a space-delimited, case-insensitive list of one or more of the following in any sequence:
++
++action
++: Applicable to the [`Process`](/methods/resource/process) method only. Specify zero or one of `crop`, `fill`, `fit`, or `resize`. If you specify an action you must also provide dimensions.
++
++dimensions
++: Provide width _or_ height when using the [`Resize`](/methods/resource/resize) method, else provide both width _and_ height. See&nbsp;[details](/content-management/image-processing/#dimensions).
++
++anchor
++: Use with the [`Crop`](/methods/resource/crop) and [`Fill`](/methods/resource/fill) methods. Specify zero or one of `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. Default is `Smart`. See&nbsp;[details](/content-management/image-processing/#anchor).
++
++rotation
++: Typically specify zero or one of `r90`, `r180`, or `r270`. Also supports arbitrary rotation angles. See&nbsp;[details](/content-management/image-processing/#rotation).
++
++target format
++: Specify zero or one of `gif`, `jpeg`, `png`, `tiff`, or `webp`. See&nbsp;[details](/content-management/image-processing/#target-format).
++
++quality
++: Applicable to JPEG and WebP images. Optionally specify `qN` where `N` is an integer in the range [0, 100]. Default is `75`. See&nbsp;[details](/content-management/image-processing/#quality).
++
++hint
++: Applicable to WebP images and equivalent to the `-preset` flag for the [`cwebp`] encoder. Specify zero or one of `drawing`, `icon`, `photo`, `picture`, or `text`. Default is `photo`. See&nbsp;[details](/content-management/image-processing/#hint).
++
++[`cwebp`]: https://developers.google.com/speed/webp/docs/cwebp
++
++background color
++: When converting a PNG or WebP with transparency to a format that does not support transparency, optionally specify a background color using a 3-digit or a 6-digit hexadecimal color code. Default is `#ffffff` (white). See&nbsp;[details](/content-management/image-processing/#background-color).
++
++resampling filter
++: Typically specify zero or one of `Box`, `Lanczos`, `CatmullRom`, `MitchellNetravali`, `Linear`, or `NearestNeighbor`. Other resampling filters are available. See&nbsp;[details](/content-management/image-processing/#resampling-filter).
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e9426e1a59bd970e9b971a92f6bb3e9a49a85850
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Resource methods
++linkTitle: Resource
++description: Use these methods with global, page, and remote Resource objects.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: methods
++---
++
++Use these methods with global, page, and remote Resource objects.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..cd674614f12e814819fa0691f0bed5a299b04b99
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,51 @@@
++---
++title: Get
++description: Returns the value of the given parameter.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/shortcode/IsNamedParams
++    - methods/shortcode/Params
++  returnType: any
++  signatures: [SHORTCODE.Get PARAM]
++toc: true
++---
++
++Specify the parameter by position or by name. When calling a shortcode within markdown, use either positional or named parameters, but not both.
++
++{{% note %}}
++Some shortcodes support positional parameters, some support named parameters, and others support both. Refer to the shortcode's documentation for usage details.
++{{% /note %}}
++
++## Positional parameters
++
++This shortcode call uses positional parameters:
++
++{{< code file=content/about.md lang=md >}}
++{{</* myshortcode "Hello" "world" */>}}
++{{< /code >}}
++
++To retrieve parameters by position:
++
++{{< code file=layouts/shortcodes/myshortcode.html  >}}
++{{ printf "%s %s." (.Get 0) (.Get 1) }} → Hello world.
++{{< /code >}}
++
++## Named parameters
++
++This shortcode call uses named parameters:
++
++{{< code file=content/about.md lang=md >}}
++{{</* myshortcode greeting="Hello" firstName="world" */>}}
++{{< /code >}}
++
++To retrieve parameters by name:
++
++{{< code file=layouts/shortcodes/myshortcode.html  >}}
++{{ printf "%s %s." (.Get "greeting") (.Get "firstName") }} → Hello world.
++{{< /code >}}
++
++{{% note %}}
++Parameter names are case-sensitive.
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..de7c284cb2c5c25ff38b24e2c5ef1de6d48a444f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,153 @@@
++---
++title: Inner
++description: Returns the content between opening and closing shortcode tags, applicable when the shortcode call includes a closing tag.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/strings/Trim
++    - methods/page/RenderString
++    - functions/transform/Markdownify
++    - methods/shortcode/InnerDeindent
++  returnType: template.HTML
++  signatures: [SHORTCODE.Inner]
++---
++
++This content:
++
++{{< code file=content/services.md lang=md >}}
++{{</* card title="Product Design" */>}}
++We design the **best** widgets in the world.
++{{</* /card */>}}
++{{< /code >}}
++
++With this shortcode:
++
++{{< code file=layouts/shortcodes/card.html  >}}
++<div class="card">
++  {{ with .Get "title" }}
++    <div class="card-title">{{ . }}</div>
++  {{ end }}
++  <div class="card-content">
++    {{ trim .Inner "\r\n" }}
++  </div>
++</div>
++{{< /code >}}
++
++Is rendered to:
++
++```html
++<div class="card">
++  <div class="card-title">Product Design</div>
++  <div class="card-content">
++    We design the **best** widgets in the world.
++  </div>
++</div>
++```
++
++{{% note %}}
++Content between opening and closing shortcode tags may include leading and/or trailing newlines, depending on placement within the markdown. Use the [`trim`] function as shown above to remove both carriage returns and newlines.
++
++[`trim`]: /functions/strings/trim
++{{% /note %}}
++
++{{% note %}}
++In the example above, the value returned by `Inner` is markdown, but it was rendered as plain text. Use either of the following approaches to render markdown to HTML.
++{{% /note %}}
++
++
++## Use the RenderString method
++
++Let's modify the example above to pass the value returned by `Inner` through the [`RenderString`] method on the `Page` object:
++
++[`RenderString`]: /methods/page/renderstring
++
++{{< code file=layouts/shortcodes/card.html  >}}
++<div class="card">
++  {{ with .Get "title" }}
++    <div class="card-title">{{ . }}</div>
++  {{ end }}
++  <div class="card-content">
++    {{ trim .Inner "\r\n" | .Page.RenderString }}
++  </div>
++</div>
++{{< /code >}}
++
++Hugo renders this to:
++
++```html
++<div class="card">
++  <div class="card-title">Product design</div>
++  <div class="card-content">
++    We produce the <strong>best</strong> widgets in the world.
++  </div>
++</div>
++```
++
++You can use the [`markdownify`] function instead of the `RenderString` method, but the latter is more flexible. See&nbsp;[details].
++
++[details]: /methods/page/renderstring
++[`markdownify`]: /functions/transform/markdownify
++
++## Use alternate notation
++
++Instead of calling the shortcode with the `{{</* */>}}` notation, use the `{{%/* */%}}` notation:
++
++{{< code file=content/services.md lang=md >}}
++{{%/* card title="Product Design" */%}}
++We design the **best** widgets in the world.
++{{%/* /card */%}}
++{{< /code >}}
++
++When you use the `{{%/* */%}}` notation, Hugo renders the entire shortcode as markdown, requiring the following changes.
++
++First, configure the renderer to allow raw HTML within markdown:
++
++{{< code-toggle file=hugo >}}
++[markup.goldmark.renderer]
++unsafe = true
++{{< /code-toggle >}}
++
++This configuration is not unsafe if _you_ control the content. Read more about Hugo's [security model].
++
++Second, because we are rendering the entire shortcode as markdown, we must adhere to the rules governing [indentation] and inclusion of [raw HTML blocks] as provided in the [CommonMark] specification.
++
++{{< code file=layouts/shortcodes/card.html  >}}
++<div class="card">
++  {{ with .Get "title" }}
++  <div class="card-title">{{ . }}</div>
++  {{ end }}
++  <div class="card-content">
++
++  {{ trim .Inner "\r\n" }}
++  </div>
++</div>
++{{< /code >}}
++
++The difference between this and the previous example is subtle but required. Note the change in indentation, the addition of a blank line, and removal of the `RenderString` method.
++
++```diff
++--- layouts/shortcodes/a.html
+++++ layouts/shortcodes/b.html
++@@ -1,8 +1,9 @@
++ <div class="card">
++   {{ with .Get "title" }}
++-    <div class="card-title">{{ . }}</div>
+++  <div class="card-title">{{ . }}</div>
++   {{ end }}
++   <div class="card-content">
++-    {{ trim .Inner "\r\n" | .Page.RenderString }}
+++
+++  {{ trim .Inner "\r\n" }}
++   </div>
++ </div>
++```
++
++{{% note %}}
++When using the `{{%/* */%}}` notation, do not pass the value returned by `Inner` through the `RenderString` method or  the `markdownify` function.
++{{% /note %}}
++
++[commonmark]: https://commonmark.org/
++[indentation]: https://spec.commonmark.org/0.30/#indented-code-blocks
++[raw html blocks]: https://spec.commonmark.org/0.30/#html-blocks
++[security model]: /about/security-model/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..136412bc75c30458c1a223f3f8c843b11830f2db
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,99 @@@
++---
++title: InnerDeindent
++description: Returns the content between opening and closing shortcode tags, with indentation removed, applicable when the shortcode call includes a closing tag. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/shortcode/Inner
++  returnType: template.HTML
++  signatures: [SHORTCODE.InnerDeindent]
++---
++
++Similar to the [`Inner`] method, `InnerDeindent` returns the content between opening and closing shortcode tags. However, with `InnerDeindent`, indentation before the content is removed.
++
++This allows us to effectively bypass the rules governing [indentation] as provided in the [CommonMark] specification.
++
++Consider this markdown, an unordered list with a small gallery of thumbnail images within each list item:
++
++{{< code file=content/about.md lang=md >}}
++- Gallery one
++
++    {{</* gallery */>}}
++    ![kitten a](thumbnails/a.jpg)
++    ![kitten b](thumbnails/b.jpg)
++    {{</* /gallery */>}}
++
++- Gallery two
++
++    {{</* gallery */>}}
++    ![kitten c](thumbnails/c.jpg)
++    ![kitten d](thumbnails/d.jpg)
++    {{</* /gallery */>}}
++{{< /code >}}
++
++In the example above, notice that the content between the opening and closing shortcode tags is indented by four spaces. Per the CommonMark specification, this is treated as an indented code block.
++
++With this shortcode, calling `Inner` instead of `InnerDeindent`:
++
++{{< code file=layouts/shortcodes/gallery.html  >}}
++<div class="gallery">
++  {{ trim .Inner "\r\n" | .Page.RenderString }}
++</div>
++{{< /code >}}
++
++Hugo renders the markdown to:
++
++```html
++<ul>
++  <li>
++    <p>Gallery one</p>
++    <div class="gallery">
++      <pre><code>![kitten a](images/a.jpg)
++      ![kitten b](images/b.jpg)
++      </code></pre>
++    </div>
++  </li>
++  <li>
++    <p>Gallery two</p>
++    <div class="gallery">
++      <pre><code>![kitten c](images/c.jpg)
++      ![kitten d](images/d.jpg)
++      </code></pre>
++    </div>
++  </li>
++</ul>
++```
++
++Although technically correct per the CommonMark specification, this is not what we want. If we remove the indentation using the `InnerDeindent` method:
++
++{{< code file=layouts/shortcodes/gallery.html  >}}
++<div class="gallery">
++  {{ trim .InnerDeindent "\r\n" | .Page.RenderString }}
++</div>
++{{< /code >}}
++
++Hugo renders the markdown to:
++
++```html
++<ul>
++  <li>
++    <p>Gallery one</p>
++    <div class="gallery">
++      <img src="images/a.jpg" alt="kitten a">
++      <img src="images/b.jpg" alt="kitten b">
++    </div>
++  </li>
++  <li>
++    <p>Gallery two</p>
++    <div class="gallery">
++      <img src="images/c.jpg" alt="kitten c">
++      <img src="images/d.jpg" alt="kitten d">
++    </div>
++  </li>
++</ul>
++```
++
++[commonmark]: https://commonmark.org/
++[indentation]: https://spec.commonmark.org/0.30/#indented-code-blocks
++[`Inner`]: /methods/shortcode/inner
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..83eeb2f74b798786582a1b8065a0e80fdad96474
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++---
++title: IsNamedParams
++description: Reports whether the shortcode call uses named parameters.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/shortcode/Get
++  returnType: bool
++  signatures: [SHORTCODE.IsNamedParams]
++---
++
++To support both positional and named parameters when calling a shortcode, use the `IsNamedParams` method to determine how the shortcode was called.
++
++With this shortcode template:
++
++{{< code file=layouts/shortcodes/myshortcode.html  >}}
++{{ if .IsNamedParams }}
++  {{ printf "%s %s." (.Get "greeting") (.Get "firstName") }}
++{{ else }}
++  {{ printf "%s %s." (.Get 0) (.Get 1) }}
++{{ end }}
++{{< /code >}}
++
++Both of these calls return the same value:
++
++{{< code file=content/about.md lang=md >}}
++{{</* myshortcode greeting="Hello" firstName="world" */>}}
++{{</* myshortcode "Hello" "world" */>}}
++{{< /code >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..18bddfe1f12c3ff9bb9518429b038fb1046cf6af
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,29 @@@
++---
++title: Name
++description: Returns the shortcode file name, excluding the file extension.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/shortcode/Position
++    - functions/fmt/Errorf
++  returnType: string
++  signatures: [SHORTCODE.Name]
++---
++
++The `Name` method is useful for error reporting. For example, if your shortcode requires a "greeting" parameter:
++
++{{< code file=layouts/shortcodes/myshortcode.html  >}}
++{{ $greeting := "" }}
++{{ with .Get "greeting" }}
++  {{ $greeting = . }}
++{{ else }}
++  {{ errorf "The %q shortcode requires a 'greeting' parameter. See %s" .Name .Position }}
++{{ end }}
++{{< /code >}}
++
++In the absence of a "greeting" parameter, Hugo will throw an error message and fail the build:
++
++```text
++ERROR The "myshortcode" shortcode requires a 'greeting' parameter. See "/home/user/project/content/about.md:11:1"
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9549402588638e40158ceda1ccc99d09b1277055
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,50 @@@
++---
++title: Ordinal
++description: Returns the zero-based ordinal of the shortcode in relation to its parent.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: int
++  signatures: [SHORTCODE.Ordinal]
++---
++
++The `Ordinal` method returns the zero-based ordinal of the shortcode in relation to its parent. If the parent is the page itself, the ordinal represents the position of this shortcode in the page content.
++
++This method is useful for, among other things, assigning unique element IDs when a shortcode is called two or more times from the same page. For example:
++
++{{< code file=content/about.md lang=md >}}
++{{</* img src="images/a.jpg" */>}}
++
++{{</* img src="images/b.jpg" */>}}
++{{< /code >}}
++
++This shortcode performs error checking, then renders an HTML `img` element with a unique `id` attribute:
++
++{{< code file=layouts/shortcodes/img.html  >}}
++{{ $src := "" }}
++{{ with .Get "src" }}
++  {{ $src = . }}
++  {{ with resources.Get $src }}
++    {{ $id := printf "img-%03d" $.Ordinal }}
++    <img id="{{ $id }}" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ else }}
++    {{ errorf "The %q shortcode was unable to find %s. See %s" $.Name $src $.Position }}
++  {{ end }}
++{{ else }}
++  {{ errorf "The %q shortcode requires a 'src' parameter. See %s" .Name .Position }}
++{{ end }}
++{{< /code >}}
++
++Hugo renders the page to:
++
++```html
++<img id="img-000" src="/images/a.jpg" width="600" height="400" alt="">
++<img id="img-001" src="/images/b.jpg" width="600" height="400" alt="">
++```
++
++{{% note %}}
++In the shortcode template above, the [`with`] statement is used to create conditional blocks. Remember that the `with` statement binds context (the dot) to its expression. Inside of a `with` block, preface shortcode method calls with a `$` to access the top level context passed into the template.
++
++[`with`]: /functions/go-template/with
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c9262ab485ef5e664c9a131303de32411bc11f6c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++---
++title: Page
++description: Returns the Page object from which the shortcode was called.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: hugolib.pageForShortcode
++  signatures: [SHORTCODE.Page]
++---
++
++With this content:
++
++{{< code-toggle file=content/books/les-miserables.md fm=true >}}
++title = 'Les Misérables'
++author = 'Victor Hugo'
++published = 1862
++isbn = '978-0451419439'
++{{< /code-toggle >}}
++
++Calling this shortcode:
++
++```text
++{{</* book-details */>}}
++```
++
++We can access the front matter values using the `Page` method:
++
++{{< code file=layouts/shortcodes/book-details.html  >}}
++<ul>
++  <li>Title: {{ .Page.Title }}</li>
++  <li>Author: {{ .Page.Params.author }}</li>
++  <li>Published: {{ .Page.Params.publication_year }}</li>
++  <li>ISBN: {{ .Page.Params.isbn }}</li>
++</ul>
++{{< /code >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..63df768a62afd9bf5133d8694766b837fd431175
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,33 @@@
++---
++title: Params
++description: Returns a collection of the shortcode parameters.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/shortcode/Get
++  returnType: any
++  signatures: [SHORTCODE.Params]
++---
++
++When you call a shortcode using positional parameters, the `Params` method returns a slice.
++
++{{< code file=content/about.md lang=md >}}
++{{</* myshortcode "Hello" "world" */>}}
++{{< /code >}}
++
++{{< code file=layouts/shortcodes/myshortcode.html  >}}
++{{ index .Params 0 }} → Hello
++{{ index .Params 1 }} → world
++{{< /code >}}
++
++When you call a shortcode using named parameters, the `Params` method returns a map.
++
++{{< code file=content/about.md lang=md >}}
++{{</* myshortcode greeting="Hello" name="world" */>}}
++{{< /code >}}
++
++{{< code file=layouts/shortcodes/myshortcode.html  >}}
++{{ .Params.greeting }} → Hello
++{{ .Params.name }} → world
++{{< /code >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..50ae521daf71722e4110e91157f003546ee80374
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,50 @@@
++---
++title: Parent
++description:  Returns the parent shortcode context in nested shortcodes.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: hugolib.ShortcodeWithPage
++  signatures: [SHORTCODE.Parent]
++---
++
++This is useful for inheritance of common shortcode parameters from the root.
++
++In this contrived example, the "greeting" shortcode is the parent, and the "now" shortcode is child.
++
++{{< code file=content/welcome.md lang=md >}}
++{{</* greeting dateFormat="Jan 2, 2006" */>}}
++Welcome. Today is {{</* now */>}}.
++{{</* /greeting */>}}
++{{< /code >}}
++
++{{< code file=layouts/shortcodes/greeting.html  >}}
++<div class="greeting">
++  {{ trim .Inner "\r\n" | .Page.RenderString }}
++</div>
++{{< /code >}}
++
++{{< code file=layouts/shortcodes/now.html  >}}
++{{- $dateFormat := "January 2, 2006 15:04:05" }}
++
++{{- with .Params }}
++  {{- with .dateFormat }}
++    {{- $dateFormat = . }}
++  {{- end }}
++{{- else }}
++  {{- with .Parent.Params }}
++    {{- with .dateFormat }}
++      {{- $dateFormat = . }}
++    {{- end }}
++  {{- end }}
++{{- end }}
++
++{{- now | time.Format $dateFormat -}}
++{{< /code >}}
++
++The "now" shortcode formats the current time using:
++
++1. The `dateFormat` parameter passed to the "now" shortcode, if present
++2. The `dateFormat` parameter passed to the "greeting" shortcode, if present
++3. The default layout string defined at the top of the shortcode
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..565a158bfe5b3326bfbb32e12b23a946801386ed
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,33 @@@
++---
++title: Position
++description: Returns the filename and position from which the shortcode was called.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/shortcode/Name
++    - functions/fmt/Errorf
++  returnType: text.Position
++  signatures: [SHORTCODE.Position]
++---
++
++The `Position` method is useful for error reporting. For example, if your shortcode requires a "greeting" parameter:
++
++{{< code file=layouts/shortcodes/myshortcode.html  >}}
++{{ $greeting := "" }}
++{{ with .Get "greeting" }}
++  {{ $greeting = . }}
++{{ else }}
++  {{ errorf "The %q shortcode requires a 'greeting' parameter. See %s" .Name .Position }}
++{{ end }}
++{{< /code >}}
++
++In the absence of a "greeting" parameter, Hugo will throw an error message and fail the build:
++
++```text
++ERROR The "myshortcode" shortcode requires a 'greeting' parameter. See "/home/user/project/content/about.md:11:1"
++```
++
++{{% note %}}
++The position can be expensive to calculate. Limit its use to error reporting.
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..293c772d9e62322ffdcdbb42ec8b5bf43bb23721
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,44 @@@
++---
++title: Ref
++description: Returns the absolute URL of the page with the given path, language, and output format.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/shortcode/RelRef
++    - functions/urls/RelRef
++    - functions/urls/Ref
++  returnType: string
++  signatures: [SHORTCODE.Ref OPTIONS]
++---
++
++The map of option contains:
++
++path
++: (`string`) The path to the page, relative to the content directory. Required.
++
++lang
++: (`string`) The language (site) to search for the page. Default is the current language. Optional.
++
++outputFormat
++: (`string`) The output format to search for the page. Default is the current output format. Optional.
++
++The examples below show the rendered output when visiting a page on the English language version of the site:
++
++```go-html-template
++{{ $opts := dict "path" "/books/book-1" }}
++{{ .Ref $opts }} → https://example.org/en/books/book-1/
++
++{{ $opts := dict "path" "/books/book-1" "lang" "de" }}
++{{ .Ref $opts }} → https://example.org/de/books/book-1/
++
++{{ $opts := dict "path" "/books/book-1" "lang" "de" "outputFormat" "json" }}
++{{ .Ref $opts }} → https://example.org/de/books/book-1/index.json
++```
++
++By default, Hugo will throw an error and fail the build if it cannot resolve the path. You can change this to a warning in your site configuration, and specify a URL to return when the path cannot be resolved.
++
++{{< code-toggle file=hugo >}}
++refLinksErrorLevel = 'warning'
++refLinksNotFoundURL = '/some/other/url'
++{{< /code-toggle >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..07f221a99ff2865dde8a91cb6ec1b0e2c90d270e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,44 @@@
++---
++title: RelRef
++description: Returns the relative URL of the page with the given path, language, and output format.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/shortcode/Ref
++    - functions/urls/Ref
++    - functions/urls/RelRef
++  returnType: string
++  signatures: [SHORTCODE.RelRef OPTIONS]
++---
++
++The map of option contains:
++
++path
++: (`string`) The path to the page, relative to the content directory. Required.
++
++lang
++: (`string`) The language (site) to search for the page. Default is the current language. Optional.
++
++outputFormat
++: (`string`) The output format to search for the page. Default is the current output format. Optional.
++
++The examples below show the rendered output when visiting a page on the English language version of the site:
++
++```go-html-template
++{{ $opts := dict "path" "/books/book-1" }}
++{{ .RelRef $opts }} → /en/books/book-1/
++
++{{ $opts := dict "path" "/books/book-1" "lang" "de" }}
++{{ .RelRef $opts }} → /de/books/book-1/
++
++{{ $opts := dict "path" "/books/book-1" "lang" "de" "outputFormat" "json" }}
++{{ .RelRef $opts }} → /de/books/book-1/index.json
++```
++
++By default, Hugo will throw an error and fail the build if it cannot resolve the path. You can change this to a warning in your site configuration, and specify a URL to return when the path cannot be resolved.
++
++{{< code-toggle file=hugo >}}
++refLinksErrorLevel = 'warning'
++refLinksNotFoundURL = '/some/other/url'
++{{< /code-toggle >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3ab195a3f034c46584e097459ac8a52fa2fe438d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++---
++title: Scratch
++description: Creates a "scratch pad" scoped to the shortcode to store and manipulate data. 
++categories: []
++keywords: []
++action:
++  related:
++    - functions/collections/NewScratch
++  returnType: maps.Scratch
++  signatures: [SHORTCODE.Scratch]
++---
++
++The `Scratch` method within a shortcode creates a [scratch pad] to store and manipulate data. The scratch pad is scoped to the shortcode, and is reset on server rebuilds.
++
++{{% note %}}
++With the introduction of the [`newScratch`] function, and the ability to [assign values to template variables] after initialization, the `Scratch` method within a shortcode is obsolete.
++
++[assign values to template variables]: https://go.dev/doc/go1.11#text/template
++[`newScratch`]: functions/collections/newscratch
++{{% /note %}}
++
++[scratch pad]: /getting-started/glossary/#scratch-pad
++
++{{% include "methods/page/_common/scratch-methods.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fa2d274deba9bd5ea28b7529df38e149a671e52b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++---
++title: Site
++description: Returns the Site object.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/Sites
++  returnType: page.siteWrapper
++  signatures: [SHORTCODE.Site]
++---
++
++See [Site methods].
++
++[Site methods]: /methods/site
++
++```go-html-template
++{{ .Site.Title }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d26366844fdb0688015c43b9c81182aceb34b5bf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Shortcode methods
++linkTitle: Shortcode
++description: Use these methods in your shortcode templates.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: methods
++---
++
++Use these methods in your shortcode templates.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8df6348f9b5e369feacf042007b79c70112c5cc9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++---
++title: AllPages
++description: Returns a collection of all pages in all languages.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/site/Pages
++    - methods/site/RegularPages
++    - methods/site/Sections
++  returnType: page.Pages
++  signatures: [SITE.AllPages]
++---
++
++This method returns all page [kinds] in all languages. That includes the home page, section pages, taxonomy pages, term pages, and regular pages.
++
++In most cases you should use the [`RegularPages`] method instead.
++
++[`RegularPages`]: methods/site/regularpages
++[kinds]: /getting-started/glossary/#page-kind
++
++```go-html-template
++{{ range .Site.AllPages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f9c43bca3574df33ca314d359f8272b84a54e615
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,37 @@@
++---
++title: BaseURL
++description: Returns the base URL as defined in the site configuration.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/urls/AbsURL
++    - functions/urls/AbsLangURL
++    - functions/urls/RelURL
++    - functions/urls/RelLangURL
++  returnType: string
++  signatures: [SITE.BaseURL]
++---
++
++Site configuration:
++
++{{< code-toggle file=hugo >}}
++baseURL = 'https://example.org/docs/'
++{{< /code-toggle >}}
++
++Template:
++
++```go-html-template
++{{ .Site.BaseURL }} → https://example.org/docs/
++```
++
++{{% note %}}
++There is almost never a good reason to use this method in your templates. Its usage tends to be fragile due to misconfiguration.
++
++Use the [`absURL`], [`absLangURL`], [`relURL`], or [`relLangURL`] functions instead.
++
++[`absURL`]: /functions/urls/absURL
++[`absLangURL`]: /functions/urls/absLangURL
++[`relURL`]: /functions/urls/relURL
++[`relLangURL`]: /functions/urls/relLangURL
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0d85c78fda3f789f7de415b2ab817d467ec5afec
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,28 @@@
++---
++title: BuildDrafts
++description: Reports whether the current build includes draft pages.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: bool
++  signatures: [SITE.BuildDrafts]
++---
++
++By default, draft pages are not published when building a site. You can change this behavior with a command line flag:
++
++```sh
++hugo --buildDrafts
++```
++
++Or by setting `buildDrafts` to `true` in your site configuration:
++
++{{< code-toggle file=hugo >}}
++buildDrafts = true
++{{< /code-toggle >}}
++
++Use the `BuildDrafts` method on a `Site` object to determine the current configuration:
++
++```go-html-template
++{{ .Site.BuildDrafts }} → true
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0ff4cddecbfaf85ad672ee678ec0e6ba2be024c0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,57 @@@
++---
++title: Config
++description: Returns a subset of the site configuration.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.SiteConfig
++  signatures: [SITE.Config]
++toc: true
++---
++
++The `Config` method on a `Site` object provides access to a subset of the site configuration, specifically the `services` and `privacy` keys.
++
++## Services
++
++These are the default service settings, typically used by Hugo's built-in templates and shortcodes.
++
++{{< code-toggle config=services />}}
++
++For example, to use Hugo's built-in Google Analytics template you must add a [Google tag ID]:
++
++[Google tag ID]: https://support.google.com/tagmanager/answer/12326985?hl=en
++
++{{< code-toggle file=hugo >}}
++[services.googleAnalytics]
++id = 'G-XXXXXXXXX'
++{{< /code-toggle >}}
++
++To access this value from a template:
++
++```go-html-template
++{{ .Site.Config.Services.GoogleAnalytics.ID }} → G-XXXXXXXXX
++```
++
++You must capitalize each identifier as shown above.
++
++## Privacy
++
++These are the default privacy settings, typically used by Hugo's built-in templates and shortcodes:
++
++{{< code-toggle config=privacy />}}
++
++For example, to disable usage of the built-in YouTube shortcode:
++
++{{< code-toggle file=hugo >}}
++[privacy.youtube]
++disable = true
++{{< /code-toggle >}}
++
++To access this value from a template:
++
++```go-html-template
++{{ .Site.Config.Privacy.YouTube.Disable }} → true
++```
++
++You must capitalize each identifier as shown above.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e2ae7d2a5a3c2aa944eb1e8f11e8b295cf16a93e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,22 @@@
++---
++title: Copyright
++description:  Returns the copyright notice as defined in the site configuration.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: string
++  signatures: [SITE.Copyright]
++---
++
++Site configuration:
++
++{{< code-toggle file=hugo >}}
++copyright = '© 2023 ABC Widgets, Inc.'
++{{< /code-toggle >}}
++
++Template:
++
++```go-html-template
++{{ .Site.Copyright }} → © 2023 ABC Widgets, Inc.
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b78caddec5e1349c75b2529145787d9d6b434798
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,108 @@@
++---
++title: Data
++description: Returns a data structure composed from the files in the data directory.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/collections/IndexFunction
++    - functions/transform/Unmarshal
++    - functions/collections/Where
++    - functions/collections/Sort
++  returnType: map
++  signatures: [SITE.Data]
++---
++
++Use the `Data` method on a `Site` object to access data within the data directory, or within any directory [mounted] to the data directory. Supported data formats include JSON, TOML, YAML, and XML.
++
++[mounted]: /hugo-modules/configuration/#module-configuration-mounts
++
++{{% note %}}
++Although Hugo can unmarshal CSV files with the [`transform.Unmarshal`] function, do not place CSV files in the data directory. You cannot access data within CSV files using this method.
++
++[`transform.Unmarshal`]: /functions/transform/unmarshal
++{{% /note %}}
++
++Consider this data directory:
++
++```text
++data/
++├── books/
++│   ├── fiction.yaml
++│   └── nonfiction.yaml
++├── films.json
++├── paintings.xml
++└── sculptures.toml
++```
++
++And these data files:
++
++{{< code file=data/books/fiction.yaml lang=yaml >}}
++- title: The Hunchback of Notre Dame
++  author: Victor Hugo
++  isbn: 978-0140443530
++- title: Les Misérables
++  author: Victor Hugo
++  isbn: 978-0451419439
++{{< /code >}}
++
++{{< code file=data/books/nonfiction.yaml lang=yaml >}}
++- title: The Ancien Régime and the Revolution
++  author: Alexis de Tocqueville
++  isbn: 978-0141441641
++- title: Interpreting the French Revolution
++  author: François Furet
++  isbn: 978-0521280495
++{{< /code >}}
++
++Access the data by [chaining] the [identifiers]:
++
++```go-html-template
++{{ range $category, $books := .Site.Data.books }}
++  <p>{{ $category | title }}</p>
++  <ul>
++    {{ range $books }}
++      <li>{{ .title }} ({{ .isbn }})</li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++Hugo renders this to:
++
++```html
++<p>Fiction</p>
++<ul>
++  <li>The Hunchback of Notre Dame (978-0140443530)</li>
++  <li>Les Misérables (978-0451419439)</li>
++</ul>
++<p>Nonfiction</p>
++<ul>
++  <li>The Ancien Régime and the Revolution (978-0141441641)</li>
++  <li>Interpreting the French Revolution (978-0521280495)</li>
++</ul>
++```
++
++To limit the listing to fiction, and sort by title:
++
++```go-html-template
++<ul>
++  {{ range sort .Site.Data.books.fiction "title" }}
++    <li>{{ .title }} ({{ .author }})</li>
++  {{ end }}
++</ul>
++```
++
++To find a fiction book by ISBN:
++
++```go-html-template
++{{ range where .Site.Data.books.fiction "isbn" "978-0140443530" }}
++  <li>{{ .title }} ({{ .author }})</li>
++{{ end }}
++```
++
++In the template examples above, each of the keys is a valid identifier. For example, none of the keys contains a hyphen. To access a key that is not a valid identifier, use the [`index`] function:
++
++[`index`]: /functions/collections/indexfunction
++[chaining]: /getting-started/glossary/#chain
++[identifiers]: /getting-started/glossary/#identifier
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..359b836af089d701e5ed95b92a0d017e3e8a639f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++---
++title: DisqusShortname
++description: Returns the Disqus shortname as defined in the site configuration.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: string
++  signatures: [SITE.DisqusShortname]
++# deprecated 2023-10-30
++expiryDate: 2024-10-30 
++_build:
++  list: never
++---
++
++{{% deprecated-in 0.120.0 %}}
++Use [`Site.Config.Services.Disqus.Shortname`] instead.
++
++[`Site.Config.Services.Disqus.Shortname`]: /methods/site/config
++{{% /deprecated-in %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1e949f37c926996dfba8825755556dd36ed80ce2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,109 @@@
++---
++title: GetPage
++description: Returns a Page object from the given path.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/GetPage
++  returnType: hugolib.pageState
++  signatures: [SITE.GetPage PATH]
++toc: true
++---
++
++The `GetPage` method is also available on `Page` objects, allowing you to specify a path relative to the current page. See&nbsp;[details].
++
++[details]: /methods/page/getpage
++
++When using the `GetPage` method on a `Site` object, specify a path relative to the content directory.
++
++If Hugo cannot resolve the path to a page, the method returns nil.
++
++Consider this content structure:
++
++```text
++content/
++├── works/
++│   ├── paintings/
++│   │   ├── _index.md
++│   │   ├── starry-night.md
++│   │   └── the-mona-lisa.md
++│   ├── sculptures/
++│   │   ├── _index.md
++│   │   ├── david.md
++│   │   └── the-thinker.md
++│   └── _index.md
++└── _index.md
++```
++
++This home page template:
++
++```go-html-template
++{{ with .Site.GetPage "/works/paintings" }}
++  <ul>
++    {{ range .Pages }}
++      <li>{{ .Title }} by {{ .Params.artist }}</li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++Is rendered to:
++
++```html
++<ul>
++  <li>Starry Night by Vincent van Gogh</li>
++  <li>The Mona Lisa by Leonardo da Vinci</li>
++</ul>
++```
++
++To get a regular page instead of a section page:
++
++```go-html-template
++{{ with .Site.GetPage "/works/paintings/starry-night" }}
++  {{ .Title }} → Starry Night
++  {{ .Params.artist }} → Vincent van Gogh
++{{ end }}
++```
++
++## Multilingual projects
++
++With multilingual projects, the `GetPage` method on a `Site` object resolves the given path to a page in the current language.
++
++To get a page from a different language, query the `Sites` object:
++
++```go-html-template
++{{ with where .Site.Sites "Language.Lang" "eq" "de" }}
++  {{ with index . 0 }}
++    {{ with .GetPage "/works/paintings/starry-night" }}
++      {{ .Title }} → Sternenklare Nacht
++    {{ end }}
++  {{ end }}
++{{ end }}
++```
++
++## Page bundles
++
++Consider this content structure:
++
++```text
++content/
++├── headless/    
++│   ├── a.jpg
++│   ├── b.jpg
++│   ├── c.jpg
++│   └── index.md  <-- front matter: headless = true
++└── _index.md
++```
++
++In the home page template, use the `GetPage` method on a `Site` object to render all the images in the headless [page bundle]:
++
++```go-html-template
++{{ with .Site.GetPage "/headless" }}
++  {{ range .Resources.ByType "image" }}
++    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++  {{ end }}
++{{ end }}
++```
++
++[page bundle]: /getting-started/glossary/#page-bundle
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..405cf0de5c7e3f5183cdfab7e2a76070006fe20e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++---
++title: GoogleAnalytics
++description: Returns the Google Analytics tracking ID as defined in the site configuration.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: string
++  signatures: [SITE.GoogleAnalytics]
++# deprecated 2023-10-30
++expiryDate: 2024-10-30 
++_build:
++  list: never
++---
++
++{{% deprecated-in 0.120.0 %}}
++Use [`Site.Config.Services.GoogleAnalytics.ID`] instead.
++
++[`Site.Config.Services.GoogleAnalytics.ID`]: /methods/site/config
++{{% /deprecated-in %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..52612dd12ed8386a1189807ad0050303c954be30
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++---
++title: Home
++description: Returns the home Page object for the given site.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: hugolib.pageState
++  signatures: [SITE.Home]
++---
++
++This method is useful for obtaining a link to the home page.
++
++Site configuration:
++
++{{< code-toggle file=hugo >}}
++baseURL = 'https://example.org/docs/'
++{{< /code-toggle >}}
++
++Template:
++
++```go-html-template
++{{ .Site.Home.Permalink }} → https://example.org/docs/ 
++{{ .Site.Home.RelPermalink }} → /docs/
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fdeae15fae053ea0966bded1405cf40ddcb4cbed
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++---
++title: IsDevelopment
++description: Reports whether the current running environment is “development”.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: bool
++  signatures: [SITE.IsDevelopment]
++# deprecated 2023-10-30
++expiryDate: 2024-10-30 
++_build:
++  list: never
++---
++
++{{% deprecated-in 0.120.0 %}}
++Use [`hugo.IsDevelopment`] instead.
++
++[`hugo.IsDevelopment`]: /functions/hugo/isdevelopment
++{{% /deprecated-in %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..61cc5e462401f9e6f2dc6d490087e419dda5d4c9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,34 @@@
++---
++title: IsMultiLingual
++description: Reports whether the site is multilingual.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: bool
++  signatures: [SITE.IsMultiLingual]
++---
++
++Site configuration:
++
++{{< code-toggle file=hugo >}}
++defaultContentLanguage = 'de'
++defaultContentLanguageInSubdir = true
++[languages]
++  [languages.de]
++    languageCode = 'de-DE'
++    languageName = 'Deutsch'
++    title = 'Projekt Dokumentation'
++    weight = 1
++  [languages.en]
++    languageCode = 'en-US'
++    languageName = 'English'
++    title = 'Project Documentation'
++    weight = 2
++{{< /code-toggle >}}
++
++Template:
++
++```go-html-template
++{{ .Site.IsMultiLingual }} → true
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c19a84bc9b3672b5bdce5c6eab2772a4b87c67e0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++---
++title: IsServer
++description: Reports whether the built-in development server is running.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: bool
++  signatures: [SITE.IsServer]
++# deprecated 2023-10-30
++expiryDate: 2024-10-30 
++_build:
++  list: never
++---
++
++{{% deprecated-in 0.120.0 %}}
++Use [`hugo.IsServer`] instead.
++
++[`hugo.IsServer`]: /functions/hugo/isserver
++{{% /deprecated-in %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1babc099bbd327e0213f56a5ec5a096aa6cd2b79
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,83 @@@
++---
++title: Language
++description: Returns the language object for the given site. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/language
++  returnType: langs.Language
++  signatures: [SITE.Language]
++toc: true
++---
++
++The `Language` method on a `Site` object returns the language object for the given site. The language object points to the language definition in the site configuration.
++
++You can also use the `Language` method on a `Page` object. See&nbsp;[details].
++
++## Methods
++
++The examples below assume the following in your site configuration:
++
++{{< code-toggle file=hugo >}}
++[languages.de]
++languageCode = 'de-DE'
++languageDirection = 'ltr'
++languageName = 'Deutsch'
++weight = 1
++{{< /code-toggle >}}
++
++Lang
++: (`string`) The language tag as defined by [RFC 5646].
++
++```go-html-template
++{{ .Site.Language.Lang }} → de
++```
++
++LanguageCode
++: (`string`) The language code from the site configuration.
++
++```go-html-template
++{{ .Site.Language.LanguageCode }} → de-DE
++```
++
++LanguageDirection
++: (`string`) The language direction from the site configuration, either `ltr` or `rtl`.
++
++```go-html-template
++{{ .Site.Language.LanguageDirection }} → ltr
++```
++
++LanguageName
++: (`string`) The language name from the site configuration.
++
++```go-html-template
++{{ .Site.Language.LanguageName }} → Deutsch
++```
++
++Weight
++: (`int`) The language weight from the site configuration which determines its order in the slice of languages returned by the `Languages` method on a `Site` object.
++
++```go-html-template
++{{ .Site.Language.Weight }} → 1
++```
++
++## Example
++
++Some of the methods above are commonly used in a base template as attributes for the `html` element.
++
++```go-html-template
++<html
++  lang="{{ or site.Language.LanguageCode site.Language.Lang }}" 
++  dir="{{ or site.Language.LanguageDirection `ltr` }}
++>
++```
++
++The example above uses the global [`site`] function instead of accessing the `Site` object via the `.Site` notation.
++
++Also note that each attribute has a fallback value assigned via the [`or`] operator.
++
++[details]: /methods/page/language
++[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646
++[`or`]: /functions/go-template/or
++[`site`]: /functions/global/site
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..88808eda01f48d28f70bfa9953c782d4e551082c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,53 @@@
++---
++title: LanguagePrefix
++description: Returns the URL language prefix, if any, for the given site.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/urls/AbsLangURL
++    - functions/urls/RelLangURL
++  returnType: string
++  signatures: [SITE.LanguagePrefix]
++---
++
++Consider this site configuration:
++
++{{< code-toggle file=hugo >}}
++defaultContentLanguage = 'de'
++defaultContentLanguageInSubdir = false
++
++[languages.de]
++languageCode = 'de-DE'
++languageDirection = 'ltr'
++languageName = 'Deutsch'
++title = 'Projekt Dokumentation'
++weight = 1
++
++[languages.en]
++languageCode = 'en-US'
++languageDirection = 'ltr'
++languageName = 'English'
++title = 'Project Documentation'
++weight = 2
++{{< /code-toggle >}}
++
++When visiting the German language site:
++
++```go-html-template
++{{ .Site.LanguagePrefix }} → ""
++```
++
++When visiting the English language site:
++
++```go-html-template
++{{ .Site.LanguagePrefix }} → /en
++```
++
++If you change `defaultContentLanguageInSubdir` to `true`, when visiting the German language site:
++
++```go-html-template
++{{ .Site.LanguagePrefix }} → /de
++```
++
++You may use the `LanguagePrefix` method with both monolingual and multilingual sites.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..26bdefc21e278d9071715df1b6a75687d5d6cd6b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,59 @@@
++---
++title: Languages
++description: Returns a collection of language objects for all sites, ordered by language weight.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/site/Language
++  returnType: langs.Languages
++  signatures: [SITE.Languages]
++---
++
++The `Languages` method on a `Site` object returns a collection of language objects for all sites, ordered by language weight. Each language object points to its language definition in the site configuration.
++
++To view the data structure:
++
++```go-html-template
++<pre>{{ jsonify (dict "indent" "  ") .Site.Languages }}</pre>
++```
++
++With this site configuration:
++
++{{< code-toggle file=hugo >}}
++defaultContentLanguage = 'de'
++defaultContentLanguageInSubdir = false
++
++[languages.de]
++languageCode = 'de-DE'
++languageDirection = 'ltr'
++languageName = 'Deutsch'
++title = 'Projekt Dokumentation'
++weight = 1
++
++[languages.en]
++languageCode = 'en-US'
++languageDirection = 'ltr'
++languageName = 'English'
++title = 'Project Documentation'
++weight = 2
++{{< /code-toggle >}}
++
++This template:
++
++```go-html-template
++<ul>
++  {{ range .Site.Languages }}
++    <li>{{ .Title }} ({{ .LanguageName }})</li>
++  {{ end }}
++</ul>
++```
++
++Is rendered to:
++
++```html
++<ul>
++  <li>Projekt Dokumentation (Deutsch)</li>
++  <li>Project Documentation (English)</li>
++</ul>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..aceee691d02b7e9905db3e878d4b6d301e23ae84
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: LastChange
++description: Returns the last modification date of site content.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: time.Time
++  signatures: [SITE.LastChange]
++---
++
++The `LastChange` method on a `Site` object returns a [`time.Time`] value. Use this with time [functions] and [methods]. For example:
++
++```go-html-template
++{{ .Site.LastChange | time.Format ":date_long" }} → October 16, 2023
++
++```
++
++[`time.Time`]: https://pkg.go.dev/time#Time
++[functions]: /functions/time
++[methods]: /methods/time
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..251fe1a977c15bb0f7d3ce648602cf3e499af473
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,55 @@@
++---
++title: MainSections
++description: Returns a slice of the main section names as defined in the site configuration, falling back to the top level section with the most pages.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: '[]string'
++  signatures: [SITE.MainSections]
++---
++
++Site configuration:
++
++{{< code-toggle file=hugo >}}
++[params]
++mainSections = ['books','films']
++{{< /code-toggle >}}
++
++Template:
++
++```go-html-template
++{{ .Site.MainSections }} → [books films]
++```
++
++If `params.mainSections` is not defined in the site configuration, this method returns a slice with one element---the top level section with the most pages.
++
++With this content structure, the "films" section has the most pages:
++
++```text
++content/
++├── books/
++│   ├── book-1.md
++│   └── book-2.md
++├── films/
++│   ├── film-1.md
++│   ├── film-2.md
++│   └── film-3.md
++└── _index.md
++```
++
++Template:
++
++```go-html-template
++{{ .Site.MainSections }} → [films]
++```
++
++When creating a theme, instead of hardcoding section names when listing the most relevant pages on the front page, instruct site authors to set `params.mainSections` in their site configuration.
++
++Then your home page template can do something like this:
++
++```go-html-template
++{{ range where .Site.RegularPages "Section" "in" .Site.MainSections }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1967a9211260fad5da9006d68538642a691c63ce
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,94 @@@
++---
++title: Menus
++description: Returns a collection of menu objects for the given site.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/page/IsMenuCurrent
++    - methods/page/HasMenuCurrent
++  returnType: navigation.Menus
++  signatures: [SITE.Menus]
++---
++
++The `Menus` method on a `Site` object returns a collection of menus, where each menu contains one or more entries, either flat or nested. Each entry points to a page within the site, or to an external resource.
++
++{{% note %}}
++Menus can be defined and localized in several ways. Please see the [menus] section for a complete explanation and examples.
++
++[menus]: /content-management/menus/
++{{% /note %}}
++
++A site can have multiple menus. For example, a main menu and a footer menu:
++
++{{< code-toggle file=hugo >}}
++[[menu.main]]
++name = 'Home'
++pageRef = '/'
++weight = 10
++
++[[menu.main]]
++name = 'Books'
++pageRef = '/books'
++weight = 20
++
++[[menu.main]]
++name = 'Films'
++pageRef = '/films'
++weight = 30
++
++[[menu.footer]]
++name = 'Legal'
++pageRef = '/legal'
++weight = 10
++
++[[menu.footer]]
++name = 'Privacy'
++pageRef = '/privacy'
++weight = 20
++{{< /code-toggle >}}
++
++This template renders the main menu:
++
++```go-html-template
++{{ with site.Menus.main }}
++  <nav class="menu">
++    {{ range . }}
++      {{ if $.IsMenuCurrent .Menu . }}
++        <a class="active" aria-current="page" href="{{ .URL }}">{{ .Name }}</a>
++      {{ else }}
++        <a href="{{ .URL }}">{{ .Name }}</a>
++      {{ end }}
++    {{ end }}
++  </nav>
++{{ end }}
++```
++
++When viewing the home page, the result is:
++
++```html
++<nav class="menu">
++  <a class="active" aria-current="page" href="/">Home</a>
++  <a href="/books/">Books</a>
++  <a href="/films/">Films</a>
++</nav>
++```
++
++When viewing the "books" page, the result is:
++
++```html
++<nav class="menu">
++  <a href="/">Home</a>
++  <a class="active" aria-current="page" href="/books/">Books</a>
++  <a href="/films/">Films</a>
++</nav>
++```
++
++You will typically render a menu using a partial template. As the active menu entry will be different on each page, use the [`partial`] function to call the template. Do not use the [`partialCached`] function.
++
++The example above is simplistic. Please see the [menu templates] section for more information.
++
++[menu templates]: /templates/menu-templates
++
++[`partial`]: /functions/partials/include
++[`partialCached`]: /functions/partials/includecached
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..583e98c11c9286d3ddf35b79c5face6363708136
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++---
++title: Pages
++description: Returns a collection of all pages.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/site/AllPages
++    - methods/site/RegularPages
++    - methods/site/Sections
++  returnType: page.Pages
++  signatures: [SITE.Pages]
++---
++
++This method returns all page [kinds] in the current language. That includes the home page, section pages, taxonomy pages, term pages, and regular pages.
++
++In most cases you should use the [`RegularPages`] method instead.
++
++[`RegularPages`]: methods/site/regularpages
++[kinds]: /getting-started/glossary/#page-kind
++
++```go-html-template
++{{ range .Site.Pages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b699ef2d499f4ed299a65916321ec53b5d80e231
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,29 @@@
++---
++title: Param
++description: Returns the site parameter with the given key.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: any
++  signatures: [SITE.Param KEY]
++---
++
++The `Param` method on a `Site` object is a convenience method to return the value of a user-defined parameter in the site configuration.
++
++{{< code-toggle file=hugo >}}
++[params]
++display_toc = true
++{{< /code-toggle >}}
++
++
++```go-html-template
++{{ .Site.Param "display_toc" }} → true
++```
++
++The above is equivalent to either of these:
++
++```go-html-template
++{{ .Site.Params.display_toc }}
++{{ index .Site.Params "display_toc" }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..518d93bf3e50a9f4e7aca786412b6dbd62950e1d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,47 @@@
++---
++title: Params
++description: Returns a map of custom parameters as defined in the site configuration.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/collections/indexFunction
++    - methods/page/Params
++    - methods/page/Param
++  returnType: maps.Params
++  signatures: [SITE.Params]
++---
++
++With this site configuration:
++
++{{< code-toggle file=hugo >}}
++[params]
++  subtitle = 'The Best Widgets on Earth'
++  copyright-year = '2023'
++  [params.author]
++    email = 'jsmith@example.org'
++    name = 'John Smith'
++  [params.layouts]
++    rfc_1123 = 'Mon, 02 Jan 2006 15:04:05 MST'
++    rfc_3339 = '2006-01-02T15:04:05-07:00'
++{{< /code-toggle >}}
++
++Access the custom parameters by [chaining] the [identifiers]:
++
++```go-html-template
++{{ .Site.Params.subtitle }} → The Best Widgets on Earth
++{{ .Site.Params.author.name }} → John Smith
++
++{{ $layout := .Site.Params.layouts.rfc_1123 }}
++{{ .Site.LastChange.Format $layout }} → Tue, 17 Oct 2023 13:21:02 PDT
++```
++
++In the template example above, each of the keys is a valid identifier. For example, none of the keys contains a hyphen. To access a key that is not a valid identifier, use the [`index`] function:
++
++```go-html-template
++{{ index .Site.Params "copyright-year" }} → 2023
++```
++
++[`index`]: /functions/collections/indexfunction
++[chaining]: /getting-started/glossary/#chain
++[identifiers]: /getting-started/glossary/#identifier
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b163ad9193296ebbdbc9c7172bc4dc2b1c1aea3c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,38 @@@
++---
++title: RegularPages
++description: Returns a collection of all regular pages.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/site/AllPages
++    - methods/site/RegularPages
++    - methods/site/Sections
++  returnType: page.Pages
++  signatures: [SITE.RegularPages]
++---
++
++```go-html-template
++{{ range .Site.RegularPages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++By default, Hugo sorts page collections by:
++
++1. The page `weight` as defined in front matter
++1. The page `date` as defined in front matter
++1. The page `linkTitle` as defined in front matter
++1. The file path
++
++If the `linkTitle` is not defined, Hugo evaluates the `title` instead.
++
++To change the sort order, use any of the `Pages` [sorting methods]. For example:
++
++```go-html-template
++{{ range .Site.RegularPages.ByTitle }}
++  <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
++{{ end }}
++```
++
++[sorting methods]: /methods/pages/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a397c5926b42ecc34312063a165d5def846c5d29
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,41 @@@
++---
++title: Sections
++description: Returns a collection of first level section pages.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/site/AllPages
++    - methods/site/Pages
++    - methods/site/RegularPages
++  returnType: page.Pages
++  signatures: [SITE.Sections]
++---
++
++Given this content structure:
++
++```text
++content/
++├── books/
++│   ├── book-1.md
++│   └── book-2.md
++├── films/
++│   ├── film-1.md
++│   └── film-2.md
++└── _index.md
++```
++
++This template:
++
++```go-html-template
++{{ range .Site.Sections }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++Is rendered to:
++
++```html
++<h2><a href="/books/">Books</a></h2>
++<h2><a href="/films/">Films</a></h2>
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f7bafd3ed2c7b474132056c79b54ae5585fd9585
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,66 @@@
++---
++title: Sites
++description: Returns a collection of all Site objects, one for each language, ordered by language weight.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.Sites
++  signatures: [SITE.Sites]
++---
++
++With this site configuration:
++
++{{< code-toggle file=hugo >}}
++defaultContentLanguage = 'de'
++defaultContentLanguageInSubdir = false
++
++[languages.de]
++languageCode = 'de-DE'
++languageDirection = 'ltr'
++languageName = 'Deutsch'
++title = 'Projekt Dokumentation'
++weight = 1
++
++[languages.en]
++languageCode = 'en-US'
++languageDirection = 'ltr'
++languageName = 'English'
++title = 'Project Documentation'
++weight = 2
++{{< /code-toggle >}}
++
++This template:
++
++```go-html-template
++<ul>
++  {{ range .Site.Sites }}
++    <li><a href="{{ .Home.Permalink }}">{{ .Title }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Produces a list of links to each home page:
++
++```html
++<ul>
++  <li><a href="https://example.org/de/">Projekt Dokumentation</a></li>
++  <li><a href="https://example.org/en/">Project Documentation</a></li>
++</ul>
++```
++
++To render a link to home page of the primary (first) language:
++
++```go-html-template
++{{ with .Site.Sites.First }}
++  <a href="{{ .Home.Permalink }}">{{ .Title }}</a>
++{{ end }}
++```
++
++This is equivalent to:
++
++```go-html-template
++{{ with index .Site.Sites 0 }}
++  <a href="{{ .Home.Permalink }}">{{ .Title }}</a>
++{{ end }}
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..72bfc75d56c966365e5a661faf345725c12d4abc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,99 @@@
++---
++title: Taxonomies
++description: Returns a data structure containing the site's taxonomy objects, the terms within each taxonomy object, and the pages to which the terms are assigned.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.TaxonomyList
++  signatures: [SITE.Taxonomies]
++---
++
++Conceptually, the `Taxonomies` method on a `Site` object returns a data structure such&nbsp;as:
++
++{{< code-toggle >}}
++taxonomy a:
++  - term 1:
++    - page 1
++    - page 2
++  - term 2:
++    - page 1
++taxonomy b:
++  - term 1:
++    - page 2
++  - term 2:
++    - page 1
++    - page 2
++{{< /code-toggle >}}
++
++For example, on a book review site you might create two taxonomies; one for genres and another for authors.
++
++With this site configuration:
++
++{{< code-toggle file=hugo >}}
++[taxonomies]
++genre = 'genres'
++author = 'authors'
++{{< /code-toggle >}}
++
++And this content structure:
++
++```text
++content/
++├── books/
++│   ├── and-then-there-were-none.md --> genres: suspense
++│   ├── death-on-the-nile.md        --> genres: suspense
++│   └── jamaica-inn.md              --> genres: suspense, romance
++│   └── pride-and-prejudice.md      --> genres: romance
++└── _index.md
++```
++
++Conceptually, the taxonomies data structure looks like:
++
++{{< code-toggle >}}
++genres:
++  - suspense:
++    - And Then There Were None
++    - Death on the Nile
++    - Jamaica Inn
++  - romance:
++    - Jamaica Inn
++    - Pride and Prejudice
++authors:
++  - achristie:
++    - And Then There Were None
++    - Death on the Nile
++  - ddmaurier:
++    - Jamaica Inn
++  - jausten:
++    - Pride and Prejudice
++{{< /code-toggle >}}
++
++
++To list the "suspense" books:
++
++```go-html-template
++<ul>
++  {{ range .Site.Taxonomies.genres.suspense }}
++    <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++  {{ end }}
++</ul>
++```
++
++Hugo renders this to:
++
++```html
++<ul>
++  <li><a href="/books/and-then-there-were-none/">And Then There Were None</a></li>
++  <li><a href="/books/death-on-the-nile/">Death on the Nile</a></li>
++  <li><a href="/books/jamaica-inn/">Jamaica Inn</a></li>
++</ul>
++```
++
++{{% note %}}
++Hugo's taxonomy system is powerful, allowing you to classify content and create relationships between pages.
++
++Please see the [taxonomies] section for a complete explanation and examples.
++
++[taxonomies]: content-management/taxonomies/
++{{% /note %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a357286c1f87a3682fb0c1dae050f82d13b11ccb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,22 @@@
++---
++title: Title
++description: Returns the title as defined in the site configuration.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: string
++  signatures: [SITE.Title]
++---
++
++Site configuration:
++
++{{< code-toggle file=hugo >}}
++title = 'My Documentation Site'
++{{< /code-toggle >}}
++
++Template:
++
++```go-html-template
++{{ .Site.Title }} → My Documentation Site
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39f66f308bc5e91271a0677d75210739d803288b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Site methods
++linkTitle: Site
++description: Use these methods with Site objects.
++categories: []
++keywords: []
++menu:
++  docs:
++    parent: methods
++---
++
++Use these methods with Site objects. A multilingual project will have two or more sites, one for each language.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7845dbf3d5e3b0a6fef45b3bd6ce5cd974475cd8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,78 @@@
++---
++title: Alphabetical
++description: Returns an ordered taxonomy, sorted alphabetically by term.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/taxonomy/ByCount
++  returnType: page.OrderedTaxonomy
++  signatures: [TAXONOMY.Alphabetical]
++toc: true
++---
++
++The `Alphabetical` method on a `Taxonomy` object returns an [ordered taxonomy], sorted alphabetically by [term].
++
++While a `Taxonomy` object is a [map], an ordered taxonomy is a [slice], where each element is an object that contains the term and a slice of its [weighted pages].
++
++{{% include "methods/taxonomy/_common/get-a-taxonomy-object.md" %}}
++
++## Get the ordered taxonomy
++
++Now that we have captured the “genres” Taxonomy object, let’s get the ordered taxonomy sorted alphabetically by term:
++
++```go-html-template
++{{ $taxonomyObject.Alphabetical }}
++```
++
++To reverse the sort order:
++
++```go-html-template
++{{ $taxonomyObject.Alphabetical.Reverse }}
++```
++
++To inspect the data structure:
++
++```go-html-template
++<pre>{{ jsonify (dict "indent" "  ") $taxonomyObject.Alphabetical }}</pre>
++```
++
++{{% include "methods/taxonomy/_common/ordered-taxonomy-element-methods.md" %}}
++
++## Example
++
++With this template:
++
++```go-html-template
++{{ range $taxonomyObject.Alphabetical }}
++  <h2><a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a> ({{ .Count }})</h2>
++  <ul>
++    {{ range .Pages.ByTitle }}
++      <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++Hugo renders:
++
++```html
++<h2><a href="/genres/romance/">romance</a> (2)</h2>
++<ul>
++  <li><a href="/books/jamaica-inn/">Jamaica inn</a></li>
++  <li><a href="/books/pride-and-prejudice/">Pride and prejudice</a></li>
++</ul>
++<h2><a href="/genres/suspense/">suspense</a> (3)</h2>
++<ul>
++  <li><a href="/books/and-then-there-were-none/">And then there were none</a></li>
++  <li><a href="/books/death-on-the-nile/">Death on the nile</a></li>
++  <li><a href="/books/jamaica-inn/">Jamaica inn</a></li>
++</ul>
++```
++
++[ordered taxonomy]: /getting-started/glossary/#ordered-taxonomy
++[term]: /getting-started/glossary/#term
++[map]: /getting-started/glossary/#map
++[slice]: /getting-started/glossary/#slice
++[term]: /getting-started/glossary/#term
++[weighted pages]: /getting-started/glossary/#weighted-page
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..40f58420a5b14b3b8ad9a01482d96d54e7aafabe
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,78 @@@
++---
++title: ByCount
++description: Returns an ordered taxonomy, sorted by the number of pages associated with each term.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/taxonomy/Alphabetical
++  returnType: page.OrderedTaxonomy
++  signatures: [TAXONOMY.ByCount]
++toc: true
++---
++
++The `ByCount` method on a `Taxonomy` object returns an [ordered taxonomy], sorted by the number of pages associated with each [term].
++
++While a `Taxonomy` object is a [map], an ordered taxonomy is a [slice], where each element is an object that contains the term and a slice of its [weighted pages].
++
++{{% include "methods/taxonomy/_common/get-a-taxonomy-object.md" %}}
++
++## Get the ordered taxonomy
++
++Now that we have captured the “genres” Taxonomy object, let’s get the ordered taxonomy sorted by the number of pages associated with each term:
++
++```go-html-template
++{{ $taxonomyObject.ByCount }}
++```
++
++To reverse the sort order:
++
++```go-html-template
++{{ $taxonomyObject.ByCount.Reverse }}
++```
++
++To inspect the data structure:
++
++```go-html-template
++<pre>{{ jsonify (dict "indent" "  ") $taxonomyObject.ByCount }}</pre>
++```
++
++{{% include "methods/taxonomy/_common/ordered-taxonomy-element-methods.md" %}}
++
++## Example
++
++With this template:
++
++```go-html-template
++{{ range $taxonomyObject.ByCount }}
++  <h2><a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a> ({{ .Count }})</h2>
++  <ul>
++    {{ range .Pages.ByTitle }}
++      <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++Hugo renders:
++
++```html
++<h2><a href="/genres/suspense/">suspense</a> (3)</h2>
++<ul>
++  <li><a href="/books/and-then-there-were-none/">And then there were none</a></li>
++  <li><a href="/books/death-on-the-nile/">Death on the nile</a></li>
++  <li><a href="/books/jamaica-inn/">Jamaica inn</a></li>
++</ul>
++<h2><a href="/genres/romance/">romance</a> (2)</h2>
++<ul>
++  <li><a href="/books/jamaica-inn/">Jamaica inn</a></li>
++  <li><a href="/books/pride-and-prejudice/">Pride and prejudice</a></li>
++</ul>
++```
++
++[ordered taxonomy]: /getting-started/glossary/#ordered-taxonomy
++[term]: /getting-started/glossary/#term
++[map]: /getting-started/glossary/#map
++[slice]: /getting-started/glossary/#slice
++[term]: /getting-started/glossary/#term
++[weighted pages]: /getting-started/glossary/#weighted-page
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..50f705ec9b13912f8e6e766330bdab508ddfcfe9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++---
++title: Count
++description: Returns the number of number of weighted pages to which the given term has been assigned.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: int
++  signatures: [TAXONOMY.Count TERM]
++toc: true
++---
++
++The `Count` method on a `Taxonomy` object returns the number of number of [weighted pages] to which the given [term] has been assigned.
++
++{{% include "methods/taxonomy/_common/get-a-taxonomy-object.md" %}}
++
++## Count the weighted pages
++
++Now that we have captured the "genres" `Taxonomy` object, let's count the number of weighted pages to which the "suspense" term has been assigned:
++
++```go-html-template
++{{ $taxonomyObject.Count "suspense" }} → 3
++```
++
++[weighted pages]: /getting-started/glossary/#weighted-page
++[term]: /getting-started/glossary/#term
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3bac86f08a3160a92649f41a9f7063e3ee4be5e6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,72 @@@
++---
++title: Get
++description: Returns a slice of weighted pages to which the given term has been assigned.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: page.WeightedPages
++  signatures: [TAXONOMY.Get TERM]
++toc: true
++---
++
++The `Get` method on a `Taxonomy` object returns a slice of [weighted pages] to which the given [term] has been assigned.
++
++{{% include "methods/taxonomy/_common/get-a-taxonomy-object.md" %}}
++
++## Get the weighted pages
++
++Now that we have captured the "genres" `Taxonomy` object, let's get the weighted pages to which the "suspense" term has been assigned:
++
++```go-html-template
++{{ $weightedPages := $taxonomyObject.Get "suspense" }}
++```
++
++The above is equivalent to:
++
++```go-html-template
++{{ $weightedPages := $taxonomyObject.suspense }}
++```
++
++But, if the term is not a valid [identifier], you cannot use the [chaining] syntax. For example, this will throw an error because the identifier contains a hyphen:
++
++```go-html-template
++{{ $weightedPages := $taxonomyObject.my-genre }}
++```
++
++You could also use the [`index`] function, but the syntax is more verbose:
++
++```go-html-template
++{{ $weightedPages := index $taxonomyObject "my-genre" }}
++```
++
++To inspect the data structure:
++
++```go-html-template
++<pre>{{ jsonify (dict "indent" "  ") $weightedPages }}</pre>
++```
++
++## Example
++
++With this template:
++
++```go-html-template
++{{ $weightedPages := $taxonomyObject.Get "suspense" }}
++{{ range $weightedPages }}
++  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
++{{ end }}
++```
++
++Hugo renders:
++
++```html
++<h2><a href="/books/jamaica-inn/">Jamaica inn</a></h2>
++<h2><a href="/books/death-on-the-nile/">Death on the nile</a></h2>
++<h2><a href="/books/and-then-there-were-none/">And then there were none</a></h2>
++```
++
++[chaining]: /getting-started/glossary/#chain
++[`index`]: /functions/collections/indexfunction
++[identifier]: /getting-started/glossary/#identifier
++[term]: /getting-started/glossary/#term
++[weighted pages]: /getting-started/glossary/#weighted-page
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4c4fc42c91c16ed2c28cd6696fea375315c56c12
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,68 @@@
++---
++# Do not remove front matter.
++---
++
++Before we can use a `Taxonomy` method, we need to capture a `Taxonomy` object.
++
++## Capture a taxonomy object
++
++Consider this site configuration:
++
++{{< code-toggle file=hugo >}}
++[taxonomies]
++genre = 'genres'
++author = 'authors'
++{{< /code-toggle >}}
++
++And this content structure:
++
++```text
++content/
++├── books/
++│   ├── and-then-there-were-none.md --> genres: suspense
++│   ├── death-on-the-nile.md        --> genres: suspense
++│   └── jamaica-inn.md              --> genres: suspense, romance
++│   └── pride-and-prejudice.md      --> genres: romance
++└── _index.md
++```
++
++To capture the "genres" taxonomy object from within any template, use the [`Taxonomies`] method on a `Site` object.
++
++```go-html-template
++{{ $taxonomyObject := .Site.Taxonomies.genres }}
++```
++
++To capture the "genres" taxonomy object when rendering its page with a taxonomy template, use the [`Terms`] method on the page's [`Data`] object:
++
++{{< code file=layouts/_default/taxonomy.html  >}}
++{{ $taxonomyObject := .Data.Terms }}
++{{< /code >}}
++
++To inspect the data structure:
++
++```go-html-template
++<pre>{{ jsonify (dict "indent" "  ") $taxonomyObject }}</pre>
++```
++
++Although the [`Alphabetical`] and [`ByCount`] methods provide a better data structure for ranging through the taxonomy, you can render the weighted pages by term directly from the `Taxonomy` object:
++
++```go-html-template
++{{ range $term, $weightedPages := $taxonomyObject }}
++  <h2><a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a></h2>
++  <ul>
++    {{ range $weightedPages }}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
++    {{ end }}
++  </ul>
++{{ end }}
++```
++
++In the example above, the first anchor element is a link to the term page.
++
++
++[`Alphabetical`]: /methods/taxonomy/alphabetical
++[`ByCount`]: /methods/taxonomy/bycount
++
++[`data`]: /methods/page/data
++[`terms`]: /methods/page/data/#in-a-taxonomy-template
++[`taxonomies`]: /methods/site/taxonomies
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..57c9e8e29371609a6b8d1d90dfb9a88714a40ab5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++---
++# Do not remove front matter.
++---
++
++An ordered taxonomy is a slice, where each element is an object that contains the term and a slice of its weighted pages.
++
++Each element of the slice provides these methods:
++
++Count
++: (`int`) Returns the number of pages to which the term is assigned.
++
++Page
++: (`hugolib.pageState`) Returns the term's `Page` object, useful for linking to the term page.
++
++Pages
++: (`page.Pages`) Returns a `Pages` object containing the `Page` objects to which the term is assigned, sorted by [taxonomic weight]. To sort or group, use any of the [methods] available to the `Pages` object. For example, sort by the last modification date.
++
++Term
++: (`string`) Returns the term name.
++
++WeightedPages
++: (`page.WeightedPages`) Returns a slice of weighted pages to which the term is assigned, sorted by [taxonomic weight]. The `Pages` method above is more flexible, allowing you to sort and group.
++
++[methods]: /methods/pages
++[taxonomic weight]: /getting-started/glossary/#taxonomic-weight
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e7eb57834c56876a7c4965a54f1e1172f997361d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,12 @@@
++---
++title: Taxonomy methods
++linkTitle: Taxonomy
++description: Use these methods with Taxonomy objects.
++keywords: []
++menu:
++  docs:
++    identifier:
++    parent: methods
++---
++
++Use these methods with Taxonomy objects.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8fd755244a2cffec83217d75af245d49c81ebe56
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++---
++title: Add
++description: Returns the given time plus the given duration.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/AsTime
++    - functions/time/Duration
++    - functions/time/ParseDuration
++  returnType: time.Time
++  signatures: [TIME.Add DURATION]
++---
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++
++{{ $d1 = time.ParseDuration "3h20m10s" }}
++{{ $d2 = time.ParseDuration "-3h20m10s" }}
++
++{{ $t.Add $d1 }} → 2023-01-28 03:05:08 -0800 PST
++{{ $t.Add $d2 }} → 2023-01-27 20:24:48 -0800 PST
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8537d6e25fcad9fa8715b8e1fd27cd8e69344605
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,39 @@@
++---
++title: AddDate
++description: Returns the time corresponding to adding the given number of years, months, and days to the given time.Time value.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related: []
++  returnType: time.Time
++  signatures: [TIME.AddDate YEARS MONTHS DAYS]
++aliases: [/functions/adddate]
++---
++
++```go-html-template
++{{ $d := "2022-01-01" | time.AsTime }}
++
++{{ $d.AddDate 0 0 1 | time.Format "2006-01-02" }} → 2022-01-02
++{{ $d.AddDate 0 1 1 | time.Format "2006-01-02" }} → 2022-02-02
++{{ $d.AddDate 1 1 1 | time.Format "2006-01-02" }} → 2023-02-02
++
++{{ $d.AddDate -1 -1 -1 | time.Format "2006-01-02" }} → 2020-11-30
++```
++
++{{% note %}}
++When adding months or years, Hugo normalizes the final `time.Time` value if the resulting day does not exist. For example, adding one month to 31 January produces 2 March or 3 March, depending on the year.
++
++See [this explanation](https://github.com/golang/go/issues/31145#issuecomment-479067967) from the Go team.
++{{% /note %}}
++
++```go-html-template
++{{ $d := "2023-01-31" | time.AsTime }}
++{{ $d.AddDate 0 1 0 | time.Format "2006-01-02" }} → 2023-03-03
++
++{{ $d := "2024-01-31" | time.AsTime }}
++{{ $d.AddDate 0 1 0 | time.Format "2006-01-02" }} → 2024-03-02
++
++{{ $d := "2024-02-29" | time.AsTime }}
++{{ $d.AddDate 1 0 0 | time.Format "2006-01-02" }} → 2025-03-01
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0aeeb38d82e6effaca595c3171930c3b581f7dcb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++---
++title: After
++description: Reports whether TIME1 is after TIME2.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/Before
++    - methods/time/After
++    - functions/time/AsTime
++  returnType: bool
++  signatures: [TIME1.After TIME2]
++---
++
++```go-html-template
++{{ $t1 := time.AsTime "2023-01-01T17:00:00-08:00" }}
++{{ $t2 := time.AsTime "2010-01-01T17:00:00-08:00" }}
++
++{{ $t1.After $t2 }} → true
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c3d582860ca9ad91e5acf061b215c6e2d0ea7319
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++---
++title: Before
++description: Reports whether TIME1 is before TIME2.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/After
++    - methods/time/Equal
++    - functions/time/AsTime
++  returnType: bool
++  signatures: [TIME1.Before TIME2]
++---
++
++```go-html-template
++{{ $t1 := time.AsTime "2023-01-01T17:00:00-08:00" }}
++{{ $t2 := time.AsTime "2030-01-01T17:00:00-08:00" }}
++
++{{ $t1.Before $t2 }} → true
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1173b8489aa2dedcff4c83f0b1bf163f93d4244d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: Day
++description: Returns the day of the month of the given time.Time value.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/Year
++    - methods/time/Month
++    - methods/time/Hour
++    - methods/time/Minute
++    - methods/time/Second
++    - functions/time/AsTime
++  returnType: int
++  signatures: [TIME.Day]
++---
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.Day }} → 27
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4d45a3ada032ff5034abd66fcdd990558cb79344
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++---
++title: Equal
++description: Reports whether TIME1 is equal to TIME2.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/After
++    - methods/time/Before
++    - functions/time/AsTime
++  returnType: bool
++  signatures: [TIME1.Equal TIME2]
++---
++
++```go-html-template
++{{ $t1 := time.AsTime "2023-01-01T17:00:00-08:00" }}
++{{ $t2 := time.AsTime "2023-01-01T20:00:00-05:00" }}
++
++{{ $t1.Equal $t2 }} → true
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fc3e2635cec792eb759f2b97b2f1db2e7c8fb633
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,98 @@@
++---
++title: Format
++description: Returns a textual representation of the time.Time value formatted according to the layout string.
++categories: []
++keywords: []
++action:
++  aliases: []
++  related:
++    - functions/time/AsTime
++    - methods/time/UTC
++    - methods/time/Local
++  returnType: string
++  signatures: [TIME.Format LAYOUT]
++toc: true
++aliases: [/methods/time/format]
++---
++
++```go-template
++{{ $t := "2023-01-27T23:44:58-08:00" }}
++{{ $t = time.AsTime $t }}
++{{ $format := "2 Jan 2006" }}
++
++{{ $t.Format $format }} → 27 Jan 2023
++```
++
++{{% note %}}
++To [localize] the return value, use the [`time.Format`] function instead.
++
++[localize]: /getting-started/glossary/#localization
++[`time.Format`]: /functions/time/format
++{{% /note %}}
++
++Use the `Format` method with any `time.Time` value, including the four predefined front matter dates:
++
++```go-html-template
++{{ $format := "2 Jan 2006" }}
++
++{{ .Date.Format $format }}
++{{ .PublishDate.Format $format }}
++{{ .ExpiryDate.Format $format }}
++{{ .Lastmod.Format $format }}
++```
++
++{{% note %}}
++Use the [`time.Format`] function to format string representations of dates, and to format raw TOML dates that exclude time and time zone offset.
++
++[`time.Format`]: /functions/time/format
++{{% /note %}}
++
++## Layout string
++
++{{% include "functions/_common/time-layout-string.md" %}}
++
++## Examples
++
++Given this front matter:
++
++{{< code-toggle fm=true >}}
++title = "About time"
++date = 2023-01-27T23:44:58-08:00
++{{< /code-toggle >}}
++
++The examples below were rendered in the `America/Los_Angeles` time zone:
++
++Format string|Result
++:--|:--
++`Monday, January 2, 2006`|`Friday, January 27, 2023`
++`Mon Jan 2 2006`|`Fri Jan 27 2023`
++`January 2006`|`January 2023`
++`2006-01-02`|`2023-01-27`
++`Monday`|`Friday`
++`02 Jan 06 15:04 MST`|`27 Jan 23 23:44 PST`
++`Mon, 02 Jan 2006 15:04:05 MST`|`Fri, 27 Jan 2023 23:44:58 PST`
++`Mon, 02 Jan 2006 15:04:05 -0700`|`Fri, 27 Jan 2023 23:44:58 -0800`
++
++## UTC and local time
++
++Convert and format any `time.Time` value to either Coordinated Universal Time (UTC) or local time.
++
++```go-html-template
++{{ $t := "2023-01-27T23:44:58-08:00" }}
++{{ $t = time.AsTime $t }}
++{{ $format := "2 Jan 2006 3:04:05 PM MST" }}
++
++{{ $t.UTC.Format $format }} → 28 Jan 2023 7:44:58 AM UTC
++{{ $t.Local.Format $format }} → 27 Jan 2023 11:44:58 PM PST
++```
++
++## Ordinal representation
++
++Use the [`humanize`](/functions/inflect/humanize) function to render the day of the month as an ordinal number:
++
++```go-html-template
++{{ $t := "2023-01-27T23:44:58-08:00" }}
++{{ $t = time.AsTime $t }}
++
++{{ humanize $t.Day }} of {{ $t.Format "January 2006" }} → 27th of January 2023
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..58ed00260583a4509e6d5084dfaf19f44e6b42f0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: Hour
++description: Returns the hour within the day of the given time.Time value, in the range [0, 23].
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/Year
++    - methods/time/Month
++    - methods/time/Day
++    - methods/time/Minute
++    - methods/time/Second
++    - functions/time/AsTime
++  returnType: int
++  signatures: [TIME.Hour]
++---
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.Hour }} → 23
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..df2b84cae89f252c23c32e7d1c452dc43b0899c7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++---
++title: IsDST
++description: Reports whether the given time.Time value is in Daylight Savings Time.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/AsTime
++  returnType: bool
++  signatures: [TIME.IsDST]
++---
++
++```go-html-template
++{{ $t1 := time.AsTime "2023-01-01T00:00:00-08:00" }}
++{{ $t2 := time.AsTime "2023-07-01T00:00:00-07:00" }}
++
++{{ $t1.IsDST }} → false
++{{ $t2.IsDST }} → true
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2026f3b2eefc0260bd1d0b87ffaa1417f7448690
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++---
++title: IsZero
++description: Reports whether the given time.Time value represents the zero time instant, January 1, year 1, 00:00:00 UTC.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/AsTime
++  returnType: bool
++  signatures: [TIME.IsZero]
++---
++
++````go-html-template
++{{ $t1 := time.AsTime "2023-01-01T00:00:00-08:00" }}
++{{ $t2 := time.AsTime "0001-01-01T00:00:00-00:00" }}
++
++{{ $t1.IsZero }} → false
++{{ $t2.IsZero }} → true
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bd40e3a44209eeedf355375072861baf9094b673
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,17 @@@
++---
++title: Local
++description: Returns the given time.Time value with the location set to local time.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/UTC
++    - functions/time/AsTime
++  returnType: time.Time
++  signatures: [TIME.Local]
++---
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-28T07:44:58+00:00" }}
++{{ $t.Local }} → 2023-01-27 23:44:58 -0800 PST
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d482fab5db4db3f5b9dfd444bfbb4794155085cc
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: Minute
++description: Returns the minute offset within the hour of the given time.Time value, in the range [0, 59].
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/Year
++    - methods/time/Month
++    - methods/time/Day
++    - methods/time/Hour
++    - methods/time/Second
++    - functions/time/AsTime
++  returnType: int
++  signatures: [TIME.Minute]
++---
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.Minute }} → 44
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0a01d1a700ac3b508ddc87a2187d0334f8af2923
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++---
++title: Month
++description: Returns the month of the year of the given time.Time value.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/Year
++    - methods/time/Day
++    - methods/time/Hour
++    - methods/time/Minute
++    - methods/time/Second
++    - functions/time/AsTime
++  returnType: time.Month
++  signatures: [TIME.Month]
++---
++
++To convert the `time.Month` value to a string:
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.Month.String }} → January
++```
++
++To convert the `time.Month` value to an integer.
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.Month | int }} → 1
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..606143139679432fc46b537f3d4fc833e9507213
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: Nanosecond
++description: Returns the nanosecond offset within the second of the given time.Time value, in the range [0, 999999999].
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/AsTime
++  returnType: int
++  signatures: [TIME.Nanosecond]
++---
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.Nanosecond }} → 0
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e326c64bce3159acaed71f59f9243ba419968436
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: Second
++description: Returns the second offset within the minute of the given time.Time value, in the range [0, 59].
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/Year
++    - methods/time/Month
++    - methods/time/Day
++    - methods/time/Hour
++    - methods/time/Minute
++    - functions/time/AsTime
++  returnType: int
++  signatures: [TIME.Second]
++---
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.Second }} → 58
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9678365eb13c2bf213c0bf340290218bb0ba3f43
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,18 @@@
++---
++title: Sub
++description: Returns the duration computed by subtracting TIME2 from TIME1.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/AsTime
++  returnType: time.Duration
++  signatures: [TIME1.Sub TIME2]
++---
++
++```go-html-template
++{{ $t1 := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t2 := time.AsTime "2023-01-26T22:34:38-08:00" }}
++
++{{ $t1.Sub $t2 }} → 25h10m20s
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6fd7b526dd1c5919fb5bab5285b0765cdf319194
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: UTC
++description: Returns the given time.Time value with the location set to UTC.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/Local
++    - functions/time/AsTime
++  returnType: time.Time
++  signatures: [TIME.UTC]
++---
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.UTC }} → 2023-01-28 07:44:58 +0000 UTC
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fcfc661fe853878163bbd0c127b154fa2777f537
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: Unix
++description: Returns the given time.Time value expressed as the number of seconds elapsed since January 1, 1970 UTC. 
++categories: []
++action:
++  related:
++    - methods/time/UnixMilli
++    - methods/time/UnixMicro
++    - methods/time/UnixNano
++    - functions/time/AsTime
++  returnType: int64
++  signatures: [TIME.Unix]
++aliases: [/functions/unix]
++---
++
++See [Unix epoch](https://en.wikipedia.org/wiki/Unix_time).
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.Unix }} → 1674891898
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..150497cd357227784131c02ec71d001ffb602ba7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: UnixMicro
++description: Returns the given time.Time value expressed as the number of microseconds elapsed since January 1, 1970 UTC. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/Unix
++    - methods/time/UnixMilli
++    - methods/time/UnixNano
++    - functions/time/AsTime
++  returnType: int64
++  signatures: [TIME.UnixMicro]
++---
++
++See [Unix epoch](https://en.wikipedia.org/wiki/Unix_time).
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.UnixMicro }} → 1674891898000000
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e5e90ba25f9c392b0ed417778329b95cdb811b81
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: UnixMilli
++description: Returns the given time.Time value expressed as the number of milliseconds elapsed since January 1, 1970 UTC. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/Unix
++    - methods/time/UnixMicro
++    - methods/time/UnixNano
++    - functions/time/AsTime
++  returnType: int64
++  signatures: [TIME.UnixMilli]
++---
++
++See [Unix epoch](https://en.wikipedia.org/wiki/Unix_time).
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.UnixMilli }} → 1674891898000
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..63db320a350fa93a79ebe027caad6b1888682c42
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: UnixNano
++description: Returns the given time.Time value expressed as the number of nanoseconds elapsed since January 1, 1970 UTC. 
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/Unix
++    - methods/time/UnixMilli
++    - methods/time/UnixMicro
++    - functions/time/AsTime
++  returnType: int64
++  signatures: [TIME.UnixNano]
++---
++
++See [Unix epoch](https://en.wikipedia.org/wiki/Unix_time).
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.UnixNano }} → 1674891898000000000
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b2a95fe9c168043ffbe73c73938fc1440981ad84
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,24 @@@
++---
++title: Weekday
++description:  Returns the day of the week of the given time.Time value.
++categories: []
++keywords: []
++action:
++  related:
++    - functions/time/AsTime
++  returnType: time.Weekday
++  signatures: [TIME.Weekday]
++---
++
++To convert the `time.Weekday` value to a string:
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.Weekday.String }} → Friday
++```
++
++To convert the `time.Weekday` value to an integer.
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.Weekday | int }} → 5
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..b046896f456ee99f0f33dc70cbb391f060da7f77
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++---
++title: Year
++description: Returns the year of the given time.Time value.
++categories: []
++keywords: []
++action:
++  related:
++    - methods/time/Month
++    - methods/time/Day
++    - methods/time/Hour
++    - methods/time/Minute
++    - methods/time/Second
++    - functions/time/AsTime
++  returnType: int
++  signatures: [TIME.Year]
++---
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.Year }} → 2023
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..40d7d6aabc53c4fce94b93e42ed732f880af3e00
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++---
++title: YearDay
++description: Returns the day of the year of the given time.Time value, in the range [1, 365] for non-leap years, and [1,366] in leap years.
++categories: []
++keywords: []
++action:
++  related: []
++  returnType: int
++  signatures: [TIME.YearDay]
++---
++
++```go-html-template
++{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
++{{ $t.YearDay }} → 27
++```
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..81d4690e0e4611c738532aeadf3de5ecf0f6b661
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++title: Time methods
++linkTitle: Time
++description: Use these methods with time.Time values.
++categories: []
++keywords: []
++menu:
++  docs:
++    identifier: time-methods
++    parent: methods
++---
++
++Use these methods with time.Time values.
index 7d1b30895ba8287cacdf101e34052c7d7d3a2cd5,0000000000000000000000000000000000000000..6b8f7e1a91379890aefc058a9527335d13d76b2e
mode 100644,000000..100644
--- /dev/null
@@@ -1,8 -1,0 +1,7 @@@
- * [Person 1](https://example.com)
- * [Person 1](https://example.com)
 +
 +Add some **general info** about Myshowcase here.
 +
 +The site is built by:
 +
++* [Person 1](https://example.org)
++* [Person 1](https://example.org)
index 353accc3d0cd8137199d3cf3a88ea79ed327a5c1,0000000000000000000000000000000000000000..e37c33a3cea5d1e0d3b4768b2bee6c82241ae255
mode 100644,000000..100644
--- /dev/null
@@@ -1,4 -1,0 +1,4 @@@
- title: "Hugo News"
 +---
++title: Hugo News
 +aliases: [/release-notes/]
 +---
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..492cfa09b76e1bece3cbc140fe618def46f12ec4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: Quick reference guides
++linkTitle: Overview
++description: Quick reference guides to Hugo's features, functions, and methods.
++categories: []
++keywords: []
++menu:
++  docs:
++    identifier: quick-reference-overview
++    parent: quick-reference
++    weight: 10
++weight: 10
++showSectionMenu: false
++---
++
++Quick reference guides to Hugo's features, functions, and methods.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e6b1ed415f1f3e5bfbfc8dc10569447b70183880
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1624 @@@
++---
++title: Emojis
++description: Include emoji shortcodes in your markdown or templates.
++categories: [quick reference]
++keywords: [emoji]
++menu:
++  docs:
++    parent: quick-reference
++    weight: 20
++weight: 20
++toc: true
++---
++
++Configure Hugo to enable emoji processing in markdown:
++
++{{< code-toggle file=hugo >}}
++enableEmoji = true
++{{< /code-toggle >}}
++
++With emoji processing enabled, this markdown:
++
++```md
++Hello! :wave:
++```
++
++Is rendered to:
++
++```html
++Hello! &#x1f44b;
++```
++
++And in your browser... Hello! :wave:
++
++To process an emoji shortcode from within a template, use the [`emojify`] function or pass the string through the [`RenderString`] method on a `Page` object:
++
++```go-html-template
++{{ "Hello! :wave:" | .RenderString }}
++```
++
++[`emojify`]: /functions/transform/emojify
++[`RenderString`]: /methods/page/renderstring
++
++## Introduction
++
++This quick reference guide was automatically generated from [GitHub Emoji API] and [Unicode Full Emoji List]. Specials thanks to [@ikatyang] for making [this list] available to the open-source community.
++
++GitHub [custom emoji] are not supported.
++
++[custom emoji]: #github-custom-emoji
++[@ikatyang]: https://github.com/ikatyang
++[github emoji api]: https://api.github.com/emojis
++[unicode full emoji list]: https://unicode.org/emoji/charts/full-emoji-list.html
++[this list]: https://github.com/ikatyang/emoji-cheat-sheet/#readme
++
++## Smileys & Emotion
++
++- [Face Smiling](#face-smiling)
++- [Face Affection](#face-affection)
++- [Face Tongue](#face-tongue)
++- [Face Hand](#face-hand)
++- [Face Neutral Skeptical](#face-neutral-skeptical)
++- [Face Sleepy](#face-sleepy)
++- [Face Unwell](#face-unwell)
++- [Face Hat](#face-hat)
++- [Face Glasses](#face-glasses)
++- [Face Concerned](#face-concerned)
++- [Face Negative](#face-negative)
++- [Face Costume](#face-costume)
++- [Cat Face](#cat-face)
++- [Monkey Face](#monkey-face)
++- [Heart](#heart)
++- [Emotion](#emotion)
++
++### Face Smiling
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :grinning: | `:grinning:` | :smiley: | `:smiley:` | [top](#introduction) |
++| [top](#introduction) | :smile: | `:smile:` | :grin: | `:grin:` | [top](#introduction) |
++| [top](#introduction) | :laughing: | `:laughing:` `:satisfied:` | :sweat_smile: | `:sweat_smile:` | [top](#introduction) |
++| [top](#introduction) | :rofl: | `:rofl:` | :joy: | `:joy:` | [top](#introduction) |
++| [top](#introduction) | :slightly_smiling_face: | `:slightly_smiling_face:` | :upside_down_face: | `:upside_down_face:` | [top](#introduction) |
++| [top](#introduction) | :wink: | `:wink:` | :blush: | `:blush:` | [top](#introduction) |
++| [top](#introduction) | :innocent: | `:innocent:` | | | [top](#introduction) |
++
++### Face Affection
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :smiling_face_with_three_hearts: | `:smiling_face_with_three_hearts:` | :heart_eyes: | `:heart_eyes:` | [top](#introduction) |
++| [top](#introduction) | :star_struck: | `:star_struck:` | :kissing_heart: | `:kissing_heart:` | [top](#introduction) |
++| [top](#introduction) | :kissing: | `:kissing:` | :relaxed: | `:relaxed:` | [top](#introduction) |
++| [top](#introduction) | :kissing_closed_eyes: | `:kissing_closed_eyes:` | :kissing_smiling_eyes: | `:kissing_smiling_eyes:` | [top](#introduction) |
++| [top](#introduction) | :smiling_face_with_tear: | `:smiling_face_with_tear:` | | | [top](#introduction) |
++
++### Face Tongue
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :yum: | `:yum:` | :stuck_out_tongue: | `:stuck_out_tongue:` | [top](#introduction) |
++| [top](#introduction) | :stuck_out_tongue_winking_eye: | `:stuck_out_tongue_winking_eye:` | :zany_face: | `:zany_face:` | [top](#introduction) |
++| [top](#introduction) | :stuck_out_tongue_closed_eyes: | `:stuck_out_tongue_closed_eyes:` | :money_mouth_face: | `:money_mouth_face:` | [top](#introduction) |
++
++### Face Hand
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :hugs: | `:hugs:` | :hand_over_mouth: | `:hand_over_mouth:` | [top](#introduction) |
++| [top](#introduction) | :shushing_face: | `:shushing_face:` | :thinking: | `:thinking:` | [top](#introduction) |
++
++### Face Neutral Skeptical
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :zipper_mouth_face: | `:zipper_mouth_face:` | :raised_eyebrow: | `:raised_eyebrow:` | [top](#introduction) |
++| [top](#introduction) | :neutral_face: | `:neutral_face:` | :expressionless: | `:expressionless:` | [top](#introduction) |
++| [top](#introduction) | :no_mouth: | `:no_mouth:` | :face_in_clouds: | `:face_in_clouds:` | [top](#introduction) |
++| [top](#introduction) | :smirk: | `:smirk:` | :unamused: | `:unamused:` | [top](#introduction) |
++| [top](#introduction) | :roll_eyes: | `:roll_eyes:` | :grimacing: | `:grimacing:` | [top](#introduction) |
++| [top](#introduction) | :face_exhaling: | `:face_exhaling:` | :lying_face: | `:lying_face:` | [top](#introduction) |
++
++### Face Sleepy
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :relieved: | `:relieved:` | :pensive: | `:pensive:` | [top](#introduction) |
++| [top](#introduction) | :sleepy: | `:sleepy:` | :drooling_face: | `:drooling_face:` | [top](#introduction) |
++| [top](#introduction) | :sleeping: | `:sleeping:` | | | [top](#introduction) |
++
++### Face Unwell
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :mask: | `:mask:` | :face_with_thermometer: | `:face_with_thermometer:` | [top](#introduction) |
++| [top](#introduction) | :face_with_head_bandage: | `:face_with_head_bandage:` | :nauseated_face: | `:nauseated_face:` | [top](#introduction) |
++| [top](#introduction) | :vomiting_face: | `:vomiting_face:` | :sneezing_face: | `:sneezing_face:` | [top](#introduction) |
++| [top](#introduction) | :hot_face: | `:hot_face:` | :cold_face: | `:cold_face:` | [top](#introduction) |
++| [top](#introduction) | :woozy_face: | `:woozy_face:` | :dizzy_face: | `:dizzy_face:` | [top](#introduction) |
++| [top](#introduction) | :face_with_spiral_eyes: | `:face_with_spiral_eyes:` | :exploding_head: | `:exploding_head:` | [top](#introduction) |
++
++### Face Hat
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :cowboy_hat_face: | `:cowboy_hat_face:` | :partying_face: | `:partying_face:` | [top](#introduction) |
++| [top](#introduction) | :disguised_face: | `:disguised_face:` | | | [top](#introduction) |
++
++### Face Glasses
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :sunglasses: | `:sunglasses:` | :nerd_face: | `:nerd_face:` | [top](#introduction) |
++| [top](#introduction) | :monocle_face: | `:monocle_face:` | | | [top](#introduction) |
++
++### Face Concerned
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :confused: | `:confused:` | :worried: | `:worried:` | [top](#introduction) |
++| [top](#introduction) | :slightly_frowning_face: | `:slightly_frowning_face:` | :frowning_face: | `:frowning_face:` | [top](#introduction) |
++| [top](#introduction) | :open_mouth: | `:open_mouth:` | :hushed: | `:hushed:` | [top](#introduction) |
++| [top](#introduction) | :astonished: | `:astonished:` | :flushed: | `:flushed:` | [top](#introduction) |
++| [top](#introduction) | :pleading_face: | `:pleading_face:` | :frowning: | `:frowning:` | [top](#introduction) |
++| [top](#introduction) | :anguished: | `:anguished:` | :fearful: | `:fearful:` | [top](#introduction) |
++| [top](#introduction) | :cold_sweat: | `:cold_sweat:` | :disappointed_relieved: | `:disappointed_relieved:` | [top](#introduction) |
++| [top](#introduction) | :cry: | `:cry:` | :sob: | `:sob:` | [top](#introduction) |
++| [top](#introduction) | :scream: | `:scream:` | :confounded: | `:confounded:` | [top](#introduction) |
++| [top](#introduction) | :persevere: | `:persevere:` | :disappointed: | `:disappointed:` | [top](#introduction) |
++| [top](#introduction) | :sweat: | `:sweat:` | :weary: | `:weary:` | [top](#introduction) |
++| [top](#introduction) | :tired_face: | `:tired_face:` | :yawning_face: | `:yawning_face:` | [top](#introduction) |
++
++### Face Negative
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :triumph: | `:triumph:` | :pout: | `:pout:` `:rage:` | [top](#introduction) |
++| [top](#introduction) | :angry: | `:angry:` | :cursing_face: | `:cursing_face:` | [top](#introduction) |
++| [top](#introduction) | :smiling_imp: | `:smiling_imp:` | :imp: | `:imp:` | [top](#introduction) |
++| [top](#introduction) | :skull: | `:skull:` | :skull_and_crossbones: | `:skull_and_crossbones:` | [top](#introduction) |
++
++### Face Costume
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :hankey: | `:hankey:` `:poop:` `:shit:` | :clown_face: | `:clown_face:` | [top](#introduction) |
++| [top](#introduction) | :japanese_ogre: | `:japanese_ogre:` | :japanese_goblin: | `:japanese_goblin:` | [top](#introduction) |
++| [top](#introduction) | :ghost: | `:ghost:` | :alien: | `:alien:` | [top](#introduction) |
++| [top](#introduction) | :space_invader: | `:space_invader:` | :robot: | `:robot:` | [top](#introduction) |
++
++### Cat Face
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :smiley_cat: | `:smiley_cat:` | :smile_cat: | `:smile_cat:` | [top](#introduction) |
++| [top](#introduction) | :joy_cat: | `:joy_cat:` | :heart_eyes_cat: | `:heart_eyes_cat:` | [top](#introduction) |
++| [top](#introduction) | :smirk_cat: | `:smirk_cat:` | :kissing_cat: | `:kissing_cat:` | [top](#introduction) |
++| [top](#introduction) | :scream_cat: | `:scream_cat:` | :crying_cat_face: | `:crying_cat_face:` | [top](#introduction) |
++| [top](#introduction) | :pouting_cat: | `:pouting_cat:` | | | [top](#introduction) |
++
++### Monkey Face
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :see_no_evil: | `:see_no_evil:` | :hear_no_evil: | `:hear_no_evil:` | [top](#introduction) |
++| [top](#introduction) | :speak_no_evil: | `:speak_no_evil:` | | | [top](#introduction) |
++
++### Heart
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :love_letter: | `:love_letter:` | :cupid: | `:cupid:` | [top](#introduction) |
++| [top](#introduction) | :gift_heart: | `:gift_heart:` | :sparkling_heart: | `:sparkling_heart:` | [top](#introduction) |
++| [top](#introduction) | :heartpulse: | `:heartpulse:` | :heartbeat: | `:heartbeat:` | [top](#introduction) |
++| [top](#introduction) | :revolving_hearts: | `:revolving_hearts:` | :two_hearts: | `:two_hearts:` | [top](#introduction) |
++| [top](#introduction) | :heart_decoration: | `:heart_decoration:` | :heavy_heart_exclamation: | `:heavy_heart_exclamation:` | [top](#introduction) |
++| [top](#introduction) | :broken_heart: | `:broken_heart:` | :heart_on_fire: | `:heart_on_fire:` | [top](#introduction) |
++| [top](#introduction) | :mending_heart: | `:mending_heart:` | :heart: | `:heart:` | [top](#introduction) |
++| [top](#introduction) | :orange_heart: | `:orange_heart:` | :yellow_heart: | `:yellow_heart:` | [top](#introduction) |
++| [top](#introduction) | :green_heart: | `:green_heart:` | :blue_heart: | `:blue_heart:` | [top](#introduction) |
++| [top](#introduction) | :purple_heart: | `:purple_heart:` | :brown_heart: | `:brown_heart:` | [top](#introduction) |
++| [top](#introduction) | :black_heart: | `:black_heart:` | :white_heart: | `:white_heart:` | [top](#introduction) |
++
++### Emotion
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#introduction) | :kiss: | `:kiss:` | :100: | `:100:` | [top](#introduction) |
++| [top](#introduction) | :anger: | `:anger:` | :boom: | `:boom:` `:collision:` | [top](#introduction) |
++| [top](#introduction) | :dizzy: | `:dizzy:` | :sweat_drops: | `:sweat_drops:` | [top](#introduction) |
++| [top](#introduction) | :dash: | `:dash:` | :hole: | `:hole:` | [top](#introduction) |
++| [top](#introduction) | :speech_balloon: | `:speech_balloon:` | :eye_speech_bubble: | `:eye_speech_bubble:` | [top](#introduction) |
++| [top](#introduction) | :left_speech_bubble: | `:left_speech_bubble:` | :right_anger_bubble: | `:right_anger_bubble:` | [top](#introduction) |
++| [top](#introduction) | :thought_balloon: | `:thought_balloon:` | :zzz: | `:zzz:` | [top](#introduction) |
++
++## People & Body
++
++- [Hand Fingers Open](#hand-fingers-open)
++- [Hand Fingers Partial](#hand-fingers-partial)
++- [Hand Single Finger](#hand-single-finger)
++- [Hand Fingers Closed](#hand-fingers-closed)
++- [Hands](#hands)
++- [Hand Prop](#hand-prop)
++- [Body Parts](#body-parts)
++- [Person](#person)
++- [Person Gesture](#person-gesture)
++- [Person Role](#person-role)
++- [Person Fantasy](#person-fantasy)
++- [Person Activity](#person-activity)
++- [Person Sport](#person-sport)
++- [Person Resting](#person-resting)
++- [Family](#family)
++- [Person Symbol](#person-symbol)
++
++### Hand Fingers Open
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :wave: | `:wave:` | :raised_back_of_hand: | `:raised_back_of_hand:` | [top](#introduction) |
++| [top](#people--body) | :raised_hand_with_fingers_splayed: | `:raised_hand_with_fingers_splayed:` | :hand: | `:hand:` `:raised_hand:` | [top](#introduction) |
++| [top](#people--body) | :vulcan_salute: | `:vulcan_salute:` | | | [top](#introduction) |
++
++### Hand Fingers Partial
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :ok_hand: | `:ok_hand:` | :pinched_fingers: | `:pinched_fingers:` | [top](#introduction) |
++| [top](#people--body) | :pinching_hand: | `:pinching_hand:` | :v: | `:v:` | [top](#introduction) |
++| [top](#people--body) | :crossed_fingers: | `:crossed_fingers:` | :love_you_gesture: | `:love_you_gesture:` | [top](#introduction) |
++| [top](#people--body) | :metal: | `:metal:` | :call_me_hand: | `:call_me_hand:` | [top](#introduction) |
++
++### Hand Single Finger
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :point_left: | `:point_left:` | :point_right: | `:point_right:` | [top](#introduction) |
++| [top](#people--body) | :point_up_2: | `:point_up_2:` | :fu: | `:fu:` `:middle_finger:` | [top](#introduction) |
++| [top](#people--body) | :point_down: | `:point_down:` | :point_up: | `:point_up:` | [top](#introduction) |
++
++### Hand Fingers Closed
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :+1: | `:+1:` `:thumbsup:` | :-1: | `:-1:` `:thumbsdown:` | [top](#introduction) |
++| [top](#people--body) | :fist: | `:fist:` `:fist_raised:` | :facepunch: | `:facepunch:` `:fist_oncoming:` `:punch:` | [top](#introduction) |
++| [top](#people--body) | :fist_left: | `:fist_left:` | :fist_right: | `:fist_right:` | [top](#introduction) |
++
++### Hands
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :clap: | `:clap:` | :raised_hands: | `:raised_hands:` | [top](#introduction) |
++| [top](#people--body) | :open_hands: | `:open_hands:` | :palms_up_together: | `:palms_up_together:` | [top](#introduction) |
++| [top](#people--body) | :handshake: | `:handshake:` | :pray: | `:pray:` | [top](#introduction) |
++
++### Hand Prop
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :writing_hand: | `:writing_hand:` | :nail_care: | `:nail_care:` | [top](#introduction) |
++| [top](#people--body) | :selfie: | `:selfie:` | | | [top](#introduction) |
++
++### Body Parts
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :muscle: | `:muscle:` | :mechanical_arm: | `:mechanical_arm:` | [top](#introduction) |
++| [top](#people--body) | :mechanical_leg: | `:mechanical_leg:` | :leg: | `:leg:` | [top](#introduction) |
++| [top](#people--body) | :foot: | `:foot:` | :ear: | `:ear:` | [top](#introduction) |
++| [top](#people--body) | :ear_with_hearing_aid: | `:ear_with_hearing_aid:` | :nose: | `:nose:` | [top](#introduction) |
++| [top](#people--body) | :brain: | `:brain:` | :anatomical_heart: | `:anatomical_heart:` | [top](#introduction) |
++| [top](#people--body) | :lungs: | `:lungs:` | :tooth: | `:tooth:` | [top](#introduction) |
++| [top](#people--body) | :bone: | `:bone:` | :eyes: | `:eyes:` | [top](#introduction) |
++| [top](#people--body) | :eye: | `:eye:` | :tongue: | `:tongue:` | [top](#introduction) |
++| [top](#people--body) | :lips: | `:lips:` | | | [top](#introduction) |
++
++### Person
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :baby: | `:baby:` | :child: | `:child:` | [top](#introduction) |
++| [top](#people--body) | :boy: | `:boy:` | :girl: | `:girl:` | [top](#introduction) |
++| [top](#people--body) | :adult: | `:adult:` | :blond_haired_person: | `:blond_haired_person:` | [top](#introduction) |
++| [top](#people--body) | :man: | `:man:` | :bearded_person: | `:bearded_person:` | [top](#introduction) |
++| [top](#people--body) | :man_beard: | `:man_beard:` | :woman_beard: | `:woman_beard:` | [top](#introduction) |
++| [top](#people--body) | :red_haired_man: | `:red_haired_man:` | :curly_haired_man: | `:curly_haired_man:` | [top](#introduction) |
++| [top](#people--body) | :white_haired_man: | `:white_haired_man:` | :bald_man: | `:bald_man:` | [top](#introduction) |
++| [top](#people--body) | :woman: | `:woman:` | :red_haired_woman: | `:red_haired_woman:` | [top](#introduction) |
++| [top](#people--body) | :person_red_hair: | `:person_red_hair:` | :curly_haired_woman: | `:curly_haired_woman:` | [top](#introduction) |
++| [top](#people--body) | :person_curly_hair: | `:person_curly_hair:` | :white_haired_woman: | `:white_haired_woman:` | [top](#introduction) |
++| [top](#people--body) | :person_white_hair: | `:person_white_hair:` | :bald_woman: | `:bald_woman:` | [top](#introduction) |
++| [top](#people--body) | :person_bald: | `:person_bald:` | :blond_haired_woman: | `:blond_haired_woman:` `:blonde_woman:` | [top](#introduction) |
++| [top](#people--body) | :blond_haired_man: | `:blond_haired_man:` | :older_adult: | `:older_adult:` | [top](#introduction) |
++| [top](#people--body) | :older_man: | `:older_man:` | :older_woman: | `:older_woman:` | [top](#introduction) |
++
++### Person Gesture
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :frowning_person: | `:frowning_person:` | :frowning_man: | `:frowning_man:` | [top](#introduction) |
++| [top](#people--body) | :frowning_woman: | `:frowning_woman:` | :pouting_face: | `:pouting_face:` | [top](#introduction) |
++| [top](#people--body) | :pouting_man: | `:pouting_man:` | :pouting_woman: | `:pouting_woman:` | [top](#introduction) |
++| [top](#people--body) | :no_good: | `:no_good:` | :ng_man: | `:ng_man:` `:no_good_man:` | [top](#introduction) |
++| [top](#people--body) | :ng_woman: | `:ng_woman:` `:no_good_woman:` | :ok_person: | `:ok_person:` | [top](#introduction) |
++| [top](#people--body) | :ok_man: | `:ok_man:` | :ok_woman: | `:ok_woman:` | [top](#introduction) |
++| [top](#people--body) | :information_desk_person: | `:information_desk_person:` `:tipping_hand_person:` | :sassy_man: | `:sassy_man:` `:tipping_hand_man:` | [top](#introduction) |
++| [top](#people--body) | :sassy_woman: | `:sassy_woman:` `:tipping_hand_woman:` | :raising_hand: | `:raising_hand:` | [top](#introduction) |
++| [top](#people--body) | :raising_hand_man: | `:raising_hand_man:` | :raising_hand_woman: | `:raising_hand_woman:` | [top](#introduction) |
++| [top](#people--body) | :deaf_person: | `:deaf_person:` | :deaf_man: | `:deaf_man:` | [top](#introduction) |
++| [top](#people--body) | :deaf_woman: | `:deaf_woman:` | :bow: | `:bow:` | [top](#introduction) |
++| [top](#people--body) | :bowing_man: | `:bowing_man:` | :bowing_woman: | `:bowing_woman:` | [top](#introduction) |
++| [top](#people--body) | :facepalm: | `:facepalm:` | :man_facepalming: | `:man_facepalming:` | [top](#introduction) |
++| [top](#people--body) | :woman_facepalming: | `:woman_facepalming:` | :shrug: | `:shrug:` | [top](#introduction) |
++| [top](#people--body) | :man_shrugging: | `:man_shrugging:` | :woman_shrugging: | `:woman_shrugging:` | [top](#introduction) |
++
++### Person Role
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :health_worker: | `:health_worker:` | :man_health_worker: | `:man_health_worker:` | [top](#introduction) |
++| [top](#people--body) | :woman_health_worker: | `:woman_health_worker:` | :student: | `:student:` | [top](#introduction) |
++| [top](#people--body) | :man_student: | `:man_student:` | :woman_student: | `:woman_student:` | [top](#introduction) |
++| [top](#people--body) | :teacher: | `:teacher:` | :man_teacher: | `:man_teacher:` | [top](#introduction) |
++| [top](#people--body) | :woman_teacher: | `:woman_teacher:` | :judge: | `:judge:` | [top](#introduction) |
++| [top](#people--body) | :man_judge: | `:man_judge:` | :woman_judge: | `:woman_judge:` | [top](#introduction) |
++| [top](#people--body) | :farmer: | `:farmer:` | :man_farmer: | `:man_farmer:` | [top](#introduction) |
++| [top](#people--body) | :woman_farmer: | `:woman_farmer:` | :cook: | `:cook:` | [top](#introduction) |
++| [top](#people--body) | :man_cook: | `:man_cook:` | :woman_cook: | `:woman_cook:` | [top](#introduction) |
++| [top](#people--body) | :mechanic: | `:mechanic:` | :man_mechanic: | `:man_mechanic:` | [top](#introduction) |
++| [top](#people--body) | :woman_mechanic: | `:woman_mechanic:` | :factory_worker: | `:factory_worker:` | [top](#introduction) |
++| [top](#people--body) | :man_factory_worker: | `:man_factory_worker:` | :woman_factory_worker: | `:woman_factory_worker:` | [top](#introduction) |
++| [top](#people--body) | :office_worker: | `:office_worker:` | :man_office_worker: | `:man_office_worker:` | [top](#introduction) |
++| [top](#people--body) | :woman_office_worker: | `:woman_office_worker:` | :scientist: | `:scientist:` | [top](#introduction) |
++| [top](#people--body) | :man_scientist: | `:man_scientist:` | :woman_scientist: | `:woman_scientist:` | [top](#introduction) |
++| [top](#people--body) | :technologist: | `:technologist:` | :man_technologist: | `:man_technologist:` | [top](#introduction) |
++| [top](#people--body) | :woman_technologist: | `:woman_technologist:` | :singer: | `:singer:` | [top](#introduction) |
++| [top](#people--body) | :man_singer: | `:man_singer:` | :woman_singer: | `:woman_singer:` | [top](#introduction) |
++| [top](#people--body) | :artist: | `:artist:` | :man_artist: | `:man_artist:` | [top](#introduction) |
++| [top](#people--body) | :woman_artist: | `:woman_artist:` | :pilot: | `:pilot:` | [top](#introduction) |
++| [top](#people--body) | :man_pilot: | `:man_pilot:` | :woman_pilot: | `:woman_pilot:` | [top](#introduction) |
++| [top](#people--body) | :astronaut: | `:astronaut:` | :man_astronaut: | `:man_astronaut:` | [top](#introduction) |
++| [top](#people--body) | :woman_astronaut: | `:woman_astronaut:` | :firefighter: | `:firefighter:` | [top](#introduction) |
++| [top](#people--body) | :man_firefighter: | `:man_firefighter:` | :woman_firefighter: | `:woman_firefighter:` | [top](#introduction) |
++| [top](#people--body) | :cop: | `:cop:` `:police_officer:` | :policeman: | `:policeman:` | [top](#introduction) |
++| [top](#people--body) | :policewoman: | `:policewoman:` | :detective: | `:detective:` | [top](#introduction) |
++| [top](#people--body) | :male_detective: | `:male_detective:` | :female_detective: | `:female_detective:` | [top](#introduction) |
++| [top](#people--body) | :guard: | `:guard:` | :guardsman: | `:guardsman:` | [top](#introduction) |
++| [top](#people--body) | :guardswoman: | `:guardswoman:` | :ninja: | `:ninja:` | [top](#introduction) |
++| [top](#people--body) | :construction_worker: | `:construction_worker:` | :construction_worker_man: | `:construction_worker_man:` | [top](#introduction) |
++| [top](#people--body) | :construction_worker_woman: | `:construction_worker_woman:` | :prince: | `:prince:` | [top](#introduction) |
++| [top](#people--body) | :princess: | `:princess:` | :person_with_turban: | `:person_with_turban:` | [top](#introduction) |
++| [top](#people--body) | :man_with_turban: | `:man_with_turban:` | :woman_with_turban: | `:woman_with_turban:` | [top](#introduction) |
++| [top](#people--body) | :man_with_gua_pi_mao: | `:man_with_gua_pi_mao:` | :woman_with_headscarf: | `:woman_with_headscarf:` | [top](#introduction) |
++| [top](#people--body) | :person_in_tuxedo: | `:person_in_tuxedo:` | :man_in_tuxedo: | `:man_in_tuxedo:` | [top](#introduction) |
++| [top](#people--body) | :woman_in_tuxedo: | `:woman_in_tuxedo:` | :person_with_veil: | `:person_with_veil:` | [top](#introduction) |
++| [top](#people--body) | :man_with_veil: | `:man_with_veil:` | :bride_with_veil: | `:bride_with_veil:` `:woman_with_veil:` | [top](#introduction) |
++| [top](#people--body) | :pregnant_woman: | `:pregnant_woman:` | :breast_feeding: | `:breast_feeding:` | [top](#introduction) |
++| [top](#people--body) | :woman_feeding_baby: | `:woman_feeding_baby:` | :man_feeding_baby: | `:man_feeding_baby:` | [top](#introduction) |
++| [top](#people--body) | :person_feeding_baby: | `:person_feeding_baby:` | | | [top](#introduction) |
++
++### Person Fantasy
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :angel: | `:angel:` | :santa: | `:santa:` | [top](#introduction) |
++| [top](#people--body) | :mrs_claus: | `:mrs_claus:` | :mx_claus: | `:mx_claus:` | [top](#introduction) |
++| [top](#people--body) | :superhero: | `:superhero:` | :superhero_man: | `:superhero_man:` | [top](#introduction) |
++| [top](#people--body) | :superhero_woman: | `:superhero_woman:` | :supervillain: | `:supervillain:` | [top](#introduction) |
++| [top](#people--body) | :supervillain_man: | `:supervillain_man:` | :supervillain_woman: | `:supervillain_woman:` | [top](#introduction) |
++| [top](#people--body) | :mage: | `:mage:` | :mage_man: | `:mage_man:` | [top](#introduction) |
++| [top](#people--body) | :mage_woman: | `:mage_woman:` | :fairy: | `:fairy:` | [top](#introduction) |
++| [top](#people--body) | :fairy_man: | `:fairy_man:` | :fairy_woman: | `:fairy_woman:` | [top](#introduction) |
++| [top](#people--body) | :vampire: | `:vampire:` | :vampire_man: | `:vampire_man:` | [top](#introduction) |
++| [top](#people--body) | :vampire_woman: | `:vampire_woman:` | :merperson: | `:merperson:` | [top](#introduction) |
++| [top](#people--body) | :merman: | `:merman:` | :mermaid: | `:mermaid:` | [top](#introduction) |
++| [top](#people--body) | :elf: | `:elf:` | :elf_man: | `:elf_man:` | [top](#introduction) |
++| [top](#people--body) | :elf_woman: | `:elf_woman:` | :genie: | `:genie:` | [top](#introduction) |
++| [top](#people--body) | :genie_man: | `:genie_man:` | :genie_woman: | `:genie_woman:` | [top](#introduction) |
++| [top](#people--body) | :zombie: | `:zombie:` | :zombie_man: | `:zombie_man:` | [top](#introduction) |
++| [top](#people--body) | :zombie_woman: | `:zombie_woman:` | | | [top](#introduction) |
++
++### Person Activity
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :massage: | `:massage:` | :massage_man: | `:massage_man:` | [top](#introduction) |
++| [top](#people--body) | :massage_woman: | `:massage_woman:` | :haircut: | `:haircut:` | [top](#introduction) |
++| [top](#people--body) | :haircut_man: | `:haircut_man:` | :haircut_woman: | `:haircut_woman:` | [top](#introduction) |
++| [top](#people--body) | :walking: | `:walking:` | :walking_man: | `:walking_man:` | [top](#introduction) |
++| [top](#people--body) | :walking_woman: | `:walking_woman:` | :standing_person: | `:standing_person:` | [top](#introduction) |
++| [top](#people--body) | :standing_man: | `:standing_man:` | :standing_woman: | `:standing_woman:` | [top](#introduction) |
++| [top](#people--body) | :kneeling_person: | `:kneeling_person:` | :kneeling_man: | `:kneeling_man:` | [top](#introduction) |
++| [top](#people--body) | :kneeling_woman: | `:kneeling_woman:` | :person_with_probing_cane: | `:person_with_probing_cane:` | [top](#introduction) |
++| [top](#people--body) | :man_with_probing_cane: | `:man_with_probing_cane:` | :woman_with_probing_cane: | `:woman_with_probing_cane:` | [top](#introduction) |
++| [top](#people--body) | :person_in_motorized_wheelchair: | `:person_in_motorized_wheelchair:` | :man_in_motorized_wheelchair: | `:man_in_motorized_wheelchair:` | [top](#introduction) |
++| [top](#people--body) | :woman_in_motorized_wheelchair: | `:woman_in_motorized_wheelchair:` | :person_in_manual_wheelchair: | `:person_in_manual_wheelchair:` | [top](#introduction) |
++| [top](#people--body) | :man_in_manual_wheelchair: | `:man_in_manual_wheelchair:` | :woman_in_manual_wheelchair: | `:woman_in_manual_wheelchair:` | [top](#introduction) |
++| [top](#people--body) | :runner: | `:runner:` `:running:` | :running_man: | `:running_man:` | [top](#introduction) |
++| [top](#people--body) | :running_woman: | `:running_woman:` | :dancer: | `:dancer:` `:woman_dancing:` | [top](#introduction) |
++| [top](#people--body) | :man_dancing: | `:man_dancing:` | :business_suit_levitating: | `:business_suit_levitating:` | [top](#introduction) |
++| [top](#people--body) | :dancers: | `:dancers:` | :dancing_men: | `:dancing_men:` | [top](#introduction) |
++| [top](#people--body) | :dancing_women: | `:dancing_women:` | :sauna_person: | `:sauna_person:` | [top](#introduction) |
++| [top](#people--body) | :sauna_man: | `:sauna_man:` | :sauna_woman: | `:sauna_woman:` | [top](#introduction) |
++| [top](#people--body) | :climbing: | `:climbing:` | :climbing_man: | `:climbing_man:` | [top](#introduction) |
++| [top](#people--body) | :climbing_woman: | `:climbing_woman:` | | | [top](#introduction) |
++
++### Person Sport
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :person_fencing: | `:person_fencing:` | :horse_racing: | `:horse_racing:` | [top](#introduction) |
++| [top](#people--body) | :skier: | `:skier:` | :snowboarder: | `:snowboarder:` | [top](#introduction) |
++| [top](#people--body) | :golfing: | `:golfing:` | :golfing_man: | `:golfing_man:` | [top](#introduction) |
++| [top](#people--body) | :golfing_woman: | `:golfing_woman:` | :surfer: | `:surfer:` | [top](#introduction) |
++| [top](#people--body) | :surfing_man: | `:surfing_man:` | :surfing_woman: | `:surfing_woman:` | [top](#introduction) |
++| [top](#people--body) | :rowboat: | `:rowboat:` | :rowing_man: | `:rowing_man:` | [top](#introduction) |
++| [top](#people--body) | :rowing_woman: | `:rowing_woman:` | :swimmer: | `:swimmer:` | [top](#introduction) |
++| [top](#people--body) | :swimming_man: | `:swimming_man:` | :swimming_woman: | `:swimming_woman:` | [top](#introduction) |
++| [top](#people--body) | :bouncing_ball_person: | `:bouncing_ball_person:` | :basketball_man: | `:basketball_man:` `:bouncing_ball_man:` | [top](#introduction) |
++| [top](#people--body) | :basketball_woman: | `:basketball_woman:` `:bouncing_ball_woman:` | :weight_lifting: | `:weight_lifting:` | [top](#introduction) |
++| [top](#people--body) | :weight_lifting_man: | `:weight_lifting_man:` | :weight_lifting_woman: | `:weight_lifting_woman:` | [top](#introduction) |
++| [top](#people--body) | :bicyclist: | `:bicyclist:` | :biking_man: | `:biking_man:` | [top](#introduction) |
++| [top](#people--body) | :biking_woman: | `:biking_woman:` | :mountain_bicyclist: | `:mountain_bicyclist:` | [top](#introduction) |
++| [top](#people--body) | :mountain_biking_man: | `:mountain_biking_man:` | :mountain_biking_woman: | `:mountain_biking_woman:` | [top](#introduction) |
++| [top](#people--body) | :cartwheeling: | `:cartwheeling:` | :man_cartwheeling: | `:man_cartwheeling:` | [top](#introduction) |
++| [top](#people--body) | :woman_cartwheeling: | `:woman_cartwheeling:` | :wrestling: | `:wrestling:` | [top](#introduction) |
++| [top](#people--body) | :men_wrestling: | `:men_wrestling:` | :women_wrestling: | `:women_wrestling:` | [top](#introduction) |
++| [top](#people--body) | :water_polo: | `:water_polo:` | :man_playing_water_polo: | `:man_playing_water_polo:` | [top](#introduction) |
++| [top](#people--body) | :woman_playing_water_polo: | `:woman_playing_water_polo:` | :handball_person: | `:handball_person:` | [top](#introduction) |
++| [top](#people--body) | :man_playing_handball: | `:man_playing_handball:` | :woman_playing_handball: | `:woman_playing_handball:` | [top](#introduction) |
++| [top](#people--body) | :juggling_person: | `:juggling_person:` | :man_juggling: | `:man_juggling:` | [top](#introduction) |
++| [top](#people--body) | :woman_juggling: | `:woman_juggling:` | | | [top](#introduction) |
++
++### Person Resting
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :lotus_position: | `:lotus_position:` | :lotus_position_man: | `:lotus_position_man:` | [top](#introduction) |
++| [top](#people--body) | :lotus_position_woman: | `:lotus_position_woman:` | :bath: | `:bath:` | [top](#introduction) |
++| [top](#people--body) | :sleeping_bed: | `:sleeping_bed:` | | | [top](#introduction) |
++
++### Family
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :people_holding_hands: | `:people_holding_hands:` | :two_women_holding_hands: | `:two_women_holding_hands:` | [top](#introduction) |
++| [top](#people--body) | :couple: | `:couple:` | :two_men_holding_hands: | `:two_men_holding_hands:` | [top](#introduction) |
++| [top](#people--body) | :couplekiss: | `:couplekiss:` | :couplekiss_man_woman: | `:couplekiss_man_woman:` | [top](#introduction) |
++| [top](#people--body) | :couplekiss_man_man: | `:couplekiss_man_man:` | :couplekiss_woman_woman: | `:couplekiss_woman_woman:` | [top](#introduction) |
++| [top](#people--body) | :couple_with_heart: | `:couple_with_heart:` | :couple_with_heart_woman_man: | `:couple_with_heart_woman_man:` | [top](#introduction) |
++| [top](#people--body) | :couple_with_heart_man_man: | `:couple_with_heart_man_man:` | :couple_with_heart_woman_woman: | `:couple_with_heart_woman_woman:` | [top](#introduction) |
++| [top](#people--body) | :family_man_woman_boy: | `:family_man_woman_boy:` | :family_man_woman_girl: | `:family_man_woman_girl:` | [top](#introduction) |
++| [top](#people--body) | :family_man_woman_girl_boy: | `:family_man_woman_girl_boy:` | :family_man_woman_boy_boy: | `:family_man_woman_boy_boy:` | [top](#introduction) |
++| [top](#people--body) | :family_man_woman_girl_girl: | `:family_man_woman_girl_girl:` | :family_man_man_boy: | `:family_man_man_boy:` | [top](#introduction) |
++| [top](#people--body) | :family_man_man_girl: | `:family_man_man_girl:` | :family_man_man_girl_boy: | `:family_man_man_girl_boy:` | [top](#introduction) |
++| [top](#people--body) | :family_man_man_boy_boy: | `:family_man_man_boy_boy:` | :family_man_man_girl_girl: | `:family_man_man_girl_girl:` | [top](#introduction) |
++| [top](#people--body) | :family_woman_woman_boy: | `:family_woman_woman_boy:` | :family_woman_woman_girl: | `:family_woman_woman_girl:` | [top](#introduction) |
++| [top](#people--body) | :family_woman_woman_girl_boy: | `:family_woman_woman_girl_boy:` | :family_woman_woman_boy_boy: | `:family_woman_woman_boy_boy:` | [top](#introduction) |
++| [top](#people--body) | :family_woman_woman_girl_girl: | `:family_woman_woman_girl_girl:` | :family_man_boy: | `:family_man_boy:` | [top](#introduction) |
++| [top](#people--body) | :family_man_boy_boy: | `:family_man_boy_boy:` | :family_man_girl: | `:family_man_girl:` | [top](#introduction) |
++| [top](#people--body) | :family_man_girl_boy: | `:family_man_girl_boy:` | :family_man_girl_girl: | `:family_man_girl_girl:` | [top](#introduction) |
++| [top](#people--body) | :family_woman_boy: | `:family_woman_boy:` | :family_woman_boy_boy: | `:family_woman_boy_boy:` | [top](#introduction) |
++| [top](#people--body) | :family_woman_girl: | `:family_woman_girl:` | :family_woman_girl_boy: | `:family_woman_girl_boy:` | [top](#introduction) |
++| [top](#people--body) | :family_woman_girl_girl: | `:family_woman_girl_girl:` | | | [top](#introduction) |
++
++### Person Symbol
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#people--body) | :speaking_head: | `:speaking_head:` | :bust_in_silhouette: | `:bust_in_silhouette:` | [top](#introduction) |
++| [top](#people--body) | :busts_in_silhouette: | `:busts_in_silhouette:` | :people_hugging: | `:people_hugging:` | [top](#introduction) |
++| [top](#people--body) | :family: | `:family:` | :footprints: | `:footprints:` | [top](#introduction) |
++
++## Animals & Nature
++
++- [Animal Mammal](#animal-mammal)
++- [Animal Bird](#animal-bird)
++- [Animal Amphibian](#animal-amphibian)
++- [Animal Reptile](#animal-reptile)
++- [Animal Marine](#animal-marine)
++- [Animal Bug](#animal-bug)
++- [Plant Flower](#plant-flower)
++- [Plant Other](#plant-other)
++
++### Animal Mammal
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#animals--nature) | :monkey_face: | `:monkey_face:` | :monkey: | `:monkey:` | [top](#introduction) |
++| [top](#animals--nature) | :gorilla: | `:gorilla:` | :orangutan: | `:orangutan:` | [top](#introduction) |
++| [top](#animals--nature) | :dog: | `:dog:` | :dog2: | `:dog2:` | [top](#introduction) |
++| [top](#animals--nature) | :guide_dog: | `:guide_dog:` | :service_dog: | `:service_dog:` | [top](#introduction) |
++| [top](#animals--nature) | :poodle: | `:poodle:` | :wolf: | `:wolf:` | [top](#introduction) |
++| [top](#animals--nature) | :fox_face: | `:fox_face:` | :raccoon: | `:raccoon:` | [top](#introduction) |
++| [top](#animals--nature) | :cat: | `:cat:` | :cat2: | `:cat2:` | [top](#introduction) |
++| [top](#animals--nature) | :black_cat: | `:black_cat:` | :lion: | `:lion:` | [top](#introduction) |
++| [top](#animals--nature) | :tiger: | `:tiger:` | :tiger2: | `:tiger2:` | [top](#introduction) |
++| [top](#animals--nature) | :leopard: | `:leopard:` | :horse: | `:horse:` | [top](#introduction) |
++| [top](#animals--nature) | :racehorse: | `:racehorse:` | :unicorn: | `:unicorn:` | [top](#introduction) |
++| [top](#animals--nature) | :zebra: | `:zebra:` | :deer: | `:deer:` | [top](#introduction) |
++| [top](#animals--nature) | :bison: | `:bison:` | :cow: | `:cow:` | [top](#introduction) |
++| [top](#animals--nature) | :ox: | `:ox:` | :water_buffalo: | `:water_buffalo:` | [top](#introduction) |
++| [top](#animals--nature) | :cow2: | `:cow2:` | :pig: | `:pig:` | [top](#introduction) |
++| [top](#animals--nature) | :pig2: | `:pig2:` | :boar: | `:boar:` | [top](#introduction) |
++| [top](#animals--nature) | :pig_nose: | `:pig_nose:` | :ram: | `:ram:` | [top](#introduction) |
++| [top](#animals--nature) | :sheep: | `:sheep:` | :goat: | `:goat:` | [top](#introduction) |
++| [top](#animals--nature) | :dromedary_camel: | `:dromedary_camel:` | :camel: | `:camel:` | [top](#introduction) |
++| [top](#animals--nature) | :llama: | `:llama:` | :giraffe: | `:giraffe:` | [top](#introduction) |
++| [top](#animals--nature) | :elephant: | `:elephant:` | :mammoth: | `:mammoth:` | [top](#introduction) |
++| [top](#animals--nature) | :rhinoceros: | `:rhinoceros:` | :hippopotamus: | `:hippopotamus:` | [top](#introduction) |
++| [top](#animals--nature) | :mouse: | `:mouse:` | :mouse2: | `:mouse2:` | [top](#introduction) |
++| [top](#animals--nature) | :rat: | `:rat:` | :hamster: | `:hamster:` | [top](#introduction) |
++| [top](#animals--nature) | :rabbit: | `:rabbit:` | :rabbit2: | `:rabbit2:` | [top](#introduction) |
++| [top](#animals--nature) | :chipmunk: | `:chipmunk:` | :beaver: | `:beaver:` | [top](#introduction) |
++| [top](#animals--nature) | :hedgehog: | `:hedgehog:` | :bat: | `:bat:` | [top](#introduction) |
++| [top](#animals--nature) | :bear: | `:bear:` | :polar_bear: | `:polar_bear:` | [top](#introduction) |
++| [top](#animals--nature) | :koala: | `:koala:` | :panda_face: | `:panda_face:` | [top](#introduction) |
++| [top](#animals--nature) | :sloth: | `:sloth:` | :otter: | `:otter:` | [top](#introduction) |
++| [top](#animals--nature) | :skunk: | `:skunk:` | :kangaroo: | `:kangaroo:` | [top](#introduction) |
++| [top](#animals--nature) | :badger: | `:badger:` | :feet: | `:feet:` `:paw_prints:` | [top](#introduction) |
++
++### Animal Bird
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#animals--nature) | :turkey: | `:turkey:` | :chicken: | `:chicken:` | [top](#introduction) |
++| [top](#animals--nature) | :rooster: | `:rooster:` | :hatching_chick: | `:hatching_chick:` | [top](#introduction) |
++| [top](#animals--nature) | :baby_chick: | `:baby_chick:` | :hatched_chick: | `:hatched_chick:` | [top](#introduction) |
++| [top](#animals--nature) | :bird: | `:bird:` | :penguin: | `:penguin:` | [top](#introduction) |
++| [top](#animals--nature) | :dove: | `:dove:` | :eagle: | `:eagle:` | [top](#introduction) |
++| [top](#animals--nature) | :duck: | `:duck:` | :swan: | `:swan:` | [top](#introduction) |
++| [top](#animals--nature) | :owl: | `:owl:` | :dodo: | `:dodo:` | [top](#introduction) |
++| [top](#animals--nature) | :feather: | `:feather:` | :flamingo: | `:flamingo:` | [top](#introduction) |
++| [top](#animals--nature) | :peacock: | `:peacock:` | :parrot: | `:parrot:` | [top](#introduction) |
++
++### Animal Amphibian
++
++| | ico | shortcode | |
++| - | :-: | - | - |
++| [top](#animals--nature) | :frog: | `:frog:` | [top](#introduction) |
++
++### Animal Reptile
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#animals--nature) | :crocodile: | `:crocodile:` | :turtle: | `:turtle:` | [top](#introduction) |
++| [top](#animals--nature) | :lizard: | `:lizard:` | :snake: | `:snake:` | [top](#introduction) |
++| [top](#animals--nature) | :dragon_face: | `:dragon_face:` | :dragon: | `:dragon:` | [top](#introduction) |
++| [top](#animals--nature) | :sauropod: | `:sauropod:` | :t-rex: | `:t-rex:` | [top](#introduction) |
++
++### Animal Marine
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#animals--nature) | :whale: | `:whale:` | :whale2: | `:whale2:` | [top](#introduction) |
++| [top](#animals--nature) | :dolphin: | `:dolphin:` `:flipper:` | :seal: | `:seal:` | [top](#introduction) |
++| [top](#animals--nature) | :fish: | `:fish:` | :tropical_fish: | `:tropical_fish:` | [top](#introduction) |
++| [top](#animals--nature) | :blowfish: | `:blowfish:` | :shark: | `:shark:` | [top](#introduction) |
++| [top](#animals--nature) | :octopus: | `:octopus:` | :shell: | `:shell:` | [top](#introduction) |
++
++### Animal Bug
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#animals--nature) | :snail: | `:snail:` | :butterfly: | `:butterfly:` | [top](#introduction) |
++| [top](#animals--nature) | :bug: | `:bug:` | :ant: | `:ant:` | [top](#introduction) |
++| [top](#animals--nature) | :bee: | `:bee:` `:honeybee:` | :beetle: | `:beetle:` | [top](#introduction) |
++| [top](#animals--nature) | :lady_beetle: | `:lady_beetle:` | :cricket: | `:cricket:` | [top](#introduction) |
++| [top](#animals--nature) | :cockroach: | `:cockroach:` | :spider: | `:spider:` | [top](#introduction) |
++| [top](#animals--nature) | :spider_web: | `:spider_web:` | :scorpion: | `:scorpion:` | [top](#introduction) |
++| [top](#animals--nature) | :mosquito: | `:mosquito:` | :fly: | `:fly:` | [top](#introduction) |
++| [top](#animals--nature) | :worm: | `:worm:` | :microbe: | `:microbe:` | [top](#introduction) |
++
++### Plant Flower
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#animals--nature) | :bouquet: | `:bouquet:` | :cherry_blossom: | `:cherry_blossom:` | [top](#introduction) |
++| [top](#animals--nature) | :white_flower: | `:white_flower:` | :rosette: | `:rosette:` | [top](#introduction) |
++| [top](#animals--nature) | :rose: | `:rose:` | :wilted_flower: | `:wilted_flower:` | [top](#introduction) |
++| [top](#animals--nature) | :hibiscus: | `:hibiscus:` | :sunflower: | `:sunflower:` | [top](#introduction) |
++| [top](#animals--nature) | :blossom: | `:blossom:` | :tulip: | `:tulip:` | [top](#introduction) |
++
++### Plant Other
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#animals--nature) | :seedling: | `:seedling:` | :potted_plant: | `:potted_plant:` | [top](#introduction) |
++| [top](#animals--nature) | :evergreen_tree: | `:evergreen_tree:` | :deciduous_tree: | `:deciduous_tree:` | [top](#introduction) |
++| [top](#animals--nature) | :palm_tree: | `:palm_tree:` | :cactus: | `:cactus:` | [top](#introduction) |
++| [top](#animals--nature) | :ear_of_rice: | `:ear_of_rice:` | :herb: | `:herb:` | [top](#introduction) |
++| [top](#animals--nature) | :shamrock: | `:shamrock:` | :four_leaf_clover: | `:four_leaf_clover:` | [top](#introduction) |
++| [top](#animals--nature) | :maple_leaf: | `:maple_leaf:` | :fallen_leaf: | `:fallen_leaf:` | [top](#introduction) |
++| [top](#animals--nature) | :leaves: | `:leaves:` | :mushroom: | `:mushroom:` | [top](#introduction) |
++
++## Food & Drink
++
++- [Food Fruit](#food-fruit)
++- [Food Vegetable](#food-vegetable)
++- [Food Prepared](#food-prepared)
++- [Food Asian](#food-asian)
++- [Food Marine](#food-marine)
++- [Food Sweet](#food-sweet)
++- [Drink](#drink)
++- [Dishware](#dishware)
++
++### Food Fruit
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#food--drink) | :grapes: | `:grapes:` | :melon: | `:melon:` | [top](#introduction) |
++| [top](#food--drink) | :watermelon: | `:watermelon:` | :mandarin: | `:mandarin:` `:orange:` `:tangerine:` | [top](#introduction) |
++| [top](#food--drink) | :lemon: | `:lemon:` | :banana: | `:banana:` | [top](#introduction) |
++| [top](#food--drink) | :pineapple: | `:pineapple:` | :mango: | `:mango:` | [top](#introduction) |
++| [top](#food--drink) | :apple: | `:apple:` | :green_apple: | `:green_apple:` | [top](#introduction) |
++| [top](#food--drink) | :pear: | `:pear:` | :peach: | `:peach:` | [top](#introduction) |
++| [top](#food--drink) | :cherries: | `:cherries:` | :strawberry: | `:strawberry:` | [top](#introduction) |
++| [top](#food--drink) | :blueberries: | `:blueberries:` | :kiwi_fruit: | `:kiwi_fruit:` | [top](#introduction) |
++| [top](#food--drink) | :tomato: | `:tomato:` | :olive: | `:olive:` | [top](#introduction) |
++| [top](#food--drink) | :coconut: | `:coconut:` | | | [top](#introduction) |
++
++### Food Vegetable
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#food--drink) | :avocado: | `:avocado:` | :eggplant: | `:eggplant:` | [top](#introduction) |
++| [top](#food--drink) | :potato: | `:potato:` | :carrot: | `:carrot:` | [top](#introduction) |
++| [top](#food--drink) | :corn: | `:corn:` | :hot_pepper: | `:hot_pepper:` | [top](#introduction) |
++| [top](#food--drink) | :bell_pepper: | `:bell_pepper:` | :cucumber: | `:cucumber:` | [top](#introduction) |
++| [top](#food--drink) | :leafy_green: | `:leafy_green:` | :broccoli: | `:broccoli:` | [top](#introduction) |
++| [top](#food--drink) | :garlic: | `:garlic:` | :onion: | `:onion:` | [top](#introduction) |
++| [top](#food--drink) | :peanuts: | `:peanuts:` | :chestnut: | `:chestnut:` | [top](#introduction) |
++
++### Food Prepared
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#food--drink) | :bread: | `:bread:` | :croissant: | `:croissant:` | [top](#introduction) |
++| [top](#food--drink) | :baguette_bread: | `:baguette_bread:` | :flatbread: | `:flatbread:` | [top](#introduction) |
++| [top](#food--drink) | :pretzel: | `:pretzel:` | :bagel: | `:bagel:` | [top](#introduction) |
++| [top](#food--drink) | :pancakes: | `:pancakes:` | :waffle: | `:waffle:` | [top](#introduction) |
++| [top](#food--drink) | :cheese: | `:cheese:` | :meat_on_bone: | `:meat_on_bone:` | [top](#introduction) |
++| [top](#food--drink) | :poultry_leg: | `:poultry_leg:` | :cut_of_meat: | `:cut_of_meat:` | [top](#introduction) |
++| [top](#food--drink) | :bacon: | `:bacon:` | :hamburger: | `:hamburger:` | [top](#introduction) |
++| [top](#food--drink) | :fries: | `:fries:` | :pizza: | `:pizza:` | [top](#introduction) |
++| [top](#food--drink) | :hotdog: | `:hotdog:` | :sandwich: | `:sandwich:` | [top](#introduction) |
++| [top](#food--drink) | :taco: | `:taco:` | :burrito: | `:burrito:` | [top](#introduction) |
++| [top](#food--drink) | :tamale: | `:tamale:` | :stuffed_flatbread: | `:stuffed_flatbread:` | [top](#introduction) |
++| [top](#food--drink) | :falafel: | `:falafel:` | :egg: | `:egg:` | [top](#introduction) |
++| [top](#food--drink) | :fried_egg: | `:fried_egg:` | :shallow_pan_of_food: | `:shallow_pan_of_food:` | [top](#introduction) |
++| [top](#food--drink) | :stew: | `:stew:` | :fondue: | `:fondue:` | [top](#introduction) |
++| [top](#food--drink) | :bowl_with_spoon: | `:bowl_with_spoon:` | :green_salad: | `:green_salad:` | [top](#introduction) |
++| [top](#food--drink) | :popcorn: | `:popcorn:` | :butter: | `:butter:` | [top](#introduction) |
++| [top](#food--drink) | :salt: | `:salt:` | :canned_food: | `:canned_food:` | [top](#introduction) |
++
++### Food Asian
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#food--drink) | :bento: | `:bento:` | :rice_cracker: | `:rice_cracker:` | [top](#introduction) |
++| [top](#food--drink) | :rice_ball: | `:rice_ball:` | :rice: | `:rice:` | [top](#introduction) |
++| [top](#food--drink) | :curry: | `:curry:` | :ramen: | `:ramen:` | [top](#introduction) |
++| [top](#food--drink) | :spaghetti: | `:spaghetti:` | :sweet_potato: | `:sweet_potato:` | [top](#introduction) |
++| [top](#food--drink) | :oden: | `:oden:` | :sushi: | `:sushi:` | [top](#introduction) |
++| [top](#food--drink) | :fried_shrimp: | `:fried_shrimp:` | :fish_cake: | `:fish_cake:` | [top](#introduction) |
++| [top](#food--drink) | :moon_cake: | `:moon_cake:` | :dango: | `:dango:` | [top](#introduction) |
++| [top](#food--drink) | :dumpling: | `:dumpling:` | :fortune_cookie: | `:fortune_cookie:` | [top](#introduction) |
++| [top](#food--drink) | :takeout_box: | `:takeout_box:` | | | [top](#introduction) |
++
++### Food Marine
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#food--drink) | :crab: | `:crab:` | :lobster: | `:lobster:` | [top](#introduction) |
++| [top](#food--drink) | :shrimp: | `:shrimp:` | :squid: | `:squid:` | [top](#introduction) |
++| [top](#food--drink) | :oyster: | `:oyster:` | | | [top](#introduction) |
++
++### Food Sweet
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#food--drink) | :icecream: | `:icecream:` | :shaved_ice: | `:shaved_ice:` | [top](#introduction) |
++| [top](#food--drink) | :ice_cream: | `:ice_cream:` | :doughnut: | `:doughnut:` | [top](#introduction) |
++| [top](#food--drink) | :cookie: | `:cookie:` | :birthday: | `:birthday:` | [top](#introduction) |
++| [top](#food--drink) | :cake: | `:cake:` | :cupcake: | `:cupcake:` | [top](#introduction) |
++| [top](#food--drink) | :pie: | `:pie:` | :chocolate_bar: | `:chocolate_bar:` | [top](#introduction) |
++| [top](#food--drink) | :candy: | `:candy:` | :lollipop: | `:lollipop:` | [top](#introduction) |
++| [top](#food--drink) | :custard: | `:custard:` | :honey_pot: | `:honey_pot:` | [top](#introduction) |
++
++### Drink
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#food--drink) | :baby_bottle: | `:baby_bottle:` | :milk_glass: | `:milk_glass:` | [top](#introduction) |
++| [top](#food--drink) | :coffee: | `:coffee:` | :teapot: | `:teapot:` | [top](#introduction) |
++| [top](#food--drink) | :tea: | `:tea:` | :sake: | `:sake:` | [top](#introduction) |
++| [top](#food--drink) | :champagne: | `:champagne:` | :wine_glass: | `:wine_glass:` | [top](#introduction) |
++| [top](#food--drink) | :cocktail: | `:cocktail:` | :tropical_drink: | `:tropical_drink:` | [top](#introduction) |
++| [top](#food--drink) | :beer: | `:beer:` | :beers: | `:beers:` | [top](#introduction) |
++| [top](#food--drink) | :clinking_glasses: | `:clinking_glasses:` | :tumbler_glass: | `:tumbler_glass:` | [top](#introduction) |
++| [top](#food--drink) | :cup_with_straw: | `:cup_with_straw:` | :bubble_tea: | `:bubble_tea:` | [top](#introduction) |
++| [top](#food--drink) | :beverage_box: | `:beverage_box:` | :mate: | `:mate:` | [top](#introduction) |
++| [top](#food--drink) | :ice_cube: | `:ice_cube:` | | | [top](#introduction) |
++
++### Dishware
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#food--drink) | :chopsticks: | `:chopsticks:` | :plate_with_cutlery: | `:plate_with_cutlery:` | [top](#introduction) |
++| [top](#food--drink) | :fork_and_knife: | `:fork_and_knife:` | :spoon: | `:spoon:` | [top](#introduction) |
++| [top](#food--drink) | :hocho: | `:hocho:` `:knife:` | :amphora: | `:amphora:` | [top](#introduction) |
++
++## Travel & Places
++
++- [Place Map](#place-map)
++- [Place Geographic](#place-geographic)
++- [Place Building](#place-building)
++- [Place Religious](#place-religious)
++- [Place Other](#place-other)
++- [Transport Ground](#transport-ground)
++- [Transport Water](#transport-water)
++- [Transport Air](#transport-air)
++- [Hotel](#hotel)
++- [Time](#time)
++- [Sky & Weather](#sky--weather)
++
++### Place Map
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#travel--places) | :earth_africa: | `:earth_africa:` | :earth_americas: | `:earth_americas:` | [top](#introduction) |
++| [top](#travel--places) | :earth_asia: | `:earth_asia:` | :globe_with_meridians: | `:globe_with_meridians:` | [top](#introduction) |
++| [top](#travel--places) | :world_map: | `:world_map:` | :japan: | `:japan:` | [top](#introduction) |
++| [top](#travel--places) | :compass: | `:compass:` | | | [top](#introduction) |
++
++### Place Geographic
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#travel--places) | :mountain_snow: | `:mountain_snow:` | :mountain: | `:mountain:` | [top](#introduction) |
++| [top](#travel--places) | :volcano: | `:volcano:` | :mount_fuji: | `:mount_fuji:` | [top](#introduction) |
++| [top](#travel--places) | :camping: | `:camping:` | :beach_umbrella: | `:beach_umbrella:` | [top](#introduction) |
++| [top](#travel--places) | :desert: | `:desert:` | :desert_island: | `:desert_island:` | [top](#introduction) |
++| [top](#travel--places) | :national_park: | `:national_park:` | | | [top](#introduction) |
++
++### Place Building
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#travel--places) | :stadium: | `:stadium:` | :classical_building: | `:classical_building:` | [top](#introduction) |
++| [top](#travel--places) | :building_construction: | `:building_construction:` | :bricks: | `:bricks:` | [top](#introduction) |
++| [top](#travel--places) | :rock: | `:rock:` | :wood: | `:wood:` | [top](#introduction) |
++| [top](#travel--places) | :hut: | `:hut:` | :houses: | `:houses:` | [top](#introduction) |
++| [top](#travel--places) | :derelict_house: | `:derelict_house:` | :house: | `:house:` | [top](#introduction) |
++| [top](#travel--places) | :house_with_garden: | `:house_with_garden:` | :office: | `:office:` | [top](#introduction) |
++| [top](#travel--places) | :post_office: | `:post_office:` | :european_post_office: | `:european_post_office:` | [top](#introduction) |
++| [top](#travel--places) | :hospital: | `:hospital:` | :bank: | `:bank:` | [top](#introduction) |
++| [top](#travel--places) | :hotel: | `:hotel:` | :love_hotel: | `:love_hotel:` | [top](#introduction) |
++| [top](#travel--places) | :convenience_store: | `:convenience_store:` | :school: | `:school:` | [top](#introduction) |
++| [top](#travel--places) | :department_store: | `:department_store:` | :factory: | `:factory:` | [top](#introduction) |
++| [top](#travel--places) | :japanese_castle: | `:japanese_castle:` | :european_castle: | `:european_castle:` | [top](#introduction) |
++| [top](#travel--places) | :wedding: | `:wedding:` | :tokyo_tower: | `:tokyo_tower:` | [top](#introduction) |
++| [top](#travel--places) | :statue_of_liberty: | `:statue_of_liberty:` | | | [top](#introduction) |
++
++### Place Religious
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#travel--places) | :church: | `:church:` | :mosque: | `:mosque:` | [top](#introduction) |
++| [top](#travel--places) | :hindu_temple: | `:hindu_temple:` | :synagogue: | `:synagogue:` | [top](#introduction) |
++| [top](#travel--places) | :shinto_shrine: | `:shinto_shrine:` | :kaaba: | `:kaaba:` | [top](#introduction) |
++
++### Place Other
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#travel--places) | :fountain: | `:fountain:` | :tent: | `:tent:` | [top](#introduction) |
++| [top](#travel--places) | :foggy: | `:foggy:` | :night_with_stars: | `:night_with_stars:` | [top](#introduction) |
++| [top](#travel--places) | :cityscape: | `:cityscape:` | :sunrise_over_mountains: | `:sunrise_over_mountains:` | [top](#introduction) |
++| [top](#travel--places) | :sunrise: | `:sunrise:` | :city_sunset: | `:city_sunset:` | [top](#introduction) |
++| [top](#travel--places) | :city_sunrise: | `:city_sunrise:` | :bridge_at_night: | `:bridge_at_night:` | [top](#introduction) |
++| [top](#travel--places) | :hotsprings: | `:hotsprings:` | :carousel_horse: | `:carousel_horse:` | [top](#introduction) |
++| [top](#travel--places) | :ferris_wheel: | `:ferris_wheel:` | :roller_coaster: | `:roller_coaster:` | [top](#introduction) |
++| [top](#travel--places) | :barber: | `:barber:` | :circus_tent: | `:circus_tent:` | [top](#introduction) |
++
++### Transport Ground
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#travel--places) | :steam_locomotive: | `:steam_locomotive:` | :railway_car: | `:railway_car:` | [top](#introduction) |
++| [top](#travel--places) | :bullettrain_side: | `:bullettrain_side:` | :bullettrain_front: | `:bullettrain_front:` | [top](#introduction) |
++| [top](#travel--places) | :train2: | `:train2:` | :metro: | `:metro:` | [top](#introduction) |
++| [top](#travel--places) | :light_rail: | `:light_rail:` | :station: | `:station:` | [top](#introduction) |
++| [top](#travel--places) | :tram: | `:tram:` | :monorail: | `:monorail:` | [top](#introduction) |
++| [top](#travel--places) | :mountain_railway: | `:mountain_railway:` | :train: | `:train:` | [top](#introduction) |
++| [top](#travel--places) | :bus: | `:bus:` | :oncoming_bus: | `:oncoming_bus:` | [top](#introduction) |
++| [top](#travel--places) | :trolleybus: | `:trolleybus:` | :minibus: | `:minibus:` | [top](#introduction) |
++| [top](#travel--places) | :ambulance: | `:ambulance:` | :fire_engine: | `:fire_engine:` | [top](#introduction) |
++| [top](#travel--places) | :police_car: | `:police_car:` | :oncoming_police_car: | `:oncoming_police_car:` | [top](#introduction) |
++| [top](#travel--places) | :taxi: | `:taxi:` | :oncoming_taxi: | `:oncoming_taxi:` | [top](#introduction) |
++| [top](#travel--places) | :car: | `:car:` `:red_car:` | :oncoming_automobile: | `:oncoming_automobile:` | [top](#introduction) |
++| [top](#travel--places) | :blue_car: | `:blue_car:` | :pickup_truck: | `:pickup_truck:` | [top](#introduction) |
++| [top](#travel--places) | :truck: | `:truck:` | :articulated_lorry: | `:articulated_lorry:` | [top](#introduction) |
++| [top](#travel--places) | :tractor: | `:tractor:` | :racing_car: | `:racing_car:` | [top](#introduction) |
++| [top](#travel--places) | :motorcycle: | `:motorcycle:` | :motor_scooter: | `:motor_scooter:` | [top](#introduction) |
++| [top](#travel--places) | :manual_wheelchair: | `:manual_wheelchair:` | :motorized_wheelchair: | `:motorized_wheelchair:` | [top](#introduction) |
++| [top](#travel--places) | :auto_rickshaw: | `:auto_rickshaw:` | :bike: | `:bike:` | [top](#introduction) |
++| [top](#travel--places) | :kick_scooter: | `:kick_scooter:` | :skateboard: | `:skateboard:` | [top](#introduction) |
++| [top](#travel--places) | :roller_skate: | `:roller_skate:` | :busstop: | `:busstop:` | [top](#introduction) |
++| [top](#travel--places) | :motorway: | `:motorway:` | :railway_track: | `:railway_track:` | [top](#introduction) |
++| [top](#travel--places) | :oil_drum: | `:oil_drum:` | :fuelpump: | `:fuelpump:` | [top](#introduction) |
++| [top](#travel--places) | :rotating_light: | `:rotating_light:` | :traffic_light: | `:traffic_light:` | [top](#introduction) |
++| [top](#travel--places) | :vertical_traffic_light: | `:vertical_traffic_light:` | :stop_sign: | `:stop_sign:` | [top](#introduction) |
++| [top](#travel--places) | :construction: | `:construction:` | | | [top](#introduction) |
++
++### Transport Water
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#travel--places) | :anchor: | `:anchor:` | :boat: | `:boat:` `:sailboat:` | [top](#introduction) |
++| [top](#travel--places) | :canoe: | `:canoe:` | :speedboat: | `:speedboat:` | [top](#introduction) |
++| [top](#travel--places) | :passenger_ship: | `:passenger_ship:` | :ferry: | `:ferry:` | [top](#introduction) |
++| [top](#travel--places) | :motor_boat: | `:motor_boat:` | :ship: | `:ship:` | [top](#introduction) |
++
++### Transport Air
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#travel--places) | :airplane: | `:airplane:` | :small_airplane: | `:small_airplane:` | [top](#introduction) |
++| [top](#travel--places) | :flight_departure: | `:flight_departure:` | :flight_arrival: | `:flight_arrival:` | [top](#introduction) |
++| [top](#travel--places) | :parachute: | `:parachute:` | :seat: | `:seat:` | [top](#introduction) |
++| [top](#travel--places) | :helicopter: | `:helicopter:` | :suspension_railway: | `:suspension_railway:` | [top](#introduction) |
++| [top](#travel--places) | :mountain_cableway: | `:mountain_cableway:` | :aerial_tramway: | `:aerial_tramway:` | [top](#introduction) |
++| [top](#travel--places) | :artificial_satellite: | `:artificial_satellite:` | :rocket: | `:rocket:` | [top](#introduction) |
++| [top](#travel--places) | :flying_saucer: | `:flying_saucer:` | | | [top](#introduction) |
++
++### Hotel
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#travel--places) | :bellhop_bell: | `:bellhop_bell:` | :luggage: | `:luggage:` | [top](#introduction) |
++
++### Time
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#travel--places) | :hourglass: | `:hourglass:` | :hourglass_flowing_sand: | `:hourglass_flowing_sand:` | [top](#introduction) |
++| [top](#travel--places) | :watch: | `:watch:` | :alarm_clock: | `:alarm_clock:` | [top](#introduction) |
++| [top](#travel--places) | :stopwatch: | `:stopwatch:` | :timer_clock: | `:timer_clock:` | [top](#introduction) |
++| [top](#travel--places) | :mantelpiece_clock: | `:mantelpiece_clock:` | :clock12: | `:clock12:` | [top](#introduction) |
++| [top](#travel--places) | :clock1230: | `:clock1230:` | :clock1: | `:clock1:` | [top](#introduction) |
++| [top](#travel--places) | :clock130: | `:clock130:` | :clock2: | `:clock2:` | [top](#introduction) |
++| [top](#travel--places) | :clock230: | `:clock230:` | :clock3: | `:clock3:` | [top](#introduction) |
++| [top](#travel--places) | :clock330: | `:clock330:` | :clock4: | `:clock4:` | [top](#introduction) |
++| [top](#travel--places) | :clock430: | `:clock430:` | :clock5: | `:clock5:` | [top](#introduction) |
++| [top](#travel--places) | :clock530: | `:clock530:` | :clock6: | `:clock6:` | [top](#introduction) |
++| [top](#travel--places) | :clock630: | `:clock630:` | :clock7: | `:clock7:` | [top](#introduction) |
++| [top](#travel--places) | :clock730: | `:clock730:` | :clock8: | `:clock8:` | [top](#introduction) |
++| [top](#travel--places) | :clock830: | `:clock830:` | :clock9: | `:clock9:` | [top](#introduction) |
++| [top](#travel--places) | :clock930: | `:clock930:` | :clock10: | `:clock10:` | [top](#introduction) |
++| [top](#travel--places) | :clock1030: | `:clock1030:` | :clock11: | `:clock11:` | [top](#introduction) |
++| [top](#travel--places) | :clock1130: | `:clock1130:` | | | [top](#introduction) |
++
++### Sky & Weather
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#travel--places) | :new_moon: | `:new_moon:` | :waxing_crescent_moon: | `:waxing_crescent_moon:` | [top](#introduction) |
++| [top](#travel--places) | :first_quarter_moon: | `:first_quarter_moon:` | :moon: | `:moon:` `:waxing_gibbous_moon:` | [top](#introduction) |
++| [top](#travel--places) | :full_moon: | `:full_moon:` | :waning_gibbous_moon: | `:waning_gibbous_moon:` | [top](#introduction) |
++| [top](#travel--places) | :last_quarter_moon: | `:last_quarter_moon:` | :waning_crescent_moon: | `:waning_crescent_moon:` | [top](#introduction) |
++| [top](#travel--places) | :crescent_moon: | `:crescent_moon:` | :new_moon_with_face: | `:new_moon_with_face:` | [top](#introduction) |
++| [top](#travel--places) | :first_quarter_moon_with_face: | `:first_quarter_moon_with_face:` | :last_quarter_moon_with_face: | `:last_quarter_moon_with_face:` | [top](#introduction) |
++| [top](#travel--places) | :thermometer: | `:thermometer:` | :sunny: | `:sunny:` | [top](#introduction) |
++| [top](#travel--places) | :full_moon_with_face: | `:full_moon_with_face:` | :sun_with_face: | `:sun_with_face:` | [top](#introduction) |
++| [top](#travel--places) | :ringed_planet: | `:ringed_planet:` | :star: | `:star:` | [top](#introduction) |
++| [top](#travel--places) | :star2: | `:star2:` | :stars: | `:stars:` | [top](#introduction) |
++| [top](#travel--places) | :milky_way: | `:milky_way:` | :cloud: | `:cloud:` | [top](#introduction) |
++| [top](#travel--places) | :partly_sunny: | `:partly_sunny:` | :cloud_with_lightning_and_rain: | `:cloud_with_lightning_and_rain:` | [top](#introduction) |
++| [top](#travel--places) | :sun_behind_small_cloud: | `:sun_behind_small_cloud:` | :sun_behind_large_cloud: | `:sun_behind_large_cloud:` | [top](#introduction) |
++| [top](#travel--places) | :sun_behind_rain_cloud: | `:sun_behind_rain_cloud:` | :cloud_with_rain: | `:cloud_with_rain:` | [top](#introduction) |
++| [top](#travel--places) | :cloud_with_snow: | `:cloud_with_snow:` | :cloud_with_lightning: | `:cloud_with_lightning:` | [top](#introduction) |
++| [top](#travel--places) | :tornado: | `:tornado:` | :fog: | `:fog:` | [top](#introduction) |
++| [top](#travel--places) | :wind_face: | `:wind_face:` | :cyclone: | `:cyclone:` | [top](#introduction) |
++| [top](#travel--places) | :rainbow: | `:rainbow:` | :closed_umbrella: | `:closed_umbrella:` | [top](#introduction) |
++| [top](#travel--places) | :open_umbrella: | `:open_umbrella:` | :umbrella: | `:umbrella:` | [top](#introduction) |
++| [top](#travel--places) | :parasol_on_ground: | `:parasol_on_ground:` | :zap: | `:zap:` | [top](#introduction) |
++| [top](#travel--places) | :snowflake: | `:snowflake:` | :snowman_with_snow: | `:snowman_with_snow:` | [top](#introduction) |
++| [top](#travel--places) | :snowman: | `:snowman:` | :comet: | `:comet:` | [top](#introduction) |
++| [top](#travel--places) | :fire: | `:fire:` | :droplet: | `:droplet:` | [top](#introduction) |
++| [top](#travel--places) | :ocean: | `:ocean:` | | | [top](#introduction) |
++
++## Activities
++
++- [Event](#event)
++- [Award Medal](#award-medal)
++- [Sport](#sport)
++- [Game](#game)
++- [Arts & Crafts](#arts--crafts)
++
++### Event
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#activities) | :jack_o_lantern: | `:jack_o_lantern:` | :christmas_tree: | `:christmas_tree:` | [top](#introduction) |
++| [top](#activities) | :fireworks: | `:fireworks:` | :sparkler: | `:sparkler:` | [top](#introduction) |
++| [top](#activities) | :firecracker: | `:firecracker:` | :sparkles: | `:sparkles:` | [top](#introduction) |
++| [top](#activities) | :balloon: | `:balloon:` | :tada: | `:tada:` | [top](#introduction) |
++| [top](#activities) | :confetti_ball: | `:confetti_ball:` | :tanabata_tree: | `:tanabata_tree:` | [top](#introduction) |
++| [top](#activities) | :bamboo: | `:bamboo:` | :dolls: | `:dolls:` | [top](#introduction) |
++| [top](#activities) | :flags: | `:flags:` | :wind_chime: | `:wind_chime:` | [top](#introduction) |
++| [top](#activities) | :rice_scene: | `:rice_scene:` | :red_envelope: | `:red_envelope:` | [top](#introduction) |
++| [top](#activities) | :ribbon: | `:ribbon:` | :gift: | `:gift:` | [top](#introduction) |
++| [top](#activities) | :reminder_ribbon: | `:reminder_ribbon:` | :tickets: | `:tickets:` | [top](#introduction) |
++| [top](#activities) | :ticket: | `:ticket:` | | | [top](#introduction) |
++
++### Award Medal
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#activities) | :medal_military: | `:medal_military:` | :trophy: | `:trophy:` | [top](#introduction) |
++| [top](#activities) | :medal_sports: | `:medal_sports:` | :1st_place_medal: | `:1st_place_medal:` | [top](#introduction) |
++| [top](#activities) | :2nd_place_medal: | `:2nd_place_medal:` | :3rd_place_medal: | `:3rd_place_medal:` | [top](#introduction) |
++
++### Sport
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#activities) | :soccer: | `:soccer:` | :baseball: | `:baseball:` | [top](#introduction) |
++| [top](#activities) | :softball: | `:softball:` | :basketball: | `:basketball:` | [top](#introduction) |
++| [top](#activities) | :volleyball: | `:volleyball:` | :football: | `:football:` | [top](#introduction) |
++| [top](#activities) | :rugby_football: | `:rugby_football:` | :tennis: | `:tennis:` | [top](#introduction) |
++| [top](#activities) | :flying_disc: | `:flying_disc:` | :bowling: | `:bowling:` | [top](#introduction) |
++| [top](#activities) | :cricket_game: | `:cricket_game:` | :field_hockey: | `:field_hockey:` | [top](#introduction) |
++| [top](#activities) | :ice_hockey: | `:ice_hockey:` | :lacrosse: | `:lacrosse:` | [top](#introduction) |
++| [top](#activities) | :ping_pong: | `:ping_pong:` | :badminton: | `:badminton:` | [top](#introduction) |
++| [top](#activities) | :boxing_glove: | `:boxing_glove:` | :martial_arts_uniform: | `:martial_arts_uniform:` | [top](#introduction) |
++| [top](#activities) | :goal_net: | `:goal_net:` | :golf: | `:golf:` | [top](#introduction) |
++| [top](#activities) | :ice_skate: | `:ice_skate:` | :fishing_pole_and_fish: | `:fishing_pole_and_fish:` | [top](#introduction) |
++| [top](#activities) | :diving_mask: | `:diving_mask:` | :running_shirt_with_sash: | `:running_shirt_with_sash:` | [top](#introduction) |
++| [top](#activities) | :ski: | `:ski:` | :sled: | `:sled:` | [top](#introduction) |
++| [top](#activities) | :curling_stone: | `:curling_stone:` | | | [top](#introduction) |
++
++### Game
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#activities) | :dart: | `:dart:` | :yo_yo: | `:yo_yo:` | [top](#introduction) |
++| [top](#activities) | :kite: | `:kite:` | :gun: | `:gun:` | [top](#introduction) |
++| [top](#activities) | :8ball: | `:8ball:` | :crystal_ball: | `:crystal_ball:` | [top](#introduction) |
++| [top](#activities) | :magic_wand: | `:magic_wand:` | :video_game: | `:video_game:` | [top](#introduction) |
++| [top](#activities) | :joystick: | `:joystick:` | :slot_machine: | `:slot_machine:` | [top](#introduction) |
++| [top](#activities) | :game_die: | `:game_die:` | :jigsaw: | `:jigsaw:` | [top](#introduction) |
++| [top](#activities) | :teddy_bear: | `:teddy_bear:` | :pinata: | `:pinata:` | [top](#introduction) |
++| [top](#activities) | :nesting_dolls: | `:nesting_dolls:` | :spades: | `:spades:` | [top](#introduction) |
++| [top](#activities) | :hearts: | `:hearts:` | :diamonds: | `:diamonds:` | [top](#introduction) |
++| [top](#activities) | :clubs: | `:clubs:` | :chess_pawn: | `:chess_pawn:` | [top](#introduction) |
++| [top](#activities) | :black_joker: | `:black_joker:` | :mahjong: | `:mahjong:` | [top](#introduction) |
++| [top](#activities) | :flower_playing_cards: | `:flower_playing_cards:` | | | [top](#introduction) |
++
++### Arts & Crafts
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#activities) | :performing_arts: | `:performing_arts:` | :framed_picture: | `:framed_picture:` | [top](#introduction) |
++| [top](#activities) | :art: | `:art:` | :thread: | `:thread:` | [top](#introduction) |
++| [top](#activities) | :sewing_needle: | `:sewing_needle:` | :yarn: | `:yarn:` | [top](#introduction) |
++| [top](#activities) | :knot: | `:knot:` | | | [top](#introduction) |
++
++## Objects
++
++- [Clothing](#clothing)
++- [Sound](#sound)
++- [Music](#music)
++- [Musical Instrument](#musical-instrument)
++- [Phone](#phone)
++- [Computer](#computer)
++- [Light & Video](#light--video)
++- [Book Paper](#book-paper)
++- [Money](#money)
++- [Mail](#mail)
++- [Writing](#writing)
++- [Office](#office)
++- [Lock](#lock)
++- [Tool](#tool)
++- [Science](#science)
++- [Medical](#medical)
++- [Household](#household)
++- [Other Object](#other-object)
++
++### Clothing
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :eyeglasses: | `:eyeglasses:` | :dark_sunglasses: | `:dark_sunglasses:` | [top](#introduction) |
++| [top](#objects) | :goggles: | `:goggles:` | :lab_coat: | `:lab_coat:` | [top](#introduction) |
++| [top](#objects) | :safety_vest: | `:safety_vest:` | :necktie: | `:necktie:` | [top](#introduction) |
++| [top](#objects) | :shirt: | `:shirt:` `:tshirt:` | :jeans: | `:jeans:` | [top](#introduction) |
++| [top](#objects) | :scarf: | `:scarf:` | :gloves: | `:gloves:` | [top](#introduction) |
++| [top](#objects) | :coat: | `:coat:` | :socks: | `:socks:` | [top](#introduction) |
++| [top](#objects) | :dress: | `:dress:` | :kimono: | `:kimono:` | [top](#introduction) |
++| [top](#objects) | :sari: | `:sari:` | :one_piece_swimsuit: | `:one_piece_swimsuit:` | [top](#introduction) |
++| [top](#objects) | :swim_brief: | `:swim_brief:` | :shorts: | `:shorts:` | [top](#introduction) |
++| [top](#objects) | :bikini: | `:bikini:` | :womans_clothes: | `:womans_clothes:` | [top](#introduction) |
++| [top](#objects) | :purse: | `:purse:` | :handbag: | `:handbag:` | [top](#introduction) |
++| [top](#objects) | :pouch: | `:pouch:` | :shopping: | `:shopping:` | [top](#introduction) |
++| [top](#objects) | :school_satchel: | `:school_satchel:` | :thong_sandal: | `:thong_sandal:` | [top](#introduction) |
++| [top](#objects) | :mans_shoe: | `:mans_shoe:` `:shoe:` | :athletic_shoe: | `:athletic_shoe:` | [top](#introduction) |
++| [top](#objects) | :hiking_boot: | `:hiking_boot:` | :flat_shoe: | `:flat_shoe:` | [top](#introduction) |
++| [top](#objects) | :high_heel: | `:high_heel:` | :sandal: | `:sandal:` | [top](#introduction) |
++| [top](#objects) | :ballet_shoes: | `:ballet_shoes:` | :boot: | `:boot:` | [top](#introduction) |
++| [top](#objects) | :crown: | `:crown:` | :womans_hat: | `:womans_hat:` | [top](#introduction) |
++| [top](#objects) | :tophat: | `:tophat:` | :mortar_board: | `:mortar_board:` | [top](#introduction) |
++| [top](#objects) | :billed_cap: | `:billed_cap:` | :military_helmet: | `:military_helmet:` | [top](#introduction) |
++| [top](#objects) | :rescue_worker_helmet: | `:rescue_worker_helmet:` | :prayer_beads: | `:prayer_beads:` | [top](#introduction) |
++| [top](#objects) | :lipstick: | `:lipstick:` | :ring: | `:ring:` | [top](#introduction) |
++| [top](#objects) | :gem: | `:gem:` | | | [top](#introduction) |
++
++### Sound
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :mute: | `:mute:` | :speaker: | `:speaker:` | [top](#introduction) |
++| [top](#objects) | :sound: | `:sound:` | :loud_sound: | `:loud_sound:` | [top](#introduction) |
++| [top](#objects) | :loudspeaker: | `:loudspeaker:` | :mega: | `:mega:` | [top](#introduction) |
++| [top](#objects) | :postal_horn: | `:postal_horn:` | :bell: | `:bell:` | [top](#introduction) |
++| [top](#objects) | :no_bell: | `:no_bell:` | | | [top](#introduction) |
++
++### Music
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :musical_score: | `:musical_score:` | :musical_note: | `:musical_note:` | [top](#introduction) |
++| [top](#objects) | :notes: | `:notes:` | :studio_microphone: | `:studio_microphone:` | [top](#introduction) |
++| [top](#objects) | :level_slider: | `:level_slider:` | :control_knobs: | `:control_knobs:` | [top](#introduction) |
++| [top](#objects) | :microphone: | `:microphone:` | :headphones: | `:headphones:` | [top](#introduction) |
++| [top](#objects) | :radio: | `:radio:` | | | [top](#introduction) |
++
++### Musical Instrument
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :saxophone: | `:saxophone:` | :accordion: | `:accordion:` | [top](#introduction) |
++| [top](#objects) | :guitar: | `:guitar:` | :musical_keyboard: | `:musical_keyboard:` | [top](#introduction) |
++| [top](#objects) | :trumpet: | `:trumpet:` | :violin: | `:violin:` | [top](#introduction) |
++| [top](#objects) | :banjo: | `:banjo:` | :drum: | `:drum:` | [top](#introduction) |
++| [top](#objects) | :long_drum: | `:long_drum:` | | | [top](#introduction) |
++
++### Phone
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :iphone: | `:iphone:` | :calling: | `:calling:` | [top](#introduction) |
++| [top](#objects) | :phone: | `:phone:` `:telephone:` | :telephone_receiver: | `:telephone_receiver:` | [top](#introduction) |
++| [top](#objects) | :pager: | `:pager:` | :fax: | `:fax:` | [top](#introduction) |
++
++### Computer
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :battery: | `:battery:` | :electric_plug: | `:electric_plug:` | [top](#introduction) |
++| [top](#objects) | :computer: | `:computer:` | :desktop_computer: | `:desktop_computer:` | [top](#introduction) |
++| [top](#objects) | :printer: | `:printer:` | :keyboard: | `:keyboard:` | [top](#introduction) |
++| [top](#objects) | :computer_mouse: | `:computer_mouse:` | :trackball: | `:trackball:` | [top](#introduction) |
++| [top](#objects) | :minidisc: | `:minidisc:` | :floppy_disk: | `:floppy_disk:` | [top](#introduction) |
++| [top](#objects) | :cd: | `:cd:` | :dvd: | `:dvd:` | [top](#introduction) |
++| [top](#objects) | :abacus: | `:abacus:` | | | [top](#introduction) |
++
++### Light & Video
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :movie_camera: | `:movie_camera:` | :film_strip: | `:film_strip:` | [top](#introduction) |
++| [top](#objects) | :film_projector: | `:film_projector:` | :clapper: | `:clapper:` | [top](#introduction) |
++| [top](#objects) | :tv: | `:tv:` | :camera: | `:camera:` | [top](#introduction) |
++| [top](#objects) | :camera_flash: | `:camera_flash:` | :video_camera: | `:video_camera:` | [top](#introduction) |
++| [top](#objects) | :vhs: | `:vhs:` | :mag: | `:mag:` | [top](#introduction) |
++| [top](#objects) | :mag_right: | `:mag_right:` | :candle: | `:candle:` | [top](#introduction) |
++| [top](#objects) | :bulb: | `:bulb:` | :flashlight: | `:flashlight:` | [top](#introduction) |
++| [top](#objects) | :izakaya_lantern: | `:izakaya_lantern:` `:lantern:` | :diya_lamp: | `:diya_lamp:` | [top](#introduction) |
++
++### Book Paper
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :notebook_with_decorative_cover: | `:notebook_with_decorative_cover:` | :closed_book: | `:closed_book:` | [top](#introduction) |
++| [top](#objects) | :book: | `:book:` `:open_book:` | :green_book: | `:green_book:` | [top](#introduction) |
++| [top](#objects) | :blue_book: | `:blue_book:` | :orange_book: | `:orange_book:` | [top](#introduction) |
++| [top](#objects) | :books: | `:books:` | :notebook: | `:notebook:` | [top](#introduction) |
++| [top](#objects) | :ledger: | `:ledger:` | :page_with_curl: | `:page_with_curl:` | [top](#introduction) |
++| [top](#objects) | :scroll: | `:scroll:` | :page_facing_up: | `:page_facing_up:` | [top](#introduction) |
++| [top](#objects) | :newspaper: | `:newspaper:` | :newspaper_roll: | `:newspaper_roll:` | [top](#introduction) |
++| [top](#objects) | :bookmark_tabs: | `:bookmark_tabs:` | :bookmark: | `:bookmark:` | [top](#introduction) |
++| [top](#objects) | :label: | `:label:` | | | [top](#introduction) |
++
++### Money
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :moneybag: | `:moneybag:` | :coin: | `:coin:` | [top](#introduction) |
++| [top](#objects) | :yen: | `:yen:` | :dollar: | `:dollar:` | [top](#introduction) |
++| [top](#objects) | :euro: | `:euro:` | :pound: | `:pound:` | [top](#introduction) |
++| [top](#objects) | :money_with_wings: | `:money_with_wings:` | :credit_card: | `:credit_card:` | [top](#introduction) |
++| [top](#objects) | :receipt: | `:receipt:` | :chart: | `:chart:` | [top](#introduction) |
++
++### Mail
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :envelope: | `:envelope:` | :e-mail: | `:e-mail:` `:email:` | [top](#introduction) |
++| [top](#objects) | :incoming_envelope: | `:incoming_envelope:` | :envelope_with_arrow: | `:envelope_with_arrow:` | [top](#introduction) |
++| [top](#objects) | :outbox_tray: | `:outbox_tray:` | :inbox_tray: | `:inbox_tray:` | [top](#introduction) |
++| [top](#objects) | :package: | `:package:` | :mailbox: | `:mailbox:` | [top](#introduction) |
++| [top](#objects) | :mailbox_closed: | `:mailbox_closed:` | :mailbox_with_mail: | `:mailbox_with_mail:` | [top](#introduction) |
++| [top](#objects) | :mailbox_with_no_mail: | `:mailbox_with_no_mail:` | :postbox: | `:postbox:` | [top](#introduction) |
++| [top](#objects) | :ballot_box: | `:ballot_box:` | | | [top](#introduction) |
++
++### Writing
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :pencil2: | `:pencil2:` | :black_nib: | `:black_nib:` | [top](#introduction) |
++| [top](#objects) | :fountain_pen: | `:fountain_pen:` | :pen: | `:pen:` | [top](#introduction) |
++| [top](#objects) | :paintbrush: | `:paintbrush:` | :crayon: | `:crayon:` | [top](#introduction) |
++| [top](#objects) | :memo: | `:memo:` `:pencil:` | | | [top](#introduction) |
++
++### Office
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :briefcase: | `:briefcase:` | :file_folder: | `:file_folder:` | [top](#introduction) |
++| [top](#objects) | :open_file_folder: | `:open_file_folder:` | :card_index_dividers: | `:card_index_dividers:` | [top](#introduction) |
++| [top](#objects) | :date: | `:date:` | :calendar: | `:calendar:` | [top](#introduction) |
++| [top](#objects) | :spiral_notepad: | `:spiral_notepad:` | :spiral_calendar: | `:spiral_calendar:` | [top](#introduction) |
++| [top](#objects) | :card_index: | `:card_index:` | :chart_with_upwards_trend: | `:chart_with_upwards_trend:` | [top](#introduction) |
++| [top](#objects) | :chart_with_downwards_trend: | `:chart_with_downwards_trend:` | :bar_chart: | `:bar_chart:` | [top](#introduction) |
++| [top](#objects) | :clipboard: | `:clipboard:` | :pushpin: | `:pushpin:` | [top](#introduction) |
++| [top](#objects) | :round_pushpin: | `:round_pushpin:` | :paperclip: | `:paperclip:` | [top](#introduction) |
++| [top](#objects) | :paperclips: | `:paperclips:` | :straight_ruler: | `:straight_ruler:` | [top](#introduction) |
++| [top](#objects) | :triangular_ruler: | `:triangular_ruler:` | :scissors: | `:scissors:` | [top](#introduction) |
++| [top](#objects) | :card_file_box: | `:card_file_box:` | :file_cabinet: | `:file_cabinet:` | [top](#introduction) |
++| [top](#objects) | :wastebasket: | `:wastebasket:` | | | [top](#introduction) |
++
++### Lock
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :lock: | `:lock:` | :unlock: | `:unlock:` | [top](#introduction) |
++| [top](#objects) | :lock_with_ink_pen: | `:lock_with_ink_pen:` | :closed_lock_with_key: | `:closed_lock_with_key:` | [top](#introduction) |
++| [top](#objects) | :key: | `:key:` | :old_key: | `:old_key:` | [top](#introduction) |
++
++### Tool
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :hammer: | `:hammer:` | :axe: | `:axe:` | [top](#introduction) |
++| [top](#objects) | :pick: | `:pick:` | :hammer_and_pick: | `:hammer_and_pick:` | [top](#introduction) |
++| [top](#objects) | :hammer_and_wrench: | `:hammer_and_wrench:` | :dagger: | `:dagger:` | [top](#introduction) |
++| [top](#objects) | :crossed_swords: | `:crossed_swords:` | :bomb: | `:bomb:` | [top](#introduction) |
++| [top](#objects) | :boomerang: | `:boomerang:` | :bow_and_arrow: | `:bow_and_arrow:` | [top](#introduction) |
++| [top](#objects) | :shield: | `:shield:` | :carpentry_saw: | `:carpentry_saw:` | [top](#introduction) |
++| [top](#objects) | :wrench: | `:wrench:` | :screwdriver: | `:screwdriver:` | [top](#introduction) |
++| [top](#objects) | :nut_and_bolt: | `:nut_and_bolt:` | :gear: | `:gear:` | [top](#introduction) |
++| [top](#objects) | :clamp: | `:clamp:` | :balance_scale: | `:balance_scale:` | [top](#introduction) |
++| [top](#objects) | :probing_cane: | `:probing_cane:` | :link: | `:link:` | [top](#introduction) |
++| [top](#objects) | :chains: | `:chains:` | :hook: | `:hook:` | [top](#introduction) |
++| [top](#objects) | :toolbox: | `:toolbox:` | :magnet: | `:magnet:` | [top](#introduction) |
++| [top](#objects) | :ladder: | `:ladder:` | | | [top](#introduction) |
++
++### Science
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :alembic: | `:alembic:` | :test_tube: | `:test_tube:` | [top](#introduction) |
++| [top](#objects) | :petri_dish: | `:petri_dish:` | :dna: | `:dna:` | [top](#introduction) |
++| [top](#objects) | :microscope: | `:microscope:` | :telescope: | `:telescope:` | [top](#introduction) |
++| [top](#objects) | :satellite: | `:satellite:` | | | [top](#introduction) |
++
++### Medical
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :syringe: | `:syringe:` | :drop_of_blood: | `:drop_of_blood:` | [top](#introduction) |
++| [top](#objects) | :pill: | `:pill:` | :adhesive_bandage: | `:adhesive_bandage:` | [top](#introduction) |
++| [top](#objects) | :stethoscope: | `:stethoscope:` | | | [top](#introduction) |
++
++### Household
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :door: | `:door:` | :elevator: | `:elevator:` | [top](#introduction) |
++| [top](#objects) | :mirror: | `:mirror:` | :window: | `:window:` | [top](#introduction) |
++| [top](#objects) | :bed: | `:bed:` | :couch_and_lamp: | `:couch_and_lamp:` | [top](#introduction) |
++| [top](#objects) | :chair: | `:chair:` | :toilet: | `:toilet:` | [top](#introduction) |
++| [top](#objects) | :plunger: | `:plunger:` | :shower: | `:shower:` | [top](#introduction) |
++| [top](#objects) | :bathtub: | `:bathtub:` | :mouse_trap: | `:mouse_trap:` | [top](#introduction) |
++| [top](#objects) | :razor: | `:razor:` | :lotion_bottle: | `:lotion_bottle:` | [top](#introduction) |
++| [top](#objects) | :safety_pin: | `:safety_pin:` | :broom: | `:broom:` | [top](#introduction) |
++| [top](#objects) | :basket: | `:basket:` | :roll_of_paper: | `:roll_of_paper:` | [top](#introduction) |
++| [top](#objects) | :bucket: | `:bucket:` | :soap: | `:soap:` | [top](#introduction) |
++| [top](#objects) | :toothbrush: | `:toothbrush:` | :sponge: | `:sponge:` | [top](#introduction) |
++| [top](#objects) | :fire_extinguisher: | `:fire_extinguisher:` | :shopping_cart: | `:shopping_cart:` | [top](#introduction) |
++
++### Other Object
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#objects) | :smoking: | `:smoking:` | :coffin: | `:coffin:` | [top](#introduction) |
++| [top](#objects) | :headstone: | `:headstone:` | :funeral_urn: | `:funeral_urn:` | [top](#introduction) |
++| [top](#objects) | :nazar_amulet: | `:nazar_amulet:` | :moyai: | `:moyai:` | [top](#introduction) |
++| [top](#objects) | :placard: | `:placard:` | | | [top](#introduction) |
++
++## Symbols
++
++- [Transport Sign](#transport-sign)
++- [Warning](#warning)
++- [Arrow](#arrow)
++- [Religion](#religion)
++- [Zodiac](#zodiac)
++- [Av Symbol](#av-symbol)
++- [Gender](#gender)
++- [Math](#math)
++- [Punctuation](#punctuation)
++- [Currency](#currency)
++- [Other Symbol](#other-symbol)
++- [Keycap](#keycap)
++- [Alphanum](#alphanum)
++- [Geometric](#geometric)
++
++### Transport Sign
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :atm: | `:atm:` | :put_litter_in_its_place: | `:put_litter_in_its_place:` | [top](#introduction) |
++| [top](#symbols) | :potable_water: | `:potable_water:` | :wheelchair: | `:wheelchair:` | [top](#introduction) |
++| [top](#symbols) | :mens: | `:mens:` | :womens: | `:womens:` | [top](#introduction) |
++| [top](#symbols) | :restroom: | `:restroom:` | :baby_symbol: | `:baby_symbol:` | [top](#introduction) |
++| [top](#symbols) | :wc: | `:wc:` | :passport_control: | `:passport_control:` | [top](#introduction) |
++| [top](#symbols) | :customs: | `:customs:` | :baggage_claim: | `:baggage_claim:` | [top](#introduction) |
++| [top](#symbols) | :left_luggage: | `:left_luggage:` | | | [top](#introduction) |
++
++### Warning
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :warning: | `:warning:` | :children_crossing: | `:children_crossing:` | [top](#introduction) |
++| [top](#symbols) | :no_entry: | `:no_entry:` | :no_entry_sign: | `:no_entry_sign:` | [top](#introduction) |
++| [top](#symbols) | :no_bicycles: | `:no_bicycles:` | :no_smoking: | `:no_smoking:` | [top](#introduction) |
++| [top](#symbols) | :do_not_litter: | `:do_not_litter:` | :non-potable_water: | `:non-potable_water:` | [top](#introduction) |
++| [top](#symbols) | :no_pedestrians: | `:no_pedestrians:` | :no_mobile_phones: | `:no_mobile_phones:` | [top](#introduction) |
++| [top](#symbols) | :underage: | `:underage:` | :radioactive: | `:radioactive:` | [top](#introduction) |
++| [top](#symbols) | :biohazard: | `:biohazard:` | | | [top](#introduction) |
++
++### Arrow
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :arrow_up: | `:arrow_up:` | :arrow_upper_right: | `:arrow_upper_right:` | [top](#introduction) |
++| [top](#symbols) | :arrow_right: | `:arrow_right:` | :arrow_lower_right: | `:arrow_lower_right:` | [top](#introduction) |
++| [top](#symbols) | :arrow_down: | `:arrow_down:` | :arrow_lower_left: | `:arrow_lower_left:` | [top](#introduction) |
++| [top](#symbols) | :arrow_left: | `:arrow_left:` | :arrow_upper_left: | `:arrow_upper_left:` | [top](#introduction) |
++| [top](#symbols) | :arrow_up_down: | `:arrow_up_down:` | :left_right_arrow: | `:left_right_arrow:` | [top](#introduction) |
++| [top](#symbols) | :leftwards_arrow_with_hook: | `:leftwards_arrow_with_hook:` | :arrow_right_hook: | `:arrow_right_hook:` | [top](#introduction) |
++| [top](#symbols) | :arrow_heading_up: | `:arrow_heading_up:` | :arrow_heading_down: | `:arrow_heading_down:` | [top](#introduction) |
++| [top](#symbols) | :arrows_clockwise: | `:arrows_clockwise:` | :arrows_counterclockwise: | `:arrows_counterclockwise:` | [top](#introduction) |
++| [top](#symbols) | :back: | `:back:` | :end: | `:end:` | [top](#introduction) |
++| [top](#symbols) | :on: | `:on:` | :soon: | `:soon:` | [top](#introduction) |
++| [top](#symbols) | :top: | `:top:` | | | [top](#introduction) |
++
++### Religion
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :place_of_worship: | `:place_of_worship:` | :atom_symbol: | `:atom_symbol:` | [top](#introduction) |
++| [top](#symbols) | :om: | `:om:` | :star_of_david: | `:star_of_david:` | [top](#introduction) |
++| [top](#symbols) | :wheel_of_dharma: | `:wheel_of_dharma:` | :yin_yang: | `:yin_yang:` | [top](#introduction) |
++| [top](#symbols) | :latin_cross: | `:latin_cross:` | :orthodox_cross: | `:orthodox_cross:` | [top](#introduction) |
++| [top](#symbols) | :star_and_crescent: | `:star_and_crescent:` | :peace_symbol: | `:peace_symbol:` | [top](#introduction) |
++| [top](#symbols) | :menorah: | `:menorah:` | :six_pointed_star: | `:six_pointed_star:` | [top](#introduction) |
++
++### Zodiac
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :aries: | `:aries:` | :taurus: | `:taurus:` | [top](#introduction) |
++| [top](#symbols) | :gemini: | `:gemini:` | :cancer: | `:cancer:` | [top](#introduction) |
++| [top](#symbols) | :leo: | `:leo:` | :virgo: | `:virgo:` | [top](#introduction) |
++| [top](#symbols) | :libra: | `:libra:` | :scorpius: | `:scorpius:` | [top](#introduction) |
++| [top](#symbols) | :sagittarius: | `:sagittarius:` | :capricorn: | `:capricorn:` | [top](#introduction) |
++| [top](#symbols) | :aquarius: | `:aquarius:` | :pisces: | `:pisces:` | [top](#introduction) |
++| [top](#symbols) | :ophiuchus: | `:ophiuchus:` | | | [top](#introduction) |
++
++### Av Symbol
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :twisted_rightwards_arrows: | `:twisted_rightwards_arrows:` | :repeat: | `:repeat:` | [top](#introduction) |
++| [top](#symbols) | :repeat_one: | `:repeat_one:` | :arrow_forward: | `:arrow_forward:` | [top](#introduction) |
++| [top](#symbols) | :fast_forward: | `:fast_forward:` | :next_track_button: | `:next_track_button:` | [top](#introduction) |
++| [top](#symbols) | :play_or_pause_button: | `:play_or_pause_button:` | :arrow_backward: | `:arrow_backward:` | [top](#introduction) |
++| [top](#symbols) | :rewind: | `:rewind:` | :previous_track_button: | `:previous_track_button:` | [top](#introduction) |
++| [top](#symbols) | :arrow_up_small: | `:arrow_up_small:` | :arrow_double_up: | `:arrow_double_up:` | [top](#introduction) |
++| [top](#symbols) | :arrow_down_small: | `:arrow_down_small:` | :arrow_double_down: | `:arrow_double_down:` | [top](#introduction) |
++| [top](#symbols) | :pause_button: | `:pause_button:` | :stop_button: | `:stop_button:` | [top](#introduction) |
++| [top](#symbols) | :record_button: | `:record_button:` | :eject_button: | `:eject_button:` | [top](#introduction) |
++| [top](#symbols) | :cinema: | `:cinema:` | :low_brightness: | `:low_brightness:` | [top](#introduction) |
++| [top](#symbols) | :high_brightness: | `:high_brightness:` | :signal_strength: | `:signal_strength:` | [top](#introduction) |
++| [top](#symbols) | :vibration_mode: | `:vibration_mode:` | :mobile_phone_off: | `:mobile_phone_off:` | [top](#introduction) |
++
++### Gender
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :female_sign: | `:female_sign:` | :male_sign: | `:male_sign:` | [top](#introduction) |
++| [top](#symbols) | :transgender_symbol: | `:transgender_symbol:` | | | [top](#introduction) |
++
++### Math
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :heavy_multiplication_x: | `:heavy_multiplication_x:` | :heavy_plus_sign: | `:heavy_plus_sign:` | [top](#introduction) |
++| [top](#symbols) | :heavy_minus_sign: | `:heavy_minus_sign:` | :heavy_division_sign: | `:heavy_division_sign:` | [top](#introduction) |
++| [top](#symbols) | :infinity: | `:infinity:` | | | [top](#introduction) |
++
++### Punctuation
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :bangbang: | `:bangbang:` | :interrobang: | `:interrobang:` | [top](#introduction) |
++| [top](#symbols) | :question: | `:question:` | :grey_question: | `:grey_question:` | [top](#introduction) |
++| [top](#symbols) | :grey_exclamation: | `:grey_exclamation:` | :exclamation: | `:exclamation:` `:heavy_exclamation_mark:` | [top](#introduction) |
++| [top](#symbols) | :wavy_dash: | `:wavy_dash:` | | | [top](#introduction) |
++
++### Currency
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :currency_exchange: | `:currency_exchange:` | :heavy_dollar_sign: | `:heavy_dollar_sign:` | [top](#introduction) |
++
++### Other Symbol
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :medical_symbol: | `:medical_symbol:` | :recycle: | `:recycle:` | [top](#introduction) |
++| [top](#symbols) | :fleur_de_lis: | `:fleur_de_lis:` | :trident: | `:trident:` | [top](#introduction) |
++| [top](#symbols) | :name_badge: | `:name_badge:` | :beginner: | `:beginner:` | [top](#introduction) |
++| [top](#symbols) | :o: | `:o:` | :white_check_mark: | `:white_check_mark:` | [top](#introduction) |
++| [top](#symbols) | :ballot_box_with_check: | `:ballot_box_with_check:` | :heavy_check_mark: | `:heavy_check_mark:` | [top](#introduction) |
++| [top](#symbols) | :x: | `:x:` | :negative_squared_cross_mark: | `:negative_squared_cross_mark:` | [top](#introduction) |
++| [top](#symbols) | :curly_loop: | `:curly_loop:` | :loop: | `:loop:` | [top](#introduction) |
++| [top](#symbols) | :part_alternation_mark: | `:part_alternation_mark:` | :eight_spoked_asterisk: | `:eight_spoked_asterisk:` | [top](#introduction) |
++| [top](#symbols) | :eight_pointed_black_star: | `:eight_pointed_black_star:` | :sparkle: | `:sparkle:` | [top](#introduction) |
++| [top](#symbols) | :copyright: | `:copyright:` | :registered: | `:registered:` | [top](#introduction) |
++| [top](#symbols) | :tm: | `:tm:` | | | [top](#introduction) |
++
++### Keycap
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :hash: | `:hash:` | :asterisk: | `:asterisk:` | [top](#introduction) |
++| [top](#symbols) | :zero: | `:zero:` | :one: | `:one:` | [top](#introduction) |
++| [top](#symbols) | :two: | `:two:` | :three: | `:three:` | [top](#introduction) |
++| [top](#symbols) | :four: | `:four:` | :five: | `:five:` | [top](#introduction) |
++| [top](#symbols) | :six: | `:six:` | :seven: | `:seven:` | [top](#introduction) |
++| [top](#symbols) | :eight: | `:eight:` | :nine: | `:nine:` | [top](#introduction) |
++| [top](#symbols) | :keycap_ten: | `:keycap_ten:` | | | [top](#introduction) |
++
++### Alphanum
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :capital_abcd: | `:capital_abcd:` | :abcd: | `:abcd:` | [top](#introduction) |
++| [top](#symbols) | :1234: | `:1234:` | :symbols: | `:symbols:` | [top](#introduction) |
++| [top](#symbols) | :abc: | `:abc:` | :a: | `:a:` | [top](#introduction) |
++| [top](#symbols) | :ab: | `:ab:` | :b: | `:b:` | [top](#introduction) |
++| [top](#symbols) | :cl: | `:cl:` | :cool: | `:cool:` | [top](#introduction) |
++| [top](#symbols) | :free: | `:free:` | :information_source: | `:information_source:` | [top](#introduction) |
++| [top](#symbols) | :id: | `:id:` | :m: | `:m:` | [top](#introduction) |
++| [top](#symbols) | :new: | `:new:` | :ng: | `:ng:` | [top](#introduction) |
++| [top](#symbols) | :o2: | `:o2:` | :ok: | `:ok:` | [top](#introduction) |
++| [top](#symbols) | :parking: | `:parking:` | :sos: | `:sos:` | [top](#introduction) |
++| [top](#symbols) | :up: | `:up:` | :vs: | `:vs:` | [top](#introduction) |
++| [top](#symbols) | :koko: | `:koko:` | :sa: | `:sa:` | [top](#introduction) |
++| [top](#symbols) | :u6708: | `:u6708:` | :u6709: | `:u6709:` | [top](#introduction) |
++| [top](#symbols) | :u6307: | `:u6307:` | :ideograph_advantage: | `:ideograph_advantage:` | [top](#introduction) |
++| [top](#symbols) | :u5272: | `:u5272:` | :u7121: | `:u7121:` | [top](#introduction) |
++| [top](#symbols) | :u7981: | `:u7981:` | :accept: | `:accept:` | [top](#introduction) |
++| [top](#symbols) | :u7533: | `:u7533:` | :u5408: | `:u5408:` | [top](#introduction) |
++| [top](#symbols) | :u7a7a: | `:u7a7a:` | :congratulations: | `:congratulations:` | [top](#introduction) |
++| [top](#symbols) | :secret: | `:secret:` | :u55b6: | `:u55b6:` | [top](#introduction) |
++| [top](#symbols) | :u6e80: | `:u6e80:` | | | [top](#introduction) |
++
++### Geometric
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#symbols) | :red_circle: | `:red_circle:` | :orange_circle: | `:orange_circle:` | [top](#introduction) |
++| [top](#symbols) | :yellow_circle: | `:yellow_circle:` | :green_circle: | `:green_circle:` | [top](#introduction) |
++| [top](#symbols) | :large_blue_circle: | `:large_blue_circle:` | :purple_circle: | `:purple_circle:` | [top](#introduction) |
++| [top](#symbols) | :brown_circle: | `:brown_circle:` | :black_circle: | `:black_circle:` | [top](#introduction) |
++| [top](#symbols) | :white_circle: | `:white_circle:` | :red_square: | `:red_square:` | [top](#introduction) |
++| [top](#symbols) | :orange_square: | `:orange_square:` | :yellow_square: | `:yellow_square:` | [top](#introduction) |
++| [top](#symbols) | :green_square: | `:green_square:` | :blue_square: | `:blue_square:` | [top](#introduction) |
++| [top](#symbols) | :purple_square: | `:purple_square:` | :brown_square: | `:brown_square:` | [top](#introduction) |
++| [top](#symbols) | :black_large_square: | `:black_large_square:` | :white_large_square: | `:white_large_square:` | [top](#introduction) |
++| [top](#symbols) | :black_medium_square: | `:black_medium_square:` | :white_medium_square: | `:white_medium_square:` | [top](#introduction) |
++| [top](#symbols) | :black_medium_small_square: | `:black_medium_small_square:` | :white_medium_small_square: | `:white_medium_small_square:` | [top](#introduction) |
++| [top](#symbols) | :black_small_square: | `:black_small_square:` | :white_small_square: | `:white_small_square:` | [top](#introduction) |
++| [top](#symbols) | :large_orange_diamond: | `:large_orange_diamond:` | :large_blue_diamond: | `:large_blue_diamond:` | [top](#introduction) |
++| [top](#symbols) | :small_orange_diamond: | `:small_orange_diamond:` | :small_blue_diamond: | `:small_blue_diamond:` | [top](#introduction) |
++| [top](#symbols) | :small_red_triangle: | `:small_red_triangle:` | :small_red_triangle_down: | `:small_red_triangle_down:` | [top](#introduction) |
++| [top](#symbols) | :diamond_shape_with_a_dot_inside: | `:diamond_shape_with_a_dot_inside:` | :radio_button: | `:radio_button:` | [top](#introduction) |
++| [top](#symbols) | :white_square_button: | `:white_square_button:` | :black_square_button: | `:black_square_button:` | [top](#introduction) |
++
++## Flags
++
++- [Flag](#flag)
++- [Country Flag](#country-flag)
++- [Subdivision Flag](#subdivision-flag)
++
++### Flag
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#flags) | :checkered_flag: | `:checkered_flag:` | :triangular_flag_on_post: | `:triangular_flag_on_post:` | [top](#introduction) |
++| [top](#flags) | :crossed_flags: | `:crossed_flags:` | :black_flag: | `:black_flag:` | [top](#introduction) |
++| [top](#flags) | :white_flag: | `:white_flag:` | :rainbow_flag: | `:rainbow_flag:` | [top](#introduction) |
++| [top](#flags) | :transgender_flag: | `:transgender_flag:` | :pirate_flag: | `:pirate_flag:` | [top](#introduction) |
++
++### Country Flag
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#flags) | :ascension_island: | `:ascension_island:` | :andorra: | `:andorra:` | [top](#introduction) |
++| [top](#flags) | :united_arab_emirates: | `:united_arab_emirates:` | :afghanistan: | `:afghanistan:` | [top](#introduction) |
++| [top](#flags) | :antigua_barbuda: | `:antigua_barbuda:` | :anguilla: | `:anguilla:` | [top](#introduction) |
++| [top](#flags) | :albania: | `:albania:` | :armenia: | `:armenia:` | [top](#introduction) |
++| [top](#flags) | :angola: | `:angola:` | :antarctica: | `:antarctica:` | [top](#introduction) |
++| [top](#flags) | :argentina: | `:argentina:` | :american_samoa: | `:american_samoa:` | [top](#introduction) |
++| [top](#flags) | :austria: | `:austria:` | :australia: | `:australia:` | [top](#introduction) |
++| [top](#flags) | :aruba: | `:aruba:` | :aland_islands: | `:aland_islands:` | [top](#introduction) |
++| [top](#flags) | :azerbaijan: | `:azerbaijan:` | :bosnia_herzegovina: | `:bosnia_herzegovina:` | [top](#introduction) |
++| [top](#flags) | :barbados: | `:barbados:` | :bangladesh: | `:bangladesh:` | [top](#introduction) |
++| [top](#flags) | :belgium: | `:belgium:` | :burkina_faso: | `:burkina_faso:` | [top](#introduction) |
++| [top](#flags) | :bulgaria: | `:bulgaria:` | :bahrain: | `:bahrain:` | [top](#introduction) |
++| [top](#flags) | :burundi: | `:burundi:` | :benin: | `:benin:` | [top](#introduction) |
++| [top](#flags) | :st_barthelemy: | `:st_barthelemy:` | :bermuda: | `:bermuda:` | [top](#introduction) |
++| [top](#flags) | :brunei: | `:brunei:` | :bolivia: | `:bolivia:` | [top](#introduction) |
++| [top](#flags) | :caribbean_netherlands: | `:caribbean_netherlands:` | :brazil: | `:brazil:` | [top](#introduction) |
++| [top](#flags) | :bahamas: | `:bahamas:` | :bhutan: | `:bhutan:` | [top](#introduction) |
++| [top](#flags) | :bouvet_island: | `:bouvet_island:` | :botswana: | `:botswana:` | [top](#introduction) |
++| [top](#flags) | :belarus: | `:belarus:` | :belize: | `:belize:` | [top](#introduction) |
++| [top](#flags) | :canada: | `:canada:` | :cocos_islands: | `:cocos_islands:` | [top](#introduction) |
++| [top](#flags) | :congo_kinshasa: | `:congo_kinshasa:` | :central_african_republic: | `:central_african_republic:` | [top](#introduction) |
++| [top](#flags) | :congo_brazzaville: | `:congo_brazzaville:` | :switzerland: | `:switzerland:` | [top](#introduction) |
++| [top](#flags) | :cote_divoire: | `:cote_divoire:` | :cook_islands: | `:cook_islands:` | [top](#introduction) |
++| [top](#flags) | :chile: | `:chile:` | :cameroon: | `:cameroon:` | [top](#introduction) |
++| [top](#flags) | :cn: | `:cn:` | :colombia: | `:colombia:` | [top](#introduction) |
++| [top](#flags) | :clipperton_island: | `:clipperton_island:` | :costa_rica: | `:costa_rica:` | [top](#introduction) |
++| [top](#flags) | :cuba: | `:cuba:` | :cape_verde: | `:cape_verde:` | [top](#introduction) |
++| [top](#flags) | :curacao: | `:curacao:` | :christmas_island: | `:christmas_island:` | [top](#introduction) |
++| [top](#flags) | :cyprus: | `:cyprus:` | :czech_republic: | `:czech_republic:` | [top](#introduction) |
++| [top](#flags) | :de: | `:de:` | :diego_garcia: | `:diego_garcia:` | [top](#introduction) |
++| [top](#flags) | :djibouti: | `:djibouti:` | :denmark: | `:denmark:` | [top](#introduction) |
++| [top](#flags) | :dominica: | `:dominica:` | :dominican_republic: | `:dominican_republic:` | [top](#introduction) |
++| [top](#flags) | :algeria: | `:algeria:` | :ceuta_melilla: | `:ceuta_melilla:` | [top](#introduction) |
++| [top](#flags) | :ecuador: | `:ecuador:` | :estonia: | `:estonia:` | [top](#introduction) |
++| [top](#flags) | :egypt: | `:egypt:` | :western_sahara: | `:western_sahara:` | [top](#introduction) |
++| [top](#flags) | :eritrea: | `:eritrea:` | :es: | `:es:` | [top](#introduction) |
++| [top](#flags) | :ethiopia: | `:ethiopia:` | :eu: | `:eu:` `:european_union:` | [top](#introduction) |
++| [top](#flags) | :finland: | `:finland:` | :fiji: | `:fiji:` | [top](#introduction) |
++| [top](#flags) | :falkland_islands: | `:falkland_islands:` | :micronesia: | `:micronesia:` | [top](#introduction) |
++| [top](#flags) | :faroe_islands: | `:faroe_islands:` | :fr: | `:fr:` | [top](#introduction) |
++| [top](#flags) | :gabon: | `:gabon:` | :gb: | `:gb:` `:uk:` | [top](#introduction) |
++| [top](#flags) | :grenada: | `:grenada:` | :georgia: | `:georgia:` | [top](#introduction) |
++| [top](#flags) | :french_guiana: | `:french_guiana:` | :guernsey: | `:guernsey:` | [top](#introduction) |
++| [top](#flags) | :ghana: | `:ghana:` | :gibraltar: | `:gibraltar:` | [top](#introduction) |
++| [top](#flags) | :greenland: | `:greenland:` | :gambia: | `:gambia:` | [top](#introduction) |
++| [top](#flags) | :guinea: | `:guinea:` | :guadeloupe: | `:guadeloupe:` | [top](#introduction) |
++| [top](#flags) | :equatorial_guinea: | `:equatorial_guinea:` | :greece: | `:greece:` | [top](#introduction) |
++| [top](#flags) | :south_georgia_south_sandwich_islands: | `:south_georgia_south_sandwich_islands:` | :guatemala: | `:guatemala:` | [top](#introduction) |
++| [top](#flags) | :guam: | `:guam:` | :guinea_bissau: | `:guinea_bissau:` | [top](#introduction) |
++| [top](#flags) | :guyana: | `:guyana:` | :hong_kong: | `:hong_kong:` | [top](#introduction) |
++| [top](#flags) | :heard_mcdonald_islands: | `:heard_mcdonald_islands:` | :honduras: | `:honduras:` | [top](#introduction) |
++| [top](#flags) | :croatia: | `:croatia:` | :haiti: | `:haiti:` | [top](#introduction) |
++| [top](#flags) | :hungary: | `:hungary:` | :canary_islands: | `:canary_islands:` | [top](#introduction) |
++| [top](#flags) | :indonesia: | `:indonesia:` | :ireland: | `:ireland:` | [top](#introduction) |
++| [top](#flags) | :israel: | `:israel:` | :isle_of_man: | `:isle_of_man:` | [top](#introduction) |
++| [top](#flags) | :india: | `:india:` | :british_indian_ocean_territory: | `:british_indian_ocean_territory:` | [top](#introduction) |
++| [top](#flags) | :iraq: | `:iraq:` | :iran: | `:iran:` | [top](#introduction) |
++| [top](#flags) | :iceland: | `:iceland:` | :it: | `:it:` | [top](#introduction) |
++| [top](#flags) | :jersey: | `:jersey:` | :jamaica: | `:jamaica:` | [top](#introduction) |
++| [top](#flags) | :jordan: | `:jordan:` | :jp: | `:jp:` | [top](#introduction) |
++| [top](#flags) | :kenya: | `:kenya:` | :kyrgyzstan: | `:kyrgyzstan:` | [top](#introduction) |
++| [top](#flags) | :cambodia: | `:cambodia:` | :kiribati: | `:kiribati:` | [top](#introduction) |
++| [top](#flags) | :comoros: | `:comoros:` | :st_kitts_nevis: | `:st_kitts_nevis:` | [top](#introduction) |
++| [top](#flags) | :north_korea: | `:north_korea:` | :kr: | `:kr:` | [top](#introduction) |
++| [top](#flags) | :kuwait: | `:kuwait:` | :cayman_islands: | `:cayman_islands:` | [top](#introduction) |
++| [top](#flags) | :kazakhstan: | `:kazakhstan:` | :laos: | `:laos:` | [top](#introduction) |
++| [top](#flags) | :lebanon: | `:lebanon:` | :st_lucia: | `:st_lucia:` | [top](#introduction) |
++| [top](#flags) | :liechtenstein: | `:liechtenstein:` | :sri_lanka: | `:sri_lanka:` | [top](#introduction) |
++| [top](#flags) | :liberia: | `:liberia:` | :lesotho: | `:lesotho:` | [top](#introduction) |
++| [top](#flags) | :lithuania: | `:lithuania:` | :luxembourg: | `:luxembourg:` | [top](#introduction) |
++| [top](#flags) | :latvia: | `:latvia:` | :libya: | `:libya:` | [top](#introduction) |
++| [top](#flags) | :morocco: | `:morocco:` | :monaco: | `:monaco:` | [top](#introduction) |
++| [top](#flags) | :moldova: | `:moldova:` | :montenegro: | `:montenegro:` | [top](#introduction) |
++| [top](#flags) | :st_martin: | `:st_martin:` | :madagascar: | `:madagascar:` | [top](#introduction) |
++| [top](#flags) | :marshall_islands: | `:marshall_islands:` | :macedonia: | `:macedonia:` | [top](#introduction) |
++| [top](#flags) | :mali: | `:mali:` | :myanmar: | `:myanmar:` | [top](#introduction) |
++| [top](#flags) | :mongolia: | `:mongolia:` | :macau: | `:macau:` | [top](#introduction) |
++| [top](#flags) | :northern_mariana_islands: | `:northern_mariana_islands:` | :martinique: | `:martinique:` | [top](#introduction) |
++| [top](#flags) | :mauritania: | `:mauritania:` | :montserrat: | `:montserrat:` | [top](#introduction) |
++| [top](#flags) | :malta: | `:malta:` | :mauritius: | `:mauritius:` | [top](#introduction) |
++| [top](#flags) | :maldives: | `:maldives:` | :malawi: | `:malawi:` | [top](#introduction) |
++| [top](#flags) | :mexico: | `:mexico:` | :malaysia: | `:malaysia:` | [top](#introduction) |
++| [top](#flags) | :mozambique: | `:mozambique:` | :namibia: | `:namibia:` | [top](#introduction) |
++| [top](#flags) | :new_caledonia: | `:new_caledonia:` | :niger: | `:niger:` | [top](#introduction) |
++| [top](#flags) | :norfolk_island: | `:norfolk_island:` | :nigeria: | `:nigeria:` | [top](#introduction) |
++| [top](#flags) | :nicaragua: | `:nicaragua:` | :netherlands: | `:netherlands:` | [top](#introduction) |
++| [top](#flags) | :norway: | `:norway:` | :nepal: | `:nepal:` | [top](#introduction) |
++| [top](#flags) | :nauru: | `:nauru:` | :niue: | `:niue:` | [top](#introduction) |
++| [top](#flags) | :new_zealand: | `:new_zealand:` | :oman: | `:oman:` | [top](#introduction) |
++| [top](#flags) | :panama: | `:panama:` | :peru: | `:peru:` | [top](#introduction) |
++| [top](#flags) | :french_polynesia: | `:french_polynesia:` | :papua_new_guinea: | `:papua_new_guinea:` | [top](#introduction) |
++| [top](#flags) | :philippines: | `:philippines:` | :pakistan: | `:pakistan:` | [top](#introduction) |
++| [top](#flags) | :poland: | `:poland:` | :st_pierre_miquelon: | `:st_pierre_miquelon:` | [top](#introduction) |
++| [top](#flags) | :pitcairn_islands: | `:pitcairn_islands:` | :puerto_rico: | `:puerto_rico:` | [top](#introduction) |
++| [top](#flags) | :palestinian_territories: | `:palestinian_territories:` | :portugal: | `:portugal:` | [top](#introduction) |
++| [top](#flags) | :palau: | `:palau:` | :paraguay: | `:paraguay:` | [top](#introduction) |
++| [top](#flags) | :qatar: | `:qatar:` | :reunion: | `:reunion:` | [top](#introduction) |
++| [top](#flags) | :romania: | `:romania:` | :serbia: | `:serbia:` | [top](#introduction) |
++| [top](#flags) | :ru: | `:ru:` | :rwanda: | `:rwanda:` | [top](#introduction) |
++| [top](#flags) | :saudi_arabia: | `:saudi_arabia:` | :solomon_islands: | `:solomon_islands:` | [top](#introduction) |
++| [top](#flags) | :seychelles: | `:seychelles:` | :sudan: | `:sudan:` | [top](#introduction) |
++| [top](#flags) | :sweden: | `:sweden:` | :singapore: | `:singapore:` | [top](#introduction) |
++| [top](#flags) | :st_helena: | `:st_helena:` | :slovenia: | `:slovenia:` | [top](#introduction) |
++| [top](#flags) | :svalbard_jan_mayen: | `:svalbard_jan_mayen:` | :slovakia: | `:slovakia:` | [top](#introduction) |
++| [top](#flags) | :sierra_leone: | `:sierra_leone:` | :san_marino: | `:san_marino:` | [top](#introduction) |
++| [top](#flags) | :senegal: | `:senegal:` | :somalia: | `:somalia:` | [top](#introduction) |
++| [top](#flags) | :suriname: | `:suriname:` | :south_sudan: | `:south_sudan:` | [top](#introduction) |
++| [top](#flags) | :sao_tome_principe: | `:sao_tome_principe:` | :el_salvador: | `:el_salvador:` | [top](#introduction) |
++| [top](#flags) | :sint_maarten: | `:sint_maarten:` | :syria: | `:syria:` | [top](#introduction) |
++| [top](#flags) | :swaziland: | `:swaziland:` | :tristan_da_cunha: | `:tristan_da_cunha:` | [top](#introduction) |
++| [top](#flags) | :turks_caicos_islands: | `:turks_caicos_islands:` | :chad: | `:chad:` | [top](#introduction) |
++| [top](#flags) | :french_southern_territories: | `:french_southern_territories:` | :togo: | `:togo:` | [top](#introduction) |
++| [top](#flags) | :thailand: | `:thailand:` | :tajikistan: | `:tajikistan:` | [top](#introduction) |
++| [top](#flags) | :tokelau: | `:tokelau:` | :timor_leste: | `:timor_leste:` | [top](#introduction) |
++| [top](#flags) | :turkmenistan: | `:turkmenistan:` | :tunisia: | `:tunisia:` | [top](#introduction) |
++| [top](#flags) | :tonga: | `:tonga:` | :tr: | `:tr:` | [top](#introduction) |
++| [top](#flags) | :trinidad_tobago: | `:trinidad_tobago:` | :tuvalu: | `:tuvalu:` | [top](#introduction) |
++| [top](#flags) | :taiwan: | `:taiwan:` | :tanzania: | `:tanzania:` | [top](#introduction) |
++| [top](#flags) | :ukraine: | `:ukraine:` | :uganda: | `:uganda:` | [top](#introduction) |
++| [top](#flags) | :us_outlying_islands: | `:us_outlying_islands:` | :united_nations: | `:united_nations:` | [top](#introduction) |
++| [top](#flags) | :us: | `:us:` | :uruguay: | `:uruguay:` | [top](#introduction) |
++| [top](#flags) | :uzbekistan: | `:uzbekistan:` | :vatican_city: | `:vatican_city:` | [top](#introduction) |
++| [top](#flags) | :st_vincent_grenadines: | `:st_vincent_grenadines:` | :venezuela: | `:venezuela:` | [top](#introduction) |
++| [top](#flags) | :british_virgin_islands: | `:british_virgin_islands:` | :us_virgin_islands: | `:us_virgin_islands:` | [top](#introduction) |
++| [top](#flags) | :vietnam: | `:vietnam:` | :vanuatu: | `:vanuatu:` | [top](#introduction) |
++| [top](#flags) | :wallis_futuna: | `:wallis_futuna:` | :samoa: | `:samoa:` | [top](#introduction) |
++| [top](#flags) | :kosovo: | `:kosovo:` | :yemen: | `:yemen:` | [top](#introduction) |
++| [top](#flags) | :mayotte: | `:mayotte:` | :south_africa: | `:south_africa:` | [top](#introduction) |
++| [top](#flags) | :zambia: | `:zambia:` | :zimbabwe: | `:zimbabwe:` | [top](#introduction) |
++
++### Subdivision Flag
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#flags) | :england: | `:england:` | :scotland: | `:scotland:` | [top](#introduction) |
++| [top](#flags) | :wales: | `:wales:` | | | [top](#introduction) |
++
++## GitHub Custom Emoji
++
++| | ico | shortcode | ico | shortcode | |
++| - | :-: | - | :-: | - | - |
++| [top](#github-custom-emoji) | :accessibility: | `:accessibility:` | :atom: | `:atom:` | [top](#introduction) |
++| [top](#github-custom-emoji) | :basecamp: | `:basecamp:` | :basecampy: | `:basecampy:` | [top](#introduction) |
++| [top](#github-custom-emoji) | :bowtie: | `:bowtie:` | :dependabot: | `:dependabot:` | [top](#introduction) |
++| [top](#github-custom-emoji) | :electron: | `:electron:` | :feelsgood: | `:feelsgood:` | [top](#introduction) |
++| [top](#github-custom-emoji) | :finnadie: | `:finnadie:` | :fishsticks: | `:fishsticks:` | [top](#introduction) |
++| [top](#github-custom-emoji) | :goberserk: | `:goberserk:` | :godmode: | `:godmode:` | [top](#introduction) |
++| [top](#github-custom-emoji) | :hurtrealbad: | `:hurtrealbad:` | :neckbeard: | `:neckbeard:` | [top](#introduction) |
++| [top](#github-custom-emoji) | :octocat: | `:octocat:` | :rage1: | `:rage1:` | [top](#introduction) |
++| [top](#github-custom-emoji) | :rage2: | `:rage2:` | :rage3: | `:rage3:` | [top](#introduction) |
++| [top](#github-custom-emoji) | :rage4: | `:rage4:` | :shipit: | `:shipit:` | [top](#introduction) |
++| [top](#github-custom-emoji) | :suspect: | `:suspect:` | :trollface: | `:trollface:` | [top](#introduction) |
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..42eafedd3273ec1922d3090fd8a0e5020b5d148e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++---
++title: Functions
++description: A quick reference guide to Hugo's functions, grouped by namespace. Aliases, if any, appear in parentheses to the right of the function name.
++categories: [quick reference]
++keywords: []
++menu:
++  docs:
++    parent: quick-reference
++    weight: 30
++weight: 30
++toc: true
++---
++
++{{% quick-reference section="functions" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..abd1db70921b529c684a78e2133fdcd69908e01b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,14 @@@
++---
++title: Methods
++description: A quick reference guide to Hugo's methods, grouped by object.
++categories: [quick reference]
++keywords: []
++menu:
++  docs:
++    parent: quick-reference
++    weight: 40
++weight: 40
++toc: true
++---
++
++{{% quick-reference section="methods" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..795eb494dc1992656c9ad2e2864b0b63897633a6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,46 @@@
++---
++title: Page collections
++description: A quick reference guide to Hugo's page collections.
++categories: [quick reference]
++keywords: []
++menu:
++  docs:
++    parent: quick-reference
++    weight: 50
++weight: 50
++toc: true
++---
++
++## Page
++
++Use these `Page` methods when rendering lists on [section] pages, [taxonomy] pages, [term] pages, and the home page.
++
++[section]: /getting-started/glossary/#section
++[taxonomy]: /getting-started/glossary/#taxonomy
++[term]: /getting-started/glossary/#term
++
++{{< list-pages-in-section path=/methods/page filter=methods_page_page_collections filterType=include omitElementIDs=true titlePrefix=PAGE. >}}
++
++## Site
++
++Use these `Site` methods when rendering lists on any page.
++
++{{< list-pages-in-section path=/methods/site filter=methods_site_page_collections filterType=include omitElementIDs=true titlePrefix=SITE. >}}
++
++## Filter
++
++Use the [`where`] function to filter page collections.
++
++[`where`]: /functions/collections/where
++
++## Sort
++
++Use these methods to sort page collections.
++
++{{< list-pages-in-section path=/methods/pages filter=methods_pages_sort filterType=include titlePrefix=. omitElementIDs=true titlePrefix=PAGES. >}}
++
++## Group
++
++Use these methods to group page collections.
++
++{{< list-pages-in-section path=/methods/pages filter=methods_pages_group filterType=include titlePrefix=. omitElementIDs=true titlePrefix=PAGES. >}}
index 9187908d987bf2b1d85e38be252b40ea49c4b821,0000000000000000000000000000000000000000..3e15adc9f7c244c2d7076c20a22224e2a9fc7724
mode 100644,000000..100644
--- /dev/null
@@@ -1,5 -1,0 +1,4 @@@
 +
 +**1Password** is a password manager that keeps you safe online. It protects your secure information behind the one password only you know.
 +
 +The [1Password Support](https://support.1password.com/) website was built from scratch with **Hugo** and enhanced with **React** and **Elasticsearch** to give us the best of both worlds: The simplicity and performance of a static site, with the richness of a hosted web app.
index 2bcbff3fd17a6a00ff51e0d3a8837d58f35a6874,0000000000000000000000000000000000000000..ed44053c8170649fb05c8102498968c5072fc3b7
mode 100644,000000..100644
--- /dev/null
@@@ -1,39 -1,0 +1,39 @@@
-  * We use Hugo's [multilingual support](/content-management/multilingual/) to build the site in English, Spanish, French, Italian, German, and Russian. With the help of Hugo, 1Password Support became our very first site in multiple languages.
 +---
 +
 +title: 1Password Support
 +date: 2018-02-22
 +description: "Showcase: \"Compiles 400 pages in five languages in the blink of an eye.\""
 +siteURL: https://support.1password.com/
 +byline: "[Mitch Cohen](https://github.com/mitchchn), Documentation Team Lead"
 +aliases: [/showcase/1password/]
 +
 +---
 +
 +At 1Password, we used to go through a different documentation platform every month: blog engines, ebooks, wikis, site generators written in Ruby and JavaScript. Each was inadequate in its own special way. Then we found **Hugo**. We made one last switch, and we're glad we did.
 +
 +### Not all static site generators are created equal
 +
 +Finding a tool that will make your customers, writers, designers, _and_ DevOps team happy is no easy task, but we managed it with Hugo:
 +
 +**Hugo is static**. We're a security company, so we swear by static sites and use them wherever possible. We feel much safer pointing customers at HTML files than at a complicated server which needs to be hardened.
 +
 +**Hugo is Go**. We love the Go programming language at 1Password, and we were delighted to learn that Hugo used the same Go template syntax that our designers and front-end developers had already mastered.
 +
 +**Hugo is FAST**. Our previous static site generator took nearly a minute to compile our (then much smaller) site. Developers might be used to this, but it wasn't cutting it for writers who wanted to see live previews of their work. Hugo did the same job in milliseconds, and to this day compiles 400 pages in five languages in the blink of an eye.
 +
 +**Hugo is flexible**. Thanks to Hugo's content and layout system, we were able to preserve our existing file and folder structure and port our entire production site in a few days. We could then create new content types that weren't possible before, like these snazzy [showcases](https://support.1password.com/explore/extension/).
 +
 +**Hugo is great for writers**. Our documentation team was already comfortable with Markdown and Git and could start creating content for Hugo with zero downtime. Once we added shortcodes, our writers were able to dress up articles with features like  [platform boxes](https://support.1password.com/get-the-apps/) with just a bit of new syntax.
 +
 +**Hugo has an amazing developer community**. Hugo updates are frequent and filled to the brim with features and fixes. As we developed the multilingual version of our site, we submitted PRs for features we needed and were helped through the process by [@bep](https://github.com/bep) and others.
 +
 +**Hugo is simple to deploy**. Hugo has just the right amount of configuration options to fit into our build system without being too complicated.
 +
 +### Tech specs
 +
 +* [1Password Support](https://support.1password.com) uses Hugo with a custom theme. It shares styles and some template code with [1Password.com](https://1password.com), which we also moved to Hugo in 2016.
 +* Code and articles live in a private GitHub repository, which is deployed to a static content server using Git hooks.
 +* Writers build and preview the site on their computers and contribute content using pull requests.
++* We use Hugo's [multilingual support](/content-management/multilingual/) to build the site in English, Spanish, French, Italian, German, and Russian. With the help of Hugo, 1Password Support became our very first site in multiple languages.
 +* Our [contact form](https://support.1password.com/contact) is a single-page React app. We were able to integrate it with Hugo seamlessly thanks to its support for static files.
 +* The one part of the support site which is not static is our search engine, which we developed with Elasticsearch and host on AWS.
index d304cf191abb256b7f86feb8a35d944a581f28cf,0000000000000000000000000000000000000000..f14a90b753fee49009d38d6935c9abe79b474a65
mode 100644,000000..100644
--- /dev/null
@@@ -1,3 -1,0 +1,3 @@@
- **Alora Labs** is a product development consultancy headquartered in Toronto, Canada. 
++**Alora Labs** is a product development consultancy headquartered in Toronto, Canada.
 +
 +We help companies build software and IoT products and were recently recognized as one of the [**top IoT development firms**](https://aloralabs.com/insights/alora-labs-receives-clutch-2021-top-iot-agency-award) in Toronto.
index 5e6e1813137028b444b72a548763d1dbedfe6499,0000000000000000000000000000000000000000..559169319f34885ab96f787bf2b3f5138470d78b
mode 100644,000000..100644
--- /dev/null
@@@ -1,18 -1,0 +1,18 @@@
- The previous iteration of our site was built with Jekyll, which served us well at first. However as time went on, we became frustrated with the number of dependencies we had to rely on, that would often break at the most inconvenient times. 
 +---
 +title: Alora Labs
 +date: 2021-05-27
 +description: "Showcase: \"Making performant websites accessible for everyone.\""
 +siteURL: https://aloralabs.com/
 +siteSource: https://github.com/aloralabs/homepage
 +aliases: [/showcase/aloralabs/]
 +---
 +
 +At Alora Labs we always have an eye open for new tools and technology that we can utilize to the benefit of our customers or internal projects like our website.
 +
- Hugo has become a favorite tool in the toolbelt and the foundation for many client projects. We couldn't be happier with the switch and we are optimistic about recommending Hugo for many years to come. 
++The previous iteration of our site was built with Jekyll, which served us well at first. However as time went on, we became frustrated with the number of dependencies we had to rely on, that would often break at the most inconvenient times.
 +
 +Hugo was a breath of fresh air in this regard, a single binary that works equally well on Windows as it did on macOS or Linux. We no longer need additional tools for image optimization, Sass compilation or JavaScript bundling. Everything just works, and with a substantial performance boost too.
 +
- Thank you to the vibrant community and talented development team for all the hard work in making Hugo a success. As excellent as Hugo is now, we cannot wait to see what the release notes have in store for us next.
++Hugo has become a favorite tool in the tool belt and the foundation for many client projects. We couldn't be happier with the switch and we are optimistic about recommending Hugo for many years to come.
 +
++Thank you to the vibrant community and talented development team for all the hard work in making Hugo a success. As excellent as Hugo is now, we cannot wait to see what the release notes have in store for us next.
index 3d21192b8147f13b6a91ae2582943610f6486ba2,0000000000000000000000000000000000000000..2daafbbe11c28dbeb49380c129ca35d72f55ece4
mode 100644,000000..100644
--- /dev/null
@@@ -1,77 -1,0 +1,77 @@@
- ## Hugo to the rescue!
 +---
 +title: Ampio Knowledge Base
 +date: 2022-10-30
 +
 +description: "Knowledge base for the Ampio building automation system."
 +siteURL: https://help.ampio.com/
 +---
 +
 +As a company that specializes in highly customizable smart solutions for various industries, Ampio has accumulated a vast amount of knowledge throughout the years. We were on the lookout for a user-friendly platform to impart this knowledge to our clients and installers. Delivering a service that caters to both audiences, scattered around the globe with vastly divergent needs and expectations, was a challenge.
 +
 +On the one hand, we needed something that would let us educate a client with no technical knowledge about our system in a visually appealing way.
 +
 +On the other hand, our installers required technical drawings, offline manuals, and a deep dive into highly specialized subjects.
 +
 +Over and above that, we could not overlook the fact that our internal team of editors and maintainers of the Knowledge Base included non-programmers who had to be able to create content and navigate the architecture of the site just as well as those adept at coding.
 +
 +We started our journey with the following requirements:
 +
 + - Ease of contribution
 + - Efficient search capabilities
 + - The possibility of deployment to simple shared hosting
 + - Proper support for multilingualism
 +
 +## Dark ages of WordPress
 +
 +With the above-mentioned in mind, we built our first revision of the service in WordPress with a commercial knowledge base plugin. The initial requirements seemed not to be exorbitant, and yet we were surprised to see that only a few of the available solutions covered them. Especially, the case of multilingualism appeared to be particularly neglected across the available products.
 +
 +The WordPress-based products made big promises: pay some bucks, bootstrap the service in minutes, and forget about all the development troubles. And although those promises could possibly be deliverable on WordPress' end, it was definitely not true for anything more than the most generic deployments. In our case, we were dealing with more and more trade-offs. Plus, the solution was just slow on the simple shared hosting environment that we dedicated to the job.
 +
 +## Turning point
 +
 +The turning point was the introduction of a new key requirement---each document was to be downloadable in the PDF format. Such functionality was not available in the plugins we owned, nor did it look like any of the other existing WordPress plugins could fulfill our needs to a satisfactory degree. Nobody in our team was brave enough to add such a functionality to the current stack, so we decided to start from scratch.
 +
 +On top of that new development, we had to remember another one of our key requirements, namely, that mostly non-programmers were to be responsible for the service maintenance and content creation. Initially, we were leaning towards headless CMS-based solutions, but finally we made a bold move and decided to create a Git-managed Jamstack service and see what happens.
 +
- ```
++## Hugo to the rescue
 +
 +Hugo was our first choice of SSG. The multilingualism support was the primary feature that convinced us. Later on, going through the documentation, we continued to discover new exciting features that we didn't even know we needed when we started.
 +
 +The rich functionalities of WordPress WYSIWYG editors soon turned out to be a curse. It became burdensome to maintain formatting consistency across documents prepared by multiple contributors. When we considered Markdown, we knew that it would give us a lot less flexibility. In our case, it proved to be a blessing in disguise---the constraints imposed by the notation ensured that each document was prepared in the same way. And in the cases where Markdown was not enough, Hugo shortcodes gave us all that we needed to get the results we anticipated.
 +
 +In terms of PDF generation, we utilized [custom output formats](/templates/output-formats/) to produce intermediary document representations, which are consumed by our custom tool transforming them to TeX documents, which are finally used to produce PDF files.
 +
 +Custom output formats were also used to create search indexes. The search functionality is built on the brilliant [TNTSearch](https://github.com/teamtnt/tntsearch) library. The search queries and results are handled by PHP snippets embedded into static documents handled by Hugo.
 +
 +We even implemented a simple REST API generated by Hugo! We have yet to find something that cannot be achieved with this stack, while in WordPress-based solutions we were struggling with things as simple as defining custom document ordering in one of the categories list views.
 +
 +When talking about Hugo, we cannot forget about the speed. At the beginning we were not considering it a killer feature, but as our document base grew bigger, we appreciated it more and more. Dry-runs are not so common---most of the time we are working on one of the documents with cache already built during one of the previous Hugo runs. In such a scenario, Hugo rebuilds the site in about a second and we consider it a very good result.
 +
++```text
 +                   | EN  | PL
 +-------------------+-----+------
 +  Pages            | 483 | 486
 +  Paginator pages  |  56 |  55
 +  Non-page files   | 745 | 749
 +  Static files     | 917 | 917
 +  Processed images | 487 | 490
 +  Aliases          |  80 |  79
 +  Sitemaps         |   2 |   1
 +  Cleaned          |   0 |   0
 +
 +Total in 1096 ms
 +```
 +
 +## Adaptation among the contributors
 +
 +Very quickly it became apparent that our initial concerns about the adaptation of the workflow among contributors were grossly exaggerated. Markdown is fairly straightforward and did not cause any trouble for the contributors.
 +
 +We recommended that our colleagues use Visual Studio Code as a tool for content creation. The project’s repository tracks project-scoped configuration of the editor, which includes a set of _tasks_ allowing to run a live server from the GUI level. This is very useful for those who are easily frightened when faced with the mighty terminal.
 +
 +The basic skills of the Git workflow were also easily acquired. At the end of the day, builds and deployments are fully managed by CI/CD processes, so the administration of the service drills down to reviewing and accepting merge requests in the Git frontend. As a side effect, we receive a full and clear history of contributions, which is well appreciated by our quality assurance auditors.
 +
 +We could even say that our experiment spread the love for Git among non-programmers in our organization!
 +
 +## Summary
 +
 +Hugo is the best! Definitely give it a try if you are ever faced with a challenge similar to ours. And do not give it a second thought if your service contributors are not too technically inclined---it might still turn out great!
index 6563e13ca6a77948ae9a706d02d670413d0240eb,0000000000000000000000000000000000000000..0a847df1ec5d944403e0d604ce9eb8edeb6d2caa
mode 100644,000000..100644
--- /dev/null
@@@ -1,6 -1,0 +1,6 @@@
- * [Fredrik Jonsson](https://xdeb.net/) (dev)
 +Bypass Censorship find and promote tools that provide Internet access to everyone.
 +
 +The site is built by:
 +
 +* [Leyla Avsar](https://www.leylaavsar.com/) (designer)
++* [Fredrik Jonsson](https://xdeb.net/) (dev)
index a266797ea04fba1b17bdd4af1d53831533618985,0000000000000000000000000000000000000000..8cbda9aa65d20ce83864fdfc7ad48c6484b2c865
mode 100644,000000..100644
--- /dev/null
@@@ -1,24 -1,0 +1,24 @@@
- The editors can maintain content via [Forestry.io CMS](https://forestry.io/) or directly via Git. Forestry does unfortunately not have multilingual support. All the language versions are in one pile making it harder to find the right file to edit, but it works.
 +---
 +title: Bypass Censorship
 +date: 2019-06-16
 +description: "Showcase: Bypass Censorship find and promote tools that provide Internet access to everyone."
 +siteURL: https://www.bypasscensorship.org/
 +byline: "[Fredrik Jonsson](https://xdeb.net/), Web developer & Linux sysadmin"
 +
 +---
 +
 +The British Broadcasting Corporation (BBC) (UK), Deutsche Welle (DW) (Germany), France Médias Monde (FMM) (France), the U.S. Agency for Global Media (USAGM) (US) and the Open Technology Fund (OTF) (US) co-sponsor the Bypass Censorship website.
 +
 +Websites of international news agencies are often blocked in many countries. In order to connect people to these sites, Bypass Censorship feature and recommend tools in the following languages: English, French, Spanish, Arabic, Farsi, Chinese, and Russian.
 +
 +One of the tools is the Bypass Censorship Extension for Firefox and Chrome. The extension help direct people to mirrors of partners sites if they are being censored.
 +
 +The first version of the site was built in Drupal 8 but it was relaunched as a static site built with Hugo in 2019.
 +
 +Security, page load time and easy of hosting is the main reasons for switching to a static site. As the lead developer I had good experience with Hugo and was interested in exploring the multilingual features.
 +
 +It's a simply site, basically one page in seven languages. I had no problems getting Hugo to output what I wanted. Found the multilingual support straight forward and easy to work with.
 +
 +Thanks to the design by [Leyla Avsar](https://www.leylaavsar.com/) the site also looks good. I used the [Hugo Zen theme](https://github.com/frjo/hugo-theme-zen) with a few custom templates and the needed CSS.
 +
++The editors can maintain content via [Forestry.io CMS](https://forestry.io/) or directly via Git. Forestry does unfortunately not have multilingual support. All the language versions are in one pile making it harder to find the right file to edit, but it works.
index c0a927edb83161142535c0de8ba2ca5530e79bec,0000000000000000000000000000000000000000..4376bbf03ce7ceb916d5027a4f1f2182fd26d807
mode 100644,000000..100644
--- /dev/null
@@@ -1,66 -1,0 +1,64 @@@
- -   **Start with real user needs**  — We used human-centered design methods to inform our product decisions (like qualitative user research), and gathered feedback from real users. We also continually test our assumptions with small experiments.
- -   **Earn trust**  —We recognize that trust has to be earned every time. We are including all  [required links and content](https://digital.gov/resources/required-web-content-and-links/)  on our site, clearly identifying as a government site, building with modern best practices, and using HTTPS.
- -   **Embrace accessibility**  —  [Accessibility](https://digital.gov/resources/intro-accessibility/)  affects everybody, and we built it into every decision. We’re continually working to conform to Section 508 requirements, use user experience best practices, and support a wide range of devices.
- -   **Promote continuity**  — We started from shared solutions like USWDS and  [Federalist](https://federalist.18f.gov/). We designed our site to clearly identify as a government site by including USWDS’s .gov banner, common colors and patterns, and built with modern best practices.
- -   **Listen**  — We actively collect user feedback and web metrics. We use the  [Digital Analytics Program](https://digital.gov/services/dap/)  (DAP) and analyze the data to discover actionable insights. We make small, incremental changes to continuously improve our website by listening to readers and learning from what we hear.
 +---
 +title: Digital.gov
 +date: 2020-05-01
 +description: "Showcase: \"Guidance on building better digital services in government.\""
 +siteURL: https://digital.gov/
 +siteSource: https://github.com/gsa/digitalgov.gov
 +---
 +
 +For over a decade, Digital.gov has provided guidance, training, and community support to the people who are responsible for delivering digital services in the U.S. government. Essentially, it is a place where people can find examples of problems being solved in government, and get links to the tools and resources they need.
 +
 +Through collaboration in our communities of practice, Digital.gov is a window into the people who work in technology in government and the challenges they face making digital services stronger and more effective. [Read more about our site »](https://digital.gov/2019/12/19/a-new-digitalgov/)
 +
 +Digital.gov is built using the [U.S. Web Design System](https://designsystem.digital.gov/) (USWDS) and have followed the [design principles](https://designsystem.digital.gov/maturity-model/) in building out our new site:
 +
- ```bash
++- **Start with real user needs**  — We used human-centered design methods to inform our product decisions (like qualitative user research), and gathered feedback from real users. We also continually test our assumptions with small experiments.
++- **Earn trust**  —We recognize that trust has to be earned every time. We are including all  [required links and content](https://digital.gov/resources/required-web-content-and-links/)  on our site, clearly identifying as a government site, building with modern best practices, and using HTTPS.
++- **Embrace accessibility**  —  [Accessibility](https://digital.gov/resources/intro-accessibility/)  affects everybody, and we built it into every decision. We’re continually working to conform to Section 508 requirements, use user experience best practices, and support a wide range of devices.
++- **Promote continuity**  — We started from shared solutions like USWDS and  [Federalist](https://federalist.18f.gov/). We designed our site to clearly identify as a government site by including USWDS’s .gov banner, common colors and patterns, and built with modern best practices.
++- **Listen**  — We actively collect user feedback and web metrics. We use the  [Digital Analytics Program](https://digital.gov/services/dap/)  (DAP) and analyze the data to discover actionable insights. We make small, incremental changes to continuously improve our website by listening to readers and learning from what we hear.
 +
 +_More on the [USWDS maturity model »](https://designsystem.digital.gov/maturity-model/)_
 +
 +## Open tools
 +
 +We didn’t start from scratch. We built and designed the Digital.gov using many of the open-source tools and services that we develop for government here in the  [Technology Transformation Services](https://www.gsa.gov/tts/) (TTS).
 +
 +Using services that make it possible to design, build, and iterate quickly are essential to modern web design and development, which is why [Federalist](https://federalist.18f.gov/) and the [U.S. Web Design System](https://designsystem.digital.gov/) are such a great combination.
 +
 +**Why Hugo?** Well, with around `~3,000` files _(and growing)_ and `~9,000` built pages, we needed a site generator that could handle that volume with lightning fast speed.
 +
 +Hugo was the clear option. The [Federalist](https://federalist.18f.gov/) team quickly added it to their available site generators, and we were off.
 +
 +At the moment, it takes around `32 seconds` to build close to `~10,000` pages!
 +
 +Take a look:
 +
++```text
 +
 +                   |  EN
 +-------------------+-------
 +  Pages            | 7973
 +  Paginator pages  |  600
 +  Non-page files   |  108
 +  Static files     |  851
 +  Processed images |    0
 +  Aliases          | 1381
 +  Sitemaps         |    1
 +  Cleaned          |    0
 +
 +Built in 32.427 seconds
- -   [Federalist](https://federalist.18f.gov/)
- -   [Search.gov](https://www.search.gov/)  — A free, hosted search platform for federal websites.
- -   [Cloud.gov](https://www.cloud.gov/)  — helps teams build, run, and authorize cloud-ready or legacy government systems quickly and cheaply.
- -   [Federal CrowdSource Mobile Testing Program](https://digital.gov/services/mobile-application-testing-program/)  — Free mobile compatibility testing by feds, for feds.
- -   [Digital Analytics Program](https://digital.gov/services/dap/)  (DAP) — A free analytics tool for measuring digital services in the federal government
- -   [Section508.gov](https://www.section508.gov/)  and  [PlainLanguage.gov](https://www.plainlanguage.gov/)  resources
- -   [API.data.gov](https://api.data.gov/)  — a free API management service for federal agencies
- -   [U.S. Digital Registry](https://digital.gov/services/u-s-digital-registry/)  — A resource for confirming the official status of government social media accounts, mobile apps, and mobile websites.
 +```
 +
 +In addition to Hugo, we are proudly using a number of other tools and services, all built by government are free to use:
 +
++- [Federalist](https://federalist.18f.gov/)
++- [Search.gov](https://www.search.gov/)  — A free, hosted search platform for federal websites.
++- [Cloud.gov](https://www.cloud.gov/)  — helps teams build, run, and authorize cloud-ready or legacy government systems quickly and cheaply.
++- [Federal CrowdSource Mobile Testing Program](https://digital.gov/services/mobile-application-testing-program/)  — Free mobile compatibility testing by feds, for feds.
++- [Digital Analytics Program](https://digital.gov/services/dap/)  (DAP) — A free analytics tool for measuring digital services in the federal government
++- [Section508.gov](https://www.section508.gov/)  and  [PlainLanguage.gov](https://www.plainlanguage.gov/)  resources
++- [API.data.gov](https://api.data.gov/)  — a free API management service for federal agencies
++- [U.S. Digital Registry](https://digital.gov/services/u-s-digital-registry/)  — A resource for confirming the official status of government social media accounts, mobile apps, and mobile websites.
 +
 +**Questions or feedback?** [Submit an issue](https://github.com/GSA/digitalgov.gov/issues) or send us an email to [digitalgov@gsa.gov](mailto:digitalgov@gsa.gov) :heart:
index fbfe9b9614732502b00ce79233141ec7514d7343,0000000000000000000000000000000000000000..32a932a7a86eb7db3dfa06c5d209d47a49bf6200
mode 100644,000000..100644
--- /dev/null
@@@ -1,48 -1,0 +1,48 @@@
- ```bash
 +---
 +title: Forestry.io
 +date: 2018-03-16
 +description: "Showcase: \"Seeing Hugo in action is a whole different world of awesome.\""
 +siteURL: https://forestry.io/
 +siteSource: https://github.com/forestryio/forestry.io
 +---
 +
 +It was clear from the get-go that we had to go with a static site generator. Static sites are secure, performant, and give you 100% flexibility. At [Forestry.io](https://forestry.io/) we provide Content Management Solutions for websites built with static site generators, so we might be a little biased. The only question: Which static site generator was the right choice for us?
 +
 +### Why Hugo?
 +
 +In our early research we looked at Ionic’s [site](https://github.com/ionic-team/ionic) to get some inspiration. They used Jekyll to build their website. While Jekyll is a great generator, the build times for larger sites can be painfully slow. With more than 150 pages plus many custom configurations and add-ons, our website doesn’t fall into the low-volume category anymore. Our developers want a smooth experience when working on the website and our content editors need the ability to preview content quickly. In short, we need our builds to be lightning fast.
 +
 +We knew Hugo was fast but we did [some additional benchmarking](https://forestry.io/blog/hugo-vs-jekyll-benchmark/) before making our decision. Seeing Hugo in action is a whole different world of awesome. Hugo takes less than one second to build our 150-page site! Take a look:
 +
- *  [**Cloudinary**](https://cloudinary.com/) is probably one of the easiest ways to get responsive images into your website.
++```text
 +                   | EN   
 ++------------------+-----+
 +  Pages            | 141  
 +  Paginator pages  |   4  
 +  Non-page files   |   0  
 +  Static files     | 537  
 +  Processed images |   0  
 +  Aliases          |  60  
 +  Sitemaps         |   1  
 +  Cleaned          |   0  
 +
 +Total in 739 ms
 +```
 +
 +In fact, we liked Hugo so much that our wizard Chris made his workflow public and we started the open-source project [Create-Static-Site](https://github.com/forestryio/create-static-site). It's [a simple way to spin up sites](https://forestry.io/blog/up-and-running-with-hugo/) and set up a modern web development workflow with one line of code. Essentially it adds build configurations as a dependency for JS, CSS and Image Processing.
 +
 +Lastly, we want to take the opportunity to give some love to other amazing tools we used building our website.
 +
 +### What tools did we use?
 +
 +* Our Norwegian designer Nichlas is in love with [**Sketch**](https://www.sketchapp.com/). From what we hear it’s a designer’s dream come true.
 +* Some say our main graphic is [mesmerizing](https://twitter.com/hmncllctv/status/968907474664284160). Nichlas created it using [**3DS Max**](https://www.autodesk.com/products/3ds-max/overview).
 +* [**Hugo**](https://gohugo.io/) -- of course.
 +* Chris can’t think of modern web development without [**Gulp**](https://gulpjs.com/) & [**Webpack**](https://webpack.js.org/). We used them to add additional build steps such as Browsersync, CSS, JS and SVG optimization.
 +* Speaking about adding steps to our build, our lives would be much harder without [**CircleCI**](https://circleci.com/) for continuous deployment and automated testing purposes.
 +* We can’t stop raving about [**Algolia**](https://www.algolia.com/). Chris loves it and even wrote a tutorial on [how to implement Algolia](https://forestry.io/blog/search-with-algolia-in-hugo/) into static sites using Hugo’s [Custom Outputs](/templates/output-formats/).
++* [**Cloudinary**](https://cloudinary.com/) is probably one of the easiest ways to get responsive images into your website.
 +* We might be a little biased on this one - We think [**Forestry.io**](https://forestry.io/) is a great way to add a content management system with a clean UI on top of your site without interrupting your experience as a developer.
 +* For hosting purposes we use the almighty [**AWS**](https://aws.amazon.com/).
 +* [**Formspree.io**](https://formspree.io/) is managing our support and enterprise requests.
 +* We also use browser cookies and JS to customize our user’s experience and give it a more dynamic feel.
index 56a8dfc4d15c5cf8eba8ed84ad2397e647be5280,0000000000000000000000000000000000000000..3b71fd8bcb915abe4b5b538d85130fe7d03f4b25
mode 100644,000000..100644
--- /dev/null
@@@ -1,25 -1,0 +1,24 @@@
 +---
 +
 +title: Godot Tutorials
 +date: 2021-01-07
 +
 +description: "Teaching game development skills with love."
 +
 +# The URL to the site on the internet.
 +siteURL: https://godottutorials.com
 +
 +# Add credit to the article author. Leave blank or remove if not needed/wanted.
 +byline: "[Godot Tutorials](https://godottutorials.com), Web Developer & Game Programmer"
 +
 +---
 +
- my videos and **less time maintaining and fixing** my website.
 +[Godot Tutorials](https://godottutorials.com) started as a way to teach beginners game programming and game development.
 +As I created videos, I ran into a problem; if I made a mistake with a YouTube video, it was difficult to correct errors.
 +
 +I discovered that blogging episodes and having articles that teach on top of my videos is a fantastic solution to my problem.
 +
 +As I researched blogging platforms, I came across two solutions; however, I chose [Hugo](https://gohugo.io) because it's built with Markdown in mind and simplified my workflow.
 +
 +In a sense, with [Hugo](https://gohugo.io) programmed the right way, I can focus **more time on planning, creating, and editing**
++my videos and **less time maintaining and fixing** my website.
index 66fc46f44129578402a495f96b666fef6bbbdf42,0000000000000000000000000000000000000000..ef0587e41bec13b135afbc4784ca50ba4b922511
mode 100644,000000..100644
--- /dev/null
@@@ -1,69 -1,0 +1,69 @@@
- This project was such a blast to develop, it’s a real pleasure to put new technologies to good use in production, and to see real performance and usability benefits from them. Even using classic web methods of serving folders with files is fun when you’ve been databasing for a while – there’s something really ‘pure’ about it.
 +---
 +
 +title: Hartwell Insurance
 +
 +date: 2018-02-09
 +
 +description: "Showcase: \"Hugo + Netlify + PWA makes for a rapid website.\""
 +
 +siteURL: https://www.hartwell-insurance.com/
 +
 +byline: "[Trys Mudford](http://www.trysmudford.com), Lead Developer, Tomango"
 +
 +---
 +
 +We’ve just launched a shiny new website for [Hartwell Insurance](https://www.hartwell-insurance.com/) – I’m really proud of it. It was tackled in a different way to most previous Tomango site builds, using some fancy new tools and some vintage web standards.
 +
 +It’s a multi-page, single-page (!) website written in Hugo, a static site generator built with performance as a first-class feature. _I’ve outlined a load of benefits to Hugo & static sites [here](https://why-static.netlify.com/), in case you’re interested._
 +
 +> **In essence, a static site generator pre-renders the whole site into HTML files and serves them like it’s 1995.**
 +
 +There’s no Apache or Node backend that does compilation at runtime, it’s all done at the build step. This means the server; Netlify in this case, only has to do one thing – serve files. Unsurprisingly, serving simple files is VERY quick.
 +
 +The starter point was the [Victor Hugo](https://github.com/netlify/victor-hugo) repository that Netlify have created. It let me dive in with Hugo, PostCSS, Browsersync and ES6 without setting up any tooling myself – always a win!
 +
 +I then took all the content from the design file and moved it into Markdown, putting shortcodes in where necessary. This site did need a number of custom shortcodes for the presentational elements like the expanding circles and full width backgrounds. But mostly it was just clean, semantic HTML with some CSS and JS enhancement thrown in.
 +
 +For example, this two column layout shown below. I used CSS Columns with a  `break-after: always;` on the `<h1>`. No multi-wrapper or difficult-to-clear shortcodes, just clean HTML.
 +
 +![The multi-column setup on Hartwell Insurance](hartwell-columns.png)
 +
 +For the ripple effects on the section headings, I used JS to prepend a `<canvas>` element then animated it with `RequestAnimationFrame`. It adds a nice bit of movement on the page.
 +
 +On the Hartwell Profitmaker section, I toyed with the idea of using Vue.js for the calculator, but after giving it some thought, I decided to code in Vanilla. The result, all of the site JS comes in at 3.2KB!
 +
 +The plan was to host with Netlify and therefore get access to Netlify Forms. It meant spending 0 minutes on getting a backend set up – I could focus fully on the frontend.
 +
 +Cache invalidation isn’t normally something I spend all that much time thinking about when building a site. But as this site was going to be a Progressive Web App, invalidating files would be important to ensure the site didn’t appear broken when we made changes. As I was using Victor-Hugo, I wasn’t really sure how to best tackle this and sadly spent far too many hours wrangling with Webpack and Gulp files to try and get hashed file names working nicely.
 +
 +Then; while I was waiting for a haircut, I read a [Netlify blog post](https://www.netlify.com/blog/2017/02/23/better-living-through-caching/) on how they do cache invalidation with HTTP2 and it promptly blew my mind.
 +
 +When you request an asset, they send an ETag in the headers which is a hash of the file. There’s also a header to tell the browser not to trust it’s own cache (which sounds a little bit bonkers).
 +
 +So when you request the page, it opens a persistent HTTP2 connection up (so no new connections for file requests). When it gets to requesting that asset, the browser sends the ETag back to Netlify and they either return nothing if the ETag matches, or the new file with the new ETag. No `app.klfjlkdsfjdslkfjdslkfdsj.js` or `app.js?v=20180112`. Just a clean `app.js` with instant cache invalidation. Amazing.
 +
 +Finally, the [Service Worker](https://www.hartwell-insurance.com/sw.js) could be added. This turned out to be straightforward as the Netlify cache invalidation system solved most of the pain points. I went for a network-first, cache-fallback setup for both assets and HTML. This does mean flaky speeds are reliant on the page connection time, but given we’re on HTTP2, I’m hoping the persistent connection and tiny ETag size will keep it quick. For online connections, every request is up to date and instantly live after any update. Offline connections fall back to every assets’ last cached state. It seems to work really nicely, and there’s no need for an update prompt if assets have changed.
 +
 +---
 +
 +## The results
 +
 +The WebPageTest results are looking good. The speed index is 456, 10x smaller than the average Alexa top 300,000 score.
 +
 +![WebPageTest results](hartwell-webpagetest.png)
 +
 +[TestMySite.io](https://testmysite.io/5a7e1bb2df99531a23c9ad2f/hartwell-insurance.com) is return ~2ms time to first byte from the CDN edge nodes. Lighthouse audits are also very promising. There’s still some improvement to be gained lazy-loading the images and inlining the CSS. I’m less excited about the [second suggestion](http://www.trysmudford.com/css-in-2017/), but I’ll certainly look at some lazy-loading, especially as I’m already using `IntersectionObserver` for some animations.
 +
 +![Lighthouse results](hartwell-lighthouse.png)
 +
 +The most encouraging result is how quick the site is around the world. Most Tomango clients (and their customers) are pretty local and almost exclusively UK-based. We have a dedicated server in Surrey that serves our market pretty well. It did take me by surprise just how much slower a connection from the USA, Australia and Japan to our server was. They’re waiting ~500ms just for the first byte, let alone downloading each asset.
 +
 +[Hartwell Insurance](https://www.hartwell-insurance.com/) are a US company so by putting them on our server, we’d be instantly hampering their local response times by literally seconds. This was one of the main reasons for going with Netlify. They provide global CDN hosting that’s quick from anywhere in the world.
 +
 +---
 +
++This project was such a blast to develop, it’s a real pleasure to put new technologies to good use in production, and to see real performance and usability benefits from them. Even using classic web methods of serving folders with files is fun when you’ve been using dynamic systems for a while – there’s something really pure about it.
 +
 +---
 +
 +_This was originally posted on [my website](http://www.trysmudford.com/perfomance-wins-with-hugo-and-netlify/)_
index 18221ed688146fd0c22d65991ceced8d1e35bef3,0000000000000000000000000000000000000000..6ad4b7840fb225a8f5612f9df2ecb6896b582145
mode 100644,000000..100644
--- /dev/null
@@@ -1,21 -1,0 +1,20 @@@
 +---
 +title: Let’s Encrypt
 +date: 2018-03-13
 +description: "Showcase: Lessons learned from taking letsencrypt.org to Hugo."
 +siteURL: https://letsencrypt.org/
 +siteSource: https://github.com/letsencrypt/website
 +byline: "[bep](https://github.com/bep), Hugo Lead"
 +---
 +
 +The **Let’s Encrypt website** has a common set of elements: A landing page and some other static info-pages, a document section, a blog, and a documentation section. Having it moved to Hugo was mostly motivated by a _simpler administration and Hugo's [multilingual support](/content-management/multilingual/)_. They already serve HTTPS to more than 60 million domains, and having the documentation available in more languages will increase that reach.[^1]
 +
 +{{< tweet user="letsencrypt" id="971755920639307777" >}}
 +
 +I helped them port the site from Jekyll to Hugo. There are usually very few surprises doing this. I know Hugo very well, but working on sites with a history usually comes up with something new.
 +
 +That site is bookmarked in many browsers, so preserving the URLs was a must. Hugo's URL handling is very flexible, but there was one challenge. The website has a mix of standard and what we in Hugo call _ugly URLs_ (`https://letsencrypt.org/2017/12/07/looking-forward-to-2018.html`). In Hugo this is handled automatically, and you can turn it on globally or per language. But before Hugo `0.33` you could not configure it for parts of your site. You could set it manually for the relevant pages in front matter -- which is how it was done in Jekyll -- but that would be hard to manage, especially when you start to introduce translations. So, in Hugo 0.33 I added support for _ugly URLs_ per section and also `url` set in front matter for list pages (`https://letsencrypt.org/blog/`).
 +
 +The lessons learned from this also lead to [disableLanguages](/content-management/multilingual/#disable-a-language) in Hugo `0.34` (a way to turn off languages during translation). And I also registered [this issue](https://github.com/gohugoio/hugo/issues/4463). Once fixed it will make it easier to handle partially translated sites.
 +
 +[^1]: The work on getting the content translated is in progress.
index 64e9960a397e571e99bce596a3b6bcd1d01bb737,0000000000000000000000000000000000000000..d324833c9f1397ead4fbd6534a68da7cf7ff9f2a
mode 100644,000000..100644
--- /dev/null
@@@ -1,37 -1,0 +1,35 @@@
 +---
 +
 +title: PHARMASEAL
 +date: 2019-04-29
 +
 +description: "Pharmaseal website developed using Hugo, Forestry, hosted and deployed by Netlify."
 +
 +# The URL to the site on the internet.
 +siteURL: https://pharmaseal.co/
 +
 +# Link to the site's Hugo source code if public and you can/want to share.
 +# Remove or leave blank if not needed/wanted.
 +
 +# Add credit to the article author. Leave blank or remove if not needed/wanted.
 +byline: "[Roboto Studio](https://roboto.studio), Jonathan Alford"
 +
 +---
 +
- We wanted to optimise the site as much as possible, so we opted for using Cloudinary, enabling us to take advantage of on-the-fly image manipulation, and thanks to the sheer speed of static sites, we achieved a perfect optimisation score with Google audits.
 +We wanted to shake the status quo with PHARMASEAL, opting for a fast and scalable website built with Hugo instead of slower monolithic systems the competitors were using.
 +
 +We had two goals:
 +
 +**Make it fast**
 +
- **TLDR:** We're blown away with HUGO, the sheer speed, scalability and deployment possibilities with Netlify is the 💣
++We wanted to optimize the site as much as possible, so we opted for using Cloudinary, enabling us to take advantage of on-the-fly image manipulation, and thanks to the sheer speed of static sites, we achieved a perfect optimization score with Google audits.
 +
 +Because we're hosting the site through Netlify and our target audience is in America, we are taking advantage of Netlify edge (Their alternative to a CDN). We're talking blazing fast.
 +
 +**Make it easy**
 +
 +We're big fans of simplicity, and that's what we delivered with the Forestry building blocks. Every element on the site is built with building blocks in mind, allowing PHARMASEAL to generate multiple pages in the blink of an eye.
 +
 +PHARMASEAL have found Forestry CMS combined with HUGO to be so effective at producing fast, purpose driven pages, that we have worked with them to add even more blocks in a scalable, modular fashion.
 +
++**TLDR:** We're blown away with HUGO, the sheer speed, scalability and deployment possibilities with Netlify is the 💣
index f72a625549975b5d8a4fb29fd503d41f720ff9a9,0000000000000000000000000000000000000000..f79677a1a512a6a72ab1a45135572773ff0088a7
mode 100644,000000..100644
--- /dev/null
@@@ -1,4 -1,0 +1,4 @@@
- Our customers get their own branded app enabling them to communicate fast and effectively with all employees, also non-desk and shift workers. 
 +**Quiply** is an employee communications app enabling mobile collaboration across an entire organization.
++Our customers get their own branded app enabling them to communicate fast and effectively with all employees, also non-desk and shift workers.
 +
 +As the Quiply app's build process is based on **Gulp**, we have started to build our company and product website using **Gulp + Hugo** which is super-fast and gives us exactly the flexibility we need.
index 597163340028fdc294b9686135f130727f8e12ee,0000000000000000000000000000000000000000..de92878986b5c55474cc17f4ce10d1a15afa13dc
mode 100644,000000..100644
--- /dev/null
@@@ -1,8 -1,0 +1,7 @@@
- * [Person 1](https://example.com)
- * [Person 1](https://example.com)
 +
 +Add some **general info** about the site here.
 +
 +The site is built by:
 +
++* [Person 1](https://example.org)
++* [Person 1](https://example.org)
index 3650d5a077dfbfa25f26c55abc616ec621e87d6b,0000000000000000000000000000000000000000..7fd27a35825758a913542e6ffa550a7dff0db48d
mode 100644,000000..100644
--- /dev/null
@@@ -1,55 -1,0 +1,55 @@@
- keywords: [404, page not found]
 +---
 +title: Custom 404 page
 +linkTitle: 404 page
 +description: If you know how to create a single page template, you have unlimited options for creating a custom 404.
 +categories: [templates]
- {{< code file="layouts/404.html" >}}
++keywords: ['404',page not found]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 220
 +weight: 220
 +---
 +
 +When using Hugo with [GitHub Pages](https://pages.github.com/), you can provide your own template for a [custom 404 error page](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site) by creating a 404.html template file in the root of your `layouts` folder. When Hugo generates your site, the `404.html` file will be placed in the root.
 +
 +404 pages will have all the regular [page variables][pagevars] available to use in the templates.
 +
 +In addition to the standard page variables, the 404 page has access to all site content accessible from `.Pages`.
 +
 +```txt
 +▾ layouts/
 +    404.html
 +```
 +
 +## 404.html
 +
 +This is a basic example of a 404.html template:
 +
++{{< code file=layouts/404.html >}}
 +{{ define "main" }}
 +  <main id="main">
 +    <div>
 +      <h1 id="title"><a href="{{ "" | relURL }}">Go Home</a></h1>
 +    </div>
 +  </main>
 +{{ end }}
 +{{< /code >}}
 +
 +## Automatic loading
 +
 +Your 404.html file can be set to load automatically when a visitor enters a mistaken URL path, dependent upon the web serving environment you are using. For example:
 +
 +* [GitHub Pages](/hosting-and-deployment/hosting-on-github/), [GitLab Pages](/hosting-and-deployment/hosting-on-gitlab/) and [Cloudflare Pages](/hosting-and-deployment/hosting-on-cloudflare-pages/). The 404 page is automatic.
 +* Apache. You can specify `ErrorDocument 404 /404.html` in an `.htaccess` file in the root of your site.
 +* Nginx. You might specify `error_page 404 /404.html;` in your `nginx.conf` file. [Details here](https://nginx.org/en/docs/http/ngx_http_core_module.html#error_page).
 +* Amazon AWS S3. When setting a bucket up for static web serving, you can specify the error file from within the S3 GUI.
 +* Amazon CloudFront. You can specify the page in the Error Pages section in the CloudFront Console. [Details here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
 +* Caddy Server. Use the `handle_errors` directive to specify error pages for one or more status codes. [Details here](https://caddyserver.com/docs/caddyfile/directives/handle_errors)
 +* Netlify. Add `/* /404.html 404` to `content/_redirects`. [Details Here](https://www.netlify.com/docs/redirects/#custom-404)
 +* Azure Static Web App. set `responseOverrides.404.rewrite` and `responseOverrides.404.statusCode` in configfile `staticwebapp.config.json`. [Details here](https://docs.microsoft.com/en-us/azure/static-web-apps/configuration#response-overrides)
 +* Azure Storage as Static Web Site Hosting. You can specify the `Error document path` in the Static website configuration page of the Azure portal. [Details here](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website).
 +* DigitalOcean App Platform. You can specify `error_document` in your app specification file or use control panel to set up error document. [Details here](https://docs.digitalocean.com/products/app-platform/how-to/manage-static-sites/#configure-a-static-site).
 +* [Firebase Hosting](https://firebase.google.com/docs/hosting/full-config#404): `/404.html` automatically gets used as the 404 page.
 +
 +[pagevars]: /variables/page/
index 30243e63c536795f1a70faadc4b2bf1532b064ff,0000000000000000000000000000000000000000..b2197d162cfb989ab81e0619e017dcc925f516bb
mode 100644,000000..100644
--- /dev/null
@@@ -1,16 -1,0 +1,16 @@@
- categories: [templates]
- keywords: []
 +---
 +title: Templates
 +linkTitle: Overview
 +description: Go templating, template types and lookup order, shortcodes, and data.
++categories: []
++keywords: []
 +menu:
 +  docs:
 +    identifier: templates-overview
 +    parent: templates
 +    weight: 10
 +weight: 10
 +aliases: [/templates/overview/,/templates/content]
 +---
 +
 +A template is an HTML file with [template actions](/getting-started/glossary/#template-action), located within the layouts directory of a project, theme, or module. Visit the topics below, in the order presented, to understand template selection and creation.
index ec84f1a2256fff90ecadf74cf5ddfb5315bbb915,0000000000000000000000000000000000000000..63bf2f9b2937ea0ca4a4daa96a54b31f9532ee03
mode 100644,000000..100644
--- /dev/null
@@@ -1,97 -1,0 +1,97 @@@
- categories: [fundamentals,templates]
 +---
 +title: Base templates and blocks
 +description: The base and block constructs allow you to define the outer shell of your master templates (i.e., the chrome of the page).
- aliases: [/templates/blocks/,/templates/base-templates-and-blocks/]
++categories: [templates,fundamentals]
 +keywords: [blocks,base]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 40
 +weight: 40
- {{< code file="layouts/_default/baseof.html" >}}
 +toc: true
++aliases: [/templates/blocks/,/templates/base-templates-and-blocks/]
 +---
 +
 +The `block` keyword allows you to define the outer shell of your pages' one or more master template(s) and then fill in or override portions as necessary.
 +
 +{{< youtube QVOMCYitLEc >}}
 +
 +## Base template lookup order
 +
 +The base template lookup order closely follows that of the template it applies to (e.g. `_default/list.html`).
 +
 +See [Template Lookup Order](/templates/lookup-order/) for details and examples.
 +
 +## Define the base template
 +
 +The following defines a simple base template at `_default/baseof.html`. As a default template, it is the shell from which all your pages will be rendered unless you specify another `*baseof.html` closer to the beginning of the lookup order.
 +
- {{< code file="layouts/_default/list.html" >}}
++{{< code file=layouts/_default/baseof.html >}}
 +<!DOCTYPE html>
 +<html>
 +  <head>
 +    <meta charset="utf-8">
 +    <title>{{ block "title" . }}
 +      <!-- Blocks may include default content. -->
 +      {{ .Site.Title }}
 +    {{ end }}</title>
 +  </head>
 +  <body>
 +    <!-- Code that all your templates share, like a header -->
 +    {{ block "main" . }}
 +      <!-- The part of the page that begins to differ between templates -->
 +    {{ end }}
 +    {{ block "footer" . }}
 +    <!-- More shared code, perhaps a footer but that can be overridden if need be in  -->
 +    {{ end }}
 +  </body>
 +</html>
 +{{< /code >}}
 +
 +## Override the base template
 +
 +From the above base template, you can define a [default list template][hugolists]. The default list template will inherit all of the code defined above and can then implement its own `"main"` block from:
 +
- {{< code file="layouts/_default/single.html" >}}
++{{< code file=layouts/_default/list.html >}}
 +{{ define "main" }}
 +  <h1>Posts</h1>
 +  {{ range .Pages }}
 +    <article>
 +      <h2>{{ .Title }}</h2>
 +      {{ .Content }}
 +    </article>
 +  {{ end }}
 +{{ end }}
 +{{< /code >}}
 +
 +This replaces the contents of our (basically empty) "main" block with something useful for the list template. In this case, we didn't define a `"title"` block, so the contents from our base template remain unchanged in lists.
 +
 +{{% note %}}
 +Code that you put outside the block definitions *can* break your layout. This even includes HTML comments. For example:
 +
 +```go-html-template
 +<!-- Seemingly harmless HTML comment..that will break your layout at build -->
 +{{ define "main" }}
 +...your code here
 +{{ end }}
 +```
 +[See this thread from the Hugo discussion forums.](https://discourse.gohugo.io/t/baseof-html-block-templates-and-list-types-results-in-empty-pages/5612/6)
 +{{% /note %}}
 +
 +The following shows how you can override both the `"main"` and `"title"` block areas from the base template with code unique to your [default single page template][singletemplate]:
 +
++{{< code file=layouts/_default/single.html >}}
 +{{ define "title" }}
 +  <!-- This will override the default value set in baseof.html; i.e., "{{ .Site.Title }}" in the original example-->
 +  {{ .Title }} &ndash; {{ .Site.Title }}
 +{{ end }}
 +{{ define "main" }}
 +  <h1>{{ .Title }}</h1>
 +  {{ .Content }}
 +{{ end }}
 +{{< /code >}}
 +
 +[hugolists]: /templates/lists
 +[lookup]: /templates/lookup-order/
 +[rendering the section]: /templates/section-templates/
 +[singletemplate]: /templates/single-page-templates/
index cf835af4440e6af4623eddad8b9b15b89b9e2809,0000000000000000000000000000000000000000..b862f727ea22ec773ca33dc2bce9f432b770ad3c
mode 100644,000000..100644
--- /dev/null
@@@ -1,267 -1,0 +1,177 @@@
- aliases: [/extras/datafiles/,/extras/datadrivencontent/,/doc/datafiles/]
 +---
 +title: Data templates
 +description: In addition to Hugo's built-in variables, you can specify your own custom data in templates or shortcodes that pull from both local and dynamic sources.
 +categories: [templates]
 +keywords: [data,dynamic,csv,json,toml,yaml,xml]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 150
 +weight: 150
- <!-- begin data files -->
 +toc: true
++aliases: [/extras/datafiles/,/extras/datadrivencontent/,/doc/datafiles/]
 +---
 +
- ## The data folder
 +Hugo supports loading data from YAML, JSON, XML, and TOML files located in the `data` directory at the root of your Hugo project.
 +
 +{{< youtube FyPgSuwIMWQ >}}
 +
- The `data` folder should store additional data for Hugo to use when generating your site.
++## The data directory
 +
- - extending the content when the front matter fields grow out of control, or
- - showing a larger dataset in a template (see the example below).
++The `data` directory should store additional data for Hugo to use when generating your site.
 +
 +Data files are not for generating standalone pages. They should supplement content files by:
 +
- ## Example: Jaco Pastorius' Solo Discography
++- Extending the content when the front matter fields grow out of control, or
++- Showing a larger dataset in a template (see the example below).
 +
 +In both cases, it's a good idea to outsource the data in their (own) files.
 +
 +These files must be YAML, JSON, XML, or TOML files (using the `.yml`, `.yaml`, `.json`, `.xml`, or `.toml` extension). The data will be accessible as a `map` in the `.Site.Data` variable.
 +
 +To access the data using the `site.Data.filename` notation, the file name must begin with an underscore or a Unicode letter, followed by zero or more underscores, Unicode letters, or Unicode digits. For example:
 +
 +- `123.json` - Invalid
 +- `x123.json` - Valid
 +- `_123.json` - Valid
 +
 +To access the data using the [`index`](/functions/collections/indexfunction) function, the file name is irrelevant. For example:
 +
 +Data file|Template code
 +:--|:--
 +`123.json`|`{{ index .Site.Data "123" }}`
 +`x123.json`|`{{ index .Site.Data "x123" }}`
 +`_123.json`|`{{ index .Site.Data "_123" }}`
 +`x-123.json`|`{{ index .Site.Data "x-123" }}`
 +
 +## Data files in themes
 +
 +Data Files can also be used in themes.
 +
 +However, note that the theme data files are merged with the project directory taking precedence. That is, Given two files with the same name and relative path, the data in the file in the root project `data` directory will override the data from the file in the `themes/<THEME>/data` directory *for keys that are duplicated*).
 +
 +Therefore, theme authors should be careful not to include data files that could be easily overwritten by a user who decides to [customize a theme][customize]. For theme-specific data items that shouldn't be overridden, it can be wise to prefix the folder structure with a namespace; e.g. `mytheme/data/<THEME>/somekey/...`. To check if any such duplicate exists, run hugo with the `-v` flag.
 +
 +The keys in the map created with data templates from data files will be a dot-chained set of `path`, `filename`, and `key` in the file (if applicable).
 +
 +This is best explained with an example:
 +
- {{< code-toggle file="jacopastorius" >}}
++## Examples
++
++### Jaco Pastorius' Solo Discography
 +
 +[Jaco Pastorius](https://en.wikipedia.org/wiki/Jaco_Pastorius_discography) was a great bass player, but his solo discography is short enough to use as an example. [John Patitucci](https://en.wikipedia.org/wiki/John_Patitucci) is another bass giant.
 +
 +The example below is a bit contrived, but it illustrates the flexibility of data Files. This example uses TOML as its file format with the two following data files:
 +
 +* `data/jazz/bass/jacopastorius.toml`
 +* `data/jazz/bass/johnpatitucci.toml`
 +
 +`jacopastorius.toml` contains the content below. `johnpatitucci.toml` contains a similar list:
 +
-    {{ partial "artist.html" . }}
++{{< code-toggle file=data/jazz/bass/jacopastorius >}}
 +discography = [
 +"1974 - Modern American Music … Period! The Criteria Sessions",
 +"1974 - Jaco",
 +"1976 - Jaco Pastorius",
 +"1981 - Word of Mouth",
 +"1981 - The Birthday Concert (released in 1995)",
 +"1982 - Twins I & II (released in 1999)",
 +"1983 - Invitation",
 +"1986 - Broadway Blues (released in 1998)",
 +"1986 - Honestly Solo Live (released in 1990)",
 +"1986 - Live In Italy (released in 1991)",
 +"1986 - Heavy'n Jazz (released in 1992)",
 +"1991 - Live In New York City, Volumes 1-7.",
 +"1999 - Rare Collection (compilation)",
 +"2003 - Punk Jazz: The Jaco Pastorius Anthology (compilation)",
 +"2007 - The Essential Jaco Pastorius (compilation)"
 +]
 +{{< /code-toggle >}}
 +
 +The list of bass players can be accessed via `.Site.Data.jazz.bass`, a single bass player by adding the file name without the suffix, e.g. `.Site.Data.jazz.bass.jacopastorius`.
 +
 +You can now render the list of recordings for all the bass players in a template:
 +
 +```go-html-template
 +{{ range $.Site.Data.jazz.bass }}
- ## Example: accessing named values in a data file
++  {{ partial "artist.html" . }}
 +{{ end }}
 +```
 +
 +And then in the `partials/artist.html`:
 +
 +```go-html-template
 +<ul>
 +{{ range .discography }}
 +  <li>{{ . }}</li>
 +{{ end }}
 +</ul>
 +```
 +
 +Discover a new favorite bass player? Just add another `.toml` file in the same directory.
 +
- Assume you have the following data structure in your `User0123.[yml|toml|xml|json]` data file located directly in `data/`:
++### Accessing named values in a data file
 +
- {{< code-toggle file="User0123" >}}
++Assume you have the following data structure in your `user0123` data file located directly in `data/`:
 +
- ## Get remote data
- Use `getJSON` or `getCSV` to get remote data:
- ```go-html-template
- {{ $dataJ := getJSON "url" }}
- {{ $dataC := getCSV "separator" "url" }}
- ```
- If you use a prefix or postfix for the URL, the functions accept [variadic arguments][variadic]:
- ```go-html-template
- {{ $dataJ := getJSON "url prefix" "arg1" "arg2" "arg n" }}
- {{ $dataC := getCSV  "separator" "url prefix" "arg1" "arg2" "arg n" }}
- ```
- The separator for `getCSV` must be put in the first position and can only be one character long.
- All passed arguments will be joined to the final URL:
- ```go-html-template
- {{ $urlPre := "https://api.github.com" }}
- {{ $gistJ := getJSON $urlPre "/users/GITHUB_USERNAME/gists" }}
- ```
- This will resolve internally to the following:
- ```go-html-template
- {{ $gistJ := getJSON "https://api.github.com/users/GITHUB_USERNAME/gists" }}
- ```
- ### Add HTTP headers
- Both `getJSON` and `getCSV` takes an optional map as the last argument, e.g.:
++{{< code-toggle file=data/user0123 >}}
 +Name: User0123
 +"Short Description": "He is a **jolly good** fellow."
 +Achievements:
 +  - "Can create a Key, Value list from Data File"
 +  - "Learns Hugo"
 +  - "Reads documentation"
 +{{</ code-toggle >}}
 +
 +You can use the following code to render the `Short Description` in your layout:
 +
 +```go-html-template
 +<div>Short Description of {{ .Site.Data.User0123.Name }}: <p>{{ index .Site.Data.User0123 "Short Description" | markdownify }}</p></div>
 +```
 +
 +Note the use of the [`markdownify`] function. This will send the description through the Markdown rendering engine.
 +
- ```go-html-template
- {{ $data := getJSON "https://example.org/api" (dict "Authorization" "Bearer abcd") }}
- ```
- If you need multiple values for the same header key, use a slice:
- ```go-html-template
- {{ $data := getJSON "https://example.org/api" (dict "X-List" (slice "a" "b" "c")) }}
- ```
- ### Example for CSV files
- For `getCSV`, the one-character-long separator must be placed in the first position followed by the URL. The following is an example of creating an HTML table in a [partial template][partials] from a published CSV:
- {{< code file="layouts/partials/get-csv.html" >}}
-   <table>
-     <thead>
-       <tr>
-       <th>Name</th>
-       <th>Position</th>
-       <th>Salary</th>
-       </tr>
-     </thead>
-     <tbody>
-     {{ $url := "https://example.com/finance/employee-salaries.csv" }}
-     {{ $sep := "," }}
-     {{ range $i, $r := getCSV $sep $url }}
-       <tr>
-         <td>{{ index $r 0 }}</td>
-         <td>{{ index $r 1 }}</td>
-         <td>{{ index $r 2 }}</td>
-       </tr>
-     {{ end }}
-     </tbody>
-   </table>
- {{< /code >}}
- The expression `{{ index $r number }}` must be used to output the nth-column from the current row.
- ### Cache URLs
- Each downloaded URL will be cached in the default folder `$TMPDIR/hugo_cache_$USER/`. The variable `$TMPDIR` will be resolved to your system-dependent temporary directory.
++## Remote data
 +
- With the command-line flag `--cacheDir`, you can specify any folder on your system as a caching directory.
- You can also set `cacheDir` in the [main configuration file][config].
- If you don't like caching at all, you can fully disable caching with the command-line flag `--ignoreCache`.
- ### Authentication when using REST URLs
- Currently, you can only use those authentication methods that can be put into an URL. [OAuth] and other authentication methods are not implemented.
- ## Load local files
- To load local files with `getJSON` and `getCSV`, the source files must reside within Hugo's working directory. The file extension does not matter, but the content does.
- It applies the same output logic as above in [Get Remote Data](#get-remote-data).
- {{% note %}}
- The local CSV files to be loaded using `getCSV` must be located **outside** the `data` directory.
- {{% /note %}}
++Retrieve remote data using these template functions:
 +
- {{% warning "URL Data and LiveReload" %}}
++- [`resources.GetRemote`](/functions/resources/getremote) (recommended)
++- [`data.GetCSV`](/functions/data/getcsv)
++- [`data.GetJSON`](/functions/data/getjson)
 +
 +## LiveReload with data files
 +
 +There is no chance to trigger a [LiveReload] when the content of a URL changes. However, when a *local* file changes (i.e., `data/*` and `themes/<THEME>/data/*`), a LiveReload will be triggered. Symlinks are not supported. Note too that because downloading data takes a while, Hugo stops processing your Markdown files until the data download has been completed.
 +
++{{% note %}}
 +If you change any local file and the LiveReload is triggered, Hugo will read the data-driven (URL) content from the cache. If you have disabled the cache (i.e., by running the server with `hugo server --ignoreCache`), Hugo will re-download the content every time LiveReload triggers. This can create *huge* traffic. You may reach API limits quickly.
 +{{% /note %}}
 +
 +## Examples of data-driven content
 +
 +- Photo gallery JSON powered: [https://github.com/pcdummy/hugo-lightslider-example](https://github.com/pcdummy/hugo-lightslider-example)
 +- GitHub Starred Repositories [in a post](https://github.com/SchumacherFM/blog-cs/blob/master/content%2Fposts%2Fgithub-starred.md) using data-driven content in a [custom short code](https://github.com/SchumacherFM/blog-cs/blob/master/layouts%2Fshortcodes%2FghStarred.html).
 +
 +## Specs for data formats
 +
 +* [TOML Spec][toml]
 +* [YAML Spec][yaml]
 +* [JSON Spec][json]
 +* [CSV Spec][csv]
 +* [XML Spec][xml]
 +
 +[config]: /getting-started/configuration/
 +[csv]: https://tools.ietf.org/html/rfc4180
 +[customize]: /hugo-modules/theme-components/
 +[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf
 +[LiveReload]: /getting-started/usage/#livereload
 +[lookup]: /templates/lookup-order/
 +[`markdownify`]: /functions/transform/markdownify
 +[OAuth]: https://en.wikipedia.org/wiki/OAuth
 +[partials]: /templates/partials/
 +[toml]: https://toml.io/en/latest
 +[variadic]: https://en.wikipedia.org/wiki/Variadic_function
 +[vars]: /variables/
 +[yaml]: https://yaml.org/spec/
 +[xml]: https://www.w3.org/XML/
index 2e82688c01f4eb6fa7a619d1125af845215aa024,0000000000000000000000000000000000000000..1847af9bc3a81f9076850467e9a343d507132a3c
mode 100644,000000..100644
--- /dev/null
@@@ -1,56 -1,0 +1,56 @@@
- aliases: [/extras/localfiles/,/templates/local-files/]
 +---
 +title: Local file templates
 +description: Hugo's `readDir` and `readFile` functions make it easy to traverse your project's directory structure and write file contents to your templates.
 +categories: [templates]
 +keywords: [files,directories]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 180
 +weight: 180
 +toc: true
++aliases: [/extras/localfiles/,/templates/local-files/]
 +---
 +
 +## Traverse local files
 +
 +With Hugo's [`readDir`] and [`readFile`] template functions, you can traverse your website's files on your server.
 +
 +## Use `readDir`
 +
 +The [`readDir`] function returns an array of [`os.FileInfo`] structures. It takes the file's `path` as a single string argument. This path can be to any directory of your website (i.e., as found on your server's file system).
 +
 +Whether the path is absolute or relative does not matter because---at least for `readDir`---the root of your website (typically `./public/`) in effect becomes both:
 +
 +1. The file system root
 +2. The current working directory
 +
 +## Use `readFile`
 +
 +The [`readfile`] function reads a file from disk and converts it into a string to be manipulated by other Hugo functions or added as-is. `readFile` takes the file, including path, as an argument passed to the function.
 +
 +To use the `readFile` function in your templates, make sure the path is relative to your *Hugo project's root directory*:
 +
 +```go-html-template
 +{{ readFile "/content/templates/local-file-templates" }}
 +```
 +
 +### `readFile` Example: Add a Project File to Content
 +
 +As `readFile` is a function, it is only available to you in your templates and not your content. However, we can create a simple [shortcode template][sct] that calls `readFile`, passes the first argument through the function, and then allows an optional second argument to send the file through the Markdown processor. The pattern for adding this shortcode to your content will be as follows:
 +
 +```go-html-template
 +{{</* readfile file="/path/to/local/file.txt" markdown="true" */>}}
 +```
 +
 +{{% note %}}
 +If you are going to create [custom shortcodes](/templates/shortcode-templates/) with `readFile` for a theme, note that usage of the shortcode will refer to the project root and *not* your `themes` directory.
 +{{% /note %}}
 +
 +[called directly in the Hugo docs]: https://github.com/gohugoio/hugoDocs/blob/master/content/en/templates/files.md
 +[`os.FileInfo`]: https://pkg.go.dev/io/fs#FileInfo
 +[`readDir`]: /functions/os/readdir
 +[`readFile`]: /functions/os/readfile
 +[sc]: /content-management/shortcodes/
 +[sct]: /templates/shortcode-templates/
 +[readfilesource]: https://github.com/gohugoio/hugoDocs/blob/master/layouts/shortcodes/readfile.html
index a176a51f2ab9de7fbf88c6bcc51c606957b13be2,0000000000000000000000000000000000000000..59b7472fbc0b8b693756ca91e0b4ac38bf6e2ded
mode 100644,000000..100644
--- /dev/null
@@@ -1,65 -1,0 +1,65 @@@
- aliases: [/layout/homepage/,/templates/homepage-template/]
 +---
 +title: Homepage template
 +description: The homepage of a website is often formatted differently than the other pages. For this reason, Hugo makes it easy for you to define your new site's homepage as a unique template.
 +categories: [templates]
 +keywords: [homepage]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 70
 +weight: 70
- {{< code file="layouts/index.html" >}}
 +toc: true
++aliases: [/layout/homepage/,/templates/homepage-template/]
 +---
 +
 +Homepage is a `Page` and therefore has all the [page variables][pagevars] and [site variables][sitevars] available for use.
 +
 +{{% note %}}
 +The homepage template is the *only* required template for building a site and therefore useful when bootstrapping a new site and template. It is also the only required template if you are developing a single-page website.
 +{{% /note %}}
 +
 +{{< youtube ut1xtRZ1QOA >}}
 +
 +## Homepage template lookup order
 +
 +See [Template Lookup](/templates/lookup-order/).
 +
 +## Add content and front matter to the homepage
 +
 +The homepage, similar to other [list pages in Hugo][lists], accepts content and front matter from an `_index.md` file. This file should live at the root of your `content` folder (i.e., `content/_index.md`). You can then add body copy and metadata to your homepage the way you would any other content file.
 +
 +See the homepage template below or [Content Organization][contentorg] for more information on the role of `_index.md` in adding content and front matter to list pages.
 +
 +## Example homepage template
 +
 +The following is an example of a homepage template that uses [partial][partials], [base] templates, and a content file at `content/_index.md` to populate the `{{ .Title }}` and `{{ .Content }}` [page variables][pagevars].
 +
++{{< code file=layouts/index.html >}}
 +{{ define "main" }}
 +  <main aria-role="main">
 +    <header class="homepage-header">
 +      <h1>{{ .Title }}</h1>
 +      {{ with .Params.subtitle }}
 +        <span class="subtitle">{{ . }}</span>
 +      {{ end }}
 +    </header>
 +    <div class="homepage-content">
 +      <!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
 +      {{ .Content }}
 +    </div>
 +    <div>
 +      {{ range first 10 .Site.RegularPages }}
 +        {{ .Render "summary" }}
 +      {{ end }}
 +    </div>
 +  </main>
 +{{ end }}
 +{{< /code >}}
 +
 +[base]: /templates/base/
 +[contentorg]: /content-management/organization/
 +[lists]: /templates/lists/
 +[lookup]: /templates/lookup-order/
 +[pagevars]: /variables/page/
 +[partials]: /templates/partials/
 +[sitevars]: /variables/site/
index a73ecde4c889470517ebd21f26a5c4a2be9547ec,0000000000000000000000000000000000000000..0785318ab397e3656b8f56510656c8c6ddd6a615
mode 100644,000000..100644
--- /dev/null
@@@ -1,226 -1,0 +1,221 @@@
- <!-- reference: https://discourse.gohugo.io/t/lookup-order-for-partials/5705/6
- code: https://github.com/gohugoio/hugo/blob/e445c35d6a0c7f5fc2f90f31226cd1d46e048bbc/tpl/template_embedded.go#L147 -->
 +---
 +title: Internal templates
 +description: Hugo ships with a group of boilerplate templates that cover the most common use cases for static websites.
 +categories: [templates]
 +keywords: [internal, analytics,]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 190
 +weight: 190
 +toc: true
 +---
- Hugo ships with an internal template supporting [Google Analytics 4][GA4] (GA4).
 +
 +{{% note %}}
 +While the following internal templates are called similar to partials, they do *not* observe the partial template lookup order.
 +{{% /note %}}
 +
 +## Google Analytics
 +
- **Note:** Universal Analytics are [deprecated].
- [GA4]: https://support.google.com/analytics/answer/10089681
- [deprecated]: https://support.google.com/analytics/answer/11583528
++Hugo ships with an internal template supporting [Google Analytics 4].
 +
- {{< code file="layouts/partials/disqus.html" >}}
++[Google Analytics 4]: https://support.google.com/analytics/answer/10089681
 +
 +### Configure Google Analytics
 +
 +Provide your tracking ID in your configuration file:
 +
 +**Google Analytics 4 (gtag.js)**
 +{{< code-toggle file="hugo" >}}
 +[services.googleAnalytics]
 +ID = "G-MEASUREMENT_ID"
 +{{</ code-toggle >}}
 +
 +### Use the Google Analytics template
 +
 +Include the Google Analytics internal template in your templates where you want the code to appear:
 +
 +```go-html-template
 +{{ template "_internal/google_analytics.html" . }}
 +```
 +
 +To create your own template, access the configured ID with `{{ site.Config.Services.GoogleAnalytics.ID }}`.
 +
 +## Disqus
 +
 +Hugo also ships with an internal template for [Disqus comments][disqus], a popular commenting system for both static and dynamic websites. To effectively use Disqus, secure a Disqus "shortname" by [signing up for the free service][disqussignup].
 +
 +### Configure Disqus
 +
 +To use Hugo's Disqus template, first set up a single configuration value:
 +
 +{{< code-toggle file="hugo" >}}
 +[services.disqus]
 +shortname = 'your-disqus-shortname'
 +{{</ code-toggle >}}
 +
 +Hugo's Disqus template accesses this value with:
 +
 +```go-html-template
 +{{ .Site.Config.Services.Disqus.Shortname }}
 +```
 +
 +You can also set the following in the front matter for a given piece of content:
 +
 +* `disqus_identifier`
 +* `disqus_title`
 +* `disqus_url`
 +
 +### Use the Disqus template
 +
 +To add Disqus, include the following line in the templates where you want your comments to appear:
 +
 +```go-html-template
 +{{ template "_internal/disqus.html" . }}
 +```
 +
 +### Conditional loading of Disqus comments
 +
 +Users have noticed that enabling Disqus comments when running the Hugo web server on `localhost` (i.e. via `hugo server`) causes the creation of unwanted discussions on the associated Disqus account.
 +
 +You can create the following `layouts/partials/disqus.html`:
 +
- {{< code-toggle file="hugo" >}}
++{{< code file=layouts/partials/disqus.html >}}
 +<div id="disqus_thread"></div>
 +<script type="text/javascript">
 +
 +(function() {
 +    // Don't ever inject Disqus on localhost--it creates unwanted
 +    // discussions from 'localhost:1313' on your Disqus account...
 +    if (window.location.hostname == "localhost")
 +        return;
 +
 +    var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
 +    var disqus_shortname = '{{ .Site.Config.Services.Disqus.Shortname }}';
 +    dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
 +    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
 +})();
 +</script>
 +<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
 +<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
 +{{< /code >}}
 +
 +The `if` statement skips the initialization of the Disqus comment injection when you are running on `localhost`.
 +
 +You can then render your custom Disqus partial template as follows:
 +
 +```go-html-template
 +{{ partial "disqus.html" . }}
 +```
 +
 +## Open Graph
 +
 +An internal template for the [Open Graph protocol](https://ogp.me/), metadata that enables a page to become a rich object in a social graph.
 +This format is used for Facebook and some other sites.
 +
 +### Configure Open Graph
 +
 +Hugo's Open Graph template is configured using a mix of configuration variables and [front-matter](/content-management/front-matter/) on individual pages.
 +
- {{< code-toggle file="content/blog/my-post" >}}
++{{< code-toggle file=hugo >}}
 +[params]
 +  title = "My cool site"
 +  images = ["site-feature-image.jpg"]
 +  description = "Text about my cool site"
 +[taxonomies]
 +  series = "series"
 +{{</ code-toggle >}}
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle file=content/blog/my-post.md >}}
 +title = "Post title"
 +description = "Text about this post"
 +date = "2006-01-02"
 +images = ["post-cover.png"]
 +audio = []
 +videos = []
 +series = []
 +tags = []
 +{{</ code-toggle >}}
 +
 +Hugo uses the page title and description for the title and description metadata.
 +The first 6 URLs from the `images` array are used for image metadata.
 +If [page bundles](/content-management/page-bundles/) are used and the `images` array is empty or undefined, images with file names matching `*feature*` or `*cover*,*thumbnail*` are used for image metadata.
 +
 +Various optional metadata can also be set:
 +
 +- Date, published date, and last modified data are used to set the published time metadata if specified.
 +- `audio` and `videos` are URL arrays like `images` for the audio and video metadata tags, respectively.
 +- The first 6 `tags` on the page are used for the tags metadata.
 +- The `series` taxonomy is used to specify related "see also" pages by placing them in the same series.
 +
 +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`).
 +
 +### Use the Open Graph template
 +
 +To add Open Graph metadata, include the following line between the `<head>` tags in your templates:
 +
 +```go-html-template
 +{{ template "_internal/opengraph.html" . }}
 +```
 +
 +## Twitter Cards
 +
 +An internal template for [Twitter Cards](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards),
 +metadata used to attach rich media to Tweets linking to your site.
 +
 +### Configure Twitter Cards
 +
 +Hugo's Twitter Card template is configured using a mix of configuration variables and [front-matter](/content-management/front-matter/) on individual pages.
 +
- {{< code-toggle file="content/blog/my-post" >}}
++{{< code-toggle file=hugo >}}
 +[params]
 +  images = ["site-feature-image.jpg"]
 +  description = "Text about my cool site"
 +{{</ code-toggle >}}
 +
++{{< code-toggle file=content/blog/my-post.md >}}
 +title = "Post title"
 +description = "Text about this post"
 +images = ["post-cover.png"]
 +{{</ code-toggle >}}
 +
 +If `images` aren't specified in the page front-matter, then hugo searches for [image page resources](/content-management/image-processing/) with `feature`, `cover`, or `thumbnail` in their name.
 +If no image resources with those names are found, the images defined in the [site config](/getting-started/configuration/) are used instead.
 +If no images are found at all, then an image-less Twitter `summary` card is used instead of `summary_large_image`.
 +
 +Hugo uses the page title and description for the card's title and description fields. The page summary is used if no description is given.
 +
 +Set the value of `twitter:site` in your site configuration:
 +
 +{{< code-toggle file="hugo" copy=false >}}
 +[params.social]
 +twitter = "GoHugoIO"
 +{{</ code-toggle >}}
 +
 +NOTE: The `@` will be added for you
 +
 +```html
 +<meta name="twitter:site" content="@GoHugoIO"/>
 +```
 +
 +### Use the Twitter Cards template
 +
 +To add Twitter card metadata, include the following line immediately after the `<head>` element in your templates:
 +
 +```go-html-template
 +{{ template "_internal/twitter_cards.html" . }}
 +```
 +
 +## The internal templates
 +
 +The code for these templates is located [here](https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates).
 +
 +* `_internal/disqus.html`
 +* `_internal/google_analytics.html`
 +* `_internal/opengraph.html`
 +* `_internal/pagination.html`
 +* `_internal/schema.html`
 +* `_internal/twitter_cards.html`
 +
 +[disqus]: https://disqus.com
 +[disqussignup]: https://disqus.com/profile/signup/
index 2eb436f82270fbe74a046f225c179597bf570348,0000000000000000000000000000000000000000..7fb0ddecfb009d94e8f20fbf26ba85e9e30e12e1
mode 100644,000000..100644
--- /dev/null
@@@ -1,675 -1,0 +1,672 @@@
- categories: [fundamentals,templates]
 +---
 +title: Templating
 +linkTitle: Templating
 +description: Hugo uses Go's `html/template` and `text/template` libraries as the basis for the templating.
- aliases: [/layouts/introduction/,/layout/introduction/, /templates/go-templates/]
++categories: [templates,fundamentals]
 +keywords: [go]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 20
 +weight: 20
 +toc: true
++aliases: [/layouts/introduction/,/layout/introduction/, /templates/go-templates/]
 +---
 +
 +{{% note %}}
 +The following is only a primer on Go Templates. For an in-depth look into Go Templates, check the official [Go docs](https://golang.org/pkg/text/template/).
 +{{% /note %}}
 +
 +Go Templates provide an extremely simple template language that adheres to the belief that only the most basic of logic belongs in the template or view layer.
 +
 +## Basic syntax
 +
 +Go Templates are HTML files with the addition of [variables][variables] and [functions][functions]. Go Template variables and functions are accessible within `{{ }}`.
 +
 +### Access a predefined variable
 +
 +A _predefined variable_ could be a variable already existing in the
 +current scope (like the `.Title` example in the [Variables](#variables) section below) or a custom variable (like the
 +`$address` example in that same section).
 +
- a `Page`.  In the below example, `.Title` is one of the elements
 +```go-html-template
 +{{ .Title }}
 +{{ $address }}
 +```
 +
 +Parameters for functions are separated using spaces. The general syntax is:
 +
 +```go-html-template
 +{{ FUNCTION ARG1 ARG2 .. }}
 +```
 +
 +The following example calls the `add` function with inputs of `1` and `2`:
 +
 +```go-html-template
 +{{ add 1 2 }}
 +```
 +
 +#### Methods and fields are accessed via dot notation
 +
 +Accessing the Page Parameter `bar` defined in a piece of content's [front matter].
 +
 +```go-html-template
 +{{ .Params.bar }}
 +```
 +
 +#### Parentheses can be used to group items together
 +
 +```go-html-template
 +{{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }}
 +```
 +
 +#### A single statement can be split over multiple lines
 +
 +```go-html-template
 +{{ if or
 +  (isset .Params "alt")
 +  (isset .Params "caption")
 +}}
 +```
 +
 +#### Raw string literals can include newlines
 +
 +```go-html-template
 +{{ $msg := `Line one.
 +Line two.` }}
 +```
 +
 +## Variables
 +
 +Each Go Template gets a data object. In Hugo, each template is passed
-    {{ $elem_index }} -- {{ $elem_val }}
++a `Page`. In the below example, `.Title` is one of the elements
 +accessible in that [`Page` variable][pagevars].
 +
 +With the `Page` being the default scope of a template, the `Title`
 +element in current scope (`.` -- "the **dot**") is accessible simply
 +by the dot-prefix (`.Title`):
 +
 +```go-html-template
 +<title>{{ .Title }}</title>
 +```
 +
 +Values can also be stored in custom variables and referenced later:
 +
 +{{% note %}}
 +The custom variables need to be prefixed with `$`.
 +{{% /note %}}
 +
 +```go-html-template
 +{{ $address := "123 Main St." }}
 +{{ $address }}
 +```
 +
 +Variables can be re-defined using the `=` operator. The example below
 +prints "Var is Hugo Home" on the home page, and "Var is Hugo Page" on
 +all other pages:
 +
 +```go-html-template
 +{{ $var := "Hugo Page" }}
 +{{ if .IsHome }}
 +    {{ $var = "Hugo Home" }}
 +{{ end }}
 +Var is {{ $var }}
 +```
 +
 +Variable names must conform to Go's naming rules for [identifiers][identifier].
 +
 +## Functions
 +
 +Go Templates only ship with a few basic functions but also provide a mechanism for applications to extend the original set.
 +
 +[Hugo template functions][functions] provide additional functionality specific to building websites. Functions are called by using their name followed by the required parameters separated by spaces. Template functions cannot be added without recompiling Hugo.
 +
 +### Example 1: adding numbers
 +
 +```go-html-template
 +{{ add 1 2 }}
 +<!-- prints 3 -->
 +```
 +
 +### Example 2: comparing numbers
 +
 +```go-html-template
 +{{ lt 1 2 }}
 +<!-- prints true (i.e., since 1 is less than 2) -->
 +```
 +
 +Note that both examples make use of Go Template's [math][math] functions.
 +
 +{{% note %}}
 +There are more boolean operators than those listed in the Hugo docs in the [Go Template documentation](https://golang.org/pkg/text/template/#hdr-Functions).
 +{{% /note %}}
 +
 +## Includes
 +
 +When including another template, you will need to pass it the data that it would
 +need to access.
 +
 +{{% note %}}
 +To pass along the current context, please remember to include a trailing **dot**.
 +{{% /note %}}
 +
 +The templates location will always be starting at the `layouts/` directory
 +within Hugo.
 +
 +### Partial
 +
 +The [`partial`][partials] function is used to include _partial_ templates using
 +the syntax `{{ partial "<PATH>/<PARTIAL>.<EXTENSION>" . }}`.
 +
 +Example of including a `layouts/partials/header.html` partial:
 +
 +```go-html-template
 +{{ partial "header.html" . }}
 +```
 +
 +### Template
 +
 +The `template` function was used to include _partial_ templates
 +in much older Hugo versions. Now it's useful only for calling
 +[_internal_ templates][internal templates]. The syntax is `{{ template
 +"_internal/<TEMPLATE>.<EXTENSION>" . }}`.
 +
 +{{% note %}}
 +The available **internal** templates can be found
 +[here](https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates).
 +{{% /note %}}
 +
 +Example of including the internal `opengraph.html` template:
 +
 +```go-html-template
 +{{ template "_internal/opengraph.html" . }}
 +```
 +
 +## Logic
 +
 +Go Templates provide the most basic iteration and conditional logic.
 +
 +### Iteration
 +
 +The Go Templates make heavy use of `range` to iterate over a _map_,
 +_array_, or _slice_. The following are different examples of how to
 +use `range`.
 +
 +#### Example 1: using context (`.`)
 +
 +```go-html-template
 +{{ range $array }}
 +    {{ . }} <!-- The . represents an element in $array -->
 +{{ end }}
 +```
 +
 +#### Example 2: declaring a variable name for an array element's value
 +
 +```go-html-template
 +{{ range $elem_val := $array }}
 +    {{ $elem_val }}
 +{{ end }}
 +```
 +
 +#### Example 3: declaring variable names for an array element's index _and_ value
 +
 +For an array or slice, the first declared variable will map to each
 +element's index.
 +
 +```go-html-template
 +{{ range $elem_index, $elem_val := $array }}
-    {{ $elem_key }} -- {{ $elem_val }}
++  {{ $elem_index }} -- {{ $elem_val }}
 +{{ end }}
 +```
 +
 +#### Example 4: declaring variable names for a map element's key _and_ value
 +
 +For a map, the first declared variable will map to each map element's
 +key.
 +
 +```go-html-template
 +{{ range $elem_key, $elem_val := $map }}
++  {{ $elem_key }} -- {{ $elem_val }}
 +{{ end }}
 +```
 +
 +#### Example 5: conditional on empty _map_, _array_, or _slice_
 +
 +If the _map_, _array_, or _slice_ passed into the range is zero-length then the else statement is evaluated.
 +
 +```go-html-template
 +{{ range $array }}
 +    {{ . }}
 +{{ else }}
 +    <!-- This is only evaluated if $array is empty -->
 +{{ end }}
 +```
 +
 +### Conditionals
 +
 +`if`, `else`, `with`, `or`, `and` and `not` provide the framework for handling conditional logic in Go Templates. Like `range`, `if` and `with` statements are closed with an `{{ end }}`.
 +
 +Go Templates treat the following values as **false**:
 +
 +- `false` (boolean)
 +- 0 (integer)
 +- any zero-length array, slice, map, or string
 +
 +#### Example 1: `with`
 +
 +It is common to write "if something exists, do this" kind of
 +statements using `with`.
 +
 +{{% note %}}
 +`with` rebinds the context `.` within its scope (just like in `range`).
 +{{% /note %}}
 +
 +It skips the block if the variable is absent, or if it evaluates to
 +"false" as explained above.
 +
 +```go-html-template
 +{{ with .Params.title }}
 +    <h4>{{ . }}</h4>
 +{{ end }}
 +```
 +
 +#### Example 2: `with` .. `else`
 +
 +Below snippet uses the "description" front-matter parameter's value if
 +set, else uses the default `.Summary` [Page variable][pagevars]:
 +
 +```go-html-template
 +{{ with .Param "description" }}
 +    {{ . }}
 +{{ else }}
 +    {{ .Summary }}
 +{{ end }}
 +```
 +
 +See the [`.Param` function][param].
 +
 +#### Example 3: `if`
 +
 +An alternative (and a more verbose) way of writing `with` is using
 +`if`. Here, the `.` does not get rebound.
 +
 +Below example is "Example 1" rewritten using `if`:
 +
 +```go-html-template
 +{{ if isset .Params "title" }}
 +    <h4>{{ index .Params "title" }}</h4>
 +{{ end }}
 +```
 +
 +#### Example 4: `if` .. `else`
 +
 +Below example is "Example 2" rewritten using `if` .. `else`, and using
 +[`isset`] + `.Params` variable (different from the
 +[`.Param` **function**][param]) instead:
 +
 +```go-html-template
 +{{ if (isset .Params "description") }}
 +    {{ index .Params "description" }}
 +{{ else }}
 +    {{ .Summary }}
 +{{ end }}
 +```
 +
 +#### Example 5: `if` .. `else if` .. `else`
 +
 +Unlike `with`, `if` can contain `else if` clauses too.
 +
 +```go-html-template
 +{{ if (isset .Params "description") }}
 +    {{ index .Params "description" }}
 +{{ else if (isset .Params "summary") }}
 +    {{ index .Params "summary" }}
 +{{ else }}
 +    {{ .Summary }}
 +{{ end }}
 +```
 +
 +#### Example 6: `and` & `or`
 +
 +```go-html-template
 +{{ if (and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")) }}
 +```
 +
 +## Pipes
 +
 +One of the most powerful components of Go Templates is the ability to stack actions one after another. This is done by using pipes. Borrowed from Unix pipes, the concept is simple: each pipeline's output becomes the input of the following pipe.
 +
 +Because of the very simple syntax of Go Templates, the pipe is essential to being able to chain together function calls. One limitation of the pipes is that they can only work with a single value and that value becomes the last parameter of the next pipeline.
 +
 +A few simple examples should help convey how to use the pipe.
 +
 +### Example 1: `shuffle`
 +
 +The following two examples are functionally the same:
 +
 +```go-html-template
 +{{ shuffle (seq 1 5) }}
 +```
 +
- {{< code file="tags-range-with-page-variable.html" >}}
 +```go-html-template
 +{{ (seq 1 5) | shuffle }}
 +```
 +
 +### Example 2: `index`
 +
 +The following accesses the page parameter called "disqus_url" and escapes the HTML. This example also uses the [`index`] function, which is built into Go Templates:
 +
 +```go-html-template
 +{{ index .Params "disqus_url" | html }}
 +```
 +
 +### Example 3: `or` with `isset`
 +
 +```go-html-template
 +{{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr") }}
 +Stuff Here
 +{{ end }}
 +```
 +
 +Could be rewritten as
 +
 +```go-html-template
 +{{ if isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" }}
 +Stuff Here
 +{{ end }}
 +```
 +
 +## Context (aka "the dot") {#the-dot}
 +
 +The most easily overlooked concept to understand about Go Templates is
 +that `{{ . }}` always refers to the **current context**.
 +
 +- In the top level of your template, this will be the data set made
 +  available to it.
 +- Inside an iteration, however, it will have the value of the
 +  current item in the loop; i.e., `{{ . }}` will no longer refer to
 +  the data available to the entire page.
 +
 +If you need to access page-level data (e.g., page parameters set in front
 +matter) from within the loop, you will likely want to do one of the
 +following:
 +
 +### 1. Define a variable independent of context
 +
 +The following shows how to define a variable independent of the context.
 +
- {{< code file="range-through-tags-w-global.html" >}}
++{{< code file=tags-range-with-page-variable.html >}}
 +{{ $title := .Site.Title }}
 +<ul>
 +{{ range .Params.tags }}
 +    <li>
 +        <a href="/tags/{{ . | urlize }}">{{ . }}</a>
 +        - {{ $title }}
 +    </li>
 +{{ end }}
 +</ul>
 +{{< /code >}}
 +
 +{{% note %}}
 +Notice how once we have entered the loop (i.e. `range`), the value of `{{ . }}` has changed. We have defined a variable outside the loop (`{{ $title }}`) that we've assigned a value so that we have access to the value from within the loop as well.
 +{{% /note %}}
 +
 +### 2. Use `$.` to access the global context
 +
 +`$` has special significance in your templates. `$` is set to the starting value of `.` ("the dot") by default. This is a [documented feature of Go text/template][dotdoc]. This means you have access to the global context from anywhere. Here is an equivalent example of the preceding code block but now using `$` to grab `.Site.Title` from the global context:
 +
- {{% warning "Don't Redefine the Dot" %}}
++{{< code file=range-through-tags-w-global.html >}}
 +<ul>
 +{{ range .Params.tags }}
 +  <li>
 +    <a href="/tags/{{ . | urlize }}">{{ . }}</a>
 +            - {{ $.Site.Title }}
 +  </li>
 +{{ end }}
 +</ul>
 +{{< /code >}}
 +
- * <kbd>space</kbd>
- * horizontal <kbd>tab</kbd>
- * carriage <kbd>return</kbd>
++{{% note %}}
 +The built-in magic of `$` would cease to work if someone were to mischievously redefine the special character; e.g. `{{ $ := .Site }}`. *Don't do it.* You may, of course, recover from this mischief by using `{{ $ := . }}` in a global context to reset `$` to its default value.
 +{{% /note %}}
 +
 +## Whitespace
 +
 +Go 1.6 includes the ability to trim the whitespace from either side of a Go tag by including a hyphen (`-`) and space immediately beside the corresponding `{{` or `}}` delimiter.
 +
 +For instance, the following Go Template will include the newlines and horizontal tab in its HTML output:
 +
 +```go-html-template
 +<div>
 +  {{ .Title }}
 +</div>
 +```
 +
 +Which will output:
 +
 +```html
 +<div>
 +  Hello, World!
 +</div>
 +```
 +
 +Leveraging the `-` in the following example will remove the extra white space surrounding the `.Title` variable and remove the newline:
 +
 +```go-html-template
 +<div>
 +  {{- .Title -}}
 +</div>
 +```
 +
 +Which then outputs:
 +
 +```html
 +<div>Hello, World!</div>
 +```
 +
 +Go considers the following characters _whitespace_:
 +
- {{< code-toggle file="content/example.md" fm=true copy=false >}}
++* space
++* horizontal tab
++* carriage return
 +* newline
 +
 +## Comments
 +
 +In order to keep your templates organized and share information throughout your team, you may want to add comments to your templates. There are two ways to do that with Hugo.
 +
 +### Go templates comments
 +
 +Go Templates support `{{/*` and `*/}}` to open and close a comment block. Nothing within that block will be rendered.
 +
 +For example:
 +
 +```go-html-template
 +Bonsoir, {{/* {{ add 0 + 2 }} */}}Eliott.
 +```
 +
 +Will render `Bonsoir, Eliott.`, and not care about the syntax error (`add 0 + 2`) in the comment block.
 +
 +### HTML comments
 +
 +You can add html comments by piping a string HTML code comment to `safeHTML`.
 +
 +For example:
 +
 +```go-html-template
 +{{ "<!-- This is an HTML comment -->" | safeHTML }}
 +```
 +
 +If you need variables to construct such HTML comments, just pipe `printf` to `safeHTML`.
 +
 +For example:
 +
 +```go-html-template
 +{{ printf "<!-- Our website is named: %s -->" .Site.Title | safeHTML }}
 +```
 +
 +#### HTML comments containing Go templates
 +
 +HTML comments are by default stripped, but their content is still evaluated. That means that although the HTML comment will never render any content to the final HTML pages, code contained within the comment may fail the build process.
 +
 +{{% note %}}
 +Do **not** try to comment out Go Template code using HTML comments.
 +{{% /note %}}
 +
 +```go-html-template
 +<!-- {{ $author := "Emma Goldman" }} was a great woman. -->
 +{{ $author }}
 +```
 +
 +The templating engine will strip the content within the HTML comment, but will first evaluate any Go Template code if present within. So the above example will render `Emma Goldman`, as the `$author` variable got evaluated in the HTML comment. But the build would have failed if that code in the HTML comment had an error.
 +
 +## Hugo parameters
 +
 +Hugo provides the option of passing values to your template layer through your [site configuration][config] (i.e. for site-wide values) or through the metadata of each specific piece of content (i.e. the [front matter]). You can define any values of any type and use them however you want in your templates, as long as the values are supported by the [front matter format](/content-management/front-matter#front-matter-formats).
 +
 +## Use content (`Page`) parameters
 +
 +You can provide variables to be used by templates in individual content's [front matter].
 +
 +An example of this is used in the Hugo docs. Most of the pages benefit from having the table of contents provided, but sometimes the table of contents doesn't make a lot of sense. We've defined a `notoc` variable in our front matter that will prevent a table of contents from rendering when specifically set to `true`.
 +
 +Here is the example front matter:
 +
- {{< code file="layouts/partials/toc.html" >}}
++{{< code-toggle file=content/example.md fm=true >}}
 +title: Example
 +notoc: true
 +{{< /code-toggle >}}
 +
 +Here is an example of corresponding code that could be used inside a `toc.html` [partial template][partials]:
 +
- {{< code-toggle file="hugo" >}}
++{{< code file=layouts/partials/toc.html >}}
 +{{ if not .Params.notoc }}
 +<aside>
 +  <header>
 +    <a href="#{{ .Title | urlize }}">
 +    <h3>{{ .Title }}</h3>
 +    </a>
 +  </header>
 +  {{ .TableOfContents }}
 +</aside>
 +<a href="#" id="toc-toggle"></a>
 +{{ end }}
 +{{< /code >}}
 +
 +We want the *default* behavior to be for pages to include a TOC unless otherwise specified. This template checks to make sure that the `notoc:` field in this page's front matter is not `true`.
 +
 +## Use site configuration parameters
 +
 +You can arbitrarily define as many site-level parameters as you want in your [site's configuration file][config]. These parameters are globally available in your templates.
 +
 +For instance, you might declare the following:
 +
- {{< code file="layouts/partials/twitter.html" >}}
++{{< code-toggle file=hugo >}}
 +params:
 +  copyrighthtml: "Copyright &#xA9; 2017 John Doe. All Rights Reserved."
 +  twitteruser: "spf13"
 +  sidebarrecentlimit: 5
 +{{< /code >}}
 +
 +Within a footer layout, you might then declare a `<footer>` that is only rendered if the `copyrighthtml` parameter is provided. If it *is* provided, you will then need to declare the string is safe to use via the [`safeHTML`] function so that the HTML entity is not escaped again. This would let you easily update just your top-level configuration file each January 1st, instead of hunting through your templates.
 +
 +```go-html-template
 +{{ if .Site.Params.copyrighthtml }}
 +    <footer>
 +        <div class="text-center">{{ .Site.Params.CopyrightHTML | safeHTML }}</div>
 +    </footer>
 +{{ end }}
 +```
 +
 +An alternative way of writing the "`if`" and then referencing the same value is to use [`with`] instead. `with` rebinds the context (`.`) within its scope and skips the block if the variable is absent:
 +
-       <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
++{{< code file=layouts/partials/twitter.html >}}
 +{{ with .Site.Params.twitteruser }}
 +    <div>
 +        <a href="https://twitter.com/{{ . }}" rel="author">
 +        <img src="/images/twitter.png" width="48" height="48" title="Twitter: {{ . }}" alt="Twitter"></a>
 +    </div>
 +{{ end }}
 +{{< /code >}}
 +
 +Finally, you can pull "magic constants" out of your layouts as well. The following uses the [`first`] function, as well as the [`.RelPermalink`][relpermalink] page variable and the [`.Site.Pages`][sitevars] site variable.
 +
 +```go-html-template
 +<nav>
 +  <h1>Recent Posts</h1>
 +  <ul>
 +  {{- range first .Site.Params.SidebarRecentLimit .Site.Pages -}}
- {{< code-toggle file="content/events/event-1.md" copy=false >}}
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
 +  {{- end -}}
 +  </ul>
 +</nav>
 +```
 +
 +## Example: show future events
 +
 +Given the following content structure and [front matter]:
 +
 +```text
 +content/
 +└── events/
 +    ├── event-1.md
 +    ├── event-2.md
 +    └── event-3.md
 +```
 +
- {{< code file="layouts/partials/future-events.html" >}}
++{{< code-toggle file=content/events/event-1.md >}}
 +title = 'Event 1'
 +date = 2021-12-06T10:37:16-08:00
 +draft = false
 +start_date = 2021-12-05T09:00:00-08:00
 +end_date = 2021-12-05T11:00:00-08:00
 +{{< /code-toggle >}}
 +
 +This [partial template][partials] renders future events:
 +
- {{< code file="layouts/partials/future-events.html" >}}
++{{< code file=layouts/partials/future-events.html >}}
 +<h2>Future Events</h2>
 +<ul>
 +  {{ range where site.RegularPages "Type" "events" }}
 +    {{ if gt (.Params.start_date | time.AsTime) now }}
 +      {{ $startDate := .Params.start_date | time.Format ":date_medium" }}
 +      <li>
 +        <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> - {{ $startDate }}
 +      </li>
 +    {{ end }}
 +  {{ end }}
 +</ul>
 +{{< /code >}}
 +
 +If you restrict front matter to the TOML format, and omit quotation marks surrounding date fields, you can perform date comparisons without casting.
 +
- [param]: /functions/param
++{{< code file=layouts/partials/future-events.html >}}
 +<h2>Future Events</h2>
 +<ul>
 +  {{ range where (where site.RegularPages "Type" "events") "Params.start_date" "gt" now }}
 +    {{ $startDate := .Params.start_date | time.Format ":date_medium" }}
 +    <li>
 +      <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> - {{ $startDate }}
 +    </li>
 +  {{ end }}
 +</ul>
 +{{< /code >}}
 +
 +[`first`]: /functions/collections/first
 +[`index`]: /functions/collections/indexfunction
 +[`isset`]: /functions/collections/isset
 +[config]: /getting-started/configuration
 +[dotdoc]: https://golang.org/pkg/text/template/#hdr-Variables
 +[front matter]: /content-management/front-matter
 +[functions]: /functions
 +[identifier]: /getting-started/glossary/#identifier
 +[internal templates]: /templates/internal
 +[math]: /functions/math
 +[pagevars]: /variables/page
- [relpermalink]: /variables/page#page-variables
++[param]: /methods/page/param
 +[partials]: /templates/partials
++[relpermalink]: /variables/page
 +[`safehtml`]: /functions/safe/html
 +[sitevars]: /variables/site
 +[variables]: /variables
 +[`with`]: /functions/go-template/with
index b48969e96bef5bdc3ddd92e5461f054bc7107b94,0000000000000000000000000000000000000000..c26174974e9aaee030f441dba88c65292c829f06
mode 100644,000000..100644
--- /dev/null
@@@ -1,597 -1,0 +1,252 @@@
- aliases: [/templates/list/,/layout/indexes/]
 +---
 +title: Lists of content in Hugo
 +linkTitle: List templates
 +description: Lists have a specific meaning and usage in Hugo when it comes to rendering your site homepage, section page, taxonomy list, or taxonomy terms list.
 +categories: [templates]
 +keywords: [lists,sections,rss,taxonomies,terms]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 60
 +weight: 60
- {{< code file="content/posts/_index.md" >}}
 +toc: true
++aliases: [/templates/list/,/layout/indexes/]
 +---
 +
 +## What is a list page template?
 +
 +{{< youtube 8b2YTSMdMps >}}
 +
 +A list page template is a template used to render multiple pieces of content in a single HTML page. The exception to this rule is the homepage, which is still a list but has its own [dedicated template][homepage].
 +
 +Hugo uses the term *list* in its truest sense; i.e. a sequential arrangement of material, especially in alphabetical or numerical order. Hugo uses list templates on any output HTML page where content is traditionally listed:
 +
 +* [Home page](/templates/homepage)
 +* [Section pages](/templates/section-templates)
 +* [Taxonomy pages](/templates/taxonomy-templates)
 +* [Taxonomy term pages](/templates/taxonomy-templates)
 +* [RSS feeds](/templates/rss)
 +* [Sitemaps](/templates/sitemap-template)
 +
 +For template lookup order, see [Template Lookup](/templates/lookup-order/).
 +
 +The idea of a list page comes from the [hierarchical mental model of the web][mentalmodel] and is best demonstrated visually:
 +
 +[![Image demonstrating a hierarchical website sitemap.](site-hierarchy.svg)](site-hierarchy.svg)
 +
 +## List defaults
 +
 +### Default templates
 +
 +Since section lists and taxonomy lists (N.B., *not* [taxonomy terms lists][taxterms]) are both *lists* with regards to their templates, both have the same terminating default of `_default/list.html` or `themes/<THEME>/layouts/_default/list.html` in their lookup order. In addition, both [section lists][sectiontemps] and [taxonomy lists][taxlists] have their own default list templates in `_default`.
 +
 +See [Template Lookup Order](/templates/lookup-order/) for the complete reference.
 +
 +## Add content and front matter to list pages
 +
 +Since v0.18, [everything in Hugo is a `Page`][bepsays]. This means list pages and the homepage can have associated content files (i.e. `_index.md`) that contain page metadata (i.e., front matter) and content.
 +
 +This new model allows you to include list-specific front matter via `.Params` and also means that list templates (e.g., `layouts/_default/list.html`) have access to all [page variables][pagevars].
 +
 +{{% note %}}
 +It is important to note that all `_index.md` content files will render according to a *list* template and not according to a [single page template](/templates/single-page-templates/).
 +{{% /note %}}
 +
 +### Example project directory
 +
 +The following is an example of a typical Hugo project directory's content:
 +
 +```txt
 +.
 +...
 +├── content
 +|   ├── posts
 +|   |   ├── _index.md
 +|   |   ├── post-01.md
 +|   |   └── post-02.md
 +|   └── quote
 +|   |   ├── quote-01.md
 +|   |   └── quote-02.md
 +...
 +```
 +
 +Using the above example, let's assume you have the following in `content/posts/_index.md`:
 +
- {{< code file="layouts/_default/list.html" >}}
++{{< code file=content/posts/_index.md >}}
 +---
 +title: My Go Journey
 +date: 2017-03-23
 +publishdate: 2017-03-24
 +---
 +
 +I decided to start learning Go in March 2017.
 +
 +Follow my journey through this new blog.
 +{{< /code >}}
 +
 +You can now access this `_index.md`'s' content in your list template:
 +
-           <a href="{{ .Permalink }}">{{ .Date.Format "2006-01-02" }} | {{ .Title }}</a>
++{{< code file=layouts/_default/list.html >}}
 +{{ define "main" }}
 +  <main>
 +    <article>
 +      <header>
 +        <h1>{{ .Title }}</h1>
 +      </header>
 +      <!-- "{{ .Content }}" pulls from the markdown content of the corresponding _index.md -->
 +      {{ .Content }}
 +    </article>
 +    <ul>
 +      <!-- Ranges through content/posts/*.md -->
 +      {{ range .Pages }}
 +        <li>
- {{< code file="example.com/posts/index.html" copy=false >}}
++          <a href="{{ .RelPermalink }}">{{ .Date.Format "2006-01-02" }} | {{ .LinkTitle }}</a>
 +        </li>
 +      {{ end }}
 +    </ul>
 +  </main>
 +{{ end }}
 +{{< /code >}}
 +
 +This above will output the following HTML:
 +
- {{< code file="example.com/quote/index.html" copy=false >}}
++{{< code file=example.com/posts/index.html >}}
 +<!--top of your baseof code-->
 +<main>
 +  <article>
 +    <header>
 +      <h1>My Go Journey</h1>
 +    </header>
 +    <p>I decided to start learning Go in March 2017.</p>
 +    <p>Follow my journey through this new blog.</p>
 +  </article>
 +  <ul>
 +    <li><a href="/posts/post-01/">Post 1</a></li>
 +    <li><a href="/posts/post-02/">Post 2</a></li>
 +  </ul>
 +</main>
 +<!--bottom of your baseof-->
 +{{< /code >}}
 +
 +### List pages without `_index.md`
 +
 +You do *not* have to create an `_index.md` file for every list page (i.e. section, taxonomy, taxonomy terms, etc) or the homepage. If Hugo does not find an `_index.md` within the respective content section when rendering a list template, the page will be created but with no `{{ .Content }}` and only the default values for `.Title` etc.
 +
 +Using this same `layouts/_default/list.html` template and applying it to the `quotes` section above will render the following output. Note that `quotes` does not have an `_index.md` file to pull from:
 +
-     <li><a href="https://example.com/quote/quotes-01/">Quote 1</a></li>
-     <li><a href="https://example.com/quote/quotes-02/">Quote 2</a></li>
++{{< code file=example.com/quote/index.html >}}
 +<!--baseof-->
 +<main>
 +  <article>
 +    <header>
 +      <!-- Hugo assumes that .Title is the name of the section since there is no _index.md content file from which to pull a "title:" field -->
 +      <h1>Quotes</h1>
 +    </header>
 +  </article>
 +  <ul>
- {{< code file="layouts/section/posts.html" >}}
++    <li><a href="https://example.org/quote/quotes-01/">Quote 1</a></li>
++    <li><a href="https://example.org/quote/quotes-02/">Quote 2</a></li>
 +  </ul>
 +</main>
 +<!--baseof-->
 +{{< /code >}}
 +
 +{{% note %}}
 +The default behavior of Hugo is to pluralize list titles; hence the inflection of the `quote` section to "Quotes" when called with the `.Title` [page variable](/variables/page/). You can change this via the `pluralizeListTitles` directive in your [site configuration](/getting-started/configuration/).
 +{{% /note %}}
 +
 +## Example list templates
 +
 +### Section template
 +
 +This list template has been modified slightly from a template originally used in [spf13.com](https://spf13.com/). It makes use of [partial templates][partials] for the chrome of the rendered page rather than using a [base template][base]. The examples that follow also use the [content view templates][views] `li.html` or `summary.html`.
 +
- {{< code file="layouts/_default/taxonomy.html" >}}
++{{< code file=layouts/section/posts.html >}}
 +{{ partial "header.html" . }}
 +{{ partial "subheader.html" . }}
 +<main>
 +  <div>
 +    <h1>{{ .Title }}</h1>
 +    <ul>
 +      <!-- Renders the li.html content view for each content/posts/*.md -->
 +      {{ range .Pages }}
 +        {{ .Render "li" }}
 +      {{ end }}
 +    </ul>
 +  </div>
 +</main>
 +{{ partial "footer.html" . }}
 +{{< /code >}}
 +
 +### Taxonomy template
 +
- ## Order content
- Hugo lists render the content based on metadata you provide in [front matter]. In addition to sane defaults, Hugo also ships with multiple methods to make quick work of ordering content inside list templates:
- ### Default: Weight > Date > LinkTitle > FilePath
- {{< code file="layouts/partials/default-order.html" >}}
- <ul>
-   {{ range .Pages }}
-     <li>
-       <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
-       <time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
-     </li>
-   {{ end }}
- </ul>
- {{< /code >}}
- ### By weight
- Lower weight gets higher precedence. So content with lower weight will come first.
++{{< code file=layouts/_default/taxonomy.html >}}
 +{{ define "main" }}
 +<main>
 +  <div>
 +    <h1>{{ .Title }}</h1>
 +    <!-- ranges through each of the content files associated with a particular taxonomy term and renders the summary.html content view -->
 +    {{ range .Pages }}
 +      {{ .Render "summary" }}
 +    {{ end }}
 +  </div>
 +</main>
 +{{ end }}
 +{{< /code >}}
 +
- {{< code file="layouts/partials/by-weight.html" >}}
- <ul>
-   {{ range .Pages.ByWeight }}
-     <li>
-       <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
-       <time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
-     </li>
-   {{ end }}
- </ul>
- {{< /code >}}
- ### By date
- {{< code file="layouts/partials/by-date.html" >}}
- <ul>
-   <!-- orders content according to the "date" field in front matter -->
-   {{ range .Pages.ByDate }}
-     <li>
-       <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
-       <time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
-     </li>
-   {{ end }}
- </ul>
- {{< /code >}}
++## Sort content
 +
- ### By publish date
- {{< code file="layouts/partials/by-publish-date.html" >}}
- <ul>
-   <!-- orders content according to the "publishdate" field in front matter -->
-   {{ range .Pages.ByPublishDate }}
-     <li>
-       <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
-       <time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
-     </li>
-   {{ end }}
- </ul>
- {{< /code >}}
++By default, Hugo sorts page collections by:
 +
- ### By expiration date
- {{< code file="layouts/partials/by-expiry-date.html" >}}
- <ul>
-   {{ range .Pages.ByExpiryDate }}
-     <li>
-       <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
-       <time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
-     </li>
-   {{ end }}
- </ul>
- {{< /code >}}
++1. Page [weight]
++2. Page [date] (descending)
++3. Page [linkTitle], falling back to page [title]
++4. Page file path if the page is backed by a file
 +
- ### By last modified date
- {{< code file="layouts/partials/by-last-mod.html" >}}
- <ul>
-   <!-- orders content according to the "lastmod" field in front matter -->
-   {{ range .Pages.ByLastmod }}
-     <li>
-       <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
-       <time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
-     </li>
-   {{ end }}
- </ul>
- {{< /code >}}
++[date]: /methods/page/date
++[weight]: /methods/page/weight
++[linkTitle]: /methods/page/linktitle
++[title]: /methods/page/title
 +
- ### By length
- {{< code file="layouts/partials/by-length.html" >}}
- <ul>
-   <!-- orders content according to content length in ascending order (i.e., the shortest content will be listed first) -->
-   {{ range .Pages.ByLength }}
-     <li>
-       <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
-       <time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
-     </li>
-   {{ end }}
- </ul>
- {{< /code >}}
- ### By title
- {{< code file="layouts/partials/by-title.html" >}}
- <ul>
-   <!-- ranges through content in ascending order according to the "title" field set in front matter -->
-   {{ range .Pages.ByTitle }}
-     <li>
-       <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
-       <time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
-     </li>
-   {{ end }}
- </ul>
- {{< /code >}}
- ### By link title
- {{< code file="layouts/partials/by-link-title.html" >}}
- <ul>
-   <!-- ranges through content in ascending order according to the "linktitle" field in front matter. If a "linktitle" field is not set, the range will start with content that only has a "title" field and use that value for .LinkTitle -->
-   {{ range .Pages.ByLinkTitle }}
-     <li>
-       <h1><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></h1>
-       <time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
-     </li>
-   {{ end }}
- </ul>
- {{< /code >}}
- ### By page parameter
- Order based on the specified front matter parameter. Content that does not have the specified front matter field  will use the site's `.Site.Params` default. If the parameter is not found at all in some entries, those entries will appear together at the end of the ordering.
- {{< code file="layouts/partials/by-rating.html" >}}
- <!-- Ranges through content according to the "rating" field set in front matter -->
- {{ range (.Pages.ByParam "rating") }}
-   <!-- ... -->
- {{ end }}
- {{< /code >}}
- If the targeted front matter field is nested beneath another field, you can access the field using dot notation.
- {{< code file="layouts/partials/by-nested-param.html" >}}
- {{ range (.Pages.ByParam "author.last_name") }}
-   <!-- ... -->
- {{ end }}
- {{< /code >}}
- ### Reverse order
- Reversing order can be applied to any of the above methods. The following uses `ByDate` as an example:
- {{< code file="layouts/partials/by-date-reverse.html" >}}
- <ul>
-   {{ range .Pages.ByDate.Reverse }}
-     <li>
-       <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
-       <time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
-     </li>
-   {{ end }}
- </ul>
- {{< /code >}}
++Change the sort order using any of the methods below.
 +
- Hugo provides some functions for grouping pages by Section, Type, Date, etc.
- ### By page field
- {{< code file="layouts/partials/by-page-field.html" >}}
- <!-- Groups content according to content section. The ".Key" in this instance will be the section's title. -->
- {{ range .Pages.GroupBy "Section" }}
-   <h3>{{ .Key }}</h3>
-   <ul>
-     {{ range .Pages }}
-       <li>
-         <a href="{{ .Permalink }}">{{ .Title }}</a>
-         <div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
-       </li>
-     {{ end }}
-   </ul>
- {{ end }}
- {{< /code >}}
- In the above example, you may want `{{ .Title }}` to point the `title` field you have added to your `_index.md` file instead. You can access this value using the [`.GetPage` function][getpage]:
- {{< code file="layouts/partials/by-page-field.html" >}}
- <!-- Groups content according to content section.-->
- {{ range .Pages.GroupBy "Section" }}
-   <!-- Checks for existence of _index.md for a section; if available, pulls from "title" in front matter -->
-   {{ with $.Site.GetPage "section" .Key }}
-     <h3>{{ .Title }}</h3>
-   {{ else }}
-     <!-- If no _index.md is available, ".Key" defaults to the section title and filters to title casing -->
-     <h3>{{ .Key | title }}</h3>
-   {{ end }}
-   <ul>
-     {{ range .Pages }}
-       <li>
-         <a href="{{ .Permalink }}">{{ .Title }}</a>
-         <div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
-       </li>
-     {{ end }}
-   </ul>
- {{ end }}
- {{< /code >}}
- ### By date
++{{< list-pages-in-section path=/methods/pages filter=methods_pages_sort filterType=include titlePrefix=. omitElementIDs=true >}}
 +
 +## Group content
 +
- {{< code file="layouts/partials/by-page-date.html" >}}
- <!-- Groups content by month according to the "date" field in front matter -->
- {{ range .Pages.GroupByDate "2006-01" }}
-   <h3>{{ .Key }}</h3>
-   <ul>
-     {{ range .Pages }}
-       <li>
-         <a href="{{ .Permalink }}">{{ .Title }}</a>
-         <div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
-       </li>
-     {{ end }}
-   </ul>
- {{ end }}
- {{< /code >}}
- {{< new-in "0.97.0" >}} `GroupByDate` accepts the same time layouts as in [`time.Format`] and the `.Key` in the result will be localized for the current language.
- ### By publish date
- {{< code file="layouts/partials/by-page-publish-date.html" >}}
- <!-- Groups content by month according to the "publishDate" field in front matter -->
- {{ range .Pages.GroupByPublishDate "2006-01" }}
-   <h3>{{ .Key }}</h3>
-   <ul>
-     {{ range .Pages }}
-       <li>
-         <a href="{{ .Permalink }}">{{ .Title }}</a>
-         <div class="meta">{{ .PublishDate.Format "Mon, Jan 2, 2006" }}</div>
-       </li>
-     {{ end }}
-   </ul>
- {{ end }}
- {{< /code >}}
- {{< new-in "0.97.0" >}} `GroupByDate` accepts the same time layouts as in [`time.Format`] and the `.Key` in the result will be localized for the current language.
- ### By expiration date
- {{< code file="layouts/partials/by-page-expiry-date.html" >}}
- <!-- Groups content by month according to the "expiryDate" field in front matter -->
- {{ range .Pages.GroupByExpiryDate "2006-01" }}
-   <h3>{{ .Key }}</h3>
-   <ul>
-     {{ range .Pages }}
-       <li>
-         <a href="{{ .Permalink }}">{{ .Title }}</a>
-         <div class="meta">{{ .ExpiryDate.Format "Mon, Jan 2, 2006" }}</div>
-       </li>
-     {{ end }}
-   </ul>
- {{ end }}
- {{< /code >}}
- {{< new-in "0.97.0" >}} `GroupByDate` accepts the same time layouts as in [`time.Format`] and the `.Key` in the result will be localized for the current language.
- ### By last modified date
- {{< code file="layouts/partials/by-page-lastmod.html" >}}
- <!-- Groups content by month according to the "lastMod" field in front matter -->
- {{ range .Pages.GroupByLastmod "2006-01" }}
-   <h3>{{ .Key }}</h3>
-   <ul>
-     {{ range .Pages }}
-       <li>
-         <a href="{{ .Permalink }}">{{ .Title }}</a>
-         <div class="meta">{{ .Lastmod.Format "Mon, Jan 2, 2006" }}</div>
-       </li>
-     {{ end }}
-   </ul>
- {{ end }}
- {{< /code >}}
- {{< new-in "0.97.0" >}} `GroupByDate` accepts the same time layouts as in [`time.Format`] and the `.Key` in the result will be localized for the current language.
- ### By page parameter
- {{< code file="layouts/partials/by-page-param.html" >}}
- <!-- Groups content according to the "param_key" field in front matter -->
- {{ range .Pages.GroupByParam "param_key" }}
-   <h3>{{ .Key }}</h3>
-   <ul>
-     {{ range .Pages }}
-       <li>
-         <a href="{{ .Permalink }}">{{ .Title }}</a>
-         <div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
-       </li>
-     {{ end }}
-   </ul>
-   {{ end }}
- {{< /code >}}
- ### By page parameter in date format
- The following template takes grouping by `date` a step further and uses Go's layout string. See the [`Format` function] for more examples of how to use Go's layout string to format dates in Hugo.
- {{< code file="layouts/partials/by-page-param-as-date.html" >}}
- <!-- Groups content by month according to the "param_key" field in front matter -->
- {{ range .Pages.GroupByParamDate "param_key" "2006-01" }}
-   <h3>{{ .Key }}</h3>
-   <ul>
-     {{ range .Pages }}
-       <li>
-         <a href="{{ .Permalink }}">{{ .Title }}</a>
-         <div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
-       </li>
-     {{ end }}
-   </ul>
- {{ end }}
- {{< /code >}}
- ### Reverse key order
- Ordering of groups is performed by keys in alphanumeric order (A–Z, 1–100) and in reverse chronological order (i.e., with the newest first) for dates.
- While these are logical defaults, they are not always the desired order. There are two different syntaxes to change Hugo's default ordering for groups, both of which work the same way.
- #### 1. Adding the reverse method
- ```go-html-template
- {{ range (.Pages.GroupBy "Section").Reverse }}
- ```
- ```go-html-template
- {{ range (.Pages.GroupByDate "2006-01").Reverse }}
- ```
- #### 2. Providing the alternate direction
- ```go-html-template
- {{ range .Pages.GroupByDate "2006-01" "asc" }}
- ```
- ```go-html-template
- {{ range .Pages.GroupBy "Section" "desc" }}
- ```
- ### Order within groups
- Because Grouping returns a `{{ .Key }}` and a slice of pages, all the ordering methods listed above are available.
- Here is the ordering for the example that follows:
- 1. Content is grouped by month according to the `date` field in front matter.
- 2. Groups are listed in ascending order (i.e., the oldest groups first)
- 3. Pages within each respective group are ordered alphabetically according to the `title`.
- {{< code file="layouts/partials/by-group-by-page.html" >}}
- {{ range .Pages.GroupByDate "2006-01" "asc" }}
-   <h3>{{ .Key }}</h3>
-   <ul>
-     {{ range .Pages.ByTitle }}
-       <li>
-         <a href="{{ .Permalink }}">{{ .Title }}</a>
-         <div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
-       </li>
-     {{ end }}
-   </ul>
- {{ end }}
- {{< /code >}}
++Group your content by field, parameter, or date using any of the methods below.
 +
- [`Format` function]: /functions/format/
++{{< list-pages-in-section path=/methods/pages filter=methods_pages_group filterType=include titlePrefix=. omitElementIDs=true >}}
 +
 +## Filtering and limiting lists
 +
 +Sometimes you only want to list a subset of the available content. A
 +common is to only display posts from [main sections]
 +on the blog's homepage.
 +
 +See the documentation on [`where`] and
 +[`first`] for further details.
 +
 +[base]: /templates/base/
 +[bepsays]: https://bepsays.com/en/2016/12/19/hugo-018/
 +[directorystructure]: /getting-started/directory-structure/
- [getpage]: /functions/getpage/
++[`Format` function]: /methods/time/format/
 +[front matter]: /content-management/front-matter/
- [`first`]: /functions/first/
- [main sections]: /functions/collections/where#mainsections
++[getpage]: /methods/page/getpage/
 +[homepage]: /templates/homepage/
 +[mentalmodel]: https://webstyleguide.com/wsg3/3-information-architecture/3-site-structure.html
 +[pagevars]: /variables/page/
 +[partials]: /templates/partials/
 +[RSS 2.0]: https://cyber.harvard.edu/rss/rss.html
 +[rss]: /templates/rss/
 +[sections]: /content-management/sections/
 +[sectiontemps]: /templates/section-templates/
 +[sitevars]: /variables/site/
 +[taxlists]: /templates/taxonomy-templates/#taxonomy-list-templates
 +[taxterms]: /templates/taxonomy-templates/#taxonomy-terms-templates
 +[taxvars]: /variables/taxonomy/
 +[views]: /templates/views/
 +[`where`]: /functions/collections/where
++[`first`]: /functions/collections/first/
++[main sections]: /methods/site/mainsections
 +[`time.Format`]: /functions/time/format
index c36956cb96b4aad823679341c1b16967acf3c2d9,0000000000000000000000000000000000000000..2a24c03ac833d60a9159afc0f8e254eac2f0a204
mode 100644,000000..100644
--- /dev/null
@@@ -1,136 -1,0 +1,136 @@@
- categories: [fundamentals,templates]
 +---
 +title: Template lookup order
 +description: Hugo uses the rules below to select a template for a given page, starting from the most specific.
- {{< code-toggle file=content/contact.md copy=false >}}
++categories: [templates,fundamentals]
 +keywords: [templates]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 30
 +weight: 30
 +toc: true
 +---
 +
 +## Lookup rules
 +
 +Hugo takes the parameters listed below into consideration when choosing a template for a given page. The templates are ordered by specificity. This should feel natural, but look at the table below for concrete examples of the different parameter variations.
 +
 +Kind
 +: The page `Kind` (the home page is one). See the example tables below per kind. This also determines if it is a **single page** (i.e. a regular content page. We then look for a template in `_default/single.html` for HTML) or a **list page** (section listings, home page, taxonomy lists, taxonomy terms. We then look for a template in `_default/list.html` for HTML).
 +
 +Layout
 +: Can be set in front matter.
 +
 +Output Format
 +: See [Custom Output Formats](/templates/output-formats). An output format has both a `name` (e.g. `rss`, `amp`, `html`) and a `suffix` (e.g. `xml`, `html`). We prefer matches with both (e.g. `index.amp.html`, but look for less specific templates.
 +
 +Note that if the output format's Media Type has more than one suffix defined, only the first is considered.
 +
 +Language
 +: We will consider a language tag in the template name. If the site language is `fr`, `index.fr.amp.html` will win over `index.amp.html`, but `index.amp.html` will be chosen before `index.fr.html`.
 +
 +Type
 +: Is value of `type` if set in front matter, else it is the name of the root section (e.g. "blog"). It will always have a value, so if not set, the value is "page".
 +
 +Section
 +: Is relevant for `section`, `taxonomy` and `term` types.
 +
 +{{% note %}}
 +Templates can live in either the project's or the themes' layout folders, and the most specific templates will be chosen. Hugo will interleave the lookups listed below, finding the most specific one either in the project or themes.
 +{{% /note %}}
 +
 +## Target a template
 +
 +You cannot change the lookup order to target a content page, but you can change a content page to target a template. Specify `type`, `layout`, or both in front matter.
 +
 +Consider this content structure:
 +
 +```text
 +content/
 +├── about.md
 +└── contact.md
 +```
 +
 +Files in the root of the content directory have a [content type] of `page`. To render these pages with a unique template, create a matching subdirectory:
 +
 +[content type]: /getting-started/glossary/#content-type
 +
 +```text
 +layouts/
 +└── page/
 +    └── single.html
 +```
 +
 +But the contact page probably has a form and requires a different template. In the front matter specify `layout`:
 +
- {{< code-toggle file=content/about.md copy=false >}}
++{{< code-toggle file=content/contact.md >}}
 +title = 'Contact'
 +layout = 'contact'
 +{{< /code-toggle >}}
 +
 +Then create the template for the contact page:
 +
 +```text
 +layouts/
 +└── page/
 +    └── contact.html  <-- renders contact.md
 +    └── single.html   <-- renders about.md
 +```
 +
 +As a content type, the word `page` is vague. Perhaps `miscellaneous` would be better. Add `type` to the front matter of each page:
 +
- {{< code-toggle file=content/contact.md copy=false >}}
++{{< code-toggle file=content/about.md >}}
 +title = 'About'
 +type = 'miscellaneous'
 +{{< /code-toggle >}}
 +
- {{< code-toggle file=hugo copy=false >}}
++{{< code-toggle file=content/contact.md >}}
 +title = 'Contact'
 +type = 'miscellaneous'
 +layout = 'contact'
 +{{< /code-toggle >}}
 +
 +Now place the layouts in the corresponding directory:
 +
 +```text
 +layouts/
 +└── miscellaneous/
 +    └── contact.html  <-- renders contact.md
 +    └── single.html   <-- renders about.md
 +```
 +
 +## Home page
 +
 +{{< datatable-filtered "output" "layouts" "Kind == home" "Example" "OutputFormat" "Suffix" "Template Lookup Order" >}}
 +
 +## Single pages
 +
 +{{< datatable-filtered "output" "layouts" "Kind == page" "Example" "OutputFormat" "Suffix" "Template Lookup Order" >}}
 +
 +## Section pages
 +
 +A section page is a list of pages within a given section.
 +
 +{{< datatable-filtered "output" "layouts" "Kind == section" "Example" "OutputFormat" "Suffix" "Template Lookup Order" >}}
 +
 +## Taxonomy pages
 +
 +A taxonomy page is a list of terms within a given taxonomy. The examples below assume the following site configuration:
 +
- {{< code-toggle file=hugo copy=false >}}
++{{< code-toggle file=hugo >}}
 +[taxonomies]
 +category = 'categories'
 +{{< /code-toggle >}}
 +
 +{{< datatable-filtered "output" "layouts" "Kind == taxonomy" "Example" "OutputFormat" "Suffix" "Template Lookup Order" >}}
 +
 +## Term pages
 +
 +A term page is a list of pages associated with a given term. The examples below assume the following site configuration:
 +
++{{< code-toggle file=hugo >}}
 +[taxonomies]
 +category = 'categories'
 +{{< /code-toggle >}}
 +
 +{{< datatable-filtered "output" "layouts" "Kind == term" "Example" "OutputFormat" "Suffix" "Template Lookup Order" >}}
index e2d141f06f3f6510d9490ad51b81a99ef84d6ded,0000000000000000000000000000000000000000..8dab65abff57a6a1fd33bd5858b743b5cd93837e
mode 100644,000000..100644
--- /dev/null
@@@ -1,132 -1,0 +1,132 @@@
- toc: true
 +---
 +title: Menu templates
 +description: Use menu variables and methods in your templates to render a menu.
 +categories: [templates]
 +keywords: [lists,sections,menus]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 140
- {{< code file="layouts/partials/menu.html" >}}
 +weight: 140
++toc: true
 +aliases: [/templates/menus/]
 +---
 +
 +## Overview
 +
 +After [defining menu entries], use [menu variables and methods] to render a menu.
 +
 +Three factors determine how to render a menu:
 +
 +1. The method used to define the menu entries: [automatic], [in front matter], or [in site configuration]
 +1. The menu structure: flat or nested
 +1. The method used to [localize the menu entries]: site configuration or translation tables
 +
 +The example below handles every combination.
 +
 +## Example
 +
 +This partial template recursively "walks" a menu structure, rendering a localized, accessible nested list.
 +
- {{< code file="layouts/_default/single.html" >}}
++{{< code file=layouts/partials/menu.html copy=true >}}
 +{{- $page := .page }}
 +{{- $menuID := .menuID }}
 +
 +{{- with index site.Menus $menuID }}
 +  <nav>
 +    <ul>
 +      {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
 +    </ul>
 +  </nav>
 +{{- end }}
 +
 +{{- define "partials/inline/menu/walk.html" }}
 +  {{- $page := .page }}
 +  {{- range .menuEntries }}
 +    {{- $attrs := dict "href" .URL }}
 +    {{- if $page.IsMenuCurrent .Menu . }}
 +      {{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
 +    {{- else if $page.HasMenuCurrent .Menu .}}
 +      {{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
 +    {{- end }}
 +    {{- $name := .Name }}
 +    {{- with .Identifier }}
 +      {{- with T . }}
 +        {{- $name = . }}
 +      {{- end }}
 +    {{- end }}
 +    <li>
 +      <a
 +        {{- range $k, $v := $attrs }}
 +          {{- with $v }}
 +            {{- printf " %s=%q" $k $v | safeHTMLAttr }}
 +          {{- end }}
 +        {{- end -}}
 +      >{{ $name }}</a>
 +      {{- with .Children }}
 +        <ul>
 +          {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
 +        </ul>
 +      {{- end }}
 +    </li>
 +  {{- end }}
 +{{- end }}
 +{{< /code >}}
 +
 +Call the partial above, passing a menu ID and the current page in context.
 +
- {{< code file="layouts/_default/single.html" >}}
++{{< code file=layouts/_default/single.html >}}
 +{{ partial "menu.html" (dict "menuID" "main" "page" .) }}
 +{{ partial "menu.html" (dict "menuID" "footer" "page" .) }}
 +{{< /code >}}
 +
 +## Page references
 +
 +Regardless of how you [define menu entries], an entry associated with a page has access to page variables and methods.
 +
 +This simplistic example renders a page parameter named `version` next to each entry's `name`. Code defensively using `with` or `if` to handle entries where (a) the entry points to an external resource, or (b) the `version` parameter is not defined.
 +
- {{< code file="layouts/partials/menu.html" >}}
++{{< code file=layouts/_default/single.html >}}
 +{{- range site.Menus.main }}
 +  <a href="{{ .URL }}">
 +    {{ .Name }}
 +    {{- with .Page }}
 +      {{- with .Params.version -}}
 +        ({{ . }})
 +      {{- end }}
 +    {{- end }}
 +  </a>
 +{{- end }}
 +{{< /code >}}
 +
 +## Menu entry parameters
 +
 +When you define menu entries [in site configuration] or [in front matter], you can include a `params` key as shown in these examples:
 +
 +- [Menu entry defined in site configuration]
 +- [Menu entry defined in front matter]
 +
 +This simplistic example renders a `class` attribute for each anchor element. Code defensively using `with` or `if` to handle entries where `params.class` is not defined.
 +
- [menu variables and methods]: /variables/menus/
++{{< code file=layouts/partials/menu.html >}}
 +{{- range site.Menus.main }}
 +  <a {{ with .Params.class -}} class="{{ . }}" {{ end -}} href="{{ .URL }}">
 +    {{ .Name }}
 +  </a>
 +{{- end }}
 +{{< /code >}}
 +
 +## Localize
 +
 +Hugo provides two methods to localize your menu entries. See [multilingual].
 +
 +[automatic]: /content-management/menus/#define-automatically
 +[define menu entries]: /content-management/menus/
 +[defining menu entries]: /content-management/menus/
 +[in front matter]: /content-management/menus/#define-in-front-matter
 +[in site configuration]: /content-management/menus/#define-in-site-configuration
 +[localize the menu entries]: /content-management/multilingual/#menus
 +[menu entry defined in front matter]: /content-management/menus/#example-front-matter
 +[menu entry defined in site configuration]: /content-management/menus/#example-site-configuration
++[menu variables and methods]: /variables/menu-entry/
 +[multilingual]: /content-management/multilingual/#menus
index 5f2abdc2a1431b62e3ac3bdf7f098bf83e693048,0000000000000000000000000000000000000000..23a42088254be0a5eb5727f1eccef95dddc70113
mode 100644,000000..100644
--- /dev/null
@@@ -1,229 -1,0 +1,231 @@@
- categories: [fundamentals,templates]
 +---
 +title: Custom output formats
 +description: Hugo can output content in multiple formats, including calendar events, e-book formats, Google AMP, and JSON search indexes, or any custom text format.
- aliases: [/templates/outputs/,/extras/output-formats/,/content-management/custom-outputs/]
++categories: [templates,fundamentals]
 +keywords: ["amp", "outputs", "rss"]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 210
 +weight: 210
- {{< code-toggle file="hugo" >}}
 +toc: true
++aliases: [/templates/outputs/,/extras/output-formats/,/content-management/custom-outputs/]
 +---
 +
 +This page describes how to properly configure your site with the media types and output formats, as well as where to create your templates for your custom outputs.
 +
 +## Media types
 +
 +A [media type] (formerly known as a MIME type) is a two-part identifier for file formats and format contents transmitted on the internet.
 +
 +This is the full set of built-in media types in Hugo:
 +
 +{{< datatable "config" "mediaTypes" "_key" "suffixes" >}}
 +
 +**Note:**
 +
 +- It is possible to add custom media types or change the defaults; e.g., if you want to change the suffix for `text/html` to `asp`.
 +- `Suffixes` are the values that will be used for URLs and file names for that media type in Hugo.
 +- The `Type` is the identifier that must be used when defining new/custom `Output Formats` (see below).
 +- The full set of media types will be registered in Hugo's built-in development server to make sure they are recognized by the browser.
 +
 +To add or modify a media type, define it in a `mediaTypes` section in your [site configuration], either for all sites or for a given language.
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle file=hugo >}}
 +[mediaTypes]
 +  [mediaTypes."text/enriched"]
 +  suffixes = ["enr"]
 +  [mediaTypes."text/html"]
 +  suffixes = ["asp"]
 +{{</ code-toggle >}}
 +
 +The above example adds one new media type, `text/enriched`, and changes the suffix for the built-in `text/html` media type.
 +
 +**Note:** these media types are configured for **your output formats**. If you want to redefine one of Hugo's default output formats (e.g. `HTML`), you also need to redefine the media type. So, if you want to change the suffix of the `HTML` output format from `html` (default) to `htm`:
 +
- **Note** that for the above to work, you also need to add an `outputs` definition in your site configuration.
++{{< code-toggle file=hugo >}}
 +[mediaTypes]
 +  [mediaTypes."text/html"]
 +    suffixes = ["htm"]
 +
 +[outputFormats]
 +  [outputFormats.html]
 +    mediaType = "text/html"
 +{{</ code-toggle >}}
 +
- {{< code-toggle file="hugo" >}}
++{{% note %}}
++For the above to work, you also need to add an `outputs` definition in your site configuration.
++{{% /note %}}
 +
 +## Output format definitions
 +
 +Given a media type and some additional configuration, you get an **Output Format**.
 +
 +This is the full set of Hugo's built-in output formats:
 +
 +{{< datatable "config" "outputFormats" "name" "mediaType" "path" "baseName" "rel" "protocol" "isPlainText" "isHTML" "noUgly" "permalinkable" >}}
 +
 +- A page can be output in as many output formats as you want, and you can have an infinite amount of output formats defined **as long as they resolve to a unique path on the file system**. In the above table, the best example of this is `amp` vs. `html`. `amp` has the value `amp` for `path` so it doesn't overwrite the `html` version; e.g. we can now have both `/index.html` and `/amp/index.html`.
 +- The `mediaType` must match a defined media type.
 +- You can define new output formats or redefine built-in output formats; e.g., if you want to put `amp` pages in a different path.
 +
 +To add or modify an output format, define it in an `outputFormats` section in your site's [configuration file](/getting-started/configuration/), either for all sites or for a given language.
 +
- `name`
++{{< code-toggle file=hugo >}}
 +[outputFormats.MyEnrichedFormat]
 +mediaType = "text/enriched"
 +baseName = "myindex"
 +isPlainText = true
 +protocol = "bep://"
 +{{</ code-toggle >}}
 +
 +The above example is fictional, but if used for the homepage on a site with `baseURL` `https://example.org`, it will produce a plain text homepage with the URL `bep://example.org/myindex.enr`.
 +
 +### Configure output formats
 +
 +The following is the full list of configuration options for output formats and their default values:
 +
- `mediaType`
++name
 +: the output format identifier. This is used to define what output format(s) you want for your pages.
 +
- `path`
++mediaType
 +: this must match the `Type` of a defined media type.
 +
- `baseName`
++path
 +: sub path to save the output files.
 +
- `rel`
++baseName
 +: the base file name for the list file names (homepage, etc.). **Default:** `index`.
 +
- `protocol`
++rel
 +: can be used to create `rel` values in `link` tags. **Default:** `alternate`.
 +
- `isPlainText`
++protocol
 +: will replace the "http://" or "https://" in your `baseURL` for this output format.
 +
- `isHTML`
++isPlainText
 +: use Go's plain text templates parser for the templates. **Default:** `false`.
 +
- `noUgly`
++isHTML
 +: used in situations only relevant for `HTML`-type formats; e.g., page aliases. **Default:** `false`.
 +
- `notAlternative`
++noUgly
 +: used to turn off ugly URLs If `uglyURLs` is set to `true` in your site. **Default:** `false`.
 +
- `permalinkable`
++notAlternative
 +: enable if it doesn't make sense to include this format in an `AlternativeOutputFormats` format listing on `Page` (e.g., with `CSS`). Note that we use the term _alternative_ and not _alternate_ here, as it does not necessarily replace the other format. **Default:** `false`.
 +
- `weight`
++permalinkable
 +: make `.Permalink` and `.RelPermalink` return the rendering Output Format rather than main ([see below](#link-to-output-formats)). This is enabled by default for `HTML` and `AMP`. **Default:** `false`.
 +
- {{< code-toggle config="outputs" />}}
++weight
 +: Setting this to a non-zero value will be used as the first sort criteria.
 +
 +## Output formats for pages
 +
 +A `Page` in Hugo can be rendered to multiple _output formats_ on the file
 +system.
 +
 +### Default output formats
 +
 +Every `Page` has a [`Kind`][page_kinds] attribute, and the default Output
 +Formats are set based on that.
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle config=outputs />}}
 +
 +### Customizing output formats
 +
 +This can be changed by defining an `outputs` list of output formats in either
 +the `Page` front matter or in the site configuration (either for all sites or
 +per language).
 +
 +Example from site configuration file:
 +
- {{< code-toggle file="content/example.md" fm=true copy=false >}}
++{{< code-toggle file=hugo >}}
 +[outputs]
 +  home = ["html", "amp", "rss"]
 +  page = ["html"]
 +{{</ code-toggle >}}
 +
 +Note that in the above examples, the _output formats_ for `section`,
 +`taxonomy` and `term` will stay at their default value `['html','rss']`.
 +
 +* The `outputs` definition is per page [`Kind`][page_kinds].
 +* The names (e.g. `html`, `amp`) must match the `name` of a defined output format, and can be overridden per page in front matter.
 +
 +The following is an example of front matter in a content file that defines output formats for the rendered `Page`:
 +
++{{< code-toggle file=content/example.md fm=true >}}
 +title: Example
 +outputs:
 +- html
 +- amp
 +- json
 +{{< /code-toggle >}}
 +
 +## List output formats
 +
 +Each `Page` has both an `.OutputFormats` (all formats, including the current) and an `.AlternativeOutputFormats` variable, the latter of which is useful for creating a `link rel` list in your site's `<head>`:
 +
 +```go-html-template
 +{{ range .AlternativeOutputFormats -}}
 +  <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
 +{{ end }}
 +```
 +
 +## Link to output formats
 +
 +`.Permalink` and `.RelPermalink` on `Page` will return the first output format defined for that page (usually `HTML` if nothing else is defined). This is regardless of the template file they are being called from.
 +
 +__from `single.json.json`:__
 +```go-html-template
 +{{ .RelPermalink }} → /that-page/
 +{{ with .OutputFormats.Get "json" }}
 +  {{ .RelPermalink }} → /that-page/index.json
 +{{ end }}
 +```
 +
 +In order for them to return the output format of the current template file instead, the given output format should have its `permalinkable` setting set to true.
 +
 +**Same template file as above with json output format's `permalinkable` set to true:**
 +
 +```go-html-template
 +{{ .RelPermalink }} → /that-page/index.json
 +{{ with  .OutputFormats.Get "html" }}
 +  {{ .RelPermalink }} → /that-page/
 +{{ end }}
 +```
 +
 +From content files, you can use the [`ref` or `relref` shortcodes](/content-management/shortcodes/#ref-and-relref):
 +
 +```go-html-template
 +[Neat]({{</* ref "blog/neat.md" "amp" */>}})
 +[Who]({{</* relref "about.md#who" "amp" */>}})
 +```
 +
 +## Templates for your output formats
 +
 +Each output format requires a corresponding template conforming to the [template lookup order](/templates/lookup-order/). Hugo considers both output format and suffix when selecting a template.
 +
 +For example, to generate a JSON file for the home page, the template with highest specificity is `layouts/index.json.json`.
 +
 +Hugo will now also detect the media type and output format of partials, if possible, and use that information to decide if the partial should be parsed as a plain text template or not.
 +
 +Hugo will look for the name given, so you can name it whatever you want. But if you want it treated as plain text, you should use the file suffix and, if needed, the name of the Output Format. The pattern is as follows:
 +
 +```go-html-template
 +[partial name].[OutputFormat].[suffix]
 +```
 +
 +The partial below is a plain text template . The output format is `csv`, and since this is the only output format with the suffix `csv`, we don't need to include the output format `name`):
 +
 +```go-html-template
 +{{ partial "mytextpartial.csv" . }}
 +```
 +
 +[base]: /templates/base/
 +[site configuration]: /getting-started/configuration/
 +[lookup order]: /templates/lookup-order/
 +[media type]: https://en.wikipedia.org/wiki/Media_type
 +[partials]: /templates/partials/
 +[page_kinds]: /templates/section-templates/#page-kinds
index 6cd7f7435d694770eda8796e658bf9cb8af8a05a,0000000000000000000000000000000000000000..0854a6844765c03c4e90f62450edf155c9137620
mode 100644,000000..100644
--- /dev/null
@@@ -1,154 -1,0 +1,154 @@@
- aliases: [/extras/pagination,/doc/pagination/]
 +---
 +title: Pagination
 +description: Hugo supports pagination for your homepage, section pages, and taxonomies.
 +categories: [templates]
 +keywords: [lists,sections,pagination]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 100
 +weight: 100
- `paginate`
 +toc: true
++aliases: [/extras/pagination,/doc/pagination/]
 +---
 +
 +The real power of Hugo pagination shines when combined with the [`where`] function and its SQL-like operators: [`first`], [`last`], and [`after`]. You can even [order the content][lists] the way you've become used to with Hugo.
 +
 +## Configure pagination
 +
 +Pagination can be configured in your [site configuration][configuration]:
 +
- `paginatePath`
++paginate
 +: default = `10`. This setting can be overridden within the template.
 +
-    {{ .Title }}
++paginatePath
 +: default = `page`. Allows you to set a different path for your pagination pages.
 +
 +Setting `paginate` to a positive value will split the list pages for the homepage, sections and taxonomies into chunks of that size. But note that the generation of the pagination pages for sections, taxonomies and homepage is *lazy* --- the pages will not be created if not referenced by a `.Paginator` (see below).
 +
 +`paginatePath` is used to adapt the `URL` to the pages in the paginator (the default setting will produce URLs on the form `/page/1/`.
 +
 +## List paginator pages
 +
 +{{% note %}}
 +`.Paginator` is provided to help you build a pager menu. This feature is currently only supported on homepage and list pages (i.e., taxonomies and section lists).
 +{{% /note %}}
 +
 +There are two ways to configure and use a `.Paginator`:
 +
 +1. The simplest way is just to call `.Paginator.Pages` from a template. It will contain the pages for *that page*.
 +2. Select another set of pages with the available template functions and ordering options, and pass the slice to `.Paginate`, e.g.
 +  * `{{ range (.Paginate ( first 50 .Pages.ByTitle )).Pages }}` or
 +  * `{{ range (.Paginate .RegularPagesRecursive).Pages }}`.
 +
 +For a given **Page**, it's one of the options above. The `.Paginator` is static and cannot change once created.
 +
 +If you call `.Paginator` or `.Paginate` multiple times on the same page, you should ensure all the calls are identical. Once *either* `.Paginator` or `.Paginate` is called while generating a page, its result is cached, and any subsequent similar call will reuse the cached result. This means that any such calls which do not match the first one will not behave as written.
 +
 +(Remember that function arguments are eagerly evaluated, so a call like `$paginator := cond x .Paginator (.Paginate .RegularPagesRecursive)` is an example of what you should *not* do. Use `if`/`else` instead to ensure exactly one evaluation.)
 +
 +The global page size setting (`Paginate`) can be overridden by providing a positive integer as the last argument. The examples below will give five items per page:
 +
 +* `{{ range (.Paginator 5).Pages }}`
 +* `{{ $paginator := .Paginate (where .Pages "Type" "posts") 5 }}`
 +
 +It is also possible to use the `GroupBy` functions in combination with pagination:
 +
 +```go-html-template
 +{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
 +```
 +
 +## Build the navigation
 +
 +The `.Paginator` contains enough information to build a paginator interface.
 +
 +The easiest way to add this to your pages is to include the built-in template (with `Bootstrap`-compatible styles):
 +
 +```go-html-template
 +{{ template "_internal/pagination.html" . }}
 +```
 +
 +{{% note %}}
 +If you use any filters or ordering functions to create your `.Paginator` *and* you want the navigation buttons to be shown before the page listing, you must create the `.Paginator` before it's used.
 +{{% /note %}}
 +
 +The following example shows how to create `.Paginator` before its used:
 +
 +```go-html-template
 +{{ $paginator := .Paginate (where .Pages "Type" "posts") }}
 +{{ template "_internal/pagination.html" . }}
 +{{ range $paginator.Pages }}
-    {{ .Title }}
++  {{ .Title }}
 +{{ end }}
 +```
 +
 +Without the `where` filter, the above example is even simpler:
 +
 +```go-html-template
 +{{ template "_internal/pagination.html" . }}
 +{{ range .Paginator.Pages }}
- `PageNumber`
++  {{ .Title }}
 +{{ end }}
 +```
 +
 +If you want to build custom navigation, you can do so using the `.Paginator` object, which includes the following properties:
 +
- `URL`
++PageNumber
 +: The current page's number in the pager sequence
 +
- `Pages`
++URL
 +: The relative URL to the current pager
 +
- `NumberOfElements`
++Pages
 +: The pages in the current pager
 +
- `HasPrev`
++NumberOfElements
 +: The number of elements on this page
 +
- `Prev`
++HasPrev
 +: Whether there are page(s) before the current
 +
- `HasNext`
++Prev
 +: The pager for the previous page
 +
- `Next`
++HasNext
 +: Whether there are page(s) after the current
 +
- `First`
++Next
 +: The pager for the next page
 +
- `Last`
++First
 +: The pager for the first page
 +
- `Pagers`
++Last
 +: The pager for the last page
 +
- `PageSize`
++Pagers
 +: A list of pagers that can be used to build a pagination menu
 +
- `TotalPages`
++PageSize
 +: Size of each pager
 +
- `TotalNumberOfElements`
++TotalPages
 +: The number of pages in the paginator
 +
++TotalNumberOfElements
 +: The number of elements on all pages in this paginator
 +
 +## Additional information
 +
 +The pages are built on the following form (`BLANK` means no value):
 +
 +```txt
 +[SECTION/TAXONOMY/BLANK]/index.html
 +[SECTION/TAXONOMY/BLANK]/page/1/index.html => redirect to  [SECTION/TAXONOMY/BLANK]/index.html
 +[SECTION/TAXONOMY/BLANK]/page/2/index.html
 +....
 +```
 +
 +[`first`]: /functions/collections/first/
 +[`last`]: /functions/collections/last/
 +[`after`]: /functions/collections/after/
 +[configuration]: /getting-started/configuration/
 +[lists]: /templates/lists/
 +[`where`]: /functions/collections/where
index 97cf93f71f35bd10924e4eeacfa035ecaf481cc1,0000000000000000000000000000000000000000..35ba2ee9e74d1be853debe4ffc06ea378192b1b7
mode 100644,000000..100644
--- /dev/null
@@@ -1,182 -1,0 +1,182 @@@
- aliases: [/templates/partial/,/layout/chrome/,/extras/analytics/]
 +---
 +title: Partial templates
 +description: Partials are smaller, context-aware components in your list and page templates that can be used economically to keep your templating DRY.
 +categories: [templates]
 +keywords: [lists,sections,partials]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 120
 +weight: 120
- The `partialCached` template function provides significant performance gains for complex templates that don't need to be re-rendered on every invocation. See [details][partialcached].
 +toc: true
++aliases: [/templates/partial/,/layout/chrome/,/extras/analytics/]
 +---
 +
 +{{< youtube pjS4pOLyB7c >}}
 +
 +## Partial template lookup order
 +
 +Partial templates---like [single page templates][singletemps] and [list page templates][listtemps]---have a specific [lookup order]. However, partials are simpler in that Hugo will only check in two places:
 +
 +1. `layouts/partials/*<PARTIALNAME>.html`
 +2. `themes/<THEME>/layouts/partials/*<PARTIALNAME>.html`
 +
 +This allows a theme's end user to copy a partial's contents into a file of the same name for [further customization][customize].
 +
 +## Use partials in your templates
 +
 +All partials for your Hugo project are located in a single `layouts/partials` directory. For better organization, you can create multiple subdirectories within `partials` as well:
 +
 +```txt
 +layouts/
 +└── partials/
 +    ├── footer/
 +    │   ├── scripts.html
 +    │   └── site-footer.html
 +    ├── head/
 +    │   ├── favicons.html
 +    │   ├── metadata.html
 +    │   ├── prerender.html
 +    │   └── twitter.html
 +    └── header/
 +        ├── site-header.html
 +        └── site-nav.html
 +```
 +
 +All partials are called within your templates using the following pattern:
 +
 +```go-html-template
 +{{ partial "<PATH>/<PARTIAL>.html" . }}
 +```
 +
 +{{% note %}}
 +One of the most common mistakes with new Hugo users is failing to pass a context to the partial call. In the pattern above, note how "the dot" (`.`) is required as the second argument to give the partial context. You can read more about "the dot" in the [Hugo templating introduction](/templates/introduction/).
 +{{% /note %}}
 +
 +{{% note %}}
 +`<PARTIAL>` including `baseof` is reserved. ([#5373](https://github.com/gohugoio/hugo/issues/5373))
 +{{% /note %}}
 +
 +As shown in the above example directory structure, you can nest your directories within `partials` for better source organization. You only need to call the nested partial's path relative to the `partials` directory:
 +
 +```go-html-template
 +{{ partial "header/site-header.html" . }}
 +{{ partial "footer/scripts.html" . }}
 +```
 +
 +### 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].
 +
 +This means the partial will *only* be able to access those variables. The partial is isolated and *has no access to the outer scope*. From within the partial, `$.Var` is equivalent to `.Var`.
 +
 +## Returning a value from a partial
 +
 +In addition to outputting markup, partials can be used to return a value of any type. In order to return a value, a partial must include a lone `return` statement *at the end of the partial*.
 +
 +### Example GetFeatured
 +
 +```go-html-template
 +{{/* layouts/partials/GetFeatured.html */}}
 +{{ return first . (where site.RegularPages "Params.featured" true) }}
 +```
 +
 +```go-html-template
 +{{/* layouts/index.html */}}
 +{{ range partial "GetFeatured.html" 5 }}
 +  [...]
 +{{ end }}
 +```
 +
 +### Example GetImage
 +
 +```go-html-template
 +{{/* layouts/partials/GetImage.html */}}
 +{{ $image := false }}
 +{{ with .Params.gallery }}
 +  {{ $image = index . 0 }}
 +{{ end }}
 +{{ with .Params.image }}
 +  {{ $image = . }}
 +{{ end }}
 +{{ return $image }}
 +```
 +
 +```go-html-template
 +{{/* layouts/_default/single.html */}}
 +{{ with partial "GetImage.html" . }}
 +  [...]
 +{{ end }}
 +```
 +
 +{{% note %}}
 +Only one `return` statement is allowed per partial file.
 +{{% /note %}}
 +
 +## Inline partials
 +
 +You can also define partials inline in the template. But remember that template namespace is global, so you need to make sure that the names are unique to avoid conflicts.
 +
 +```go-html-template
 +Value: {{ partial "my-inline-partial.html" . }}
 +
 +{{ define "partials/my-inline-partial.html" }}
 +{{ $value := 32 }}
 +{{ return $value }}
 +{{ end }}
 +```
 +
 +## Cached partials
 +
- {{< code file="layouts/partials/header.html" >}}
++The `partialCached` template function provides significant performance gains for complex templates that don't need to be re-rendered on every invocation. See&nbsp;[details][partialcached].
 +
 +## Examples
 +
 +### `header.html`
 +
 +The following `header.html` partial template is used for [spf13.com](https://spf13.com/):
 +
- {{< code file="layouts/partials/footer.html" >}}
++{{< code file=layouts/partials/header.html >}}
 +<!DOCTYPE html>
 +<html class="no-js" lang="en-US" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
 +<head>
 +    <meta charset="utf-8">
 +
 +    {{ partial "meta.html" . }}
 +
 +    <base href="{{ .Site.BaseURL }}">
 +    <title> {{ .Title }} : spf13.com </title>
 +    <link rel="canonical" href="{{ .Permalink }}">
 +    {{ if .RSSLink }}<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Title }}" />{{ end }}
 +
 +    {{ partial "head_includes.html" . }}
 +</head>
 +{{< /code >}}
 +
 +{{% note %}}
 +The `header.html` example partial was built before the introduction of block templates to Hugo. Read more on [base templates and blocks](/templates/base/) for defining the outer chrome or shell of your master templates (i.e., your site's head, header, and footer). You can even combine blocks and partials for added flexibility.
 +{{% /note %}}
 +
 +### `footer.html`
 +
 +The following `footer.html` partial template is used for [spf13.com](https://spf13.com/):
 +
++{{< code file=layouts/partials/footer.html >}}
 +<footer>
 +  <div>
 +    <p>
 +    &copy; 2013-14 Steve Francia.
 +    <a href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons Attribution">Some rights reserved</a>;
 +    please attribute properly and link back.
 +    </p>
 +  </div>
 +</footer>
 +{{< /code >}}
 +
 +[context]: /templates/introduction/
 +[customize]: /hugo-modules/theme-components/
 +[listtemps]: /templates/lists/
 +[lookup order]: /templates/lookup-order/
 +[partialcached]: /functions/partials/includecached
 +[singletemps]: /templates/single-page-templates/
 +[themes]: /themes/
index 13106b7f715f08432c98ff699f047e47cbf19c80,0000000000000000000000000000000000000000..8e174bdee20cafb0cdc2425cc25a209aea3fadc4
mode 100644,000000..100644
--- /dev/null
@@@ -1,184 -1,0 +1,183 @@@
- * `codeblock`{{< new-in "0.93.0" >}}
 +---
 +title: Markdown render hooks
 +linkTitle: Render hooks
 +description: Render Hooks allow custom templates to override markdown rendering functionality.
 +categories: [templates]
 +keywords: [markdown]
 +toc: true
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 200
 +weight: 200
 +---
 +
 +Note that this is only supported with the [Goldmark](/getting-started/configuration-markup#goldmark) renderer.
 +
 +You can override certain parts of the default Markdown rendering to HTML by creating templates with base names `render-{kind}` in `layouts/_default/_markup`.
 +
 +You can also create type/section specific hooks in `layouts/[type/section]/_markup`, e.g.: `layouts/blog/_markup`.
 +
 +The hook kinds currently supported are:
 +
 +* `image`
 +* `link`
 +* `heading`
- IsBlock {{< new-in "0.108.0" >}}
++* `codeblock`{{< new-in 0.93.0 >}}
 +
 +You can define [Output-Format-](/templates/output-formats) and [language-](/content-management/multilingual/)specific templates if needed. Your `layouts` folder may look like this:
 +
 +```text
 +layouts/
 +└── _default/
 +    └── _markup/
 +        ├── render-codeblock-bash.html
 +        ├── render-codeblock.html
 +        ├── render-heading.html
 +        ├── render-image.html
 +        ├── render-image.rss.xml
 +        └── render-link.html
 +```
 +
 +Some use cases for the above:
 +
 +* Resolve link references using `.GetPage`. This would make links portable as you could translate `./my-post.md` (and similar constructs that would work on GitHub) into `/blog/2019/01/01/my-post/` etc.
 +* Add `target=_blank` to external links.
 +* Resolve and [process](/content-management/image-processing/) images.
 +* Add [header links](https://remysharp.com/2014/08/08/automatic-permalinks-for-blog-posts).
 +
 +## Render hooks for headings, links and images
 +
 +### Context passed to `render-link` and `render-image`
 +
 +The `render-link` and `render-image` templates will receive this context:
 +
 +Page
 +: The [Page](/variables/page/) being rendered.
 +
 +Destination
 +: The URL.
 +
 +Title
 +: The title attribute.
 +
 +Text
 +: The rendered (HTML) link text.
 +
 +PlainText
 +: The plain variant of the above.
 +
 +### Context passed to `render-heading`
 +
 +The `render-heading` template will receive this context:
 +
 +Page
 +: The [Page](/variables/page/) being rendered.
 +
 +Level
 +: The header level (1--6)
 +
 +Anchor
 +: An auto-generated html id unique to the header within the page
 +
 +Text
 +: The rendered (HTML) text.
 +
 +PlainText
 +: The plain variant of the above.
 +
 +Attributes (map)
 +: A map of attributes (e.g. `id`, `class`). Note that this will currently always be empty for links.
 +
 +The `render-image` templates will also receive:
 +
- Ordinal  {{< new-in "0.108.0" >}}
++IsBlock {{< new-in 0.108.0 >}}
 +: Returns true if this is a standalone image and the configuration option [markup.goldmark.parser.wrapStandAloneImageWithinParagraph](/getting-started/configuration-markup/#goldmark) is disabled.
 +
++Ordinal  {{< new-in 0.108.0 >}}
 +: Zero-based ordinal for all the images in the current document.
 +
- {{< code file="layouts/_default/_markup/render-link.html" >}}
 +### Link with title markdown example
 +
 +```md
 +[Text](https://www.gohugo.io "Title")
 +```
 +
 +Here is a code example for how the render-link.html template could look:
 +
- {{< code file="layouts/_default/_markup/render-image.html" >}}
++{{< code file=layouts/_default/_markup/render-link.html >}}
 +<a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
 +{{< /code >}}
 +
 +### Image markdown example
 +
 +```md
 +![Text](https://gohugo.io/images/hugo-logo-wide.svg "Title")
 +```
 +
 +Here is a code example for how the render-image.html template could look:
 +
- {{< code file="layouts/_default/_markup/render-heading.html" >}}
++{{< code file=layouts/_default/_markup/render-image.html >}}
 +<p class="md__image">
 +  <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}"{{ end }} />
 +</p>
 +{{< /code >}}
 +
 +### Heading link example
 +
 +Given this template file
 +
- {{< new-in "0.93.0" >}}
++{{< code file=layouts/_default/_markup/render-heading.html >}}
 +<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}">¶</a></h{{ .Level }}>
 +{{< /code >}}
 +
 +And this markdown
 +
 +```md
 +### Section A
 +```
 +
 +The rendered html will be
 +
 +```html
 +<h3 id="section-a">Section A <a href="#section-a">¶</a></h3>
 +```
 +
 +## Render hooks for code blocks
 +
++{{< new-in 0.93.0 >}}
 +
 +You can add a hook template for either all code blocks or for a specific type/language (`bash` in the example below):
 +
 +```goat { class="black f7" }
 +layouts
 +└── _default
 +    └── _markup
 +        └── render-codeblock.html
 +        └── render-codeblock-bash.html
 +```
 +
 +The default behavior for these code blocks is to do [Code Highlighting](/content-management/syntax-highlighting/#highlighting-in-code-fences), but since you can pass attributes to these code blocks, they can be used for almost anything. One example would be the built-in [GoAT Diagrams](/content-management/diagrams/#goat-diagrams-ascii) or this [Mermaid Diagram Code Block Hook](/content-management/diagrams/#mermaid-diagrams) example.
 +
 +The context (the ".") you receive in a code block template contains:
 +
 +Type (string)
 +: The type of code block. This will be the programming language, e.g. `bash`, when doing code highlighting.
 +
 +Attributes (map)
 +: Attributes passed in from Markdown (e.g. `{ attrName1=attrValue1 attrName2="attr Value 2" }`).
 +
 +Options (map)
 +: Chroma highlighting processing options. This will only be filled if `Type` is a known [Chroma Lexer](/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages).
 +
 +Inner (string)
 +: The text between the code fences.
 +
 +Ordinal (integer)
 +: Zero-based ordinal for all code blocks in the current document.
 +
 +Page
 +: The owning `Page`.
 +
 +Position
 +: Useful in error logging as it prints the file name and position (linenumber, column), e.g. `{{ errorf "error in code block: %s" .Position }}`.
index b9cdb76dd273c1e9e7d5e2cbb534e292667094ac,0000000000000000000000000000000000000000..0efd85ba2cfc7510c54a6037545887158eb67cc5
mode 100644,000000..100644
--- /dev/null
@@@ -1,59 -1,0 +1,59 @@@
- {{< code-toggle file="hugo" >}}
 +---
 +title: Robots.txt file
 +linkTitle: Robots.txt
 +description: Hugo can generate a customized robots.txt in the same way as any other template.
 +categories: [templates]
 +keywords: [robots,search engines]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 230
 +weight: 230
 +aliases: [/extras/robots-txt/]
 +---
 +
 +To generate a robots.txt file from a template, change the [site configuration]:
 +
- {{< code file="layouts/robots.txt" >}}
++{{< code-toggle file=hugo >}}
 +enableRobotsTXT = true
 +{{< /code-toggle >}}
 +
 +By default, Hugo generates robots.txt using an [internal template][internal].
 +
 +```text
 +User-agent: *
 +```
 +
 +Search engines that honor the Robots Exclusion Protocol will interpret this as permission to crawl everything on the site.
 +
 +## robots.txt template lookup order
 +
 +You may overwrite the internal template with a custom template. Hugo selects the template using this lookup order:
 +
 +1. `/layouts/robots.txt`
 +2. `/themes/<THEME>/layouts/robots.txt`
 +
 +## robots.txt template example
 +
- 1. Set `enableRobotsTXT` to `false` in the [site configuration].
++{{< code file=layouts/robots.txt >}}
 +User-agent: *
 +{{ range .Pages }}
 +Disallow: {{ .RelPermalink }}
 +{{ end }}
 +{{< /code >}}
 +
 +This template creates a robots.txt file with a `Disallow` directive for each page on the site. Search engines that honor the Robots Exclusion Protocol will not crawl any page on the site.
 +
 +{{% note %}}
 +To create a robots.txt file without using a template:
 +
++1. Set `enableRobotsTXT` to `false` in the site configuration.
 +2. Create a robots.txt file in the `static` directory.
 +
 +Remember that Hugo copies everything in the [static directory][static] to the root of `publishDir` (typically `public`) when you build your site.
 +
 +[static]: /getting-started/directory-structure/
 +{{% /note %}}
 +
 +[site configuration]: /getting-started/configuration/
 +[internal]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/robots.txt
index 0250e8f54bd85e8d8fa460d08d4d76998e4adbaa,0000000000000000000000000000000000000000..9a2ce9b3c6ce955f5c63584129477dc6dd62b26c
mode 100644,000000..100644
--- /dev/null
@@@ -1,91 -1,0 +1,91 @@@
- keywords: [rss, xml, templates]
 +---
 +title: RSS templates
 +description: Use the built-in RSS template, or create your own.
- {{< code-toggle file=hugo copy=false >}}
 +categories: [templates]
++keywords: [rss,xml,templates]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 160
 +weight: 160
 +toc: true
 +---
 +
 +## Configuration
 +
 +By default, when you build your site, Hugo generates RSS feeds for home, section, taxonomy, and term pages. Control feed generation in your site configuration. For example, to generate feeds for home and section pages, but not for taxonomy and term pages:
 +
- {{< code-toggle file=hugo copy=false >}}
++{{< code-toggle file=hugo >}}
 +[outputs]
 +home = ['html', 'rss']
 +section = ['html', 'rss']
 +taxonomy = ['html']
 +term = ['html']
 +{{< /code-toggle >}}
 +
 +To disable feed generation for all [page kinds]:
 +
- {{< code-toggle file=hugo copy=false >}}
++{{< code-toggle file=hugo >}}
 +disableKinds = ['rss']
 +{{< /code-toggle >}}
 +
 +By default, the number of items in each feed is unlimited. Change this as needed in your site configuration:
 +
- {{< code-toggle file=hugo copy=false >}}
++{{< code-toggle file=hugo >}}
 +[services.rss]
 +limit = 42
 +{{< /code-toggle >}}
 +
 +Set `limit` to `-1` to generate an unlimited number of items per feed.
 +
 +The built-in RSS template will render the following values, if present, from your site configuration:
 +
- [author]
++{{< code-toggle file=hugo >}}
 +copyright = '© 2023 ABC Widgets, Inc.'
++[params.author]
 +name = 'John Doe'
 +email = 'jdoe@example.org'
 +{{< /code-toggle >}}
 +
 +## Include feed reference
 +
 +To include a feed reference in the `head` element of your rendered pages, place this within the `head` element of your templates:
 +
 +```go-html-template
 +{{ with .OutputFormats.Get "rss" -}}
 +  {{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
 +{{ end }}
 +```
 +
 +Hugo will render this to:
 +
 +```html
 +<link rel="alternate" type="application/rss+xml" href="https://example.org/index.xml" title="ABC Widgets">
 +```
 +
 +## Custom templates
 +
 +Override Hugo's [built-in RSS template] by creating one or more of your own, following the naming conventions as shown in the [template lookup order table].
 +
 +For example, to use different templates for home, section, taxonomy, and term pages:
 +
 +```text
 +layouts/
 +└── _default/
 +    ├── home.rss.xml
 +    ├── section.rss.xml
 +    ├── taxonomy.rss.xml
 +    └── term.rss.xml
 +```
 +
 +RSS templates receive the `.Page` and `.Site` objects in context.
 +
 +[built-in RSS template]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml
 +[page kinds]: /getting-started/glossary/#page-kind
 +[template lookup order table]: #template-lookup-order
 +
 +## Template lookup order
 +
 +The table below shows the RSS template lookup order for the different page kinds. The first listing shows the lookup order when running with a theme (`demoTheme`).
 +
 +{{< datatable-filtered "output" "layouts" "OutputFormat == rss" "Example" "OutputFormat" "Suffix" "Template Lookup Order" >}}
index b35009a2fead265bc40f42c16c8a4faf056caddc,0000000000000000000000000000000000000000..42eb12bec2dc537ba6f567f2f133fba877638345
mode 100644,000000..100644
--- /dev/null
@@@ -1,110 -1,0 +1,110 @@@
- aliases: [/templates/sections/]
 +---
 +title: Section page templates
 +linkTitle: Section templates
 +description: Templates used for section pages are **lists** and therefore have all the variables and methods available to list pages.
 +categories: [templates]
 +keywords: [lists,sections,templates]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 80
 +weight: 80
- {{% page-kinds %}}
 +toc: true
++aliases: [/templates/sections/]
 +---
 +
 +## Add content and front matter to section templates
 +
 +To effectively leverage section page templates, you should first understand Hugo's [content organization](/content-management/organization/) and, specifically, the purpose of `_index.md` for adding content and front matter to section and other list pages.
 +
 +## Section template lookup order
 +
 +See [Template Lookup](/templates/lookup-order/).
 +
 +## Page kinds
 +
 +Every `Page` in Hugo has a `.Kind` attribute.
 +
- {{< code file="layouts/_default/section.html" >}}
++{{% include "content-management/_common/page-kinds.md" %}}
 +
 +## `.Site.GetPage` with sections
 +
 +`Kind` can easily be combined with the [`where`] function in your templates to create kind-specific lists of content. This method is ideal for creating lists, but there are times where you may want to fetch just the index page of a single section via the section's path.
 +
 +The [`.GetPage` function][getpage] looks up an index page of a given `Kind` and `path`.
 +
 +You can call `.Site.GetPage` with two arguments: `kind` (one of the valid values
 +of `Kind` from above) and `kind value`.
 +
 +Examples:
 +
 +- `{{ .Site.GetPage "section" "posts" }}`
 +- `{{ .Site.GetPage "page" "search" }}`
 +
 +## Example: creating a default section template
 +
-     │   ├── _index.md # "title: My Hugo Blog" in the front matter
-     │   ├── post-1.md
-     │   ├── post-2.md
-     │   └── post-3.md
++{{< code file=layouts/_default/section.html >}}
 +{{ define "main" }}
 +  <main>
 +    {{ .Content }}
 +      <ul class="contents">
 +        {{ range .Paginator.Pages }}
 +          <li>{{ .Title }}
 +            <div>
 +              {{ partial "summary.html" . }}
 +            </div>
 +          </li>
 +        {{ end }}
 +      </ul>
 +    {{ partial "pagination.html" . }}
 +  </main>
 +{{ end }}
 +{{< /code >}}
 +
 +### Example: using `.Site.GetPage`
 +
 +The `.Site.GetPage` example that follows assumes the following project directory structure:
 +
 +```txt
 +.
 +└── content
 +    ├── blog
- [getpage]: /functions/getpage/
++    │   ├── _index.md # "title: My Hugo Blog" in the front matter
++    │   ├── post-1.md
++    │   ├── post-2.md
++    │   └── post-3.md
 +    └── events #Note there is no _index.md file in "events"
 +        ├── event-1.md
 +        └── event-2.md
 +```
 +
 +`.Site.GetPage` will return `nil` if no `_index.md` page is found. Therefore, if `content/blog/_index.md` does not exist, the template will output the section name:
 +
 +```go-html-template
 +<h1>{{ with .Site.GetPage "section" "blog" }}{{ .Title }}{{ end }}</h1>
 +```
 +
 +Since `blog` has a section index page with front matter at `content/blog/_index.md`, the above code will return the following result:
 +
 +```html
 +<h1>My Hugo Blog</h1>
 +```
 +
 +If we try the same code with the `events` section, however, Hugo will default to the section title because there is no `content/events/_index.md` from which to pull content and front matter:
 +
 +```go-html-template
 +<h1>{{ with .Site.GetPage "section" "events" }}{{ .Title }}{{ end }}</h1>
 +```
 +
 +Which then returns the following:
 +
 +```html
 +<h1>Events</h1>
 +```
 +
 +[contentorg]: /content-management/organization/
++[getpage]: /methods/page/getpage
 +[lists]: /templates/lists/
 +[lookup]: /templates/lookup-order/
 +[`where`]: /functions/collections/where
 +[sections]: /content-management/sections/
index 41b52641cc91ce29197c6529bb7a3458cdfa2ccf,0000000000000000000000000000000000000000..4606369b6d19ec9833cb1b5c4ffc6d165fa26d6c
mode 100644,000000..100644
--- /dev/null
@@@ -1,415 -1,0 +1,412 @@@
- You can organize your shortcodes in subfolders, e.g. in `layouts/shortcodes/boxes`. These shortcodes would then be accessible with their relative path, e.g:
 +---
 +title: Create your own shortcodes
 +linkTitle: Shortcode templates
 +description: You can extend Hugo's built-in shortcodes by creating your own using the same templating syntax as that for single and list pages.
 +categories: [templates]
 +keywords: [shortcodes,templates]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 130
 +weight: 130
++aliases: [/functions/get]
 +toc: true
 +---
 +
 +Shortcodes are a means to consolidate templating into small, reusable snippets that you can embed directly inside your content.
 +
 +{{% note %}}
 +Hugo also ships with built-in shortcodes for common use cases. (See [Content Management: Shortcodes](/content-management/shortcodes/).)
 +{{% /note %}}
 +
 +## Create custom shortcodes
 +
 +Hugo's built-in shortcodes cover many common, but not all, use cases. Luckily, Hugo provides the ability to easily create custom shortcodes to meet your website's needs.
 +
 +{{< youtube Eu4zSaKOY4A >}}
 +
 +### File location
 +
 +To create a shortcode, place an HTML template in the `layouts/shortcodes` directory of your [source organization]. Consider the file name carefully since the shortcode name will mirror that of the file but without the `.html` extension. For example, `layouts/shortcodes/myshortcode.html` will be called with either `{{</* myshortcode /*/>}}` or `{{%/* myshortcode /*/%}}`.
 +
- `$.Params`
++You can organize your shortcodes in subdirectories, e.g. in `layouts/shortcodes/boxes`. These shortcodes would then be accessible with their relative path, e.g:
 +
 +```go-html-template
 +{{</* boxes/square */>}}
 +```
 +
 +Note the forward slash.
 +
 +### Shortcode template lookup order
 +
 +Shortcode templates have a simple [lookup order]:
 +
 +1. `/layouts/shortcodes/<SHORTCODE>.html`
 +2. `/themes/<THEME>/layouts/shortcodes/<SHORTCODE>.html`
 +
 +### Positional vs. named parameters
 +
 +You can create shortcodes using the following types of parameters:
 +
 +* Positional parameters
 +* Named parameters
 +* Positional *or* named parameters (i.e, "flexible")
 +
 +In shortcodes with positional parameters, the order of the parameters is important. If a shortcode has a single required value (e.g., the `youtube` shortcode below), positional parameters work very well and require less typing from content authors.
 +
 +For more complex layouts with multiple or optional parameters, named parameters work best. While less terse, named parameters require less memorization from a content author and can be added in a shortcode declaration in any order.
 +
 +Allowing both types of parameters (i.e., a "flexible" shortcode) is useful for complex layouts where you want to set default values that can be easily overridden by users.
 +
 +### Access parameters
 +
 +All shortcode parameters can be accessed via the `.Get` method. Whether you pass a key (i.e., string) or a number to the `.Get` method depends on whether you are accessing a named or positional parameter, respectively.
 +
 +To access a parameter by name, use the `.Get` method followed by the named parameter as a quoted string:
 +
 +```go-html-template
 +{{ .Get "class" }}
 +```
 +
 +To access a parameter by position, use the `.Get` followed by a numeric position, keeping in mind that positional parameters are zero-indexed:
 +
 +```go-html-template
 +{{ .Get 0 }}
 +```
 +
 +For the second position, you would just use:
 +
 +```go-html-template
 +{{ .Get 1 }}
 +```
 +
 +`with` is great when the output depends on a parameter being set:
 +
 +```go-html-template
 +{{ with .Get "class" }} class="{{ . }}"{{ end }}
 +```
 +
 +`.Get` can also be used to check if a parameter has been provided. This is
 +most helpful when the condition depends on either of the values, or both:
 +
 +```go-html-template
 +{{ if or (.Get "title") (.Get "alt") }} alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "title" }}{{ end }}"{{ end }}
 +```
 +
 +#### `.Inner`
 +
 +If a closing shortcode is used, the `.Inner` variable will be populated with the content between the opening and closing shortcodes. To check if `.Inner` contains anything other than white space:
 +
 +```go-html-template
 +{{ if strings.ContainsNonSpace .Inner }}
 +  Inner is not empty
 +{{ end }}
 +```
 +
 +A shortcode with content declared via the `.Inner` variable can also be declared without the content and without the closing tag by using the self-closing syntax:
 +
 +```go-html-template
 +{{</* innershortcode /*/>}}
 +```
 +
 +{{% note %}}
 +Any shortcode that refers to `.Inner` must be closed or self-closed.
 +
 +{{% /note %}}
 +
 +#### `.Params`
 +
 +The `.Params` variable in shortcodes contains the list parameters passed to shortcode for more complicated use cases. You can also access higher-scoped parameters with the following logic:
 +
- `$.Page.Params`
++$.Params
 +: these are the parameters passed directly into the shortcode declaration (e.g., a YouTube video ID)
 +
- `$.Page.Site.Params`
++$.Page.Params
 +: refers to the page's parameters; the "page" in this case refers to the content file in which the shortcode is declared (e.g., a `shortcode_color` field in a content's front matter could be accessed via `$.Page.Params.shortcode_color`).
 +
- {{< code file="/layouts/shortcodes/year.html" >}}
++$.Page.Site.Params
 +: refers to global variables as defined in your [site's configuration file][config].
 +
 +#### `.IsNamedParams`
 +
 +The `.IsNamedParams` variable checks whether the shortcode declaration uses named parameters and returns a boolean value.
 +
 +For example, you could create an `image` shortcode that can take either a `src` named parameter or the first positional parameter, depending on the preference of the content's author. Let's assume the `image` shortcode is called as follows:
 +
 +```go-html-template
 +{{</* image src="images/my-image.jpg" */>}}
 +```
 +
 +You could then include the following as part of your shortcode templating:
 +
 +```go-html-template
 +{{ if .IsNamedParams }}
 +<img src="{{ .Get "src" }}" alt="">
 +{{ else }}
 +<img src="{{ .Get 0 }}" alt="">
 +{{ end }}
 +```
 +
 +See the [example Vimeo shortcode][vimeoexample] below for `.IsNamedParams` in action.
 +
 +{{% note %}}
 +While you can create shortcode templates that accept both positional and named parameters, you *cannot* declare shortcodes in content with a mix of parameter types. Therefore, a shortcode declared like `{{</* image src="images/my-image.jpg" "This is my alt text" */>}}` will return an error.
 +{{% /note %}}
 +
 +You can also use the variable `.Page` to access all the normal [page variables][pagevars].
 +
 +A shortcodes can also be nested. In a nested shortcode, you can access the parent shortcode context with [`.Parent` variable][shortcodesvars]. This can be very useful for inheritance of common shortcode parameters from the root.
 +
 +### Checking for existence
 +
 +You can check if a specific shortcode is used on a page by calling `.HasShortcode` in that page template, providing the name of the shortcode. This is sometimes useful when you want to include specific scripts or styles in the header that are only used by that shortcode.
 +
 +## Custom shortcode examples
 +
 +The following are examples of the different types of shortcodes you can create via shortcode template files in `/layouts/shortcodes`.
 +
 +### Single-word example: `year`
 +
 +Let's assume you would like to keep mentions of your copyright year current in your content files without having to continually review your Markdown. Your goal is to be able to call the shortcode as follows:
 +
 +```go-html-template
 +{{</* year */>}}
 +```
 +
- {{< code file="/layouts/shortcodes/youtube.html" >}}
++{{< code file=layouts/shortcodes/year.html >}}
 +{{ now.Format "2006" }}
 +{{< /code >}}
 +
 +### Single positional example: `youtube`
 +
 +Embedded videos are a common addition to Markdown content that can quickly become unsightly. The following is the code used by [Hugo's built-in YouTube shortcode][youtubeshortcode]:
 +
 +```go-html-template
 +{{</* youtube 09jf3ow9jfw */>}}
 +```
 +
 +Would load the template at `/layouts/shortcodes/youtube.html`:
 +
- {{< code file="youtube-embed.html" copy=false >}}
++{{< code file=layouts/shortcodes/youtube.html >}}
 +<div class="embed video-player">
 +<iframe class="youtube-player" type="text/html" width="640" height="385" src="https://www.youtube.com/embed/{{ index .Params 0 }}" allowfullscreen frameborder="0">
 +</iframe>
 +</div>
 +{{< /code >}}
 +
- {{< code file="content-image.md" >}}
++{{< code file=youtube-embed.html >}}
 +<div class="embed video-player">
 +    <iframe class="youtube-player" type="text/html"
 +        width="640" height="385"
 +        src="https://www.youtube.com/embed/09jf3ow9jfw"
 +        allowfullscreen frameborder="0">
 +    </iframe>
 +</div>
 +{{< /code >}}
 +
 +### Single named example: `image`
 +
 +Let's say you want to create your own `img` shortcode rather than use Hugo's built-in [`figure` shortcode][figure]. Your goal is to be able to call the shortcode as follows in your content files:
 +
- {{< code file="/layouts/shortcodes/img.html" >}}
++{{< code file=content-image.md >}}
 +{{</* img src="/media/spf13.jpg" title="Steve Francia" */>}}
 +{{< /code >}}
 +
 +You have created the shortcode at `/layouts/shortcodes/img.html`, which loads the following shortcode template:
 +
- {{< code file="img-output.html" copy=false >}}
++{{< code file=layouts/shortcodes/img.html >}}
 +<!-- image -->
 +<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}>
 +  {{ with .Get "link" }}<a href="{{ . }}">{{ end }}
 +    <img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" }}{{ end }}"{{ end }} />
 +    {{ if .Get "link" }}</a>{{ end }}
 +    {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr") }}
 +      <figcaption>{{ if isset .Params "title" }}
 +        <h4>{{ .Get "title" }}</h4>{{ end }}
 +        {{ if or (.Get "caption") (.Get "attr") }}<p>
 +        {{ .Get "caption" }}
 +        {{ with .Get "attrlink" }}<a href="{{ . }}"> {{ end }}
 +          {{ .Get "attr" }}
 +        {{ if .Get "attrlink" }}</a> {{ end }}
 +        </p> {{ end }}
 +      </figcaption>
 +  {{ end }}
 +</figure>
 +<!-- image -->
 +{{< /code >}}
 +
 +Would be rendered as:
 +
- {{< code file="/layouts/shortcodes/vimeo.html" >}}
++{{< code file=img-output.html >}}
 +<figure>
 +  <img src="/media/spf13.jpg"  />
 +  <figcaption>
 +      <h4>Steve Francia</h4>
 +  </figcaption>
 +</figure>
 +{{< /code >}}
 +
 +### Single flexible example: `vimeo`
 +
 +```go-html-template
 +{{</* vimeo 49718712 */>}}
 +{{</* vimeo id="49718712" class="flex-video" */>}}
 +```
 +
 +Would load the template found at `/layouts/shortcodes/vimeo.html`:
 +
- {{< code file="vimeo-iframes.html" copy=false >}}
++{{< code file=layouts/shortcodes/vimeo.html >}}
 +{{ if .IsNamedParams }}
 +  <div class="{{ if .Get "class" }}{{ .Get "class" }}{{ else }}vimeo-container{{ end }}">
 +    <iframe src="https://player.vimeo.com/video/{{ .Get "id" }}" allowfullscreen></iframe>
 +  </div>
 +{{ else }}
 +  <div class="{{ if len .Params | eq 2 }}{{ .Get 1 }}{{ else }}vimeo-container{{ end }}">
 +    <iframe src="https://player.vimeo.com/video/{{ .Get 0 }}" allowfullscreen></iframe>
 +  </div>
 +{{ end }}
 +{{< /code >}}
 +
 +Would be rendered as:
 +
- {{< code file="highlight-example.md" >}}
++{{< code file=vimeo-iframes.html >}}
 +<div class="vimeo-container">
 +  <iframe src="https://player.vimeo.com/video/49718712" allowfullscreen></iframe>
 +</div>
 +<div class="flex-video">
 +  <iframe src="https://player.vimeo.com/video/49718712" allowfullscreen></iframe>
 +</div>
 +{{< /code >}}
 +
 +### Paired example: `highlight`
 +
 +The following is taken from `highlight`, which is a [built-in shortcode] that ships with Hugo.
 +
- {{< code file="syntax-highlighted.html" copy=false >}}
++{{< code file=highlight-example.md >}}
 +{{</* highlight html */>}}
 +  <html>
 +    <body> This HTML </body>
 +  </html>
 +{{</* /highlight */>}}
 +{{< /code >}}
 +
 +The template for the `highlight` shortcode uses the following code, which is already included in Hugo:
 +
 +```go-html-template
 +{{ .Get 0 | highlight .Inner }}
 +```
 +
 +The rendered output of the HTML example code block will be as follows:
 +
- {{< code file="layouts/shortcodes/gallery.html" >}}
++{{< code file=syntax-highlighted.html >}}
 +<div class="highlight" style="background: #272822"><pre style="line-height: 125%"><span style="color: #f92672">&lt;html&gt;</span>
 +    <span style="color: #f92672">&lt;body&gt;</span> This HTML <span style="color: #f92672">&lt;/body&gt;</span>
 +<span style="color: #f92672">&lt;/html&gt;</span>
 +</pre></div>
 +{{< /code >}}
 +
 +### Nested shortcode: image gallery
 +
 +Hugo's [`.Parent` shortcode variable][parent] provides access to the parent shortcode context when the shortcode in question is called within the context of a *parent* shortcode. This provides an inheritance model for common shortcode parameters.
 +
 +The following example is contrived but demonstrates the concept. Assume you have a `gallery` shortcode that expects one named `class` parameter:
 +
- {{< code file="layouts/shortcodes/img.html" >}}
++{{< code file=layouts/shortcodes/gallery.html >}}
 +<div class="{{ .Get "class" }}">
 +  {{ .Inner }}
 +</div>
 +{{< /code >}}
 +
 +You also have an `img` shortcode with a single named `src` parameter that you want to call inside of `gallery` and other shortcodes, so that the parent defines the context of each `img`:
 +
- Use the [errorf](/functions/fmt/errorf) template func and [.Position](/variables/shortcodes/) variable to get useful error messages in shortcodes:
++{{< code file=layouts/shortcodes/img.html >}}
 +{{- $src := .Get "src" -}}
 +{{- with .Parent -}}
 +  <img src="{{ $src }}" class="{{ .Get "class" }}-image">
 +{{- else -}}
 +  <img src="{{ $src }}">
 +{{- end -}}
 +{{< /code >}}
 +
 +You can then call your shortcode in your content as follows:
 +
 +```go-html-template
 +{{</* gallery class="content-gallery" */>}}
 +  {{</* img src="/images/one.jpg" */>}}
 +  {{</* img src="/images/two.jpg" */>}}
 +{{</* /gallery */>}}
 +{{</* img src="/images/three.jpg" */>}}
 +```
 +
 +This will output the following HTML. Note how the first two `img` shortcodes inherit the `class` value of `content-gallery` set with the call to the parent `gallery`, whereas the third `img` only uses `src`:
 +
 +```html
 +<div class="content-gallery">
 +    <img src="/images/one.jpg" class="content-gallery-image">
 +    <img src="/images/two.jpg" class="content-gallery-image">
 +</div>
 +<img src="/images/three.jpg">
 +```
 +
 +## Error handling in shortcodes
 +
- ```bash
++Use the [errorf](/functions/fmt/errorf) template func and [.Position](/variables/shortcode/) variable to get useful error messages in shortcodes:
 +
- ```bash
++```sh
 +{{ with .Get "name" }}
 +{{ else }}
 +{{ errorf "missing value for parameter 'name': %s" .Position }}
 +{{ end }}
 +```
 +
 +When the above fails, you will see an `ERROR` log similar to the below:
 +
- ## More shortcode examples
- More shortcode examples can be found in the [shortcodes directory for spf13.com][spfscs] and the [shortcodes directory for the Hugo docs][docsshortcodes].
++```sh
 +ERROR 2018/11/07 10:05:55 missing value for parameter name: "/Users/bep/dev/go/gohugoio/hugo/docs/content/en/variables/shortcodes.md:32:1"
 +```
 +
- {{< code-toggle file="hugo" >}}
 +## Inline shortcodes
 +
 +You can also implement your shortcodes inline -- e.g. where you use them in the content file. This can be useful for scripting that you only need in one place.
 +
 +This feature is disabled by default, but can be enabled in your site configuration:
 +
-  ```go-text-template
++{{< code-toggle file=hugo >}}
 +enableInlineShortcodes = true
 +{{< /code-toggle >}}
 +
 +It is disabled by default for security reasons. The security model used by Hugo's template handling assumes that template authors are trusted, but that the content files are not, so the templates are injection-safe from malformed input data. But in most situations you have full control over the content, too, and then `enableInlineShortcodes = true` would be considered safe. But it's something to be aware of: It allows ad-hoc [Go Text templates](https://golang.org/pkg/text/template/) to be executed from the content files.
 +
 +And once enabled, you can do this in your content files:
 +
-  ```go-text-template
++ ```go-html-template
 + {{</* time.inline */>}}{{ now }}{{</* /time.inline */>}}
 + ```
 +
 +The above will print the current date and time.
 +
 + Note that an inline shortcode's inner content is parsed and executed as a Go text template with the same context as a regular shortcode template.
 +
 +This means that the current page can be accessed via `.Page.Title` etc. This also means that there are no concept of "nested inline shortcodes".
 +
 +The same inline shortcode can be reused later in the same content file, with different parameters if needed, using the self-closing syntax:
 +
- [parent]: /variables/shortcodes/
- [shortcodesvars]: /variables/shortcodes/
++ ```go-html-template
 +{{</* time.inline /*/>}}
 +```
 +
 +[basic content files]: /content-management/formats/
 +[built-in shortcode]: /content-management/shortcodes/
 +[config]: /getting-started/configuration/
 +[Content Management: Shortcodes]: /content-management/shortcodes/#using-hugo-s-built-in-shortcodes
 +[source organization]: /getting-started/directory-structure/
 +[docsshortcodes]: https://github.com/gohugoio/hugo/tree/master/docs/layouts/shortcodes
 +[figure]: /content-management/shortcodes/#figure
 +[hugosc]: /content-management/shortcodes/#using-hugo-s-built-in-shortcodes
 +[lookup order]: /templates/lookup-order/
 +[pagevars]: /variables/page/
++[parent]: /variables/shortcode/
++[shortcodesvars]: /variables/shortcode/
 +[spfscs]: https://github.com/spf13/spf13.com/tree/master/layouts/shortcodes
 +[vimeoexample]: #single-flexible-example-vimeo
 +[youtubeshortcode]: /content-management/shortcodes/#youtube
index a32e8231c81294dbc96509fd5f1cd560753e8586,0000000000000000000000000000000000000000..cd8a2715cba60b2694486035304c2eae977def92
mode 100644,000000..100644
--- /dev/null
@@@ -1,85 -1,0 +1,85 @@@
- aliases: [/layout/content/]
 +---
 +title: Single page templates
 +description: The primary view of content in Hugo is the single view. Hugo will render every Markdown file provided with a corresponding single template.
 +categories: [templates]
 +keywords: [page, templates]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 50
 +weight: 50
- {{< code file="layouts/posts/single.html" >}}
 +toc: true
++aliases: [/layout/content/]
 +---
 +
 +## Single page template lookup order
 +
 +See [Template Lookup](/templates/lookup-order/).
 +
 +## Example single page templates
 +
 +Content pages are of the type `page` and will therefore have all the [page variables][pagevars] and [site variables] available to use in their templates.
 +
 +### `posts/single.html`
 +
 +This single page template makes use of Hugo [base templates], the [`.Format` function] for dates, the [`.WordCount` page variable][pagevars], and ranges through the single content's specific [taxonomies][pagetaxonomy]. [`with`] is also used to check whether the taxonomies are set in the front matter.
 +
-         <h5 id="wordcount"> {{ .WordCount }} Words </h5>
++{{< code file=layouts/posts/single.html >}}
 +{{ define "main" }}
 +  <section id="main">
 +    <h1 id="title">{{ .Title }}</h1>
 +    <div>
 +      <article id="content">
 +        {{ .Content }}
 +      </article>
 +    </div>
 +  </section>
 +  <aside id="meta">
 +    <div>
 +      <section>
 +        <h4 id="date"> {{ .Date.Format "Mon Jan 2, 2006" }} </h4>
-         <a class="previous" href="{{ .Permalink }}"> {{ .Title }}</a>
++        <h5 id="wordcount"> {{ .WordCount }} Words</h5>
 +      </section>
 +      {{ with .GetTerms "topics" }}
 +        <ul id="topics">
 +          {{ range . }}
 +            <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
 +          {{ end }}
 +        </ul>
 +      {{ end }}
 +      {{ with .GetTerms "tags" }}
 +        <ul id="tags">
 +          {{ range . }}
 +            <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
 +          {{ end }}
 +        </ul>
 +      {{ end }}
 +    </div>
 +    <div>
 +      {{ with .PrevInSection }}
-         <a class="next" href="{{ .Permalink }}"> {{ .Title }}</a>
++        <a class="previous" href="{{ .RelPermalink }}"> {{ .LinkTitle }}</a>
 +      {{ end }}
 +      {{ with .NextInSection }}
- [`.format` function]: /functions/format/
++        <a class="next" href="{{ .RelPermalink }}"> {{ .LinkTitle }}</a>
 +      {{ end }}
 +    </div>
 +  </aside>
 +{{ end }}
 +{{< /code >}}
 +
 +To easily generate new instances of a content type (e.g., new `.md` files in a section like `project/`) with preconfigured front matter, use [content archetypes][archetypes].
 +
 +[archetypes]: /content-management/archetypes/
 +[base templates]: /templates/base/
 +[content type]: /content-management/types/
 +[directory structure]: /getting-started/directory-structure/
 +[dry]: https://en.wikipedia.org/wiki/Don%27t_repeat_yourself
++[`.format` function]: /methods/time/format/
 +[front matter]: /content-management/front-matter/
 +[pagetaxonomy]: /templates/taxonomy-templates/#list-terms-assigned-to-a-page
 +[pagevars]: /variables/page/
 +[partials]: /templates/partials/
 +[section]: /content-management/sections/
 +[site variables]: /variables/site/
 +[spf13]: https://spf13.com/
 +[`with`]: /functions/go-template/with/
index 4f86380f160be84c436425c7a4d80c9a939f7fef,0000000000000000000000000000000000000000..07acfdb63b2bf333076573316821fd3d3d853321
mode 100644,000000..100644
--- /dev/null
@@@ -1,79 -1,0 +1,79 @@@
- keywords: [sitemap, xml, templates]
 +---
 +title: Sitemap templates
 +description: Hugo provides built-in sitemap templates.
 +categories: [templates]
- aliases: [/layout/sitemap/,/templates/sitemap/]
++keywords: [sitemap,xml,templates]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 170
 +weight: 170
- {{< code-toggle config="sitemap" />}}
 +toc: true
++aliases: [/layout/sitemap/,/templates/sitemap/]
 +---
 +
 +## Overview
 +
 +Hugo's built-in sitemap templates conform to v0.9 of the [sitemap protocol].
 +
 +With a monolingual project, Hugo generates a sitemap.xml file in the root of the [`publishDir`] using the built-in [sitemap.xml] template.
 +
 +With a multilingual project, Hugo generates:
 +
 +- A sitemap.xml file in the root of each site (language) using the built-in [sitemap.xml] template
 +- A sitemap.xml file in the root of the [`publishDir`] using the built-in [sitemapindex.xml] template
 +
 +## Configuration
 +
 +Set the default values for [change frequency] and [priority], and the name of the generated file, in your site configuration.
 +
- {{< code-toggle file="news.md" fm=true >}}
++{{< code-toggle config=sitemap />}}
 +
 +changefreq
 +: How frequently a page is likely to change. Valid values are `always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly`, and `never`. Default is `""` (change frequency omitted from rendered sitemap).
 +
 +filename
 +: The name of the generated file. Default is `sitemap.xml`.
 +
 +priority
 +: The priority of a page relative to any other page on the site. Valid values range from 0.0 to 1.0. Default is `-1` (priority omitted from rendered sitemap).
 +
 +## Override default values
 +
 +Override the default values for a given page in front matter.
 +
- {{< code-toggle file="hugo" >}}
++{{< code-toggle file=news.md fm=true >}}
 +title = 'News'
 +[sitemap]
 +  changefreq = 'weekly'
 +  priority = 0.8
 +{{</ code-toggle >}}
 +
 +## Override built-in templates
 +
 +To override the built-in sitemap.xml template, create a new file in either of these locations:
 +
 +- layouts/sitemap.xml
 +- layouts/_default/sitemap.xml
 +
 +When ranging through the page collection, access the _change frequency_ and _priority_ with `.Sitemap.ChangeFreq` and `.Sitemap.Priority` respectively.
 +
 +To override the built-in sitemapindex.xml template, create a new file in either of these locations:
 +
 +- layouts/sitemapindex.xml
 +- layouts/_default/sitemapindex.xml
 +
 +## Disable sitemap generation
 +
 +You may disable sitemap generation in your site configuration:
 +
++{{< code-toggle file=hugo >}}
 +disableKinds = ['sitemap']
 +{{</ code-toggle >}}
 +
 +[`publishDir`]: /getting-started/configuration#publishdir
 +[change frequency]: <https://www.sitemaps.org/protocol.html#changefreqdef>
 +[priority]: <https://www.sitemaps.org/protocol.html#priority>
 +[sitemap protocol]: <https://www.sitemaps.org/protocol.html>
 +[sitemap.xml]: <https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/sitemap.xml>
 +[sitemapindex.xml]: <https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/sitemapindex.xml>
index 1b15bd4efa1362a2d08bcfaf0a89d0f1e1f97320,0000000000000000000000000000000000000000..ff149e9401c2ece1a28756a0ae05a7d294c215fe
mode 100644,000000..100644
--- /dev/null
@@@ -1,330 -1,0 +1,318 @@@
- aliases: [/taxonomies/displaying/,/templates/terms/,/indexes/displaying/,/taxonomies/templates/,/indexes/ordering/, /templates/taxonomies/, /templates/taxonomy/]
 +---
 +title: Taxonomy templates
 +description: Taxonomy templating includes taxonomy list pages, taxonomy terms pages, and using taxonomies in your single page templates.
 +categories: [templates]
 +keywords: [taxonomies,metadata,front matter,terms,templates]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 90
 +weight: 90
- <!-- NOTE! Check on https://github.com/gohugoio/hugo/issues/2826 for shifting of terms' pages to .Data.Pages AND
- https://discourse.gohugo.io/t/how-to-specify-category-slug/4856/15 for original discussion.-->
 +toc: true
++aliases: [/taxonomies/displaying/,/templates/terms/,/indexes/displaying/,/taxonomies/templates/,/indexes/ordering/, /templates/taxonomies/, /templates/taxonomy/]
 +---
 +
-       <a href="{{ .Permalink }}">{{ .Title }}</a>
 +Hugo includes support for user-defined groupings of content called **taxonomies**. Taxonomies are classifications that demonstrate logical relationships between content. See [Taxonomies under Content Management](/content-management/taxonomies) if you are unfamiliar with how Hugo leverages this powerful feature.
 +
 +Hugo provides multiple ways to use taxonomies throughout your project templates:
 +
 +* Order the way content associated with a taxonomy term is displayed in a [taxonomy list template](#taxonomy-list-templates)
 +* Order the way the terms for a taxonomy are displayed in a [taxonomy terms template](#taxonomy-terms-templates)
 +* List a single content's taxonomy terms within a [single page template]
 +
 +## Taxonomy list templates
 +
 +Taxonomy list page templates are lists and therefore have all the variables and methods available to [list pages][lists].
 +
 +### Taxonomy list template lookup order
 +
 +See [Template Lookup](/templates/lookup-order/).
 +
 +## Taxonomy terms templates
 +
 +### Taxonomy terms templates lookup order
 +
 +See [Template Lookup](/templates/lookup-order/).
 +
 +### Taxonomy methods
 +
 +A Taxonomy is a `map[string]WeightedPages`.
 +
 +.Get TERM
 +: Returns the WeightedPages for a given term. For example: ;
 +`site.Taxonomies.tags.Get "tag-a"`.
 +
 +.Count TERM
 +: The number of pieces of content assigned to the given term. For example: \
 +`site.Taxonomies.tags.Count "tag-a"`.
 +
 +.Alphabetical
 +: Returns an OrderedTaxonomy (slice) ordered by term.
 +
 +.ByCount
 +: Returns an OrderedTaxonomy (slice) ordered by number of entries.
 +
 +.Reverse
 +: Returns an OrderedTaxonomy (slice) in reverse order. Must be used with an OrderedTaxonomy.
 +
 +### OrderedTaxonomy
 +
 +Since Maps are unordered, an OrderedTaxonomy is a special structure that has a defined order.
 +
 +```go
 +[]struct {
 +    Name          string
 +    WeightedPages WeightedPages
 +}
 +```
 +
 +Each element of the slice has:
 +
 +.Term
 +: The Term used.
 +
 +.WeightedPages
 +: A slice of Weighted Pages.
 +
 +.Count
 +: The number of pieces of content assigned to this term.
 +
 +.Page
 +: Returns a page reference for this term.
 +
 +.Pages
 +: All Pages assigned to this term. All [list methods][renderlists] are available to this.
 +
 +## WeightedPages
 +
 +WeightedPages is simply a slice of WeightedPage.
 +
 +```go
 +type WeightedPages []WeightedPage
 +```
 +
 +.Count
 +: The number of pieces of content assigned to this term.
 +
 +.Page
 +: Returns a page reference for this term.
 +
 +.Pages
 +: Returns a slice of pages, which then can be ordered using any of the [list methods][renderlists].
 +
 +## Displaying custom metadata in taxonomy terms templates
 +
 +If you need to display custom metadata for each taxonomy term, you will need to create a page for that term at `/content/<TAXONOMY>/<TERM>/_index.md` and add your metadata in its front matter, [as explained in the taxonomies documentation](/content-management/taxonomies/#add-custom-metadata-to-a-taxonomy-or-term). Based on the Actors taxonomy example shown there, within your taxonomy terms template, you may access your custom fields by iterating through the variable `.Pages` as such:
 +
 +```go-html-template
 +<ul>
 +  {{ range .Pages }}
 +    <li>
- <!-- Begin /taxonomies/ordering/ -->
++      <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
 +      {{ .Params.wikipedia }}
 +    </li>
 +  {{ end }}
 +</ul>
 +```
 +
- <!-- [See Also Taxonomy Lists](/templates/list/) -->
 +## Order taxonomies
 +
 +Taxonomies can be ordered by either alphabetical key or by the number of content pieces assigned to that key.
 +
 +### Order alphabetically example
 +
 +```go-html-template
 +<ul>
 +  {{ range .Data.Terms.Alphabetical }}
 +    <li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
 +  {{ end }}
 +</ul>
 +```
 +
- {{< code-toggle file="content/example.md" fm=true copy=false >}}
 +## Order content within taxonomies
 +
 +Hugo uses both `date` and `weight` to order content within taxonomies.
 +
 +Each piece of content in Hugo can optionally be assigned a date. It can also be assigned a weight for each taxonomy it is assigned to.
 +
 +When iterating over content within taxonomies, the default sort is the same as that used for section and list pages: first by weight, then by date. This means that if the weights for two pieces of content are the same, then the more recent content will be displayed first.
 +
 +The default weight for any piece of content is 0. Zero means "does not have a weight", not "has a weight of numerical value zero".
 +
 +Weights of zero are thus treated specially: if two pages have unequal weights, and one of them is zero, then the zero-weighted page will always appear after the other one, regardless of the other's weight. Zero weights should thus be used with care: for example, if both positive and negative weights are used to extend a sequence in both directions, a zero-weighted page will appear not in the middle of the list, but at the end.
 +
 +### Assign weight
 +
 +Content can be assigned weight for each taxonomy that it's assigned to.
 +
- <!-- Begin /taxonomies/templates/ -->
++{{< code-toggle file=content/example.md fm=true >}}
 +tags = [ "a", "b", "c" ]
 +tags_weight = 22
 +categories = ["d"]
 +title = "Example"
 +categories_weight = 44
 +{{< /code-toggle >}}
 +
 +The convention is `taxonomyname_weight`.
 +
 +In the above example, this piece of content has a weight of 22 which applies to the sorting when rendering the pages assigned to the "a", "b" and "c" values of the 'tag' taxonomy.
 +
 +It has also been assigned the weight of 44 when rendering the 'd' category.
 +
 +With this the same piece of content can appear in different positions in different taxonomies.
 +
 +Currently taxonomies only support the default ordering of content which is weight -> date.
 +
- <!-- Begin /taxonomies/displaying/ -->
 +There are two different templates that the use of taxonomies will require you to provide.
 +
 +Both templates are covered in detail in the templates section.
 +
 +A [list template](/templates/lists/) is any template that will be used to render multiple pieces of content in a single html page. This template will be used to generate all the automatically created taxonomy pages.
 +
 +A [taxonomy template](/templates/taxonomy-templates/) is a template used to
 +generate the list of terms for a given template.
 +
-           <li hugo-nav="{{ .RelPermalink }}"><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
 +There are four common ways you can display the data in your
 +taxonomies in addition to the automatic taxonomy pages created by hugo
 +using the [list templates](/templates/lists/):
 +
 +1. For a given piece of content, you can list the terms attached
 +2. For a given piece of content, you can list other content with the same
 +   term
 +3. You can list all terms for a taxonomy
 +4. You can list all taxonomies (with their terms)
 +
 +## List terms assigned to a page
 +
 +List the terms assigned to a page using the `.Page.GetTerms` method.
 +
 +To render an unordered list:
 +
 +```go-html-template
 +{{ $taxonomy := "tags" }}
 +{{ with .GetTerms $taxonomy }}
 +  <p>{{ (site.GetPage $taxonomy).LinkTitle }}:</p>
 +  <ul>
 +    {{ range . }}
 +      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
 +    {{ end }}
 +  </ul>
 +{{ end }}
 +```
 +
 +To render a comma-delimited list:
 +
 +```go-html-template
 +{{ $taxonomy := "tags" }}
 +{{ with .GetTerms $taxonomy }}
 +  <p>
 +    {{ (site.GetPage $taxonomy).LinkTitle }}:
 +    {{ range $k, $_ := . -}}
 +      {{ if $k }}, {{ end }}
 +      <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
 +    {{- end }}
 +  </p>
 +{{ end }}
 +```
 +
 +## List content with the same taxonomy term
 +
 +If you are using a taxonomy for something like a series of posts, you can list individual pages associated with the same taxonomy. This is also a quick and dirty method for showing related content:
 +
 +### Example: showing content in same series
 +
 +```go-html-template
 +<ul>
 +  {{ range .Site.Taxonomies.series.golang }}
 +    <li><a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a></li>
 +  {{ end }}
 +</ul>
 +```
 +
 +## List all content in a given taxonomy
 +
 +This would be very useful in a sidebar as “featured content”. You could even have different sections of “featured content” by assigning different terms to the content.
 +
 +### Example: grouping "featured" content
 +
 +```go-html-template
 +<section id="menu">
 +  <ul>
 +    {{ range $key, $taxonomy := .Site.Taxonomies.featured }}
 +      <li>{{ $key }}</li>
 +      <ul>
 +        {{ range $taxonomy.Pages }}
- {{< code file="layouts/partials/all-taxonomies.html" >}}
++          <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
 +        {{ end }}
 +      </ul>
 +    {{ end }}
 +  </ul>
 +</section>
 +```
 +
 +## Render a site's taxonomies
 +
 +If you wish to display the list of all keys for your site's taxonomy, you can retrieve them from the [`.Site` variable][sitevars] available on every page.
 +
 +This may take the form of a tag cloud, a menu, or simply a list.
 +
 +The following example displays all terms in a site's tags taxonomy:
 +
 +### Example: list all site tags
 +
 +```go-html-template
 +<ul>
 +  {{ range .Site.Taxonomies.tags }}
 +    <li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
 +  {{ end }}
 +</ul>
 +```
 +
 +### Example: list all taxonomies, terms, and assigned content
 +
 +This example will list all taxonomies and their terms, as well as all the content assigned to each of the terms.
 +
- {{< code file="links-to-all-tags.html" >}}
++{{< code file=layouts/partials/all-taxonomies.html >}}
 +<ul>
 +  {{ range $taxonomy, $terms := site.Taxonomies }}
 +    <li>
 +      {{ with site.GetPage $taxonomy }}
 +        <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
 +      {{ end }}
 +      <ul>
 +        {{ range $term, $weightedPages := $terms }}
 +          <li>
 +            <a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a>
 +            <ul>
 +              {{ range $weightedPages }}
 +                <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
 +              {{ end }}
 +            </ul>
 +          </li>
 +        {{ end }}
 +      </ul>
 +    </li>
 +  {{ end }}
 +</ul>
 +{{< /code >}}
 +
 +## `.Site.GetPage` for taxonomies
 +
 +Because taxonomies are lists, the [`.GetPage` function][getpage] can be used to get all the pages associated with a particular taxonomy term using a terse syntax. The following ranges over the full list of tags on your site and links to each of the individual taxonomy pages for each term without having to use the more fragile URL construction of the ["List All Site Tags" example above](#example-list-all-site-tags):
 +
-       <li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
++{{< code file=links-to-all-tags.html >}}
 +{{ $taxo := "tags" }}
 +<ul class="{{ $taxo }}">
 +  {{ with ($.Site.GetPage (printf "/%s" $taxo)) }}
 +    {{ range .Pages }}
- [delimit]: /functions/collections/delimit/
- [getpage]: /functions/getpage/
++      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
 +    {{ end }}
 +  {{ end }}
 +</ul>
 +{{< /code >}}
 +
++[getpage]: /methods/page/getpage
 +[lists]: /templates/lists/
 +[renderlists]: /templates/lists/
 +[single page template]: /templates/single-page-templates/
 +[sitevars]: /variables/site/
index 3d00a4ed612ed80d6527ce770b88a07c652aa923,0000000000000000000000000000000000000000..e49f1debb1c12afa7b47f0e58d972a637deaf3d9
mode 100644,000000..100644
--- /dev/null
@@@ -1,114 -1,0 +1,113 @@@
 +---
 +title: Content view templates
 +description: Hugo can render alternative views of your content, useful in list and summary views.
 +categories: [templates]
 +keywords: [views]
 +menu:
 +  docs:
 +    parent: templates
 +    weight: 110
 +weight: 110
 +toc: true
 +---
 +
 +These alternative **content views** are especially useful in [list templates][lists].
 +
 +The following are common use cases for content views:
 +
 +* You want content of every type to be shown on the homepage but only with limited [summary views][summaries].
 +* You only want a bulleted list of your content on a [taxonomy list page][taxonomylists]. Views make this very straightforward by delegating the rendering of each different type of content to the content itself.
 +
 +## Create a content view
 +
 +To create a new view, create a template in each of your different content type directories with the view name. The following example contains an "li" view and a "summary" view for the `posts` and `project` content types. As you can see, these sit next to the [single content view][single] template, `single.html`. You can even provide a specific view for a given type and continue to use the `_default/single.html` for the primary view.
 +
 +```txt
 +  ▾ layouts/
 +    ▾ posts/
 +        li.html
 +        single.html
 +        summary.html
 +    ▾ project/
 +        li.html
 +        single.html
 +        summary.html
 +```
 +
 +Hugo also has support for a default content template to be used in the event that a specific content view template has not been provided for that type. Content views can also be defined in the `_default` directory and will work the same as list and single templates who eventually trickle down to the `_default` directory as a matter of the lookup order.
 +
- {{< code file="layouts/_default/list.html" >}}
 +```txt
 +▾ layouts/
 +  ▾ _default/
 +      li.html
 +      single.html
 +      summary.html
 +```
 +
 +## Which template will be rendered?
 +
 +The following is the [lookup order][lookup] for content views:
 +
 +1. `/layouts/<TYPE>/<VIEW>.html`
 +2. `/layouts/_default/<VIEW>.html`
 +3. `/themes/<THEME>/layouts/<TYPE>/<VIEW>.html`
 +4. `/themes/<THEME>/layouts/_default/<VIEW>.html`
 +
 +## Example: content view inside a list
 +
 +The following example demonstrates how to use content views inside your [list templates][lists].
 +
 +### `list.html`
 +
 +In this example, `.Render` is passed into the template to call the [render function][render]. `.Render` is a special function that instructs content to render itself with the view template provided as the first argument. In this case, the template is going to render the `summary.html` view that follows:
 +
- {{< code file="layouts/_default/summary.html" >}}
++{{< code file=layouts/_default/list.html >}}
 +<main id="main">
 +  <div>
 +    <h1 id="title">{{ .Title }}</h1>
 +    {{ range .Pages }}
 +      {{ .Render "summary" }}
 +    {{ end }}
 +  </div>
 +</main>
 +{{< /code >}}
 +
 +### `summary.html`
 +
 +Hugo will pass the entire page object to the following `summary.html` view template. (See [Page Variables][pagevars] for a complete list.)
 +
-     <h2><a href='{{ .Permalink }}'> {{ .Title }}</a> </h2>
++{{< code file=layouts/_default/summary.html >}}
 +<article class="post">
 +  <header>
-   <a href='{{ .Permalink }}'><nobr>Read more →</nobr></a>
++    <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
 +    <div class="post-meta">{{ .Date.Format "Mon, Jan 2, 2006" }} - {{ .FuzzyWordCount }} Words </div>
 +  </header>
 +  {{ .Summary }}
 +  <footer>
- {{< code file="layouts/_default/li.html" >}}
++  <a href='{{ .RelPermalink }}'>Read&nbsp;more&nbsp;&raquo;</a>
 +  </footer>
 +</article>
 +{{< /code >}}
 +
 +### `li.html`
 +
 +Continuing on the previous example, we can change our render function to use a smaller `li.html` view by changing the argument in the call to the `.Render` function (i.e., `{{ .Render "li" }}`).
 +
-   <a href="{{ .Permalink }}">{{ .Title }}</a>
++{{< code file=layouts/_default/li.html >}}
 +<li>
- [render]: /functions/render/
++  <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
 +  <div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
 +</li>
 +{{< /code >}}
 +
 +[lists]: /templates/lists/
 +[lookup]: /templates/lookup-order/
 +[pagevars]: /variables/page/
++[render]: /methods/page/render/
 +[single]: /templates/single-page-templates/
 +[spf]: https://spf13.com
 +[spfsourceli]: https://github.com/spf13/spf13.com/blob/master/layouts/_default/li.html
 +[spfsourcesection]: https://github.com/spf13/spf13.com/blob/master/layouts/_default/section.html
 +[spfsourcesummary]: https://github.com/spf13/spf13.com/blob/master/layouts/_default/summary.html
 +[summaries]: /content-management/summaries/
 +[taxonomylists]: /templates/taxonomy-templates/
index 6cc8c44d70a64037299e551eccb9a7c5dc2c124f,0000000000000000000000000000000000000000..006bed053055889572af05bc41cbade69cba835c
mode 100644,000000..100644
--- /dev/null
@@@ -1,20 -1,0 +1,20 @@@
- categories: [developer tools]
 +---
 +title: Developer tools
 +linkTitle: Overview
 +description: In addition to Hugo's powerful CLI, there is a large number of community-developed tool chains for Hugo developers.
++categories: []
 +keywords: []
 +menu:
 +  docs:
 +    identifier: developer-tools-overview
 +    parent: developer-tools
 +    weight: 10
 +weight: 10
 +---
 +
 +One of Hugo's greatest strengths is its passionate---and always evolving---developer community. With the exception of the `highlight` shortcode mentioned in [Syntax Highlighting][syntax], the tools and other projects featured in this section are offerings from both commercial services and open-source projects, many of which are developed by Hugo developers just like you.
 +
 +[See the popularity of Hugo compared with other static site generators.][staticgen]
 +
 +[staticgen]: https://staticgen.com
 +[syntax]: /content-management/syntax-highlighting/
index ea83f37c685334bcdad0bf31497829fafe7e1f80,0000000000000000000000000000000000000000..d94b7af0f861aaa551e6afb1650d7a1731b5a999
mode 100644,000000..100644
--- /dev/null
@@@ -1,46 -1,0 +1,66 @@@
- title: Editor plugins for Hugo
 +---
- description: The Hugo community uses a wide range of preferred tools and has developed plug-ins for some of the most popular text editors to help automate parts of your workflow.
++title: Editor plugins
 +linkTitle: Editor plugins
- keywords: [editor, plug-ins]
++description: The Hugo community uses a wide range of tools and has developed plugins for some of the most popular text editors to help automate parts of your workflow.
 +categories: [developer tools]
- ## Sublime Text
++keywords: [editor,plugin]
 +menu:
 +  docs:
 +    parent: developer-tools
 +    weight: 20
 +weight: 20
++toc: true
 +---
 +
- * [Hugofy](https://github.com/akmittal/Hugofy). Hugofy is a plugin for Sublime Text 3 to make life easier to use Hugo static site generator.
- * [Hugo Snippets](https://packagecontrol.io/packages/Hugo%20Snippets). Hugo Snippets is a useful plugin for adding automatic snippets to Sublime Text 3.
++## Visual Studio Code
 +
- ## Visual Studio Code
++[Front Matter](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter)
++: Once you go for a static site, you need to think about how you are going to manage your articles. Front matter is a tool that helps you maintain the metadata/front matter of your articles like: creation date, modified date, slug, tile, SEO check, and more.
 +
- * [Front Matter](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter). Once you go for a static site, you need to think about how you are going to manage your articles. Front matter is a tool that helps you maintain the metadata/front matter of your articles like: creation date, modified date, slug, tile, SEO check, and many more...
- * [Hugo Helper](https://marketplace.visualstudio.com/items?itemName=rusnasonov.vscode-hugo). Hugo Helper is a plugin for Visual Studio Code that has some useful commands for Hugo. The source code can be found [here](https://github.com/rusnasonov/vscode-hugo).
- * [Hugo Language and Syntax Support](https://marketplace.visualstudio.com/items?itemName=budparr.language-hugo-vscode). Hugo Language and Syntax Support is a Visual Studio Code plugin for Hugo syntax highlighting and snippets. The source code can be found [here](https://github.com/budparr/language-hugo-vscode).
- * [Hugo Themer](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-hugo-themer). Hugo Themer is an extension to help you while developing themes. It allows you to easily navigate through your theme files.
- * [Hugofy](https://marketplace.visualstudio.com/items?itemName=akmittal.hugofy). Hugofy is a plugin for Visual Studio Code to "make life easier" when developing with Hugo. The source code can be found [here](https://github.com/akmittal/hugofy-vscode).
- * [Prettier Plugin for Go Templates](https://github.com/NiklasPor/prettier-plugin-go-template). Format Hugo templates using this [Prettier](https://prettier.io/) plugin. See [installation instructions](https://discourse.gohugo.io/t/38403).
- * [Syntax Highlighting for Hugo Shortcodes](https://marketplace.visualstudio.com/items?itemName=kaellarkin.hugo-shortcode-syntax). This extension adds some syntax highlighting for Shortcodes, making visual identification of individual pieces easier.
- Front Matter
- Hugo Helper
- Hugo Language and Syntax Support
- Hugo Themer
- Hugofy
- Syntax Highlighting for Hugo Shortcodes
++[Hugo Helper](https://marketplace.visualstudio.com/items?itemName=rusnasonov.vscode-hugo)
++: Hugo Helper is a plugin for Visual Studio Code that has some useful commands for Hugo. The source code can be found [here](https://github.com/rusnasonov/vscode-hugo).
++
++[Hugo Language and Syntax Support](https://marketplace.visualstudio.com/items?itemName=budparr.language-hugo-vscode)
++: Hugo Language and Syntax Support is a Visual Studio Code plugin for Hugo syntax highlighting and snippets. The source code can be found [here](https://github.com/budparr/language-hugo-vscode).
 +
- * [emacs-easy-hugo](https://github.com/masasam/emacs-easy-hugo). Emacs major mode for managing hugo blogs. Note that Hugo also supports [Org-mode][formats].
- * [ox-hugo.el](https://ox-hugo.scripter.co). Native Org-mode exporter that exports to Blackfriday Markdown with Hugo front-matter. `ox-hugo` supports two common Org blogging flows --- exporting multiple Org subtrees in a single file to multiple Hugo posts, and exporting a single Org file to a single Hugo post. It also leverages the Org tag and property inheritance features. See [*Why ox-hugo?*](https://ox-hugo.scripter.co/doc/why-ox-hugo/) for more.
++[Hugo Themer](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-hugo-themer)
++: Hugo Themer is an extension to help you while developing themes. It allows you to easily navigate through your theme files.
++
++[Hugofy](https://marketplace.visualstudio.com/items?itemName=akmittal.hugofy)
++: Hugofy is a plugin for Visual Studio Code to "make life easier" when developing with Hugo. The source code can be found [here](https://github.com/akmittal/hugofy-vscode).
++
++[Prettier Plugin for Go Templates](https://github.com/NiklasPor/prettier-plugin-go-template)
++: Format Hugo templates using this [Prettier](https://prettier.io/) plugin. See [installation instructions](https://discourse.gohugo.io/t/38403).
++
++[Syntax Highlighting for Hugo Shortcodes](https://marketplace.visualstudio.com/items?itemName=kaellarkin.hugo-shortcode-syntax)
++: This extension adds some syntax highlighting for Shortcodes, making visual identification of individual pieces easier.
 +
 +## Emacs
 +
- * [Vim Hugo Helper](https://github.com/robertbasic/vim-hugo-helper). A small Vim plugin that facilitates authoring pages and blog posts with Hugo.
- * [vim-hugo](https://github.com/phelipetls/vim-hugo). A Vim plugin with syntax highlighting for templates and a few other features.
++[emacs-easy-hugo](https://github.com/masasam/emacs-easy-hugo)
++: Emacs major mode for managing hugo blogs. Note that Hugo also supports [Org-mode][formats].
++
++[ox-hugo.el](https://ox-hugo.scripter.co)
++: Native Org-mode exporter that exports to Blackfriday Markdown with Hugo front-matter. `ox-hugo` supports two common Org blogging flows --- exporting multiple Org subtrees in a single file to multiple Hugo posts, and exporting a single Org file to a single Hugo post. It also leverages the Org tag and property inheritance features. See [*Why ox-hugo?*](https://ox-hugo.scripter.co/doc/why-ox-hugo/) for more.
++
++## Sublime Text
++
++[Hugofy](https://github.com/akmittal/Hugofy)
++: Hugofy is a plugin for Sublime Text 3 to make life easier to use Hugo static site generator.
++
++[Hugo Snippets](https://packagecontrol.io/packages/Hugo%20Snippets)
++: Hugo Snippets is a useful plugin for adding automatic snippets to Sublime Text&nbsp;3.
 +
 +## Vim
 +
++[Vim Hugo Helper]: https://github.com/robertbasic/vim-hugo-helper
++
++[Vim Hugo Helper]
++: A small Vim plugin that facilitates authoring pages and blog posts with Hugo.
++
++[xxx]: xxx
++
++[vim-hugo](https://github.com/phelipetls/vim-hugo)
++: A Vim plugin with syntax highlighting for templates and a few other features.
 +
 +[formats]: /content-management/formats/
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..acce84d8d190377f180ca981f8a13ec2ab690dd2
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,30 @@@
++---
++title: Front-end interfaces
++linkTitle: Front-ends
++description: Do you prefer a graphical user interface over a text editor? Give these front-ends a try.
++categories: [developer tools]
++keywords: [frontend, gui]
++menu:
++  docs:
++    parent: developer-tools
++    weight: 30
++weight: 30
++toc: true
++aliases: [/tools/frontends/]
++---
++
++## Commercial
++
++[CloudCannon](https://cloudcannon.com/hugo-cms/)
++: The intuitive Git-based CMS for your Hugo website. CloudCannon syncs changes from your Git repository and pushes content changes back, so your development and content teams are always in sync. Edit all of your content on the page with visual editing, build entire pages with reusable custom components and then publish confidently.
++
++[DatoCMS](https://www.datocms.com)
++: DatoCMS is a fully customizable administrative area for your static websites. Use your favorite website generator, let your clients publish new content independently, and the host the site anywhere you like.
++
++## Open source
++
++[Decap CMS](https://decapcms.org/)
++: Decap CMS is an open-source, serverless solution for managing Git based content in static sites, and it works on any platform that can host static sites. A [Hugo/Decap CMS starter](https://github.com/decaporg/one-click-hugo-cms) is available to get new projects running quickly.
++
++[Sveltia CMS](https://github.com/sveltia/sveltia-cms/)
++:  Sveltia CMS is a drop-in replacement for Decap CMS which is built from the ground up with powerful and performant modern UI library Svelte. Sveltia CMS incorporates i18n into every corner of the product, while striving to radically improve UX, performance and productivity.
index 8ba01f927d065cad4ef5d2be17af62f294d0844d,0000000000000000000000000000000000000000..0e61274c4198786eac89c49236504cfca56d2c57
mode 100644,000000..100644
--- /dev/null
@@@ -1,76 -1,0 +1,102 @@@
- keywords: [migrations, jekyll, wordpress, drupal, ghost, contentful]
 +---
 +title: Migrate to Hugo
 +linkTitle: Migrations
 +description: A list of community-developed tools for migrating from your existing static site generator or content management system to Hugo.
- aliases: [/developer-tools/migrations/, /developer-tools/migrated/]
++categories: [developer tools]
++keywords: [migrations,jekyll,wordpress,drupal,ghost,contentful]
 +menu:
 +  docs:
 +    parent: developer-tools
 +    weight: 50
 +weight: 50
- {{% note %}}
- Do you know or maintain a similar project around Hugo? Feel free to open a [pull request](https://github.com/gohugoio/hugoDocs/pulls) on GitHub if you think it should be added.
- {{% /note %}}
 +toc: true
++aliases: [/developer-tools/migrations/, /developer-tools/migrated/]
 +---
 +
 +This section highlights some projects around Hugo that are independently developed. These tools try to extend the functionality of our static site generator or help you to get started.
 +
- Alternatively, you can use the new [Jekyll import command](/commands/hugo_import_jekyll/).
 +Take a look at this list of migration tools if you currently use other blogging tools like Jekyll or WordPress but intend to switch to Hugo instead. They'll take care to export your content into Hugo-friendly formats.
 +
 +## Jekyll
 +
- - [JekyllToHugo](https://github.com/fredrikloch/JekyllToHugo) - A Small script for converting Jekyll blog posts to a Hugo site.
- - [ConvertToHugo](https://github.com/coderzh/ConvertToHugo) - Convert your blog from Jekyll to Hugo.
++Alternatively, you can use the [Jekyll import command](/commands/hugo_import_jekyll/).
 +
- - [octohug](https://github.com/codebrane/octohug) - Octopress to Hugo migrator.
++[JekyllToHugo](https://github.com/fredrikloch/JekyllToHugo)
++: A Small script for converting Jekyll blog posts to a Hugo site.
++
++[ConvertToHugo](https://github.com/coderzh/ConvertToHugo)
++: Convert your blog from Jekyll to Hugo.
 +
 +## Octopress
 +
- - [dokuwiki-to-hugo](https://github.com/wgroeneveld/dokuwiki-to-hugo) - Migrates your DokuWiki source pages from [DokuWiki syntax](https://www.dokuwiki.org/wiki:syntax) to Hugo Markdown syntax. Includes extra's like the TODO plugin. Written with extensibility in mind using python 3. Also generates a TOML header for each page. Designed to copypaste the wiki directory into your /content directory.
++[octohug](https://github.com/codebrane/octohug)
++: Octopress to Hugo migrator.
 +
 +## DokuWiki
 +
- - [wordpress-to-hugo-exporter](https://github.com/SchumacherFM/wordpress-to-hugo-exporter) - A one-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Markdown and YAML which can be dropped into Hugo. (Note: If you have trouble using this plugin, you can [export your site for Jekyll](https://wordpress.org/plugins/jekyll-exporter/) and use Hugo's built in Jekyll converter listed above.)
- - [blog2md](https://github.com/palaniraja/blog2md) - Works with [exported xml](https://en.support.wordpress.com/export/) file of your free YOUR-TLD.wordpress.com website. It also saves approved comments to `YOUR-POST-NAME-comments.md` file along with posts.
- - [wordhugopress](https://github.com/nantipov/wordhugopress) - A small utility written in Java, exports the entire WordPress site from the database and resource (e.g. images) files stored locally or remotely. Therefore, migration from the backup files is possible. Supports merging of the multiple WordPress sites into a single Hugo one.
++[dokuwiki-to-hugo](https://github.com/wgroeneveld/dokuwiki-to-hugo)
++: Migrates your DokuWiki source pages from [DokuWiki syntax](https://www.dokuwiki.org/wiki:syntax) to Hugo Markdown syntax. Includes extra's like the TODO plugin. Written with extensibility in mind using python 3. Also generates a TOML header for each page. Designed to copypaste the wiki directory into your /content directory.
 +
 +## WordPress
 +
- - [medium2md](https://github.com/gautamdhameja/medium-2-md) - A simple Medium to Hugo exporter able to import stories in one command, including front matter.
- - [medium-to-hugo](https://github.com/bgadrian/medium-to-hugo) - CLI tool written in Go to export medium posts into a Hugo compatible Markdown format. Tags and images are included. All images will be downloaded locally and linked appropriately.
++[wordpress-to-hugo-exporter](https://github.com/SchumacherFM/wordpress-to-hugo-exporter)
++: A one-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Markdown and YAML which can be dropped into Hugo. (Note: If you have trouble using this plugin, you  - \s-\scan [export your site for Jekyll](https://wordpress.org/plugins/jekyll-exporter/) and use Hugo's built in Jekyll converter listed above.)
++
++[blog2md](https://github.com/palaniraja/blog2md)
++: Works with [exported xml](https://en.support.wordpress.com/export/) file of your free YOUR-TLD.wordpress.com website. It also saves approved comments to `YOUR-POST-NAME-comments.md` file along with posts.
++
++[wordhugopress](https://github.com/nantipov/wordhugopress)
++: A small utility written in Java, exports the entire WordPress site from the database and resource (e.g. images) files stored locally or remotely. Therefore, migration from the backup files is possible. Supports merging of the multiple WordPress sites into a single Hugo one.
 +
 +## Medium
 +
- - [tumblr-importr](https://github.com/carlmjohnson/tumblr-importr) - An importer that uses the Tumblr API to create a Hugo static site.
- - [tumblr2hugomarkdown](https://github.com/Wysie/tumblr2hugomarkdown) - Export all your Tumblr content to Hugo Markdown files with preserved original formatting.
- - [Tumblr to Hugo](https://github.com/jipiboily/tumblr-to-hugo) - A migration tool that converts each of your Tumblr posts to a content file with a proper title and path. Furthermore, "Tumblr to Hugo" creates a CSV file with the original URL and the new path on Hugo, to help you setup the redirections.
++[medium2md](https://github.com/gautamdhameja/medium-2-md)
++: A simple Medium to Hugo exporter able to import stories in one command, including front matter.
++
++[medium-to-hugo](https://github.com/bgadrian/medium-to-hugo)
++: CLI tool written in Go to export medium posts into a Hugo compatible Markdown format. Tags and images are included. All images will be downloaded locally and linked appropriately.
 +
 +## Tumblr
 +
- - [drupal2hugo](https://github.com/danapsimer/drupal2hugo) - Convert a Drupal site to Hugo.
++[tumblr-importr](https://github.com/carlmjohnson/tumblr-importr)
++: An importer that uses the Tumblr API to create a Hugo static site.
++
++[tumblr2hugomarkdown](https://github.com/Wysie/tumblr2hugomarkdown)
++: Export all your Tumblr content to Hugo Markdown files with preserved original formatting.
++
++[Tumblr to Hugo](https://github.com/jipiboily/tumblr-to-hugo)
++: A migration tool that converts each of your Tumblr posts to a content file with a proper title and path. Furthermore, "Tumblr to Hugo" creates a CSV file with the original URL and the new path on Hugo, to help you setup the redirections.
 +
 +## Drupal
 +
- - [hugojoomla](https://github.com/davetcc/hugojoomla) - This utility written in Java takes a Joomla database and converts all the content into Markdown files. It changes any URLs that are in Joomla's internal format and converts them to a suitable form.
++[drupal2hugo](https://github.com/danapsimer/drupal2hugo)
++: Convert a Drupal site to Hugo.
 +
 +## Joomla
 +
- - [blogimport](https://github.com/natefinch/blogimport) - A tool to import from Blogger posts to Hugo.
- - [blogger-to-hugo](https://pypi.org/project/blogger-to-hugo/) - Another tool to import Blogger posts to Hugo. It also downloads embedded images so they will be stored locally.
- - [blog2md](https://github.com/palaniraja/blog2md) - Works with [exported xml](https://support.google.com/blogger/answer/41387?hl=en) file of your YOUR-TLD.blogspot.com website. It also saves comments to `YOUR-POST-NAME-comments.md` file along with posts.
- - [BloggerToHugo](https://github.com/huanlin/blogger-to-hugo) - Yet another tool to import Blogger posts to Hugo. For Windows platform only, and .NET Framework 4.5 is required. See README.md before using this tool.
++[hugojoomla](https://github.com/davetcc/hugojoomla)
++: This utility written in Java takes a Joomla database and converts all the content into Markdown files. It changes any URLs that are in Joomla's internal format and converts them to a suitable form.
 +
 +## Blogger
 +
- - [contentful-hugo](https://github.com/ModiiMedia/contentful-hugo) - A tool to create content-files for Hugo from content on [Contentful](https://www.contentful.com/).
++[blogimport](https://github.com/natefinch/blogimport)
++: A tool to import from Blogger posts to Hugo.
++
++[blogger-to-hugo](https://pypi.org/project/blogger-to-hugo/)
++: Another tool to import Blogger posts to Hugo. It also downloads embedded images so they will be stored locally.
++
++[blog2md](https://github.com/palaniraja/blog2md)
++: Works with [exported xml](https://support.google.com/blogger/answer/41387?hl=en) file of your YOUR-TLD.blogspot.com website. It also saves comments to `YOUR-POST-NAME-comments.md` file along with posts.
++
++[BloggerToHugo](https://github.com/huanlin/blogger-to-hugo)
++: Yet another tool to import Blogger posts to Hugo. For Windows platform only, and .NET Framework 4.5 is required. See README.md before using this tool.
 +
 +## Contentful
 +
- - [BlogML2Hugo](https://github.com/jijiechen/BlogML2Hugo) - A tool that helps you convert BlogML xml file to Hugo Markdown files. Users need to take care of links to attachments and images by themselves. This helps the blogs that export BlogML files (e.g. BlogEngine.NET) transform to hugo sites easily.
++[contentful-hugo](https://github.com/ModiiMedia/contentful-hugo)
++: A tool to create content-files for Hugo from content on [Contentful](https://www.contentful.com/).
 +
 +## BlogML
 +
++[BlogML2Hugo](https://github.com/jijiechen/BlogML2Hugo)
++: A tool that helps you convert BlogML xml file to Hugo Markdown files. Users need to take care of links to attachments and images by themselves. This helps the blogs that export BlogML files (e.g. BlogEngine.NET) transform to hugo sites easily.
index 272827911471f2fd4c5ee0d92778adb5ad13ff5b,0000000000000000000000000000000000000000..f5243632ca84e50229e384eca761cb4d3d9b5e6d
mode 100644,000000..100644
--- /dev/null
@@@ -1,23 -1,0 +1,23 @@@
- keywords: [frontend, gui]
 +---
 +title: Other community projects
 +linkTitle: Other projects
 +description: Some interesting projects developed by the Hugo community that don't quite fit into our other developer tool categories.
 +categories: [developer tools]
- - [Hugo SFTP Upload](https://github.com/thomasmey/HugoSftpUpload) Syncs the local build of your Hugo website with your remote webserver via SFTP.
++keywords: [frontend,gui]
 +menu:
 +  docs:
 +    parent: developer-tools
 +    weight: 60
 +weight: 60
 +---
 +
 +And for all the other small things around Hugo:
 +
 +- [hugo-gallery](https://github.com/icecreammatt/hugo-gallery) lets you create an image gallery for Hugo sites.
 +- [flickr-hugo-embed](https://github.com/nikhilm/flickr-hugo-embed) prints shortcodes to embed a set of images from an album on Flickr into Hugo.
 +- [hugo-openapispec-shortcode](https://github.com/tenfourty/hugo-openapispec-shortcode) A shortcode that allows you to include [Open API Spec](https://openapis.org) (formerly known as Swagger Spec) in a page.
 +- [HugoPhotoSwipe](https://github.com/GjjvdBurg/HugoPhotoSwipe) makes it easy to create image galleries using PhotoSwipe.
++- [Hugo SFTP Upload](https://github.com/thomasmey/HugoSftpUpload) Syncs the local build of your Hugo website with your remote web server via SFTP.
 +- [Emacs Easy Hugo](https://github.com/masasam/emacs-easy-hugo) Emacs package for writing blog posts in markdown or org-mode and building your site with Hugo.
 +- [JAMStack Themes](https://jamstackthemes.dev/ssg/hugo/). JAMStack themes is a collection of site themes filterable by static site generator and supported CMS to help build CMS-connected sites using Hugo (linking to Hugo-specific themes).
 +- [plausible-hugo](https://github.com/divinerites/plausible-hugo). Easy Hugo integration for Plausible Analytics, a simple, open-source, lightweight and privacy-friendly web analytics alternative to Google Analytics.
index 620ba4862a6764ec3b4450c20c52c57c057f8d50,0000000000000000000000000000000000000000..041174118cc92210db1bdee950962847e3e619c6
mode 100644,000000..100644
--- /dev/null
@@@ -1,30 -1,0 +1,55 @@@
- title: Search for your Hugo website
 +---
- * [GitHub Gist for Hugo Workflow](https://gist.github.com/sebz/efddfc8fdcb6b480f567). This gist contains a simple workflow to create a search index for your static website. It uses a simple Grunt script to index all your content files and [lunr.js](https://lunrjs.com/) to serve the search results.
++title: Search tools
 +linkTitle: Search
 +description: See some of the open-source and commercial search options for your newly created Hugo website.
++categories: [developer tools]
++keywords: [search]
 +menu:
 +  docs:
 +    parent: developer-tools
 +    weight: 40
 +weight: 40
 +toc: true
 +---
 +
 +A static website with a dynamic search function? Yes, Hugo provides an alternative to embeddable scripts from Google or other search engines for static websites. Hugo allows you to provide your visitors with a custom search function by indexing your content files directly.
 +
- * [hugo-lunr](https://www.npmjs.com/package/hugo-lunr). A simple way to add site search to your static Hugo site using [lunr.js](https://lunrjs.com/). Hugo-lunr will create an index file of any HTML and Markdown documents in your Hugo project.
- * [hugo-lunr-zh](https://www.npmjs.com/package/hugo-lunr-zh). A bit like Hugo-lunr, but Hugo-lunr-zh can help you separate the Chinese keywords.
- * [GitHub Gist for Fuse.js integration](https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae). This gist demonstrates how to leverage Hugo's existing build time processing to generate a searchable JSON index used by [Fuse.js](https://fusejs.io/) on the client-side. Although this gist uses Fuse.js for fuzzy matching, any client-side search tool capable of reading JSON indexes will work. Does not require npm, grunt or other build-time tools except Hugo!
- * [hugo-search-index](https://www.npmjs.com/package/hugo-search-index). A library containing Gulp tasks and a prebuilt browser script that implements search. Gulp generates a search index from project markdown files.
- * [hugofastsearch](https://gist.github.com/cmod/5410eae147e4318164258742dd053993). A usability and speed update to "GitHub Gist for Fuse.js integration" — global, keyboard-optimized search.
- * [JS & Fuse.js tutorial](https://makewithhugo.com/add-search-to-a-hugo-site/) A simple client-side search solution, using FuseJS (does not require jQuery).
- * [Pagefind](https://github.com/cloudcannon/pagefind). A fully static search library that aims to perform well on large sites, while using as little of your users' bandwidth as possible.
- * [Hugo Lyra](https://github.com/paolomainardi/hugo-lyra). Hugo-Lyra is a JavaScript module to integrate [Lyra](https://github.com/LyraSearch/lyra) into a Hugo website. It contains the server-side part to generate the index and the client-side library (optional) to bootstrap the search engine easily.
++## Open source
 +
- ## Commercial search services
++[Pagefind](https://github.com/cloudcannon/pagefind)
++: A fully static search library that aims to perform well on large sites, while using as little of your users' bandwidth as possible.
 +
- * [Algolia](https://www.algolia.com/)'s Search API makes it easy to deliver a great search experience in your apps and websites. Algolia Search provides hosted full-text, numerical, faceted, and geolocalized search.
- * [Bonsai](https://www.bonsai.io) is a fully-managed hosted Elasticsearch service that is fast, reliable, and simple to set up. Easily ingest your docs from Hugo into Elasticsearch following [this guide from the docs](https://docs.bonsai.io/hc/en-us/articles/13929190788756-Hugo).
- * [ExpertRec](https://www.expertrec.com/) is a hosted search-as-a-service solution that is fast and scalable. Set-up and integration is extremely easy and takes only a few minutes. The search settings can be modified without coding using a dashboard.
++[GitHub Gist for Hugo Workflow](https://gist.github.com/sebz/efddfc8fdcb6b480f567)
++: This gist contains a simple workflow to create a search index for your static website. It uses a simple Grunt script to index all your content files and [lunr.js](https://lunrjs.com/) to serve the search results.
 +
++[hugo-lunr](https://www.npmjs.com/package/hugo-lunr)
++: A simple way to add site search to your static Hugo site using [lunr.js](https://lunrjs.com/). Hugo-lunr will create an index file of any HTML and Markdown documents in your Hugo project.
++
++[hugo-lunr-zh](https://www.npmjs.com/package/hugo-lunr-zh)
++: A bit like Hugo-lunr, but Hugo-lunr-zh can help you separate the Chinese keywords.
++
++[GitHub Gist for Fuse.js integration](https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae)
++: This gist demonstrates how to leverage Hugo's existing build time processing to generate a searchable JSON index used by [Fuse.js](https://fusejs.io/) on the client-side. Although this gist uses Fuse.js for fuzzy matching, any client-side search tool capable of reading JSON indexes will work. Does not require npm, grunt or other build-time tools except Hugo!
++
++[hugo-search-index](https://www.npmjs.com/package/hugo-search-index)
++: A library containing Gulp tasks and a prebuilt browser script that implements search. Gulp generates a search index from project markdown files.
++
++[hugofastsearch](https://gist.github.com/cmod/5410eae147e4318164258742dd053993)
++: A usability and speed update to "GitHub Gist for Fuse.js integration" — global, keyboard-optimized search.
++
++[JS & Fuse.js tutorial](https://makewithhugo.com/add-search-to-a-hugo-site/)
++: A simple client-side search solution, using FuseJS (does not require jQuery).
++
++[Hugo Lyra](https://github.com/paolomainardi/hugo-lyra)
++: Hugo-Lyra is a JavaScript module to integrate [Lyra](https://github.com/LyraSearch/lyra) into a Hugo website. It contains the server-side part to generate the index and the client-side library (optional) to bootstrap the search engine easily.
++
++## Commercial
++
++[Algolia](https://www.algolia.com/)
++: Algolia's Search API makes it easy to deliver a great search experience in your apps and websites. Algolia Search provides hosted full-text, numerical, faceted, and geolocalized search.
++
++[Bonsai](https://www.bonsai.io)
++: Bonsai is a fully-managed hosted Elasticsearch service that is fast, reliable, and simple to set up. Easily ingest your docs from Hugo into Elasticsearch following [this guide from the docs](https://docs.bonsai.io/hc/en-us/articles/13929190788756-Hugo).
++
++[ExpertRec](https://www.expertrec.com/)
++: ExpertRec is a hosted search-as-a-service solution that is fast and scalable. Set-up and integration is extremely easy and takes only a few minutes. The search settings can be modified without coding using a dashboard.
index 01b38ecdb4c359f3efbe3ade125b0809b1e202a6,0000000000000000000000000000000000000000..65263ab32d69b0f019fd7b100d7a73a85caf6ee3
mode 100644,000000..100644
--- /dev/null
@@@ -1,16 -1,0 +1,16 @@@
- title: Troubleshoot
 +---
- description: Frequently asked questions and known issues pulled from the Hugo Discuss forum.
++title: Troubleshooting
 +linkTitle: Overview
- aliases: [/troubleshooting/faqs/,/faqs/]
++description: Use these techniques when troubleshooting your site.
++categories: []
++keywords: []
 +menu:
 +  docs:
 +    identifier: troubleshooting-overview
 +    parent: troubleshooting
 +    weight: 10
 +weight: 10
- The Troubleshooting section includes known issues, recent workarounds, and FAQs pulled from the [Hugo Discussion Forum][forum].
- [forum]: https://discourse.gohugo.io
++aliases: [/templates/template-debugging/]
 +---
 +
++Use these techniques when troubleshooting your site.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f00ed8f8da4c496368fbfc0b08e6e95576a5c071
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,73 @@@
++---
++title: Site audit
++linkTitle: Audit
++description: Run this audit before deploying your production site.
++categories: [troubleshooting]
++keywords: []
++menu:
++  docs:
++    parent: troubleshooting
++    weight: 20
++weight: 20
++---
++
++There are several conditions that can produce errors in your published site which are not detected during the build. Run this audit before your final build.
++
++{{< code copy=true >}}
++HUGO_MINIFY_TDEWOLFF_HTML_KEEPCOMMENTS=true HUGO_ENABLEMISSINGTRANSLATIONPLACEHOLDERS=true hugo && grep -inorE "<\!-- raw HTML omitted -->|ZgotmplZ|\[i18n\]|\(<nil>\)|(&lt;nil&gt;)|hahahugo" public/
++{{< /code >}}
++
++_Tested with GNU Bash 5.1 and GNU grep 3.7._
++
++## Example output
++
++![site audit terminal output](screen-capture.png)
++
++## Explanation
++
++### Environment variables
++
++`HUGO_MINIFY_TDEWOLFF_HTML_KEEPCOMMENTS=true`
++: Retain HTML comments even if minification is enabled. This takes precedence over `minify.tdewolff.html.keepComments` in the site configuration. If you minify without keeping HTML comments when performing this audit, you will not be able to detect when raw HTML has been omitted.
++
++`HUGO_ENABLEMISSINGTRANSLATIONPLACEHOLDERS=true`
++: Show a placeholder instead of the default value or an empty string if a translation is missing. This takes precedence over `enableMissingTranslationPlaceholders` in the site configuration.
++
++### Grep options
++
++`-i, --ignore-case`
++: Ignore case distinctions in patterns and input data, so that characters that differ only in case match each other.
++
++`-n, --line-number`
++: Prefix each line of output with the 1-based line number within its input file.
++
++`-o, --only-matching`
++: Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line.
++
++`-r, --recursive`
++: Read all files under each directory, recursively, following symbolic links only if they are on the command line.
++
++`-E, --extended-regexp`
++: Interpret PATTERNS as extended regular expressions.
++
++### Patterns
++
++`<!-- raw HTML omitted -->`
++: By default, Hugo strips raw HTML from your markdown prior to rendering, and leaves this HTML comment in its place.
++
++`ZgotmplZ`
++: ZgotmplZ is a special value that indicates that unsafe content reached a CSS or URL context at runtime. See&nbsp;[details].
++
++[details]: https://pkg.go.dev/html/template
++
++`[i18n]`
++: This is the placeholder produced instead of the default value or an empty string if a translation is missing.
++
++`(<nil>)`
++: This string will appear in the rendered HTML when passing a nil value to the `printf` function.
++
++`(&lt;nil&gt;)`
++: Same as above when the value returned from the `printf` function has not been passed through `safeHTML`.
++
++`HAHAHUGO`
++: Under certain conditions a rendered shortcode may include all or a portion of the string H&#xfeff;AHAHUGOSHORTCODE in either uppercase or lowercase. This is difficult to detect in all circumstances, but a case-insensitive search of the output for `HAHAHUGO` is likely to catch the majority of cases without producing false positives.
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..221abfff0785bbe3b5d04acd2786891de65ca207
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..9aef54e8a743cb2748bd1194fd32a5128a2d0f58
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,50 @@@
++---
++title: Deprecation
++description: The Hugo project follows a formal and consistent process to deprecate functions, methods, and configuration settings.
++categories: [troubleshooting]
++keywords: []
++menu:
++  docs:
++    parent: troubleshooting
++    weight: 50
++weight: 50
++---
++
++When a project _deprecates_ something, they are telling its users:
++
++1. Don't use Thing One anymore.
++2. Use Thing Two instead.
++3. We're going to remove Thing One at some point in the future.
++
++[article]: https://en.wikipedia.org/wiki/Deprecation
++
++Think of deprecation as a statement of intent. This Wikipedia [article] describes common reasons for deprecation:
++
++- The feature has been replaced by a more powerful alternative.
++- The feature contains a design flaw.
++- The feature is considered extraneous, and will be removed in the future in order to simplify the system as a whole.
++- A future version of the software will make major structural changes, making it impossible or impractical to support older features.
++- Standardization or increased consistency in naming.
++- A feature that once was available only independently is now combined with its co-feature.
++
++After the project team deprecates something in code, Hugo will:
++
++1. Log an INFO message for 6 minor releases[^1]
++2. Log a WARN message for another 6 minor releases
++3. Log an ERROR message and fail the build thereafter
++
++To see the INFO messages, you must use the `--logLevel` command line flag:
++
++```text
++hugo --logLevel info
++```
++
++To limit the output to deprecation notices:
++
++```text
++hugo --logLevel info | grep deprecate
++```
++
++Run the above command every time you upgrade Hugo.
++
++[^1]: For example, v0.1.1 => v0.2.0 is a minor release.
index bc29bfba1f5455b487020dc4eef3134025be6516,0000000000000000000000000000000000000000..dc62047778cfb19f8e093f89f456a1acfad46a0a
mode 100644,000000..100644
--- /dev/null
@@@ -1,62 -1,0 +1,124 @@@
- linkTitle: Frequently asked questions
- description: Solutions to some common Hugo problems.
 +---
 +title: Frequently asked questions
-     weight: 20
- weight: 20
- keywords: [faqs]
- toc: true
- aliases: [/faq/]
++linkTitle: FAQs
++description: These questions are frequently asked by new users.
 +categories: [troubleshooting]
++keywords: [faq]
 +menu:
 +  docs:
 +    parent: troubleshooting
- {{% note %}}
- **Note:** The answers/solutions presented below are short, and may not be enough to solve your problem. Visit [Hugo Discourse](https://discourse.gohugo.io/) and use the search. It that does not help, start a new topic and ask your questions.
- {{% /note %}}
++    weight: 70
++weight: 70
++# Use level 6 headings for each question.
 +---
 +
- ## I can't see my content
++Hugo’s [forum] is an active community of users and developers who answer questions, share knowledge, and provide examples. A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help] before asking your first question.
++
++These are just a few of the questions most frequently asked by new users.
++
++###### An error message indicates that a feature is not available. Why?
++
++Hugo is available in two editions: standard and extended. With the extended edition you can (a) encode to the WebP format when processing images, and (b) transpile Sass to CSS using the embedded LibSass transpiler. The extended edition is not required to use the Dart Sass transpiler.
++
++When you attempt to perform either of the operations above with the standard edition, Hugo throws this error:
++
++```go-html-template
++Error: this feature is not available in your current Hugo version
++```
++
++To resolve, uninstall the standard edition, then install the extended edition. See the [installation] section for details.
++
++###### Why do I see "Page Not Found" when visiting the home page?
++
++In the content/_index.md file:
 +
- Is your Markdown file [in draft mode](/content-management/front-matter/#front-matter-variables)? When testing, run `hugo server` with the `-D` or `--buildDrafts` [switch](/getting-started/usage/#draft-future-and-expired-content).
++  - Is `draft` set to `true`?
++  - Is the `date` in the future?
++  - Is the `publishDate` in the future?
++  - Is the `expiryDate` in the past?
 +
- Is your Markdown file part of a [leaf bundle](/content-management/page-bundles/)? If there is an `index.md` file in the same or any parent directory then other Markdown files will not be rendered as individual pages.
++If the answer to any of these questions is yes, either change the field values, or use one of these command line flags: `--buildDrafts`, `--buildFuture`, or `--buildExpired`.
 +
- ## Can I set configuration variables via OS environment?
++###### Why is a given section not published?
 +
- Yes you can! See [Configure with Environment Variables](/getting-started/configuration/#configure-with-environment-variables).
++In the content/section/_index.md file:
 +
- ## How do I schedule posts?
++  - Is `draft` set to `true`?
++  - Is the `date` in the future?
++  - Is the `publishDate` in the future?
++  - Is the `expiryDate` in the past?
 +
- 1. Set `publishDate` in the page [front matter](/content-management/front-matter/) to a datetime in the future. If you want the creation and publication datetime to be the same, it's also sufficient to only set `date`[^date-hierarchy].
- 2. Build and publish at intervals.
++If the answer to any of these questions is yes, either change the field values, or use one of these command line flags: `--buildDrafts`, `--buildFuture`, or `--buildExpired`.
 +
- How to automate the "publish at intervals" part depends on your situation:
++###### Why is a given page not published?
 +
- * If you deploy from your own PC/server, you can automate with [Cron](https://en.wikipedia.org/wiki/Cron) or similar.
- * If your site is hosted on a service similar to [Netlify](https://www.netlify.com/) you can:
-   * Use a service such as [ifttt](https://ifttt.com/date_and_time) to schedule the updates; or
-   * Set up a deploy hook which you can run with a cron service to deploy your site at intervals, such as [cron-job.org](https://cron-job.org/) (both Netlify and Cloudflare Pages support deploy hooks)
++In the content/section/page.md file, or in the content/section/page/index.md file:
 +
- Also see this Twitter thread:
++  - Is `draft` set to `true`?
++  - Is the `date` in the future?
++  - Is the `publishDate` in the future?
++  - Is the `expiryDate` in the past?
 +
- {{< tweet user="ChrisShort" id="962380712027590657" >}}
++If the answer to any of these questions is yes, either change the field values, or use one of these command line flags: `--buildDrafts`, `--buildFuture`, or `--buildExpired`.
 +
- [^date-hierarchy]: See [Configure Dates](/getting-started/configuration/#configure-dates) for the order in which the different date variables are complemented by each other when not explicitly set.
++###### Why can't I see any of a page's descendants?
 +
- ## Can I use the latest Hugo version on Netlify?
++You may have an index.md file instead of an _index.md file. See&nbsp;[details](/content-management/page-bundles/).
 +
- [Yes you can](/hosting-and-deployment/hosting-on-netlify/#configure-hugo-version-in-netlify)!.
++###### What is the difference between an index.md file and an _index.md file?
 +
- ## I get "... this feature is not available in your current Hugo version"
++A directory with an index.md file is a [leaf bundle]. A directory with an _index.md file is a [branch bundle]. See&nbsp;[details](/content-management/page-bundles/).
 +
- If you process `SCSS` or `Sass` to `CSS` in your Hugo project with `libsass` as the transpiler or if you convert images to the `webp` format, you need the Hugo `extended` version, or else you may see an error message similar to the below:
++[branch bundle]: /getting-started/glossary/#branch-bundle
++[leaf bundle]: /getting-started/glossary/#leaf-bundle
 +
- ```bash
- error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version
++###### Why is my partial template not rendered as expected? {#foo}
 +
- We release two set of binaries for technical reasons. The extended version is not what you get by default for some installation methods. On the [release page](https://github.com/gohugoio/hugo/releases), look for archives with `extended` in the name. To build `hugo-extended`, use `go install --tags extended`
++You may have neglected to pass the required [context] when calling the partial. For example:
++
++```go-html-template
++{{/* incorrect */}}
++{{ partial "_internal/pagination.html" }}
++
++{{/* correct */}}
++{{ partial "_internal/pagination.html" . }}
 +```
 +
- To confirm, run `hugo version` and look for the word `extended`.
++###### In a template, what's the difference between `:=` and `=` when assigning values to variables?
++
++Use `:=` to initialize a variable, and use `=` to assign a value to a variable that has been previously initialized. See&nbsp;[details](https://pkg.go.dev/text/template#hdr-Variables).
++
++###### When I paginate a list page, why is the page collection not filtered as specified?
++
++You are probably invoking the [`Paginate`] or [`Paginator`] method more than once on the same page. See&nbsp;[details](/templates/pagination/#list-paginator-pages).
++
++###### Why are there two ways to call a shortcode?
++
++Use the `{{%/* shortcode */%}}` notation if the shortcode template, or the content between the opening and closing shortcode tags, contains markdown. Otherwise use the\
++`{{</* shortcode */>}}` notation. See&nbsp;[details](/content-management/shortcodes/).
++
++###### Can I use environment variables to control configuration?
++
++Yes. See&nbsp;[details](/getting-started/configuration/#configure-with-environment-variables).
++
++###### Why am I seeing inconsistent output from one build to the next?
++
++The most common causes are page collisions (publishing two pages to the same path) and the effects of concurrency. Use the `--printPathWarnings` command line flag to check for page collisions, and create a topic on the [forum] if you suspect concurrency problems.
++
++###### Which page methods trigger content rendering?
++
++The following methods on a `Page` object triggering content rendering: `Content`, `FuzzyWordCount`, `Len`, `Plain`, `PlainWords`, `ReadingTime`, `Summary`, `Truncated`, and `WordCount`.
++
++{{% note %}}
++For other questions please visit the [forum]. A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help] before asking your first question.
++
++[forum]: https://discourse.gohugo.io
++[requesting help]: https://discourse.gohugo.io/t/requesting-help/9132
++{{% /note %}}
 +
++[`Paginate`]: /methods/page/paginate
++[`Paginator`]: /methods/page/paginator
++[context]: /getting-started/glossary/#context
++[forum]: https://discourse.gohugo.io
++[installation]: /installation
++[requesting help]: https://discourse.gohugo.io/t/requesting-help/9132
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8262291536102c42bbb96719565c5401dfcc17c7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,72 @@@
++---
++title: Data inspection
++linkTitle: Inspection
++description: Use template functions to inspect values and data structures.
++categories: [troubleshooting]
++keywords: []
++menu:
++  docs:
++    parent: troubleshooting
++    weight: 40
++weight: 40
++---
++
++Use the [`jsonify`] function to inspect a data structure:
++
++```go-html-template
++<pre>{{ jsonify (dict "indent" "  ") .Params }}</pre>
++```
++
++```text
++{
++  "date": "2023-11-10T15:10:42-08:00",
++  "draft": false,
++  "iscjklanguage": false,
++  "lastmod": "2023-11-10T15:10:42-08:00",
++  "publishdate": "2023-11-10T15:10:42-08:00",
++  "tags": [
++    "foo",
++    "bar"
++  ],
++  "title": "My first post"
++}
++```
++
++{{% note %}}
++Hugo will throw an error if you attempt to use the construct above to display context that includes a page collection. For example, in a home page template, this will fail:
++
++`{{ jsonify (dict "indent" "  ") . }}`
++{{% /note %}}
++
++Use the [`debug.Dump`] function to inspect data types:
++
++```go-html-template
++<pre>{{ debug.Dump .Params }}</pre>
++```
++
++```text
++maps.Params{
++  "date": time.Time{},
++  "draft": false,
++  "iscjklanguage": false,
++  "lastmod": time.Time{},
++  "publishdate": time.Time{},
++  "tags": []string{
++    "foo",
++    "bar",
++  },
++  "title": "My first post",
++}
++```
++
++Use the [`printf`] function (render) or [`warnf`] function (log to console) to inspect simple data structures. The layout string below displays both value and data type.
++
++```go-html-template
++{{ $value := 42 }}
++{{ printf "%[1]v (%[1]T)" $value }} → 42 (int)
++```
++
++[`jsonify`]: /functions/encoding/jsonify
++[`debug.Dump`]: /functions/debug/dump
++[`printf`]: /functions/fmt/printf
++[`warnf`]: /functions/fmt/warnf
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8879c18463c56b6d3746327b9617a2b1c44567a3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,56 @@@
++---
++title: Logging
++description: Enable logging to inspect events while building your site.
++categories: [troubleshooting]
++keywords: []
++menu:
++  docs:
++    parent: troubleshooting
++    weight: 30
++weight: 30
++toc: true
++---
++
++## Command line
++
++Enable console logging with the `--logLevel` command line flag.
++
++Hugo has four logging levels:
++
++error
++: Display error messages only.
++
++```sh
++hugo --logLevel error
++```
++
++warn
++: Display warning and error messages.
++
++```sh
++hugo --logLevel warn
++```
++
++info
++: Display information, warning, and error messages.
++
++```sh
++hugo --logLevel info
++```
++
++debug
++: Display debug, information, warning, and error messages.
++
++```sh
++hugo --logLevel debug
++```
++
++{{% note %}}
++If you do not specify a logging level with the `--logLevel` flag, warnings and errors are always displayed.
++{{% /note %}}
++
++## Template functions
++
++You can also use template functions to print warnings or errors to the console. These functions are typically used to report data validation errors, missing files, etc.
++
++{{< list-pages-in-section path=/functions/fmt filter=functions_fmt_logging filterType=include >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..589d30df6b663f726c139180980bf3003ad569f3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,94 @@@
++---
++title: Performance
++description: Use template metrics and timers to identify opportunities to improve performance.
++categories: [troubleshooting]
++keywords: []
++menu:
++  docs:
++    parent: troubleshooting
++    weight: 60
++weight: 60
++toc: true
++aliases: [/troubleshooting/build-performance/]
++---
++
++## Template metrics
++
++Hugo is fast, but inefficient templates impede performance. Enable template metrics to determine which templates take the most time, and to identify caching opportunties:
++
++```sh
++hugo --templateMetrics --templateMetricsHints
++```
++
++The result will look something like this:
++
++```text
++Template Metrics:
++
++     cumulative       average       maximum      cache  percent  cached  total  
++       duration      duration      duration  potential   cached   count  count  template
++     ----------      --------      --------  ---------  -------  ------  -----  --------
++  36.037476822s  135.990478ms  225.765245ms         11        0       0    265  partials/head.html
++  35.920040902s  164.018451ms  233.475072ms          0        0       0    219  articles/single.html
++  34.163268129s  128.917992ms  224.816751ms         23        0       0    265  partials/head/meta/opengraph.html
++   1.041227437s     3.92916ms  186.303376ms         47        0       0    265  partials/head/meta/schema.html
++   805.628827ms   27.780304ms  114.678523ms          0        0       0     29  _default/list.html
++    624.08354ms   15.221549ms  108.420729ms          8        0       0     41  partials/utilities/render-page-collection.html
++   545.968801ms     775.523µs  105.045775ms          0        0       0    704  _default/summary.html
++   334.680981ms    1.262947ms  127.412027ms        100        0       0    265  partials/head/js.html
++   272.763205ms    2.050851ms   24.371757ms          0        0       0    133  _default/_markup/render-codeblock.html
++   230.490038ms    8.865001ms    177.4615ms          0        0       0     26  shortcodes/template.html
++   176.921913ms  176.921913ms  176.921913ms          0        0       0      1  examples.tmpl
++   163.951469ms   14.904679ms   70.267953ms          0        0       0     11  articles/list.html
++    153.07021ms     577.623µs   73.593597ms        100        0       0    265  partials/head/init.html
++   150.910984ms  150.910984ms  150.910984ms          0        0       0      1  _default/single.html
++   146.785804ms  146.785804ms  146.785804ms          0        0       0      1  _default/contact.html
++   115.364617ms  115.364617ms  115.364617ms          0        0       0      1  authors/term.html
++    87.392071ms     329.781µs   10.687132ms        100        0       0    265  partials/head/css.html
++    86.803122ms   86.803122ms   86.803122ms          0        0       0      1  _default/home.html
++```
++
++From left to right, the columns represent:
++
++cumulative duration
++: The cumulative time spent executing the template.
++
++average duration
++: The average time spent executing the template.
++
++maximum duration
++: The maximum time spent executing the template.
++
++cache potential
++: Displayed as a percentage, any partial template with a 100% cache potential should be called with the [`partialCached`] function instead of the [`partial`] function. See the [caching](#caching) section below.
++
++percent cached
++: The number of times the rendered templated was cached divided by the number of times the template was executed.
++
++cached count
++: The number of times the rendered templated was cached.
++
++total count
++: The number of times the template was executed.
++
++template
++: The path to the template, relative to the layouts directory.
++
++[`partial`]: /functions/partials/include
++[`partialCached`]: /functions/partials/includecached
++
++{{% note %}}
++Hugo builds pages in parallel where multiple pages are generated simultaneously. Because of this parallelism, the sum of "cumulative duration" values is usually greater than the actual time it takes to build a site.
++{{% /note %}}
++
++## Caching
++
++Some partial templates such as sidebars or menus are executed many times during a site build. Depending on the content within the partial template and the desired output, the template may benefit from caching to reduce the number of executions. The [`partialCached`] template function provides caching capabilities for partial templates.
++
++{{% note %}}
++Note that you can create cached variants of each partial by passing additional parameters to `partialCached` beyond the initial context. See the `partialCached` documentation for more details.
++{{% /note %}}
++
++## Timers
++
++Use the `debug.Timer` function to determine execution time for a block of code, useful for finding performance bottle necks in templates. See&nbsp;[details](/functions/debug/timer/).
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..47d5812fba515ae86088cf60363ac2192762a4fb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,13 @@@
++---
++cascade:
++  _build:
++    list: never
++    publishResources: false
++    render: never
++---
++
++<!--
++Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
++
++Include the rendered content using the "include" shortcode. 
++-->
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8774c817b7ee1532c582742007e837359fa9ce5c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++---
++# Do not remove front matter.
++---
++
++{{% note %}}
++We are making an effort to unify our [terminology], and to use these terms consistently throughout the documentation.
++
++Historically, we have inconsistently referred to the items on this page as [functions], [parameters], [variables], or [methods]. They are not functions, parameters, or variables; they are methods.
++
++This page will remain in place as readers become familiar with the unified terminology. See the [methods section] for a list of methods by [object], or the [methods quick reference guide].
++
++[functions]: /getting-started/glossary/#function
++[methods quick reference guide]: /quick-reference/methods
++[methods section]: /methods
++[methods]: /getting-started/glossary/#method
++[object]: /getting-started/glossary/#object
++[parameters]: /getting-started/glossary/#parameter
++[terminology]: /getting-started/glossary/
++[variables]: /getting-started/glossary/#variable
++{{% /note %}}
index c1f80a62c22a2be0304441148fa03ee87a0d6ee2,0000000000000000000000000000000000000000..d8dbf9d676a96b64cb5c168313f2664011f45449
mode 100644,000000..100644
--- /dev/null
@@@ -1,18 -1,0 +1,16 @@@
- title: Variables and parameters
 +---
- description: Page-, file-, taxonomy-, and site-level variables and parameters available in templates.
- categories: [variables and parameters]
- keywords: [variables,params,values,globals]
++title: Variables
 +linkTitle: Overview
-     weight: 1
- weight: 1
++description: Use these variables in your templates.
++categories: []
++keywords: []
 +menu:
 +  docs:
 +    identifier: variables-overview
 +    parent: variables
- Hugo's templates are context aware and make a large number of values available to you as you're creating views for your website.
- [Go templates]: /templates/introduction/
++    weight: 10
++weight: 10
 +aliases: [/templates/variables/]
 +---
 +
++{{% include "variables/_common/consistent-terminology.md" %}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..248d84991497f50da342e7e0913b562c1a19d6e0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,18 @@@
++---
++title: File variables
++description: Retrieve file information about any page that is backed by a file.
++categories: [variables]
++keywords: []
++menu:
++  docs:
++    parent: variables
++    weight: 20
++weight: 20
++aliases: [/variables/file-variables/,/variables/files/]
++---
++
++{{% include "variables/_common/consistent-terminology.md" %}}
++
++To retrieve file information about any page that is backed by a file, see the documentation for the [`File`] method on a `Page` object.
++
++[`File`]: /methods/page/file
index 8928ca6f0ac180032ed789af835c122b0c6b9b2c,0000000000000000000000000000000000000000..3dc4732655c7100c3edd2f6f89a304701e3200b6
mode 100644,000000..100644
--- /dev/null
@@@ -1,71 -1,0 +1,18 @@@
- linkTitle: Git variables
- description: Get the last Git revision information for every content file.
- categories: [variables and parameters]
- keywords: [git]
 +---
 +title: Git variables
-     weight: 70
- weight: 70
++description: Retrieve Git information related to the last commit of any page.
++categories: [variables]
++keywords: []
 +menu:
 +  docs:
 +    parent: variables
- {{% note %}}
- Hugo's Git integrations should be fairly performant but *can* increase your build time. This will depend on the size of your Git history.
- {{% /note %}}
++    weight: 30
++weight: 30
 +aliases: [/extras/gitinfo/]
 +---
 +
- ## `.GitInfo` prerequisites
++{{% include "variables/_common/consistent-terminology.md" %}}
 +
- 1. The Hugo site must be in a Git-enabled directory.
- 2. The Git executable must be installed and in your system `PATH`.
- 3. The `.GitInfo` feature must be enabled in your Hugo project by passing `--enableGitInfo` flag on the command line or by setting `enableGitInfo` to `true` in your [site's configuration file][configuration].
- ## The `.GitInfo` object
- The `GitInfo` object contains the following fields:
- .AbbreviatedHash
- : the abbreviated commit hash (e.g., `866cbcc`)
- .AuthorName
- : the author's name, respecting [`.mailmap`](https://git-scm.com/docs/gitmailmap)
- .AuthorEmail
- : the author's email address, respecting [`.mailmap`](https://git-scm.com/docs/gitmailmap)
- .AuthorDate
- : the author date
- .Hash
- : the commit hash (e.g., `866cbccdab588b9908887ffd3b4f2667e94090c3`)
- .Subject
- : commit message subject (e.g., `tpl: Add custom index function`)
- ## `.Lastmod`
- If the `.GitInfo` feature is enabled, `.Lastmod` (on `Page`) is fetched from Git i.e. `.GitInfo.AuthorDate`. This behavior can be changed by adding your own [front matter configuration for dates](/getting-started/configuration/#configure-front-matter).
- [configuration]: /getting-started/configuration/
- ## Hosting considerations
- On the site host, your repository must be "deep-cloned," so the returned `.GitInfo` data will be accurate. Otherwise, your site may display only data from your latest commit. Where it's not possible to configure a host's cloning depth, you must handle this through CI/CD (*e.g.*, a GitHub Action or GitLab CI/CD). See the following table:
- | Hosting service | Clone depth | Configurable? |
- | :-------------- | :---------- | :-----------: |
- | Cloudflare Pages | Shallow | ✔️ [^CFP] |
- | DigitalOcean App Platform | Deep | ❌ |
- | GitHub Pages | Shallow | ✔️ [^GHP] |
- | GitLab Pages | Shallow | ✔️ [^GLP] |
- | Netlify | Deep | ❌ |
- | Render | Shallow | ❌ |
- | Vercel | Shallow | ❌ |
- [^CFP]: To configure a Cloudflare Pages site for deep cloning, preface the site's normal Hugo build command with `git fetch --unshallow &&` (*e.g.*, `git fetch --unshallow && hugo`).
- [^GHP]: You can configure the GitHub Action to do a deep clone by specifying `fetch-depth: 0` in the applicable "checkout" step of your workflow file, as shown in the Hugo documentation's [example workflow file](/hosting-and-deployment/hosting-on-github/#procedure).
- [^GLP]: You can configure the GitLab Runner's clone depth [as explained in the GitLab documentation](https://docs.gitlab.com/ee/ci/large_repositories/#shallow-cloning); see also the Hugo documentation's [example workflow file](https://gohugo.io/hosting-and-deployment/hosting-on-gitlab/#configure-gitlab-cicd).
++To retrieve Git information related to the last commit of any page, see the documentation for the [`GitInfo`] method on a `Page` object.
 +
++[`GitInfo`]: /methods/page/gitinfo
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5b90dab6f195407a60ae2088a233b2b69f28f348
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: Menu entry variables
++description: Use these methods in your menu templates.
++categories: [variables]
++keywords: []
++menu:
++  docs:
++    parent: variables
++    weight: 40
++weight: 40
++aliases: [/variables/menus/]
++---
++
++{{% include "variables/_common/consistent-terminology.md" %}}
++
++{{< list-pages-in-section path=/methods/menu-entry titlePrefix=. >}}
index 16e5f31ffa155e3658419d222ab76f48295f4cfc,0000000000000000000000000000000000000000..732cf54993c735dd12529949b72441054121fc44
mode 100644,000000..100644
--- /dev/null
@@@ -1,357 -1,0 +1,63 @@@
- description: Page-level variables are defined in a content file's front matter, derived from the content's file location, or extracted from the content body itself.
- categories: [variables and parameters]
- keywords: [pages]
 +---
 +title: Page variables
-     weight: 20
- weight: 20
++description: Use these methods with a Page object.
++categories: [variables]
++keywords: []
 +menu:
 +  docs:
 +    parent: variables
- The following is a list of page-level variables. Many of these will be defined in the front matter, derived from file location, or extracted from the content itself.
++    weight: 50
++weight: 50
 +toc: true
 +---
 +
- ## Page variables
++{{% include "variables/_common/consistent-terminology.md" %}}
 +
- .AlternativeOutputFormats
- : Contains all alternative formats for a given page; this variable is especially useful `link rel` list in your site's `<head>`. (See [Output Formats](/templates/output-formats/).)
++## All methods
 +
- .Aliases
- : Aliases of this page
++Use any of these methods in your templates.
 +
- .Ancestors
- : Ancestors of this page.
++{{< list-pages-in-section path=/methods/page titlePrefix=. >}}
 +
- .BundleType
- : The [bundle] type: `leaf`, `branch`, or an empty string if the page is not a bundle.
++## Dates
 +
- .Content
- : The content itself, defined below the front matter.
++Use these methods to access content dates.
 +
- .Data
- : The data specific to this type of page.
++{{< list-pages-in-section path=/methods/page filter=methods_page_dates filterType=include titlePrefix=. omitElementIDs=true >}}
 +
- .Date
- : The date associated with the page. By default, this is the front matter `date` value. See [configuring dates] for a description of fallback values and precedence. See also `.ExpiryDate`, `.Lastmod`, and `.PublishDate`.
++## Multilingual
 +
- .Description
- : The description for the page.
++Use these methods with your multilingual projects.
 +
- .Draft
- : A boolean, `true` if the content is marked as a draft in the front matter.
++{{< list-pages-in-section path=/methods/page filter=methods_page_multilingual filterType=include titlePrefix=. omitElementIDs=true >}}
 +
- .ExpiryDate
- : The date on which the content is scheduled to expire. By default, this is the front matter `expiryDate` value. See [configuring dates] for a description of fallback values and precedence. See also `.Date`, `.Lastmod`, and `.PublishDate`.
++## Navigation
 +
- .File
- : Filesystem-related data for this content file. See also [File Variables].
- .Fragments
- : Fragments returns the fragments for this page. See [Page Fragments](#page-fragments).
- .FuzzyWordCount
- : The approximate number of words in the content.
- .IsHome
- : `true` in the context of the [homepage](/templates/homepage/).
- .IsNode
- : Always `false` for regular content pages.
- .IsPage
- : Always `true` for regular content pages.
- .IsSection
- : `true` if [`.Kind`](/templates/section-templates/#page-kinds) is `section`.
- .IsTranslated
- : `true` if there are translations to display.
- .Keywords
- : The meta keywords for the content.
- .Kind
- : The page's *kind*. Possible return values are `page`, `home`, `section`, `taxonomy`, or `term`. Note that there are also `RSS`, `sitemap`, `robotsTXT`, and `404` kinds, but these are only available during the rendering of each of these respective page's kind and therefore *not* available in any of the `Pages` collections.
- .Language
- : A language object that points to the language's definition in the site configuration. `.Language.Lang` gives you the language code.
- .Lastmod
- : The date on which the content was last modified. By default, if `enableGitInfo` is `true` in your site configuration, this is the Git author date, otherwise the front matter `lastmod` value. See [configuring dates] for a description of fallback values and precedence. See also `.Date`,`ExpiryDate`, `.PublishDate`, and [`.GitInfo`][gitinfo].
- .LinkTitle
- : Access when creating links to the content. If set, Hugo will use the `linktitle` from the front matter before `title`.
- .Next
- : Points up to the next regular page (sorted by Hugo's [default sort](/templates/lists#default-weight--date--linktitle--filepath)). Example: `{{ with .Next }}{{ .Permalink }}{{ end }}`. Calling `.Next` from the first page returns `nil`.
- .NextInSection
- : Points up to the next regular page below the same top level section (e.g. in `/blog`)). Pages are sorted by Hugo's [default sort](/templates/lists#default-weight--date--linktitle--filepath). Example: `{{ with .NextInSection }}{{ .Permalink }}{{ end }}`. Calling `.NextInSection` from the first page returns `nil`.
- .OutputFormats
- : Contains all formats, including the current format, for a given page. Can be combined the with [`.Get` function](/functions/get/) to grab a specific format. (See [Output Formats](/templates/output-formats/).)
- .Permalink
- : The Permanent link for this page; see [Permalinks](/content-management/urls/)
- .Plain
- : The Page content stripped of HTML tags and presented as a string. You may need to pipe the result through the [`htmlUnescape`](/functions/transform/htmlunescape) function when rendering this value with the HTML [output format](/templates/output-formats#output-format-definitions).
- .PlainWords
- : The slice of strings that results from splitting .Plain into words, as defined in Go's [strings.Fields](https://pkg.go.dev/strings#Fields).
- .Prev
- : Points down to the previous regular page(sorted by Hugo's [default sort](/templates/lists#default-weight--date--linktitle--filepath)). Example: `{{ if .Prev }}{{ .Prev.Permalink }}{{ end }}`.  Calling `.Prev` from the last page returns `nil`.
- .PrevInSection
- : Points down to the previous regular page below the same top level section (e.g. `/blog`). Pages are sorted by Hugo's [default sort](/templates/lists#default-weight--date--linktitle--filepath). Example: `{{ if .PrevInSection }}{{ .PrevInSection.Permalink }}{{ end }}`.  Calling `.PrevInSection` from the last page returns `nil`.
- .PublishDate
- : The date on which the content was or will be published. By default, this is the front matter `publishDate` value. See [configuring dates] for a description of fallback values and precedence. See also `.Date`, `.ExpiryDate`, and `.Lastmod`.
- .RawContent
- : Raw markdown content without the front matter. Useful with [remarkjs.com](
- https://remarkjs.com)
- .RenderShortcodes
- : See [Render Shortcodes](#rendershortcodes).
- .ReadingTime
- : The estimated time, in minutes, it takes to read the content.
- .Resources
- : Resources such as images and CSS that are associated with this page
- .Ref
- : Returns the permalink for a given reference (e.g., `.Ref "sample.md"`).  `.Ref` does *not* handle in-page fragments correctly. See [Cross References](/content-management/cross-references/).
- .RelPermalink
- : The relative permanent link for this page.
- .RelRef
- : Returns the relative permalink for a given reference (e.g., `RelRef
- "sample.md"`). `.RelRef` does *not* handle in-page fragments correctly. See [Cross References](/content-management/cross-references/).
- .Site
- : See [Site Variables](/variables/site/).
- .Sites
- : Returns all sites (languages). A typical use case would be to link back to the main language: `<a href="{{ .Sites.First.Home.RelPermalink }}">...</a>`.
- .Sites.First
- : Returns the site for the first language. If this is not a multilingual setup, it will return itself.
- .Summary
- : A generated summary of the content for easily showing a snippet in a summary view. The breakpoint can be set manually by inserting <code>&lt;!&#x2d;&#x2d;more&#x2d;&#x2d;&gt;</code> at the appropriate place in the content page, or the summary can be written independent of the page text.  See [Content Summaries](/content-management/summaries/) for more details.
- .TableOfContents
- : The rendered [table of contents](/content-management/toc/) for the page.
- .Title
- : The title for this page.
- .Translations
- : A list of translated versions of the current page. See [Multilingual Mode](/content-management/multilingual/) for more information.
- .TranslationKey
- : The key used to map language translations of the current page. See [Multilingual Mode](/content-management/multilingual/) for more information.
- .Truncated
- : A boolean, `true` if the `.Summary` is truncated. Useful for showing a "Read more..." link only when necessary.  See [Summaries](/content-management/summaries/) for more information.
- .Type
- : The [content type](/content-management/types/) of the content (e.g., `posts`).
- .Weight
- : Assigned weight (in the front matter) to this content, used in sorting.
- .WordCount
- : The number of words in the content.
++Use these methods to create navigation links between pages.
 +
- List pages receive the following page collections in [context](/getting-started/glossary/#context):
- .Pages
- : Regular pages within the current section (not recursive), and section pages for immediate descendant sections (not recursive).
- .RegularPages
- : Regular pages within the current section (not recursive).
- .RegularPagesRecursive
- : Regular pages within the current section, and regular pages within all descendant sections.
- ## Writable page-scoped variables
- [.Scratch][scratch]
- : Returns a Scratch to store and manipulate data. In contrast to the [`.Store`][store] method, this scratch is reset on server rebuilds.
- [.Store][store]
- : Returns a Scratch to store and manipulate data. In contrast to the [`.Scratch`][scratch] method, this scratch is not reset on server rebuilds.
- ## Section variables and methods
- Also see [Sections](/content-management/sections/).
- .CurrentSection
- : The page's current section. The value can be the page itself if it is a section or the homepage.
- .FirstSection
- : The page's first section below root, e.g. `/docs`, `/blog` etc.
- .InSection $anotherPage
- : Whether the given page is in the current section.
- .IsAncestor $anotherPage
- : Whether the current page is an ancestor of the given page.
- .IsDescendant $anotherPage
- : Whether the current page is a descendant of the given page.
- .Parent
- : A section's parent section or a page's section.
- .Section
- : The [section](/content-management/sections/) this content belongs to. **Note:** For nested sections, this is the first path element in the directory, for example, `/blog/funny/mypost/ => blog`.
- .Sections
- : The [sections](/content-management/sections/) below this content.
- ## Page fragments
- {{< new-in "0.111.0" >}}
- The `.Fragments` method returns a list of fragments for the current page.
- .Headings
- : A recursive list of headings for the current page. Can be used to generate a table of contents.
- {{< todo >}}add .Headings toc example{{< /todo >}}
- .Identifiers
- : A sorted list of identifiers for the current page. Can be used to check if a page contains a specific identifier or if a page contains duplicate identifiers:
- ```go-html-template
- {{ if .Fragments.Identifiers.Contains "my-identifier" }}
-     <p>Page contains identifier "my-identifier"</p>
- {{ end }}
- {{ if gt (.Fragments.Identifiers.Count "my-identifier")  1 }}
-     <p>Page contains duplicate "my-identifier" fragments</p>
- {{ end }}
- ```
- .HeadingsMap
- : Holds a map of headings for the current page. Can be used to start the table of contents from a specific heading.
- Also see the [Go Doc](https://pkg.go.dev/github.com/gohugoio/hugo@v0.111.0/markup/tableofcontents#Fragments) for the return type.
- ### Fragments in hooks and shortcodes
- `.Fragments` are safe to call from render hooks, even on the page you're on (`.Page.Fragments`). For shortcodes we recommend that all `.Fragments` usage is nested inside the `{{</**/>}}` shortcode delimiter (`{{%/**/%}}` takes part in the ToC creation so it's easy to end up in a situation where you bite yourself in the tail).
- ## The `.RenderShortcodes` method {#rendershortcodes}
- {{< new-in "0.117.0" >}} This renders all the shortcodes in the content, preserving the surrounding markup (e.g. Markdown) as is.
- The common use case this is to composing a page from multiple content files while preserving a global context for table of contents and foot notes.
- This method is most often used in shortcode templates. A simple example of shortcode template including content from another page would look like:
- ```go-html-template
- {{ $p := site.GetPage (.Get 0) }}
- {{ $p.RenderShortcodes }}
- ```
- In the above it's important to understand  and the difference between the two delimiters used when including a shortcode:
- * `{{</* myshortcode */>}}` tells Hugo that the rendered shortcode does not need further processing (e.g. it's HTML).
- * `{{%/* myshortcode */%}}` tells Hugo that the rendered shortcode needs further processing (e.g. it's Markdown).
- The latter is what you want to use for the include shortcode outlined above:
- ```md
- ## Mypage
- {{%/* include "mypage" */%}}
- ``````
- Also see [Use Shortcodes](/content-management/shortcodes/#use-shortcodes).
- ## Page-level params
- Any other value defined in the front matter in a content file, including taxonomies, will be made available as part of the `.Params` variable.
- {{< code-toggle file="content/example.md" fm=true copy=false >}}
- title: Example
- categories: [one]
- tags: [two,three,four]
- {{< /code-toggle >}}
- With the above front matter, the `tags` and `categories` taxonomies are accessible via the following:
- * `.Params.tags`
- * `.Params.categories`
- The `.Params` variable is particularly useful for the introduction of user-defined front matter fields in content files. For example, a Hugo website on book reviews could have the following front matter:
- {{< code-toggle file="content/example.md" fm=true copy=false >}}
- title: Example
- affiliatelink: "http://www.my-book-link.here"
- recommendedby: "My Mother"
- {{< /code-toggle >}}
- These fields would then be accessible to via `.Params.affiliatelink` and `.Params.recommendedby`.
- ```go-html-template
- <h3><a href="{{ .Params.affiliatelink }}">Buy this book</a></h3>
- <p>It was recommended by {{ .Params.recommendedby }}.</p>
- ```
- This template would render as follows:
- ```html
- <h3><a href="http://www.my-book-link.here">Buy this book</a></h3>
- <p>It was recommended by my Mother.</p>
- ```
- {{% note %}}
- See [Archetypes](/content-management/archetypes/) for consistency of `Params` across pieces of content.
- {{% /note %}}
- ### The `.Param` method
++{{< list-pages-in-section path=/methods/page filter=methods_page_navigation filterType=include titlePrefix=. omitElementIDs=true >}}
 +
 +## Page collections
 +
- In Hugo, you can declare parameters in individual pages and globally for your entire website. A common use case is to have a general value for the site parameter and a more specific value for some of the pages (i.e., a header image):
++Range through these collections when rendering lists on [section] pages, [taxonomy] pages, [term] pages, and the home page.
 +
- ```go-html-template
- {{ $.Param "header_image" }}
- ```
++[section]: /getting-started/glossary/#section
++[taxonomy]: /getting-started/glossary/#taxonomy
++[term]: /getting-started/glossary/#term
++[context]: /getting-started/glossary/#context
 +
- The `.Param` method provides a way to resolve a single value according to it's definition in a page parameter (i.e. in the content's front matter) or a site parameter (i.e., in your site configuration).
++{{< list-pages-in-section path=/methods/page filter=methods_page_page_collections filterType=include titlePrefix=. omitElementIDs=true >}}
 +
- ### Access nested fields in front matter
++## Parameters
 +
- When front matter contains nested fields like the following:
++Use these methods to access page parameters.
 +
- {{< code-toggle file="content/example.md" fm=true copy=false >}}
- title: Example
- author:
-   given_name: John
-   family_name: Feminella
-   display_name: John Feminella
- {{< /code-toggle >}}
++{{< list-pages-in-section path=/methods/page filter=methods_page_parameters filterType=include titlePrefix=. omitElementIDs=true >}}
 +
- `.Param` can access these fields by concatenating the field names together with a dot:
++## Sections
 +
- ```go-html-template
- {{ $.Param "author.display_name" }}
- ```
++Use these methods to access section pages, and their ancestors and descendants. See&nbsp;[details].
 +
- [configuring dates]: /getting-started/configuration/#configure-dates
- [gitinfo]: /variables/git/
- [File Variables]: /variables/files/
- [bundle]: /content-management/page-bundles
- [scratch]: /functions/scratch
- [store]: /functions/store
++[details]: /content-management/sections/
 +
++{{< list-pages-in-section path=/methods/page filter=methods_page_sections filterType=include titlePrefix=. omitElementIDs=true >}}
index 3917a6558c94125b2d58ee84329c1dbdcd4b9886,0000000000000000000000000000000000000000..24b8fbbf449e1f69c8a09ce4e94c6a3d74067156
mode 100644,000000..100644
--- /dev/null
@@@ -1,25 -1,0 +1,39 @@@
- title: Pages methods
- description: Pages is the core page collection in Hugo and has many useful methods.
- categories: [variables and parameters]
- keywords: [pages]
 +---
-     weight: 21
- weight: 21
- aliases: [/pages]
++title: Pages variables
++description: Use these methods with a collection of Page objects.
++categories: [variables]
++keywords: []
 +menu:
 +  docs:
 +    parent: variables
- Also see [List templates](/templates/lists) for an overview of sort methods.
++    weight: 60
++weight: 60
 +toc: true
++aliases: [/variables/site-variables/]
 +---
 +
- ## .Next PAGE
++{{% include "variables/_common/consistent-terminology.md" %}}
 +
- `.Next` and `.Prev` on `Pages` work similar to the methods with the same names on `.Page`, but are more flexible (and slightly slower) as they can be used on any page collection.
++## All methods
 +
- `.Next` points **up** to the next page relative to the page sent in as the argument. Example: `{{ with .Site.RegularPages.Next . }}{{ .RelPermalink }}{{ end }}`. Calling `.Next` with the first page in the collection returns `nil`.
++Use any of these methods with page collections in your templates.
 +
- ## .Prev PAGE
++{{< list-pages-in-section path=/methods/pages titlePrefix=. >}}
 +
- `.Prev` points **down** to the previous page relative to the page sent in as the argument. Example: `{{ with .Site.RegularPages.Prev . }}{{ .RelPermalink }}{{ end }}`. Calling `.Prev` with the last page in the collection returns `nil`.
++## Sort by
 +
++Use these methods to sort page collections.
++
++{{< list-pages-in-section path=/methods/pages filter=methods_pages_sort filterType=include titlePrefix=. omitElementIDs=true >}}
++
++## Group by
++
++Use these methods to group page collections.
++
++{{< list-pages-in-section path=/methods/pages filter=methods_pages_group filterType=include titlePrefix=. omitElementIDs=true >}}
++
++## Navigation
++
++Use these methods to create navigation links between pages.
++
++{{< list-pages-in-section path=/methods/pages filter=methods_pages_navigation filterType=include titlePrefix=. omitElementIDs=true >}}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..57279b5dece720976073ca7ca504b5154709cecb
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++---
++title: Shortcode variables
++description: Use these methods in your shortcode templates.
++categories: [variables]
++keywords: []
++menu:
++  docs:
++    parent: variables
++    weight: 70
++weight: 70
++aliases: [/variables/shortcodes]
++---
++
++{{% include "variables/_common/consistent-terminology.md" %}}
++
++{{< list-pages-in-section path=/methods/shortcode titlePrefix=. >}}
index 2b9402c5fa28aceff52293c42eaeb1bbfea9858e,0000000000000000000000000000000000000000..532357785c5a52d5de203eebdc31b318ff8ae068
mode 100644,000000..100644
--- /dev/null
@@@ -1,108 -1,0 +1,55 @@@
- description: Many, but not all, site-wide variables are defined in your site's configuration. However, Hugo provides a number of built-in variables for convenient access to global values in your templates.
- categories: [variables and parameters]
- keywords: [global,site]
 +---
 +title: Site variables
-     weight: 10
- weight: 10
- aliases: [/variables/site-variables/]
++description: Use these methods with Site objects. A multilingual project will have two or more sites, one for each language.
++categories: [variables]
++keywords: []
 +menu:
 +  docs:
 +    parent: variables
- The following is a list of site-level (aka "global") variables. Many of these variables are defined in your site's [configuration file][config], whereas others are built into Hugo's core for convenient usage in your templates.
- ## Get the site object from a partial
- All the methods below, e.g. `.Site.RegularPages` can also be reached via the global [`site`](/functions/site/) function, e.g. `site.RegularPages`, which can be handy in partials where the `Page` object isn't easily available.
- ## Site variables
- .Site.AllPages
- : array of all pages, regardless of their translation.
- .Site.BaseURL
- : the base URL for the site as defined in the site configuration.
- .Site.BuildDrafts
- : a boolean (default: `false`) to indicate whether to build drafts as defined in the site configuration.
- .Site.Copyright
- : a string representing the copyright of your website as defined in the site configuration.
- .Site.Data
- : custom data, see [Data Templates](/templates/data-templates/).
- .Site.Home
- : reference to the homepage's [page object](/variables/page/)
- .Site.IsMultiLingual
- : whether there are more than one language in this site. See [Multilingual](/content-management/multilingual/) for more information.
- .Site.Language.Lang
- : the language code of the current locale (e.g., `en`).
- .Site.Language.LanguageName
- : the full language name (e.g. `English`).
- .Site.Language.Weight
- : the weight that defines the order in the `.Site.Languages` list.
- .Site.Language
- : indicates the language currently being used to render the website. This object's attributes are set in site configurations' language definition.
- .Site.LanguageCode
- : a string representing the language tag as defined in the site configuration.
- .Site.LanguagePrefix
- : this can be used to prefix URLs to point to the correct language. It will even work when there is only one defined language. See also the functions [absLangURL](/functions/urls/abslangurl) and [relLangURL](/functions/urls/rellangurl).
- .Site.Languages
- : an ordered list (ordered by defined weight) of languages.
++    weight: 80
++weight: 80
 +toc: true
++aliases: [/variables/site-variables/]
 +---
 +
- .Site.LastChange
- : a [time.Time](https://godoc.org/time#Time) value representing the date/time of the most recent change to your site.
++{{% include "variables/_common/consistent-terminology.md" %}}
 +
- .Site.Menus
- : all the menus in the site.
++## All methods
 +
- .Site.Pages
- : array of all content ordered by Date with the newest first. This array contains only the pages in the current language.
++Use any of these methods in your templates.
 +
- .Site.RegularPages
- : a shortcut to the *regular* page collection. `.Site.RegularPages` is equivalent to `where .Site.Pages "Kind" "page"`.
++{{< list-pages-in-section path=/methods/site titlePrefix=.Site. >}}
 +
- .Site.Sections
- : top-level directories of the site.
++## Multilingual
 +
- .Site.Taxonomies
- : the [taxonomies](/content-management/taxonomies/) for the entire site. Also see section [Access taxonomy data from any template](/variables/taxonomy/#access-taxonomy-data-from-any-template).
++Use these methods with your multilingual projects.
 +
- .Site.Title
- : a string representing the title of the site.
++{{< list-pages-in-section path=/methods/site filter=methods_site_multilingual filterType=include titlePrefix=.Site. omitElementIDs=true >}}
 +
- ## Site parameters
++[`site`]: /functions/global/site
++[context]: /getting-started/glossary/#context
++[configuration file]: /getting-started/configuration
 +
- `.Site.Params` is a container holding the values from the `params` section of your site configuration.
++## Page collections
 +
- ### Example: `.Site.Params`
++Range through these collections when rendering lists on any page.
 +
- The following `config.[yaml|toml|json]` defines a site-wide parameter for `description`:
++{{< list-pages-in-section path=/methods/site filter=methods_site_page_collections filterType=include titlePrefix=.Site. omitElementIDs=true >}}
 +
- {{< code-toggle file="hugo" >}}
- baseURL = "https://yoursite.example.com/"
++## Global site function
 +
- [params]
-   description = "Tesla's Awesome Hugo Site"
-   author = "Nikola Tesla"
- {{</ code-toggle >}}
++Within a partial template, if you did not pass a `Page` or `Site` object in [context], you cannot use this syntax:
 +
- You can use `.Site.Params` in a [partial template](/templates/partials/) to call the default site description:
++```go-html-template
++{{ .Site.SomeMethod }}
++```
 +
- {{< code file="layouts/partials/head.html" >}}
- <meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" />
- {{< /code >}}
++Instead, use the global [`site`] function:
 +
- [config]: /getting-started/configuration/
++```go-html-template
++{{ site.SomeMethod }}
++```
 +
++{{% note %}}
++You can use the global site function in all templates to avoid context problems. Its usage is not limited to partial templates.
++{{% /note %}}
index 2c1e051a9121e5314460546115028467d3a7fe08,0000000000000000000000000000000000000000..ee6d73b2ea46a09895c22c3beace4bddb6edc17b
mode 100644,000000..100644
--- /dev/null
@@@ -1,138 -1,0 +1,21 @@@
- description: Hugo's taxonomy system exposes variables to taxonomy and term templates.
- categories: [variables and parameters]
- keywords: [taxonomy,term]
 +---
 +title: Taxonomy variables
-     weight: 30
- toc: true
- weight: 30
++description: Use these methods with Taxonomy objects.
++categories: [variables]
++keywords: []
 +menu:
 +  docs:
 +    parent: variables
- ## Taxonomy templates
++    weight: 90
++weight: 90
 +---
 +
- Pages rendered by taxonomy templates have `.Kind` set to `taxonomy` and `.Type` set to the taxonomy name.
++{{% include "variables/_common/consistent-terminology.md" %}}
 +
- In taxonomy templates you may access `.Site`, `.Page`. `.Section`, and `.File` variables, as well as the following _taxonomy_ variables:
++{{< list-pages-in-section path=/methods/taxonomy titlePrefix=. >}}
 +
- .Data.Singular
- : The singular name of the taxonomy (e.g., `tags => tag`).
- .Data.Plural
- : The plural name of the taxonomy (e.g., `tags => tags`).
- .Data.Pages
- : The collection of term pages related to this taxonomy. Aliased by `.Pages`.
- .Data.Terms
- : A map of terms and weighted pages related to this taxonomy.
- .Data.Terms.Alphabetical
- : A map of terms and weighted pages related to this taxonomy, sorted alphabetically in ascending order. Reverse the sort order with`.Data.Terms.Alphabetical.Reverse`.
- .Data.Terms.ByCount
- : A map of terms and weighted pages related to this taxonomy, sorted by count in ascending order. Reverse the sort order with`.Data.Terms.ByCount.Reverse`.
- ## Term templates
- Pages rendered by term templates have `.Kind` set to `term` and `.Type` set to the taxonomy name.
- In term templates you may access `.Site`, `.Page`. `.Section`, and `.File` variables, as well as the following _term_ variables:
- .Data.Singular
- : The singular name of the taxonomy (e.g., `tags => tag`).
- .Data.Plural
- : The plural name of the taxonomy (e.g., `tags => tags`).
- .Data.Pages
- : The collection of content pages related to this taxonomy. Aliased by `.Pages`.
- .Data.Term
- : The term itself (e.g., `tag-one`).
- ## Access taxonomy data from any template
- Access the entire taxonomy data structure from any template with `site.Taxonomies`. This returns a map of taxonomies, terms, and a collection of weighted content pages related to each term. For example:
- ```json
- {
-   "categories": {
-     "news": [
-       {
-         "Weight": 0,
-         "Page": {
-           "Title": "Post 1",
-           "Date": "2022-12-18T15:13:35-08:00"
-           ...
-           }
-       },
-       {
-         "Weight": 0,
-         "Page": {
-           "Title": "Post 2",
-           "Date": "2022-12-18T15:13:46-08:00",
-           ...
-         }
-       }
-     ]
-   },
-   "tags": {
-     "international": [
-       {
-         "Weight": 0,
-         "Page": {
-           "Title": "Post 1",
-           "Date": "2021-01-01T00:00:00Z"
-           ... 
-         }
-       }
-     ]
-   }
- }
- ```
- Access a subset of the taxonomy data structure by chaining one or more identifiers, or by using the [`index`] function with one or more keys. For example, to access the collection of weighted content pages related to the news category, use either of the following:
- [`index`]: /functions/collections/indexfunction/
- ```go-html-template
- {{ $pages := site.Taxonomies.categories.news }}
- {{ $pages := index site.Taxonomies "categories" "news" }}
- ```
- For example, to render the entire taxonomy data structure as a nested unordered list:
- ```go-html-template
- <ul>
-   {{ range $taxonomy, $terms := site.Taxonomies }}
-     <li>
-       {{ with site.GetPage $taxonomy }}
-         <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
-       {{ end }}
-       <ul>
-         {{ range $term, $weightedPages := $terms }}
-         <li>
-           {{ with site.GetPage (path.Join $taxonomy $term) }}
-             <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
-           {{ end }}
-         </li>
-           <ul>
-             {{ range $weightedPages }}
-               <li>
-                 <a href="{{ .RelPermalink }}"> {{ .LinkTitle }}</a>
-               </li>
-             {{ end }}
-           </ul>
-         {{ end }}
-       </ul>
-     </li>
-   {{ end }}
- </ul>
- ```
- See [Taxonomy Templates] for more examples.
- [Taxonomy Templates]: /templates/taxonomy-templates/
++{{% note %}}
++Within a taxonomy or term template use the [`Data`] method to retrieve information specific to the taxonomy or term.
 +
++[`Data`]: /methods/page/data
++{{% /note %}}
index 48a12f5225a223cd9c5ded6b797a343f52e59863,0000000000000000000000000000000000000000..2cdb0dd53c0556d842f27fdf08852518c643d3ad
mode 100644,000000..100644
--- /dev/null
@@@ -1,4486 -1,0 +1,4456 @@@
-   - Aliases: null
-     Name: ucode
 +chroma:
 +  lexers:
 +  - Aliases:
 +    - abap
 +    Name: ABAP
 +  - Aliases:
 +    - abnf
 +    Name: ABNF
 +  - Aliases:
 +    - as
 +    - actionscript
 +    Name: ActionScript
 +  - Aliases:
 +    - as3
 +    - actionscript3
 +    Name: ActionScript 3
 +  - Aliases:
 +    - ada
 +    - ada95
 +    - ada2005
 +    Name: Ada
 +  - Aliases:
 +    - al
 +    Name: AL
 +  - Aliases:
 +    - ng2
 +    Name: Angular2
 +  - Aliases:
 +    - antlr
 +    Name: ANTLR
 +  - Aliases:
 +    - apacheconf
 +    - aconf
 +    - apache
 +    Name: ApacheConf
 +  - Aliases:
 +    - apl
 +    Name: APL
 +  - Aliases:
 +    - applescript
 +    Name: AppleScript
 +  - Aliases:
 +    - aql
 +    Name: ArangoDB AQL
 +  - Aliases:
 +    - arduino
 +    Name: Arduino
 +  - Aliases:
 +    - armasm
 +    Name: ArmAsm
 +  - Aliases:
 +    - autohotkey
 +    - ahk
 +    Name: AutoHotkey
 +  - Aliases:
 +    - autoit
 +    Name: AutoIt
 +  - Aliases:
 +    - awk
 +    - gawk
 +    - mawk
 +    - nawk
 +    Name: Awk
 +  - Aliases:
 +    - ballerina
 +    Name: Ballerina
 +  - Aliases:
 +    - bash
 +    - sh
 +    - ksh
 +    - zsh
 +    - shell
 +    Name: Bash
 +  - Aliases:
 +    - bash-session
 +    - console
 +    - shell-session
 +    Name: Bash Session
 +  - Aliases:
 +    - bat
 +    - batch
 +    - dosbatch
 +    - winbatch
 +    Name: Batchfile
 +  - Aliases:
 +    - bib
 +    - bibtex
 +    Name: BibTeX
 +  - Aliases:
 +    - bicep
 +    Name: Bicep
 +  - Aliases:
 +    - blitzbasic
 +    - b3d
 +    - bplus
 +    Name: BlitzBasic
 +  - Aliases:
 +    - bnf
 +    Name: BNF
 +  - Aliases:
 +    - bqn
 +    Name: BQN
 +  - Aliases:
 +    - brainfuck
 +    - bf
 +    Name: Brainfuck
 +  - Aliases:
 +    - c
 +    Name: C
 +  - Aliases:
 +    - csharp
 +    - c#
 +    Name: C#
 +  - Aliases:
 +    - cpp
 +    - c++
 +    Name: C++
 +  - Aliases:
 +    - caddyfile
 +    - caddy
 +    Name: Caddyfile
 +  - Aliases:
 +    - caddyfile-directives
 +    - caddyfile-d
 +    - caddy-d
 +    Name: Caddyfile Directives
 +  - Aliases:
 +    - capnp
 +    Name: Cap'n Proto
 +  - Aliases:
 +    - cassandra
 +    - cql
 +    Name: Cassandra CQL
 +  - Aliases:
 +    - ceylon
 +    Name: Ceylon
 +  - Aliases:
 +    - cfengine3
 +    - cf3
 +    Name: CFEngine3
 +  - Aliases:
 +    - cfs
 +    Name: cfstatement
 +  - Aliases:
 +    - chai
 +    - chaiscript
 +    Name: ChaiScript
 +  - Aliases:
 +    - chapel
 +    - chpl
 +    Name: Chapel
 +  - Aliases:
 +    - cheetah
 +    - spitfire
 +    Name: Cheetah
 +  - Aliases:
 +    - clojure
 +    - clj
 +    - edn
 +    Name: Clojure
 +  - Aliases:
 +    - cmake
 +    Name: CMake
 +  - Aliases:
 +    - cobol
 +    Name: COBOL
 +  - Aliases:
 +    - coffee-script
 +    - coffeescript
 +    - coffee
 +    Name: CoffeeScript
 +  - Aliases:
 +    - common-lisp
 +    - cl
 +    - lisp
 +    Name: Common Lisp
 +  - Aliases:
 +    - coq
 +    Name: Coq
 +  - Aliases:
 +    - cr
 +    - crystal
 +    Name: Crystal
 +  - Aliases:
 +    - css
 +    Name: CSS
 +  - Aliases:
 +    - cue
 +    Name: CUE
 +  - Aliases:
 +    - cython
 +    - pyx
 +    - pyrex
 +    Name: Cython
 +  - Aliases:
 +    - d
 +    Name: D
 +  - Aliases:
 +    - dart
 +    Name: Dart
 +  - Aliases:
 +    - diff
 +    - udiff
 +    Name: Diff
 +  - Aliases:
 +    - django
 +    - jinja
 +    Name: Django/Jinja
 +  - Aliases:
 +    - zone
 +    - bind
 +    Name: dns
 +  - Aliases:
 +    - docker
 +    - dockerfile
 +    Name: Docker
 +  - Aliases:
 +    - dtd
 +    Name: DTD
 +  - Aliases:
 +    - dylan
 +    Name: Dylan
 +  - Aliases:
 +    - ebnf
 +    Name: EBNF
 +  - Aliases:
 +    - elixir
 +    - ex
 +    - exs
 +    Name: Elixir
 +  - Aliases:
 +    - elm
 +    Name: Elm
 +  - Aliases:
 +    - emacs
 +    - elisp
 +    - emacs-lisp
 +    Name: EmacsLisp
 +  - Aliases:
 +    - erlang
 +    Name: Erlang
 +  - Aliases:
 +    - factor
 +    Name: Factor
 +  - Aliases:
 +    - fennel
 +    - fnl
 +    Name: Fennel
 +  - Aliases:
 +    - fish
 +    - fishshell
 +    Name: Fish
 +  - Aliases:
 +    - forth
 +    Name: Forth
 +  - Aliases:
 +    - fortran
 +    - f90
 +    Name: Fortran
 +  - Aliases:
 +    - fortranfixed
 +    Name: FortranFixed
 +  - Aliases:
 +    - fsharp
 +    Name: FSharp
 +  - Aliases:
 +    - gas
 +    - asm
 +    Name: GAS
 +  - Aliases:
 +    - gdscript
 +    - gd
 +    Name: GDScript
 +  - Aliases:
 +    - gdscript3
 +    - gd3
 +    Name: GDScript3
 +  - Aliases:
 +    - genshi
 +    - kid
 +    - xml+genshi
 +    - xml+kid
 +    Name: Genshi
 +  - Aliases:
 +    - html+genshi
 +    - html+kid
 +    Name: Genshi HTML
 +  - Aliases:
 +    - genshitext
 +    Name: Genshi Text
 +  - Aliases:
 +    - cucumber
 +    - Cucumber
 +    - gherkin
 +    - Gherkin
 +    Name: Gherkin
 +  - Aliases:
 +    - glsl
 +    Name: GLSL
 +  - Aliases:
 +    - gnuplot
 +    Name: Gnuplot
 +  - Aliases:
 +    - go
 +    - golang
 +    Name: Go
 +  - Aliases:
 +    - go-html-template
 +    Name: Go HTML Template
 +  - Aliases:
 +    - go-template
 +    Name: Go Template
 +  - Aliases:
 +    - go-text-template
 +    Name: Go Text Template
 +  - Aliases:
 +    - graphql
 +    - graphqls
 +    - gql
 +    Name: GraphQL
 +  - Aliases:
 +    - groff
 +    - nroff
 +    - man
 +    Name: Groff
 +  - Aliases:
 +    - groovy
 +    Name: Groovy
 +  - Aliases:
 +    - handlebars
 +    - hbs
 +    Name: Handlebars
 +  - Aliases:
 +    - haskell
 +    - hs
 +    Name: Haskell
 +  - Aliases:
 +    - hx
 +    - haxe
 +    - hxsl
 +    Name: Haxe
 +  - Aliases:
 +    - hcl
 +    Name: HCL
 +  - Aliases:
 +    - hexdump
 +    Name: Hexdump
 +  - Aliases:
 +    - hlb
 +    Name: HLB
 +  - Aliases:
 +    - hlsl
 +    Name: HLSL
 +  - Aliases:
 +    - holyc
 +    Name: HolyC
 +  - Aliases:
 +    - html
 +    Name: HTML
 +  - Aliases:
 +    - http
 +    Name: HTTP
 +  - Aliases:
 +    - hylang
 +    Name: Hy
 +  - Aliases:
 +    - idris
 +    - idr
 +    Name: Idris
 +  - Aliases:
 +    - igor
 +    - igorpro
 +    Name: Igor
 +  - Aliases:
 +    - ini
 +    - cfg
 +    - dosini
 +    Name: INI
 +  - Aliases:
 +    - io
 +    Name: Io
 +  - Aliases:
 +    - iscdhcpd
 +    Name: ISCdhcpd
 +  - Aliases:
 +    - j
 +    Name: J
 +  - Aliases:
 +    - java
 +    Name: Java
 +  - Aliases:
 +    - js
 +    - javascript
 +    Name: JavaScript
 +  - Aliases:
 +    - json
 +    Name: JSON
 +  - Aliases:
 +    - julia
 +    - jl
 +    Name: Julia
 +  - Aliases:
 +    - jungle
 +    Name: Jungle
 +  - Aliases:
 +    - kotlin
 +    Name: Kotlin
 +  - Aliases:
 +    - lighty
 +    - lighttpd
 +    Name: Lighttpd configuration file
 +  - Aliases:
 +    - llvm
 +    Name: LLVM
 +  - Aliases:
 +    - lua
 +    Name: Lua
 +  - Aliases:
 +    - make
 +    - makefile
 +    - mf
 +    - bsdmake
 +    Name: Makefile
 +  - Aliases:
 +    - mako
 +    Name: Mako
 +  - Aliases:
 +    - md
 +    - mkd
 +    Name: markdown
 +  - Aliases:
 +    - mason
 +    Name: Mason
 +  - Aliases:
 +    - mathematica
 +    - mma
 +    - nb
 +    Name: Mathematica
 +  - Aliases:
 +    - matlab
 +    Name: Matlab
 +  - Aliases:
 +    - mcfunction
 +    Name: mcfunction
 +  - Aliases:
 +    - meson
 +    - meson.build
 +    Name: Meson
 +  - Aliases:
 +    - metal
 +    Name: Metal
 +  - Aliases:
 +    - minizinc
 +    - MZN
 +    - mzn
 +    Name: MiniZinc
 +  - Aliases:
 +    - mlir
 +    Name: MLIR
 +  - Aliases:
 +    - modula2
 +    - m2
 +    Name: Modula-2
 +  - Aliases:
 +    - monkeyc
 +    Name: MonkeyC
 +  - Aliases:
 +    - morrowind
 +    - mwscript
 +    Name: MorrowindScript
 +  - Aliases:
 +    - myghty
 +    Name: Myghty
 +  - Aliases:
 +    - mysql
 +    - mariadb
 +    Name: MySQL
 +  - Aliases:
 +    - nasm
 +    Name: NASM
 +  - Aliases:
 +    - natural
 +    Name: Natural
 +  - Aliases:
 +    - newspeak
 +    Name: Newspeak
 +  - Aliases:
 +    - nginx
 +    Name: Nginx configuration file
 +  - Aliases:
 +    - nim
 +    - nimrod
 +    Name: Nim
 +  - Aliases:
 +    - nixos
 +    - nix
 +    Name: Nix
 +  - Aliases:
 +    - objective-c
 +    - objectivec
 +    - obj-c
 +    - objc
 +    Name: Objective-C
 +  - Aliases:
 +    - ocaml
 +    Name: OCaml
 +  - Aliases:
 +    - octave
 +    Name: Octave
 +  - Aliases:
 +    - odin
 +    Name: Odin
 +  - Aliases:
 +    - ones
 +    - onesenterprise
 +    - 1S
 +    - 1S:Enterprise
 +    Name: OnesEnterprise
 +  - Aliases:
 +    - openedge
 +    - abl
 +    - progress
 +    - openedgeabl
 +    Name: OpenEdge ABL
 +  - Aliases:
 +    - openscad
 +    Name: OpenSCAD
 +  - Aliases:
 +    - org
 +    - orgmode
 +    Name: Org Mode
 +  - Aliases:
 +    - pacmanconf
 +    Name: PacmanConf
 +  - Aliases:
 +    - perl
 +    - pl
 +    Name: Perl
 +  - Aliases:
 +    - php
 +    - php3
 +    - php4
 +    - php5
 +    Name: PHP
 +  - Aliases:
 +    - phtml
 +    Name: PHTML
 +  - Aliases:
 +    - pig
 +    Name: Pig
 +  - Aliases:
 +    - pkgconfig
 +    Name: PkgConfig
 +  - Aliases:
 +    - plpgsql
 +    Name: PL/pgSQL
 +  - Aliases:
 +    - text
 +    - plain
 +    - no-highlight
 +    Name: plaintext
 +  - Aliases:
 +    - plutus-core
 +    - plc
 +    Name: Plutus Core
 +  - Aliases:
 +    - pony
 +    Name: Pony
 +  - Aliases:
 +    - postgresql
 +    - postgres
 +    Name: PostgreSQL SQL dialect
 +  - Aliases:
 +    - postscript
 +    - postscr
 +    Name: PostScript
 +  - Aliases:
 +    - pov
 +    Name: POVRay
 +  - Aliases:
 +    - powerquery
 +    - pq
 +    Name: PowerQuery
 +  - Aliases:
 +    - powershell
 +    - posh
 +    - ps1
 +    - psm1
 +    - psd1
 +    - pwsh
 +    Name: PowerShell
 +  - Aliases:
 +    - prolog
 +    Name: Prolog
 +  - Aliases:
 +    - promql
 +    Name: PromQL
 +  - Aliases:
 +    - java-properties
 +    Name: properties
 +  - Aliases:
 +    - protobuf
 +    - proto
 +    Name: Protocol Buffer
 +  - Aliases:
 +    - prql
 +    Name: PRQL
 +  - Aliases:
 +    - psl
 +    Name: PSL
 +  - Aliases:
 +    - puppet
 +    Name: Puppet
 +  - Aliases:
 +    - python
 +    - py
 +    - sage
 +    - python3
 +    - py3
 +    Name: Python
 +  - Aliases:
 +    - python2
 +    - py2
 +    Name: Python 2
 +  - Aliases:
 +    - qbasic
 +    - basic
 +    Name: QBasic
 +  - Aliases:
 +    - qml
 +    - qbs
 +    Name: QML
 +  - Aliases:
 +    - splus
 +    - s
 +    - r
 +    Name: R
 +  - Aliases:
 +    - racket
 +    - rkt
 +    Name: Racket
 +  - Aliases:
 +    - ragel
 +    Name: Ragel
 +  - Aliases:
 +    - perl6
 +    - pl6
 +    - raku
 +    Name: Raku
 +  - Aliases:
 +    - jsx
 +    - react
 +    Name: react
 +  - Aliases:
 +    - reason
 +    - reasonml
 +    Name: ReasonML
 +  - Aliases:
 +    - registry
 +    Name: reg
 +  - Aliases:
 +    - rst
 +    - rest
 +    - restructuredtext
 +    Name: reStructuredText
 +  - Aliases:
 +    - rexx
 +    - arexx
 +    Name: Rexx
 +  - Aliases:
 +    - rb
 +    - ruby
 +    - duby
 +    Name: Ruby
 +  - Aliases:
 +    - rust
 +    - rs
 +    Name: Rust
 +  - Aliases:
 +    - sas
 +    Name: SAS
 +  - Aliases:
 +    - sass
 +    Name: Sass
 +  - Aliases:
 +    - scala
 +    Name: Scala
 +  - Aliases:
 +    - scheme
 +    - scm
 +    Name: Scheme
 +  - Aliases:
 +    - scilab
 +    Name: Scilab
 +  - Aliases:
 +    - scss
 +    Name: SCSS
 +  - Aliases:
 +    - sed
 +    - gsed
 +    - ssed
 +    Name: Sed
 +  - Aliases:
 +    - sieve
 +    Name: Sieve
 +  - Aliases:
 +    - smali
 +    Name: Smali
 +  - Aliases:
 +    - smalltalk
 +    - squeak
 +    - st
 +    Name: Smalltalk
 +  - Aliases:
 +    - smarty
 +    Name: Smarty
 +  - Aliases:
 +    - snobol
 +    Name: Snobol
 +  - Aliases:
 +    - sol
 +    - solidity
 +    Name: Solidity
 +  - Aliases:
 +    - sp
 +    Name: SourcePawn
 +  - Aliases:
 +    - sparql
 +    Name: SPARQL
 +  - Aliases:
 +    - sql
 +    Name: SQL
 +  - Aliases:
 +    - squidconf
 +    - squid.conf
 +    - squid
 +    Name: SquidConf
 +  - Aliases:
 +    - sml
 +    Name: Standard ML
 +  - Aliases: null
 +    Name: stas
 +  - Aliases:
 +    - stylus
 +    Name: Stylus
 +  - Aliases:
 +    - svelte
 +    Name: Svelte
 +  - Aliases:
 +    - swift
 +    Name: Swift
 +  - Aliases:
 +    - systemd
 +    Name: SYSTEMD
 +  - Aliases:
 +    - systemverilog
 +    - sv
 +    Name: systemverilog
 +  - Aliases:
 +    - tablegen
 +    Name: TableGen
 +  - Aliases:
 +    - tal
 +    - uxntal
 +    Name: Tal
 +  - Aliases:
 +    - tasm
 +    Name: TASM
 +  - Aliases:
 +    - tcl
 +    Name: Tcl
 +  - Aliases:
 +    - tcsh
 +    - csh
 +    Name: Tcsh
 +  - Aliases:
 +    - termcap
 +    Name: Termcap
 +  - Aliases:
 +    - terminfo
 +    Name: Terminfo
 +  - Aliases:
 +    - terraform
 +    - tf
 +    Name: Terraform
 +  - Aliases:
 +    - tex
 +    - latex
 +    Name: TeX
 +  - Aliases:
 +    - thrift
 +    Name: Thrift
 +  - Aliases:
 +    - toml
 +    Name: TOML
 +  - Aliases:
 +    - tradingview
 +    - tv
 +    Name: TradingView
 +  - Aliases:
 +    - tsql
 +    - t-sql
 +    Name: Transact-SQL
 +  - Aliases:
 +    - turing
 +    Name: Turing
 +  - Aliases:
 +    - turtle
 +    Name: Turtle
 +  - Aliases:
 +    - twig
 +    Name: Twig
 +  - Aliases:
 +    - ts
 +    - tsx
 +    - typescript
 +    Name: TypeScript
 +  - Aliases:
 +    - typoscript
 +    Name: TypoScript
 +  - Aliases:
 +    - typoscriptcssdata
 +    Name: TypoScriptCssData
 +  - Aliases:
 +    - typoscripthtmldata
 +    Name: TypoScriptHtmlData
-         templateDelims:
-         - ""
-         - ""
 +  - Aliases:
 +    - v
 +    - vlang
 +    Name: V
 +  - Aliases:
 +    - vsh
 +    - vshell
 +    Name: V shell
 +  - Aliases:
 +    - vala
 +    - vapi
 +    Name: Vala
 +  - Aliases:
 +    - vb.net
 +    - vbnet
 +    Name: VB.net
 +  - Aliases:
 +    - verilog
 +    - v
 +    Name: verilog
 +  - Aliases:
 +    - vhdl
 +    Name: VHDL
 +  - Aliases:
 +    - vhs
 +    - tape
 +    - cassette
 +    Name: VHS
 +  - Aliases:
 +    - vim
 +    Name: VimL
 +  - Aliases:
 +    - vue
 +    - vuejs
 +    Name: vue
 +  - Aliases: null
 +    Name: WDTE
 +  - Aliases:
 +    - wgsl
 +    Name: WebGPU Shading Language
 +  - Aliases:
 +    - whiley
 +    Name: Whiley
 +  - Aliases:
 +    - xml
 +    Name: XML
 +  - Aliases:
 +    - xorg.conf
 +    Name: Xorg
 +  - Aliases:
 +    - yaml
 +    Name: YAML
 +  - Aliases:
 +    - yang
 +    Name: YANG
 +  - Aliases:
 +    - z80
 +    Name: Z80 Assembly
 +  - Aliases:
 +    - zed
 +    Name: Zed
 +  - Aliases:
 +    - zig
 +    Name: Zig
 +config:
 +  archeTypeDir: archetypes
 +  assetDir: assets
 +  author: {}
 +  baseURL: ""
 +  build:
 +    buildStats:
 +      disableClasses: false
 +      disableIDs: false
 +      disableTags: false
 +      enable: false
 +    cacheBusters:
 +    - source: assets/.*\.(js|ts|jsx|tsx)
 +      target: (js|scripts|javascript)
 +    - source: assets/.*\.(css|sass|scss)$
 +      target: (css|styles|scss|sass)
 +    - source: (postcss|tailwind)\.config\.js
 +      target: (css|styles|scss|sass)
 +    - source: assets/.*\.(.*)$
 +      target: $1
 +    noJSConfigInAssets: false
 +    useResourceCacheWhen: fallback
 +  buildDrafts: false
 +  buildExpired: false
 +  buildFuture: false
 +  cacheDir: ""
 +  caches:
 +    assets:
 +      dir: :resourceDir/_gen
 +      maxAge: -1
 +    getcsv:
 +      dir: :cacheDir/:project
 +      maxAge: -1
 +    getjson:
 +      dir: :cacheDir/:project
 +      maxAge: -1
 +    getresource:
 +      dir: :cacheDir/:project
 +      maxAge: -1
 +    images:
 +      dir: :resourceDir/_gen
 +      maxAge: -1
 +    modules:
 +      dir: :cacheDir/modules
 +      maxAge: -1
 +  canonifyURLs: false
 +  cascade: []
 +  cleanDestinationDir: false
 +  contentDir: content
 +  copyright: ""
 +  dataDir: data
 +  defaultContentLanguage: en
 +  defaultContentLanguageInSubdir: false
 +  deployment:
 +    confirm: false
 +    dryRun: false
 +    force: false
 +    invalidateCDN: true
 +    matchers: null
 +    maxDeletes: 256
 +    order: null
 +    target: ""
 +    targets: null
 +    workers: 10
 +  disableAliases: false
 +  disableHugoGeneratorInject: false
 +  disableKinds: null
 +  disableLanguages: null
 +  disableLiveReload: false
 +  disablePathToLower: false
 +  enableEmoji: false
 +  enableGitInfo: false
 +  enableMissingTranslationPlaceholders: false
 +  enableRobotsTXT: false
 +  environment: production
 +  frontmatter:
 +    date:
 +    - date
 +    - publishdate
 +    - pubdate
 +    - published
 +    - lastmod
 +    - modified
 +    expiryDate:
 +    - expirydate
 +    - unpublishdate
 +    lastmod:
 +    - :git
 +    - lastmod
 +    - modified
 +    - date
 +    - publishdate
 +    - pubdate
 +    - published
 +    publishDate:
 +    - publishdate
 +    - pubdate
 +    - published
 +    - date
 +  hasCJKLanguage: false
 +  i18nDir: i18n
 +  ignoreCache: false
 +  ignoreErrors: null
 +  ignoreFiles: []
 +  ignoreVendorPaths: ""
 +  imaging:
 +    bgColor: '#ffffff'
 +    hint: photo
 +    quality: 75
 +    resampleFilter: box
 +  languageCode: ""
 +  languages:
 +    en:
 +      disabled: false
 +      languageCode: ""
 +      languageDirection: ""
 +      languageName: ""
 +      title: ""
 +      weight: 0
 +  layoutDir: layouts
 +  mainSections: null
 +  markup:
 +    asciidocExt:
 +      attributes: {}
 +      backend: html5
 +      extensions: []
 +      failureLevel: fatal
 +      noHeaderOrFooter: true
 +      preserveTOC: false
 +      safeMode: unsafe
 +      sectionNumbers: false
 +      trace: false
 +      verbose: false
 +      workingFolderCurrent: false
 +    defaultMarkdownHandler: goldmark
 +    goldmark:
 +      extensions:
 +        cjk:
 +          eastAsianLineBreaks: false
 +          eastAsianLineBreaksStyle: simple
 +          enable: false
 +          escapedSpace: false
 +        definitionList: true
 +        footnote: true
 +        linkify: true
 +        linkifyProtocol: https
 +        strikethrough: true
 +        table: true
 +        taskList: true
 +        typographer:
 +          apostrophe: '&rsquo;'
 +          disable: false
 +          ellipsis: '&hellip;'
 +          emDash: '&mdash;'
 +          enDash: '&ndash;'
 +          leftAngleQuote: '&laquo;'
 +          leftDoubleQuote: '&ldquo;'
 +          leftSingleQuote: '&lsquo;'
 +          rightAngleQuote: '&raquo;'
 +          rightDoubleQuote: '&rdquo;'
 +          rightSingleQuote: '&rsquo;'
 +      parser:
 +        attribute:
 +          block: false
 +          title: true
 +        autoHeadingID: true
 +        autoHeadingIDType: github
 +        wrapStandAloneImageWithinParagraph: true
 +      renderer:
 +        hardWraps: false
 +        unsafe: false
 +        xhtml: false
 +    highlight:
 +      anchorLineNos: false
 +      codeFences: true
 +      guessSyntax: false
 +      hl_Lines: ""
 +      hl_inline: false
 +      lineAnchors: ""
 +      lineNoStart: 1
 +      lineNos: false
 +      lineNumbersInTable: true
 +      noClasses: true
 +      noHl: false
 +      style: monokai
 +      tabWidth: 4
 +    tableOfContents:
 +      endLevel: 3
 +      ordered: false
 +      startLevel: 2
 +  mediaTypes:
 +    application/json:
 +      delimiter: .
 +      suffixes:
 +      - json
 +    application/manifest+json:
 +      delimiter: .
 +      suffixes:
 +      - webmanifest
 +    application/octet-stream:
 +      delimiter: .
 +    application/pdf:
 +      delimiter: .
 +      suffixes:
 +      - pdf
 +    application/rss+xml:
 +      delimiter: .
 +      suffixes:
 +      - xml
 +      - rss
 +    application/toml:
 +      delimiter: .
 +      suffixes:
 +      - toml
 +    application/wasm:
 +      delimiter: .
 +      suffixes:
 +      - wasm
 +    application/xml:
 +      delimiter: .
 +      suffixes:
 +      - xml
 +    application/yaml:
 +      delimiter: .
 +      suffixes:
 +      - yaml
 +      - yml
 +    font/otf:
 +      delimiter: .
 +      suffixes:
 +      - otf
 +    font/ttf:
 +      delimiter: .
 +      suffixes:
 +      - ttf
 +    image/bmp:
 +      delimiter: .
 +      suffixes:
 +      - bmp
 +    image/gif:
 +      delimiter: .
 +      suffixes:
 +      - gif
 +    image/jpeg:
 +      delimiter: .
 +      suffixes:
 +      - jpg
 +      - jpeg
 +      - jpe
 +      - jif
 +      - jfif
 +    image/png:
 +      delimiter: .
 +      suffixes:
 +      - png
 +    image/svg+xml:
 +      delimiter: .
 +      suffixes:
 +      - svg
 +    image/tiff:
 +      delimiter: .
 +      suffixes:
 +      - tif
 +      - tiff
 +    image/webp:
 +      delimiter: .
 +      suffixes:
 +      - webp
 +    text/calendar:
 +      delimiter: .
 +      suffixes:
 +      - ics
 +    text/css:
 +      delimiter: .
 +      suffixes:
 +      - css
 +    text/csv:
 +      delimiter: .
 +      suffixes:
 +      - csv
 +    text/html:
 +      delimiter: .
 +      suffixes:
 +      - html
 +    text/javascript:
 +      delimiter: .
 +      suffixes:
 +      - js
 +      - jsm
 +      - mjs
 +    text/jsx:
 +      delimiter: .
 +      suffixes:
 +      - jsx
 +    text/markdown:
 +      delimiter: .
 +      suffixes:
 +      - md
 +      - markdown
 +    text/plain:
 +      delimiter: .
 +      suffixes:
 +      - txt
 +    text/tsx:
 +      delimiter: .
 +      suffixes:
 +      - tsx
 +    text/typescript:
 +      delimiter: .
 +      suffixes:
 +      - ts
 +    text/x-sass:
 +      delimiter: .
 +      suffixes:
 +      - sass
 +    text/x-scss:
 +      delimiter: .
 +      suffixes:
 +      - scss
 +    video/3gpp:
 +      delimiter: .
 +      suffixes:
 +      - 3gpp
 +      - 3gp
 +    video/mp4:
 +      delimiter: .
 +      suffixes:
 +      - mp4
 +    video/mpeg:
 +      delimiter: .
 +      suffixes:
 +      - mpg
 +      - mpeg
 +    video/ogg:
 +      delimiter: .
 +      suffixes:
 +      - ogv
 +    video/webm:
 +      delimiter: .
 +      suffixes:
 +      - webm
 +    video/x-msvideo:
 +      delimiter: .
 +      suffixes:
 +      - avi
 +  menus: {}
 +  minify:
 +    disableCSS: false
 +    disableHTML: false
 +    disableJS: false
 +    disableJSON: false
 +    disableSVG: false
 +    disableXML: false
 +    minifyOutput: false
 +    tdewolff:
 +      css:
 +        keepCSS2: true
 +        precision: 0
 +      html:
 +        keepComments: false
 +        keepConditionalComments: true
 +        keepDefaultAttrVals: true
 +        keepDocumentTags: true
 +        keepEndTags: true
 +        keepQuotes: false
 +        keepWhitespace: false
-       TestDeprecationErr:
-         Aliases: null
-         Args: null
-         Description: ""
-         Examples: null
-       TestDeprecationInfo:
-         Aliases: null
-         Args: null
-         Description: ""
-         Examples: null
-       TestDeprecationWarn:
-         Aliases: null
-         Args: null
-         Description: ""
-         Examples: null
 +      js:
 +        keepVarNames: false
 +        precision: 0
 +        version: 2022
 +      json:
 +        keepNumbers: false
 +        precision: 0
 +      svg:
 +        keepComments: false
 +        precision: 0
 +      xml:
 +        keepWhitespace: false
 +  module:
 +    hugoVersion:
 +      extended: false
 +      max: ""
 +      min: ""
 +    imports: null
 +    mounts:
 +    - excludeFiles: null
 +      includeFiles: null
 +      lang: ""
 +      source: content
 +      target: content
 +    - excludeFiles: null
 +      includeFiles: null
 +      lang: ""
 +      source: data
 +      target: data
 +    - excludeFiles: null
 +      includeFiles: null
 +      lang: ""
 +      source: layouts
 +      target: layouts
 +    - excludeFiles: null
 +      includeFiles: null
 +      lang: ""
 +      source: i18n
 +      target: i18n
 +    - excludeFiles: null
 +      includeFiles: null
 +      lang: ""
 +      source: archetypes
 +      target: archetypes
 +    - excludeFiles: null
 +      includeFiles: null
 +      lang: ""
 +      source: assets
 +      target: assets
 +    - excludeFiles: null
 +      includeFiles: null
 +      lang: ""
 +      source: static
 +      target: static
 +    noProxy: none
 +    noVendor: ""
 +    params: null
 +    private: '*.*'
 +    proxy: direct
 +    replacements: null
 +    vendorClosest: false
 +    workspace: "off"
 +  newContentEditor: ""
 +  noBuildLock: false
 +  noChmod: false
 +  noTimes: false
 +  outputFormats:
 +    amp:
 +      baseName: index
 +      isHTML: true
 +      isPlainText: false
 +      mediaType: text/html
 +      name: amp
 +      noUgly: false
 +      notAlternative: false
 +      path: amp
 +      permalinkable: true
 +      protocol: ""
 +      rel: amphtml
 +      weight: 0
 +    calendar:
 +      baseName: index
 +      isHTML: false
 +      isPlainText: true
 +      mediaType: text/calendar
 +      name: calendar
 +      noUgly: false
 +      notAlternative: false
 +      path: ""
 +      permalinkable: false
 +      protocol: webcal://
 +      rel: alternate
 +      weight: 0
 +    css:
 +      baseName: styles
 +      isHTML: false
 +      isPlainText: true
 +      mediaType: text/css
 +      name: css
 +      noUgly: false
 +      notAlternative: true
 +      path: ""
 +      permalinkable: false
 +      protocol: ""
 +      rel: stylesheet
 +      weight: 0
 +    csv:
 +      baseName: index
 +      isHTML: false
 +      isPlainText: true
 +      mediaType: text/csv
 +      name: csv
 +      noUgly: false
 +      notAlternative: false
 +      path: ""
 +      permalinkable: false
 +      protocol: ""
 +      rel: alternate
 +      weight: 0
 +    html:
 +      baseName: index
 +      isHTML: true
 +      isPlainText: false
 +      mediaType: text/html
 +      name: html
 +      noUgly: false
 +      notAlternative: false
 +      path: ""
 +      permalinkable: true
 +      protocol: ""
 +      rel: canonical
 +      weight: 10
 +    json:
 +      baseName: index
 +      isHTML: false
 +      isPlainText: true
 +      mediaType: application/json
 +      name: json
 +      noUgly: false
 +      notAlternative: false
 +      path: ""
 +      permalinkable: false
 +      protocol: ""
 +      rel: alternate
 +      weight: 0
 +    markdown:
 +      baseName: index
 +      isHTML: false
 +      isPlainText: true
 +      mediaType: text/markdown
 +      name: markdown
 +      noUgly: false
 +      notAlternative: false
 +      path: ""
 +      permalinkable: false
 +      protocol: ""
 +      rel: alternate
 +      weight: 0
 +    robots:
 +      baseName: robots
 +      isHTML: false
 +      isPlainText: true
 +      mediaType: text/plain
 +      name: robots
 +      noUgly: false
 +      notAlternative: false
 +      path: ""
 +      permalinkable: false
 +      protocol: ""
 +      rel: alternate
 +      weight: 0
 +    rss:
 +      baseName: index
 +      isHTML: false
 +      isPlainText: false
 +      mediaType: application/rss+xml
 +      name: rss
 +      noUgly: true
 +      notAlternative: false
 +      path: ""
 +      permalinkable: false
 +      protocol: ""
 +      rel: alternate
 +      weight: 0
 +    sitemap:
 +      baseName: sitemap
 +      isHTML: false
 +      isPlainText: false
 +      mediaType: application/xml
 +      name: sitemap
 +      noUgly: true
 +      notAlternative: false
 +      path: ""
 +      permalinkable: false
 +      protocol: ""
 +      rel: sitemap
 +      weight: 0
 +    webappmanifest:
 +      baseName: manifest
 +      isHTML: false
 +      isPlainText: true
 +      mediaType: application/manifest+json
 +      name: webappmanifest
 +      noUgly: false
 +      notAlternative: true
 +      path: ""
 +      permalinkable: false
 +      protocol: ""
 +      rel: manifest
 +      weight: 0
 +  outputs:
 +    home:
 +    - html
 +    - rss
 +    page:
 +    - html
 +    rss:
 +    - rss
 +    section:
 +    - html
 +    - rss
 +    taxonomy:
 +    - html
 +    - rss
 +    term:
 +    - html
 +    - rss
 +  paginate: 10
 +  paginatePath: page
 +  panicOnWarning: false
 +  params: {}
 +  permalinks:
 +    page: {}
 +    section: {}
 +    taxonomy: {}
 +    term: {}
 +  pluralizeListTitles: true
 +  printI18nWarnings: false
 +  printPathWarnings: false
 +  printUnusedTemplates: false
 +  privacy:
 +    disqus:
 +      disable: false
 +    googleAnalytics:
 +      anonymizeIP: false
 +      disable: false
 +      respectDoNotTrack: false
 +      useSessionStorage: false
 +    instagram:
 +      disable: false
 +      simple: false
 +    twitter:
 +      disable: false
 +      enableDNT: false
 +      simple: false
 +    vimeo:
 +      disable: false
 +      enableDNT: false
 +      simple: false
 +    youTube:
 +      disable: false
 +      privacyEnhanced: false
 +  publishDir: public
 +  refLinksErrorLevel: ""
 +  refLinksNotFoundURL: ""
 +  related:
 +    includeNewer: false
 +    indices:
 +    - applyFilter: false
 +      cardinalityThreshold: 0
 +      name: keywords
 +      pattern: ""
 +      toLower: false
 +      type: basic
 +      weight: 100
 +    - applyFilter: false
 +      cardinalityThreshold: 0
 +      name: date
 +      pattern: ""
 +      toLower: false
 +      type: basic
 +      weight: 10
 +    - applyFilter: false
 +      cardinalityThreshold: 0
 +      name: tags
 +      pattern: ""
 +      toLower: false
 +      type: basic
 +      weight: 80
 +    threshold: 80
 +    toLower: false
 +  relativeURLs: false
 +  removePathAccents: false
 +  resourceDir: resources
 +  sectionPagesMenu: ""
 +  security:
 +    enableInlineShortcodes: false
 +    exec:
 +      allow:
 +      - ^(dart-)?sass(-embedded)?$
 +      - ^go$
 +      - ^npx$
 +      - ^postcss$
 +      osEnv:
 +      - (?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG)$
 +    funcs:
 +      getenv:
 +      - ^HUGO_
 +      - ^CI$
 +    goTemplates:
 +      allowActionJSTmpl: false
 +    http:
 +      mediaTypes: null
 +      methods:
 +      - (?i)GET|POST
 +      urls:
 +      - .*
 +  server:
 +    headers: null
 +    redirects:
 +    - force: false
 +      from: '**'
 +      status: 404
 +      to: /404.html
 +  services:
 +    disqus:
 +      shortname: ""
 +    googleAnalytics:
 +      id: ""
 +    instagram:
 +      accessToken: ""
 +      disableInlineCSS: false
 +    rss:
 +      limit: -1
 +    twitter:
 +      disableInlineCSS: false
 +  sitemap:
 +    changeFreq: ""
 +    filename: sitemap.xml
 +    priority: -1
 +  social: null
 +  staticDir:
 +  - static
 +  staticDir0: null
 +  staticDir1: null
 +  staticDir2: null
 +  staticDir3: null
 +  staticDir4: null
 +  staticDir5: null
 +  staticDir6: null
 +  staticDir7: null
 +  staticDir8: null
 +  staticDir9: null
 +  staticDir10: null
 +  summaryLength: 70
 +  taxonomies:
 +    category: categories
 +    tag: tags
 +  templateMetrics: false
 +  templateMetricsHints: false
 +  theme: null
 +  themesDir: themes
 +  timeZone: ""
 +  timeout: 30s
 +  title: ""
 +  titleCaseStyle: AP
 +  uglyURLs: false
 +  workingDir: ""
 +config_helpers:
 +  mergeStrategy:
 +    build:
 +      _merge: none
 +    caches:
 +      _merge: none
 +    cascade:
 +      _merge: none
 +    deployment:
 +      _merge: none
 +    frontmatter:
 +      _merge: none
 +    imaging:
 +      _merge: none
 +    languages:
 +      _merge: none
 +      en:
 +        _merge: none
 +        menus:
 +          _merge: shallow
 +        params:
 +          _merge: deep
 +    markup:
 +      _merge: none
 +    mediatypes:
 +      _merge: shallow
 +    menus:
 +      _merge: shallow
 +    minify:
 +      _merge: none
 +    module:
 +      _merge: none
 +    outputformats:
 +      _merge: shallow
 +    outputs:
 +      _merge: none
 +    params:
 +      _merge: deep
 +    permalinks:
 +      _merge: none
 +    privacy:
 +      _merge: none
 +    related:
 +      _merge: none
 +    security:
 +      _merge: none
 +    server:
 +      _merge: none
 +    services:
 +      _merge: none
 +    sitemap:
 +      _merge: none
 +    taxonomies:
 +      _merge: none
 +output:
 +  layouts:
 +  - Example: Single page in "posts" section
 +    Kind: page
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/posts/single.html.html
 +    - layouts/posts/single.html
 +    - layouts/_default/single.html.html
 +    - layouts/_default/single.html
 +  - Example: Base template for single page in "posts" section
 +    Kind: page
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/posts/single-baseof.html.html
 +    - layouts/posts/baseof.html.html
 +    - layouts/posts/single-baseof.html
 +    - layouts/posts/baseof.html
 +    - layouts/_default/single-baseof.html.html
 +    - layouts/_default/baseof.html.html
 +    - layouts/_default/single-baseof.html
 +    - layouts/_default/baseof.html
 +  - Example: Single page in "posts" section with layout set to "demolayout"
 +    Kind: page
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/posts/demolayout.html.html
 +    - layouts/posts/single.html.html
 +    - layouts/posts/demolayout.html
 +    - layouts/posts/single.html
 +    - layouts/_default/demolayout.html.html
 +    - layouts/_default/single.html.html
 +    - layouts/_default/demolayout.html
 +    - layouts/_default/single.html
 +  - Example: Base template for single page in "posts" section with layout set to "demolayout"
 +    Kind: page
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/posts/demolayout-baseof.html.html
 +    - layouts/posts/single-baseof.html.html
 +    - layouts/posts/baseof.html.html
 +    - layouts/posts/demolayout-baseof.html
 +    - layouts/posts/single-baseof.html
 +    - layouts/posts/baseof.html
 +    - layouts/_default/demolayout-baseof.html.html
 +    - layouts/_default/single-baseof.html.html
 +    - layouts/_default/baseof.html.html
 +    - layouts/_default/demolayout-baseof.html
 +    - layouts/_default/single-baseof.html
 +    - layouts/_default/baseof.html
 +  - Example: AMP single page
 +    Kind: page
 +    OutputFormat: amp
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/posts/single.amp.html
 +    - layouts/posts/single.html
 +    - layouts/_default/single.amp.html
 +    - layouts/_default/single.html
 +  - Example: AMP single page, French language
 +    Kind: page
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/posts/single.fr.html.html
 +    - layouts/posts/single.html.html
 +    - layouts/posts/single.fr.html
 +    - layouts/posts/single.html
 +    - layouts/_default/single.fr.html.html
 +    - layouts/_default/single.html.html
 +    - layouts/_default/single.fr.html
 +    - layouts/_default/single.html
 +  - Example: Home page
 +    Kind: home
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/index.html.html
 +    - layouts/home.html.html
 +    - layouts/list.html.html
 +    - layouts/index.html
 +    - layouts/home.html
 +    - layouts/list.html
 +    - layouts/_default/index.html.html
 +    - layouts/_default/home.html.html
 +    - layouts/_default/list.html.html
 +    - layouts/_default/index.html
 +    - layouts/_default/home.html
 +    - layouts/_default/list.html
 +  - Example: Base template for home page
 +    Kind: home
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/index-baseof.html.html
 +    - layouts/home-baseof.html.html
 +    - layouts/list-baseof.html.html
 +    - layouts/baseof.html.html
 +    - layouts/index-baseof.html
 +    - layouts/home-baseof.html
 +    - layouts/list-baseof.html
 +    - layouts/baseof.html
 +    - layouts/_default/index-baseof.html.html
 +    - layouts/_default/home-baseof.html.html
 +    - layouts/_default/list-baseof.html.html
 +    - layouts/_default/baseof.html.html
 +    - layouts/_default/index-baseof.html
 +    - layouts/_default/home-baseof.html
 +    - layouts/_default/list-baseof.html
 +    - layouts/_default/baseof.html
 +  - Example: Home page with type set to "demotype"
 +    Kind: home
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/demotype/index.html.html
 +    - layouts/demotype/home.html.html
 +    - layouts/demotype/list.html.html
 +    - layouts/demotype/index.html
 +    - layouts/demotype/home.html
 +    - layouts/demotype/list.html
 +    - layouts/index.html.html
 +    - layouts/home.html.html
 +    - layouts/list.html.html
 +    - layouts/index.html
 +    - layouts/home.html
 +    - layouts/list.html
 +    - layouts/_default/index.html.html
 +    - layouts/_default/home.html.html
 +    - layouts/_default/list.html.html
 +    - layouts/_default/index.html
 +    - layouts/_default/home.html
 +    - layouts/_default/list.html
 +  - Example: Base template for home page with type set to "demotype"
 +    Kind: home
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/demotype/index-baseof.html.html
 +    - layouts/demotype/home-baseof.html.html
 +    - layouts/demotype/list-baseof.html.html
 +    - layouts/demotype/baseof.html.html
 +    - layouts/demotype/index-baseof.html
 +    - layouts/demotype/home-baseof.html
 +    - layouts/demotype/list-baseof.html
 +    - layouts/demotype/baseof.html
 +    - layouts/index-baseof.html.html
 +    - layouts/home-baseof.html.html
 +    - layouts/list-baseof.html.html
 +    - layouts/baseof.html.html
 +    - layouts/index-baseof.html
 +    - layouts/home-baseof.html
 +    - layouts/list-baseof.html
 +    - layouts/baseof.html
 +    - layouts/_default/index-baseof.html.html
 +    - layouts/_default/home-baseof.html.html
 +    - layouts/_default/list-baseof.html.html
 +    - layouts/_default/baseof.html.html
 +    - layouts/_default/index-baseof.html
 +    - layouts/_default/home-baseof.html
 +    - layouts/_default/list-baseof.html
 +    - layouts/_default/baseof.html
 +  - Example: Home page with layout set to "demolayout"
 +    Kind: home
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/demolayout.html.html
 +    - layouts/index.html.html
 +    - layouts/home.html.html
 +    - layouts/list.html.html
 +    - layouts/demolayout.html
 +    - layouts/index.html
 +    - layouts/home.html
 +    - layouts/list.html
 +    - layouts/_default/demolayout.html.html
 +    - layouts/_default/index.html.html
 +    - layouts/_default/home.html.html
 +    - layouts/_default/list.html.html
 +    - layouts/_default/demolayout.html
 +    - layouts/_default/index.html
 +    - layouts/_default/home.html
 +    - layouts/_default/list.html
 +  - Example: AMP home, French language
 +    Kind: home
 +    OutputFormat: amp
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/index.fr.amp.html
 +    - layouts/home.fr.amp.html
 +    - layouts/list.fr.amp.html
 +    - layouts/index.amp.html
 +    - layouts/home.amp.html
 +    - layouts/list.amp.html
 +    - layouts/index.fr.html
 +    - layouts/home.fr.html
 +    - layouts/list.fr.html
 +    - layouts/index.html
 +    - layouts/home.html
 +    - layouts/list.html
 +    - layouts/_default/index.fr.amp.html
 +    - layouts/_default/home.fr.amp.html
 +    - layouts/_default/list.fr.amp.html
 +    - layouts/_default/index.amp.html
 +    - layouts/_default/home.amp.html
 +    - layouts/_default/list.amp.html
 +    - layouts/_default/index.fr.html
 +    - layouts/_default/home.fr.html
 +    - layouts/_default/list.fr.html
 +    - layouts/_default/index.html
 +    - layouts/_default/home.html
 +    - layouts/_default/list.html
 +  - Example: JSON home
 +    Kind: home
 +    OutputFormat: json
 +    Suffix: json
 +    Template Lookup Order:
 +    - layouts/index.json.json
 +    - layouts/home.json.json
 +    - layouts/list.json.json
 +    - layouts/index.json
 +    - layouts/home.json
 +    - layouts/list.json
 +    - layouts/_default/index.json.json
 +    - layouts/_default/home.json.json
 +    - layouts/_default/list.json.json
 +    - layouts/_default/index.json
 +    - layouts/_default/home.json
 +    - layouts/_default/list.json
 +  - Example: RSS home
 +    Kind: home
 +    OutputFormat: rss
 +    Suffix: xml
 +    Template Lookup Order:
 +    - layouts/index.rss.xml
 +    - layouts/home.rss.xml
 +    - layouts/rss.xml
 +    - layouts/list.rss.xml
 +    - layouts/index.xml
 +    - layouts/home.xml
 +    - layouts/list.xml
 +    - layouts/_default/index.rss.xml
 +    - layouts/_default/home.rss.xml
 +    - layouts/_default/rss.xml
 +    - layouts/_default/list.rss.xml
 +    - layouts/_default/index.xml
 +    - layouts/_default/home.xml
 +    - layouts/_default/list.xml
 +    - layouts/_internal/_default/rss.xml
 +  - Example: Section list for "posts"
 +    Kind: section
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/posts/posts.html.html
 +    - layouts/posts/section.html.html
 +    - layouts/posts/list.html.html
 +    - layouts/posts/posts.html
 +    - layouts/posts/section.html
 +    - layouts/posts/list.html
 +    - layouts/section/posts.html.html
 +    - layouts/section/section.html.html
 +    - layouts/section/list.html.html
 +    - layouts/section/posts.html
 +    - layouts/section/section.html
 +    - layouts/section/list.html
 +    - layouts/_default/posts.html.html
 +    - layouts/_default/section.html.html
 +    - layouts/_default/list.html.html
 +    - layouts/_default/posts.html
 +    - layouts/_default/section.html
 +    - layouts/_default/list.html
 +  - Example: Section list for "posts" with type set to "blog"
 +    Kind: section
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/blog/posts.html.html
 +    - layouts/blog/section.html.html
 +    - layouts/blog/list.html.html
 +    - layouts/blog/posts.html
 +    - layouts/blog/section.html
 +    - layouts/blog/list.html
 +    - layouts/posts/posts.html.html
 +    - layouts/posts/section.html.html
 +    - layouts/posts/list.html.html
 +    - layouts/posts/posts.html
 +    - layouts/posts/section.html
 +    - layouts/posts/list.html
 +    - layouts/section/posts.html.html
 +    - layouts/section/section.html.html
 +    - layouts/section/list.html.html
 +    - layouts/section/posts.html
 +    - layouts/section/section.html
 +    - layouts/section/list.html
 +    - layouts/_default/posts.html.html
 +    - layouts/_default/section.html.html
 +    - layouts/_default/list.html.html
 +    - layouts/_default/posts.html
 +    - layouts/_default/section.html
 +    - layouts/_default/list.html
 +  - Example: Section list for "posts" with layout set to "demolayout"
 +    Kind: section
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/posts/demolayout.html.html
 +    - layouts/posts/posts.html.html
 +    - layouts/posts/section.html.html
 +    - layouts/posts/list.html.html
 +    - layouts/posts/demolayout.html
 +    - layouts/posts/posts.html
 +    - layouts/posts/section.html
 +    - layouts/posts/list.html
 +    - layouts/section/demolayout.html.html
 +    - layouts/section/posts.html.html
 +    - layouts/section/section.html.html
 +    - layouts/section/list.html.html
 +    - layouts/section/demolayout.html
 +    - layouts/section/posts.html
 +    - layouts/section/section.html
 +    - layouts/section/list.html
 +    - layouts/_default/demolayout.html.html
 +    - layouts/_default/posts.html.html
 +    - layouts/_default/section.html.html
 +    - layouts/_default/list.html.html
 +    - layouts/_default/demolayout.html
 +    - layouts/_default/posts.html
 +    - layouts/_default/section.html
 +    - layouts/_default/list.html
 +  - Example: Section list for "posts"
 +    Kind: section
 +    OutputFormat: rss
 +    Suffix: xml
 +    Template Lookup Order:
 +    - layouts/posts/section.rss.xml
 +    - layouts/posts/rss.xml
 +    - layouts/posts/list.rss.xml
 +    - layouts/posts/section.xml
 +    - layouts/posts/list.xml
 +    - layouts/section/section.rss.xml
 +    - layouts/section/rss.xml
 +    - layouts/section/list.rss.xml
 +    - layouts/section/section.xml
 +    - layouts/section/list.xml
 +    - layouts/_default/section.rss.xml
 +    - layouts/_default/rss.xml
 +    - layouts/_default/list.rss.xml
 +    - layouts/_default/section.xml
 +    - layouts/_default/list.xml
 +    - layouts/_internal/_default/rss.xml
 +  - Example: Taxonomy list for "categories"
 +    Kind: taxonomy
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/categories/category.terms.html.html
 +    - layouts/categories/terms.html.html
 +    - layouts/categories/taxonomy.html.html
 +    - layouts/categories/list.html.html
 +    - layouts/categories/category.terms.html
 +    - layouts/categories/terms.html
 +    - layouts/categories/taxonomy.html
 +    - layouts/categories/list.html
 +    - layouts/category/category.terms.html.html
 +    - layouts/category/terms.html.html
 +    - layouts/category/taxonomy.html.html
 +    - layouts/category/list.html.html
 +    - layouts/category/category.terms.html
 +    - layouts/category/terms.html
 +    - layouts/category/taxonomy.html
 +    - layouts/category/list.html
 +    - layouts/taxonomy/category.terms.html.html
 +    - layouts/taxonomy/terms.html.html
 +    - layouts/taxonomy/taxonomy.html.html
 +    - layouts/taxonomy/list.html.html
 +    - layouts/taxonomy/category.terms.html
 +    - layouts/taxonomy/terms.html
 +    - layouts/taxonomy/taxonomy.html
 +    - layouts/taxonomy/list.html
 +    - layouts/_default/category.terms.html.html
 +    - layouts/_default/terms.html.html
 +    - layouts/_default/taxonomy.html.html
 +    - layouts/_default/list.html.html
 +    - layouts/_default/category.terms.html
 +    - layouts/_default/terms.html
 +    - layouts/_default/taxonomy.html
 +    - layouts/_default/list.html
 +  - Example: Taxonomy list for "categories"
 +    Kind: taxonomy
 +    OutputFormat: rss
 +    Suffix: xml
 +    Template Lookup Order:
 +    - layouts/categories/category.terms.rss.xml
 +    - layouts/categories/terms.rss.xml
 +    - layouts/categories/taxonomy.rss.xml
 +    - layouts/categories/rss.xml
 +    - layouts/categories/list.rss.xml
 +    - layouts/categories/category.terms.xml
 +    - layouts/categories/terms.xml
 +    - layouts/categories/taxonomy.xml
 +    - layouts/categories/list.xml
 +    - layouts/category/category.terms.rss.xml
 +    - layouts/category/terms.rss.xml
 +    - layouts/category/taxonomy.rss.xml
 +    - layouts/category/rss.xml
 +    - layouts/category/list.rss.xml
 +    - layouts/category/category.terms.xml
 +    - layouts/category/terms.xml
 +    - layouts/category/taxonomy.xml
 +    - layouts/category/list.xml
 +    - layouts/taxonomy/category.terms.rss.xml
 +    - layouts/taxonomy/terms.rss.xml
 +    - layouts/taxonomy/taxonomy.rss.xml
 +    - layouts/taxonomy/rss.xml
 +    - layouts/taxonomy/list.rss.xml
 +    - layouts/taxonomy/category.terms.xml
 +    - layouts/taxonomy/terms.xml
 +    - layouts/taxonomy/taxonomy.xml
 +    - layouts/taxonomy/list.xml
 +    - layouts/_default/category.terms.rss.xml
 +    - layouts/_default/terms.rss.xml
 +    - layouts/_default/taxonomy.rss.xml
 +    - layouts/_default/rss.xml
 +    - layouts/_default/list.rss.xml
 +    - layouts/_default/category.terms.xml
 +    - layouts/_default/terms.xml
 +    - layouts/_default/taxonomy.xml
 +    - layouts/_default/list.xml
 +    - layouts/_internal/_default/rss.xml
 +  - Example: Term list for "categories"
 +    Kind: term
 +    OutputFormat: html
 +    Suffix: html
 +    Template Lookup Order:
 +    - layouts/categories/term.html.html
 +    - layouts/categories/category.html.html
 +    - layouts/categories/taxonomy.html.html
 +    - layouts/categories/list.html.html
 +    - layouts/categories/term.html
 +    - layouts/categories/category.html
 +    - layouts/categories/taxonomy.html
 +    - layouts/categories/list.html
 +    - layouts/term/term.html.html
 +    - layouts/term/category.html.html
 +    - layouts/term/taxonomy.html.html
 +    - layouts/term/list.html.html
 +    - layouts/term/term.html
 +    - layouts/term/category.html
 +    - layouts/term/taxonomy.html
 +    - layouts/term/list.html
 +    - layouts/taxonomy/term.html.html
 +    - layouts/taxonomy/category.html.html
 +    - layouts/taxonomy/taxonomy.html.html
 +    - layouts/taxonomy/list.html.html
 +    - layouts/taxonomy/term.html
 +    - layouts/taxonomy/category.html
 +    - layouts/taxonomy/taxonomy.html
 +    - layouts/taxonomy/list.html
 +    - layouts/category/term.html.html
 +    - layouts/category/category.html.html
 +    - layouts/category/taxonomy.html.html
 +    - layouts/category/list.html.html
 +    - layouts/category/term.html
 +    - layouts/category/category.html
 +    - layouts/category/taxonomy.html
 +    - layouts/category/list.html
 +    - layouts/_default/term.html.html
 +    - layouts/_default/category.html.html
 +    - layouts/_default/taxonomy.html.html
 +    - layouts/_default/list.html.html
 +    - layouts/_default/term.html
 +    - layouts/_default/category.html
 +    - layouts/_default/taxonomy.html
 +    - layouts/_default/list.html
 +  - Example: Term list for "categories"
 +    Kind: term
 +    OutputFormat: rss
 +    Suffix: xml
 +    Template Lookup Order:
 +    - layouts/categories/term.rss.xml
 +    - layouts/categories/category.rss.xml
 +    - layouts/categories/taxonomy.rss.xml
 +    - layouts/categories/rss.xml
 +    - layouts/categories/list.rss.xml
 +    - layouts/categories/term.xml
 +    - layouts/categories/category.xml
 +    - layouts/categories/taxonomy.xml
 +    - layouts/categories/list.xml
 +    - layouts/term/term.rss.xml
 +    - layouts/term/category.rss.xml
 +    - layouts/term/taxonomy.rss.xml
 +    - layouts/term/rss.xml
 +    - layouts/term/list.rss.xml
 +    - layouts/term/term.xml
 +    - layouts/term/category.xml
 +    - layouts/term/taxonomy.xml
 +    - layouts/term/list.xml
 +    - layouts/taxonomy/term.rss.xml
 +    - layouts/taxonomy/category.rss.xml
 +    - layouts/taxonomy/taxonomy.rss.xml
 +    - layouts/taxonomy/rss.xml
 +    - layouts/taxonomy/list.rss.xml
 +    - layouts/taxonomy/term.xml
 +    - layouts/taxonomy/category.xml
 +    - layouts/taxonomy/taxonomy.xml
 +    - layouts/taxonomy/list.xml
 +    - layouts/category/term.rss.xml
 +    - layouts/category/category.rss.xml
 +    - layouts/category/taxonomy.rss.xml
 +    - layouts/category/rss.xml
 +    - layouts/category/list.rss.xml
 +    - layouts/category/term.xml
 +    - layouts/category/category.xml
 +    - layouts/category/taxonomy.xml
 +    - layouts/category/list.xml
 +    - layouts/_default/term.rss.xml
 +    - layouts/_default/category.rss.xml
 +    - layouts/_default/taxonomy.rss.xml
 +    - layouts/_default/rss.xml
 +    - layouts/_default/list.rss.xml
 +    - layouts/_default/term.xml
 +    - layouts/_default/category.xml
 +    - layouts/_default/taxonomy.xml
 +    - layouts/_default/list.xml
 +    - layouts/_internal/_default/rss.xml
 +tpl:
 +  funcs:
 +    cast:
 +      ToFloat:
 +        Aliases:
 +        - float
 +        Args:
 +        - v
 +        Description: ToFloat converts v to a float.
 +        Examples:
 +        - - '{{ "1234" | float | printf "%T" }}'
 +          - float64
 +      ToInt:
 +        Aliases:
 +        - int
 +        Args:
 +        - v
 +        Description: ToInt converts v to an int.
 +        Examples:
 +        - - '{{ "1234" | int | printf "%T" }}'
 +          - int
 +      ToString:
 +        Aliases:
 +        - string
 +        Args:
 +        - v
 +        Description: ToString converts v to a string.
 +        Examples:
 +        - - '{{ 1234 | string | printf "%T" }}'
 +          - string
 +    collections:
 +      After:
 +        Aliases:
 +        - after
 +        Args:
 +        - "n"
 +        - l
 +        Description: After returns all the items after the first n items in list l.
 +        Examples: []
 +      Append:
 +        Aliases:
 +        - append
 +        Args:
 +        - args
 +        Description: "Append appends args up to the last one to the slice in the last
 +          argument.\nThis construct allows template constructs like this:\n\n\t{{
 +          $pages = $pages | append $p2 $p1 }}\n\nNote that with 2 arguments where
 +          both are slices of the same type,\nthe first slice will be appended to the
 +          second:\n\n\t{{ $pages = $pages | append .Site.RegularPages }}"
 +        Examples: []
 +      Apply:
 +        Aliases:
 +        - apply
 +        Args:
 +        - ctx
 +        - c
 +        - fname
 +        - args
 +        Description: Apply takes an array or slice c and returns a new slice with
 +          the function fname applied over it.
 +        Examples: []
 +      Complement:
 +        Aliases:
 +        - complement
 +        Args:
 +        - ls
 +        Description: "Complement gives the elements in the last element of ls that
 +          are not in\nany of the others.\n\nAll elements of ls must be slices or arrays
 +          of comparable types.\n\nThe reasoning behind this rather clumsy API is so
 +          we can do this in the templates:\n\n\t{{ $c := .Pages | complement $last4
 +          }}"
 +        Examples:
 +        - - '{{ slice "a" "b" "c" "d" "e" "f" | complement (slice "b" "c") (slice
 +            "d" "e") }}'
 +          - '[a f]'
 +      Delimit:
 +        Aliases:
 +        - delimit
 +        Args:
 +        - ctx
 +        - l
 +        - sep
 +        - last
 +        Description: |-
 +          Delimit takes a given list l and returns a string delimited by sep.
 +          If last is passed to the function, it will be used as the final delimiter.
 +        Examples:
 +        - - '{{ delimit (slice "A" "B" "C") ", " " and " }}'
 +          - A, B and C
 +      Dictionary:
 +        Aliases:
 +        - dict
 +        Args:
 +        - values
 +        Description: |-
 +          Dictionary creates a new map from the given parameters by
 +          treating values as key-value pairs.  The number of values must be even.
 +          The keys can be string slices, which will create the needed nested structure.
 +        Examples: []
 +      EchoParam:
 +        Aliases:
 +        - echoParam
 +        Args:
 +        - c
 +        - k
 +        Description: |-
 +          EchoParam returns the value in the collection c with key k if is set; otherwise, it returns an
 +          empty string.
 +          Deprecated: Use the index function instead.
 +        Examples:
 +        - - '{{ echoParam .Params "langCode" }}'
 +          - en
 +      First:
 +        Aliases:
 +        - first
 +        Args:
 +        - limit
 +        - l
 +        Description: First returns the first limit items in list l.
 +        Examples: []
 +      Group:
 +        Aliases:
 +        - group
 +        Args:
 +        - key
 +        - items
 +        Description: |-
 +          Group groups a set of items by the given key.
 +          This is currently only supported for Pages.
 +        Examples: []
 +      In:
 +        Aliases:
 +        - in
 +        Args:
 +        - l
 +        - v
 +        Description: In returns whether v is in the list l.  l may be an array or
 +          slice.
 +        Examples:
 +        - - '{{ if in "this string contains a substring" "substring" }}Substring found!{{
 +            end }}'
 +          - Substring found!
 +      Index:
 +        Aliases:
 +        - index
 +        Args:
 +        - item
 +        - args
 +        Description: |-
 +          Index returns the result of indexing its first argument by the following
 +          arguments. Thus "index x 1 2 3" is, in Go syntax, x[1][2][3]. Each
 +          indexed item must be a map, slice, or array.
 +
 +          Adapted from Go stdlib src/text/template/funcs.go.
 +
 +          We deviate from the stdlib mostly because of https://github.com/golang/go/issues/14751.
 +        Examples: []
 +      Intersect:
 +        Aliases:
 +        - intersect
 +        Args:
 +        - l1
 +        - l2
 +        Description: |-
 +          Intersect returns the common elements in the given sets, l1 and l2.  l1 and
 +          l2 must be of the same type and may be either arrays or slices.
 +        Examples: []
 +      IsSet:
 +        Aliases:
 +        - isSet
 +        - isset
 +        Args:
 +        - c
 +        - key
 +        Description: |-
 +          IsSet returns whether a given array, channel, slice, or map in c has the given key
 +          defined.
 +        Examples: []
 +      KeyVals:
 +        Aliases:
 +        - keyVals
 +        Args:
 +        - key
 +        - values
 +        Description: KeyVals creates a key and values wrapper.
 +        Examples:
 +        - - '{{ keyVals "key" "a" "b" }}'
 +          - 'key: [a b]'
 +      Last:
 +        Aliases:
 +        - last
 +        Args:
 +        - limit
 +        - l
 +        Description: Last returns the last limit items in the list l.
 +        Examples: []
 +      Merge:
 +        Aliases:
 +        - merge
 +        Args:
 +        - params
 +        Description: |-
 +          Merge creates a copy of the final parameter in params and merges the preceding
 +          parameters into it in reverse order.
 +
 +          Currently only maps are supported. Key handling is case insensitive.
 +        Examples:
 +        - - '{{ dict "title" "Hugo Rocks!" | collections.Merge (dict "title" "Default
 +            Title" "description" "Yes, Hugo Rocks!") | sort }}'
 +          - '[Yes, Hugo Rocks! Hugo Rocks!]'
 +        - - '{{ merge (dict "title" "Default Title" "description" "Yes, Hugo Rocks!")
 +            (dict "title" "Hugo Rocks!") | sort }}'
 +          - '[Yes, Hugo Rocks! Hugo Rocks!]'
 +        - - '{{ merge (dict "title" "Default Title" "description" "Yes, Hugo Rocks!")
 +            (dict "title" "Hugo Rocks!") (dict "extra" "For reals!") | sort }}'
 +          - '[Yes, Hugo Rocks! For reals! Hugo Rocks!]'
 +      NewScratch:
 +        Aliases:
 +        - newScratch
 +        Args: null
 +        Description: |-
 +          NewScratch creates a new Scratch which can be used to store values in a
 +          thread safe way.
 +        Examples:
 +        - - '{{ $scratch := newScratch }}{{ $scratch.Add "b" 2 }}{{ $scratch.Add "b"
 +            2 }}{{ $scratch.Get "b" }}'
 +          - "4"
 +      Querify:
 +        Aliases:
 +        - querify
 +        Args:
 +        - params
 +        Description: Querify encodes the given params in URL-encoded form ("bar=baz&foo=quux")
 +          sorted by key.
 +        Examples:
 +        - - '{{ (querify "foo" 1 "bar" 2 "baz" "with spaces" "qux" "this&that=those")
 +            | safeHTML }}'
 +          - bar=2&baz=with+spaces&foo=1&qux=this%26that%3Dthose
 +        - - <a href="https://www.google.com?{{ (querify "q" "test" "page" 3) | safeURL
 +            }}">Search</a>
 +          - <a href="https://www.google.com?page=3&amp;q=test">Search</a>
 +        - - '{{ slice "foo" 1 "bar" 2 | querify | safeHTML }}'
 +          - bar=2&foo=1
 +      Reverse:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Seq:
 +        Aliases:
 +        - seq
 +        Args:
 +        - args
 +        Description: "Seq creates a sequence of integers from args. It's named and
 +          used as GNU's seq.\n\nExamples:\n\n\t3 => 1, 2, 3\n\t1 2 4 => 1, 3\n\t-3
 +          => -1, -2, -3\n\t1 4 => 1, 2, 3, 4\n\t1 -2 => 1, 0, -1, -2"
 +        Examples:
 +        - - '{{ seq 3 }}'
 +          - '[1 2 3]'
 +      Shuffle:
 +        Aliases:
 +        - shuffle
 +        Args:
 +        - l
 +        Description: Shuffle returns list l in a randomised order.
 +        Examples: []
 +      Slice:
 +        Aliases:
 +        - slice
 +        Args:
 +        - args
 +        Description: Slice returns a slice of all passed arguments.
 +        Examples:
 +        - - '{{ slice "B" "C" "A" | sort }}'
 +          - '[A B C]'
 +      Sort:
 +        Aliases:
 +        - sort
 +        Args:
 +        - ctx
 +        - l
 +        - args
 +        Description: Sort returns a sorted copy of the list l.
 +        Examples: []
 +      SymDiff:
 +        Aliases:
 +        - symdiff
 +        Args:
 +        - s2
 +        - s1
 +        Description: |-
 +          SymDiff returns the symmetric difference of s1 and s2.
 +          Arguments must be either a slice or an array of comparable types.
 +        Examples:
 +        - - '{{ slice 1 2 3 | symdiff (slice 3 4) }}'
 +          - '[1 2 4]'
 +      Union:
 +        Aliases:
 +        - union
 +        Args:
 +        - l1
 +        - l2
 +        Description: |-
 +          Union returns the union of the given sets, l1 and l2. l1 and
 +          l2 must be of the same type and may be either arrays or slices.
 +          If l1 and l2 aren't of the same type then l1 will be returned.
 +          If either l1 or l2 is nil then the non-nil list will be returned.
 +        Examples:
 +        - - '{{ union (slice 1 2 3) (slice 3 4 5) }}'
 +          - '[1 2 3 4 5]'
 +      Uniq:
 +        Aliases:
 +        - uniq
 +        Args:
 +        - l
 +        Description: Uniq returns a new list with duplicate elements in the list l
 +          removed.
 +        Examples:
 +        - - '{{ slice 1 2 3 2 | uniq }}'
 +          - '[1 2 3]'
 +      Where:
 +        Aliases:
 +        - where
 +        Args:
 +        - ctx
 +        - c
 +        - key
 +        - args
 +        Description: Where returns a filtered subset of collection c.
 +        Examples: []
 +    compare:
 +      Conditional:
 +        Aliases:
 +        - cond
 +        Args:
 +        - cond
 +        - v1
 +        - v2
 +        Description: |-
 +          Conditional can be used as a ternary operator.
 +
 +          It returns v1 if cond is true, else v2.
 +        Examples:
 +        - - '{{ cond (eq (add 2 2) 4) "2+2 is 4" "what?" | safeHTML }}'
 +          - 2+2 is 4
 +      Default:
 +        Aliases:
 +        - default
 +        Args:
 +        - defaultv
 +        - givenv
 +        Description: |-
 +          Default checks whether a givenv is set and returns the default value defaultv if it
 +          is not.  "Set" in this context means non-zero for numeric types and times;
 +          non-zero length for strings, arrays, slices, and maps;
 +          any boolean or struct value; or non-nil for any other types.
 +        Examples:
 +        - - '{{ "Hugo Rocks!" | default "Hugo Rules!" }}'
 +          - Hugo Rocks!
 +        - - '{{ "" | default "Hugo Rules!" }}'
 +          - Hugo Rules!
 +      Eq:
 +        Aliases:
 +        - eq
 +        Args:
 +        - first
 +        - others
 +        Description: Eq returns the boolean truth of arg1 == arg2 || arg1 == arg3
 +          || arg1 == arg4.
 +        Examples:
 +        - - '{{ if eq .Section "blog" }}current-section{{ end }}'
 +          - current-section
 +      Ge:
 +        Aliases:
 +        - ge
 +        Args:
 +        - first
 +        - others
 +        Description: Ge returns the boolean truth of arg1 >= arg2 && arg1 >= arg3
 +          && arg1 >= arg4.
 +        Examples:
 +        - - '{{ if ge hugo.Version "0.80" }}Reasonable new Hugo version!{{ end }}'
 +          - Reasonable new Hugo version!
 +      Gt:
 +        Aliases:
 +        - gt
 +        Args:
 +        - first
 +        - others
 +        Description: Gt returns the boolean truth of arg1 > arg2 && arg1 > arg3 &&
 +          arg1 > arg4.
 +        Examples: []
 +      Le:
 +        Aliases:
 +        - le
 +        Args:
 +        - first
 +        - others
 +        Description: Le returns the boolean truth of arg1 <= arg2 && arg1 <= arg3
 +          && arg1 <= arg4.
 +        Examples: []
 +      Lt:
 +        Aliases:
 +        - lt
 +        Args:
 +        - first
 +        - others
 +        Description: Lt returns the boolean truth of arg1 < arg2 && arg1 < arg3 &&
 +          arg1 < arg4.
 +        Examples: []
 +      LtCollate:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Ne:
 +        Aliases:
 +        - ne
 +        Args:
 +        - first
 +        - others
 +        Description: Ne returns the boolean truth of arg1 != arg2 && arg1 != arg3
 +          && arg1 != arg4.
 +        Examples: []
 +    crypto:
 +      FNV32a:
 +        Aliases: null
 +        Args:
 +        - v
 +        Description: |-
 +          FNV32a hashes v using fnv32a algorithm.
 +          <docsmeta>{"newIn": "0.98.0" }</docsmeta>
 +        Examples:
 +        - - '{{ crypto.FNV32a "Hugo Rocks!!" }}'
 +          - "1515779328"
 +      HMAC:
 +        Aliases:
 +        - hmac
 +        Args:
 +        - h
 +        - k
 +        - m
 +        - e
 +        Description: HMAC returns a cryptographic hash that uses a key to sign a message.
 +        Examples:
 +        - - '{{ hmac "sha256" "Secret key" "Hello world, gophers!" }}'
 +          - b6d11b6c53830b9d87036272ca9fe9d19306b8f9d8aa07b15da27d89e6e34f40
 +      MD5:
 +        Aliases:
 +        - md5
 +        Args:
 +        - v
 +        Description: MD5 hashes the v and returns its MD5 checksum.
 +        Examples:
 +        - - '{{ md5 "Hello world, gophers!" }}'
 +          - b3029f756f98f79e7f1b7f1d1f0dd53b
 +        - - '{{ crypto.MD5 "Hello world, gophers!" }}'
 +          - b3029f756f98f79e7f1b7f1d1f0dd53b
 +      SHA1:
 +        Aliases:
 +        - sha1
 +        Args:
 +        - v
 +        Description: SHA1 hashes v and returns its SHA1 checksum.
 +        Examples:
 +        - - '{{ sha1 "Hello world, gophers!" }}'
 +          - c8b5b0e33d408246e30f53e32b8f7627a7a649d4
 +      SHA256:
 +        Aliases:
 +        - sha256
 +        Args:
 +        - v
 +        Description: SHA256 hashes v and returns its SHA256 checksum.
 +        Examples:
 +        - - '{{ sha256 "Hello world, gophers!" }}'
 +          - 6ec43b78da9669f50e4e422575c54bf87536954ccd58280219c393f2ce352b46
 +    css:
 +      Quoted:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Unquoted:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +    data:
 +      GetCSV:
 +        Aliases:
 +        - getCSV
 +        Args:
 +        - sep
 +        - args
 +        Description: |-
 +          GetCSV expects the separator sep and one or n-parts of a URL to a resource which
 +          can either be a local or a remote one.
 +          The data separator can be a comma, semi-colon, pipe, etc, but only one character.
 +          If you provide multiple parts for the URL they will be joined together to the final URL.
 +          GetCSV returns nil or a slice slice to use in a short code.
 +        Examples: []
 +      GetJSON:
 +        Aliases:
 +        - getJSON
 +        Args:
 +        - args
 +        Description: |-
 +          GetJSON expects one or n-parts of a URL in args to a resource which can either be a local or a remote one.
 +          If you provide multiple parts they will be joined together to the final URL.
 +          GetJSON returns nil or parsed JSON to use in a short code.
 +        Examples: []
 +    debug:
 +      Dump:
 +        Aliases: null
 +        Args:
 +        - val
 +        Description: |-
 +          Dump returns a object dump of val as a string.
 +          Note that not every value passed to Dump will print so nicely, but
 +          we'll improve on that.
 +
 +          We recommend using the "go" Chroma lexer to format the output
 +          nicely.
 +
 +          Also note that the output from Dump may change from Hugo version to the next,
 +          so don't depend on a specific output.
 +        Examples:
 +        - - |-
 +            {{ $m := newScratch }}
 +            {{ $m.Set "Hugo" "Rocks!" }}
 +            {{ $m.Values | debug.Dump | safeHTML }}
 +          - |-
 +            map[string]interface {}{
 +              "Hugo": "Rocks!",
 +            }
-       XMLEscape:
-         Aliases: null
-         Args:
-         - s
-         Description: |-
-           XMLEscape returns the given string, removing disallowed characters then
-           escaping the result to its XML equivalent.
-         Examples:
-         - - '{{ transform.XMLEscape "<p>abc</p>" }}'
-           - '&lt;p&gt;abc&lt;/p&gt;'
 +      Timer:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      VisualizeSpaces:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +    diagrams:
 +      Goat:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +    encoding:
 +      Base64Decode:
 +        Aliases:
 +        - base64Decode
 +        Args:
 +        - content
 +        Description: Base64Decode returns the base64 decoding of the given content.
 +        Examples:
 +        - - '{{ "SGVsbG8gd29ybGQ=" | base64Decode }}'
 +          - Hello world
 +        - - '{{ 42 | base64Encode | base64Decode }}'
 +          - "42"
 +      Base64Encode:
 +        Aliases:
 +        - base64Encode
 +        Args:
 +        - content
 +        Description: Base64Encode returns the base64 encoding of the given content.
 +        Examples:
 +        - - '{{ "Hello world" | base64Encode }}'
 +          - SGVsbG8gd29ybGQ=
 +      Jsonify:
 +        Aliases:
 +        - jsonify
 +        Args:
 +        - args
 +        Description: |-
 +          Jsonify encodes a given object to JSON.  To pretty print the JSON, pass a map
 +          or dictionary of options as the first value in args.  Supported options are
 +          "prefix" and "indent".  Each JSON element in the output will begin on a new
 +          line beginning with prefix followed by one or more copies of indent according
 +          to the indentation nesting.
 +        Examples:
 +        - - '{{ (slice "A" "B" "C") | jsonify }}'
 +          - '["A","B","C"]'
 +        - - '{{ (slice "A" "B" "C") | jsonify (dict "indent" "  ") }}'
 +          - |-
 +            [
 +              "A",
 +              "B",
 +              "C"
 +            ]
 +    fmt:
 +      Errorf:
 +        Aliases:
 +        - errorf
 +        Args:
 +        - format
 +        - args
 +        Description: |-
 +          Errorf formats args according to a format specifier and logs an ERROR.
 +          It returns an empty string.
 +        Examples:
 +        - - '{{ errorf "%s." "failed" }}'
 +          - ""
 +      Erroridf:
 +        Aliases:
 +        - erroridf
 +        Args:
 +        - id
 +        - format
 +        - args
 +        Description: |-
 +          Erroridf formats args according to a format specifier and logs an ERROR and
 +          an information text that the error with the given id can be suppressed in config.
 +          It returns an empty string.
 +        Examples:
 +        - - '{{ erroridf "my-err-id" "%s." "failed" }}'
 +          - ""
 +      Errormf:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Print:
 +        Aliases:
 +        - print
 +        Args:
 +        - args
 +        Description: Print returns a string representation of args.
 +        Examples:
 +        - - '{{ print "works!" }}'
 +          - works!
 +      Printf:
 +        Aliases:
 +        - printf
 +        Args:
 +        - format
 +        - args
 +        Description: Printf returns string representation of args formatted with the
 +          layouut in format.
 +        Examples:
 +        - - '{{ printf "%s!" "works" }}'
 +          - works!
 +      Println:
 +        Aliases:
 +        - println
 +        Args:
 +        - args
 +        Description: Println returns string representation of args  ending with a
 +          newline.
 +        Examples:
 +        - - '{{ println "works!" }}'
 +          - |
 +            works!
 +      Warnf:
 +        Aliases:
 +        - warnf
 +        Args:
 +        - format
 +        - args
 +        Description: |-
 +          Warnf formats args according to a format specifier and logs a WARNING.
 +          It returns an empty string.
 +        Examples:
 +        - - '{{ warnf "%s." "warning" }}'
 +          - ""
 +      Warnmf:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +    hugo:
 +      Deps:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Generator:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      IsDevelopment:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      IsExtended:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      IsProduction:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      IsServer:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Version:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      WorkingDir:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +    images:
 +      Brightness:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      ColorBalance:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Colorize:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Config:
 +        Aliases:
 +        - imageConfig
 +        Args:
 +        - path
 +        Description: |-
 +          Config returns the image.Config for the specified path relative to the
 +          working directory.
 +        Examples: []
 +      Contrast:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Filter:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Gamma:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      GaussianBlur:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Grayscale:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Hue:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Invert:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Opacity:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Overlay:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Padding:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Pixelate:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Process:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Saturation:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Sepia:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Sigmoid:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Text:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      UnsharpMask:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +    inflect:
 +      Humanize:
 +        Aliases:
 +        - humanize
 +        Args:
 +        - v
 +        Description: |-
 +          Humanize returns the humanized form of v.
 +
 +          If v is either an integer or a string containing an integer
 +          value, the behavior is to add the appropriate ordinal.
 +        Examples:
 +        - - '{{ humanize "my-first-post" }}'
 +          - My first post
 +        - - '{{ humanize "myCamelPost" }}'
 +          - My camel post
 +        - - '{{ humanize "52" }}'
 +          - 52nd
 +        - - '{{ humanize 103 }}'
 +          - 103rd
 +      Pluralize:
 +        Aliases:
 +        - pluralize
 +        Args:
 +        - v
 +        Description: Pluralize returns the plural form of the single word in v.
 +        Examples:
 +        - - '{{ "cat" | pluralize }}'
 +          - cats
 +      Singularize:
 +        Aliases:
 +        - singularize
 +        Args:
 +        - v
 +        Description: Singularize returns the singular form of a single word in v.
 +        Examples:
 +        - - '{{ "cats" | singularize }}'
 +          - cat
 +    js:
 +      Build:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +    lang:
 +      FormatAccounting:
 +        Aliases: null
 +        Args:
 +        - precision
 +        - currency
 +        - number
 +        Description: |-
 +          FormatAccounting returns the currency representation of number for the given currency and precision
 +          for the current language in accounting notation.
 +
 +          The return value is formatted with at least two decimal places.
 +        Examples:
 +        - - '{{ 512.5032 | lang.FormatAccounting 2 "NOK" }}'
 +          - NOK512.50
 +      FormatCurrency:
 +        Aliases: null
 +        Args:
 +        - precision
 +        - currency
 +        - number
 +        Description: |-
 +          FormatCurrency returns the currency representation of number for the given currency and precision
 +          for the current language.
 +
 +          The return value is formatted with at least two decimal places.
 +        Examples:
 +        - - '{{ 512.5032 | lang.FormatCurrency 2 "USD" }}'
 +          - $512.50
 +      FormatNumber:
 +        Aliases: null
 +        Args:
 +        - precision
 +        - number
 +        Description: FormatNumber formats number with the given precision for the
 +          current language.
 +        Examples:
 +        - - '{{ 512.5032 | lang.FormatNumber 2 }}'
 +          - "512.50"
 +      FormatNumberCustom:
 +        Aliases: null
 +        Args:
 +        - precision
 +        - number
 +        - options
 +        Description: |-
 +          FormatNumberCustom formats a number with the given precision. The first
 +          options parameter is a space-delimited string of characters to represent
 +          negativity, the decimal point, and grouping. The default value is `- . ,`.
 +          The second options parameter defines an alternate delimiting character.
 +
 +          Note that numbers are rounded up at 5 or greater.
 +          So, with precision set to 0, 1.5 becomes `2`, and 1.4 becomes `1`.
 +
 +          For a simpler function that adapts to the current language, see FormatNumber.
 +        Examples:
 +        - - '{{ lang.FormatNumberCustom 2 12345.6789 }}'
 +          - 12,345.68
 +        - - '{{ lang.FormatNumberCustom 2 12345.6789 "- , ." }}'
 +          - 12.345,68
 +        - - '{{ lang.FormatNumberCustom 6 -12345.6789 "- ." }}'
 +          - "-12345.678900"
 +        - - '{{ lang.FormatNumberCustom 0 -12345.6789 "- . ," }}'
 +          - -12,346
 +        - - '{{ lang.FormatNumberCustom 0 -12345.6789 "-|.| " "|" }}'
 +          - -12 346
 +        - - '{{ -98765.4321 | lang.FormatNumberCustom 2 }}'
 +          - -98,765.43
 +      FormatPercent:
 +        Aliases: null
 +        Args:
 +        - precision
 +        - number
 +        Description: |-
 +          FormatPercent formats number with the given precision for the current language.
 +          Note that the number is assumed to be a percentage.
 +        Examples:
 +        - - '{{ 512.5032 | lang.FormatPercent 2 }}'
 +          - 512.50%
 +      Merge:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      NumFmt:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Translate:
 +        Aliases:
 +        - i18n
 +        - T
 +        Args:
 +        - ctx
 +        - id
 +        - args
 +        Description: Translate returns a translated string for id.
 +        Examples: []
 +    math:
 +      Abs:
 +        Aliases: null
 +        Args:
 +        - "n"
 +        Description: Abs returns the absolute value of n.
 +        Examples:
 +        - - '{{ math.Abs -2.1 }}'
 +          - "2.1"
 +      Add:
 +        Aliases:
 +        - add
 +        Args:
 +        - inputs
 +        Description: Add adds the multivalued addends n1 and n2 or more values.
 +        Examples:
 +        - - '{{ add 1 2 }}'
 +          - "3"
 +      Ceil:
 +        Aliases: null
 +        Args:
 +        - "n"
 +        Description: Ceil returns the least integer value greater than or equal to
 +          n.
 +        Examples:
 +        - - '{{ math.Ceil 2.1 }}'
 +          - "3"
 +      Counter:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Div:
 +        Aliases:
 +        - div
 +        Args:
 +        - inputs
 +        Description: Div divides n1 by n2.
 +        Examples:
 +        - - '{{ div 6 3 }}'
 +          - "2"
 +      Floor:
 +        Aliases: null
 +        Args:
 +        - "n"
 +        Description: Floor returns the greatest integer value less than or equal to
 +          n.
 +        Examples:
 +        - - '{{ math.Floor 1.9 }}'
 +          - "1"
 +      Log:
 +        Aliases: null
 +        Args:
 +        - "n"
 +        Description: Log returns the natural logarithm of the number n.
 +        Examples:
 +        - - '{{ math.Log 1 }}'
 +          - "0"
 +      Max:
 +        Aliases: null
 +        Args:
 +        - inputs
 +        Description: Max returns the greater of all numbers in inputs. Any slices
 +          in inputs are flattened.
 +        Examples:
 +        - - '{{ math.Max 1 2 }}'
 +          - "2"
 +      Min:
 +        Aliases: null
 +        Args:
 +        - inputs
 +        Description: Min returns the smaller of all numbers in inputs. Any slices
 +          in inputs are flattened.
 +        Examples:
 +        - - '{{ math.Min 1 2 }}'
 +          - "1"
 +      Mod:
 +        Aliases:
 +        - mod
 +        Args:
 +        - n1
 +        - n2
 +        Description: Mod returns n1 % n2.
 +        Examples:
 +        - - '{{ mod 15 3 }}'
 +          - "0"
 +      ModBool:
 +        Aliases:
 +        - modBool
 +        Args:
 +        - n1
 +        - n2
 +        Description: ModBool returns the boolean of n1 % n2.  If n1 % n2 == 0, return
 +          true.
 +        Examples:
 +        - - '{{ modBool 15 3 }}'
 +          - "true"
 +      Mul:
 +        Aliases:
 +        - mul
 +        Args:
 +        - inputs
 +        Description: Mul multiplies the multivalued numbers n1 and n2 or more values.
 +        Examples:
 +        - - '{{ mul 2 3 }}'
 +          - "6"
 +      Pow:
 +        Aliases:
 +        - pow
 +        Args:
 +        - n1
 +        - n2
 +        Description: Pow returns n1 raised to the power of n2.
 +        Examples:
 +        - - '{{ math.Pow 2 3 }}'
 +          - "8"
 +      Product:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Round:
 +        Aliases: null
 +        Args:
 +        - "n"
 +        Description: Round returns the integer nearest to n, rounding half away from
 +          zero.
 +        Examples:
 +        - - '{{ math.Round 1.5 }}'
 +          - "2"
 +      Sqrt:
 +        Aliases: null
 +        Args:
 +        - "n"
 +        Description: Sqrt returns the square root of the number n.
 +        Examples:
 +        - - '{{ math.Sqrt 81 }}'
 +          - "9"
 +      Sub:
 +        Aliases:
 +        - sub
 +        Args:
 +        - inputs
 +        Description: Sub subtracts multivalued.
 +        Examples:
 +        - - '{{ sub 3 2 }}'
 +          - "1"
 +      Sum:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +    openapi3:
 +      Unmarshal:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: []
 +    os:
 +      FileExists:
 +        Aliases:
 +        - fileExists
 +        Args:
 +        - i
 +        Description: FileExists checks whether a file exists under the given path.
 +        Examples:
 +        - - '{{ fileExists "foo.txt" }}'
 +          - "false"
 +      Getenv:
 +        Aliases:
 +        - getenv
 +        Args:
 +        - key
 +        Description: |-
 +          Getenv retrieves the value of the environment variable named by the key.
 +          It returns the value, which will be empty if the variable is not present.
 +        Examples: []
 +      ReadDir:
 +        Aliases:
 +        - readDir
 +        Args:
 +        - i
 +        Description: ReadDir lists the directory contents relative to the configured
 +          WorkingDir.
 +        Examples:
 +        - - '{{ range (readDir "files") }}{{ .Name }}{{ end }}'
 +          - README.txt
 +      ReadFile:
 +        Aliases:
 +        - readFile
 +        Args:
 +        - i
 +        Description: |-
 +          ReadFile reads the file named by filename relative to the configured WorkingDir.
 +          It returns the contents as a string.
 +          There is an upper size limit set at 1 megabytes.
 +        Examples:
 +        - - '{{ readFile "files/README.txt" }}'
 +          - Hugo Rocks!
 +      Stat:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +    partials:
 +      Include:
 +        Aliases:
 +        - partial
 +        Args:
 +        - ctx
 +        - name
 +        - contextList
 +        Description: |-
 +          Include executes the named partial.
 +          If the partial contains a return statement, that value will be returned.
 +          Else, the rendered output will be returned:
 +          A string if the partial is a text/template, or template.HTML when html/template.
 +          Note that ctx is provided by Hugo, not the end user.
 +        Examples:
 +        - - '{{ partial "header.html" . }}'
 +          - <title>Hugo Rocks!</title>
 +      IncludeCached:
 +        Aliases:
 +        - partialCached
 +        Args:
 +        - ctx
 +        - name
 +        - context
 +        - variants
 +        Description: |-
 +          IncludeCached executes and caches partial templates.  The cache is created with name+variants as the key.
 +          Note that ctx is provided by Hugo, not the end user.
 +        Examples: []
 +    path:
 +      Base:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      BaseName:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Clean:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Dir:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Ext:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Join:
 +        Aliases: null
 +        Args:
 +        - elements
 +        Description: |-
 +          Join joins any number of path elements into a single path, adding a
 +          separating slash if necessary. All the input
 +          path elements are passed into filepath.ToSlash converting any Windows slashes
 +          to forward slashes.
 +          The result is Cleaned; in particular,
 +          all empty strings are ignored.
 +        Examples:
 +        - - '{{ slice "my/path" "filename.txt" | path.Join }}'
 +          - my/path/filename.txt
 +        - - '{{ path.Join "my" "path" "filename.txt" }}'
 +          - my/path/filename.txt
 +        - - '{{ "my/path/filename.txt" | path.Ext }}'
 +          - .txt
 +        - - '{{ "my/path/filename.txt" | path.Base }}'
 +          - filename.txt
 +        - - '{{ "my/path/filename.txt" | path.Dir }}'
 +          - my/path
 +      Split:
 +        Aliases: null
 +        Args:
 +        - path
 +        Description: |-
 +          Split splits path immediately following the final slash,
 +          separating it into a directory and file name component.
 +          If there is no slash in path, Split returns an empty dir and
 +          file set to path.
 +          The input path is passed into filepath.ToSlash converting any Windows slashes
 +          to forward slashes.
 +          The returned values have the property that path = dir+file.
 +        Examples:
 +        - - '{{ "/my/path/filename.txt" | path.Split }}'
 +          - /my/path/|filename.txt
 +        - - '{{ "/my/path/filename.txt" | path.Split }}'
 +          - /my/path/|filename.txt
 +    reflect:
 +      IsMap:
 +        Aliases: null
 +        Args:
 +        - v
 +        Description: IsMap reports whether v is a map.
 +        Examples:
 +        - - '{{ if reflect.IsMap (dict "a" 1) }}Map{{ end }}'
 +          - Map
 +      IsSlice:
 +        Aliases: null
 +        Args:
 +        - v
 +        Description: IsSlice reports whether v is a slice.
 +        Examples:
 +        - - '{{ if reflect.IsSlice (slice 1 2 3) }}Slice{{ end }}'
 +          - Slice
 +    resources:
 +      Babel:
 +        Aliases:
 +        - babel
 +        Args:
 +        - args
 +        Description: Babel processes the given Resource with Babel.
 +        Examples: []
 +      ByType:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Concat:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Copy:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      ExecuteAsTemplate:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Fingerprint:
 +        Aliases:
 +        - fingerprint
 +        Args:
 +        - args
 +        Description: |-
 +          Fingerprint transforms the given Resource with a MD5 hash of the content in
 +          the RelPermalink and Permalink.
 +        Examples: []
 +      FromString:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Get:
 +        Aliases: null
 +        Args:
 +        - filename
 +        Description: |-
 +          Get locates the filename given in Hugo's assets filesystem
 +          and creates a Resource object that can be used for further transformations.
 +        Examples: []
 +      GetMatch:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      GetRemote:
 +        Aliases: null
 +        Args:
 +        - args
 +        Description: |-
 +          GetRemote gets the URL (via HTTP(s)) in the first argument in args and creates Resource object that can be used for
 +          further transformations.
 +
 +          A second argument may be provided with an option map.
 +
 +          Note: This method does not return any error as a second return value,
 +          for any error situations the error can be checked in .Err.
 +        Examples: []
 +      Match:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Minify:
 +        Aliases:
 +        - minify
 +        Args:
 +        - r
 +        Description: |-
 +          Minify minifies the given Resource using the MediaType to pick the correct
 +          minifier.
 +        Examples: []
 +      PostCSS:
 +        Aliases:
 +        - postCSS
 +        Args:
 +        - args
 +        Description: PostCSS processes the given Resource with PostCSS
 +        Examples: []
 +      PostProcess:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      ToCSS:
 +        Aliases:
 +        - toCSS
 +        Args:
 +        - args
 +        Description: |-
 +          ToCSS converts the given Resource to CSS. You can optional provide an Options object
 +          as second argument. As an option, you can e.g. specify e.g. the target path (string)
 +          for the converted CSS resource.
 +        Examples: []
 +    safe:
 +      CSS:
 +        Aliases:
 +        - safeCSS
 +        Args:
 +        - s
 +        Description: CSS returns the string s as html/template CSS content.
 +        Examples:
 +        - - '{{ "Bat&Man" | safeCSS | safeCSS }}'
 +          - Bat&amp;Man
 +      HTML:
 +        Aliases:
 +        - safeHTML
 +        Args:
 +        - s
 +        Description: HTML returns the string s as html/template HTML content.
 +        Examples:
 +        - - '{{ "Bat&Man" | safeHTML | safeHTML }}'
 +          - Bat&Man
 +        - - '{{ "Bat&Man" | safeHTML }}'
 +          - Bat&Man
 +      HTMLAttr:
 +        Aliases:
 +        - safeHTMLAttr
 +        Args:
 +        - s
 +        Description: HTMLAttr returns the string s as html/template HTMLAttr content.
 +        Examples: []
 +      JS:
 +        Aliases:
 +        - safeJS
 +        Args:
 +        - s
 +        Description: JS returns the given string as a html/template JS content.
 +        Examples:
 +        - - '{{ "(1*2)" | safeJS | safeJS }}'
 +          - (1*2)
 +      JSStr:
 +        Aliases:
 +        - safeJSStr
 +        Args:
 +        - s
 +        Description: JSStr returns the given string as a html/template JSStr content.
 +        Examples: []
 +      SanitizeURL:
 +        Aliases:
 +        - sanitizeURL
 +        - sanitizeurl
 +        Args:
 +        - s
 +        Description: SanitizeURL returns the string s as html/template URL content.
 +        Examples: []
 +      URL:
 +        Aliases:
 +        - safeURL
 +        Args:
 +        - s
 +        Description: URL returns the string s as html/template URL content.
 +        Examples:
 +        - - '{{ "http://gohugo.io" | safeURL | safeURL }}'
 +          - http://gohugo.io
 +    site:
 +      AllPages:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Author:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Authors:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      BaseURL:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      BuildDrafts:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Config:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Copyright:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Current:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Data:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      DisqusShortname:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      GetIdentity:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      GetPage:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      GetPageWithTemplateInfo:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      GoogleAnalytics:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Home:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Hugo:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      IsMultiLingual:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      IsServer:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Language:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      LanguageCode:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      LanguagePrefix:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Languages:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      LastChange:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      MainSections:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Menus:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Pages:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Param:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Params:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      RSSLink:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      RegularPages:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Sections:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      ServerPort:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Sites:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Social:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Taxonomies:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Title:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +    strings:
 +      Chomp:
 +        Aliases:
 +        - chomp
 +        Args:
 +        - s
 +        Description: Chomp returns a copy of s with all trailing newline characters
 +          removed.
 +        Examples:
 +        - - '{{ chomp "<p>Blockhead</p>\n" | safeHTML }}'
 +          - <p>Blockhead</p>
 +      Contains:
 +        Aliases: null
 +        Args:
 +        - s
 +        - substr
 +        Description: Contains reports whether substr is in s.
 +        Examples:
 +        - - '{{ strings.Contains "abc" "b" }}'
 +          - "true"
 +        - - '{{ strings.Contains "abc" "d" }}'
 +          - "false"
 +      ContainsAny:
 +        Aliases: null
 +        Args:
 +        - s
 +        - chars
 +        Description: ContainsAny reports whether any Unicode code points in chars
 +          are within s.
 +        Examples:
 +        - - '{{ strings.ContainsAny "abc" "bcd" }}'
 +          - "true"
 +        - - '{{ strings.ContainsAny "abc" "def" }}'
 +          - "false"
 +      ContainsNonSpace:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Count:
 +        Aliases: null
 +        Args:
 +        - substr
 +        - s
 +        Description: |-
 +          Count counts the number of non-overlapping instances of substr in s.
 +          If substr is an empty string, Count returns 1 + the number of Unicode code points in s.
 +        Examples:
 +        - - '{{ "aabab" | strings.Count "a" }}'
 +          - "3"
 +      CountRunes:
 +        Aliases:
 +        - countrunes
 +        Args:
 +        - s
 +        Description: CountRunes returns the number of runes in s, excluding whitespace.
 +        Examples: []
 +      CountWords:
 +        Aliases:
 +        - countwords
 +        Args:
 +        - s
 +        Description: CountWords returns the approximate word count in s.
 +        Examples: []
 +      FindRE:
 +        Aliases:
 +        - findRE
 +        Args:
 +        - expr
 +        - content
 +        - limit
 +        Description: |-
 +          FindRE returns a list of strings that match the regular expression. By default all matches
 +          will be included. The number of matches can be limited with an optional third parameter.
 +        Examples:
 +        - - '{{ findRE "[G|g]o" "Hugo is a static side generator written in Go." 1
 +            }}'
 +          - '[go]'
 +      FindRESubmatch:
 +        Aliases:
 +        - findRESubmatch
 +        Args:
 +        - expr
 +        - content
 +        - limit
 +        Description: |-
 +          FindRESubmatch returns a slice of all successive matches of the regular
 +          expression in content. Each element is a slice of strings holding the text
 +          of the leftmost match of the regular expression and the matches, if any, of
 +          its subexpressions.
 +
 +          By default all matches will be included. The number of matches can be
 +          limited with the optional limit parameter. A return value of nil indicates
 +          no match.
 +        Examples:
 +        - - '{{ findRESubmatch `<a\s*href="(.+?)">(.+?)</a>` `<li><a href="#foo">Foo</a></li>
 +            <li><a href="#bar">Bar</a></li>` | print | safeHTML }}'
 +          - '[[<a href="#foo">Foo</a> #foo Foo] [<a href="#bar">Bar</a> #bar Bar]]'
 +      FirstUpper:
 +        Aliases: null
 +        Args:
 +        - s
 +        Description: FirstUpper converts s making  the first character upper case.
 +        Examples:
 +        - - '{{ "hugo rocks!" | strings.FirstUpper }}'
 +          - Hugo rocks!
 +      HasPrefix:
 +        Aliases:
 +        - hasPrefix
 +        Args:
 +        - s
 +        - prefix
 +        Description: HasPrefix tests whether the input s begins with prefix.
 +        Examples:
 +        - - '{{ hasPrefix "Hugo" "Hu" }}'
 +          - "true"
 +        - - '{{ hasPrefix "Hugo" "Fu" }}'
 +          - "false"
 +      HasSuffix:
 +        Aliases:
 +        - hasSuffix
 +        Args:
 +        - s
 +        - suffix
 +        Description: HasSuffix tests whether the input s begins with suffix.
 +        Examples:
 +        - - '{{ hasSuffix "Hugo" "go" }}'
 +          - "true"
 +        - - '{{ hasSuffix "Hugo" "du" }}'
 +          - "false"
 +      Repeat:
 +        Aliases: null
 +        Args:
 +        - "n"
 +        - s
 +        Description: Repeat returns a new string consisting of n copies of the string
 +          s.
 +        Examples:
 +        - - '{{ "yo" | strings.Repeat 4 }}'
 +          - yoyoyoyo
 +      Replace:
 +        Aliases:
 +        - replace
 +        Args:
 +        - s
 +        - old
 +        - new
 +        - limit
 +        Description: |-
 +          Replace returns a copy of the string s with all occurrences of old replaced
 +          with new.  The number of replacements can be limited with an optional fourth
 +          parameter.
 +        Examples:
 +        - - '{{ replace "Batman and Robin" "Robin" "Catwoman" }}'
 +          - Batman and Catwoman
 +        - - '{{ replace "aabbaabb" "a" "z" 2 }}'
 +          - zzbbaabb
 +      ReplaceRE:
 +        Aliases:
 +        - replaceRE
 +        Args:
 +        - pattern
 +        - repl
 +        - s
 +        - "n"
 +        Description: |-
 +          ReplaceRE returns a copy of s, replacing all matches of the regular
 +          expression pattern with the replacement text repl. The number of replacements
 +          can be limited with an optional fourth parameter.
 +        Examples:
 +        - - '{{ replaceRE "a+b" "X" "aabbaabbab" }}'
 +          - XbXbX
 +        - - '{{ replaceRE "a+b" "X" "aabbaabbab" 1 }}'
 +          - Xbaabbab
 +      RuneCount:
 +        Aliases: null
 +        Args:
 +        - s
 +        Description: RuneCount returns the number of runes in s.
 +        Examples: []
 +      SliceString:
 +        Aliases:
 +        - slicestr
 +        Args:
 +        - a
 +        - startEnd
 +        Description: |-
 +          SliceString slices a string by specifying a half-open range with
 +          two indices, start and end. 1 and 4 creates a slice including elements 1 through 3.
 +          The end index can be omitted, it defaults to the string's length.
 +        Examples:
 +        - - '{{ slicestr "BatMan" 0 3 }}'
 +          - Bat
 +        - - '{{ slicestr "BatMan" 3 }}'
 +          - Man
 +      Split:
 +        Aliases:
 +        - split
 +        Args:
 +        - a
 +        - delimiter
 +        Description: Split slices an input string into all substrings separated by
 +          delimiter.
 +        Examples: []
 +      Substr:
 +        Aliases:
 +        - substr
 +        Args:
 +        - a
 +        - nums
 +        Description: |-
 +          Substr extracts parts of a string, beginning at the character at the specified
 +          position, and returns the specified number of characters.
 +
 +          It normally takes two parameters: start and length.
 +          It can also take one parameter: start, i.e. length is omitted, in which case
 +          the substring starting from start until the end of the string will be returned.
 +
 +          To extract characters from the end of the string, use a negative start number.
 +
 +          In addition, borrowing from the extended behavior described at http://php.net/substr,
 +          if length is given and is negative, then that many characters will be omitted from
 +          the end of string.
 +        Examples:
 +        - - '{{ substr "BatMan" 0 -3 }}'
 +          - Bat
 +        - - '{{ substr "BatMan" 3 3 }}'
 +          - Man
 +      Title:
 +        Aliases:
 +        - title
 +        Args:
 +        - s
 +        Description: |-
 +          Title returns a copy of the input s with all Unicode letters that begin words
 +          mapped to their title case.
 +        Examples:
 +        - - '{{ title "Bat man" }}'
 +          - Bat Man
 +        - - '{{ title "somewhere over the rainbow" }}'
 +          - Somewhere Over the Rainbow
 +      ToLower:
 +        Aliases:
 +        - lower
 +        Args:
 +        - s
 +        Description: |-
 +          ToLower returns a copy of the input s with all Unicode letters mapped to their
 +          lower case.
 +        Examples:
 +        - - '{{ lower "BatMan" }}'
 +          - batman
 +      ToUpper:
 +        Aliases:
 +        - upper
 +        Args:
 +        - s
 +        Description: |-
 +          ToUpper returns a copy of the input s with all Unicode letters mapped to their
 +          upper case.
 +        Examples:
 +        - - '{{ upper "BatMan" }}'
 +          - BATMAN
 +      Trim:
 +        Aliases:
 +        - trim
 +        Args:
 +        - s
 +        - cutset
 +        Description: |-
 +          Trim returns converts the strings s removing all leading and trailing characters defined
 +          contained.
 +        Examples:
 +        - - '{{ trim "++Batman--" "+-" }}'
 +          - Batman
 +      TrimLeft:
 +        Aliases: null
 +        Args:
 +        - cutset
 +        - s
 +        Description: |-
 +          TrimLeft returns a slice of the string s with all leading characters
 +          contained in cutset removed.
 +        Examples:
 +        - - '{{ "aabbaa" | strings.TrimLeft "a" }}'
 +          - bbaa
 +      TrimPrefix:
 +        Aliases: null
 +        Args:
 +        - prefix
 +        - s
 +        Description: |-
 +          TrimPrefix returns s without the provided leading prefix string. If s doesn't
 +          start with prefix, s is returned unchanged.
 +        Examples:
 +        - - '{{ "aabbaa" | strings.TrimPrefix "a" }}'
 +          - abbaa
 +        - - '{{ "aabbaa" | strings.TrimPrefix "aa" }}'
 +          - bbaa
 +      TrimRight:
 +        Aliases: null
 +        Args:
 +        - cutset
 +        - s
 +        Description: |-
 +          TrimRight returns a slice of the string s with all trailing characters
 +          contained in cutset removed.
 +        Examples:
 +        - - '{{ "aabbaa" | strings.TrimRight "a" }}'
 +          - aabb
 +      TrimSuffix:
 +        Aliases: null
 +        Args:
 +        - suffix
 +        - s
 +        Description: |-
 +          TrimSuffix returns s without the provided trailing suffix string. If s
 +          doesn't end with suffix, s is returned unchanged.
 +        Examples:
 +        - - '{{ "aabbaa" | strings.TrimSuffix "a" }}'
 +          - aabba
 +        - - '{{ "aabbaa" | strings.TrimSuffix "aa" }}'
 +          - aabb
 +      Truncate:
 +        Aliases:
 +        - truncate
 +        Args:
 +        - s
 +        - options
 +        Description: Truncate truncates the string in s to the specified length.
 +        Examples:
 +        - - '{{ "this is a very long text" | truncate 10 " ..." }}'
 +          - this is a ...
 +        - - '{{ "With [Markdown](/markdown) inside." | markdownify | truncate 14 }}'
 +          - With <a href="/markdown">Markdown …</a>
 +    templates:
 +      Exists:
 +        Aliases: null
 +        Args:
 +        - name
 +        Description: |-
 +          Exists returns whether the template with the given name exists.
 +          Note that this is the Unix-styled relative path including filename suffix,
 +          e.g. partials/header.html
 +        Examples:
 +        - - '{{ if (templates.Exists "partials/header.html") }}Yes!{{ end }}'
 +          - Yes!
 +        - - '{{ if not (templates.Exists "partials/doesnotexist.html") }}No!{{ end
 +            }}'
 +          - No!
 +    time:
 +      AsTime:
 +        Aliases: null
 +        Args:
 +        - v
 +        - args
 +        Description: |-
 +          AsTime converts the textual representation of the datetime string into
 +          a time.Time interface.
 +        Examples:
 +        - - '{{ (time "2015-01-21").Year }}'
 +          - "2015"
 +      Duration:
 +        Aliases:
 +        - duration
 +        Args:
 +        - unit
 +        - number
 +        Description: |-
 +          Duration converts the given number to a time.Duration.
 +          Unit is one of nanosecond/ns, microsecond/us/µs, millisecond/ms, second/s, minute/m or hour/h.
 +        Examples:
 +        - - '{{ mul 60 60 | duration "second" }}'
 +          - 1h0m0s
 +      Format:
 +        Aliases:
 +        - dateFormat
 +        Args:
 +        - layout
 +        - v
 +        Description: |-
 +          Format converts the textual representation of the datetime string in v into
 +          time.Time if needed and formats it with the given layout.
 +        Examples:
 +        - - 'dateFormat: {{ dateFormat "Monday, Jan 2, 2006" "2015-01-21" }}'
 +          - 'dateFormat: Wednesday, Jan 21, 2015'
 +      Now:
 +        Aliases:
 +        - now
 +        Args: null
 +        Description: Now returns the current local time or `clock` time
 +        Examples: []
 +      ParseDuration:
 +        Aliases: null
 +        Args:
 +        - s
 +        Description: |-
 +          ParseDuration parses the duration string s.
 +          A duration string is a possibly signed sequence of
 +          decimal numbers, each with optional fraction and a unit suffix,
 +          such as "300ms", "-1.5h" or "2h45m".
 +          Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
 +          See https://golang.org/pkg/time/#ParseDuration
 +        Examples:
 +        - - '{{ "1h12m10s" | time.ParseDuration }}'
 +          - 1h12m10s
 +    transform:
 +      CanHighlight:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Emojify:
 +        Aliases:
 +        - emojify
 +        Args:
 +        - s
 +        Description: |-
 +          Emojify returns a copy of s with all emoji codes replaced with actual emojis.
 +
 +          See http://www.emoji-cheat-sheet.com/
 +        Examples:
 +        - - '{{ "I :heart: Hugo" | emojify }}'
 +          - I ❤️ Hugo
 +      HTMLEscape:
 +        Aliases:
 +        - htmlEscape
 +        Args:
 +        - s
 +        Description: HTMLEscape returns a copy of s with reserved HTML characters
 +          escaped.
 +        Examples:
 +        - - '{{ htmlEscape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" |
 +            safeHTML }}'
 +          - Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;
 +        - - '{{ htmlEscape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" }}'
 +          - Cathal Garvey &amp;amp; The Sunshine Band &amp;lt;cathal@foo.bar&amp;gt;
 +        - - '{{ htmlEscape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" |
 +            htmlUnescape | safeHTML }}'
 +          - Cathal Garvey & The Sunshine Band <cathal@foo.bar>
 +      HTMLUnescape:
 +        Aliases:
 +        - htmlUnescape
 +        Args:
 +        - s
 +        Description: |-
 +          HTMLUnescape returns a copy of s with HTML escape requences converted to plain
 +          text.
 +        Examples:
 +        - - '{{ htmlUnescape "Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;"
 +            | safeHTML }}'
 +          - Cathal Garvey & The Sunshine Band <cathal@foo.bar>
 +        - - '{{ "Cathal Garvey &amp;amp; The Sunshine Band &amp;lt;cathal@foo.bar&amp;gt;"
 +            | htmlUnescape | htmlUnescape | safeHTML }}'
 +          - Cathal Garvey & The Sunshine Band <cathal@foo.bar>
 +        - - '{{ "Cathal Garvey &amp;amp; The Sunshine Band &amp;lt;cathal@foo.bar&amp;gt;"
 +            | htmlUnescape | htmlUnescape }}'
 +          - Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;
 +        - - '{{ htmlUnescape "Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;"
 +            | htmlEscape | safeHTML }}'
 +          - Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;
 +      Highlight:
 +        Aliases:
 +        - highlight
 +        Args:
 +        - s
 +        - lang
 +        - opts
 +        Description: |-
 +          Highlight returns a copy of s as an HTML string with syntax
 +          highlighting applied.
 +        Examples: []
 +      HighlightCodeBlock:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Markdownify:
 +        Aliases:
 +        - markdownify
 +        Args:
 +        - ctx
 +        - s
 +        Description: Markdownify renders s from Markdown to HTML.
 +        Examples:
 +        - - '{{ .Title | markdownify }}'
 +          - <strong>BatMan</strong>
 +      Plainify:
 +        Aliases:
 +        - plainify
 +        Args:
 +        - s
 +        Description: Plainify returns a copy of s with all HTML tags removed.
 +        Examples:
 +        - - '{{ plainify  "Hello <strong>world</strong>, gophers!" }}'
 +          - Hello world, gophers!
 +      Remarshal:
 +        Aliases: null
 +        Args:
 +        - format
 +        - data
 +        Description: |-
 +          Remarshal is used in the Hugo documentation to convert configuration
 +          examples from YAML to JSON, TOML (and possibly the other way around).
 +          The is primarily a helper for the Hugo docs site.
 +          It is not a general purpose YAML to TOML converter etc., and may
 +          change without notice if it serves a purpose in the docs.
 +          Format is one of json, yaml or toml.
 +        Examples:
 +        - - '{{ "title = \"Hello World\"" | transform.Remarshal "json" | safeHTML
 +            }}'
 +          - |
 +            {
 +               "title": "Hello World"
 +            }
 +      Unmarshal:
 +        Aliases:
 +        - unmarshal
 +        Args:
 +        - args
 +        Description: |-
 +          Unmarshal unmarshals the data given, which can be either a string, json.RawMessage
 +          or a Resource. Supported formats are JSON, TOML, YAML, and CSV.
 +          You can optionally provide an options map as the first argument.
 +        Examples:
 +        - - '{{ "hello = \"Hello World\"" | transform.Unmarshal }}'
 +          - map[hello:Hello World]
 +        - - '{{ "hello = \"Hello World\"" | resources.FromString "data/greetings.toml"
 +            | transform.Unmarshal }}'
 +          - map[hello:Hello World]
 +    urls:
 +      AbsLangURL:
 +        Aliases:
 +        - absLangURL
 +        Args:
 +        - s
 +        Description: |-
 +          AbsLangURL the string s and converts it to an absolute URL according
 +          to a page's position in the project directory structure and the current
 +          language.
 +        Examples: []
 +      AbsURL:
 +        Aliases:
 +        - absURL
 +        Args:
 +        - s
 +        Description: AbsURL takes the string s and converts it to an absolute URL.
 +        Examples: []
 +      Anchorize:
 +        Aliases:
 +        - anchorize
 +        Args:
 +        - s
 +        Description: |-
 +          Anchorize creates sanitized anchor name version of the string s that is compatible
 +          with how your configured markdown renderer does it.
 +        Examples:
 +        - - '{{ "This is a title" | anchorize }}'
 +          - this-is-a-title
 +      JoinPath:
 +        Aliases: null
 +        Args:
 +        - elements
 +        Description: |-
 +          JoinPath joins the provided elements into a URL string and cleans the result
 +          of any ./ or ../ elements. If the argument list is empty, JoinPath returns
 +          an empty string.
 +        Examples:
 +        - - '{{ urls.JoinPath "https://example.org" "foo" }}'
 +          - https://example.org/foo
 +        - - '{{ urls.JoinPath (slice "a" "b") }}'
 +          - a/b
 +      Parse:
 +        Aliases: null
 +        Args: null
 +        Description: ""
 +        Examples: null
 +      Ref:
 +        Aliases:
 +        - ref
 +        Args:
 +        - p
 +        - args
 +        Description: Ref returns the absolute URL path to a given content item from
 +          Page p.
 +        Examples: []
 +      RelLangURL:
 +        Aliases:
 +        - relLangURL
 +        Args:
 +        - s
 +        Description: |-
 +          RelLangURL takes the string s and prepends the relative path according to a
 +          page's position in the project directory structure and the current language.
 +        Examples: []
 +      RelRef:
 +        Aliases:
 +        - relref
 +        Args:
 +        - p
 +        - args
 +        Description: RelRef returns the relative URL path to a given content item
 +          from Page p.
 +        Examples: []
 +      RelURL:
 +        Aliases:
 +        - relURL
 +        Args:
 +        - s
 +        Description: |-
 +          RelURL takes the string s and prepends the relative path according to a
 +          page's position in the project directory structure.
 +        Examples: []
 +      URLize:
 +        Aliases:
 +        - urlize
 +        Args:
 +        - s
 +        Description: URLize returns the the strings s formatted as an URL.
 +        Examples: []
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2a3a8625d5f830ccfca22cb57ad2c0452526df8d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,93 @@@
++# Do not delete. Required for layouts/shortcodes/list-pages-in-section.html.
++#
++# When calling the list-pages-in-section shortcode, you can specify a page
++# filter, and whether the pages in the filter should be included or excluded
++# from the list.
++#
++# For example:
++#
++# {{< list-pages-in-section path=/functions/images filter=functions_images_no_filters filterType=exclude >}}
++
++functions_fmt_logging:
++  - /functions/fmt/errorf
++  - /functions/fmt/erroridf
++  - /functions/fmt/warnf
++functions_images_no_filters:
++  - /functions/images/filter
++  - /functions/images/config
++methods_site_multilingual:
++  - /methods/site/ismultilingual
++  - /methods/site/language
++  - /methods/site/languageprefix
++  - /methods/site/languages
++methods_site_page_collections:
++  - /methods/site/pages
++  - /methods/site/regularpages
++  - /methods/site/sections
++methods_page_dates:
++  - /methods/page/date
++  - /methods/page/expirydate
++  - /methods/page/lastmod
++  - /methods/page/publishdate
++methods_page_menu:
++  - /methods/page/hasmenucurrent
++  - /methods/page/ismenucurrent
++methods_page_multilingual:
++  - /methods/page/alltranslations
++  - /methods/page/istranslated
++  - /methods/page/language
++  - /methods/page/translationkey
++  - /methods/page/translations
++methods_page_page_collections:
++  - /methods/page/pages
++  - /methods/page/regularpages
++  - /methods/page/regularpagesrecursive
++  - /methods/page/sections
++methods_page_parameters:
++  - /methods/page/param
++  - /methods/page/params
++methods_page_sections:
++  - /methods/page/ancestors
++  - /methods/page/currentsection
++  - /methods/page/firstsection
++  - /methods/page/insection
++  - /methods/page/isancestor
++  - /methods/page/isdescendant
++  - /methods/page/parent
++  - /methods/page/sections
++  - /methods/page/section
++methods_pages_sort:
++  - /methods/pages/bydate
++  - /methods/pages/byexpirydate
++  - /methods/pages/bylanguage
++  - /methods/pages/bylastmod
++  - /methods/pages/bylength
++  - /methods/pages/bylinktitle
++  - /methods/pages/byparam
++  - /methods/pages/bypublishdate
++  - /methods/pages/bytitle
++  - /methods/pages/byweight
++  - /methods/pages/reverse
++methods_pages_group:
++  - /methods/pages/groupby
++  - /methods/pages/groupbydate
++  - /methods/pages/groupbyexpirydate
++  - /methods/pages/groupbylastmod
++  - /methods/pages/groupbyparam
++  - /methods/pages/groupbyparamdate
++  - /methods/pages/groupbypublishdate
++  - /methods/pages/groupbydate
++  - /methods/pages/groupbydate
++  - /methods/pages/groupbydate
++  - /methods/pages/groupbydate
++  - /methods/pages/groupbydate
++  - /methods/pages/groupbydate
++  - /methods/pages/reverse
++methods_pages_navigation:
++  - /methods/pages/next
++  - /methods/pages/prev
++methods_page_navigation:
++  - /methods/page/next
++  - /methods/page/nextinsection
++  - /methods/page/prev
++  - /methods/page/previnsection
diff --cc docs/go.mod
index 8b99de36bf86810546f914a6ba83f6763795a4f7,0000000000000000000000000000000000000000..b53b245e1433fe4dec9ea87738f2c34c17e15daa
mode 100644,000000..100644
--- /dev/null
@@@ -1,5 -1,0 +1,5 @@@
- require github.com/gohugoio/gohugoioTheme v0.0.0-20230927165800-342e2c850f18 // indirect
 +module github.com/gohugoio/hugoDocs
 +
 +go 1.16
 +
++require github.com/gohugoio/gohugoioTheme v0.0.0-20231111235806-77931ac4875e // indirect
diff --cc docs/go.sum
index 9ff8664368bac7dca14b610e60fd90c0dda5a521,0000000000000000000000000000000000000000..d8cea868c90bf852090dfa70c62d897ba4608e58
mode 100644,000000..100644
--- /dev/null
@@@ -1,79 -1,0 +1,2 @@@
- github.com/gohugoio/gohugoioTheme v0.0.0-20190808163145-07b3c0f73b02/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20191014144142-1f3a01deed7b h1:PWNjl46fvtz54PKO0BdiXOF6/4L/uCP0F3gtcCxGrJs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20191014144142-1f3a01deed7b/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d h1:D3DcaYkuJbotdWNNAQpQl37txX4HQ6R5uMHoxVmTw0w=
- github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200123151337-9475fd449324 h1:UZwHDYtGY0uOKIvcm2LWd+xfFxD3X5L222LIJdI5RE4=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200123151337-9475fd449324/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200123204146-589b4c309025 h1:ScYFARz+bHX1rEr1donVknhRdxGY/cwqK1hHvWEfrlc=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200123204146-589b4c309025/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200123205007-5d6620a0db26 h1:acXfduibbWxji9tW0WkLHbjcXFsnd5uIwXe0WfwOazg=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200123205007-5d6620a0db26/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200128164921-1d0bc5482051 h1:cS14MnUGS6xwWYfPNshimm8HdMCZiYBxWkCD0VnvgVw=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200128164921-1d0bc5482051/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200327225449-368f4cbef8d7 h1:cZ+ahAjSetbFv3aDJ9ipDbKyqaVlmkbSZ5cULgBTh+w=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200327225449-368f4cbef8d7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200327231942-7f80b3d02bfa h1:kG+O/wT9UXomzp5eQiUuFVZ0l7YylAW6EVPLyjMxi/c=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200327231942-7f80b3d02bfa/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200328100657-2bfd5f8c6aee h1:PJZhCwnuVLyafDWNPSHk9iJvk6gEIvPRnycy7Pq3peA=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200328100657-2bfd5f8c6aee/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200518164958-62cbad03c40f h1:Ge3JACszSUyJW2Az9cJzWdo4PUqdijJA1RxoQSVMBSI=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200518164958-62cbad03c40f/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200518165806-0095b7b902a7 h1:Sy0hlWyZmFtdSY0Cobvw1ZYm3G1aR5+4DuFNRbMkh48=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200518165806-0095b7b902a7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f h1:BWJyycs4HD7tUbaU8RIGeMay84bIBWRVVLE3yajPas4=
- github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3 h1:ShqzOFeeg54FPSuS6q8HSeTVgj2xNZRe/YS0jNbi21g=
- github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20210409065807-6383d8cbaf65 h1:EJzierSWKqwsrUXU6MaFe0J97c0e5pzl5dBNRRrV2Nc=
- github.com/gohugoio/gohugoioTheme v0.0.0-20210409065807-6383d8cbaf65/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20210409071416-c88da48134b7 h1:uRCgPslaBgLYy4ANXBoPbBQVM8aNiHoxIZTKUXpkuUA=
- github.com/gohugoio/gohugoioTheme v0.0.0-20210409071416-c88da48134b7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20211211125852-b85e21c1f3d6 h1:lAgdWrn8VEg0PrNCPX4DflCg2msDKpSYV6E8RTNV3N0=
- github.com/gohugoio/gohugoioTheme v0.0.0-20211211125852-b85e21c1f3d6/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20220228085601-7cfbda06d135 h1:6hVzfE9YhSsZP5t6jWjvVp7MoPm7Y5fEhH/ls4ahhKk=
- github.com/gohugoio/gohugoioTheme v0.0.0-20220228085601-7cfbda06d135/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20220905093719-cb8b64046950 h1:Ovlh3nuy/aNptYZHmIra2MP+ZUEqiihY0HxvhdaMqGg=
- github.com/gohugoio/gohugoioTheme v0.0.0-20220905093719-cb8b64046950/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20220912070954-88dcaf003b4d h1:UYJL6RmEepprvlgHvDnFCWtPOvjmqzFCQ90cRDRBO7U=
- github.com/gohugoio/gohugoioTheme v0.0.0-20220912070954-88dcaf003b4d/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20220914071648-0ef1c51685bf h1:A8Ksnvp8reNt2Ap0mUK7gFkJkCjt9R60yopGsezcOBA=
- github.com/gohugoio/gohugoioTheme v0.0.0-20220914071648-0ef1c51685bf/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20221116211530-5ae8dcdd68d6 h1:eG53kL1LkQuKmrDdzbvvx6d60qM07zp2Wjo/tYxkDOY=
- github.com/gohugoio/gohugoioTheme v0.0.0-20221116211530-5ae8dcdd68d6/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20221118083537-967e29e21382 h1:e30rl1dxWkYOcgdl0omeOK0HBzgDLI/b9MfYHrINjzU=
- github.com/gohugoio/gohugoioTheme v0.0.0-20221118083537-967e29e21382/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20221124154621-1451a01f406b h1:TRrIisSY7ckt9FVHOOQtmKG4jsnORCYn72UMvMu+IQ0=
- github.com/gohugoio/gohugoioTheme v0.0.0-20221124154621-1451a01f406b/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20221206093948-1408550ab675 h1:wjpYa1cTELeceWndBDV7IG2vRxRWICBBO79HObOfTtk=
- github.com/gohugoio/gohugoioTheme v0.0.0-20221206093948-1408550ab675/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20221217122332-1c1752ad8f14 h1:K6tPFpi7W0zb89QIf+lNdgdTXfDFemU6NKk46MlX9lQ=
- github.com/gohugoio/gohugoioTheme v0.0.0-20221217122332-1c1752ad8f14/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20221220160735-8ffa1ef883b6 h1:yEoQecRBoLGfc7yTybMD3Mhm03bTScZFYPvwe0p75vA=
- github.com/gohugoio/gohugoioTheme v0.0.0-20221220160735-8ffa1ef883b6/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230109120406-12694c4a9456 h1:RSLItaapVjWkqSdQhumAmJkodFDbWMGNZmkVW/AFx0c=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230109120406-12694c4a9456/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b h1:i/iaEOOuR1mKRR0qUOET587ooVhG8c2tllpA5HsrWNU=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232 h1:bEojKgKInbsLkID5Arh95vP4+0xydtn/+ayT6I8vkiU=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f h1:8wI3zOTWQG15aKkbAZQaoGnUQff46hO95opQndBHRE4=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230330081257-7a8c9614432c h1:TyHgmowfiMyxKrqTdRxm/yWIFeN7XRh7Hm6/dOG6yDA=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230330081257-7a8c9614432c/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230418063032-99f9185b8e11 h1:mDcricMewd66x8QjKqNun7Div7iYVLtl8s1dVs9VnB8=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230418063032-99f9185b8e11/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230527124826-78bc315d7b8a h1:ruyA3QZ4Ym0fBLhTW2eoUSvHUaj2xWqaPHIbaI+tbZo=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230527124826-78bc315d7b8a/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230615111426-c3725d921127 h1:LaOUdx1uo/Pr8Vr9KbqTwioia9OhNSiZDOHQGNHZiOs=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230615111426-c3725d921127/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230615131407-b3235557d2e6 h1:x/1M3CJRXCNfThsT+EeWrC2B1qFQZSCeOgA44RJJ5ds=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230615131407-b3235557d2e6/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230624091215-084560177ddc h1:BX7s0bvHFjx5Dll+9CBEiphSjWCDmZ1S+vOrB2wjpOg=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230624091215-084560177ddc/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230630055807-9874cd863bc5 h1:5QDXCq7G6Ak13EKF69QIJtH2YhidilBetNDgdoBYsWM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230630055807-9874cd863bc5/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230812102551-06f8256e7ee5 h1:QoImGtz9EWmovn3d0vfREKf1ybroA+oO/yFCW/BmWSE=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230812102551-06f8256e7ee5/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230927165800-342e2c850f18 h1:fwC86MGMw2yX2tIR+hc+58jlU4pjvc3HUDJ/mTB07Ig=
- github.com/gohugoio/gohugoioTheme v0.0.0-20230927165800-342e2c850f18/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
++github.com/gohugoio/gohugoioTheme v0.0.0-20231111235806-77931ac4875e h1:X4OxWNt7weGfmRHBAQWW1gsdZBd3V/6DJMNhrYS9ALE=
++github.com/gohugoio/gohugoioTheme v0.0.0-20231111235806-77931ac4875e/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
diff --cc docs/hugo.toml
index 3126027a94171a1ae0a88779bf040c2d2c17f6fe,0000000000000000000000000000000000000000..02674346624c9edcb92007ce240b7e71876b18e9
mode 100644,000000..100644
--- /dev/null
@@@ -1,105 -1,0 +1,95 @@@
-   [[related.indices]]
-     toLower = true
-     name   = "relatedFunctions"
-     weight = 60
 +# This his the main configuration file. There are also environment specific configuration stored in the /config directory.
 +
 +baseURL                = "https://gohugo.io/"
 +defaultContentLanguage = "en"
 +enableEmoji            = true
 +ignoreErrors           = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
 +languageCode           = "en-us"
 +paginate               = 100
 +pluralizeListTitles    = false
 +timeZone               = "Europe/Oslo"
 +title                  = "Hugo"
 +
 +# We do redirects via Netlify's _redirects file, generated by Hugo (see "outputs" below).
 +disableAliases = true
 +
 +[services.googleAnalytics]
 +ID = 'G-MBZGKNMDWC'
 +
 +[minify]
 +  [minify.tdewolff]
 +    [minify.tdewolff.html]
 +      keepWhitespace = true
 +
 +[module]
 +  [module.hugoVersion]
 +    min = "0.56.0"
 +  [[module.imports]]
 +    path = "github.com/gohugoio/gohugoioTheme"
 +
 +[outputs]
 +  home    = ["HTML", "RSS", "REDIR", "HEADERS"]
 +  section = ["HTML", "RSS"]
 +
 +[mediaTypes]
 +  [mediaTypes."text/netlify"]
 +    delimiter = ""
 +
 +[outputFormats]
 +  [outputFormats.REDIR]
 +    mediatype      = "text/netlify"
 +    baseName       = "_redirects"
 +    isPlainText    = true
 +    notAlternative = true
 +  [outputFormats.HEADERS]
 +    mediatype      = "text/netlify"
 +    baseName       = "_headers"
 +    isPlainText    = true
 +    notAlternative = true
 +
 +[caches]
 +  [caches.getjson]
 +    dir    = ":cacheDir/:project"
 +    maxAge = -1
 +  [caches.getcsv]
 +    dir    = ":cacheDir/:project"
 +    maxAge = -1
 +  [caches.images]
 +    dir    = ":cacheDir/images"
 +    maxAge = "1440h"
 +  [caches.assets]
 +    dir    = ":resourceDir/_gen"
 +    maxAge = -1
 +  [caches.getresource]
 +    dir = ":cacheDir/:project"
 +    maxage = '1h'
 +
 +[related]
 +  threshold    = 80
 +  includeNewer = true
 +  toLower      = false
- # TODO delete when (a) Netlify is building the site with v0.120.0 or later,
- # and (b) the changes fom gohugoioTheme/commit/af97b8e61638ddf043b87590cd567d76045bf9be
- # have been pulled into this repo.
- [social]
-   twitter = "GoHugoIO"
 +  [[related.indices]]
 +    name   = "keywords"
 +    weight = 60
 +  [[related.indices]]
 +    # Can be used as a front matter slice to link to other page fragments (headings) using their ID.
 +    # This isn't particular useful in the current docs, but we're planning on getting a auto generated
 +    # reference section with a better ID setup.
 +    # For now, we just use it to give pages with same headings some similarity score.
 +    name                 = "fragmentrefs"
 +    type                 = "fragments"
 +    applyFilter          = false
 +    weight               = 60
 +    cardinalityThreshold = 50
 +
 +[imaging]
 +  # See https://github.com/disintegration/imaging
 +  # CatmullRom is a sharp bicubic filter which should fit the docs site well with its many screenshots.
 +  # Note that you can also set this per image processing.
 +  resampleFilter = "CatmullRom"
 +  # Default JPEG quality setting. Default is 75.
 +  quality = 75
 +  anchor  = "smart"
 +
 +[taxonomies]
 +  category = "categories"
index 71d1abfdf2f6686087a2f8adde70b53ed687f81f,0000000000000000000000000000000000000000..e22a91f3d9649e3ee281ff4157652cae3b6aaac7
mode 100644,000000..100644
--- /dev/null
@@@ -1,13 -1,0 +1,36 @@@
- {{ $version := .Get 0 }}
- {{ if not $version }}
-   {{ errorf "Missing version in new-in shortcode " }}
- {{ end }}
- {{ $version = $version | strings.TrimPrefix "v" }}
- <button
-   class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 ml2 px-4 border border-gray-400 rounded shadow">
-   <a
-     href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}"
-     target="_blank"
-     >New in v{{ $version }}</a
-   >
- </button>
++{{- /*
++Renders a "new in" button indicating the version in which a feature was added.
++
++When comparing the current version to the specified version, the "new in"
++button will be hidden if any of the following conditions is true:
++
++- The major version difference exceeds the majorVersionDiffThreshold
++- The minor version difference exceeds the minorVersionDiffThreshold
++
++@param {string} version The semantic version string, with or without a leading v.
++@returns {template.HTML}
++
++@example {{< new-in 0.100.0 >}}
++*/}}
++
++{{- /* Set defaults. */}}
++{{- $majorVersionDiffThreshold := 0 }}
++{{- $minorVersionDiffThreshold := 30 }}
++{{- $displayExpirationWarning := true }}
++
++{{- /* Render. */}}
++{{- with $version := .Get 0 | strings.TrimPrefix "v" }}
++  {{- $majorVersionDiff := sub (index (split hugo.Version ".") 0 | int) (index (split $version ".") 0 | int) }}
++  {{- $minorVersionDiff := sub (index (split hugo.Version ".") 1 | int) (index (split $version ".") 1 | int) }}
++  {{- if or (gt $majorVersionDiff $majorVersionDiffThreshold) (gt $minorVersionDiff $minorVersionDiffThreshold) }}
++    {{- if $displayExpirationWarning }}
++      {{- warnf "This call to the %q shortcode should be removed: %s. The button is now hidden because the specified version (%s) is older than the display threshold." $.Name $.Position $version }}
++    {{- end }}
++  {{- else }}
++    <button class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 px-4 border border-gray-400 rounded shadow">
++      <a href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}">New in v{{ $version }}</a>
++    </button>
++  {{- end }}
++{{- else }}
++  {{- errorf "The %q shortcode requires a positional parameter (version). See %s" .Name .Position }}
++{{- end -}}
index d65e08c250d480fe9075288a1982b616b582d6b2,0000000000000000000000000000000000000000..cc46695a58a079af76365b47434030ca039410b7
mode 100644,000000..100644
--- /dev/null
@@@ -1,30 -1,0 +1,30 @@@
-     HUGO_VERSION = "0.119.0"
 +[build]
 +  publish = "public"
 +  command = "hugo --gc --minify"
 +
 +  [build.environment]
++    HUGO_VERSION = "0.120.4"
 +
 +[context.production.environment]
 +  HUGO_ENV           = "production"
 +  HUGO_ENABLEGITINFO = "true"
 +
 +[context.split1]
 +  command = "hugo --gc --minify --enableGitInfo"
 +
 +  [context.split1.environment]
 +    HUGO_ENV = "production"
 +
 +[context.deploy-preview]
 +  command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
 +
 +[context.branch-deploy]
 +  command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
 +
 +[context.next.environment]
 +  HUGO_ENABLEGITINFO = "true"
 +
 +[[redirects]]
 +  from   = "/npmjs/*"
 +  to     = "/npmjs/"
 +  status = 200