]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
Squashed 'docs/' changes from 4429eeeea..73a01565c
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 23 Jan 2025 08:46:02 +0000 (09:46 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 23 Jan 2025 08:46:02 +0000 (09:46 +0100)
73a01565c Remove comment shortcode documentation
0ca7ccd30 Replace usage of comment shortcode with HTML comments
fe10d9899 Remove expired new-in labels
11e89dfcb [editorial] Link to proper render-hook page in relref.md
11a581c2f netlify: Hugo 0.142.0
1a4fcf7f7 Miscellaneous edits
2c7a3165f Markdown linting and cleanup
69d7a781b Replace links to glossary terms with custom render hook syntax
441752d2d Refactor glossary lookup portion of link render hook
80109a14f Fix glossary term linking for plural form
cd95f0f34 Update link render hook to support glossary links
53eadb430 Remove the glossary template
1d40a7f3b Improve transform.ToMath examples
586970df2 Misc edits
6a06a8de7 Add glossary link shortcode
4171c0eb7 Improve description of masking with non-transparent images
41c8feb64 Fix example of image.Mask filter
704a81656 Add alignx option to images.Text usage example
7c03eb0cc Clarify context in example of using the try statement
56d9c9b71 Refactor glossary of terms
042a6846b Add expiry dates to deprecated methods pages
365ab345f Remove services key from instagram shortcode page
b7fe31e07 Reorder options list for images.Text filter
8051ff818 Format directory names, file names, and file paths as code
d09a14623 Update version refs for Hugo and Dart Sass
3bb006974 Add NODE_VERSION to Netlify config examples
3a0f2531e Fix typo
7e3198eaf Fix typo
cf56452a3 Fix typo
a9f51d13e Fix typo
82bfdd8c3 Fix typo
a5c41a053 Fix typo
abcfed7a5 Fix typo
8c1debf3a Remove outdated new-in badges
809ddf9ef Update theme
63867d56f Use warnf instead of errorf in try-catch example
dee3e5f09 Update theme
9791f7057 Remove TODO from comment shortcode examples
a346ca1fd Elevate embedded shortcode documentation to its own section
8fa19b50f hugoreleaser.toml =>  hugoreleaser.yaml
575d60345 Update docs for v0.141.0
a0a442d62 netlify: Hugo 0.141.0
6667cbcd8 Merge commit '81a7b6390036138356773c87a886679c81c524e1'
f36fc013e docs: Regen CLI docs
365a47ded tpl/images: Change signature of images.QR to images.QR TEXT OPTIONS
ae8f8af0a images.Text: Add "alignx" option for horizontal alignment
8f45ccca6 docs: Regen CLI docs
f0e6304f4 Merge commit 'e9fbadacc3f09191e2e19f112a49777eeb8df06c'
cb9bec2b2 tpl/images: Add images.QR function

git-subtree-dir: docs
git-subtree-split: 73a01565c5ba0774d65aa6f2384c44804fefa37d

426 files changed:
.markdownlint.yaml
_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_code.css
_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css
_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/components/author-github-data-card.html
_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/components/author-github-data.html
_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/utilities/get-remote-data.html
_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/hl.html [new file with mode: 0644]
_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html
_vendor/modules.txt
archetypes/glossary.md [new file with mode: 0644]
archetypes/showcase/index.md
assets/images/examples/mask.png [new file with mode: 0644]
config/_default/menus/menus.en.toml
content/en/about/features.md
content/en/about/privacy.md
content/en/commands/hugo.md
content/en/commands/hugo_completion.md
content/en/commands/hugo_completion_bash.md
content/en/commands/hugo_completion_fish.md
content/en/commands/hugo_completion_powershell.md
content/en/commands/hugo_completion_zsh.md
content/en/commands/hugo_config.md
content/en/commands/hugo_config_mounts.md
content/en/commands/hugo_convert.md
content/en/commands/hugo_convert_toJSON.md
content/en/commands/hugo_convert_toTOML.md
content/en/commands/hugo_convert_toYAML.md
content/en/commands/hugo_deploy.md
content/en/commands/hugo_env.md
content/en/commands/hugo_gen.md
content/en/commands/hugo_gen_chromastyles.md
content/en/commands/hugo_gen_doc.md
content/en/commands/hugo_gen_man.md
content/en/commands/hugo_import.md
content/en/commands/hugo_import_jekyll.md
content/en/commands/hugo_list.md
content/en/commands/hugo_list_all.md
content/en/commands/hugo_list_drafts.md
content/en/commands/hugo_list_expired.md
content/en/commands/hugo_list_future.md
content/en/commands/hugo_list_published.md
content/en/commands/hugo_mod.md
content/en/commands/hugo_mod_clean.md
content/en/commands/hugo_mod_get.md
content/en/commands/hugo_mod_graph.md
content/en/commands/hugo_mod_init.md
content/en/commands/hugo_mod_npm.md
content/en/commands/hugo_mod_npm_pack.md
content/en/commands/hugo_mod_tidy.md
content/en/commands/hugo_mod_vendor.md
content/en/commands/hugo_mod_verify.md
content/en/commands/hugo_new.md
content/en/commands/hugo_new_content.md
content/en/commands/hugo_new_site.md
content/en/commands/hugo_new_theme.md
content/en/commands/hugo_server.md
content/en/commands/hugo_server_trust.md
content/en/commands/hugo_version.md
content/en/content-management/archetypes.md
content/en/content-management/build-options.md
content/en/content-management/content-adapters.md
content/en/content-management/cross-references.md
content/en/content-management/data-sources.md
content/en/content-management/formats.md
content/en/content-management/front-matter.md
content/en/content-management/image-processing/index.md
content/en/content-management/markdown-attributes.md
content/en/content-management/mathematics.md
content/en/content-management/menus.md
content/en/content-management/multilingual.md
content/en/content-management/page-bundles.md
content/en/content-management/related.md
content/en/content-management/sections.md
content/en/content-management/shortcodes.md
content/en/content-management/summaries.md
content/en/content-management/syntax-highlighting.md
content/en/content-management/urls.md
content/en/contribute/development.md
content/en/contribute/documentation.md
content/en/contribute/themes.md
content/en/functions/_common/highlighting-options.md [new file with mode: 0644]
content/en/functions/collections/After.md
content/en/functions/collections/Append.md
content/en/functions/collections/Dictionary.md
content/en/functions/collections/In.md
content/en/functions/collections/NewScratch.md
content/en/functions/collections/Where.md
content/en/functions/css/Sass.md
content/en/functions/css/TailwindCSS.md
content/en/functions/data/GetCSV.md
content/en/functions/data/GetJSON.md
content/en/functions/debug/Timer.md
content/en/functions/encoding/Base64Decode.md
content/en/functions/fmt/Warnf.md
content/en/functions/global/page.md
content/en/functions/go-template/range.md
content/en/functions/go-template/return.md
content/en/functions/go-template/try.md [new file with mode: 0644]
content/en/functions/go-template/with.md
content/en/functions/hugo/Environment.md
content/en/functions/hugo/Generator.md
content/en/functions/hugo/Store.md
content/en/functions/hugo/Version.md
content/en/functions/hugo/WorkingDir.md
content/en/functions/images/Config.md
content/en/functions/images/Dither.md
content/en/functions/images/Mask.md [new file with mode: 0644]
content/en/functions/images/Overlay.md
content/en/functions/images/Process.md
content/en/functions/images/QR.md [new file with mode: 0644]
content/en/functions/images/Text.md
content/en/functions/js/Batch.md
content/en/functions/js/Build.md
content/en/functions/js/_common/options.md
content/en/functions/lang/Translate.md
content/en/functions/math/Abs.md
content/en/functions/math/Add.md
content/en/functions/math/Div.md
content/en/functions/math/Mul.md
content/en/functions/math/Rand.md
content/en/functions/math/Sub.md
content/en/functions/openapi3/Unmarshal.md
content/en/functions/path/Join.md
content/en/functions/resources/ByType.md
content/en/functions/resources/Concat.md
content/en/functions/resources/ExecuteAsTemplate.md
content/en/functions/resources/Fingerprint.md
content/en/functions/resources/FromString.md
content/en/functions/resources/Get.md
content/en/functions/resources/GetMatch.md
content/en/functions/resources/GetRemote.md
content/en/functions/resources/Match.md
content/en/functions/resources/PostProcess.md
content/en/functions/resources/ToCSS.md
content/en/functions/safe/CSS.md
content/en/functions/strings/ContainsNonSpace.md
content/en/functions/strings/SliceString.md
content/en/functions/templates/Defer.md
content/en/functions/time/AsTime.md
content/en/functions/time/Duration.md
content/en/functions/time/Format.md
content/en/functions/time/Now.md
content/en/functions/time/ParseDuration.md
content/en/functions/transform/Emojify.md
content/en/functions/transform/Highlight.md
content/en/functions/transform/ToMath.md
content/en/functions/transform/Unmarshal.md
content/en/functions/urls/JoinPath.md
content/en/functions/urls/Ref.md
content/en/functions/urls/RelRef.md
content/en/functions/urls/URLize.md
content/en/getting-started/configuration-build.md
content/en/getting-started/configuration-markup.md
content/en/getting-started/configuration.md
content/en/getting-started/directory-structure.md
content/en/getting-started/external-learning-resources/index.md
content/en/getting-started/glossary.md [deleted file]
content/en/getting-started/glossary/_index.md [new file with mode: 0644]
content/en/getting-started/glossary/action.md [new file with mode: 0644]
content/en/getting-started/glossary/archetype.md [new file with mode: 0644]
content/en/getting-started/glossary/argument.md [new file with mode: 0644]
content/en/getting-started/glossary/array.md [new file with mode: 0644]
content/en/getting-started/glossary/bool.md [new file with mode: 0644]
content/en/getting-started/glossary/boolean.md [new file with mode: 0644]
content/en/getting-started/glossary/branch-bundle.md [new file with mode: 0644]
content/en/getting-started/glossary/build.md [new file with mode: 0644]
content/en/getting-started/glossary/bundle.md [new file with mode: 0644]
content/en/getting-started/glossary/cache.md [new file with mode: 0644]
content/en/getting-started/glossary/chain.md [new file with mode: 0644]
content/en/getting-started/glossary/cjk.md [new file with mode: 0644]
content/en/getting-started/glossary/cli.md [new file with mode: 0644]
content/en/getting-started/glossary/collection.md [new file with mode: 0644]
content/en/getting-started/glossary/content-adapter.md [new file with mode: 0644]
content/en/getting-started/glossary/content-format.md [new file with mode: 0644]
content/en/getting-started/glossary/content-type.md [new file with mode: 0644]
content/en/getting-started/glossary/content-view.md [new file with mode: 0644]
content/en/getting-started/glossary/context.md [new file with mode: 0644]
content/en/getting-started/glossary/default-sort-order.md [new file with mode: 0644]
content/en/getting-started/glossary/element.md [new file with mode: 0644]
content/en/getting-started/glossary/environment.md [new file with mode: 0644]
content/en/getting-started/glossary/field.md [new file with mode: 0644]
content/en/getting-started/glossary/flag.md [new file with mode: 0644]
content/en/getting-started/glossary/float.md [new file with mode: 0644]
content/en/getting-started/glossary/floating-point.md [new file with mode: 0644]
content/en/getting-started/glossary/fragment.md [new file with mode: 0644]
content/en/getting-started/glossary/front-matter.md [new file with mode: 0644]
content/en/getting-started/glossary/function.md [new file with mode: 0644]
content/en/getting-started/glossary/global-resource.md [new file with mode: 0644]
content/en/getting-started/glossary/headless-bundle.md [new file with mode: 0644]
content/en/getting-started/glossary/identifier.md [new file with mode: 0644]
content/en/getting-started/glossary/int.md [new file with mode: 0644]
content/en/getting-started/glossary/integer.md [new file with mode: 0644]
content/en/getting-started/glossary/internationalization.md [new file with mode: 0644]
content/en/getting-started/glossary/interpreted-string-literal.md [new file with mode: 0644]
content/en/getting-started/glossary/interval.md [new file with mode: 0644]
content/en/getting-started/glossary/kind.md [new file with mode: 0644]
content/en/getting-started/glossary/layout.md [new file with mode: 0644]
content/en/getting-started/glossary/leaf-bundle.md [new file with mode: 0644]
content/en/getting-started/glossary/lexer.md [new file with mode: 0644]
content/en/getting-started/glossary/list-page.md [new file with mode: 0644]
content/en/getting-started/glossary/list-template.md [new file with mode: 0644]
content/en/getting-started/glossary/localization.md [new file with mode: 0644]
content/en/getting-started/glossary/logical-path.md [new file with mode: 0644]
content/en/getting-started/glossary/map.md [new file with mode: 0644]
content/en/getting-started/glossary/markdown-attribute.md [new file with mode: 0644]
content/en/getting-started/glossary/marshal.md [new file with mode: 0644]
content/en/getting-started/glossary/method.md [new file with mode: 0644]
content/en/getting-started/glossary/module.md [new file with mode: 0644]
content/en/getting-started/glossary/node.md [new file with mode: 0644]
content/en/getting-started/glossary/noop.md [new file with mode: 0644]
content/en/getting-started/glossary/object.md [new file with mode: 0644]
content/en/getting-started/glossary/ordered-taxonomy.md [new file with mode: 0644]
content/en/getting-started/glossary/output-format.md [new file with mode: 0644]
content/en/getting-started/glossary/page-bundle.md [new file with mode: 0644]
content/en/getting-started/glossary/page-collection.md [new file with mode: 0644]
content/en/getting-started/glossary/page-kind.md [new file with mode: 0644]
content/en/getting-started/glossary/page-resource.md [new file with mode: 0644]
content/en/getting-started/glossary/pager.md [new file with mode: 0644]
content/en/getting-started/glossary/paginate.md [new file with mode: 0644]
content/en/getting-started/glossary/pagination.md [new file with mode: 0644]
content/en/getting-started/glossary/paginator.md [new file with mode: 0644]
content/en/getting-started/glossary/parameter.md [new file with mode: 0644]
content/en/getting-started/glossary/partial.md [new file with mode: 0644]
content/en/getting-started/glossary/permalink.md [new file with mode: 0644]
content/en/getting-started/glossary/pipe.md [new file with mode: 0644]
content/en/getting-started/glossary/pipeline.md [new file with mode: 0644]
content/en/getting-started/glossary/publish.md [new file with mode: 0644]
content/en/getting-started/glossary/raw-string-literal.md [new file with mode: 0644]
content/en/getting-started/glossary/regular-page.md [new file with mode: 0644]
content/en/getting-started/glossary/relative-permalink.md [new file with mode: 0644]
content/en/getting-started/glossary/remote-resource.md [new file with mode: 0644]
content/en/getting-started/glossary/render-hook.md [new file with mode: 0644]
content/en/getting-started/glossary/resource-type.md [new file with mode: 0644]
content/en/getting-started/glossary/resource.md [new file with mode: 0644]
content/en/getting-started/glossary/scalar.md [new file with mode: 0644]
content/en/getting-started/glossary/scratch-pad.md [new file with mode: 0644]
content/en/getting-started/glossary/section-page.md [new file with mode: 0644]
content/en/getting-started/glossary/section.md [new file with mode: 0644]
content/en/getting-started/glossary/shortcode.md [new file with mode: 0644]
content/en/getting-started/glossary/slice.md [new file with mode: 0644]
content/en/getting-started/glossary/string.md [new file with mode: 0644]
content/en/getting-started/glossary/taxonomic-weight.md [new file with mode: 0644]
content/en/getting-started/glossary/taxonomy-object.md [new file with mode: 0644]
content/en/getting-started/glossary/taxonomy-page.md [new file with mode: 0644]
content/en/getting-started/glossary/taxonomy.md [new file with mode: 0644]
content/en/getting-started/glossary/template-action.md [new file with mode: 0644]
content/en/getting-started/glossary/template.md [new file with mode: 0644]
content/en/getting-started/glossary/term-page.md [new file with mode: 0644]
content/en/getting-started/glossary/term.md [new file with mode: 0644]
content/en/getting-started/glossary/theme.md [new file with mode: 0644]
content/en/getting-started/glossary/token.md [new file with mode: 0644]
content/en/getting-started/glossary/type.md [new file with mode: 0644]
content/en/getting-started/glossary/unmarshal.md [new file with mode: 0644]
content/en/getting-started/glossary/variable.md [new file with mode: 0644]
content/en/getting-started/glossary/walk.md [new file with mode: 0644]
content/en/getting-started/glossary/weight.md [new file with mode: 0644]
content/en/getting-started/glossary/weighted-page.md [new file with mode: 0644]
content/en/getting-started/glossary/zero-time.md [new file with mode: 0644]
content/en/getting-started/quick-start.md
content/en/getting-started/usage.md
content/en/hosting-and-deployment/deployment-with-rsync.md
content/en/hosting-and-deployment/hosting-on-21yunbox.md
content/en/hosting-and-deployment/hosting-on-aws-amplify/index.md
content/en/hosting-and-deployment/hosting-on-github/index.md
content/en/hosting-and-deployment/hosting-on-netlify/index.md
content/en/hosting-and-deployment/hugo-deploy.md
content/en/hugo-modules/_index.md
content/en/hugo-modules/configuration.md
content/en/hugo-modules/theme-components.md
content/en/hugo-modules/use-modules.md
content/en/hugo-pipes/introduction.md
content/en/hugo-pipes/js.md
content/en/hugo-pipes/postprocess.md
content/en/hugo-pipes/transpile-sass-to-css.md
content/en/installation/linux.md
content/en/methods/menu-entry/PageRef.md
content/en/methods/menu-entry/Params.md
content/en/methods/menu-entry/URL.md
content/en/methods/menu/ByWeight.md
content/en/methods/page/AlternativeOutputFormats.md
content/en/methods/page/BundleType.md
content/en/methods/page/CurrentSection.md
content/en/methods/page/Data.md
content/en/methods/page/File.md
content/en/methods/page/Fragments.md
content/en/methods/page/GetPage.md
content/en/methods/page/InSection.md
content/en/methods/page/IsAncestor.md
content/en/methods/page/IsDescendant.md
content/en/methods/page/IsHome.md
content/en/methods/page/IsNode.md
content/en/methods/page/IsPage.md
content/en/methods/page/IsSection.md
content/en/methods/page/IsTranslated.md
content/en/methods/page/Kind.md
content/en/methods/page/OutputFormats.md
content/en/methods/page/Page.md
content/en/methods/page/Pages.md
content/en/methods/page/Paginate.md
content/en/methods/page/Paginator.md
content/en/methods/page/Params.md
content/en/methods/page/Path.md
content/en/methods/page/Plain.md
content/en/methods/page/RawContent.md
content/en/methods/page/Ref.md
content/en/methods/page/RegularPages.md
content/en/methods/page/RegularPagesRecursive.md
content/en/methods/page/RelRef.md
content/en/methods/page/Render.md
content/en/methods/page/RenderShortcodes.md
content/en/methods/page/Resources.md
content/en/methods/page/Scratch.md
content/en/methods/page/Section.md
content/en/methods/page/Store.md
content/en/methods/page/Summary.md
content/en/methods/page/Type.md
content/en/methods/page/Weight.md
content/en/methods/page/_common/definition-of-section.md
content/en/methods/page/_common/next-and-prev.md
content/en/methods/page/_common/nextinsection-and-previnsection.md
content/en/methods/page/_common/output-format-definition.md [deleted file]
content/en/methods/pages/ByWeight.md
content/en/methods/pages/GroupByDate.md
content/en/methods/pages/GroupByExpiryDate.md
content/en/methods/pages/GroupByLastmod.md
content/en/methods/pages/GroupByParamDate.md
content/en/methods/pages/GroupByPublishDate.md
content/en/methods/pages/Related.md
content/en/methods/resource/Colors.md
content/en/methods/resource/Data.md
content/en/methods/resource/Err.md
content/en/methods/resource/Key.md
content/en/methods/resource/Name.md
content/en/methods/resource/Params.md
content/en/methods/resource/Permalink.md
content/en/methods/resource/RelPermalink.md
content/en/methods/resource/Title.md
content/en/methods/resource/_common/global-page-remote-resources.md
content/en/methods/shortcode/Inner.md
content/en/methods/shortcode/Parent.md
content/en/methods/shortcode/Ref.md
content/en/methods/shortcode/RelRef.md
content/en/methods/shortcode/Scratch.md
content/en/methods/shortcode/Store.md
content/en/methods/site/AllPages.md
content/en/methods/site/Data.md
content/en/methods/site/GetPage.md
content/en/methods/site/Pages.md
content/en/methods/site/Param.md
content/en/methods/site/Params.md
content/en/methods/site/RegularPages.md
content/en/methods/site/Store.md
content/en/methods/site/Taxonomies.md
content/en/methods/taxonomy/Alphabetical.md
content/en/methods/taxonomy/ByCount.md
content/en/methods/taxonomy/Count.md
content/en/methods/taxonomy/Get.md
content/en/methods/taxonomy/_common/get-a-taxonomy-object.md
content/en/methods/taxonomy/_common/ordered-taxonomy-element-methods.md
content/en/methods/time/Format.md
content/en/methods/time/Round.md
content/en/methods/time/Truncate.md
content/en/myshowcase/index.md
content/en/quick-reference/emojis.md
content/en/quick-reference/page-collections.md
content/en/render-hooks/_common/pageinner.md
content/en/render-hooks/blockquotes.md
content/en/render-hooks/code-blocks.md
content/en/render-hooks/headings.md
content/en/render-hooks/images.md
content/en/render-hooks/introduction.md
content/en/render-hooks/links.md
content/en/render-hooks/passthrough.md
content/en/render-hooks/tables.md
content/en/shortcodes/_index.md [new file with mode: 0644]
content/en/shortcodes/comment.md [new file with mode: 0755]
content/en/shortcodes/details.md [new file with mode: 0755]
content/en/shortcodes/figure.md [new file with mode: 0755]
content/en/shortcodes/gist.md [new file with mode: 0755]
content/en/shortcodes/highlight.md [new file with mode: 0755]
content/en/shortcodes/instagram.md [new file with mode: 0755]
content/en/shortcodes/param.md [new file with mode: 0755]
content/en/shortcodes/qr.md [new file with mode: 0755]
content/en/shortcodes/ref.md [new file with mode: 0755]
content/en/shortcodes/relref.md [new file with mode: 0755]
content/en/shortcodes/vimeo.md [new file with mode: 0755]
content/en/shortcodes/x.md [new file with mode: 0755]
content/en/shortcodes/youtube.md [new file with mode: 0755]
content/en/showcase/1password-support/index.md
content/en/showcase/_index.md
content/en/showcase/hartwell-insurance/index.md
content/en/showcase/letsencrypt/index.md
content/en/showcase/overmindstudios/bio.md
content/en/showcase/template/index.md
content/en/templates/404.md
content/en/templates/_index.md
content/en/templates/content-view.md
content/en/templates/embedded.md
content/en/templates/home.md
content/en/templates/introduction.md
content/en/templates/lookup-order.md
content/en/templates/pagination.md
content/en/templates/partial.md
content/en/templates/robots.md
content/en/templates/rss.md
content/en/templates/shortcode.md
content/en/templates/sitemap.md
content/en/templates/taxonomy.md
content/en/templates/term.md
content/en/templates/types/index.md
content/en/tools/migrations.md
content/en/tools/search.md
content/en/troubleshooting/deprecation.md
content/en/troubleshooting/faq.md
content/en/troubleshooting/performance.md
data/docs.yaml
data/embedded_template_urls.toml
go.mod
go.sum
hugo_stats.json [deleted file]
hugoreleaser.toml [deleted file]
hugoreleaser.yaml [new file with mode: 0644]
layouts/_default/_markup/render-link.html [new file with mode: 0644]
layouts/shortcodes/glossary-term.html [new file with mode: 0644]
layouts/shortcodes/glossary.html [new file with mode: 0644]
netlify.toml

index d9c2c5a674367b41d10025da685f64e106a74334..ee0a28909ca97fe91f0a36a22dd552ea9b896818 100644 (file)
@@ -23,3 +23,4 @@ MD046: false
 MD049: false
 MD050: false
 MD053: false
+MD055: false
index c82e77ee7766acca04b86a4bc497a53363c4d99e..9906a13d0228f96a65c1d158cd54ccabec9539a8 100644 (file)
@@ -10,9 +10,9 @@
 }
 
 code {
-    padding: 0.2em;
+    padding: 2px 3px;
     margin: 0;
-    font-size: 85%;
+    font-size: 93.75%;
     background-color: rgba(27,31,35,0.05);
     border-radius: 3px;
 }
index b6343c7be8241f2783e463d25ba5694149bc2824..4fd374a1fe146c2ba271ff4822336d11894c5bd9 100644 (file)
@@ -4769,9 +4769,9 @@ h6:hover .header-link {
   margin: 0;
 }
 code {
-    padding: 0.2em;
+    padding: 2px 3px;
     margin: 0;
-    font-size: 85%;
+    font-size: 93.75%;
     background-color: rgba(27, 31, 35, .05);
     border-radius: 3px;
 }
index 4caa21f3e2dfce34541b0a87cea8ae38e2c6a315..d3edadaac0ff03b8cb12d41f2b34a351e2db5059 100644 (file)
@@ -4,14 +4,14 @@
 
     {{ $data := "" }}
     {{ $url := urls.JoinPath "https://api.github.com/users" $author }}
-    {{ with resources.GetRemote $url }}
+    {{ with try (resources.GetRemote $url) }}
       {{ with .Err }}
         {{ errorf "%s" . }}
-      {{ else }}
+      {{ else with .Value }}
         {{ $data = . | transform.Unmarshal }}
+      {{ else }}
+        {{ errorf "Unable to get remote resource %q" $url }}
       {{ end }}
-    {{ else }}
-      {{ errorf "Unable to get remote resource %q" $url }}
     {{ end }}
 
     <div class="tc">
index fbad3a0a74a3625ca3fe4dbe3b29f24b333608bc..c281e411fce865be8629ad418cd30c32ae3a110b 100644 (file)
@@ -4,14 +4,14 @@
 
     {{ $data := "" }}
     {{ $url := urls.JoinPath "https://api.github.com/users" $author }}
-    {{ with resources.GetRemote $url }}
+    {{ with try (resources.GetRemote $url) }}
       {{ with .Err }}
         {{ errorf "%s" . }}
-      {{ else }}
+      {{ else with .Value }}
         {{ $data = . | transform.Unmarshal }}
+      {{ else }}
+        {{ errorf "Unable to get remote resource %q" $url }}
       {{ end }}
-    {{ else }}
-      {{ errorf "Unable to get remote resource %q" $url }}
     {{ end }}
 
     {{ with $data }}
index 69ac41da40a50667104fa2eb66415b7fb58f7bf4..78b2ba06e993bef6a1d5c9bd78032ca51ee75f76 100644 (file)
@@ -11,13 +11,13 @@ Supports CSV, JSON, TOML, YAML, and XML.
 
 {{ $url := . }}
 {{ $data := dict }}
-{{ with resources.GetRemote $url }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     {{ $data = .Content | transform.Unmarshal }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $url }}
 {{ end }}
 {{ return $data }}
diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/hl.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/hl.html
new file mode 100644 (file)
index 0000000..1a5b4e1
--- /dev/null
@@ -0,0 +1,11 @@
+{{- /*
+Returns syntax-highlighted code from the given text.
+
+This is useful as a terse way to highlight inline code snippets. Calling the
+highlight shortcode for inline snippets is verbose.
+*/}}
+
+{{- $code := .Inner | strings.TrimSpace }}
+{{- $lang := or (.Get 0) "go"  }}
+{{- $opts := dict "hl_inline" true "noClasses" true }}
+{{- transform.Highlight $code $lang $opts }}
index dd8c60e18bdb0d0436bb86d2bc2202bf3395583a..7c2d805d2c009cd8c194d8779b771788d0b25f8b 100644 (file)
@@ -120,8 +120,8 @@ Renders the given image using the given filter, if any.
 
 {{- $validFilters := slice
   "autoorient" "brightness" "colorbalance" "colorize" "contrast" "dither"
-  "gamma" "gaussianblur" "grayscale" "hue" "invert" "none" "opacity" "overlay"
-  "padding" "pixelate" "process" "saturation" "sepia" "sigmoid" "text"
+  "gamma" "gaussianblur" "grayscale" "hue" "invert" "mask" "none" "opacity"
+  "overlay" "padding" "pixelate" "process" "saturation" "sepia" "sigmoid" "text"
   "unsharpmask"
 }}
 
@@ -229,6 +229,12 @@ Renders the given image using the given filter, if any.
   {{- $ctx = merge $ctx (dict "argsRequired" 0) }}
   {{- template "validate-arg-count" $ctx }}
   {{- $f = images.Invert }}
+{{- else if eq $filter "mask" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $ctx := dict "src" (index $filterArgs 0) "name" .Name "position" .Position }}
+  {{- $maskImage := partial "inline/get-resource.html" $ctx }}
+  {{- $f = images.Mask $maskImage }}
 {{- else if eq $filter "opacity" }}
   {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
   {{- template "validate-arg-count" $ctx }}
@@ -322,11 +328,15 @@ Renders the given image using the given filter, if any.
 {{- end }}
 
 {{- /* Render. */}}
+{{- $class := "di va b--black-20" }}
+{{- if eq $filter "mask" }}
+  {{- $class = "di va" }}
+{{- end }}
 {{- if $example }}
   <p>Original</p>
-  <img class='di ba b--black-20' style="width: initial;" src="{{ $i.RelPermalink }}" alt="{{ $alt }}">
+  <img class="{{ $class}}" 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 }}">
+  <img class="{{ $class }}" style="width: initial;" src="{{ $fi.RelPermalink }}" alt="{{ $alt }}">
 {{- else -}}
   <img class='di' style="width: initial;" src="{{ $fi.RelPermalink }}" alt="{{ $alt }}">
 {{- end }}
@@ -354,15 +364,15 @@ Renders the given image using the given filter, if any.
   {{- $u := urls.Parse .src }}
   {{- $msg := "The %q shortcode was unable to resolve %s. See %s" }}
   {{- if $u.IsAbs }}
-    {{- with resources.GetRemote $u.String }}
+    {{- with try (resources.GetRemote $u.String) }}
       {{- with .Err }}
         {{- errorf "%s" . }}
-      {{- else }}
+      {{- else with .Value }}
         {{- /* This is a remote resource. */}}
         {{- $r = . }}
+      {{- else }}
+        {{- errorf $msg $.name $u.String $.position }}
       {{- end }}
-    {{- else }}
-      {{- errorf $msg $.name $u.String $.position }}
     {{- end }}
   {{- else }}
     {{- with .page.Resources.Get (strings.TrimPrefix "./" $u.Path) }}
index a5092f11edc20ff60c98345db60199abe9b77a8a..50178323d2dd364116cb88f53df6d240e1a073ac 100644 (file)
@@ -1 +1 @@
-# github.com/gohugoio/gohugoioTheme v0.0.0-20250106044328-feb60697e056
+# github.com/gohugoio/gohugoioTheme v0.0.0-20250116152525-2d382cae7743
diff --git a/archetypes/glossary.md b/archetypes/glossary.md
new file mode 100644 (file)
index 0000000..b38ced6
--- /dev/null
@@ -0,0 +1,19 @@
+---
+title: {{ replace .File.ContentBaseName "-" " " }}
+---
+
+<!--
+You can insert these definitions in other pages using the `glossary-term` shortcode, so they must be self-contained.
+
+Do this:
+
+    A _foo_ is big bar.
+    
+Not this:
+
+    A big bar.
+    
+Italicize the term whenever you use it in the definition.
+
+An exception to this rule occurs when a term is an alias for another. In such cases, it is sufficient to use the phrase 'See [page kind]'."
+-->
index 04d4545756f5091dae25f849dd40d60b4814b34d..cdd0367224a58a9039bc218b5566604a6ef5c98a 100644 (file)
@@ -20,7 +20,7 @@ byline: "[bep](https://github.com/bep), Hugo Lead"
 To complete this showcase:
 
 1. Write the story about your site in this file.
-2. Add a summary to the `bio.md` file in this folder.
+2. Add a summary to the `bio.md` file in this directory.
 3. Replace the `featured-template.png` with a screenshot of your site. You can rename it, but it must contain the word `featured`.
 4. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls
 
diff --git a/assets/images/examples/mask.png b/assets/images/examples/mask.png
new file mode 100644 (file)
index 0000000..c3005a6
Binary files /dev/null and b/assets/images/examples/mask.png differ
index 3f4e76879a35eb921a23efe0f6ec182a6c57f225..aac432fab58a10a5c233c554104784ef76278d81 100644 (file)
@@ -55,20 +55,26 @@ identifier = 'render-hooks'
 pageRef = '/render-hooks/'
 
 [[docs]]
-name = 'Hugo Modules'
+name = 'Shortcodes'
 weight = 100
+identifier = 'shortcodes'
+pageRef = '/shortcodes/'
+
+[[docs]]
+name = 'Hugo Modules'
+weight = 110
 identifier = 'modules'
 pageRef = '/hugo-modules/'
 
 [[docs]]
 name = 'Hugo Pipes'
-weight = 110
+weight = 120
 identifier = 'hugo-pipes'
 pageRef = '/hugo-pipes/'
 
 [[docs]]
 name = 'CLI'
-weight = 120
+weight = 130
 post = 'break'
 identifier = 'commands'
 pageRef = '/commands/'
@@ -77,25 +83,25 @@ pageRef = '/commands/'
 
 [[docs]]
 name = 'Troubleshooting'
-weight = 130
+weight = 140
 identifier = 'troubleshooting'
 pageRef = '/troubleshooting/'
 
 [[docs]]
 name = 'Developer tools'
-weight = 140
+weight = 150
 identifier = 'developer-tools'
 pageRef = '/tools/'
 
 [[docs]]
 name = 'Hosting and deployment'
-weight = 150
+weight = 160
 identifier = 'hosting-and-deployment'
 pageRef = '/hosting-and-deployment/'
 
 [[docs]]
 name = 'Contribute'
-weight = 160
+weight = 170
 post = 'break'
 identifier = 'contribute'
 pageRef = '/contribute/'
index 58d32485361befc32288dec888eeb4067b60b000..c04f69686912a97a2f14da8923e52f81a8ce505a 100644 (file)
@@ -55,7 +55,7 @@ toc: true
 : Use fenced code blocks and Markdown render hooks to include diagrams in your content.
 
 [Mathematics]
-: Include mathematical equations and expressions in Markdown using LaTeX or TeX typesetting syntax.
+: Include mathematical equations and expressions in Markdown using LaTeX markup.
 
 [Syntax highlighting]
 : Syntactically highlight code examples using Hugo's embedded syntax highlighter, enabled by default for fenced code blocks in Markdown. The syntax highlighter supports hundreds of code languages and dozens of styles.
@@ -123,7 +123,7 @@ toc: true
 [Mathematics]: /content-management/mathematics/
 [Menus]: /content-management/menus/
 [Minification]: /getting-started/configuration/#configure-minify
-[Modules]: https://gohugo.io/hugo-modules/
+[Modules]: /hugo-modules/
 [Multilingual]: /content-management/multilingual/
 [Multiplatform]: /installation/
 [Output formats]: /templates/output-formats/
@@ -134,6 +134,6 @@ toc: true
 [Syntax highlighting]: /content-management/syntax-highlighting/
 [Tailwind CSS processing]: /functions/css/tailwindcss/
 [Taxonomies]: /content-management/taxonomies/
-[Templates]: templates/introduction/
+[Templates]: /templates/introduction/
 [Themes]: https://themes.gohugo.io/
 [URL management]: /content-management/urls/
index a3491f864c96c331514b3b31feaf3968153c5310..425af0bcfa561d3065e66cfdae0bf8bd8da84501 100644 (file)
@@ -39,11 +39,11 @@ respectDoNotTrack = false
 [privacy.instagram]
 disable = false
 simple = false
-[privacy.twitter]
+[privacy.vimeo]
 disable = false
 enableDNT = false
 simple = false
-[privacy.vimeo]
+[privacy.x]
 disable = false
 enableDNT = false
 simple = false
@@ -64,10 +64,10 @@ disable = true
 disable = true
 [privacy.instagram]
 disable = true
-[privacy.twitter]
-disable = true
 [privacy.vimeo]
 disable = true
+[privacy.x]
+disable = true
 [privacy.youtube]
 disable = true
 {{< /code-toggle >}}
@@ -92,19 +92,19 @@ simple
 disableInlineCSS = true
 {{< /code-toggle >}}
 
-### Twitter
+### X
 
 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.
+: Enabling this for the x shortcode, the post 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.
+: If simple mode is enabled, a static and no-JS version of a post will be built.
 
-**Note:** If you use the _simple mode_ for Twitter, you may want to disable the inline styles provided by Hugo:
+**Note:** If you use the _simple mode_ for X, you may want to disable the inline styles provided by Hugo:
 
 {{< code-toggle file=hugo >}}
 [services]
-[services.twitter]
+[services.x]
 disableInlineCSS = true
 {{< /code-toggle >}}
 
index ef0bca9a5f63781872ec8a71c1d447a27bbd9f1f..42f882ad7e8e51a59210a78b71b54ddf1a5a2263 100644 (file)
@@ -72,7 +72,6 @@ hugo [flags]
 * [hugo completion](/commands/hugo_completion/)         - Generate the autocompletion script for the specified shell
 * [hugo config](/commands/hugo_config/)         - Display site configuration
 * [hugo convert](/commands/hugo_convert/)       - Convert front matter to another format
-* [hugo deploy](/commands/hugo_deploy/)         - Deploy your site to a cloud provider
 * [hugo env](/commands/hugo_env/)       - Display version and environment info
 * [hugo gen](/commands/hugo_gen/)       - Generate documentation and syntax highlighting styles
 * [hugo import](/commands/hugo_import/)         - Import a site from another system
index 96f53742a6977630e2d5a13e570b3ba475630b51..ac60dc1480422f612c14043cd207631b89abd4af 100644 (file)
@@ -29,6 +29,7 @@ See each sub-command's help for details on how to use the generated script.
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 60973415f4734cf48f4393435252fd034aca3d37..41fb47c0c7c27b723f33d9dfffc76017e40db8c4 100644 (file)
@@ -52,6 +52,7 @@ hugo completion bash
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 92bbd6c22a19022eaca1b708f6c204ecdd10f4a3..7f971c3ca363989da289979d64b70b4fbcf66a80 100644 (file)
@@ -43,6 +43,7 @@ hugo completion fish [flags]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index f01442920131a485962b41d41b55f4c561cf28ac..6ea17892b8bb17a72e62d97bd25fe774fa37f7d7 100644 (file)
@@ -40,6 +40,7 @@ hugo completion powershell [flags]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 142c531031086a8cb1e86af081e2586ddd60da87..b9e79f9f3b6d34eb4c87bdba028721738cb4a103 100644 (file)
@@ -54,6 +54,7 @@ hugo completion zsh [flags]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 8e8d745d2e47db073e00302b2266c16e4255e68e..2b4eaafa19ef6d82140d312227cb419eec6c5512 100644 (file)
@@ -24,6 +24,7 @@ hugo config [command] [flags]
       --format string            preferred file format (toml, yaml or json) (default "toml")
   -h, --help                     help for config
       --lang string              the language to display config for. Defaults to the first language defined.
+      --printZero                include config options with zero values (e.g. false, 0, "") in the output
       --renderSegments strings   named segments to render (configured in the segments config)
   -t, --theme strings            themes to use (located in /themes/THEMENAME/)
 ```
@@ -38,6 +39,7 @@ hugo config [command] [flags]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 5af4819a2dc583f5b34b5f639409843aa28ced4d..06a781220467a40ed5b989fcc1897477dc5cf543 100644 (file)
@@ -32,6 +32,7 @@ hugo config mounts [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index aeaa3776662f89a1c0bcd4d8d90a7dcc06311df3..a8d0b6a387ad5dc1d1d89bc0506fdd96b9060275 100644 (file)
@@ -31,6 +31,7 @@ See convert's subcommands toJSON, toTOML and toYAML for more information.
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 40403193c0615a3a9294a4895e0b5335d3d69f91..fe81146f93242ca46dc71cd9bb51f3fbb9be8203 100644 (file)
@@ -32,6 +32,7 @@ hugo convert toJSON [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
   -o, --output string              filesystem path to write files to
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
index 53ab826517a1c8a61ba4c383a71cab54df9f194e..490b15ee6425e83c573eb20d02918e59141d835b 100644 (file)
@@ -32,6 +32,7 @@ hugo convert toTOML [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
   -o, --output string              filesystem path to write files to
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
index efb63a4e2ff31ca77f2c298feb8e17beab99a085..9b00ce247e4047c35dea06c87c3109a820fd69b8 100644 (file)
@@ -32,6 +32,7 @@ hugo convert toYAML [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
   -o, --output string              filesystem path to write files to
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
index fce1e54220d43a2b02af8936634674e30b15db83..696acf51f9c1a92b0d7da0aaa28068cfb97b0b74 100644 (file)
@@ -42,6 +42,7 @@ hugo deploy [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index e216be41688f887aafd52cd17987632e27eba73d..7e21733a42f53106405b4df0c3674435d4ae3048 100644 (file)
@@ -31,6 +31,7 @@ hugo env [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 97cdbdb9da2546164620ef7649431a0aade2c301..d6333b52dd1d7e804762034a8aea426f9483301b 100644 (file)
@@ -27,6 +27,7 @@ Generate documentation for your project using Hugo's documentation engine, inclu
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 49cde6bb90ada3bd1d87d98a28f34a8c7fd363f2..2863e46b407191ba067ac79bc67abbad749a98d1 100644 (file)
@@ -37,6 +37,7 @@ hugo gen chromastyles [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 180dc4f95a6421586f012752470f9cf5fa2cabf8..2c2c3a1184e00fb50c9d03961838699b535b2e92 100644 (file)
@@ -37,6 +37,7 @@ hugo gen doc [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index f33342c548b23af573a77da03c681d7b1cb62fbf..14fe859e3c6aea4fc3acd7cf498d8ec7fce706f8 100644 (file)
@@ -34,6 +34,7 @@ hugo gen man [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index b20b585991a88c83cc35117d62c9cb5f633966ce..2b8e629518ea732bfd91e2bb9f9fe31544e9342e 100644 (file)
@@ -29,6 +29,7 @@ Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_p
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 14c57cc447bdbe08437c2ef89d5f74dc6fd14d2e..8746c156e3953c2b2caa585a6e49cc9d5105cc6b 100644 (file)
@@ -34,6 +34,7 @@ hugo import jekyll [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 726fe51a96db46a14c53ea2105306a3e7bc9ace3..741ca1d686285f27f41bb5930f23d5e7571769dd 100644 (file)
@@ -29,6 +29,7 @@ List requires a subcommand, e.g. hugo list drafts
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 59846733d8305eb48b22f2cb7b24d406ed8763c5..e0f1efdcbba3f35030943d705d769a6059f1a8b1 100644 (file)
@@ -31,6 +31,7 @@ hugo list all [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 5f3bcd617427d9f5cc306c73a6abf3c431f5583c..25ddc78d3af322fb679ba13d3fcde6a5aa6bc266 100644 (file)
@@ -31,6 +31,7 @@ hugo list drafts [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index c010d1159ab3bf7ecaa36c79e116e79236938742..1936b99203b0eebe38d96254ae6222ea956ca8bc 100644 (file)
@@ -31,6 +31,7 @@ hugo list expired [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 888784dcd87d7ca2db21d0bd47a835b87d5b9378..3152639c2facaf6fe5abef0f5ce975abe7246a97 100644 (file)
@@ -31,6 +31,7 @@ hugo list future [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index b8ec0e7b22fe56f6ac03421801f398ceab51f8df..a7a08c7b4f3cbfec0782edfe3b74da42132ea0ca 100644 (file)
@@ -31,6 +31,7 @@ hugo list published [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 2c07b89cfbabd2e164a5fc1726d93d8050cc3135..c037be6daffc5474d494f0fb85b05ab2086a4346 100644 (file)
@@ -38,6 +38,7 @@ See https://gohugo.io/hugo-modules/ for more information.
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 7df51059fb414ae80b3e92723da5645125d7c2be..6f49284b7e0168c24f85ae50531cc02fa692ea9e 100644 (file)
@@ -38,6 +38,7 @@ hugo mod clean [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index f4ca6069a7eaf7aa64a4caa9e35d9497979c159a..08e1e5c840ba5fd34e41ad04b5eb4a7011745622 100644 (file)
@@ -62,6 +62,7 @@ hugo mod get [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 5b5a14d5d2b3c44565793a69dc4f2e26fd1b6d52..b7bfc6bfed1bd5d5b1f94ae819a628db7f73fc75 100644 (file)
@@ -39,6 +39,7 @@ hugo mod graph [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index bf9651b598bdd0abec67ef5de2f22804b72ce135..0d9f1fd4e985811cbe0cc893764f020eb3a63167 100644 (file)
@@ -43,6 +43,7 @@ hugo mod init [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index a013fb91fd8ee81eaec107ae4b030977811719b7..4c6b0c6a7a193f0895fa9f79431fb62aea0abf30 100644 (file)
@@ -31,6 +31,7 @@ hugo mod npm [command] [flags]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 8f8738280a7351feec5c8ffbac42039cd341d0ba..ffbf0703e874f100799e6a20b112a2f9b5108437 100644 (file)
@@ -46,6 +46,7 @@ hugo mod npm pack [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index c15ddb3c85ba045345f15e07e5c7a6e2ba2acf05..cff19213039bf1041434129458beab441e2bf2f0 100644 (file)
@@ -32,6 +32,7 @@ hugo mod tidy [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index ae112a36a7ac5987ca55dae3a4c53f1625a24cc8..2b812e4c4c8c4e970e8905d34487faa99b03927a 100644 (file)
@@ -38,6 +38,7 @@ hugo mod vendor [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 63dd28ce82a8b20c1560b9eb629c4c642439dd33..051477c902d37be8fc603fb1e3b86c4d7a699a54 100644 (file)
@@ -37,6 +37,7 @@ hugo mod verify [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 4d3021b44b336821f02d9bb93c23407e2284113c..2788ef16888ef79b8a63e40a6641e74e365a1947 100644 (file)
@@ -34,6 +34,7 @@ Ensure you run this within the root directory of your site.
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index a8d2100f9bda642efc4d91d54b97234fc85f52ea..9624e9a61b8f868dd2c3d85aeb5be7053ffad93e 100644 (file)
@@ -46,6 +46,7 @@ hugo new content [path] [flags]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index cc0e630132d10499c824c5aed2db7bd5adb6f97e..0f0096ae4940398a752095dd347a0215288c42d0 100644 (file)
@@ -35,6 +35,7 @@ hugo new site [path] [flags]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index a79978c4ab62b2cd4f8b0d3dfdfd4d0b5a5e43ca..b1c937bae260b4be3ee871f5277e26c0321d915c 100644 (file)
@@ -34,6 +34,7 @@ hugo new theme [name] [flags]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index a1c77d36f7977c3577cc3b791a68376d3673e174..4ab161f8fac127c25dfe7437b12260445a3bb553 100644 (file)
@@ -50,7 +50,6 @@ hugo server [command] [flags]
       --liveReloadPort int       port for live reloading (i.e. 443 in HTTPS proxy situations) (default -1)
       --minify                   minify any supported output format (HTML, XML etc.)
   -N, --navigateToChanged        navigate to changed content file on live browser reload
-      --noBuildLock              don't create .hugo_build.lock file
       --noChmod                  don't sync permission mode of files
       --noHTTPCache              prevent HTTP caching
       --noTimes                  don't sync modification time of files
@@ -85,6 +84,7 @@ hugo server [command] [flags]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index 1a904e8453eb6a343e5e2b64bb53b0ebb3225b87..9d24e78e308d6e689ec5b12f8a80058443193c39 100644 (file)
@@ -28,6 +28,7 @@ hugo server trust [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index b1a6b971e1068c04eca3bee3e9a0fc1686f5a475..14cc92a00b8ef6e8c60257c1bceedd9ade635b51 100644 (file)
@@ -31,6 +31,7 @@ hugo version [flags] [args]
   -e, --environment string         build environment
       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
       --logLevel string            log level (debug|info|warn|error)
+      --noBuildLock                don't create .hugo_build.lock file
       --quiet                      build in quiet mode
   -M, --renderToMemory             render to memory (mostly useful when running the server)
   -s, --source string              filesystem path to read files relative from
index acf101fda15d35e68cfe16e92c0f3c9552350f2c..30747258c02c786ab9eaf226ca983165d2cd2e42 100644 (file)
@@ -15,7 +15,7 @@ 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.
+A content file consists of [front matter](g) and markup. The markup is typically Markdown, but Hugo also supports other [content formats](g). 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:
 
@@ -25,7 +25,7 @@ date = '{{ .Date }}'
 draft = true
 {{< /code-toggle >}}
 
-When you create new content, Hugo evaluates the [template actions] within the archetype. For example:
+When you create new content, Hugo evaluates the [template actions](g) within the archetype. For example:
 
 ```sh
 hugo new content posts/my-first-post.md
@@ -39,7 +39,7 @@ 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:
+You can create an archetype for one or more [content types](g). For example, use one archetype for posts, and use the default archetype for everything else:
 
 ```text
 archetypes/
@@ -59,18 +59,18 @@ 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
+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.
+You can use any template [function](g) 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 [context]:
+Archetypes receive the following [context](g):
 
 Date
 : (`string`) The current date and time, formatted in compliance with RFC3339.
@@ -79,9 +79,7 @@ File
 : (`hugolib.fileInfo`) Returns file information for the current page. See [details](/methods/page/file).
 
 Type
-: (`string`) The [content type] inferred from the top-level directory name, or as specified by the `--kind` flag passed to the `hugo new content` command.
-
-[content type]: /getting-started/glossary#content-type
+: (`string`) The [content type](g) inferred from the top-level directory name, or as specified by the `--kind` flag passed to the `hugo new content` command.
 
 Site
 : (`page.Site`) The current site object. See [details](/methods/site/).
@@ -130,11 +128,11 @@ One or more practical examples, each within a fenced code block.
 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.
+Although you can include [template actions](g) 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](g) where Hugo evaluates the actions every time you [build](g) the site.
 
 ## Leaf bundles
 
-You can also create archetypes for [leaf bundles](/getting-started/glossary/#leaf-bundle).
+You can also create archetypes for [leaf bundles](g).
 
 For example, in a photography site you might have a section (content type) for galleries. Each gallery is leaf bundle with content and images.
 
@@ -193,11 +191,3 @@ 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 a279fb651f8d19acb0d253f2c17d2059bd91e15c..e7846245530f18b6137578c788e1e81352f24af5 100644 (file)
@@ -21,7 +21,6 @@ publishResources = true
 render = 'always'
 {{< /code-toggle >}}
 
-
 list
 : When to include the page within page collections. Specify one of:
   
@@ -115,7 +114,7 @@ public/
 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.
+1. 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
 
@@ -181,7 +180,7 @@ public/
 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.
+1. 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
 
index a88bdba5f17b3c5d0af3056b1925d0b1034105be..369e91a1240183e71b334236d50414762efbd06d 100644 (file)
@@ -17,7 +17,7 @@ toc: true
 
 A content adapter is a template that dynamically creates pages when building a site. For example, use a content adapter to create pages from a remote data source such as JSON, TOML, YAML, or XML.
 
-Unlike templates that reside in the layouts directory, content adapters reside in the content directory, no more than one per directory per language. When a content adapter creates a page, the page's [logical path] will be relative to the content adapter.
+Unlike templates that reside in the `layouts` directory, content adapters reside in the `content` directory, no more than one per directory per language. When a content adapter creates a page, the page's [logical path](g) will be relative to the content adapter.
 
 ```text
 content/
@@ -33,7 +33,7 @@ content/
     └── _index.md
 ```
 
-Each content adapter is named _content.gotmpl and uses the same [syntax] as templates in the layouts directory. You can use any of the [template functions] within a content adapter, as well as the methods described below.
+Each content adapter is named _content.gotmpl and uses the same [syntax] as templates in the `layouts` directory. You can use any of the [template functions] within a content adapter, as well as the methods described below.
 
 ## Methods
 
@@ -137,9 +137,8 @@ Key|Description|Required
 `dates.expiryDate`|The page expiry date as a `time.Time` value.|&nbsp;
 `dates.lastmod`|The page last modification date as a `time.Time` value.|&nbsp;
 `dates.publishDate`|The page publication date as a `time.Time` value.|&nbsp;
-`kind`|The [page kind]. Default is `page`.|&nbsp;
 `params`|A map of page parameters.|&nbsp;
-`path`|The page's [logical path] relative to the content adapter. Do not include a leading slash or file extension.|:heavy_check_mark:
+`path`|The page's [logical path](g) relative to the content adapter. Do not include a leading slash or file extension.|:heavy_check_mark:
 `title`|The page title.|&nbsp;
 
 {{% note %}}
@@ -158,7 +157,7 @@ Key|Description|Required
 `content.value`|The content value as a string or resource.|:heavy_check_mark:
 `name`|The resource name.|&nbsp;
 `params`|A map of resource parameters.|&nbsp;
-`path`|The resources's [logical path] relative to the content adapter. Do not include a leading slash.|:heavy_check_mark:
+`path`|The resources's [logical path](g) relative to the content adapter. Do not include a leading slash.|:heavy_check_mark:
 `title`|The resource title.|&nbsp;
 
 {{% note %}}
@@ -193,14 +192,14 @@ Step 3
 {{/* Get remote data. */}}
 {{ $data := dict }}
 {{ $url := "https://gohugo.io/shared/examples/data/books.json" }}
-{{ with resources.GetRemote $url }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "Unable to get remote resource %s: %s" $url . }}
-  {{ else }}
+  {{ else with .Value }}
     {{ $data = . | transform.Unmarshal }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %s" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %s" $url }}
 {{ end }}
 
 {{/* Add pages and page resources. */}}
@@ -223,10 +222,10 @@ Step 3
   {{/* Add page resource. */}}
   {{ $item := . }}
   {{ with $url := $item.cover }}
-    {{ with resources.GetRemote $url }}
+    {{ with try (resources.GetRemote $url) }}
       {{ with .Err }}
         {{ errorf "Unable to get remote resource %s: %s" $url . }}
-      {{ else }}
+      {{ else with .Value }}
         {{ $content := dict "mediaType" .MediaType.Type "value" .Content }}
         {{ $params := dict "alt" $item.title }}
         {{ $resource := dict
@@ -235,9 +234,9 @@ Step 3
           "path" (printf "%s/cover.%s" $item.title .MediaType.SubType)
         }}
         {{ $.AddResource $resource }}
+      {{ else }}
+        {{ errorf "Unable to get remote resource %s" $url }}
       {{ end }}
-    {{ else }}
-      {{ errorf "Unable to get remote resource %s" $url }}
     {{ end }}
   {{ end }}
 
@@ -281,7 +280,7 @@ Step 4
 With multilingual sites you can:
 
 1. Create one content adapter for all languages using the [`EnableAllLanguages`](#enablealllanguages) method as described above.
-2. Create content adapters unique to each language. See the examples below.
+1. Create content adapters unique to each language. See the examples below.
 
 ### Translations by file name
 
@@ -352,8 +351,6 @@ To detect page collisions, use the `--printPathWarnings` flag when building your
 
 [content formats]: /content-management/formats/#classification
 [front matter field]: /content-management/front-matter/#fields
-[logical path]: /getting-started/glossary/#logical-path
 [media type]: https://en.wikipedia.org/wiki/Media_type
-[page kind]: /getting-started/glossary/#page-kind
 [syntax]: /templates/introduction/
 [template functions]: /functions/
index 124a3bf06ac45cc46736ea66e85b96a65a62c23a..56f4c39e184bd26cb9e2594f85975ee1488b0a7b 100644 (file)
@@ -49,7 +49,7 @@ The pages can be referenced as follows:
 {{</* 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:
+`index.md` can be reference either by its path or by its containing directory without the ending `/`. `_index.md` can be referenced only by its containing directory:
 
 ```text
 {{</* ref "/about" */>}}             <-- References /about/_index.md
index c009fb7f3a3e5e2489ffc1e5c548c9ac80d7cf69..1237e4f4d5ec983973e1d33038ef8aeb5c15a8d6 100644 (file)
@@ -12,21 +12,15 @@ toc: true
 aliases: [/extras/datafiles/,/extras/datadrivencontent/,/doc/datafiles/,/templates/data-templates/]
 ---
 
-Hugo can access and [unmarshal] local and remote data sources including CSV, JSON, TOML, YAML, and XML. Use this data to augment existing content or to create new content.
+Hugo can access and [unmarshal](g) local and remote data sources including CSV, JSON, TOML, YAML, and XML. Use this data to augment existing content or to create new content.
 
-[unmarshal]: /getting-started/glossary/#unmarshal
-
-A data source might be a file in the data directory, 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
+A data source might be a file in the `data` directory, a [global resource](g), a [page resource](g), or a [remote resource](g).
 
 ## Data directory
 
-The data directory in the root of your project may contain one or more data files, in either a flat or nested tree. Hugo merges the data files to create a single data structure, accessible with the `Data` method on a `Site` object.
+The `data` directory in the root of your project may contain one or more data files, in either a flat or nested tree. Hugo merges the data files to create a single data structure, accessible with the `Data` method on a `Site` object.
 
-Hugo also merges data directories from themes and modules into this single data structure, where the data directory in the root of your project takes precedence.
+Hugo also merges data directories from themes and modules into this single data structure, where the `data` directory in the root of your project takes precedence.
 
 {{% note %}}
 Hugo reads the combined data structure into memory and keeps it there for the entire build. For data that is infrequently accessed, use global or page resources instead.
@@ -42,7 +36,7 @@ project/
 ```
 
 {{% note %}}
-Do not place CSV files in the data directory. Access CSV files as page, global, or remote resources.
+Do not place CSV files in the `data` directory. Access CSV files as page, global, or remote resources.
 {{% /note %}}
 
 See the documentation for the [`Data`] method on a `Site` object for details and examples.
index 1132c888c2568a18903fcb2b0a266f7d39c4cc4c..a02aa2545745ebfc1b3800775358c1cd44361097 100644 (file)
@@ -29,7 +29,10 @@ content/
 
 Regardless of content format, all content must have [front matter], preferably including both `title` and `date`.
 
-Hugo selects the content renderer based on the `markup` identifier in front matter, falling back to the file extension. See the [classification](#classification) table below for a list of markup identifiers and recognized file extensions.
+Hugo selects the content renderer based on the `markup` identifier in front matter, falling back to the file extension. See the [classification] table below for a list of markup identifiers and recognized file extensions.
+
+[classification]: #classification
+[front matter]: /content-management/front-matter/
 
 ## Formats
 
@@ -37,7 +40,7 @@ Hugo selects the content renderer based on the `markup` identifier in front matt
 
 Create your content in [Markdown] preceded by front matter.
 
-Markdown is Hugo's default content format. Hugo natively renders Markdown to HTML using [Goldmark]. Goldmark is fast and conforms to the [CommonMark] and [GitHub Flavored Markdown] specifications. You can [configure Goldmark] in your site configuration.
+Markdown is Hugo's default content format. Hugo natively renders Markdown to HTML using [Goldmark]. Goldmark is fast and conforms to the [CommonMark] and [GitHub Flavored Markdown] specifications. You can configure Goldmark in your [site configuration][configure goldmark].
 
 Hugo provides custom Markdown features including:
 
@@ -48,24 +51,39 @@ Hugo provides custom Markdown features including:
 : Leverage the embedded Markdown extensions to create tables, definition lists, footnotes, task lists, inserted text, mark text, subscripts, superscripts, and more.
 
 [Mathematics]
-: Include mathematical equations and expressions in Markdown using LaTeX or TeX typesetting syntax.
+: Include mathematical equations and expressions in Markdown using LaTeX markup.
 
 [Render hooks]
 : Override the conversion of Markdown to HTML when rendering fenced code blocks, headings, images, and links. For example, render every standalone image as an HTML `figure` element.
 
+[Attributes]: /content-management/markdown-attributes/
+[CommonMark]: https://spec.commonmark.org/current/
+[Extensions]: /getting-started/configuration-markup/#goldmark-extensions
+[GitHub Flavored Markdown]: https://github.github.com/gfm/
+[Goldmark]: https://github.com/yuin/goldmark
+[Markdown]: https://daringfireball.net/projects/markdown/
+[Mathematics]: /content-management/mathematics/
+[Render hooks]: /render-hooks/introduction/
+[configure goldmark]: /getting-started/configuration-markup/#goldmark
+
 ### HTML
 
 Create your content in [HTML] preceded by front matter. The content is typically what you would place within an HTML document's `body` or `main` element.
 
+[HTML]: https://developer.mozilla.org/en-US/docs/Learn_web_development/Getting_started/Your_first_website/Creating_the_content
+
 ### Emacs Org Mode
 
-Create your content in the [Emacs Org Mode] format preceded by front matter. You can use Org Mode keywords for front matter. See [details](/content-management/front-matter/#emacs-org-mode).
+Create your content in the [Emacs Org Mode] format preceded by front matter. You can use Org Mode keywords for front matter. See [details].
+
+[details]: /content-management/front-matter/#emacs-org-mode
+[Emacs Org Mode]: https://orgmode.org/
 
 ### AsciiDoc
 
 Create your content in the [AsciiDoc] format preceded by front matter. Hugo renders AsciiDoc content to HTML using the Asciidoctor executable. You must install Asciidoctor and its dependencies (Ruby) to use the AsciiDoc content format.
 
-You can [configure the AsciiDoc renderer] in your site configuration.
+You can configure the AsciiDoc renderer in your [site configuration][configure asciidoc].
 
 In its default configuration, Hugo passes these CLI flags when calling the Asciidoctor executable:
 
@@ -79,6 +97,10 @@ The CLI flags passed to the Asciidoctor executable depend on configuration. You
 hugo --logLevel info
 ```
 
+[AsciiDoc]: https://asciidoc.org/
+[configure the AsciiDoc renderer]: /getting-started/configuration-markup/#asciidoc
+[configure asciidoc]: /getting-started/configuration-markup/#asciidoc
+
 ### Pandoc
 
 Create your content in the [Pandoc] format preceded by front matter. Hugo renders Pandoc content to HTML using the Pandoc executable. You must install Pandoc to use the Pandoc content format.
@@ -89,6 +111,8 @@ Hugo passes these CLI flags when calling the Pandoc executable:
 --mathjax
 ```
 
+[Pandoc]: https://pandoc.org/
+
 ### reStructuredText
 
 Create your content in the [reStructuredText] format preceded by front matter. Hugo renders reStructuredText content to HTML using [Docutils], specifically rst2html. You must install Docutils and its dependencies (Python) to use the reStructuredText content format.
@@ -99,6 +123,9 @@ Hugo passes these CLI flags when calling the rst2html executable:
 --leave-comments --initial-header-level=2
 ```
 
+[Docutils]: https://docutils.sourceforge.io/
+[reStructuredText]: https://docutils.sourceforge.io/rst.html
+
 ## Classification
 
 Content format|Media type|Identifier|File extensions
@@ -116,22 +143,3 @@ When converting content to HTML, Hugo uses:
 - External renderers for AsciiDoc, Pandoc, and reStructuredText
 
 Native renderers are faster than external renderers.
-
-[AsciiDoc]: https://asciidoc.org/
-[Asciidoctor]: https://asciidoctor.org/
-[Attributes]: /content-management/markdown-attributes/
-[CommonMark]: https://spec.commonmark.org/current/
-[Docutils]: https://docutils.sourceforge.io/
-[Emacs Org Mode]: https://orgmode.org/
-[Extensions]: /getting-started/configuration-markup/#goldmark-extensions
-[GitHub Flavored Markdown]: https://github.github.com/gfm/
-[Goldmark]: https://github.com/yuin/goldmark
-[HTML]: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/HTML_basics
-[Markdown]: https://daringfireball.net/projects/markdown/
-[Mathematics]: /content-management/mathematics/
-[Pandoc]: https://pandoc.org/
-[Render hooks]: https://gohugo.io/render-hooks/introduction/
-[configure Goldmark]: /getting-started/configuration-markup/#goldmark
-[configure the AsciiDoc renderer]: /getting-started/configuration-markup/#asciidoc
-[front matter]: /content-management/front-matter/
-[reStructuredText]: https://docutils.sourceforge.io/rst.html
index 5cbf645a5b1883c82685c0dd873c9d1fd59351a6..dba77f1d1e291a8a81ac1f68219f43088ec04bb5 100644 (file)
@@ -39,15 +39,7 @@ weight = 10
 author = 'John Smith'
 {{< /code-toggle >}}
 
-Front matter fields may be [boolean], [integer], [float], [string], [arrays], or [maps]. Note that the TOML format also supports unquoted date/time values.
-
-[scalar]: /getting-started/glossary/#scalar
-[arrays]: /getting-started/glossary/#array
-[maps]: /getting-started/glossary/#map
-[boolean]: /getting-started/glossary/#boolean
-[integer]: /getting-started/glossary/#integer
-[float]: /getting-started/glossary/#float
-[string]: /getting-started/glossary/#string
+Front matter fields may be [boolean](g), [integer](g), [float](g), [string](g), [arrays](g), or [maps](g). Note that the TOML format also supports unquoted date/time values.
 
 ## Fields
 
@@ -82,7 +74,6 @@ The field names below are reserved. For example, you cannot create a custom fiel
 
 (`string`) The date associated with the page, typically the creation date. Note that the TOML format also supports unquoted date/time values. See the [dates](#dates) section for examples. Access this value from a template using the [`Date`] method on a `Page` object.
 
-
 [`date`]: /methods/page/date/
 
 ###### description
@@ -113,22 +104,19 @@ If `true`, the page will not be rendered unless you pass the `--buildDrafts` fla
 
 ###### isCJKLanguage
 
-(`bool`) Set to `true` if the content language is in the [CJK] family. This value determines how Hugo calculates word count, and affects the values returned by the [`WordCount`], [`FuzzyWordCount`], [`ReadingTime`], and [`Summary`] methods on a `Page` object.
+(`bool`) Set to `true` if the content language is in the [CJK](g) family. This value determines how Hugo calculates word count, and affects the values returned by the [`WordCount`], [`FuzzyWordCount`], [`ReadingTime`], and [`Summary`] methods on a `Page` object.
 
 [`fuzzywordcount`]: /methods/page/wordcount/
 [`readingtime`]: /methods/page/readingtime/
 [`summary`]: /methods/page/summary/
 [`wordcount`]: /methods/page/wordcount/
-[cjk]: /getting-started/glossary/#cjk
 
 ###### keywords
 
-(`string array`) An array of keywords, typically rendered within a `meta` element within the `head` element of the published HTML file, or used as a [taxonomy] to classify content. Access these values from a template using the [`Keywords`] method on a `Page` object.
+(`string array`) An array of keywords, typically rendered within a `meta` element within the `head` element of the published HTML file, or used as a [taxonomy](g) to classify content. Access these values from a template using the [`Keywords`] method on a `Page` object.
 
 [`keywords`]: /methods/page/keywords/
-[taxonomy]: /getting-started/glossary/#taxonomy
 
-{{% comment %}}
 <!-- Added in v0.123.0 but purposefully omitted from documentation. -->
 <!--
 kind
@@ -140,7 +128,6 @@ kind
 lang
 : The language code for this page. This is usually derived from the module mount or filename.
 -->
-{{% /comment %}}
 
 ###### lastmod
 
@@ -154,7 +141,7 @@ lang
 
 [`layout`]: /methods/page/layout/
 [template lookup order]: /templates/lookup-order/
-[target a specific template]: templates/lookup-order/#target-a-template
+[target a specific template]: /templates/lookup-order/#target-a-template
 
 ###### linkTitle
 
@@ -184,13 +171,11 @@ Alias to [lastmod](#lastmod).
 
 [output formats]: /templates/output-formats/
 
-{{% comment %}}
 <!-- Added in v0.123.0 but purposefully omitted from documentation. -->
 <!--
 path
 : The canonical page path.
 -->
-{{% /comment %}}
 
 ###### params
 
@@ -254,9 +239,8 @@ Alias to [publishDate](#publishdate).
 
 ###### type
 
-(`string`) The [content type], overriding the value derived from the top level section in which the page resides. Access this value from a template using the [`Type`] method on a `Page` object.
+(`string`) The [content type](g), overriding the value derived from the top level section in which the page resides. Access this value from a template using the [`Type`] method on a `Page` object.
 
-[content type]: /getting-started/glossary/#content-type
 [`type`]: /methods/page/type/
 
 ###### unpublishdate
@@ -268,10 +252,8 @@ Alias to [expirydate](#expirydate).
 (`string`) Overrides the entire URL path. Applicable to regular pages and section pages. See the [URL management] page for details.
 
 ###### weight
-(`int`) The page [weight], used to order the page within a [page collection]. Access this value from a template using the [`Weight`] method on a `Page` object.
+(`int`) The page [weight](g), used to order the page within a [page collection](g). Access this value from a template using the [`Weight`] method on a `Page` object.
 
-[page collection]: /getting-started/glossary/#page-collection
-[weight]: /getting-started/glossary/#weight
 [`weight`]: /methods/page/weight/
 
 ## Parameters
@@ -302,7 +284,7 @@ Parameter|Data type|Used by these embedded templates
 `images`|`[]string`|[`opengraph.html`], [`schema.html`], [`twitter_cards.html`]
 `videos`|`[]string`|[`opengraph.html`]
 
-The embedded templates will skip a parameter if not provided in front matter, but will throw an error if the data type is unexpected. 
+The embedded templates will skip a parameter if not provided in front matter, but will throw an error if the data type is unexpected.
 
 [`opengraph.html`]: {{% eturl opengraph %}}
 [`schema.html`]: {{% eturl schema %}}
@@ -332,7 +314,7 @@ genres = ['mystery','romance']
 author = 'John Smith'
 {{< /code-toggle >}}
 
-You can add taxonomy terms to the front matter of any these [page kinds]:
+You can add taxonomy terms to the front matter of any these [page kinds](g):
 
 - `home`
 - `page`
@@ -340,8 +322,6 @@ You can add taxonomy terms to the front matter of any these [page kinds]:
 - `taxonomy`
 - `term`
 
-[page kinds]: /getting-started/glossary/#page-kind
-
 Access taxonomy terms from a template using the [`Params`] or [`GetTerms`] method on a `Page` object. For example:
 
 {{< code file=layouts/_default/single.html >}}
@@ -360,9 +340,7 @@ Access taxonomy terms from a template using the [`Params`] or [`GetTerms`] metho
 
 ## Cascade
 
-Any [node] can pass down to its descendants a set of front matter values.
-
-[node]: /getting-started/glossary/#node
+Any [node](g) can pass down to its descendants a set of front matter values.
 
 ### Target specific pages
 
@@ -459,5 +437,5 @@ When populating a date field, whether a [custom page parameter](#parameters) or
 To override the default time zone, set the [`timeZone`](https://gohugo.io/getting-started/configuration/#timezone) in your site configuration. The order of precedence for determining the time zone is:
 
 1. The time zone offset in the date/time string
-2. The time zone specified in your site configuration
-3. The `Etc/UTC` time zone
+1. The time zone specified in your site configuration
+1. The `Etc/UTC` time zone
index 841f12863678cb4e37afe82b872eae4302166ab7..69ee30dc8a6c9631e17b9b57f7571add011ac447 100644 (file)
@@ -88,15 +88,15 @@ Example 3: A more concise way to skip image rendering if the resource is not fou
 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 }}
+{{ $url := "https://gohugo.io/img/hugo-logo.png" }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $u }}
 {{ end }}
 ```
 
@@ -482,7 +482,7 @@ To control tag availability, change the `excludeFields` or `includeFields` setti
 
 ## 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.
+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:
 
@@ -500,15 +500,14 @@ If you change image processing methods or options, or if you rename or remove im
 hugo --gc
 ```
 
-
 [`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/filter/#image-filters
-[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>
+[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
index 9c62c4fba3a0401328112fb99b149e0704dbe854..a465f244d0e5d4b8f6992adc8b74b741e08ee3ab 100644 (file)
@@ -45,7 +45,6 @@ title = true # default is true
 block = true # default is false
 {{< /code-toggle >}}
 
-
 ## Standalone images
 
 By default, when the [Goldmark] Markdown renderer encounters a standalone image element (no other elements or text on the same line), it wraps the image element within a paragraph element per the [CommonMark specification].
index 3212fe251c16d76eafc9137f1ceb695d5f3a2226..5eda9ffa32c9fbafdf0cad64e9ab373e116821aa 100644 (file)
@@ -1,9 +1,9 @@
 ---
 title: Mathematics in Markdown
 linkTitle: Mathematics
-description: Include mathematical equations and expressions in your Markdown using LaTeX or TeX typesetting syntax.
+description: Include mathematical equations and expressions in Markdown using LaTeX markup.
 categories: [content management]
-keywords: [chemical,chemistry,latex,math,mathjax,tex,typesetting]
+keywords: [katex,latex,math,mathjax,typesetting]
 menu:
   docs:
     parent: content-management
@@ -15,37 +15,45 @@ math: true
 
 {{< new-in 0.122.0 >}}
 
+## Overview
+
+Mathematical equations and expressions written in [LaTeX] are common in academic and scientific publications. Your browser typically renders this mathematical markup using an open-source JavaScript display engine such as [MathJax] or [KaTeX].
+
+For example, with this LaTeX markup:
+
+```text
 \[
 \begin{aligned}
 KL(\hat{y} || y) &= \sum_{c=1}^{M}\hat{y}_c \log{\frac{\hat{y}_c}{y_c}} \\
 JS(\hat{y} || y) &= \frac{1}{2}(KL(y||\frac{y+\hat{y}}{2}) + KL(\hat{y}||\frac{y+\hat{y}}{2}))
 \end{aligned}
 \]
+```
 
-## Overview
-
-Mathematical equations and expressions authored in [LaTeX] or [TeX] are common in academic and scientific publications. Your browser typically renders this mathematical markup using an open-source JavaScript display engine such as [MathJax] or [KaTeX].
-
-For example, this is the mathematical markup for the equations displayed at the top of this page:
+The MathJax display engine renders this:
 
-```text
 \[
 \begin{aligned}
 KL(\hat{y} || y) &= \sum_{c=1}^{M}\hat{y}_c \log{\frac{\hat{y}_c}{y_c}} \\
 JS(\hat{y} || y) &= \frac{1}{2}(KL(y||\frac{y+\hat{y}}{2}) + KL(\hat{y}||\frac{y+\hat{y}}{2}))
 \end{aligned}
 \]
-```
 
 Equations and expressions can be displayed inline with other text, or as standalone blocks. Block presentation is also known as "display" mode.
 
-Whether an equation or expression appears inline, or as a block, depends on the delimiters that surround the mathematical markup. Delimiters are defined in pairs, where each pair consists of an opening and closing delimiter. The opening and closing delimiters may be the same, or different. Common delimiter pairs are shown in [Step 1].
+Whether an equation or expression appears inline, or as a block, depends on the delimiters that surround the mathematical markup. Delimiters are defined in pairs, where each pair consists of an opening and closing delimiter. The opening and closing delimiters may be the same, or different.
 
-The approach described below avoids reliance on platform-specific features like shortcodes or code block render hooks. Instead, it utilizes a standardized markup format for mathematical equations and expressions, compatible with the rendering engines used by GitHub, GitLab, [Microsoft VS Code], [Obsidian], [Typora], and others.
+{{% note %}}
+You can configure Hugo to render mathematical markup on the client-side using the MathJax or KaTeX display engine, or you can render the markup while building your site with the [`transform.ToMath`]function.
+
+The first approach is described below.
+
+[`transform.ToMath`]: /functions/transform/tomath/
+{{% /note %}}
 
 ## Setup
 
-Follow these instructions to include mathematical equations and expressions in your Markdown using LaTeX or TeX typesetting syntax.
+Follow these instructions to include mathematical equations and expressions in your Markdown using LaTeX markup.
 
 ###### Step 1
 
@@ -122,7 +130,7 @@ The example above loads the partial template if you have set the `math` paramete
 
 ###### Step 4
 
-Include mathematical equations and expressions in your Markdown using LaTeX or TeX typesetting syntax.
+Include mathematical equations and expressions in Markdown using LaTeX markup.
 
 {{< code file=content/math-examples.md copy=true >}}
 This is an inline \(a^*=x-b^*\) equation.
@@ -173,7 +181,7 @@ If you use the `$...$` delimiter pair for inline equations, and occasionally use
 
 ## Engines
 
-MathJax and KaTeX are open-source JavaScript display engines. Both engines are fast, but at the time of this writing MathJax v3.2.2 is slightly faster than KaTeX v0.16.9.
+MathJax and KaTeX are open-source JavaScript display engines. Both engines are fast, but at the time of this writing MathJax v3.2.2 is slightly faster than KaTeX v0.16.11.
 
 {{% note %}}
 If you use the `$...$` delimiter pair for inline equations, and occasionally use the&nbsp;`$`&nbsp;symbol outside of math contexts, you must use MathJax instead of KaTeX to avoid unintended formatting caused by [this KaTeX limitation](https://github.com/KaTeX/KaTeX/issues/437).
@@ -184,9 +192,9 @@ See the [inline delimiters](#inline-delimiters) section for details.
 To use KaTeX instead of MathJax, replace the partial template from [Step 2] with this:
 
 {{< code file=layouts/partials/math.html copy=true >}}
-<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
-<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
-<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"></script>
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"></script>
 <script>
   document.addEventListener("DOMContentLoaded", function() {
     renderMathInElement(document.body, {
@@ -218,11 +226,7 @@ As shown in [Step 2] above, MathJax supports chemical equations without addition
 [KaTeX]: https://katex.org/
 [LaTeX]: https://www.latex-project.org/
 [MathJax]: https://www.mathjax.org/
-[Microsoft VS Code]: https://code.visualstudio.com/
-[Obsidian]: https://obsidian.md/
 [Step 1]: #step-1
 [Step 2]: #step-2
 [Step 3]: #step-3
-[TeX]: https://en.wikipedia.org/wiki/TeX
-[Typora]: https://typora.io/
-[passthrough extension]: https://github.com/gohugoio/hugo-goldmark-extensions
+[passthrough extension]: /getting-started/configuration-markup/#passthrough
index ff2011d3df365fd025b6850bf7854c3409482454..15cf505eade3334679aaf202a02a60b9f8241f59 100644 (file)
@@ -17,8 +17,8 @@ aliases: [/extras/menus/]
 To create a menu for your site:
 
 1. Define the menu entries
-2. [Localize] each entry
-3. Render the menu with a [template]
+1. [Localize] each entry
+1. Render the menu with a [template]
 
 Create multiple menus, either flat or nested. For example, create a main menu for the header, and a separate menu for the footer.
 
@@ -34,7 +34,7 @@ Although you can use these methods in combination when defining a menu, the menu
 
 ## Define automatically
 
-To automatically define a menu entry for each top-level [section] of your site, enable the section pages menu in your site configuration.
+To automatically define a menu entry for each top-level [section](g) of your site, enable the section pages menu in your site configuration.
 
 {{< code-toggle file=hugo >}}
 sectionPagesMenu = "main"
@@ -229,5 +229,4 @@ See [menu templates].
 [localize]: /content-management/multilingual/#menus
 [menu templates]: /templates/menu/
 [multilingual]: /content-management/multilingual/#menus
-[section]: /getting-started/glossary/#section
 [template]: /templates/menu/
index 165b2402ee2b33edfd7031d5f740235c04a868fd..b37fbf94a5e9110697e2d3c5fb21e371f2987b36 100644 (file)
@@ -21,7 +21,6 @@ This is the default language configuration:
 
 In the above, `en` is the language key.
 
-
 Language keys must conform to the syntax described in [RFC 5646]. For example:
 
 - `en`
@@ -80,7 +79,7 @@ defaultContentLanguageInSubdir
 : (`bool`)  If `true`, Hugo renders the default language site in a subdirectory matching the `defaultContentLanguage`. Default is `false`.
 
 contentDir
-: (`string`) The content directory for this language. Omit if [translating by file name].
+: (`string`) The `content` directory for this language. Omit if [translating by file name].
 
 disabled
 : (`bool`) If `true`, Hugo will not render content for this language. Default is `false`.
@@ -110,34 +109,42 @@ weight
 [RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1
 [translating by file name]: #translation-by-file-name
 
-### Changes in Hugo 0.112.0
-
-{{< new-in 0.112.0 >}}
+### Site parameters
 
-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.
+Set language-specific site parameters under each language's `params` key:
 
 {{< code-toggle file=hugo >}}
-
-title = "My blog"
-languageCode = "en-us"
+[params]
+color = "red"
 
 [languages]
-[languages.sv]
-title = "Min blogg"
-languageCode = "sv"
-[languages.en.params]
-color = "blue"
+  [languages.de]
+    languageCode = 'de-DE'
+    title = 'Projekt Dokumentation'
+    weight = 1
+    [languages.de.params]
+      color = 'blue'
+      subtitle = 'Referenz, Tutorials und Erklärungen'
+  [languages.en]
+    languageCode = 'en-US'
+    title = 'Project Documentation'
+    weight = 2
+    [languages.en.params]
+      subtitle = 'Reference, Tutorials, and Explanations'
 {{< /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:
+When building the English site:
+
+```go-html-template
+{{ site.Params.color }} --> red
+{{ site.Params.subtitle }} --> Reference, Tutorials, and Explanations
+```
+
+When building the English site:
 
 ```go-html-template
-{{ site.Title }}
-{{ site.Language.LanguageCode }}
-{{ site.Params.color }}
+{{ site.Params.color }} --> blue
+{{ site.Params.subtitle }} --> 'Referenz, Tutorials und Erklärungen'
 ```
 
 ### Disable a language
@@ -165,7 +172,6 @@ Note that you cannot disable the default content language.
 
 ### Configure multilingual multihost
 
-
 Hugo supports multiple languages in a multihost configuration. This means you can configure a `baseURL` per `language`.
 
 {{% note %}}
@@ -217,7 +223,7 @@ There are two ways to manage your content translations. Both ensure each page is
 Considering the following example:
 
 1. `/content/about.en.md`
-2. `/content/about.fr.md`
+1. `/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.
@@ -232,7 +238,7 @@ If a file has no language code, it will be assigned the default language.
 
 ### 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.
+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=hugo >}}
 languages:
@@ -251,14 +257,14 @@ The value of `contentDir` can be any valid path -- even absolute path references
 Considering the following example in conjunction with the configuration above:
 
 1. `/content/english/about.md`
-2. `/content/french/about.md`
+1. `/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.
+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.
+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
 
@@ -267,8 +273,8 @@ Any pages sharing the same `translationKey` set in front matter will be linked a
 Considering the following example:
 
 1. `/content/about-us.en.md`
-2. `/content/om.nn.md`
-3. `/content/presentation/a-propos.fr.md`
+1. `/content/om.nn.md`
+1. `/content/presentation/a-propos.fr.md`
 
 {{< code-toggle >}}
 translationKey: "about"
index b83bb0ba574d1014ac83722b3a7d320c1fdf9320..3c5b3054b743562886d1805a3477a7a3ba6c82b7 100644 (file)
@@ -30,15 +30,13 @@ The "about" page is a page bundle. It logically associates a resource with conte
 Page bundles are either _leaf bundles_ or _branch bundles_.
 
 leaf bundle
-: A _leaf bundle_ is a directory that contains an index.md file and zero or more resources. Analogous to a physical leaf, a leaf bundle is at the end of a branch. It has no descendants.
+: A _leaf bundle_ is a directory that contains an `index.md` file and zero or more resources. Analogous to a physical leaf, a leaf bundle is at the end of a branch. It has no descendants.
 
 branch bundle
-: A _branch bundle_ is a directory that contains an _index.md file and zero or more resources. Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top level directories with or without _index.md files are also branch bundles. This includes the home page.
+: A _branch bundle_ is a directory that contains an `_index.md` file and zero or more resources. Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top level directories with or without `_index.md` files are also branch bundles. This includes the home page.
 
 {{% note %}}
-In the definitions above and the examples below, the extension of the index file depends on the [content format]. For example, use index.md for Markdown content, index.html for HTML content, index.adoc for AsciiDoc content, etc.
-
-[content format]: /getting-started/glossary/#content-format
+In the definitions above and the examples below, the extension of the index file depends on the [content format](g). For example, use `index.md` for Markdown content, `index.html` for HTML content, `index.adoc` for AsciiDoc content, etc.
 {{% /note %}}
 
 ## Comparison
@@ -47,13 +45,13 @@ Page bundle characteristics vary by bundle type.
 
 |                     | Leaf bundle                                             | Branch bundle                                           |
 |---------------------|---------------------------------------------------------|---------------------------------------------------------|
-| Index file          | index.md                                                | _index.md                                               |
-| Example             | content/about/index.md                                  | content/posts/_index.md                                 |
-| [Page kinds]        | `page`                                                  | `home`, `section`, `taxonomy`, or `term`                |
-| Template types       | [single]                                                | [home], [section], [taxonomy], or [term]           |
+| Index file          | `index.md`                                                | `_index.md`                                               |
+| Example             | `content/about/index.md`                                | `content/posts/_index.md   `                              |
+| [Page kinds](g)     | `page`                                                  | `home`, `section`, `taxonomy`, or `term`                |
+| Template types      | [single]                                                | [home], [section], [taxonomy], or [term]           |
 | Descendant pages    | None                                                    | Zero or more                                            |
 | Resource location   | Adjacent to the index file or in a nested subdirectory  | Same as a leaf bundles, but excludes descendant bundles |
-| [Resource types]    | `page`, `image`, `video`, etc.                          | all but `page`                                          |
+| [Resource types](g) | `page`, `image`, `video`, etc.                          | all but `page`                                          |
 
 [single]: /templates/types/#single
 [home]: /templates/types/#home
@@ -61,11 +59,11 @@ Page bundle characteristics vary by bundle type.
 [taxonomy]: /templates/types/#taxonomy
 [term]: /templates/types/#term
 
-Files with [resource type] `page` include content written in Markdown, HTML, AsciiDoc, Pandoc, reStructuredText, and Emacs Org Mode. In a leaf bundle, excluding the index file, these files are only accessible as page resources. In a branch bundle, these files are only accessible as content pages.
+Files with [resource type](g) `page` include content written in Markdown, HTML, AsciiDoc, Pandoc, reStructuredText, and Emacs Org Mode. In a leaf bundle, excluding the index file, these files are only accessible as page resources. In a branch bundle, these files are only accessible as content pages.
 
 ## Leaf bundles
 
-A _leaf bundle_ is a directory that contains an index.md file and zero or more resources. Analogous to a physical leaf, a leaf bundle is at the end of a branch. It has no descendants.
+A _leaf bundle_ is a directory that contains an `index.md` file and zero or more resources. Analogous to a physical leaf, a leaf bundle is at the end of a branch. It has no descendants.
 
 ```text
 content/
@@ -94,7 +92,7 @@ about
 : This leaf bundle does not contain any page resources.
 
 my-post
-: This leaf bundle contains an index file, two resources of [resource type] `page`, and two resources of resource type `image`.
+: This leaf bundle contains an index file, two resources of [resource type](g) `page`, and two resources of resource type `image`.
 
 - content-1, content-2
 
@@ -111,12 +109,12 @@ another-leaf-bundle
 : This leaf bundle does not contain any page resources.
 
 {{% note %}}
-Create leaf bundles at any depth within the content directory, but a leaf bundle may not contain another bundle. Leaf bundles do not have descendants.
+Create leaf bundles at any depth within the `content` directory, but a leaf bundle may not contain another bundle. Leaf bundles do not have descendants.
 {{% /note %}}
 
 ## Branch bundles
 
-A _branch bundle_ is a directory that contains an _index.md file and zero or more resources. Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top level directories with or without _index.md files are also branch bundles. This includes the home page.
+A _branch bundle_ is a directory that contains an `_index.md` file and zero or more resources. Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top level directories with or without `_index.md` files are also branch bundles. This includes the home page.
 
 ```text
 content/
@@ -139,23 +137,19 @@ home page
 : This branch bundle contains an index file, two descendant branch bundles, and no resources.
 
 branch-bundle-1
-:  This branch bundle contains an index file, two resources of [resource type] `page`, and two resources of resource type `image`.
+:  This branch bundle contains an index file, two resources of [resource type](g) `page`, and two resources of resource type `image`.
 
 branch-bundle-2
 : This branch bundle contains an index file and a leaf bundle.
 
 {{% note %}}
-Create branch bundles at any depth within the content directory, but a leaf bundle may not contain another bundle. Leaf bundles do not have descendants.
+Create branch bundles at any depth within the `content` directory, but a leaf bundle may not contain another bundle. Leaf bundles do not have descendants.
 {{% /note %}}
 
-
 ## Headless bundles
 
 Use [build options] in front matter to create an unpublished leaf or branch bundle whose content and resources you can include in other pages.
 
 [`Resources`]: /methods/page/resources/
-[build options]: content-management/build-options/
-[page kinds]: /getting-started/glossary/#page-kind
+[build options]: /content-management/build-options/
 [page resources]: /content-management/page-resources/
-[resource type]: /getting-started/glossary/#resource-type
-[resource types]: /getting-started/glossary/#resource-type
index 44b115a64ec63740e8ac8bd590a3f5bf3c22aa1b..6431d12a322f2f71da365dcfb21aeb273890865a 100644 (file)
@@ -42,9 +42,8 @@ namedSlices
 : (`slice`) The keywords to search for, expressed as a slice of `KeyValues` using the [`keyVals`] function.
 
 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.
+: (`slice`) A list of special keywords that is used for indices configured as type "fragments". This will match the [fragment](g) identifiers of the documents.
 
-[fragment]: /getting-started/glossary/#fragment
 [`keyVals`]: /functions/collections/keyvals/
 
 A fictional example using all of the above options:
@@ -65,8 +64,6 @@ We improved and simplified this feature in Hugo 0.111.0. Before this we had 3 di
 
 ## Index content headings in related content
 
-{{< 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:
 
 {{< code-toggle file=hugo >}}
@@ -82,7 +79,7 @@ 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:
+* 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 }}
@@ -140,16 +137,16 @@ toLower
 name
 : (`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.
 
-type {{< new-in 0.111.0 >}} 
+type
 : (`string`) One of `basic`(default) or `fragments`.
 
-applyFilter {{< new-in 0.111.0 >}}
+applyFilter
 : (`string`) Apply a `type` specific filter to the result of a search. This is currently only used for the `fragments` type.
 
 weight
 : (`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.
 
-cardinalityThreshold {{< new-in 0.111.0 >}}
+cardinalityThreshold
 : (`int`) If between 1 and 100, this is a percentage. All keywords that are used in more than this percentage of documents are removed. For example, setting this to `60` will remove all keywords that are used in more than 60% of the documents in the index. If `0`, no keyword is removed from the index. Default is `0`.
 
 pattern
@@ -157,22 +154,3 @@ pattern
 
 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 03655c90ae7047adab56e182e43529597b1841b1..c7954aadeff119b3854d99f15c86e1ce9ae0fc0b 100644 (file)
@@ -15,10 +15,10 @@ 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).
+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](g). Section templates receive one or more page [collections](g) in [context](g).
 
 {{% note %}}
-Although top-level directories without _index.md files are sections, we recommend creating _index.md files in _all_ sections.
+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:
@@ -92,15 +92,15 @@ With the file structure from the [example above](#overview):
 
 Content directory|Section 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/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 template
 :--|:--
-content/products|layouts/products/single.html
-content/products/product-1|layouts/products/single.html
-content/products/product-1/benefits|layouts/products/single.html
+`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.
 
index 47e4f94ed065b83f5bef6a98dc38d08daee810e4..cd1f2cb43d0c1ea441dcd967b91be48be23f8e17 100644 (file)
@@ -72,457 +72,7 @@ You can call shortcodes within other shortcodes by creating your own templates t
 
 ## Embedded shortcodes
 
-Use these embedded shortcodes as needed.
-
-### comment
-
-{{< new-in "0.137.1" >}}
-
-{{% note %}}
-To override Hugo's embedded `comment` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
-
-[source code]: {{% eturl comment %}}
-{{% /note %}}
-
-Use the `comment` shortcode to include comments in your Markdown. Hugo excludes the encapsulated text when rendering your site.
-
-Example usage:
-
-```text
-{{%/* comment */%}} TODO: rewrite the paragraph below. {{%/* /comment */%}}
-```
-
-Although you can call this shortcode using the `{{</* */>}}` notation, computationally it is more efficient to call it using the `{{%/* */%}}` notation as shown above.
-
-### details
-
-{{< new-in 0.140.0 >}}
-
-{{% note %}}
-To override Hugo's embedded `details` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
-
-[source code]: {{% eturl details %}}
-{{% /note %}}
-
-Use the `details` shortcode to create a `details` HTML element. For example:
-
-```text
-{{</* details summary="See the details" */>}}
-This is a **bold** word.
-{{</* /details */>}}
-```
-
-Hugo renders this to:
-
-```html
-<details>
-  <summary>See the details</summary>
-  <p>This is a <strong>bold</strong> word.</p>
-</details>
-```
-
-The details shortcode accepts these named arguments:
-
-summary
-: (`string`) The content of the child `summary` element rendered from Markdown to HTML. Default is `Details`.
-
-open
-: (`bool`) Whether to initially display the content of the `details` element. Default is `false`.
-
-class
-: (`string`) The value of the element's `class` attribute.
-
-name
-: (`string`) The value of the element's `name` attribute.
-
-title
-: (`string`) The value of the element's `title` attribute.
-
-### figure
-
-{{% note %}}
-To override Hugo's embedded `figure` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
-
-[source code]: {{% eturl figure %}}
-{{% /note %}}
-
-The `figure` shortcode can use the following named arguments:
-
-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` argument is set.
-
-rel
-: Optional `rel` attribute for the URL if `link` argument is set.
-
-alt
-: Alternate text for the image if the image cannot be displayed.
-
-title
-: Image title.
-
-caption
-: 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 usage:
-
-```text
-{{</* figure src="elephant.jpg" title="An elephant at sunset" */>}}
-```
-
-Rendered:
-
-```html
-<figure>
-  <img src="elephant.jpg">
-  <figcaption><h4>An elephant at sunset</h4></figcaption>
-</figure>
-```
-
-### gist
-
-{{% note %}}
-To override Hugo's embedded `gist` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
-
-[source code]: {{% eturl gist %}}
-{{% /note %}}
-
-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 jmooring 23932424365401ffa5e9d9810102a477 >}}
-
-To display a specific file within the gist:
-
-```text
-{{</* gist user 23932424365401ffa5e9d9810102a477 list.html */>}}
-```
-
-Rendered:
-
-{{< gist jmooring 23932424365401ffa5e9d9810102a477 list.html >}}
-
-### highlight
-
-{{% note %}}
-To override Hugo's embedded `highlight` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
-
-[source code]: {{% eturl highlight %}}
-{{% /note %}}
-
-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
-
-{{% note %}}
-To override Hugo's embedded `instagram` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
-
-[source code]: {{% eturl instagram %}}
-{{% /note %}}
-
-To display an Instagram post with this URL:
-
-```text
-https://www.instagram.com/p/CxOWiQNP2MO/
-```
-
-Include this in your Markdown:
-
-```text
-{{</* instagram CxOWiQNP2MO */>}}
-```
-
-Rendered:
-
-{{< instagram CxOWiQNP2MO >}}
-
-### param
-
-{{% note %}}
-To override Hugo's embedded `param` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
-
-[source code]: {{% eturl param %}}
-{{% /note %}}
-
-The `param` shortcode renders a parameter from the page's front matter, falling back to a site parameter of the same name. The shortcode throws an error if the parameter does not exist.
-
-Example usage:
-
-```text
-{{</* param testparam */>}}
-```
-
-Access nested values by [chaining] the [identifiers]:
-
-[chaining]: /getting-started/glossary/#chain
-[identifiers]: /getting-started/glossary/#identifier
-
-```text
-{{</* param my.nested.param */>}}
-```
-
-### ref
-
-{{% note %}}
-To override Hugo's embedded `ref` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
-
-Always use the `{{%/* */%}}` notation when calling this shortcode.
-
-[source code]: {{% eturl ref %}}
-{{% /note %}}
-
-The `ref` shortcode returns the permalink of the given page reference.
-
-Example usage:
-
-```text
-[Post 1]({{%/* ref "/posts/post-1" */%}})
-[Post 1]({{%/* ref "/posts/post-1.md" */%}})
-[Post 1]({{%/* ref "/posts/post-1#foo" */%}})
-[Post 1]({{%/* ref "/posts/post-1.md#foo" */%}})
-```
-
-Rendered:
-
-```html
-<a href="http://example.org/posts/post-1/">Post 1</a>
-<a href="http://example.org/posts/post-1/">Post 1</a>
-<a href="http://example.org/posts/post-1/#foo">Post 1</a>
-<a href="http://example.org/posts/post-1/#foo">Post 1</a>
-```
-
-### relref
-
-{{% note %}}
-To override Hugo's embedded `relref` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
-
-Always use the `{{%/* */%}}` notation when calling this shortcode.
-
-[source code]: {{% eturl relref %}}
-{{% /note %}}
-
-The `relref` shortcode returns the permalink of the given page reference.
-
-Example usage:
-
-```text
-[Post 1]({{%/* relref "/posts/post-1" */%}})
-[Post 1]({{%/* relref "/posts/post-1.md" */%}})
-[Post 1]({{%/* relref "/posts/post-1#foo" */%}})
-[Post 1]({{%/* relref "/posts/post-1.md#foo" */%}})
-```
-
-Rendered:
-
-```html
-<a href="/posts/post-1/">Post 1</a>
-<a href="/posts/post-1/">Post 1</a>
-<a href="/posts/post-1/#foo">Post 1</a>
-<a href="/posts/post-1/#foo">Post 1</a>
-```
-
-### twitter
-
-{{% note %}}
-To override Hugo's embedded `twitter` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
-
-You may call the `twitter` shortcode by using its `tweet` alias.
-
-[source code]: {{% eturl twitter %}}
-{{% /note %}}
-
-To display a Twitter post with this URL:
-
-```txt
-https://x.com/SanDiegoZoo/status/1453110110599868418
-```
-
-Include this in your Markdown:
-
-```text
-{{</* twitter user="SanDiegoZoo" id="1453110110599868418" */>}}
-```
-
-Rendered:
-
-{{< twitter user="SanDiegoZoo" id="1453110110599868418" >}}
-
-### vimeo
-
-{{% note %}}
-To override Hugo's embedded `vimeo` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
-
-[source code]: {{% eturl vimeo %}}
-{{% /note %}}
-
-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, add a `class` argument 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 argument 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
-
-{{% note %}}
-To override Hugo's embedded `youtube` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
-
-[source code]: {{% eturl youtube %}}
-{{% /note %}}
-
-To display a YouTube video with this URL:
-
-```text
-https://www.youtube.com/watch?v=0RKpf3rK57I
-```
-
-Include this in your Markdown:
-
-```text
-{{</* youtube 0RKpf3rK57I */>}}
-```
-
-Rendered:
-
-{{< youtube 0RKpf3rK57I >}}
-
-The youtube shortcode accepts these named arguments:
-
-id
-: (`string`) The video `id`. Optional if the `id` is provided as a positional argument as shown in the example above.
-
-allowFullScreen
-{{< new-in 0.125.0 >}}
-: (`bool`) Whether the `iframe` element can activate full screen mode. Default is `true`.
-
-autoplay
- {{< new-in 0.125.0 >}}
-: (`bool`) Whether to automatically play the video. Forces `mute` to `true`. Default is `false`.
-
-class
-: (`string`) The `class` attribute of the wrapping `div` element. When specified, removes the `style` attributes from the `iframe` element and its wrapping `div` element.
-
-controls
-{{< new-in 0.125.0 >}}
-: (`bool`) Whether to display the video controls. Default is `true`.
-
-end
-{{< new-in 0.125.0 >}}
-: (`int`) The time, measured in seconds from the start of the video, when the player should stop playing the video.
-
-loading
-{{< new-in 0.125.0 >}}
-: (`string`) The loading attribute of the `iframe` element, either `eager` or `lazy`. Default is `eager`.
-
-loop
-{{< new-in 0.125.0 >}}
-: (`bool`) Whether to indefinitely repeat the video. Ignores the `start` and `end` arguments after the first play.  Default is `false`.
-
-mute
-{{< new-in 0.125.0 >}}
-: (`bool`) Whether to mute the video. Always `true` when `autoplay` is `true`. Default is `false`.
-
-start
-{{< new-in 0.125.0 >}}
-: (`int`) The time, measured in seconds from the start of the video, when the player should start playing the video.
-
-title
-: (`string`) The `title` attribute of the `iframe` element. Defaults to "YouTube video".
-
-Example using some of the above:
-
-```text
-{{</* youtube id=0RKpf3rK57I start=30 end=60 loading=lazy */>}}
-```
+See the [shortcodes](/shortcodes/) section.
 
 ## Privacy configuration
 
index 07c61d963cc859d7d03da4d96651dea19bb57fe0..dbe8ff24827ba6339130a2b5721e4a6c9d8a0279 100644 (file)
@@ -12,10 +12,10 @@ weight: 160
 toc: true
 aliases: [/content/summaries/,/content-management/content-summaries/]
 ---
-{{% comment %}}
+
 <!-- Do not remove the manual summary divider below. -->
 <!-- If you do, you will break its first literal usage on this page. -->
-{{% /comment %}}
+
 <!--more-->
 
 You can define a summary manually, in front matter, or automatically. A manual summary takes precedence over a front matter summary, and a front matter summary takes precedence over an automatic summary.
index bdc81536acaabefb6f93ead6e0c9300080989c71..b3e991a9699d0355e9c3383bd75be36b295acda4 100644 (file)
@@ -32,7 +32,7 @@ Run `hugo gen chromastyles -h` for more options. See https://xyproto.github.io/s
 
 ## Highlight shortcode
 
-Highlighting is carried out via the built-in [`highlight` shortcode](/content-management/shortcodes/#highlight). It takes exactly one required argument for the programming language to be highlighted and requires a closing tag.
+Highlighting is carried out via the built-in [`highlight` shortcode](/shortcodes/highlight/). It takes exactly one required argument for the programming language to be highlighted and requires a closing tag.
 
 Options:
 
index 0f1d93c63101f7eff412e05158fa0e6bf3a7966d..b8cd9a01ab7d9fb50f73fb3f18d845bd64118d43 100644 (file)
@@ -128,7 +128,6 @@ title ="Bar"
   url = "/:sections[last]/:slug"
 {{< /code-toggle >}}
 
-
 ## Site configuration
 
 ### Permalinks
@@ -473,7 +472,7 @@ Hugo renders alias files before rendering pages. A new page with the previous fi
 
 ### Customize
 
-To override Hugo's embedded `alias` template, copy the [source code] to a file with the same name in the layouts directory. The template receives the following context:
+To override Hugo's embedded `alias` template, copy the [source code] to a file with the same name in the `layouts` directory. The template receives the following context:
 
 Permalink
 : The link to the page being aliased.
index 1680d4a469a5265df7c16da4be0477fe65358f33..69d548d9538bef5d75ed96e0327a5c7ca7b7cf20 100644 (file)
@@ -37,7 +37,7 @@ For a complete guide to contributing to Hugo, see the [Contribution Guide].
 [contributing]: CONTRIBUTING.md
 [create a proposal]: https://github.com/gohugoio/hugo/issues/new?labels=Proposal%2C+NeedsTriage&template=feature_request.md
 [documentation repository]: https://github.com/gohugoio/hugoDocs
-[documentation]: https://gohugo.io/documentation
+[documentation]: /documentation
 [forum]: https://discourse.gohugo.io
 [issue queue]: https://github.com/gohugoio/hugo/issues
 [themes]: https://themes.gohugo.io/
@@ -172,7 +172,7 @@ CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest
 To build and install a specific release:
 
 ```sh
-CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.137.1
+CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.141.0
 ```
 
 To build and install at the latest commit on the master branch:
index d4e65c9e0ba53c3e499b4b733a44182fed9420f0..8f2326fab515a53060fa10f00f409c0ae7de2a4d 100644 (file)
@@ -22,6 +22,12 @@ For documentation related to a new feature, please include the documentation cha
 
 ## Guidelines
 
+### Style
+
+Please adhere to Google's [developer documentation style guide].
+
+[developer documentation style guide]: https://developers.google.com/style
+
 ### Markdown
 
 Please follow these guidelines:
@@ -29,19 +35,41 @@ Please follow these guidelines:
 - 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
+- Use the [note shortcode] instead of blockquotes or bold text
 - 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
 
-### Style
+### Glossary of terms
 
-Please adhere to Google's [developer documentation style guide].
+Each term in the glossary has its own dedicated page located within the `content/en/getting-started/glossary` directory. While these individual glossary pages are not published as standalone web pages during the build process, their content is included in other pages as needed.
 
-[developer documentation style guide]: https://developers.google.com/style
+To link to a term definition on the glossary page, use this custom link syntax:
+
+```text
+[term](g)
+```
+
+Lookups are case-insensitive, ignore formatting, and support both singular and plural forms. For example, all of these variations will link to the same glossary entry:
+
+```text
+[global resource](g)
+[Global Resource](g)
+[Global Resources](g)
+[`Global Resources`](g)
+```
+
+To insert a term definition, use the [`glossary-term`] shortcode:
+
+```text
+{{%/* glossary-term "global resource" */%}}
+```
+
+[glossary of terms]: /getting-started/glossary/
+[`glossary-term`]: #glossary-term
 
-#### Terminology
+### Terminology
 
 Please link to the [glossary of terms] when necessary, and use the terms consistently throughout the documentation. Of special note:
 
@@ -54,7 +82,9 @@ Please link to the [glossary of terms] when necessary, and use the terms consist
 - Capitalize the word "Markdown"
 - Hyphenate the term "open-source" when used an adjective.
 
-#### Page titles and headings
+Use the [glossary link] (`gl`) shortcode to insert a link to the glossary entry for the given term, and use the [glossary term] (`gt`) shortcode to insert the definition of the given term.
+
+### Page titles and headings
 
 Please follow these guidelines for page titles and headings:
 
@@ -62,23 +92,23 @@ Please follow these guidelines for page titles and headings:
 - Avoid formatted strings in headings and page titles
 - Shorter is better
 
-#### Use active voice with present tense
+### 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.
+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
+### 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
+### Avoid adverbs when possible
 
 No → Hugo is extremely fast.\
 Yes → Hugo is fast.
@@ -87,13 +117,13 @@ Yes → Hugo is fast.
 "It's an adverb, Sam. It's a lazy tool of a weak mind." (Outbreak, 1995).
 {{% /note %}}
 
-#### Level 6 headings
+### Level 6 headings
 
 Level 6 headings are styled as `dt` elements. This was implemented to support a [glossary] with linkable terms.
 
 [glossary]: /getting-started/glossary/
 
-#### Function and method descriptions
+### Function and method descriptions
 
 When adding a page to the [functions] or [methods] section, begin the description with the word "Returns". With functions and methods that return a boolean value, begin the description with the phrase "Reports whether".
 
@@ -105,7 +135,16 @@ For example:
 [functions]: /functions
 [methods]: /methods
 
-#### Miscellaneous
+### Directory names, file names, and file paths
+
+Enclose directory names, file names, and file paths within backticks, with the following exceptions:
+
+- Page titles
+- Section headings (h1-h6)
+- Definition list terms
+- The description field in front matter
+
+### Miscellaneous
 
 Other guidelines to consider:
 
@@ -133,8 +172,6 @@ Always include the language code when using a fenced code block:
 ```
 ````
 
-Rendered:
-
 ```go-html-template
 {{ if eq $foo "bar" }}
   {{ print "foo is bar" }}
@@ -150,8 +187,6 @@ Use this syntax to include shortcodes calls within your code examples:
 {{%/*/* foo */*/%}}
 ```
 
-Rendered:
-
 ```text
 {{</* foo */>}}
 {{%/* foo */%}}
@@ -169,8 +204,6 @@ title = 'My Site'
 {{</* /code-toggle */>}}
 ```
 
-Rendered:
-
 {{< code-toggle file=hugo >}}
 baseURL = 'https://example.org/'
 languageCode = 'en-US'
@@ -189,8 +222,6 @@ 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
@@ -209,8 +240,6 @@ Use the [code shortcode] for other code examples that require a file name:
 {{</* /code */>}}
 ```
 
-Rendered:
-
 {{< code file=layouts/_default/single.html >}}
 {{ range .Site.RegularPages }}
   <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
@@ -223,7 +252,7 @@ These shortcodes are commonly used throughout the documentation. Other shortcode
 
 ### code
 
-Use the "code" shortcode for other code examples that require a file name. See the [code examples] above. This shortcode takes these arguments:
+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`.
@@ -234,23 +263,50 @@ file
 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`.
 
+```text
+{{</* code file=content/something/foo.md lang=text copy=true */>}}
+Some code here
+{{</* /code */>}}
+```
+
+{{< code file=content/something/foo.md lang=text copy=true >}}
+Some code here
+{{< /code >}}
+
 ### code-toggle
 
-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:
+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:
+
+config
+: (`string`) The section of `site.Data.docs.config` to render.
 
 copy
 : (`bool`) Whether to display a copy-to-clipboard button. Default is `false`.
 
 file
-: (`string`) The file name to display. Omit the file extension for site configuration examples.
+: (`string`) The file name to display. Omit the file extension for site configuration examples. Default is `hugo`
 
 fm
 : (`bool`) Whether the example is front matter. Default is `false`.
 
+skipHeader
+: (`bool`) Whether to omit top level key(s) when rendering a section of `site.Data.docs.config`.
+
+```text
+{{</* code-toggle */>}}
+title: Example
+draft: false
+{{</* /code-toggle */>}}
+```
+
+{{< code-toggle >}}
+title: Example
+draft: false
+{{< /code-toggle >}}
 
 ### deprecated-in
 
-Use the “deprecated-in” shortcode to indicate that a feature is deprecated:
+Use the `deprecated-in` shortcode to indicate that a feature is deprecated:
 
 ```text
 {{%/* deprecated-in 0.127.0 */%}}
@@ -260,8 +316,6 @@ Use [`hugo.IsServer`] instead.
 {{%/* /deprecated-in */%}}
 ```
 
-Rendered:
-
 {{% deprecated-in 0.127.0 %}}
 Use [`hugo.IsServer`] instead.
 
@@ -270,7 +324,7 @@ Use [`hugo.IsServer`] instead.
 
 ### eturl
 
-Use the embedded template URL (eturl) shortcode to insert an absolute URL to the source code for an embedded template. The shortcode takes a single argument, the base file name of the template (omit the file extension).
+Use the embedded template URL (`eturl`) shortcode to insert an absolute URL to the source code for an embedded template. The shortcode takes a single argument, the base file name of the template (omit the file extension).
 
 ```text
 This is a link to the [embedded alias template].
@@ -278,27 +332,41 @@ This is a link to the [embedded alias template].
 [embedded alias template]: {{%/* eturl alias */%}}
 ```
 
-Rendered:
-
 This is a link to the [embedded alias template].
 
 [embedded alias template]: {{% eturl alias %}}
 
+### glossary-term
+
+Use the `glossary-term` shortcode to insert the definition of the given glossary term.
+
+```text
+{{%/* glossary-term scalar */%}}
+```
+
+{{% glossary-term scalar %}}
+
+### include
+
+Use the `include` shortcode to include content from another page.
+
+```text
+{{%/* include "functions/_common/glob-patterns" */%}}
+```
+
 ### new-in
 
-Use the "new-in" shortcode to indicate a new feature:
+Use the `new-in` shortcode to indicate a new feature:
 
 ```text
 {{</* new-in 0.127.0 */>}}
 ```
 
-Rendered:
-
 {{< new-in 0.127.0 >}}
 
 ### note
 
-Use the "note" shortcode with `{{%/* */%}}` delimiters to call attention to important content:
+Use the `note` shortcode with `{{%/* */%}}` delimiters to call attention to important content:
 
 ```text
 {{%/* note */%}}
@@ -308,8 +376,6 @@ Use the [`math.Mod`] function to control...
 {{%/* /note */%}}
 ```
 
-Rendered:
-
 {{% note %}}
 Use the [`math.Mod`] function to control...
 
index 34056c35a7c40d57a2f81b11c857c14df5fdea10..7277e2927a38bf5e00eed68482a4fff859fb2de4 100644 (file)
@@ -16,7 +16,7 @@ Visit [themes.gohugo.io] to browse a collection of themes created by the Hugo co
 To submit your theme:
 
 1. Read the [submission guidelines]
-2. Open a pull request in the [themes repository]
+1. Open a pull request in the [themes repository]
 
 Other useful theme directories:
 
diff --git a/content/en/functions/_common/highlighting-options.md b/content/en/functions/_common/highlighting-options.md
new file mode 100644 (file)
index 0000000..363bbe6
--- /dev/null
@@ -0,0 +1,59 @@
+---
+_comment: Do not remove front matter.
+---
+
+anchorLineNos
+: (`bool`) Whether to render each line number as an HTML anchor element, setting the `id` attribute of the surrounding `span` element to the line number. Irrelevant if `lineNos` is `false`. Default is `false`.
+
+codeFences
+: (`bool`) Whether to highlight fenced code blocks. Default is `true`.
+
+guessSyntax
+: (`bool`) Whether to automatically detect the language if the `LANG` argument is blank or set to a language for which there is no corresponding [lexer](g). Falls back to a plain text lexer if unable to automatically detect the language. Default is `false`.
+
+{{% note %}}
+The Chroma syntax highlighter includes lexers for approximately 250 languages, but only 5 of these have implemented automatic language detection.
+{{% /note %}}
+
+hl_Lines
+: (`string`) 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
+: (`bool`) Whether to render the highlighted code without a wrapping container. Default is `false`.
+
+lineAnchors
+: (`string`) When rendering a line number as an HTML anchor element, prepend this value to the `id` attribute of the surrounding `span` element. This provides unique `id` attributes when a page contains two or more code blocks. Irrelevant if `lineNos` or `anchorLineNos` is `false`.
+
+lineNoStart
+: (`int`) The number to display at the beginning of the first line. Irrelevant if `lineNos` is `false`. Default is `1`.
+
+lineNos
+: (`bool`) Whether to display a number at the beginning of each line. Default is `false`.
+
+lineNumbersInTable
+: (`bool`) Whether to render the highlighted code in an HTML table with two cells. The left table cell contains the line numbers, while the right table cell contains the code. Irrelevant if `lineNos` is `false`. Default is `true`.
+
+noClasses
+: (`bool`) Whether to use inline CSS styles instead of an external CSS file. To use an external CSS file, set this value to `false` and generate the CSS file using the `hugo gen chromastyles` command. Default is `true`.
+
+style
+: (`string`) The CSS styles to apply to the highlighted code. See the [style gallery] for examples. Case-sensitive. Default is `monokai`.
+
+[style gallery]: https://xyproto.github.io/splash/docs/
+
+tabWidth
+: (`int`) Substitute this number of spaces for each tab character in your highlighted code. Irrelevant if `noClasses` is `false`. Default is `4`.
+
+wrapperClass
+{{< new-in 0.140.2 >}}
+: (`string`) The class or classes to use for the outermost element of the highlighted code. Default is `highlight`.
+
+{{% note %}}
+Instead of specifying both `lineNos` and `lineNumbersInTable`, you can use the following shorthand notation:
+
+lineNos=inline
+: equivalent to `lineNos=true` and `lineNumbersInTable=false`
+
+lineNos=table
+: equivalent to `lineNos=true` and `lineNumbersInTable=true`
+{{% /note %}}
index 751ad0bef6cc6d2fb43444382099639816e85a33..1f2759da64432ee4c4296275cd80d0d7da82857b 100644 (file)
@@ -38,7 +38,7 @@ The template above is rendered to:
 You can use `after` in combination with the [`first`] function and Hugo's [powerful sorting methods](/quick-reference/page-collections/#sort). Let's assume you have a `section` page at `example.com/articles`. You have 10 articles, but you want your template 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.
+1. The second row is titled "Recent Articles" and shows only the 2nd- to 4th-most recently published articles.
 
 {{< code file=layouts/section/articles.html >}}
 {{ define "main" }}
index cb29dc2f29133f0290ddded089d8d3bf29f34fcc..7189c906858aa013d98cffc79ce2e2ac7e1d153e 100644 (file)
@@ -14,7 +14,7 @@ action:
 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.
+This function appends all elements, excluding the last, to the last element. This allows [pipe](g) constructs as shown below.
 
 Append a single element to a slice:
 
index 07d1eb0f2e703ed044d0e9027c0778af18041fc5..e7de0877f0987f688dcc75fdab5db90e13d7ec64 100644 (file)
@@ -33,7 +33,6 @@ To create an empty map:
 {{ $m := dict }}
 ```
 
-
 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.:
 
 ```go-html-template
index 131c0abcfd397424ae0b55978ec385b2464f09ee..754c65f83bc7e08944edafd510562dbe52452fb5 100644 (file)
@@ -16,11 +16,7 @@ action:
 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
+The `SET` can be an [array](g), [slice](g), or [string](g).
 
 ```go-html-template
 {{ $s := slice "a" "b" "c" }}
index cee20d75420d2f0a034219d9cb3adf7b72c7891e..f9bcac6bd10e405263a85fe0909fa68632178b4a 100644 (file)
@@ -13,11 +13,10 @@ action:
   signatures: [collections.NewScratch ]
 ---
 
-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.
+The `collections.NewScratch` function creates a locally scoped [scratch pad](g) 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
 
index 629d11eeba237ed72d74e8a2d28e00ccf0cf857b..381fc7cb00a113c079e6baec4ce5cd31586d7eb2 100644 (file)
@@ -32,21 +32,15 @@ Hugo will test for equality if you do not provide an `OPERATOR` argument. For ex
 The where function takes three or four arguments. The `OPERATOR` argument is optional.
 
 COLLECTION
-: (`any`) A [page collection] or a [slice] of [maps].
-
-[maps]: /getting-started/glossary/#map
-[page collection]: /getting-started/glossary/#page-collection
-[slice]: /getting-started/glossary/#slice
+: (`any`) A [page collection](g) or a [slice](g) of [maps](g).
 
 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:
+: (`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](g) the subkey as shown below:
 
 ```go-html-template
 {{ $result := where .Site.RegularPages "Params.foo" "bar" }}
 ```
 
-[chain]: /getting-started/glossary/#chain
-
 OPERATOR
 : (`string`) The logical comparison [operator](#operators).
 
@@ -102,9 +96,7 @@ The examples below perform comparisons within a page collection, but the same co
 
 ## String comparison
 
-Compare the value of the given field to a [`string`]:
-
-[`string`]: /getting-started/glossary/#string
+Compare the value of the given field to a [`string`](g):
 
 ```go-html-template
 {{ $pages := where .Site.RegularPages "Section" "eq" "books" }}
@@ -113,10 +105,7 @@ Compare the value of the given field to a [`string`]:
 
 ## Numeric comparison
 
-Compare the value of the given field to an [`int`] or [`float`]:
-
-[`int`]: /getting-started/glossary/#int
-[`float`]: /getting-started/glossary/#float
+Compare the value of the given field to an [`int`](g) or [`float`](g):
 
 ```go-html-template
 {{ $books := where site.RegularPages "Section" "eq" "books" }}
@@ -131,9 +120,7 @@ Compare the value of the given field to an [`int`] or [`float`]:
 
 ## Boolean comparison
 
-Compare the value of the given field to a [`bool`]:
-
-[`bool`]: /getting-started/glossary/#bool
+Compare the value of the given field to a [`bool`](g):
 
 ```go-html-template
 {{ $books := where site.RegularPages "Section" "eq" "books" }}
@@ -146,10 +133,7 @@ Compare the value of the given field to a [`bool`]:
 
 ## Member comparison
 
-Compare a [`scalar`] to a [`slice`].
-
-[`scalar`]: /getting-started/glossary/#scalar
-[`slice`]: /getting-started/glossary/#slice
+Compare a [`scalar`](g) to a [`slice`](g).
 
 For example, to return a collection of pages where the `color` page parameter is either "red" or "yellow":
 
@@ -219,7 +203,7 @@ For example, to return a collection of pages that were created before the curren
 
 ### Custom dates
 
-With custom front matter dates, the comparison depends on the front matter data format (TOML, YAML, or JSON). 
+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.
@@ -400,8 +384,8 @@ Is rendered to:
 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.
+1. Create a collection using a nil comparison
+1. Subtract the second collection from the first collection using the [`collections.Complement`] function.
 
 [`collections.Complement`]: /functions/collections/complement/
 
index 793c0c1ac2fb3ca23073745fcfb50907365e207e..45f103e5d644d8f653e7d123299bc37fcf1412f8 100644 (file)
@@ -125,7 +125,7 @@ Run `hugo env` to list the active transpilers.
 
 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.
+[^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
 
@@ -144,8 +144,8 @@ To install Dart Sass for your builds on GitLab Pages, the `.gitlab-ci.yml` file
 
 ```yaml
 variables:
-  HUGO_VERSION: 0.137.1
-  DART_SASS_VERSION: 1.80.6
+  HUGO_VERSION: 0.141.0
+  DART_SASS_VERSION: 1.83.4
   GIT_DEPTH: 0
   GIT_STRATEGY: clone
   GIT_SUBMODULE_STRATEGY: recursive
@@ -178,8 +178,9 @@ To install Dart Sass for your builds on Netlify, the `netlify.toml` file should
 
 ```toml
 [build.environment]
-HUGO_VERSION = "0.137.1"
-DART_SASS_VERSION = "1.80.6"
+HUGO_VERSION = "0.141.0"
+DART_SASS_VERSION = "1.83.4"
+NODE_VERSION = "22"
 TZ = "America/Los_Angeles"
 
 [build]
index 828ac9051cf129fd51c4e8f705996dbaa81c18d1..1b24fc2074606eafe6aa5a844c36c22c21960243 100644 (file)
@@ -80,7 +80,7 @@ Process the resource:
 {{ end }}
 ```
 
-The example above publishes the minified CSS file to public/css/main.css.
+The example above publishes the minified CSS file to `public/css/main.css`.
 
 See [this repository] for more information about the integration with Tailwind CSS v4.0.
 
index 665b3c23b318e612f72689af517f2c6e1e82fe97..f9e4cd758fe8a07b4bc6cf1fd95d85867c76ff29 100644 (file)
@@ -17,15 +17,12 @@ expiryDate: 2025-02-19 # deprecated 2024-02-19
 ---
 
 {{% deprecated-in 0.123.0 %}}
-Instead, use [`transform.Unmarshal`] with a [global], [page], or [remote] resource.
+Instead, use [`transform.Unmarshal`] with a [global resource](g), [page resource](g), or [remote resource](g).
 
 See the [remote data example].
 
 [`transform.Unmarshal`]: /functions/transform/unmarshal/
-[global]: /getting-started/glossary/#global-resource
-[page]: /getting-started/glossary/#page-resource
 [remote data example]: /functions/resources/getremote/#remote-data
-[remote]: /getting-started/glossary/#remote-resource
 {{% /deprecated-in %}}
 
 Given the following directory structure:
@@ -46,7 +43,7 @@ Access the data with either of the following:
 {{% note %}}
 When working with local data, the file path is relative to the working directory.
 
-You must not place CSV files in the project's data directory.
+You must not place CSV files in the project's `data` directory.
 {{% /note %}}
 
 Access remote data with either of the following:
@@ -134,16 +131,16 @@ Consider using the [`resources.GetRemote`] function with [`transform.Unmarshal`]
 
 ```go-html-template
 {{ $data := dict }}
-{{ $u := "https://example.org/pets.csv" }}
-{{ with resources.GetRemote $u }}
+{{ $url := "https://example.org/pets.csv" }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     {{ $opts := dict "delimiter" "," }}
     {{ $data = . | transform.Unmarshal $opts }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $u }}
 {{ end }}
 ```
 
index 6139e00097ef33f396f1535bd6885daf3894f369..36fc056fe8faf0f0a1642f84427c3e5bcdd34d5c 100644 (file)
@@ -17,15 +17,12 @@ expiryDate: 2025-02-19 # deprecated 2024-02-19
 ---
 
 {{% deprecated-in 0.123.0 %}}
-Instead, use [`transform.Unmarshal`] with a [global], [page], or [remote] resource.
+Instead, use [`transform.Unmarshal`] with a [global resource](g), [page resource](g), or [remote resource](g).
 
 See the [remote data example].
 
 [`transform.Unmarshal`]: /functions/transform/unmarshal/
-[global]: /getting-started/glossary/#global-resource
-[page]: /getting-started/glossary/#page-resource
 [remote data example]: /functions/resources/getremote/#remote-data
-[remote]: /getting-started/glossary/#remote-resource
 {{% /deprecated-in %}}
 
 Given the following directory structure:
@@ -137,15 +134,15 @@ Consider using the [`resources.GetRemote`] function with [`transform.Unmarshal`]
 
 ```go-html-template
 {{ $data := dict }}
-{{ $u := "https://example.org/books.json" }}
-{{ with resources.GetRemote $u }}
+{{ $url := "https://example.org/books.json" }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     {{ $data = . | transform.Unmarshal }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $u }}
 {{ end }}
 ```
 
index 02ab631103d5f591cd3f69446c255939017d299d..a0704dc014a48937951d5fbb19c65665717f9b40 100644 (file)
@@ -12,7 +12,7 @@ action:
 
 {{< 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.
+Use the `debug.Timer` function to determine execution time for a block of code, useful for finding performance bottlenecks in templates.
 
 The timer starts when you instantiate it, and stops when you call its `Stop` method.
 
index 821ca805ae63649efd29bde8d0765bd608d4b107..0745718bbc89884974606b040623d277804c85fe 100644 (file)
@@ -25,16 +25,16 @@ 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 }}
+{{ $url := "https://api.github.com/repos/gohugoio/hugo/readme" }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value}}
     {{ with . | transform.Unmarshal }}
       {{ .content | base64Decode | markdownify }}
     {{ end }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $u }}
 {{ end }}
 ```
index f4fa224743155643aa41bb2fc6a5f08d18760cdd..643defd30efde4f1cd43e03e7fb87a82cc2fe022 100644 (file)
@@ -26,7 +26,6 @@ Use the [`warnidf`] function to allow optional suppression of specific warnings.
 
 To prevent suppression of duplicate messages when using `warnf` for debugging, make each message unique with the [`math.Counter`] function. For example:
 
-
 ```go-html-template
 {{ range site.RegularPages }}
   {{ .Section | warnf "%#[2]v [%[1]d]" math.Counter }}
index b952597b2dd86d4704d4409afe8b1d2c7d39dead..1dc8be515d6db7eeba795f251e6f27222bbda8f1 100644 (file)
@@ -13,8 +13,6 @@ 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
@@ -37,7 +35,7 @@ Do not use the global `page` function in shortcodes, partials called by shortcod
 
 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 `.` 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.
+But when you are deeply nested inside of a [content view](g), [partial](g), or [render hook](g), 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.
 
@@ -103,7 +101,3 @@ If Hugo renders the section page before a content page, the cached rendered shor
 
 [`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 dff3eed72897ea20373d4993c78e40bfca00d84e..96713c4b759d03a8ab6ffea9cd1ca78b01d6e98b 100644 (file)
@@ -43,7 +43,7 @@ Within a range block:
 
 ## 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.
+At the top of a page template, the [context](g) (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:
 
@@ -76,7 +76,6 @@ Gaining a thorough understanding of context is critical for anyone writing templ
 {{% /note %}}
 
 [`seq`]: /functions/collections/seq/
-[context]: /getting-started/glossary/#context
 
 ## Array or slice of scalars
 
index 6916827e6f8bd00a7c72476f5241bc03f0024a02..df5b2496e960424b5dc06367456690de03ad45a8 100644 (file)
@@ -13,21 +13,12 @@ action:
 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 `return` statement is a non-standard extension 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`].
+The returned value may be of any data type including, but not limited to, [`bool`](g), [`float`](g), [`int`](g), [`map`](g), [`resource`](g), [`slice`](g), or [`string`](g).
 
 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 %}}
diff --git a/content/en/functions/go-template/try.md b/content/en/functions/go-template/try.md
new file mode 100644 (file)
index 0000000..a78be16
--- /dev/null
@@ -0,0 +1,113 @@
+---
+title: try
+description: Returns a TryValue object after evaluating the given expression.
+categories: []
+keywords: []
+action:
+  aliases: []
+  related: []
+  returnType: TryValue
+  signatures: ['try EXPRESSION']
+toc: true
+---
+
+{{< new-in 0.141.0 >}}
+
+The `try` statement is a non-standard extension to Go's [text/template] package. It introduces a mechanism for handling errors within templates, mimicking the `try-catch` constructs found in other programming languages.
+
+[text/template]: https://pkg.go.dev/text/template
+
+## Methods
+
+The `TryValue` object encapsulates the result of evaluating the expression, and provides two methods:
+
+Err
+: (`string`) Returns a string representation of the error thrown by the expression, if an error occurred, or returns `nil` if the expression evaluated without errors.
+
+Value
+: (`any`) Returns the result of the expression if the evaluation was successful, or returns `nil` if an error occurred while evaluating the expression.
+
+## Explanation
+
+By way of example, let's divide a number by zero:
+
+```go-html-template
+{{ $x := 1 }}
+{{ $y := 0 }}
+{{ $result := div $x $y }}
+{{ printf "%v divided by %v equals %v" $x $y .Value }}
+```
+
+As expected, the example above throws an error and fails the build:
+
+```terminfo
+Error: error calling div: can't divide the value by 0
+```
+
+Instead of failing the build, we can catch the error and emit a warning:
+
+```go-html-template
+{{ $x := 1 }}
+{{ $y := 0 }}
+{{ with try (div $x $y) }}
+  {{ with .Err }}
+    {{ warnf "%s" . }}
+  {{ else }}
+    {{ printf "%v divided by %v equals %v" $x $y .Value }}
+  {{ end }}
+{{ end }}
+```
+
+The error thrown by the expression is logged to the console as a warning:
+
+```terminfo
+WARN error calling div: can't divide the value by 0
+```
+
+Now let's change the arguments to avoid dividing by zero:
+
+```go-html-template
+{{ $x := 42 }}
+{{ $y := 6 }}
+{{ with try (div $x $y) }}
+  {{ with .Err }}
+    {{ warnf "%s" . }}
+  {{ else }}
+    {{ printf "%v divided by %v equals %v" $x $y .Value }}
+  {{ end }}
+{{ end }}
+```
+
+Hugo renders the above to:
+
+```html
+42 divided by 6 equals 7
+```
+
+## Example
+
+Error handling is essential when using the [`resources.GetRemote`] function to capture remote resources such as data or images. When calling this function, if the HTTP request fails, Hugo will fail the build.
+
+[`resources.GetRemote`]: /functions/resources/getremote/
+
+Instead of failing the build, we can catch the error and emit a warning:
+
+```go-html-template
+{{ $url := "https://broken-example.org/images/a.jpg" }}
+{{ with try (resources.GetRemote $url) }}
+  {{ with .Err }}
+    {{ warnf "%s" . }}
+  {{ else with .Value }}
+    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+  {{ else }}
+    {{ warnf "Unable to get remote resource %q" $url }}
+  {{ end }}
+{{ end }}
+```
+In the above, note that the [context](g) within the last conditional block is the `TryValue` object returned by the `try` statement. At this point neither the `Err` nor `Value` methods returned anything, so the current context is not useful. Use the `$` to access the [template context] if needed.
+
+[template context]: /templates/introduction/#template-context
+
+{{% note %}}
+Hugo does not classify an HTTP response with status code 404 as an error. In this case `resources.GetRemote` returns nil.
+{{% /note %}}
index 3d628e28dd467084efd2cf222010ac11432d5c1d..a730f4d2ccb0962a53ddb6c99b8f93a2f5f33cc5 100644 (file)
@@ -62,7 +62,7 @@ Initialize a variable, scoped to the current block:
 
 ## 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.
+At the top of a page template, the [context](g) (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:
 
@@ -94,8 +94,6 @@ This template will render the page title as desired:
 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 f130de787c0d822a60581a2a56e44f465c191370..374a39f6c46072c8bae6f95fe8a58b0b350baa36 100644 (file)
@@ -12,7 +12,7 @@ action:
   signatures: [hugo.Environment]
 ---
 
-The `hugo.Environment` function returns the current running [environment] as defined through the `--environment` command line flag.
+The `hugo.Environment` function returns the current running [environment](g) as defined through the `--environment` command line flag.
 
 ```go-html-template
 {{ hugo.Environment }} → production
@@ -26,5 +26,3 @@ Command|Environment
 `hugo --environment staging`|`staging`
 `hugo server`|`development`
 `hugo server --environment staging`|`staging`
-
-[environment]: /getting-started/glossary/#environment
index f8d20559b3196bb235c63eb58e9a0675b2414eef..17eb47e1d44fd3cb1a85eedfd60bbb20da26fc8c 100644 (file)
@@ -11,5 +11,5 @@ action:
 ---
 
 ```go-html-template
-{{ hugo.Generator }} → <meta name="generator" content="Hugo 0.137.1">
+{{ hugo.Generator }} → <meta name="generator" content="Hugo 0.141.0">
 ```
index b0503a5ff94fd6f8cd6f15ecc605cc136f7f8e9f..2ef0eefc080ece217cfd5967742ba177699b1618 100644 (file)
@@ -15,11 +15,10 @@ toc: true
 
 {{< new-in 0.139.0 >}}
 
-The global `hugo.Store` function creates a persistent [scratch pad] to store and manipulate data. To create a locally scoped, use the [`newScratch`] function.
+The global `hugo.Store` function creates a persistent [scratch pad](g) to store and manipulate data. To create a locally scoped, use the [`newScratch`] function.
 
 [`Scratch`]: /functions/hugo/scratch/
 [`newScratch`]: /functions/collections/newscratch/
-[scratch pad]: /getting-started/glossary/#scratch-pad
 
 ## Methods
 
@@ -108,9 +107,7 @@ Removes the given key.
 
 The `Store` method is often used to set scratch pad values within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are indeterminate until Hugo renders the page content.
 
-If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop] variable:
-
-[noop]: /getting-started/glossary/#noop
+If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop](g) variable:
 
 ```go-html-template
 {{ $noop := .Content }}
index c1aee8e3fe62dc3cb85544e4fb5abb1461a722c9..e6e1207b80217320b2c62dd46512ccf2a26a9a35 100644 (file)
@@ -11,5 +11,5 @@ action:
 ---
 
 ```go-html-template
-{{ hugo.Version }} → 0.137.1
+{{ hugo.Version }} → 0.141.0
 ```
index 6a838a865b74e49773d264fb9f0107880220496c..ac3835ea8adea54811e55d0d80242639fa4eea87 100644 (file)
@@ -13,5 +13,3 @@ action:
 ```go-html-template
 {{ hugo.WorkingDir }} → /home/user/projects/my-hugo-site
 ```
-
-{{< new-in 0.112.0 >}}
index 89c6ad6047bc925c1b4121ec1ba83f51907ddbb1..8f79a65f82a35d15e59c3afdc3266764121613bb 100644 (file)
@@ -25,12 +25,9 @@ See [image processing] for an overview of Hugo's image pipeline.
 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.
+This is a legacy function, superseded by the [`Width`] and [`Height`] methods for [global resources](g), [page resources](g), and [remote resources](g). 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 7193ba847eecdb83dbead4e8480a4957d4102aec..fd0a8368bc37088b43154690ea1bda80f303c247 100644 (file)
@@ -117,11 +117,10 @@ This example uses the default dithering options.
 Regardless of dithering method, do both of the following to obtain the best results:
 
 1. Scale the image _before_ dithering
-2. Output the image to a lossless format such as GIF or PNG
+1. Output the image to a lossless format such as GIF or PNG
 
 The example below does both of these, and it sets the dithering palette to the three most dominant colors in the image.
 
-
 ```go-html-template
 {{ with resources.Get "original.jpg" }}
   {{ $opts := dict
@@ -157,6 +156,6 @@ For best results, if the dithering palette is grayscale, convert the image to gr
 The example above:
 
 1. Resizes the image to be 800 px wide
-2. Converts the image to grayscale
-3. Dithers the image using the default (`FloydSteinberg`) dithering method with a grayscale palette
-4. Converts the image to the PNG format
+1. Converts the image to grayscale
+1. Dithers the image using the default (`FloydSteinberg`) dithering method with a grayscale palette
+1. Converts the image to the PNG format
diff --git a/content/en/functions/images/Mask.md b/content/en/functions/images/Mask.md
new file mode 100644 (file)
index 0000000..4b1afcf
--- /dev/null
@@ -0,0 +1,80 @@
+---
+title: images.Mask
+description: Returns an image filter that applies a mask to the source image.
+categories: []
+keywords: []
+action:
+  aliases: []
+  related:
+    - functions/images/Filter
+    - methods/resource/Filter
+  returnType: images.filter
+  signatures: [images.Mask RESOURCE]
+toc: true
+---
+
+{{< new-in 0.141.0 >}}
+
+The `images.Mask` filter applies a mask to an image. Black pixels in the mask make the corresponding areas of the base image transparent, while white pixels keep them opaque. Color images are converted to grayscale for masking purposes. The mask is automatically resized to match the dimensions of the base image.
+
+{{% note %}}
+Of the formats supported by Hugo's imaging pipelie, only PNG and WebP have an alpha channel to support transparency. If your source image has a different format and you require transparent masked areas, convert it to either PNG or WebP as shown in the example below.
+{{% /note %}}
+
+When applying a mask to a non-transparent image format such as JPEG, the masked areas will be filled with the color specified by the `bgColor` parameter in your [site configuration]. You can override that color with a `Process` image filter:
+
+```go-html-template
+{{ $filter := images.Process "#00ff00" }}
+```
+
+[site configuration]: /content-management/image-processing/#imaging-configuration
+
+## Usage
+
+Create a slice of filters, one for WebP conversion and the other for mask application:
+
+```go-html-template
+{{ $filter1 := images.Process "webp" }}
+{{ $filter2 := images.Mask (resources.Get "images/mask.png") }}
+{{ $filters := slice $filter1 $filter2 }}
+```
+
+Apply the filters using the [`images.Filter`] function:
+
+```go-html-template
+{{ with resources.Get "images/original.jpg" }}
+  {{ with . | images.Filter $filters }}
+    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+  {{ end }}
+{{ end }}
+```
+
+You can also apply the filter using the [`Filter`] method on a 'Resource' object:
+
+```go-html-template
+{{ with resources.Get "images/original.jpg" }}
+  {{ with .Filter $filters }}
+    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+  {{ end }}
+{{ end }}
+```
+
+[`images.Filter`]: /functions/images/filter/
+[`Filter`]: /methods/resource/filter/
+
+## Example
+
+Mask
+
+{{< img
+  src="images/examples/mask.png"
+  example=false
+>}}
+
+{{< img
+  src="images/examples/zion-national-park.jpg"
+  alt="Zion National Park"
+  filter="mask"
+  filterArgs="images/examples/mask.png"
+  example=true
+>}}
index 39e62b121605d954e8fdd259a6a44c0e7d8dde9f..d1cd7cf3f8dc5079f63323731086226749ea4b99 100644 (file)
@@ -27,11 +27,7 @@ Capture the overlay image as a resource:
 {{ 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
+The overlay image can be a [global resource](g), a [page resource](g), or a [remote resource](g).
 
 Create the filter:
 
index e562f7fbfefc12d242fd1d9f49ea2e5d0892c5ba..f095a6699d0452b36eb61daa58d4002e15ec28fb 100644 (file)
@@ -72,7 +72,6 @@ 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" }}
diff --git a/content/en/functions/images/QR.md b/content/en/functions/images/QR.md
new file mode 100644 (file)
index 0000000..1e8783d
--- /dev/null
@@ -0,0 +1,112 @@
+---
+title: images.QR
+description: Encodes the given text into a QR code using the specified options, returning an image resource.
+keywords: []
+action:
+  aliases: []
+  related: []
+  returnType: images.ImageResource
+  signatures: ['images.QR TEXT OPTIONS']
+toc: true
+math: true
+---
+
+{{< new-in 0.141.0 >}}
+
+The `images.QR` function encodes the given text into a [QR code] using the specified options, returning an image resource. The size of the generated image depends on three factors:
+
+- Data length: Longer text necessitates a larger image to accommodate the increased information density.
+- Error correction level: Higher error correction levels enhance the QR code's resistance to damage, but this typically results in a slightly larger image size to maintain readability.
+- Pixels per module: The number of image pixels assigned to each individual module (the smallest unit of the QR code) directly impacts the overall image size. A higher pixel count per module leads to a larger, higher-resolution image.
+
+Although the default option values are sufficient for most applications, you should test the rendered QR code both on-screen and in print.
+
+[QR code]: https://en.wikipedia.org/wiki/QR_code
+
+## Options
+
+level
+: (`string`) The error correction level to use when encoding the text, one of `low`, `medium`, `quartile`, or `high`. Default is `medium`.
+
+Error correction level|Redundancy
+:--|:--|:--
+low|20%
+medium|38%
+quartile|55%
+high|65%
+
+scale
+: (`int`) The number of image pixels per QR code module. Must be greater than or equal to `2`. Default is `4`.
+
+targetDir
+: (`string`) The subdirectory within the [`publishDir`] where Hugo will place the generated image. Use Unix-style slashes (`/`) to separarate path segments. If empty or not provided, the image is placed directly in the `publishDir` root. Hugo automatically creates the necessary subdirectories if they don't exist.
+
+[`publishDir`]: /getting-started/configuration/#publishdir
+
+## Examples
+
+To create a QR code using the default values for `level` and `scale`:
+
+```go-html-template
+{{ $text := "https://gohugo.io" }}
+{{ with images.QR $text }}
+  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+{{ end }}
+```
+
+{{< qr text="https://gohugo.io" class="qrcode" />}}
+
+Specify `level`, `scale`, and `targetDir` as needed to achieve the desired result:
+
+```go-html-template
+{{ $text := "https://gohugo.io" }}
+{{ $opts := dict 
+  "level" "high" 
+  "scale" 3
+  "targetDir" "codes"
+}}
+{{ with images.QR $text $opts }}
+  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+{{ end }}
+```
+
+{{< qr text="https://gohugo.io" level="high" scale=3 targetDir="codes" class="qrcode" />}}
+
+## Scale
+
+As you decrease the size of a QR code, the maximum distance at which it can be reliably scanned by a device also decreases.
+
+In the example above, we set the `scale` to `2`, resulting in a QR code where each module consists of 2x2 pixels. While this might be sufficient for on-screen display, it's likely to be problematic when printed at 600 dpi.
+
+\[ \frac{2\:px}{module} \times \frac{1\:inch}{600\:px} \times \frac{25.4\:mm}{1\:inch} = \frac{0.085\:mm}{module} \]
+
+This module size is half of the commonly recommended minimum of 0.170 mm.\
+If the QR code will be printed, use the default `scale` value of `4` pixels per module.
+
+Avoid using Hugo's image processing methods to resize QR codes. Resizing can introduce blurring due to anti-aliasing when a QR code module occupies a fractional number of pixels.
+
+{{% note %}}
+Always test the rendered QR code both on-screen and in print.
+{{% /note %}}
+
+## Shortcode
+
+Call the `qr` shortcode to insert a QR code into your content.
+
+Use the self-closing syntax to pass the text as an argument:
+
+```text
+{{</* qr text="https://gohugo.io" /*/>}}
+```
+
+Or insert the text between the opening and closing tags:
+
+```text
+{{</* qr */>}}
+https://gohugo.io
+{{</* /qr */>}}
+```
+
+The `qr` shortcode accepts several arguments including `level` and `scale`. See the [related documentation] for details.
+
+[related documentation]: /shortcodes/qr/
index 8c6670d422ddf8033d79a3ac048a7024ba0aee05..70702f841845b1544bc89d504436d3309008b3c6 100644 (file)
@@ -17,11 +17,15 @@ toc: true
 
 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.
 
+alignx
+ {{< new-in 0.141.0 >}}
+: (`string`) The horizontal alignment of the text relative to the horizontal offset, one of `left`, `center`, or `right`. Default is `left`.
+
 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 [Go Regular], a proportional sans-serif TrueType font.
+: (`resource.Resource`) The font can be a [global resource](g), a [page resource](g), or a [remote resource](g). Default is [Go Regular], a proportional sans-serif TrueType font.
 
 [Go Regular]: https://go.dev/blog/go-fonts#sans-serif
 
@@ -37,54 +41,74 @@ x
 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
 
+Set the text and paths:
+
+```go-html-template
+{{ $text := "Zion National Park" }}
+{{ $fontPath := "https://github.com/google/fonts/raw/main/ofl/lato/Lato-Regular.ttf" }}
+{{ $imagePath := "images/original.jpg" }}
+```
+
 Capture the font as a resource:
 
 ```go-html-template
 {{ $font := "" }}
-{{ $path := "https://github.com/google/fonts/raw/main/ofl/lato/Lato-Regular.ttf" }}
-{{ with resources.GetRemote $path }}
+{{ with try (resources.GetRemote $fontPath) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     {{ $font = . }}
+  {{ else }}
+    {{ errorf "Unable to get resource %s" $fontPath }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get resource %q" $path }}
 {{ end }}
 ```
 
-Create the options map:
+Create the filter, centering the text horizontally and vertically:
 
 ```go-html-template
-{{ $opts := dict
-  "color" "#fbfaf5"
-  "font" $font
-  "linespacing" 8
-  "size" 40
-  "x" 25
-  "y" 190
-}}
+{{ $r := "" }}
+{{ $filter := "" }}
+{{ with $r = resources.Get $imagePath }}
+  {{ $opts := dict
+    "alignx" "center"
+    "color" "#fbfaf5"
+    "font" $font
+    "linespacing" 8
+    "size" 60
+    "x" (mul .Width 0.5 | int)
+    "y" (mul .Height 0.5 | int)
+  }}
+  {{ $filter = images.Text $text $opts }}
+{{ else }}
+  {{ errorf "Unable to get resource %s" $imagePath }}
+{{ end }}
 ```
 
-Set the text:
+Apply the filter using the [`images.Filter`] function:
 
 ```go-html-template
-{{ $text := "Zion National Park" }}
+{{ with $r }}
+  {{ with . | images.Filter $filter }}
+    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+  {{ end }}
+{{ end }}
 ```
 
-Create the filter:
+You can also apply the filter using the [`Filter`] method on a `Resource` object:
 
 ```go-html-template
-{{ $filter := images.Text $text $opts }}
+{{ with $r }}
+  {{ with .Filter $filter }}
+    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+  {{ end }}
+{{ end }}
 ```
 
-{{% include "functions/images/_common/apply-image-filter.md" %}}
+[`images.Filter`]: /functions/images/filter/
+[`Filter`]: /methods/resource/filter/
 
 ## Example
 
index 4299654dcddebe332aa48f4a0396d13075644e4e..fbc1c7e61a80d70cce0261f50416d0d0940b5ee7 100644 (file)
@@ -32,12 +32,10 @@ The Batch `ID` is used to create the base directory for this batch. Forward slas
   * [Config]
     * [SetOptions]
 
-
 ## Group
 
 The `Group` method take an `ID` (`string`) as argument. No slashes. It returns an object with these methods:
 
-
 #### Script
 
 The `Script` method takes an `ID` (`string`) as argument. No slashes. It returns an [OptionsSetter] that can be used to set [script options] for this script.
@@ -70,7 +68,6 @@ The `Instance` method takes two `string` arguments `SCRIPT_ID` and `INSTANCE_ID`
 
 `SetOptions` takes a [params options] map. The instance options will be passed to any [runner] script in the same group, as JSON.
 
-
 #### Runner
 
 The `Runner` method takes an `ID` (`string`) as argument. No slashes. It returns an [OptionsSetter] that can be used to set [script options] for this runner.
@@ -129,7 +126,6 @@ The runner script's export must be a function that takes one argument, the group
 
 Below is an example of a runner script that uses React to render elements. Note that the export (`default`) must match the `export` option in the [script options] (`default` is the default value for runner scripts) (runnable versions of examples on this page can be found at [js.Batch Demo Repo]):
 
-
 ```js
 import * as ReactDOM from 'react-dom/client';
 import * as React from 'react';
@@ -154,13 +150,11 @@ export default function Run(group) {
 }
 ```
 
-
-
 #### Config
 
 Returns an [OptionsSetter] that can be used to set [build options] for the batch.
 
-These are mostly the same as for [js.Build], but note that:
+These are mostly the same as for `js.Build`, but note that:
 
 * `targetPath` is set automatically (there may be multiple outputs).
 * `format` must be `esm`, currently the only format supporting [code splitting].
@@ -233,7 +227,7 @@ Hugo will, by default, first try to resolve any import in [assets](/hugo-pipes/i
 
 You can pass any object that implements [Resource.Get](/methods/page/resources/#get). Pass a slice to set multiple contexts.
 
-The example above uses [`Resources.Mount`] to resolve a folder inside `assets` relative to the page bundle.
+The example above uses [`Resources.Mount`] to resolve a directory inside `assets` relative to the page bundle.
 
 ### OptionsSetter
 
@@ -283,7 +277,6 @@ See [this discussion](https://discourse.gohugo.io/t/js-batch-with-simple-global-
 {{ end }}
 ```
 
-
 ## Known Issues
 
 In the official documentation for [ESBuild's code splitting], there's a warning note in the header. The two issues are:
@@ -294,7 +287,7 @@ In the official documentation for [ESBuild's code splitting], there's a warning
 We have not seen the ordering issue as a problem during our [extensive testing](https://github.com/bep/hugojsbatchdemo) of this new feature with different libraries. There are two main cases:
 
 1. Undefined execution order of imports, see [this comment](https://github.com/evanw/esbuild/issues/399#issuecomment-1458680887)
-2. Only one execution order of imports, see [this comment](https://github.com/evanw/esbuild/issues/399#issuecomment-735355932)
+1. Only one execution order of imports, see [this comment](https://github.com/evanw/esbuild/issues/399#issuecomment-735355932)
 
 Many would say that both of the above are [code smells](https://en.wikipedia.org/wiki/Code_smell). The first one has a simple workaround in Hugo. Define the import order in its own script and make sure it gets passed early to ESBuild, e.g. by putting it in a script group with a name that comes early in the alphabet.
 
@@ -307,7 +300,7 @@ console.log('entrypoints-workaround.js');
 ```
 
 [build options]: #build-options
-[`Resource`]: https://gohugo.io/methods/resource/
+[`Resource`]: /methods/resource/
 [`Resources`]: /methods/page/resources/
 [`Resources.Mount`]: /methods/page/resources/#mount
 [`templates.Defer`]: /functions/templates/defer/
@@ -319,13 +312,12 @@ console.log('entrypoints-workaround.js');
 [instance]: #instance
 [JavaScript import]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
 [js.Batch Demo Repo]: https://github.com/bep/hugojsbatchdemo/
-[js.Build]: https://gohugo.io/hugo-pipes/js/#options
-[map]: https://gohugo.io/functions/collections/dictionary/
+[map]: /functions/collections/dictionary/
 [OptionsSetter]: #optionssetter
-[page bundles]: https://gohugo.io/content-management/page-bundles/
+[page bundles]: /content-management/page-bundles/
 [params options]: #params-options
 [runner]: #runner
 [script options]: #script-options
 [script]: #script
 [SetOptions]: #optionssetter
-[with]: https://gohugo.io/functions/go-template/with/
+[with]: /functions/go-template/with/
index 0e5fd3c0a4baef823a3d8059d6ff7a75473cd426..4829f3b834696c4459b03d0010507390129310ee 100644 (file)
@@ -51,7 +51,7 @@ format
 
 {{% include "./_common/options.md" %}}
 
-### Import JS code from /assets
+### Import JS code from the assets directory
 
 `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:
 
@@ -79,7 +79,7 @@ For other files (e.g. `JSON`, `CSS`) you need to use the relative path including
 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`.
+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.:
 
@@ -98,9 +98,9 @@ Hugo will, by default, generate a `assets/jsconfig.json` file that maps the impo
 
 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`.
+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.
+The start directory for resolving npm packages (aka. packages that live inside a `node_modules` directory) is always the main project directory.
 
 {{% 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.
index df594df12991cd39997e2fd5633b8fb13471274a..332264fca0787fc622916271064cdc38f2f0c7f5 100644 (file)
@@ -14,7 +14,7 @@ And then in your JS file:
 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.
+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.
@@ -74,7 +74,6 @@ sourceMap
 sourcesContent {{< new-in 0.140.0 >}}
 : (`bool`) Whether to include the content of the source files in the source map. By default, this is `true`.
 
-
 JSX {{< new-in 0.124.0 >}}
 : (`string`) How to handle/transform JSX syntax. One of: `transform`, `preserve`, `automatic`. Default is `transform`. Notably, the `automatic` transform was introduced in React 17+ and will cause the necessary JSX helper functions to be imported automatically. See https://esbuild.github.io/api/#jsx
 
@@ -96,4 +95,4 @@ const App = () => <>Hello world!</>;
 
 const container = document.getElementById('app');
 if (container) render(<App />, container);
-```
\ No newline at end of file
+```
index 8c1b8f3f41e17d0a5375e83bc985ec743d05daba..48c1345e2198df6ba953e48c7e41b89bc123b8fd 100644 (file)
@@ -31,7 +31,7 @@ To render placeholders for missing and fallback translations, set
 
 ## Translation tables
 
-Create translation tables in the i18n directory, naming each file according to [RFC 5646]. Translation tables may be JSON, TOML, or YAML. For example:
+Create translation tables in the `i18n` directory, naming each file according to [RFC 5646]. Translation tables may be JSON, TOML, or YAML. For example:
 
 ```text
 i18n/en.toml
index 682b8426f2587292f13494955dc559266fff48cb..6e907d56452ad3e4385de423c4fe1b105ca579fb 100644 (file)
@@ -10,8 +10,6 @@ action:
   signatures: [math.Abs VALUE]
 ---
 
-{{< new-in 0.112.0 >}}
-
 ```go-html-template
 {{ math.Abs -2.1 }} → 2.1
 ```
index a438a3d53504babed72e7c846821dfb35f51e0e7..25de514e0c4877b4a49fb58ffb3e27f14f4d1792 100644 (file)
@@ -15,14 +15,12 @@ action:
   signatures: [math.Add VALUE VALUE...]
 ---
 
-If one of the numbers is a [`float`], the result is a `float`.
+If one of the numbers is a [`float`](g), the result is a `float`.
 
 ```go-html-template
 {{ add 12 3 2 }} → 17
 ```
 
-[`float`]: /getting-started/glossary/#float
-
 You can also use the `add` function to concatenate strings.
 
 ```go-html-template
index 530474a78a5c83a7a01445abc2f37bf2d6e7037c..b9f7a0a53b895c4fe6b66bab3557f3d7fd1aee8f 100644 (file)
@@ -15,10 +15,8 @@ action:
   signatures: [math.Div VALUE VALUE...]
 ---
 
-If one of the numbers is a [`float`], the result is a `float`.
+If one of the numbers is a [`float`](g), the result is a `float`.
 
 ```go-html-template
 {{ div 12 3 2 }} → 2
 ```
-
-[`float`]: /getting-started/glossary/#float
index 6824599e363805e02d5d894a8ab0f61bc956f8ae..bc143c5efc47203e537e4821a8fa053b722641a8 100644 (file)
@@ -15,10 +15,8 @@ action:
   signatures: [math.Mul VALUE VALUE...]
 ---
 
-If one of the numbers is a [`float`], the result is a `float`.
+If one of the numbers is a [`float`](g), the result is a `float`.
 
 ```go-html-template
 {{ mul 12 3 2 }} → 72
 ```
-
-[`float`]: /getting-started/glossary/#float
index 4f71cfcdff6894b57cc60cf8aa896471a47c5d51..00fcae30019a9a261f23a2a0d88782c4e74d63bd 100644 (file)
@@ -12,13 +12,13 @@ action:
 
 {{< new-in 0.121.2 >}}
 
-The `math.Rand` function returns a pseudo-random number in the [half-open interval] [0.0, 1.0).
+The `math.Rand` function returns a pseudo-random number in the half-open [interval](g) [0.0, 1.0).
 
 ```go-html-template
 {{ math.Rand }} → 0.6312770459590062
 ```
 
-To generate a random integer in the [closed interval] [0, 5]:
+To generate a random integer in the closed interval [0, 5]:
 
 ```go-html-template
 {{ math.Rand | mul 6 | math.Floor }}
@@ -41,6 +41,3 @@ To generate a random float, with one digit after the decimal point, in the close
 ```go-html-template
 {{ div (math.Rand | mul 50 | math.Ceil) 10 }}
 ```
-
-[closed interval]: /getting-started/glossary/#interval
-[half-open interval]: /getting-started/glossary/#interval
index a89d0e69df21caef15536a186bffa737cf45c4b5..9f211ef1b9fb635a39c3fb1d6020eab3dd04a782 100644 (file)
@@ -15,10 +15,8 @@ action:
   signatures: [math.Sub VALUE VALUE...]
 ---
 
-If one of the numbers is a [`float`], the result is a `float`.
+If one of the numbers is a [`float`](g), the result is a `float`.
 
 ```go-html-template
 {{ sub 12 3 2 }} → 7
 ```
-
-[`float`]: /getting-started/glossary/#float
index 433337aefbf100b9447b3bf3434cbc9f4364611c..6ee1519e5b010a189e684f89ec5fc7ffee99e195 100644 (file)
@@ -10,11 +10,8 @@ action:
   signatures: ['openapi3.Unmarshal RESOURCE']
 ---
 
-Use the `openapi3.Unmarshal` function with [global], [page], or [remote] resources.
+Use the `openapi3.Unmarshal` function with [global resources](g), [page resources](g), or [remote resources](g).
 
-[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] definition:
@@ -22,14 +19,14 @@ For example, to work with a remote [OpenAPI] definition:
 ```go-html-template
 {{ $url := "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json" }}
 {{ $api := "" }}
-{{ with resources.GetRemote $url }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     {{ $api = . | openapi3.Unmarshal }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $url }}
 {{ end }}
 ```
 
@@ -59,7 +56,6 @@ To list the GET and POST operations for each of the API paths:
 
 Hugo renders this to:
 
-
 ```html
 <p>/pets</p>
 <dl>
index dc701b7314e7d62ed1611ea5ba597687c3949884..394389780768e2e9549d4e5d91502bd542ee659b 100644 (file)
@@ -23,7 +23,6 @@ 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
 
-
 ```go-html-template
 {{ path.Join "partial" "news.html" }} → partial/news.html
 {{ path.Join "partial/" "news.html" }} → partial/news.html
index dc3bc9c9cee6090945e038a90b9edf2c671728b6..ba9dcde0c203f411e03127f8e39055daee8812d9 100644 (file)
@@ -24,7 +24,7 @@ The [media type] is typically one of `image`, `text`, `audio`, `video`, or `appl
 ```
 
 {{% 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.
+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 a `Page` object.
 
index 40577f47dd7795ea2d16b4d0837d74896d697333..09bde82fe7112e5fd82196e46dc7e23c95974f19 100644 (file)
@@ -12,7 +12,7 @@ action:
 
 The `resources.Concat` function returns a concatenated slice of resources, caching the result using the target path as its cache key. Each resource must have the same [media type].
 
-Hugo publishes the resource to the target path when you call its [`Publish`], [`Permalink`], or [`RelPermalink`] methods
+Hugo publishes the resource to the target path when you call its [`Publish`], [`Permalink`], or [`RelPermalink`] method. 
 
 [media type]: https://en.wikipedia.org/wiki/Media_type
 [`publish`]: /methods/resource/publish/
index 381647f7bd457310c161839fd0a8a63712141694..0c90a03b335caf12f2661fb86bd9b14011b6344a 100644 (file)
@@ -49,8 +49,8 @@ Place this in your baseof.html template:
 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
+1. Executes the resource as a template, passing the current page in context
+1. Publishes the resource to css/main.css
 
 The result is:
 
index 1fc01912dde18e42eeda34369cff660a4793575b..17222784ed68aeb89e77860b317f0c90807c1954 100644 (file)
@@ -36,6 +36,6 @@ 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
+1. 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 be30367dbb084725eab139d51a9b293cf6af69ae..c13db35d6394524489e0d8a132beef7acfd92418 100644 (file)
@@ -19,13 +19,13 @@ Hugo publishes the resource to the target path when you call its [`Publish`], [`
 [`permalink`]: /methods/resource/permalink/
 [`relpermalink`]: /methods/resource/relpermalink/
 
-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:
+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": "2024-02-19T12:27:05-08:00",
-  "hugo_version": "0.137.1",
-  "last_modified": "2024-02-19T12:01:42-08:00"
+  "build_date": "2025-01-16T19:14:41-08:00",
+  "hugo_version": "0.141.0",
+  "last_modified": "2025-01-16T19:14:46-08:00"
 }
 ```
 
@@ -48,9 +48,9 @@ Place this in your baseof.html template:
 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
+1. Encodes the map as a JSON string using the [`jsonify`] function
+1. Creates a resource from the JSON string using the `resources.FromString` function
+1. 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:
 
index 0678c4b0dac86ef55b0ecf7667d7a30eb5a64b60..c6450febf42f6d2177d32deb9ce0a93fe90018ad 100644 (file)
@@ -22,7 +22,7 @@ action:
 ```
 
 {{% 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.
+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 a `Page` object.
 
index 749867b41ff461256d65d3faeacc69c616e3878e..7af2e7be87be454c379400f6651067d9b533e9b8 100644 (file)
@@ -22,7 +22,7 @@ action:
 ```
 
 {{% 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.
+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 a `Page` object.
 
index 2179415dd979082c426c634abeb50242bf546c3c..982529077c7041e9d40d47281da6fb3109f6b45d 100644 (file)
@@ -20,14 +20,14 @@ toc: true
 
 ```go-html-template
 {{ $url := "https://example.org/images/a.jpg" }}
-{{ with resources.GetRemote $url }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $url }}
 {{ end }}
 ```
 
@@ -67,22 +67,21 @@ You can also change the request method and set the request body:
 
 ## Remote data
 
-When retrieving remote data, use the [`transform.Unmarshal`] function to [unmarshal] the response.
+When retrieving remote data, use the [`transform.Unmarshal`] function to [unmarshal](g) the response.
 
 [`transform.Unmarshal`]: /functions/transform/unmarshal/
-[unmarshal]: /getting-started/glossary/#unmarshal
 
 ```go-html-template
 {{ $data := dict }}
 {{ $url := "https://example.org/books.json" }}
-{{ with resources.GetRemote $url }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     {{ $data = . | transform.Unmarshal }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $url }}
 {{ end }}
 ```
 
@@ -98,24 +97,24 @@ In these cases, pass the resource `Content` through the `transform.Unmarshal` fu
 
 ## 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.
+Use the [`try`] statement to capture HTTP request errors. If you do not handle the error yourself, Hugo will fail the build.
 
-[`Err`]: /methods/resource/err/
+[`try`]: /functions/go-template/try
 
 {{% note %}}
-Hugo does not classify an HTTP response with status code 404 as an error. In this case the function returns nil.
+Hugo does not classify an HTTP response with status code 404 as an error. In this case `resources.GetRemote` returns nil.
 {{% /note %}}
 
 ```go-html-template
 {{ $url := "https://broken-example.org/images/a.jpg" }}
-{{ with resources.GetRemote $url }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $url }}
 {{ end }}
 ```
 
@@ -123,14 +122,14 @@ 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 try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ warnf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+  {{ else }}
+    {{ warnf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $url }}
 {{ end }}
 ```
 
@@ -142,10 +141,10 @@ The [`Data`] method on a resource returned by the `resources.GetRemote` function
 
 ```go-html-template
 {{ $url := "https://example.org/images/a.jpg" }}
-{{ with resources.GetRemote $url }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     {{ with .Data }}
       {{ .ContentLength }} → 42764
       {{ .ContentType }} → image/jpeg
@@ -153,9 +152,9 @@ The [`Data`] method on a resource returned by the `resources.GetRemote` function
       {{ .StatusCode }} → 200
       {{ .TransferEncoding }} → []
     {{ end }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $url }}
 {{ end }}
 ```
 
index 49c7e7df2ca98abab8a143575b9cf283c3e7ced9..3e65555ba5b14db4ae1a6c5549afd5a8d0908186 100644 (file)
@@ -22,7 +22,7 @@ action:
 ```
 
 {{% 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.
+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 a `Page` object.
 
index e1f8e5f8e471d33d60441c00756fc09282aa6b5c..82f02c9e580df99ab6bb12475a903b6a88bfd62e 100644 (file)
@@ -79,7 +79,7 @@ module.exports = {
 {{% /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].
+: 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]
@@ -122,7 +122,7 @@ HUGO_ENVIRONMENT
 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:
+: 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 directory from PostCSS when running the server, you could run the server with one of these flags:
 
 ```sh
 hugo server --renderToDisk
@@ -153,6 +153,6 @@ You cannot manipulate the values returned from the resource’s methods. For exa
 
 [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
+[`config/production`]: /getting-started/configuration/#configuration-directory
 [configure build]: /getting-started/configuration/#configure-build
 [purgecss]: https://github.com/FullHuman/purgecss#readme
index 5db634f936fcc5c4adf7421d3d66768d9d356c69..b944c72aa9fe7183c9a6740a42f5daca1330739d 100644 (file)
@@ -126,7 +126,7 @@ Run `hugo env` to list the active transpilers.
 
 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.
+[^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
 
@@ -145,8 +145,8 @@ To install Dart Sass for your builds on GitLab Pages, the `.gitlab-ci.yml` file
 
 ```yaml
 variables:
-  HUGO_VERSION: 0.137.1
-  DART_SASS_VERSION: 1.80.6
+  HUGO_VERSION: 0.141.0
+  DART_SASS_VERSION: 1.83.4
   GIT_DEPTH: 0
   GIT_STRATEGY: clone
   GIT_SUBMODULE_STRATEGY: recursive
@@ -179,8 +179,9 @@ To install Dart Sass for your builds on Netlify, the `netlify.toml` file should
 
 ```toml
 [build.environment]
-HUGO_VERSION = "0.137.1"
-DART_SASS_VERSION = "1.80.6"
+HUGO_VERSION = "0.141.0"
+DART_SASS_VERSION = "1.83.4"
+NODE_VERSION = "22"
 TZ = "America/Los_Angeles"
 
 [build]
index 05ca25e1104d2aecc98ed09857607ebd7757fad9..5d67789b63265c92d2f16cdfdf4b8f1fcadf4d19 100644 (file)
@@ -26,9 +26,9 @@ aliases: [/functions/safecss]
 Use the `safe.CSS` function to encapsulate known safe content that matches any of:
 
 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)`.
+1. The CSS3 rule production, such as `a[href=~"https:"].foo#bar`.
+1. CSS3 declaration productions, such as `color: red; margin: 2px`.
+1. The CSS3 value production, such as `rgba(0, 0, 255, 127)`.
 
 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.
 
index 81e11a5ba4d3499c0769a610b2cb20a9a0c32555..eea86f396e08db0339811568102627d009ece682 100644 (file)
@@ -16,8 +16,6 @@ action:
 aliases: [/functions/strings.containsnonspace]
 ---
 
-{{< new-in 0.111.0 >}}
-
 Whitespace characters include `\t`, `\n`, `\v`, `\f`, `\r`, and characters in the [Unicode Space Separator] category.
 
 [Unicode Space Separator]: https://www.compart.com/en/unicode/category/Zs
index ee4ed908145c76586e41f421ae72ce7906a23b19..377a5eb37219ca5f9c06d37293335cb03bf2eac5 100644 (file)
@@ -20,7 +20,6 @@ The START and END positions are zero-based, where `0` represents the first chara
 {{ slicestr "BatMan" 0 3 }} → Bat
 ```
 
-The START and END arguments represent the endpoints of a [half-open interval], a concept that may be difficult to grasp when first encountered. You may find that the [`strings.Substr`] function is easier to understand.
+The START and END arguments represent the endpoints of a half-open [interval](g), a concept that may be difficult to grasp when first encountered. You may find that the [`strings.Substr`] function is easier to understand.
 
-[half-open interval]: /getting-started/glossary/#interval
 [`strings.Substr`]: /functions/strings/substr/
index a99b955ec128b3841b42a1035a79b0b66e8d975b..1d538db4ac59bea4a9db89058e18d216d5316eae 100644 (file)
@@ -46,7 +46,6 @@ In some rare use cases, you may need to defer the execution of a template until
 This function only works in combination with the `with` keyword.
 {{% /note %}}
 
-
 {{% note %}}
 Variables defined on the outside are not visible on the inside and vice versa. To pass in data, use the `data` [option](#options).
 {{% /note %}}
@@ -79,7 +78,6 @@ key (`string`)
 data (`map`) 
 : Optional map to pass as data to the deferred template. This will be available in the deferred template as `.` or `$`.
 
-
 ```go-html-template
 Language Outside: {{ site.Language.Lang }}
 Page Outside: {{ .RelPermalink }}
index 70b2bd1f337c3d87495bbbf02dfd48f1f748a27a..92040f924c049b4e8003e97382769baedb950b7a 100644 (file)
@@ -42,13 +42,12 @@ The list of valid time zones may be system dependent, but should include `UTC`,
 The order of precedence for determining the time zone is:
 
 1. The time zone offset in the date/time string
-2. The time zone provided as the second argument to the `time.AsTime` function
-3. The time zone specified in your site configuration
-4. The `Etc/UTC` time zone
-
+1. The time zone provided as the second argument to the `time.AsTime` function
+1. The time zone specified in your site configuration
+1. The `Etc/UTC` time zone
 
 [IANA Time Zone database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
 [`time.Time`]: https://pkg.go.dev/time#Time
-[`timeZone`]: https://gohugo.io/getting-started/configuration/#timezone
+[`timeZone`]: /getting-started/configuration/#timezone
 [functions]: /functions/time/
 [methods]: /methods/time/
index 051be7ade7090530205f5fe337b56f4faae6c090..09e5d6725cb4a6ff29177a47be8c0902a37d1467 100644 (file)
@@ -32,7 +32,6 @@ There are 86400 seconds in one day.
 
 The time unit must be one of the following:
 
-
 Duration|Valid time units
 :--|:--
 hours|`hour`, `h`
index b9db6905bf7811951c65364dd62bf0902036d20c..cf7721376543b287769540d5be438d596c9fd60f 100644 (file)
@@ -37,10 +37,10 @@ Examples of parsable string representations:
 To override the default time zone, set the [`timeZone`] in your site configuration. The order of precedence for determining the time zone is:
 
 1. The time zone offset in the date/time string
-2. The time zone specified in your site configuration
-3. The `Etc/UTC` time zone
+1. The time zone specified in your site configuration
+1. The `Etc/UTC` time zone
 
-[`timeZone`]: https://gohugo.io/getting-started/configuration/#timezone
+[`timeZone`]: /getting-started/configuration/#timezone
 
 ## Layout string
 
index 28ac7acfc51d3b9162bea7e99d06eb3226c934fa..2994a97284be9b81a20ffba5a5c8a41a46f49794 100644 (file)
@@ -27,7 +27,7 @@ This produces a `time.Time` value, with a string representation such as:
 2023-10-15 12:59:28.337140706 -0700 PDT m=+0.041752605
 ```
 
-To format and [localize] the value, pass it through the [`time.Format`] function:
+To format and [localize](g) the value, pass it through the [`time.Format`] function:
 
 ```go-html-template
 {{ time.Now | time.Format "Jan 2006" }} → Oct 2023
@@ -35,7 +35,6 @@ To format and [localize] the value, pass it through the [`time.Format`] function
 
 The `time.Now` function returns a `time.Time` value, so you can chain any of the [time methods] to the resulting value. For example:
 
-
 ```go-html-template
 {{ time.Now.Year }} → 2023 (int)
 {{ time.Now.Weekday.String }} → Sunday
@@ -44,5 +43,4 @@ The `time.Now` function returns a `time.Time` value, so you can chain any of the
 ```
 
 [`time.Format`]: /functions/time/format/
-[localize]: /getting-started/glossary/#localization
 [time methods]: /methods/time/
index d3369b8994b8d3cc387e38ebcce7af4ca26ed55c..abb51636103557b1f281af8ad0446dafb3de285d 100644 (file)
@@ -17,7 +17,6 @@ aliases: [/functions/time.parseduration]
 
 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`.
 
 This template:
index 8422a0c78023d0789d61553a38b3d2ae17d2a270..5ca562db9ac1a8d4283357ac9256b3cf05764371 100644 (file)
@@ -17,7 +17,6 @@ See the list of [emoji shortcodes] for available emoticons.
 
 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!
 ```
index 8fa6719ebd027add4bfe5b4507a3fb5f8139f6e5..5eaa53939ede8d6e7602689f713321ed12cc32db 100644 (file)
@@ -9,81 +9,31 @@ action:
     - functions/transform/CanHighlight
     - functions/transform/HighlightCodeBlock
   returnType: template.HTML
-  signatures: ['transform.Highlight INPUT LANG [OPTIONS]']
+  signatures: ['transform.Highlight CODE LANG [OPTIONS]']
 aliases: [/functions/highlight]
 toc: true
 ---
 
-The `highlight` function uses the [Chroma] syntax highlighter, supporting over 200 languages with more than 40 available styles.
+The `highlight` function uses the [Chroma] syntax highlighter, supporting over 200 languages with more than 40 [available styles].
+
+[chroma]: https://github.com/alecthomas/chroma
+[available styles]: https://xyproto.github.io/splash/docs/
 
 ## Arguments
 
-INPUT
-: The code to highlight.
+The `transform.Highlight` shortcode takes three arguments.
+
+CODE
+: (`string`) The code to highlight.
 
 LANG
-: The language of the code to highlight. Choose from one of the [supported languages]. Case-insensitive.
+: (`string`) The language of the code to highlight. Choose from one of the [supported languages]. This value is case-insensitive.
 
 OPTIONS
-: A map or comma-separated list of zero or more options. Set default values in [site configuration].
-
-## Options
-
-anchorLineNos
-: (`bool`) Whether to render each line number as an HTML anchor element, setting the `id` attribute of the surrounding `span` element to the line number. Irrelevant if `lineNos` is `false`. Default is `false`.
-
-codeFences
-: (`bool`) Whether to highlight fenced code blocks. Default is `true`.
-
-guessSyntax
-: (`bool`) Whether to automatically detect the language if the `LANG` argument is blank or set to a language for which there is no corresponding [lexer]. Falls back to a plain text lexer if unable to automatically detect the language. Default is `false`.
-
-[lexer]: /getting-started/glossary/#lexer
-
-{{% note %}}
-The Chroma syntax highlighter includes lexers for approximately 250 languages, but only 5 of these have implemented automatic language detection.
-{{% /note %}}
-
-hl_Lines
-: (`string`) 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
-: (`bool`) Whether to render the highlighted code without a wrapping container.Default is `false`.
-
-lineAnchors
-: (`string`) When rendering a line number as an HTML anchor element, prepend this value to the `id` attribute of the surrounding `span` element. This provides unique `id` attributes when a page contains two or more code blocks. Irrelevant if `lineNos` or `anchorLineNos` is `false`.
-
-lineNoStart
-: (`int`) The number to display at the beginning of the first line. Irrelevant if `lineNos` is `false`. Default is `1`.
-
-lineNos
-: (`bool`) Whether to display a number at the beginning of each line. Default is `false`.
+: (`map or string`) A map or space-separate key-value pairs wrapped in quotation marks. Set default values for each option in your [site configuration]. The key names are case-insensitive.
 
-lineNumbersInTable
-: (`bool`) Whether to render the highlighted code in an HTML table with two cells. The left table cell contains the line numbers, while the right table cell contains the code. Irrelevant if `lineNos` is `false`. Default is `true`.
-
-noClasses
-: (`bool`) Whether to use inline CSS styles instead of an external CSS file. To use an external CSS file, set this value to `false` and generate the CSS file using the `hugo gen chromastyles` command. Default is `true`.
-
-style
-: (`string`) The CSS styles to apply to the highlighted code. See the [style gallery] for examples. Case-sensitive. Default is `monokai`.
-
-tabWidth
-: (`int`) Substitute this number of spaces for each tab character in your highlighted code. Irrelevant if `noClasses` is `false`. Default is `4`.
-
-wrapperClass
-{{< new-in 0.140.2 >}}
-: (`string`) The class or classes to use for the outermost element of the highlighted code. Default is `highlight`.
-
-{{% note %}}
-Instead of specifying both `lineNos` and `lineNumbersInTable`, you can use the following shorthand notation:
-
-lineNos=inline
-: equivalent to `lineNos=true` and `lineNumbersInTable=false`
-
-lineNos=table
-: equivalent to `lineNos=true` and `lineNumbersInTable=true`
-{{% /note %}}
+[site configuration]: /getting-started/configuration-markup#highlight
+[supported languages]: /content-management/syntax-highlighting#list-of-chroma-highlighting-languages
 
 ## Examples
 
@@ -101,7 +51,6 @@ lineNos=table
 {{ transform.Highlight $input $lang $opts }}
 ```
 
-[Chroma]: https://github.com/alecthomas/chroma
-[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
+## Options
+
+{{% include "functions/_common/highlighting-options" %}}
index bbdc7b289a5acfc96b376fbc666e22ea666e66b2..62d1360ce7c6154d9c57df3b05cc447ec1e62151 100644 (file)
 ---
 title: transform.ToMath
-description: Renders a math expression using KaTeX.
+description: Renders mathematical equations and expressions written in the LaTeX markup language.
 categories: []
-keywords: [math,katex]
+keywords: [katex,latex,math,typesetting]
 action:
   aliases: []
   related:
     - content-management/mathematics
   returnType: types.Result[template.HTML]
-  signatures: ['transform.ToMath EXPRESSION [OPTIONS]']
+  signatures: ['transform.ToMath INPUT [OPTIONS]']
 aliases: [/functions/tomath]
 toc: true
 ---
 
 {{< new-in "0.132.0" >}}
 
-{{% note %}}
-This feature was introduced in Hugo 0.132.0 and is marked as experimental.
+Hugo uses an embedded instance of the [KaTeX] display engine to render mathematical markup to HTML. You do not need to install the KaTeX display engine.
 
-This does not mean that it's going to be removed, but this is our first use of WASI/Wasm in Hugo, and we need to see how it [works in the wild](https://github.com/gohugoio/hugo/issues/12736) before we can set it in stone.
-{{% /note %}}
+[KaTeX]: https://katex.org/
 
-## Arguments
+```go-html-template
+{{ transform.ToMath "c = \\pm\\sqrt{a^2 + b^2}" }}
+```
 
-EXPRESSION
-: The math expression to render using KaTeX.
+{{% note %}}
+By default, Hugo renders mathematical markup to [MathML], and does not require any CSS to display the result.
 
-OPTIONS
-: A map of zero or more options.
+[MathML]: https://developer.mozilla.org/en-US/docs/Web/MathML
 
-## Options
+To optimize rendering quality and accessibility, use the `htmlAndMathml` output option as described below. This approach requires an external stylesheet.
 
-These are a subset of the [KaTeX options].
+{{% /note %}}
 
-output
-: (`string`). Determines the markup language of the output. One of `html`, `mathml`, or `htmlAndMathml`. Default is `mathml`.
+```go-html-template
+{{ $opts := dict "output" "htmlAndMathml" }}
+{{ transform.ToMath "c = \\pm\\sqrt{a^2 + b^2}" $opts }}
+```
 
-    {{% comment %}}Indent to prevent splitting the description list.{{% / comment %}}
+## Options
 
-    With `html` and `htmlAndMathml` you must include KaTeX CSS within the `head` element of your base template. For example:
+Pass a map of options as the second argument to the `transform.ToMath` function. The options below are a subset of the KaTeX [rendering options].
 
-    ```html
-    <head>
-      ...
-      <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous">
-      ...
-    </head>
-    ```
+[rendering options]: https://katex.org/docs/options.html
 
 displayMode
 : (`bool`) If `true` render in display mode, else render in inline mode. Default is `false`.
 
-leqno
-: (`bool`) If `true` render with the equation numbers on the left. Default is `false`.
+errorColor
+: (`string`) The color of the error messages expressed as an RGB [hexadecimal color]. Default is `#cc0000`.
+
+[hexadecimal color]: https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color
 
 fleqn
 : (`bool`) If `true` render flush left with a 2em left margin. Default is `false`.
 
+macros
+: (`map`) A map of macros to be used in the math expression. Default is `{}`.
+
+    ```go-html-template
+    {{ $macros := dict
+      "\\addBar" "\\bar{#1}"
+      "\\bold" "\\mathbf{#1}"
+    }}
+    {{ $opts := dict "macros" $macros }}
+    {{ transform.ToMath "\\addBar{y} + \\bold{H}" $opts }}
+    ```
+
 minRuleThickness
 : (`float`) The minimum thickness of the fraction lines in `em`. Default is `0.04`.
 
-macros
-: (`map`) A map of macros to be used in the math expression. Default is `{}`.
+output
+: (`string`). Determines the markup language of the output, one of `html`, `mathml`, or `htmlAndMathml`. Default is `mathml`.
+
+    With `html` and `htmlAndMathml` you must include the KaTeX style sheet within the `head` element of your base template.
+
+    ```html
+    <link href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css" rel="stylesheet">
 
 throwOnError
-: (`bool`) If `true` throw a `ParseError` when KaTeX encounters an unsupported command or invalid LaTex. See [error handling]. Default is `true`.
+: (`bool`) If `true` throw a `ParseError` when KaTeX encounters an unsupported command or invalid LaTeX. Default is `true`.
 
-errorColor
-: (`string`) The color of the error messages expressed as an RGB [hexadecimal color]. Default is `#cc0000`.
+## Error handling
 
-## Examples
+There are three ways to handle errors:
 
-### Basic
+1. Let KaTeX throw an error and fail the build. This is the default behavior.
+1. Set the `throwOnError` option to `false` to make KaTeX render the expression as an error instead of throwing an error. See [options](#options).
+1. Handle the error in your template.
 
-```go-html-template
-{{ transform.ToMath "c = \\pm\\sqrt{a^2 + b^2}" }}
-```
+The example below demonstrates error handing within a template.
 
-### Macros
+## Example
 
-```go-html-template
-{{ $macros := dict 
-    "\\addBar" "\\bar{#1}"
-    "\\bold" "\\mathbf{#1}"
-}}
-{{ $opts := dict "macros" $macros }}
-{{ transform.ToMath "\\addBar{y} + \\bold{H}" $opts }}
-```
+Instead of client-side JavaScript rendering of mathematical markup using MathJax or KaTeX, create a passthrough render hook which calls the `transform.ToMath` function.
 
-## Error handling
+###### Step 1
 
-There are 3 ways to handle errors from KaTeX:
+Enable and configure the Goldmark [passthrough extension] in your site configuration. The passthrough extension preserves raw Markdown within delimited snippets of text, including the delimiters themselves.
 
-1. Let KaTeX throw an error and make the build fail. This is the default behavior.
-1. Handle the error in your template. See the render hook example below.
-1. Set the `throwOnError` option to `false` to make KaTeX render the expression as an error instead of throwing an error. See [options](#options).
+[passthrough extension]: /getting-started/configuration-markup/#passthrough
+
+{{< code-toggle file=hugo copy=true >}}
+[markup.goldmark.extensions.passthrough]
+enable = true
+
+[markup.goldmark.extensions.passthrough.delimiters]
+block = [['\[', '\]'], ['$$', '$$']]
+inline = [['\(', '\)']]
+{{< /code-toggle >}}
+
+{{% note %}}
+The configuration above precludes the use of the `$...$` delimiter pair for inline equations. Although you can add this delimiter pair to the configuration, you will need to double-escape the `$` symbol when used outside of math contexts to avoid unintended formatting.
+{{% /note %}}
 
-{{< code file=layouts/_default/_markup/render-passthrough-inline.html copy=true >}}
-{{ with transform.ToMath .Inner }}
-  {{ with .Err }}
-    {{ errorf "Failed to render KaTeX: %q. See %s" . $.Position }}
-  {{ else }}
-    {{ . }}
+###### Step 2
+
+Create a [passthrough render hook] to capture and render the LaTeX markup.
+
+[passthrough render hook]: /render-hooks/passthrough/
+
+{{< code file=layouts/_default/_markup/render-passthrough.html copy=true >}}
+{{- $opts := dict "output" "htmlAndMathml" "displayMode" (eq .Type "block") }}
+{{- with try (transform.ToMath .Inner $opts) }}
+  {{- with .Err }}
+    {{ errorf "Unable to render mathematical markup to HTML using the transform.ToMath function. The KaTeX display engine threw the following error: %s: see %s." . $.Position }}
+  {{- else }}
+    {{- .Value }}
+    {{- $.Page.Store.Set "hasMath" true }}
+  {{- end }}
+{{- end -}}
+{{< /code >}}
+
+###### Step 3
+
+In your base template, conditionally include the KaTeX CSS within the head element.
+
+{{< code file=layouts/_default/baseof.html copy=true >}}
+<head>
+  {{ $noop := .WordCount }}
+  {{ if .Page.Store.Get "hasMath" }}
+    <link href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css" rel="stylesheet">
   {{ end }}
-{{ end }}
-{{- /* chomp trailing newline */ -}}
+</head>
 {{< /code >}}
 
-[error handling]: #error-handling
-[KaTeX options]: https://katex.org/docs/options.html
-[hexadecimal color]: https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color
+In the above, note the use of a [noop](g) statement to force content rendering before we check the value of `hasMath` with the `Store.Get` method.
+
+#### Step 4
+
+Add some mathematical markup to your content, then test.
+
+{{< code file=content/example.md >}}
+This is an inline \(a^*=x-b^*\) equation.
+
+These are block equations:
+
+\[a^*=x-b^*\]
+
+$$a^*=x-b^*$$
+{{< /code >}}
index 960332c440e36975f86970d36eb0d41a84c63177..959f20223616dd24437d18e8e3c8bd1467f08f98 100644 (file)
@@ -16,7 +16,7 @@ toc: true
 aliases: [/functions/transform.unmarshal]
 ---
 
-The input can be a string or a [resource].
+The input can be a string or a [resource](g).
 
 ## Unmarshal a string
 
@@ -37,7 +37,7 @@ 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.
+A global resource is a file within the `assets` directory, or within any directory mounted to the `assets` directory.
 
 ```text
 assets/
@@ -97,14 +97,14 @@ A remote resource is a file on a remote server, accessible via HTTP or HTTPS.
 ```go-html-template
 {{ $data := dict }}
 {{ $url := "https://example.org/books.json" }}
-{{ with resources.GetRemote $url }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     {{ $data = . | transform.Unmarshal }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $url }}
 {{ end }}
 
 {{ range where $data "author" "Victor Hugo" }}
@@ -175,14 +175,14 @@ Get the remote data:
 ```go-html-template
 {{ $data := dict }}
 {{ $url := "https://example.org/books/index.xml" }}
-{{ with resources.GetRemote $url }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     {{ $data = . | transform.Unmarshal }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $url }}
 {{ end }}
 ```
 
@@ -271,7 +271,7 @@ Each item node looks like this:
 }
 ```
 
-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:
+The title keys do not begin with an underscore or a letter---they are not valid [identifiers](g). Use the [`index`] function to access the values:
 
 ```go-html-template
 {{ with $data.channel.item }}
@@ -296,6 +296,4 @@ Hugo renders this to:
 ```
 
 [`index`]: /functions/collections/indexfunction/
-[identifiers]: https://go.dev/ref/spec#Identifiers
-[resource]: /getting-started/glossary/#resource
 [page bundle]: /content-management/page-bundles/
index d9822cfda83374596e24b04a919d92c1c731f0b5..bdff5f4b26398558c1b9849fc38dd38a030d4f88 100644 (file)
@@ -12,8 +12,6 @@ action:
 aliases: [/functions/urls.joinpath]
 ---
 
-{{< new-in 0.112.0 >}}
-
 ```go-html-template
 {{ urls.JoinPath }} → "" (empty string)
 {{ urls.JoinPath "" }} → /
index 6cd97f03009370b77e5f8f4c957fcc845cb9ee8c..d8fe6f26ccecb22c4653d2bb603f5ad9803235d4 100644 (file)
@@ -35,7 +35,7 @@ The second argument is a path to a page, with or without a file extension, with
 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.
+: (`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.
index 6b45b2131163c116cd6a55779d7cfad2505aa59f..74e1b5650ec36013110d645bd3ad0e4f13dd5f7c 100644 (file)
@@ -42,7 +42,7 @@ Code|baseURL|Permalink
 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.
+: (`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.
index bf44a82d1ce5b16f1db3bd6b0a692011dc41508f..12e5203c4a0d8f1a4891e61ef15ff4e36f2b9a16 100644 (file)
@@ -16,7 +16,7 @@ aliases: [/functions/urlize]
 
 ## Example
 
-Use the `urlize` function to create a link to a [term] page.
+Use the `urlize` function to create a link to a [term page](g).
 
 Consider this site configuration:
 
@@ -60,4 +60,3 @@ To create a link to the term page:
 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 cc64b51d7ee2862c1797e9257b4bfda688f4af1c..637bfeb22da692376d54b13424f0fd3f54b1d703 100644 (file)
@@ -6,8 +6,8 @@ keywords: [build,buildStats,cache]
 menu:
   docs:
     parent: getting-started
-    weight: 60
-weight: 60
+    weight: 70
+weight: 70
 slug: configuration-build
 toc: true
 ---
@@ -26,17 +26,14 @@ See [Configure Cache Busters](#configure-cache-busters).
 
 #### noJSConfigInAssets
 
-(`bool`) If `true`, turns 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.
+(`bool`) If `true`, turns off writing a `jsconfig.json` into your `assets` directory 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
 
 (`string`) 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
 
-{{< 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 >}}
@@ -78,11 +75,11 @@ If `enable` is set to `true`, creates a `hugo_stats.json` file in the root of yo
 Exclude `class` attributes, `id` attributes, or tags from `hugo_stats.json` with the `disableClasses`, `disableIDs`, and `disableTags` keys.
 
 {{% note %}}
-Given that CSS purging is typically limited to production builds, place the `buildStats` object below [config/production].
+Given that CSS purging is typically limited to production builds, place the `buildStats` object below [`config/production`].
 
-[config/production]: /getting-started/configuration/#configuration-directory
+[`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.
\ No newline at end of file
+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.
index 3853a3a6a26c66439f16d69ab5a5f0dd0ff00c47..f01d0ddddc7f60d853decb71f2616dcda01d8ba3 100644 (file)
@@ -6,8 +6,8 @@ keywords: [markup,markdown,goldmark,asciidoc,asciidoctor,highlighting]
 menu:
   docs:
     parent: getting-started
-    weight: 50
-weight: 50
+    weight: 60
+weight: 60
 slug: configuration-markup
 toc: true
 ---
@@ -107,7 +107,7 @@ Superscript|`1^st^`|`1<sup>st</sup>`
 To avoid a conflict when enabling the Hugo Goldmark Extras subscript extension, if you want to render subscript and strikethrough text concurrently you must:
 
 1. Disable the Goldmark strikethrough extension
-2. Enable the Hugo Goldmark Extras delete extension
+1. Enable the Hugo Goldmark Extras delete extension
 
 For example:
 
@@ -126,7 +126,7 @@ enable = true
 
 {{< new-in 0.122.0 >}}
 
-Enable the passthrough extension to include mathematical equations and expressions in Markdown using LaTeX or TeX typesetting syntax. See [mathematics in Markdown] for details.
+Enable the passthrough extension to include mathematical equations and expressions in Markdown using LaTeX markup. See [mathematics in Markdown] for details.
 
 [mathematics in Markdown]: content-management/mathematics/
 
index 3d75e7dd28739601ef3c6d65d5a34082937f56a8..448689295a57efadb8a6f863b2efef9eefd57483 100644 (file)
@@ -7,8 +7,8 @@ keywords: [configuration,toml,yaml,json]
 menu:
   docs:
     parent: getting-started
-    weight: 40
-weight: 40
+    weight: 50
+weight: 50
 toc: true
 aliases: [/overview/source-directory/,/overview/configuration/]
 ---
@@ -61,9 +61,7 @@ See the specifications for each file format: [TOML], [YAML], and [JSON].
 
 ## Configuration directory
 
-Instead of a single site configuration file, split your configuration by [environment], root configuration key, and language. For example:
-
-[environment]: /getting-started/glossary/#environment
+Instead of a single site configuration file, split your configuration by [environment](g), root configuration key, and language. For example:
 
 ```text
 my-project/
@@ -138,7 +136,7 @@ ID = 'G-XXXXXXXXX'
 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:
+1. You want to use different Google tag IDs for your production and staging environments. For example:
 
     - `G-PPPPPPPPP` for production
     - `G-SSSSSSSSS` for staging
@@ -151,7 +149,7 @@ To satisfy these requirements, configure your site as follows:
 
     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`
+1. `config/production/hugo.toml`
 
     Include this section only:
 
@@ -164,7 +162,7 @@ To satisfy these requirements, configure your site as follows:
 
     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`
+1. `config/staging/hugo.toml`
 
     Include this section only:
 
@@ -266,6 +264,9 @@ To remain consistent and prevent unexpected behavior, do not mix these strategie
 
 (`string`) The directory from where Hugo reads data files. Default is `data`. {{% module-mounts-note %}}
 
+###### defaultOutputFormat
+(`string`) The default output format for the site. If unspecified, the first available format in the defined order (by weight, then alphabetically) will be used.
+
 ###### defaultContentLanguage
 
 (`string`) Content without language indicator will default to this language. Default is `en`.
@@ -290,9 +291,7 @@ To remain consistent and prevent unexpected behavior, do not mix these strategie
 
 ###### disableKinds
 
-(`string slice`) Disable rendering of the specified page [kinds], any of `404`, `home`, `page`, `robotstxt`, `rss`, `section`, `sitemap`, `taxonomy`, or `term`.
-
-[kinds]: /getting-started/glossary/#page-kind
+(`string slice`) Disable rendering of the specified page [kinds](g), any of `404`, `home`, `page`, `robotstxt`, `rss`, `section`, `sitemap`, `taxonomy`, or `term`.
 
 ###### disableLanguages
 
@@ -610,7 +609,6 @@ These settings do not apply to the [`Next`] or [`Prev`] methods on a `Pages` obj
 
 See [Configure Build](/getting-started/configuration-build/).
 
-
 ## 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):
@@ -699,7 +697,6 @@ to = '/en/404.html'
 status = 404
 {{< /code-toggle >}}
 
-
 ## Configure title case
 
 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.
@@ -732,9 +729,7 @@ DART_SASS_BINARY
 : (`string`) The absolute path to the Dart Sass executable. By default, Hugo searches for the executable in each of the paths in the `PATH` environment variable.
 
 HUGO_ENVIRONMENT
-: (`string`) Overrides the default [environment], typically one of `development`, `staging`, or `production`.
-
-[environment]: /getting-started/glossary/#environment
+: (`string`) Overrides the default [environment](g), typically one of `development`, `staging`, or `production`.
 
 HUGO_FILE_LOG_FORMAT
 : (`string`) A format string for the file path, line number, and column number displayed when reporting errors, or when calling the `Position` method from a shortcode or Markdown render hook. Valid tokens are `:file`, `:line`, and `:col`. Default is `:file::line::col`.
@@ -893,7 +888,6 @@ If you want to know the current value of `cacheDir`, you can run `hugo config`,
 [templates]: /templates/
 [static-files]: /content-management/static-files/
 
-
 ## Configure HTTP cache
 
 {{< new-in 0.127.0 >}}
@@ -963,10 +957,10 @@ lang
 : The [page language].
 
 kind
-: The [kind] of the page.
+: The [kind](g) of the page.
 
 output
-: The [output format] of the page.
+: The [output format](g) of the page.
 
 It is recommended to put coarse grained filters (e.g. for language and output format) in the excludes section, e.g.:
 
@@ -1000,6 +994,3 @@ Some use cases for this feature:
   
 [path]: /methods/page/path/
 [page language]: /methods/page/language/
-[kind]: /getting-started/glossary/#page-kind
-[output format]: /getting-started/glossary/#output-format
-[type]: /getting-started/glossary/#content-type
index 2331d883823e86920a37bf3a6cdc43646947c832..ce1df600fe8c8e88a9084a9fb4fc0dad741c8426 100644 (file)
@@ -6,8 +6,8 @@ keywords: [source, organization, directories]
 menu:
   docs:
     parent: getting-started
-    weight: 30
-weight: 30
+    weight: 40
+weight: 40
 toc: true
 aliases: [/overview/source-directory/]
 ---
@@ -104,7 +104,7 @@ The `i18n` directory contains translation tables for multilingual sites. See&nbs
 
 ###### layouts
 
-The layouts directory contains templates to transform content, data, and resources into a complete website. See&nbsp;[details](/templates/).
+The `layouts` directory contains templates to transform content, data, and resources into a complete website. See&nbsp;[details](/templates/).
 
 ###### public
 
@@ -116,11 +116,11 @@ The `resources` directory contains cached output from Hugo's asset pipelines, ge
 
 ###### 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.
+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](g) and [asset pipelines](/hugo-pipes/introduction/), the `static` directory was also used for images, CSS, and JavaScript.
 
 ###### themes
 
-The `themes` directory contains one or more [themes](/getting-started/glossary/#theme), each in its own subdirectory.
+The `themes` directory contains one or more [themes](g), each in its own subdirectory.
 
 ## Union file system
 
@@ -186,7 +186,7 @@ home/
 ```
 
 {{% 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.
+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).
index d30305c2eb04718f54d25f4d22b7803e748135e2..46c66a7375ca51b416afe4581a5c8a15e21987d1 100644 (file)
@@ -6,8 +6,8 @@ keywords: [books, tutorials, learning, usage]
 menu:
   docs:
     parent: getting-started
-    weight: 70
-weight: 70
+    weight: 90
+weight: 90
 toc: true
 ---
 
@@ -25,14 +25,12 @@ Publication date: March 2022\
 Length: 488 pages\
 ISBN: 9781617297007
 
-
 ### Build Websites with Hugo
 
 In this book, you'll use Hugo to build a personal portfolio site that you can use to showcase your skills and thoughts to the world. You'll build the basic skeleton, develop a custom theme, and use content templates to generate new pages quickly. You'll use internal and external data sources to embed content into your site, and render some of your content in JSON and RSS. You'll add a blog section with posts and integrate Disqus with your site, and then make your site searchable.
 
 [{{< img src="build-websites-with-hugo.png" alt="Book cover: Build Websites with Hugo" filter="process" filterArgs="resize x350 webp">}}](https://pragprog.com/titles/bhhugo/build-websites-with-hugo/)
 
-
 Author: Brian P. Hogan\
 Publisher: [Pragmatic Bookshelf](https://pragprog.com/titles/bhhugo/build-websites-with-hugo/)\
 Publication date: May 2020\
@@ -60,7 +58,6 @@ Creation date: April 2022
 
 This course covers the basics of using the Hugo static site generator. Work your way through the articles and we'll teach you everything you need to know to create a professional and scalable website or blog!
 
-
 1. [Introduction](https://www.giraffeacademy.com/static-site-generators/hugo/)
 1. [Windows Installation](https://www.giraffeacademy.com/static-site-generators/hugo/installing-hugo-on-windows/)
 1. [Mac Installation](https://www.giraffeacademy.com/static-site-generators/hugo/installing-hugo-on-mac/)
diff --git a/content/en/getting-started/glossary.md b/content/en/getting-started/glossary.md
deleted file mode 100644 (file)
index 117f6f1..0000000
+++ /dev/null
@@ -1,472 +0,0 @@
----
-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 6 headings for each term in the glossary.
----
-
-[A](#action)&nbsp;
-[B](#bool)&nbsp;
-[C](#cache)&nbsp;
-[D](#default-sort-order)&nbsp;
-[E](#environment)&nbsp;
-[F](#field)&nbsp;
-[G](#global-resource)&nbsp;
-[H](#headless-bundle)&nbsp;
-[I](#identifier)&nbsp;
-[K](#kind)&nbsp;
-[L](#layout)&nbsp;
-[M](#map)&nbsp;
-[N](#node)&nbsp;
-[O](#object)&nbsp;
-[P](#page-bundle)&nbsp;
-[R](#regular-page)&nbsp;
-[S](#scalar)&nbsp;
-[T](#taxonomic-weight)&nbsp;
-[U](#unmarshal)&nbsp;
-[V](#variable)&nbsp;
-[W](#walk)&nbsp;
-[Z](#zero-time)&nbsp;
-
-###### action
-
-See [template action](#template-action).
-
-###### archetype
-
-A template for new content. See&nbsp;[details](/content-management/archetypes/).
-
-###### argument
-
-A [scalar](#scalar), [array](#array), [slice](#slice), [map](#map), or [object](#object) passed to a [function](#function), [method](#method), or [shortcode](#shortcode).
-
-###### array
-
-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.
-
-###### bool
-
-See [boolean](#boolean).
-
-###### boolean
-
-A data type with two possible values, either `true` or `false`.
-
-###### branch bundle
-
-A directory that contains an _index.md file and zero or more [resources](#resource). Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top level directories with or without _index.md files are also branch bundles. This includes the home page. See&nbsp;[details](/content-management/page-bundles/).
-
-###### 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.
-
-###### bundle
-
-See [page bundle](#page-bundle).
-
-###### cache
-
-A software component that stores data so that future requests for the same data are faster.
-
-###### 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`.
-
-###### CJK
-
-A collective term for the Chinese, Japanese, and Korean languages. See [details](https://en.wikipedia.org/wiki/CJK_characters).
-
-###### CLI
-
-Command line interface.
-
-###### collection
-
-An [array](#array), [slice](#slice), or [map](#map).
-
-###### content adapter
-
-A template that dynamically creates pages when building a site. For example, use a content adapter to create pages from a remote data source such as JSON, TOML, YAML, or XML. See&nbsp;[details](/content-management/content-adapters/).
-
-###### content format
-
-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/).
-
-###### content view
-
-A template called with the `.Page.Render` method. See&nbsp;[details](/templates/content-view/).
-
-###### 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/#context).
-
-###### 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 or the `HUGO_ENVIRONMENT` environment variable.
-
-To determine the current environment within a template, use the [`hugo.Environment`] function.
-
-[`hugo.Environment`]: /functions/hugo/environment/
-
-###### field
-
-A predefined key-value pair in front matter such as `date` or `title`. See&nbsp;also&nbsp;[parameter](#parameter).
-
-###### 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).
-
-###### floating point
-
-A numeric data type with a fractional component. For example, `3.14159`.
-
-###### fragment
-
-The final segment of a URL, beginning with a hash (`#`) mark, that references an `id` attribute of an HTML element on the page.
-
-###### 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/).
-
-###### 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/
-
-###### headless bundle
-
-An unpublished leaf or branch bundle whose content and resources you can include in other pages. See [build options](/content-management/build-options/).
-
-###### 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.
-
-###### int
-
-See [integer](#integer).
-
-###### integer
-
-A numeric data type without a fractional component. For example, `42`.
-
-###### internationalization
-
-Software design and development efforts that enable [localization](#localization). See the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated i18n.
-
-###### interval
-
-An [interval](https://en.wikipedia.org/wiki/Interval_(mathematics)) is a range of numbers between two endpoints: closed, open, or half-open.
-
-- A _closed_ interval, denoted by brackets, includes its endpoints. For example, [0,&nbsp;1]&nbsp;is the interval where `0 <= x <= 1`.
-
-- An _open_ interval, denoted by parentheses, excludes its endpoints. For example, (0,&nbsp;1)&nbsp;is the interval where `0 < x < 1`.
-
-- A _half-open_ interval includes only one of its endpoints. For example, (0,&nbsp;1]&nbsp;is the _left-open_ interval where `0 < x <= 1`, while [0,&nbsp;1)&nbsp;is the _right-open_ interval where `0 <= x < 1`.
-
-###### kind
-
-See [page kind](#page-kind).
-
-###### layout
-
-See [template](#template).
-
-###### leaf bundle
-
-A directory that contains 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. It has no descendants. See&nbsp;[details](/content-management/page-bundles/).
-
-###### lexer
-
-A software component that identifies keywords, identifiers, operators, numbers, and other basic building blocks of a programming language within the input text.
-
-###### 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).
-
-###### list template
-
-Any template that renders a [list page](#list-page). This includes [home](/templates/types/#home), [section](/templates/types/#section), [taxonomy](/templates/types/#taxonomy), and [term](/templates/types/#term) templates.
-
-###### localization
-
-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.
-
-###### logical path
-
-{{< new-in 0.123.0 >}}
-
-A page or page resource identifier derived from the file path, excluding its extension and language identifier. This value is neither a file path nor a URL. Starting with a file path relative to the content directory, Hugo determines the logical path by stripping the file extension and language identifier, converting to lower case, then replacing spaces with hyphens. {{% comment %}}<!-- You may also set this value using the `path` front matter field. -->{{% /comment %}} See [examples](/methods/page/path/#examples).
-
-###### 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.
-
-###### 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).
-
-###### module
-
-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/).
-
-###### node
-
-A class of [page kinds](#page-kind) including `home`, `section`, `taxonomy`, and `term`.
-
-###### noop
-
-An abbreviated form of "no operation", a _noop_ is a statement that does nothing.
-
-###### object
-
-A data structure with or without associated [methods](#method).
-
-###### ordered taxonomy
-
-Created by invoking the [`Alphabetical`] or [`ByCount`] method on a [`Taxonomy`](#taxonomy-object) 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/
-
-###### output format
-
-{{% include "methods/page/_common/output-format-definition.md" %}}
-
-###### page bundle
-
-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 collection
-
-A slice of `Page` objects.
-
-###### page kind
-
-A classification of pages, one of `home`, `page`, `section`, `taxonomy`, or `term`. See&nbsp;[details](/methods/page/kind/).
-
-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 list page and navigation links to other pagers.
-
-###### paginate
-
-To split a list page into two or more subsets.
-
-###### pagination
-
-The process of [paginating](#paginate) a list page. See&nbsp;[details](/templates/pagination/).
-
-###### paginator
-
-A collection of [pagers](#pager).
-
-###### parameter
-
-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).
-
-###### 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.
-
-###### permalink
-
-The absolute URL of a published resource or a rendered page, including scheme and host.
-
-###### pipe
-
-See [pipeline](#pipeline).
-
-###### 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.
-
-###### publish
-
-See [build](#build).
-
-###### regular page
-
-Content with the "page" [page kind](#page-kind). See also [section page](#section-page).
-
-###### relative permalink
-
-The host-relative URL of a published resource or a rendered page.
-
-###### render hook
-
-A [template](#template) that overrides standard Markdown rendering. See&nbsp;[details](/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.
-
-Hugo supports three types of resources: [global](#global-resource), [page](#page-resource), and [remote](#remote-resource)
-
-###### resource type
-
-The main type of a resource's [media type]. Content files such as Markdown, HTML, AsciiDoc, Pandoc, reStructuredText, and Emacs Org Mode have resource type `page`. Other resource types include `image`, `video`, etc. Retrieve the resource type using the [`ResourceType`] method on a `Resource` object.
-
-[media type]: /methods/resource/mediatype/
-[`ResourceType`]: /methods/resource/resourcetype/
-
-###### scalar
-
-A single value, one of [string](#string), [integer](#integer), [floating point](#floating-point), or [boolean](#boolean).
-
-###### 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 create a locally scoped scratch pad using the [`newScratch`] function.
-
-[`Scratch`]: /methods/page/scratch/
-[`Store`]: /methods/page/store/
-[`newScratch`]: /functions/collections/newscratch/
-
-###### section
-
-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).
-
-###### shortcode
-
-A [template](#template) called from within Markdown, taking zero or more [arguments](#argument). See&nbsp;[details](/content-management/shortcodes/).
-
-###### slice
-
-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.
-
-###### string
-
-A sequence of bytes. For example, `"What is 6 times 7?"`&nbsp;.
-
-###### string literal (interpreted)
-
-Interpreted string literals are character sequences between double quotes, as in "foo". Within the quotes, any character may appear except a newline and an unescaped double quote. The text between the quotes forms the value of the literal, with backslash escapes interpreted. See [details](https://go.dev/ref/spec#String_literals).
-
-###### string literal (raw)
-
-Raw string literals are character sequences between backticks, as in \`bar\`. Within the backticks, any character may appear except a backtick. Backslashes have no special meaning and the string may contain newlines. Carriage return characters ('\r') inside raw string literals are discarded from the raw string value. See [details](https://go.dev/ref/spec#String_literals).
-
-###### 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`](#taxonomy-object) object. See&nbsp;[details](/content-management/taxonomies/#order-taxonomies).
-
-###### 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/).
-
-###### 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
-
-A file with [template actions](#template-action), located within the layouts directory of a project, theme, or module. See&nbsp;[details](/templates/).
-
-###### 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
-
-A member of a [taxonomy](#taxonomy), used to classify content. See&nbsp;[details](/content-management/taxonomies/).
-
-###### 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).
-
-###### 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).
-
-###### 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).
-
-###### type
-
-See [content type](#content-type).
-
-###### unmarshal
-
-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) prepended 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`](#taxonomy-object) 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.
-
-###### zero time
-
-The _zero time_ is January 1, 0001, 00:00:00 UTC. Formatted per [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) the _zero time_ is 0001-01-01T00:00:00-00:00.
diff --git a/content/en/getting-started/glossary/_index.md b/content/en/getting-started/glossary/_index.md
new file mode 100644 (file)
index 0000000..001d80f
--- /dev/null
@@ -0,0 +1,21 @@
+---
+title: Glossary of terms
+description: Terms commonly used throughout the documentation.
+categories: [getting started]
+keywords: [glossary]
+menu:
+  docs:
+    parent: getting-started
+    weight: 80
+weight: 80
+layout: single
+build:
+  render: always
+  list: always
+cascade:
+  build:
+    render: never
+    list: local
+---
+
+{{% glossary %}}
diff --git a/content/en/getting-started/glossary/action.md b/content/en/getting-started/glossary/action.md
new file mode 100644 (file)
index 0000000..b38df74
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: action
+---
+
+See [template action](g).
diff --git a/content/en/getting-started/glossary/archetype.md b/content/en/getting-started/glossary/archetype.md
new file mode 100644 (file)
index 0000000..ae42740
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: archetype
+---
+
+An archetype is a template for new content. See [details](/content-management/archetypes/).
diff --git a/content/en/getting-started/glossary/argument.md b/content/en/getting-started/glossary/argument.md
new file mode 100644 (file)
index 0000000..223f866
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: argument
+---
+
+A [scalar](g), [array](g), [slice](g), [map](g), or [object](g) passed to a [function](g), [method](g), or [shortcode](g).
diff --git a/content/en/getting-started/glossary/array.md b/content/en/getting-started/glossary/array.md
new file mode 100644 (file)
index 0000000..bcd1718
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: array
+---
+
+A numbered sequence of [elements](g). Unlike Go's [slice](g) data type, an array has a fixed length. Elements within an array can be [scalars](g), slices, [maps](g), pages, or other arrays. See the [Go&nbsp;documentation](https://go.dev/ref/spec#Array_types) for details.
diff --git a/content/en/getting-started/glossary/bool.md b/content/en/getting-started/glossary/bool.md
new file mode 100644 (file)
index 0000000..7fd7628
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: bool
+---
+
+See [boolean](g).
diff --git a/content/en/getting-started/glossary/boolean.md b/content/en/getting-started/glossary/boolean.md
new file mode 100644 (file)
index 0000000..d9b6553
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: boolean
+---
+
+A data type with two possible values, either `true` or `false`.
diff --git a/content/en/getting-started/glossary/branch-bundle.md b/content/en/getting-started/glossary/branch-bundle.md
new file mode 100644 (file)
index 0000000..1e1e85e
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: branch bundle
+---
+
+A directory that contains an `_index.md` file and zero or more [resources](g). Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top level directories with or without `_index.md` files are also branch bundles. This includes the home page. See&nbsp;[details](/content-management/page-bundles/).
diff --git a/content/en/getting-started/glossary/build.md b/content/en/getting-started/glossary/build.md
new file mode 100644 (file)
index 0000000..b5eed66
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: 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.
diff --git a/content/en/getting-started/glossary/bundle.md b/content/en/getting-started/glossary/bundle.md
new file mode 100644 (file)
index 0000000..f301878
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: bundle
+---
+
+See [page bundle](g).
diff --git a/content/en/getting-started/glossary/cache.md b/content/en/getting-started/glossary/cache.md
new file mode 100644 (file)
index 0000000..139ce90
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: cache
+---
+
+A software component that stores data so that future requests for the same data are faster.
diff --git a/content/en/getting-started/glossary/chain.md b/content/en/getting-started/glossary/chain.md
new file mode 100644 (file)
index 0000000..b54c093
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: chain
+---
+
+Within a template, to connect one or more [identifiers](g) with a dot. An identifier can represent a method, object, or field. For example, `.Site.Params.author.name` or `.Date.UTC.Hour`.
diff --git a/content/en/getting-started/glossary/cjk.md b/content/en/getting-started/glossary/cjk.md
new file mode 100644 (file)
index 0000000..1f9e14e
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: CJK
+---
+
+A collective term for the Chinese, Japanese, and Korean languages. See [details](https://en.wikipedia.org/wiki/CJK_characters).
diff --git a/content/en/getting-started/glossary/cli.md b/content/en/getting-started/glossary/cli.md
new file mode 100644 (file)
index 0000000..11602f7
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: CLI
+---
+
+Command line interface.
diff --git a/content/en/getting-started/glossary/collection.md b/content/en/getting-started/glossary/collection.md
new file mode 100644 (file)
index 0000000..8ff9624
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: collection
+---
+
+An [array](g), [slice](g), or [map](g).
diff --git a/content/en/getting-started/glossary/content-adapter.md b/content/en/getting-started/glossary/content-adapter.md
new file mode 100644 (file)
index 0000000..a54a36f
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: content adapter
+---
+
+A template that dynamically creates pages when building a site. For example, use a content adapter to create pages from a remote data source such as JSON, TOML, YAML, or XML. See&nbsp;[details](/content-management/content-adapters/).
diff --git a/content/en/getting-started/glossary/content-format.md b/content/en/getting-started/glossary/content-format.md
new file mode 100644 (file)
index 0000000..5ed855b
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: content format
+---
+
+A markup language for creating content. Typically Markdown, but may also be HTML, AsciiDoc, Org, Pandoc, or reStructuredText. See&nbsp;[details](/content-management/formats/).
diff --git a/content/en/getting-started/glossary/content-type.md b/content/en/getting-started/glossary/content-type.md
new file mode 100644 (file)
index 0000000..9e8a720
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: content type
+---
+
+A classification of content inferred from the top-level directory name or the `type` set in [front matter](g). Pages in the root of the `content` directory, including the home page, are of type "page". Accessed via `.Page.Type` in [templates](g). See&nbsp;[details](/content-management/types/)
diff --git a/content/en/getting-started/glossary/content-view.md b/content/en/getting-started/glossary/content-view.md
new file mode 100644 (file)
index 0000000..a89c50b
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: content view
+---
+
+A template called with the `.Page.Render` method. See&nbsp;[details](/templates/content-view/).
diff --git a/content/en/getting-started/glossary/context.md b/content/en/getting-started/glossary/context.md
new file mode 100644 (file)
index 0000000..25faf47
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: context
+---
+
+Represented by a dot "." within a [template action](g), context is the current location in a data structure. For example, while iterating over a [collection](g) 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/#context).
diff --git a/content/en/getting-started/glossary/default-sort-order.md b/content/en/getting-started/glossary/default-sort-order.md
new file mode 100644 (file)
index 0000000..c0f55fb
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: default sort order
+---
+
+The default sort order for page collections. Hugo sorts by [weight](g), then by date (descending), then by link title, and then by file path.
diff --git a/content/en/getting-started/glossary/element.md b/content/en/getting-started/glossary/element.md
new file mode 100644 (file)
index 0000000..5c33c55
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: element
+---
+
+A member of a slice or array.
diff --git a/content/en/getting-started/glossary/environment.md b/content/en/getting-started/glossary/environment.md
new file mode 100644 (file)
index 0000000..9479605
--- /dev/null
@@ -0,0 +1,11 @@
+---
+title: 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 or the `HUGO_ENVIRONMENT` environment variable.
+
+To determine the current environment within a template, use the [`hugo.Environment`] function.
+
+[`hugo.Environment`]: /functions/hugo/environment/
diff --git a/content/en/getting-started/glossary/field.md b/content/en/getting-started/glossary/field.md
new file mode 100644 (file)
index 0000000..f49e65c
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: field
+---
+
+A predefined key-value pair in front matter such as `date` or `title`. See&nbsp;also&nbsp;[parameter](g).
diff --git a/content/en/getting-started/glossary/flag.md b/content/en/getting-started/glossary/flag.md
new file mode 100644 (file)
index 0000000..df9fd21
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: flag
+---
+
+An option passed to a command-line program, beginning with one or two hyphens. See&nbsp;[details](/commands/hugo/).
diff --git a/content/en/getting-started/glossary/float.md b/content/en/getting-started/glossary/float.md
new file mode 100644 (file)
index 0000000..86f2c8f
--- /dev/null
@@ -0,0 +1,6 @@
+---
+title: float
+alias: true
+---
+
+See [floating point](g).
diff --git a/content/en/getting-started/glossary/floating-point.md b/content/en/getting-started/glossary/floating-point.md
new file mode 100644 (file)
index 0000000..cdf5a22
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: floating point
+---
+
+A numeric data type with a fractional component. For example, `3.14159`.
diff --git a/content/en/getting-started/glossary/fragment.md b/content/en/getting-started/glossary/fragment.md
new file mode 100644 (file)
index 0000000..b1e3fd7
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: fragment
+---
+
+The final segment of a URL, beginning with a hash (`#`) mark, that references an `id` attribute of an HTML element on the page.
diff --git a/content/en/getting-started/glossary/front-matter.md b/content/en/getting-started/glossary/front-matter.md
new file mode 100644 (file)
index 0000000..d66e400
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: 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/).
diff --git a/content/en/getting-started/glossary/function.md b/content/en/getting-started/glossary/function.md
new file mode 100644 (file)
index 0000000..d07f4ae
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: function
+---
+
+Used within a [template action](g), a function takes one or more [arguments](g) and returns a value. Unlike [methods](g), functions are not associated with an [object](g). See&nbsp;[details](/functions/).
diff --git a/content/en/getting-started/glossary/global-resource.md b/content/en/getting-started/glossary/global-resource.md
new file mode 100644 (file)
index 0000000..e51e683
--- /dev/null
@@ -0,0 +1,10 @@
+---
+title: 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/
diff --git a/content/en/getting-started/glossary/headless-bundle.md b/content/en/getting-started/glossary/headless-bundle.md
new file mode 100644 (file)
index 0000000..60da816
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: headless bundle
+---
+
+An unpublished leaf or branch bundle whose content and resources you can include in other pages. See [build options](/content-management/build-options/).
diff --git a/content/en/getting-started/glossary/identifier.md b/content/en/getting-started/glossary/identifier.md
new file mode 100644 (file)
index 0000000..eeb17db
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: 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.
diff --git a/content/en/getting-started/glossary/int.md b/content/en/getting-started/glossary/int.md
new file mode 100644 (file)
index 0000000..1077ee5
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: int
+---
+
+See [integer](g).
diff --git a/content/en/getting-started/glossary/integer.md b/content/en/getting-started/glossary/integer.md
new file mode 100644 (file)
index 0000000..aa61f24
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: integer
+---
+
+A numeric data type without a fractional component. For example, `42`.
diff --git a/content/en/getting-started/glossary/internationalization.md b/content/en/getting-started/glossary/internationalization.md
new file mode 100644 (file)
index 0000000..aa65f8f
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: internationalization
+---
+
+Software design and development efforts that enable [localization](g). See the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated i18n.
diff --git a/content/en/getting-started/glossary/interpreted-string-literal.md b/content/en/getting-started/glossary/interpreted-string-literal.md
new file mode 100644 (file)
index 0000000..97bd8ae
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: interpreted string literal
+---
+
+Interpreted string literals are character sequences between double quotes, as in "foo". Within the quotes, any character may appear except a newline and an unescaped double quote. The text between the quotes forms the value of the literal, with backslash escapes interpreted. See [details](https://go.dev/ref/spec#String_literals).
diff --git a/content/en/getting-started/glossary/interval.md b/content/en/getting-started/glossary/interval.md
new file mode 100644 (file)
index 0000000..ad19a40
--- /dev/null
@@ -0,0 +1,11 @@
+---
+title: interval
+---
+
+An [interval](https://en.wikipedia.org/wiki/Interval_(mathematics)) is a range of numbers between two endpoints: closed, open, or half-open.
+
+- A _closed_ interval, denoted by brackets, includes its endpoints. For example, [0,&nbsp;1]&nbsp;is the interval where `0 <= x <= 1`.
+
+- An _open_ interval, denoted by parentheses, excludes its endpoints. For example, (0,&nbsp;1)&nbsp;is the interval where `0 < x < 1`.
+
+- A _half-open_ interval includes only one of its endpoints. For example, (0,&nbsp;1]&nbsp;is the _left-open_ interval where `0 < x <= 1`, while [0,&nbsp;1)&nbsp;is the _right-open_ interval where `0 <= x < 1`.
diff --git a/content/en/getting-started/glossary/kind.md b/content/en/getting-started/glossary/kind.md
new file mode 100644 (file)
index 0000000..1434e55
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: kind
+---
+
+See [page kind](g).
diff --git a/content/en/getting-started/glossary/layout.md b/content/en/getting-started/glossary/layout.md
new file mode 100644 (file)
index 0000000..706e943
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: layout
+---
+
+See [template](g).
diff --git a/content/en/getting-started/glossary/leaf-bundle.md b/content/en/getting-started/glossary/leaf-bundle.md
new file mode 100644 (file)
index 0000000..88d934c
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: leaf bundle
+---
+
+A directory that contains an index.md file and zero or more [resources](g). Analogous to a physical leaf, a leaf bundle is at the end of a branch. It has no descendants. See&nbsp;[details](/content-management/page-bundles/).
diff --git a/content/en/getting-started/glossary/lexer.md b/content/en/getting-started/glossary/lexer.md
new file mode 100644 (file)
index 0000000..93d2ed6
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: lexer
+---
+
+A software component that identifies keywords, identifiers, operators, numbers, and other basic building blocks of a programming language within the input text.
diff --git a/content/en/getting-started/glossary/list-page.md b/content/en/getting-started/glossary/list-page.md
new file mode 100644 (file)
index 0000000..f17e0ac
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: list page
+---
+
+Any [page kind](g) that receives a page [collection](g) in [context](g). This includes the home page, [section pages](g), [taxonomy pages](g), and [term pages](g).
diff --git a/content/en/getting-started/glossary/list-template.md b/content/en/getting-started/glossary/list-template.md
new file mode 100644 (file)
index 0000000..e3283ff
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: list template
+---
+
+Any template that renders a [list page](g). This includes [home](/templates/types/#home), [section](/templates/types/#section), [taxonomy](/templates/types/#taxonomy), and [term](/templates/types/#term) templates.
diff --git a/content/en/getting-started/glossary/localization.md b/content/en/getting-started/glossary/localization.md
new file mode 100644 (file)
index 0000000..d03dedd
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: localization
+---
+
+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.
diff --git a/content/en/getting-started/glossary/logical-path.md b/content/en/getting-started/glossary/logical-path.md
new file mode 100644 (file)
index 0000000..3a2c96f
--- /dev/null
@@ -0,0 +1,7 @@
+---
+title: logical path
+---
+
+{{< new-in 0.123.0 >}}
+
+A page or page resource identifier derived from the file path, excluding its extension and language identifier. This value is neither a file path nor a URL. Starting with a file path relative to the `content` directory, Hugo determines the logical path by stripping the file extension and language identifier, converting to lower case, then replacing spaces with hyphens. See [examples](/methods/page/path/#examples).
diff --git a/content/en/getting-started/glossary/map.md b/content/en/getting-started/glossary/map.md
new file mode 100644 (file)
index 0000000..aa80357
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: 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.
diff --git a/content/en/getting-started/glossary/markdown-attribute.md b/content/en/getting-started/glossary/markdown-attribute.md
new file mode 100644 (file)
index 0000000..ab9a984
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: 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).
diff --git a/content/en/getting-started/glossary/marshal.md b/content/en/getting-started/glossary/marshal.md
new file mode 100644 (file)
index 0000000..73c59e8
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: marshal
+---
+
+To transform a data structure into a serialized object. For example, transforming a [map](g) into a JSON string. See [unmarshal](g).
diff --git a/content/en/getting-started/glossary/method.md b/content/en/getting-started/glossary/method.md
new file mode 100644 (file)
index 0000000..960488b
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: method
+---
+
+Used within a [template action](g) and associated with an [object](g), a method takes zero or more [arguments](g) 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](g).
diff --git a/content/en/getting-started/glossary/module.md b/content/en/getting-started/glossary/module.md
new file mode 100644 (file)
index 0000000..13a3945
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: module
+---
+
+Like a [theme](g), a module is a packaged combination of [archetypes](g), assets, content, data, [templates](g), 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/).
diff --git a/content/en/getting-started/glossary/node.md b/content/en/getting-started/glossary/node.md
new file mode 100644 (file)
index 0000000..2cd1e7b
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: node
+---
+
+A class of [page kinds](g) including `home`, `section`, `taxonomy`, and `term`.
diff --git a/content/en/getting-started/glossary/noop.md b/content/en/getting-started/glossary/noop.md
new file mode 100644 (file)
index 0000000..bd159bb
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: noop
+---
+
+An abbreviated form of "no operation", a _noop_ is a statement that does nothing.
diff --git a/content/en/getting-started/glossary/object.md b/content/en/getting-started/glossary/object.md
new file mode 100644 (file)
index 0000000..ea19987
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: object
+---
+
+A data structure with or without associated [methods](g).
diff --git a/content/en/getting-started/glossary/ordered-taxonomy.md b/content/en/getting-started/glossary/ordered-taxonomy.md
new file mode 100644 (file)
index 0000000..7df5ebf
--- /dev/null
@@ -0,0 +1,8 @@
+---
+title: ordered taxonomy
+---
+
+Created by invoking the [`Alphabetical`] or [`ByCount`] method on a [`Taxonomy`](g) object, which is a [map](g), an _ordered taxonomy_ is a [slice](g), where each element is an object that contains the [term](g) and a slice of its [weighted pages](g).
+
+[`Alphabetical`]: /methods/taxonomy/alphabetical/
+[`ByCount`]: /methods/taxonomy/bycount/
diff --git a/content/en/getting-started/glossary/output-format.md b/content/en/getting-started/glossary/output-format.md
new file mode 100644 (file)
index 0000000..b4bab9c
--- /dev/null
@@ -0,0 +1,7 @@
+---
+title: output format
+---
+
+Hugo generates one or more files per page when building a site. For example, when rendering home, [section](g), [taxonomy](g), and [term](g) 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](g), or by enabling one or more output formats for one or more pages. See&nbsp;[details].
+
+[details]: /templates/output-formats/
diff --git a/content/en/getting-started/glossary/page-bundle.md b/content/en/getting-started/glossary/page-bundle.md
new file mode 100644 (file)
index 0000000..a82a3d2
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: page bundle
+---
+
+A directory that encapsulates both content and associated [resources](g). There are two types of page bundles: [leaf bundles](g) and [branch bundles](g). See&nbsp;[details](/content-management/page-bundles/).
diff --git a/content/en/getting-started/glossary/page-collection.md b/content/en/getting-started/glossary/page-collection.md
new file mode 100644 (file)
index 0000000..13f9eb9
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: page collection
+---
+
+A slice of `Page` objects.
diff --git a/content/en/getting-started/glossary/page-kind.md b/content/en/getting-started/glossary/page-kind.md
new file mode 100644 (file)
index 0000000..a71dbd6
--- /dev/null
@@ -0,0 +1,7 @@
+---
+title: page kind
+---
+
+A classification of pages, one of `home`, `page`, `section`, `taxonomy`, or `term`. See&nbsp;[details](/methods/page/kind/).
+
+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.
diff --git a/content/en/getting-started/glossary/page-resource.md b/content/en/getting-started/glossary/page-resource.md
new file mode 100644 (file)
index 0000000..324f094
--- /dev/null
@@ -0,0 +1,7 @@
+---
+title: page resource
+---
+
+A file within a [page bundle](g). Capture one or more page resources using any of the [`Resources`] methods on a `Page` object.
+
+[`Resources`]: /methods/page/resources/#methods
diff --git a/content/en/getting-started/glossary/pager.md b/content/en/getting-started/glossary/pager.md
new file mode 100644 (file)
index 0000000..206f812
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: pager
+---
+
+Created during [pagination](g), a pager contains a subset of a list page and navigation links to other pagers.
diff --git a/content/en/getting-started/glossary/paginate.md b/content/en/getting-started/glossary/paginate.md
new file mode 100644 (file)
index 0000000..1a0b54f
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: paginate
+---
+
+To split a list page into two or more subsets.
diff --git a/content/en/getting-started/glossary/pagination.md b/content/en/getting-started/glossary/pagination.md
new file mode 100644 (file)
index 0000000..a41f881
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: pagination
+---
+
+The process of [paginating](g) a list page. See&nbsp;[details](/templates/pagination/).
diff --git a/content/en/getting-started/glossary/paginator.md b/content/en/getting-started/glossary/paginator.md
new file mode 100644 (file)
index 0000000..0358a5a
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: paginator
+---
+
+A collection of [pagers](g).
diff --git a/content/en/getting-started/glossary/parameter.md b/content/en/getting-started/glossary/parameter.md
new file mode 100644 (file)
index 0000000..24adcd6
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: parameter
+---
+
+Typically, a user-defined key-value pair at the site or page level, but may also refer to a configuration setting or an [argument](g). See&nbsp;also&nbsp;[field](g).
diff --git a/content/en/getting-started/glossary/partial.md b/content/en/getting-started/glossary/partial.md
new file mode 100644 (file)
index 0000000..e4405d9
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: partial
+---
+
+A [template](g) called from any other template including [shortcodes](g), [render hooks](g), and other partials. A partial either renders something or returns something. A partial can also call itself, for example, to [walk](g) a data structure.
diff --git a/content/en/getting-started/glossary/permalink.md b/content/en/getting-started/glossary/permalink.md
new file mode 100644 (file)
index 0000000..ac3601b
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: permalink
+---
+
+The absolute URL of a published resource or a rendered page, including scheme and host.
diff --git a/content/en/getting-started/glossary/pipe.md b/content/en/getting-started/glossary/pipe.md
new file mode 100644 (file)
index 0000000..4daab19
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: pipe
+---
+
+See [pipeline](g).
diff --git a/content/en/getting-started/glossary/pipeline.md b/content/en/getting-started/glossary/pipeline.md
new file mode 100644 (file)
index 0000000..17ca834
--- /dev/null
@@ -0,0 +1,7 @@
+---
+title: pipeline
+---
+
+Within a [template action](g), a pipeline is a possibly chained sequence of values, [function](g) calls, or [method](g) calls. Functions and methods in the pipeline may take multiple [arguments](g).
+
+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.
diff --git a/content/en/getting-started/glossary/publish.md b/content/en/getting-started/glossary/publish.md
new file mode 100644 (file)
index 0000000..1a7a491
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: publish
+---
+
+See [build](g).
diff --git a/content/en/getting-started/glossary/raw-string-literal.md b/content/en/getting-started/glossary/raw-string-literal.md
new file mode 100644 (file)
index 0000000..add8a0c
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: raw string literal
+---
+
+Raw string literals are character sequences between backticks, as in \`bar\`. Within the backticks, any character may appear except a backtick. Backslashes have no special meaning and the string may contain newlines. Carriage return characters (`\r`) inside raw string literals are discarded from the raw string value. See [details](https://go.dev/ref/spec#String_literals).
diff --git a/content/en/getting-started/glossary/regular-page.md b/content/en/getting-started/glossary/regular-page.md
new file mode 100644 (file)
index 0000000..265a9cb
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: regular page
+---
+
+Content with the "page" [page kind](g). See also [section page](g).
diff --git a/content/en/getting-started/glossary/relative-permalink.md b/content/en/getting-started/glossary/relative-permalink.md
new file mode 100644 (file)
index 0000000..73d676f
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: relative permalink
+---
+
+The host-relative URL of a published resource or a rendered page.
diff --git a/content/en/getting-started/glossary/remote-resource.md b/content/en/getting-started/glossary/remote-resource.md
new file mode 100644 (file)
index 0000000..d0d00ea
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: remote resource
+---
+
+A file on a remote server, accessible via HTTP or HTTPS with the [`resources.GetRemote`](/functions/resources/getremote) function.
diff --git a/content/en/getting-started/glossary/render-hook.md b/content/en/getting-started/glossary/render-hook.md
new file mode 100644 (file)
index 0000000..bed5719
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: render hook
+---
+
+A [template](g) that overrides standard Markdown rendering. See&nbsp;[details](/render-hooks).
diff --git a/content/en/getting-started/glossary/resource-type.md b/content/en/getting-started/glossary/resource-type.md
new file mode 100644 (file)
index 0000000..d2543dd
--- /dev/null
@@ -0,0 +1,8 @@
+---
+title: resource type
+---
+
+The main type of a resource's [media type]. Content files such as Markdown, HTML, AsciiDoc, Pandoc, reStructuredText, and Emacs Org Mode have resource type `page`. Other resource types include `image`, `video`, etc. Retrieve the resource type using the [`ResourceType`] method on a `Resource` object.
+
+[media type]: /methods/resource/mediatype/
+[`ResourceType`]: /methods/resource/resourcetype/
diff --git a/content/en/getting-started/glossary/resource.md b/content/en/getting-started/glossary/resource.md
new file mode 100644 (file)
index 0000000..6de626a
--- /dev/null
@@ -0,0 +1,7 @@
+---
+title: 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.
+
+Hugo supports three types of resources: [global resources](g), [page resources](g), and [remote resources](g).
diff --git a/content/en/getting-started/glossary/scalar.md b/content/en/getting-started/glossary/scalar.md
new file mode 100644 (file)
index 0000000..d1e3cd2
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: scalar
+---
+
+A _scalar_ is a single value, one of [string](g), [integer](g), [floating point](g), or [boolean](g).
diff --git a/content/en/getting-started/glossary/scratch-pad.md b/content/en/getting-started/glossary/scratch-pad.md
new file mode 100644 (file)
index 0000000..fe1fc65
--- /dev/null
@@ -0,0 +1,8 @@
+---
+title: scratch pad
+---
+
+Conceptually, a [map](g) with [methods](g) to set, get, update, and delete values. Attach the data structure to a `Page` or `Site` object using the [`Store`] method, or create a locally scoped scratch pad using the [`newScratch`] function.
+
+[`Store`]: /methods/page/store/
+[`newScratch`]: /functions/collections/newscratch/
diff --git a/content/en/getting-started/glossary/section-page.md b/content/en/getting-started/glossary/section-page.md
new file mode 100644 (file)
index 0000000..0605270
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: section page
+---
+
+Content with the "section" [page kind](g). Typically a listing of [regular pages](g) and/or other section pages within the current [section](g).
diff --git a/content/en/getting-started/glossary/section.md b/content/en/getting-started/glossary/section.md
new file mode 100644 (file)
index 0000000..4e615b1
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: section
+---
+
+A section is a top-level content directory, or any content directory with an `_index.md` file. A content directory with an `_index.md` file is also known as a [branch bundle](g). Section templates receive one or more page [collections](g) in [context](g). See&nbsp;[details](/content-management/sections/).
diff --git a/content/en/getting-started/glossary/shortcode.md b/content/en/getting-started/glossary/shortcode.md
new file mode 100644 (file)
index 0000000..3bd6f19
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: shortcode
+---
+
+A [template](g)  called from within Markdown, taking zero or more [arguments](g). See&nbsp;[details](/content-management/shortcodes/).
diff --git a/content/en/getting-started/glossary/slice.md b/content/en/getting-started/glossary/slice.md
new file mode 100644 (file)
index 0000000..fa6bc3c
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: slice
+---
+
+A numbered sequence of elements. Unlike Go's [array](g)  data type, slices are dynamically sized. [Elements](g)  within a slice can be [scalars](g), [arrays](g), [maps](g), pages, or other slices. See the [Go&nbsp;documentation](https://go.dev/ref/spec#Slice_types) for details.
diff --git a/content/en/getting-started/glossary/string.md b/content/en/getting-started/glossary/string.md
new file mode 100644 (file)
index 0000000..daa3a4d
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: string
+---
+
+A sequence of bytes. For example, `"What is 6 times 7?"`.
diff --git a/content/en/getting-started/glossary/taxonomic-weight.md b/content/en/getting-started/glossary/taxonomic-weight.md
new file mode 100644 (file)
index 0000000..7dcb808
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: taxonomic weight
+---
+
+Defined in front matter and unique to each taxonomy, this [weight](g)  determines the sort order of page collections contained within a [`Taxonomy`](g)  object. See&nbsp;[details](/content-management/taxonomies/#order-taxonomies).
diff --git a/content/en/getting-started/glossary/taxonomy-object.md b/content/en/getting-started/glossary/taxonomy-object.md
new file mode 100644 (file)
index 0000000..31315b9
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: taxonomy object
+---
+
+A [map](g)  of [terms](g)  and the [weighted pages](g)  associated with each term.
diff --git a/content/en/getting-started/glossary/taxonomy-page.md b/content/en/getting-started/glossary/taxonomy-page.md
new file mode 100644 (file)
index 0000000..bf1b4aa
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: taxonomy page
+---
+
+Content with the "taxonomy" [page kind](g). Typically a listing of [terms](g) within a given [taxonomy](g).
diff --git a/content/en/getting-started/glossary/taxonomy.md b/content/en/getting-started/glossary/taxonomy.md
new file mode 100644 (file)
index 0000000..f7d3835
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: taxonomy
+---
+
+A group of related [terms](g)  used to classify content. For example, a "colors" taxonomy might include the terms "red", "green", and "blue". See&nbsp;[details](/content-management/taxonomies/).
diff --git a/content/en/getting-started/glossary/template-action.md b/content/en/getting-started/glossary/template-action.md
new file mode 100644 (file)
index 0000000..ac5fad8
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: template action
+---
+
+A data evaluation or control structure within a [template](g), delimited by "{{"&nbsp;and&nbsp;"}}". See the [Go&nbsp;documentation](https://pkg.go.dev/text/template#hdr-Actions) for details.
diff --git a/content/en/getting-started/glossary/template.md b/content/en/getting-started/glossary/template.md
new file mode 100644 (file)
index 0000000..b8b0460
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: template
+---
+
+A file with [template actions](g), located within the `layouts` directory of a project, theme, or module. See&nbsp;[details](/templates/).
diff --git a/content/en/getting-started/glossary/term-page.md b/content/en/getting-started/glossary/term-page.md
new file mode 100644 (file)
index 0000000..ed9bfec
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: term page
+---
+
+Content with the "term" [page kind](g). Typically a listing of [regular pages](g) and [section pages](g) with a given [term](g).
diff --git a/content/en/getting-started/glossary/term.md b/content/en/getting-started/glossary/term.md
new file mode 100644 (file)
index 0000000..d04f58b
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: term
+---
+
+A member of a [taxonomy](g), used to classify content. See&nbsp;[details](/content-management/taxonomies/).
diff --git a/content/en/getting-started/glossary/theme.md b/content/en/getting-started/glossary/theme.md
new file mode 100644 (file)
index 0000000..e5c6ee9
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: theme
+---
+
+A packaged combination of [archetypes](g), assets, content, data, [templates](g), 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](g).
diff --git a/content/en/getting-started/glossary/token.md b/content/en/getting-started/glossary/token.md
new file mode 100644 (file)
index 0000000..0a5ac22
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: 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).
diff --git a/content/en/getting-started/glossary/type.md b/content/en/getting-started/glossary/type.md
new file mode 100644 (file)
index 0000000..dbc692e
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: type
+---
+
+See [content type](g).
diff --git a/content/en/getting-started/glossary/unmarshal.md b/content/en/getting-started/glossary/unmarshal.md
new file mode 100644 (file)
index 0000000..15db995
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: unmarshal
+---
+
+To transform a serialized object into a data structure. For example, transforming a JSON file into a [map](g) that you can access within a template. See [marshal](g).
diff --git a/content/en/getting-started/glossary/variable.md b/content/en/getting-started/glossary/variable.md
new file mode 100644 (file)
index 0000000..5a80f4e
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: variable
+---
+
+A user-defined [identifier](g) prepended with a `$` symbol, representing a value of any data type, initialized or assigned within a [template action](g). For example, `$foo`&nbsp;and&nbsp;`$bar` are variables.
diff --git a/content/en/getting-started/glossary/walk.md b/content/en/getting-started/glossary/walk.md
new file mode 100644 (file)
index 0000000..8114951
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: walk
+---
+
+To recursively traverse a nested data structure. For example, rendering a multilevel menu.
diff --git a/content/en/getting-started/glossary/weight.md b/content/en/getting-started/glossary/weight.md
new file mode 100644 (file)
index 0000000..5c04e6e
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: 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.
diff --git a/content/en/getting-started/glossary/weighted-page.md b/content/en/getting-started/glossary/weighted-page.md
new file mode 100644 (file)
index 0000000..88ec816
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: weighted page
+---
+
+Contained within a [`Taxonomy`](g) object, a weighted page is a [map](g) with two elements: a `Page` object, and its [taxonomic weight](g) as defined in front matter. Access the elements using the `Page` and `Weight` keys.
diff --git a/content/en/getting-started/glossary/zero-time.md b/content/en/getting-started/glossary/zero-time.md
new file mode 100644 (file)
index 0000000..9701f39
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: zero time
+---
+
+The _zero time_ is January 1, 0001, 00:00:00 UTC. Formatted per [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) the _zero time_ is 0001-01-01T00:00:00-00:00.
index bdb3247ba97ffd87323f1a7a1d107c96904f8ca0..cb22e0121df99f9b43ee1ffc3c2557e27c514d6d 100644 (file)
@@ -16,9 +16,9 @@ minVersion: v0.128.0
 In this tutorial you will:
 
 1. Create a site
-2. Add content
-3. Configure the site
-4. Publish the site
+1. Add content
+1. Configure the site
+1. Publish the site
 
 ## Prerequisites
 
@@ -174,10 +174,8 @@ 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.
+1. Set the `languageCode` to your language and region.
+1. Set the `title` for your production site.
 
 Start Hugo's development server to see your changes, remembering to include draft content.
 
index dbbccc6f029eed31454c1ff8f6e19b11dc1ce44f..2e67ecb7ed67c297c8482437b4fd0e5d09a65e12 100644 (file)
@@ -53,7 +53,7 @@ The [`hugo`] command builds your site, publishing the files to the `public` dire
 {{% 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.
+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
@@ -68,11 +68,10 @@ Hugo allows you to set `draft`, `date`, `publishDate`, and `expiryDate` in the [
 {{< new-in 0.123.0 >}}
 
 {{% note %}}
-Hugo publishes descendants of draft, future, and expired [node] pages. To prevent publication of these descendants, use the [`cascade`] front matter field to cascade [build options] to the descendant pages.
+Hugo publishes descendants of draft, future, and expired [node](g) pages. To prevent publication of these descendants, use the [`cascade`] front matter field to cascade [build options] to the descendant pages.
 
 [build options]: /content-management/build-options/
 [`cascade`]: /content-management/front-matter/#cascade-field
-[node]: /getting-started/glossary/#node
 {{% /note %}}
 
 You can override the default behavior when running `hugo` or `hugo server` with command line flags:
@@ -124,7 +123,7 @@ 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.
+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:
@@ -133,7 +132,7 @@ When you are ready to deploy your site, run:
 hugo
 ```
 
-This builds your site, publishing the files to the public directory. The directory structure will look something like this:
+This builds your site, publishing the files to the `public` directory. The directory structure will look something like this:
 
 ```text
 public/
@@ -159,7 +158,7 @@ Most of our users deploy their sites using a CI/CD workflow, where a push[^1] to
 
 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.
+[^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/
index 06f250b377ac489524be5cc4f5b0354d2c590bf6..8fb428686e05ec8595b9ba5548e388ed969e525a 100644 (file)
@@ -91,7 +91,7 @@ USER=my-user
 HOST=my-server.com
 DIR=my/directory/to/topologix.fr/   # the directory where your website 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 
+hugo && rsync -avz --delete public/ ${USER}@${HOST}:~/${DIR} # this will delete everything on the server that's not in the local public directory 
 
 exit 0
 ```
index 2ab0a196480da21170811e19ce1d564af903cdbe..4b02995e08403761adf1b6bfbd0dcfa1302da3f2 100644 (file)
@@ -31,7 +31,7 @@ This guide assumes you already have a Hugo project to deploy. If you need a proj
 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:
+1. Use the following values during creation:
 
    |    Field              | Value                                            |
    | --------------------- | ------------------------------------------------ |
index b1a0f468cdf943858dba7a4844c6d44354e91281..3172ecb8326352a4f0a48dc460eaa0eb8e9f976b 100644 (file)
@@ -14,10 +14,10 @@ toc: true
 Please complete the following tasks before continuing:
 
 1. [Create an AWS account]
-2. [Install Git]
-3. [Create a Hugo site] and test it locally with `hugo server`
-4. Commit the changes to your local repository
-5. Push the local repository to your [GitHub], [GitLab], or [Bitbucket] account
+1. [Install Git]
+1. [Create a Hugo site] and test it locally with `hugo server`
+1. Commit the changes to your local repository
+1. Push the local repository to your [GitHub], [GitLab], or [Bitbucket] account
 
 [Bitbucket]: https://bitbucket.org/product
 [Create a Hugo site]: /getting-started/quick-start/
index 45adeda1fa0da8386522d79e80bad383662875df..6c62fb29d02fb984e8d42f2b0443a7f219fc584d 100644 (file)
@@ -15,8 +15,8 @@ aliases: [/tutorials/github-pages-blog/]
 Please complete the following tasks before continuing:
 
 1. [Create a GitHub account]
-2. [Install Git]
-3. [Create a Hugo site] and test it locally with `hugo server`.
+1. [Install Git]
+1. [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
@@ -100,7 +100,7 @@ jobs:
   build:
     runs-on: ubuntu-latest
     env:
-      HUGO_VERSION: 0.137.1
+      HUGO_VERSION: 0.141.0
     steps:
       - name: Install Hugo CLI
         run: |
index 361a40e801a0d88ee50ce2b57308ac01f15558a0..97694f21006fd44a9649ca55c610482b52b36629 100644 (file)
@@ -14,10 +14,10 @@ toc: true
 Please complete the following tasks before continuing:
 
 1. [Create a Netlify account]
-2. [Install Git]
-3. [Create a Hugo site] and test it locally with `hugo server`
-4. Commit the changes to your local repository
-5. Push the local repository to your [GitHub], [GitLab], or [Bitbucket] account
+1. [Install Git]
+1. [Create a Hugo site] and test it locally with `hugo server`
+1. Commit the changes to your local repository
+1. Push the local repository to your [GitHub], [GitLab], or [Bitbucket] account
 
 [Bitbucket]: https://bitbucket.org/product
 [Create a Hugo site]: /getting-started/quick-start/
@@ -103,7 +103,8 @@ Create a new file named netlify.toml in the root of your project directory. In i
 
 {{< code file=netlify.toml >}}
 [build.environment]
-HUGO_VERSION = "0.137.1"
+HUGO_VERSION = "0.141.0"
+NODE_VERSION = "22"
 TZ = "America/Los_Angeles"
 
 [build]
@@ -115,8 +116,9 @@ If your site requires Dart Sass to transpile Sass to CSS, the configuration file
 
 {{< code file=netlify.toml >}}
 [build.environment]
-HUGO_VERSION = "0.137.1"
-DART_SASS_VERSION = "1.80.6"
+HUGO_VERSION = "0.141.0"
+DART_SASS_VERSION = "1.83.4"
+NODE_VERSION = "22"
 TZ = "America/Los_Angeles"
 
 [build]
index ea42da39f0925f56d641fbabafaf710900a9d1ff..f33dab50e49506ea0023c55e211340dfd6596369 100644 (file)
@@ -34,7 +34,6 @@ This feature requires the Hugo extended/deploy edition. See the [installation] s
   * 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
@@ -82,7 +81,6 @@ configuration.
 
 See `hugo help deploy` or [the deploy command-line documentation][commandline] for more command-line options.
 
-
 ### How the file list works
 
 The first thing `hugo deploy` does is create file lists for local and remote by
@@ -95,7 +93,6 @@ the [deployment target's configuration][config] --
 * If the configuration specifies an `exclude` pattern, files matching the
   pattern are skipped.
 
-
 {{% note %}}
 When creating the local file list, a few additional skips apply: first, Hugo always
 skips files named `.DS_Store`. 
@@ -107,8 +104,6 @@ traverse into them, except for the special [hidden directory named
 traversed if it exists.
 {{% /note %}}
 
-
-
 ### How the local and remote file lists are compared
 
 In the second step, Hugo compares the two file lists to figure out what changes
@@ -175,8 +170,8 @@ URL = "<FILL ME IN>"
 # Azure Blob Storage; see https://gocloud.dev/howto/blob/#azure
 #URL = "azblob://$web"
 
-# You can use a "prefix=" query parameter to target a subfolder of the bucket:
-#URL = "gs://<Bucket Name>?prefix=a/subfolder/"
+# You can use a "prefix=" query parameter to target a subdirectory of the bucket:
+#URL = "gs://<Bucket Name>?prefix=a/subdirectory/"
 
 # If you are using a CloudFront CDN, deploy will invalidate the cache as needed.
 #cloudFrontDistributionID = "<FILL ME IN>"
index 01fc21e50ac40d488680577522d7decbce4d4410..87ce33a6ca470bbb0bc2172d1ab07a5e6387b545 100644 (file)
@@ -25,5 +25,5 @@ Hugo Modules are powered by Go Modules. For more information about Go Modules, s
 
 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/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 directory 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 cd51614b623e2da5866faf4e778aeb865177cfb6..c6d8c390008ada956bedee45dc4ed9f93f10424b 100644 (file)
@@ -91,7 +91,7 @@ extended
 {{< /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.
+: 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` directory.
 
 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.
@@ -103,7 +103,7 @@ 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.
+:  Do not mount any directory in this import.
 
 noVendor
 :  Never vendor this import (only allowed in main project).
@@ -151,7 +151,7 @@ source
 : (`string`) The source directory of the mount. For the main project, this can be either project-relative or absolute. For other modules it must be project-relative.
 
 target
-: (`string`) 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`.
+: (`string`) Where it should be mounted into Hugo's virtual filesystem. It must start with one of Hugo's component directories: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, or `archetypes`. E.g. `content/blog`.
 
 disableWatch
 {{< new-in 0.128.0 >}}
index 947a0ff7908b8ec0ac2ed59600e27f7212fac0f5..9e52620ce9f3a8981f095bf17e625e2e0e71db91 100644 (file)
@@ -32,7 +32,7 @@ Hugo uses two different algorithms to merge the file systems, depending on the f
 * 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.
+The name used in the `theme` definition above must match a directory 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:
 
index d14379a1068edc5736d8db7bc0fc95b213a9c8da..6af96c99215c3501e8405b39f4195a58f54c29c6 100644 (file)
@@ -31,7 +31,7 @@ Also see the [CLI Doc](/commands/hugo_mod_init/).
 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:
+1. Import the theme:
 
 {{< code-toggle file=hugo >}}
 [module]
@@ -107,12 +107,12 @@ 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.
+`hugo mod vendor` will write all the module dependencies to a `_vendor` directory, 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.
+* Vendoring will not store modules stored in your `themes` directory.
 * 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/).
index 0e64303113b475e665feebdcb4acea5d456c9cd7..6451711533a53b61b7f31cce283e8d0307880dd7 100755 (executable)
@@ -18,7 +18,7 @@ aliases: [/assets/]
 This is about global and remote resources.
 
 global resource
-: A file within the assets directory, or within any directory [mounted] to the assets directory.
+: A file within the `assets` directory, or within any directory [mounted] to the `assets` directory.
 
 remote resource
 : A file on a remote server, accessible via HTTP or HTTPS.
@@ -51,7 +51,7 @@ 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.
+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.
 
 ## Asset publishing
 
index f5b8cb4e4a2dc734be5a53f100882f560ca5606d..88b0f005f7178fe7b77db4d3bad9656e759998ab 100644 (file)
@@ -11,5 +11,4 @@ menu:
 weight: 60
 ---
 
-
 See [JS functions](/functions/js/).
index 57c71e8ab915589396748254b0f2becb617de78e..5a0a5797e7f31b737147bfd66f5f1cff1ff91d97 100755 (executable)
@@ -23,7 +23,7 @@ A prime use case for this is [CSS purging with PostCSS](#css-purging-with-postcs
 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:
+1. 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" }}
@@ -37,7 +37,7 @@ There are currently two limitations to this:
 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).
+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]
@@ -88,7 +88,7 @@ HUGO_ENVIRONMENT
 : The value e.g. set with `hugo -e production` (defaults to `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:
+: 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 directory from PostCSS when running the server, you could run the server with one of these flags:
 
 ```sh
 hugo server --renderToDisk
index 886488ca6a714f2b40fb2ac0254df92c1a49456e..a7f790c8a07cdc87a2c9b532b4a02e5aad146034 100644 (file)
@@ -117,7 +117,7 @@ Run `hugo env` to list the active transpilers.
 
 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.
+[^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
 
@@ -136,8 +136,8 @@ To install Dart Sass for your builds on GitLab Pages, the `.gitlab-ci.yml` file
 
 ```yaml
 variables:
-  HUGO_VERSION: 0.137.1
-  DART_SASS_VERSION: 1.80.6
+  HUGO_VERSION: 0.141.0
+  DART_SASS_VERSION: 1.83.4
   GIT_DEPTH: 0
   GIT_STRATEGY: clone
   GIT_SUBMODULE_STRATEGY: recursive
@@ -170,8 +170,9 @@ To install Dart Sass for your builds on Netlify, the `netlify.toml` file should
 
 ```toml
 [build.environment]
-HUGO_VERSION = "0.137.1"
-DART_SASS_VERSION = "1.80.6"
+HUGO_VERSION = "0.141.0"
+DART_SASS_VERSION = "1.83.4"
+NODE_VERSION = "22"
 TZ = "America/Los_Angeles"
 
 [build]
index 14479d00446cdc7f9e2cfad04d559908c7aa5657..ba59d0f2a7707d5cd721abc85e5b3db1951aa2a1 100644 (file)
@@ -121,8 +121,7 @@ To install the extended edition of Hugo on [Exherbo]:
    www-apps/hugo extended
    ```
 
-2. Install using the Paludis package manager:
-
+1. Install using the Paludis package manager:
 
    ```sh
    cave resolve -x repository/heirecka
@@ -151,7 +150,7 @@ Derivatives of the [Gentoo] distribution of Linux include [Calculate Linux], [Fu
     www-apps/hugo extended
     ```
 
-2. Build using the Portage package manager:
+1. Build using the Portage package manager:
 
     ```sh
     sudo emerge www-apps/hugo
index 5d99d628cf46bbaa9c67ffde5be7e686044a5ae8..368579796647f85bad5fcb193294a014146b274e 100644 (file)
@@ -54,7 +54,6 @@ In almost also scenarios you should use the [`URL`] method instead.
 [`URL`]: /methods/menu-entry/url/
 {{% /note %}}
 
-
 Consider this content structure:
 
 ```text
@@ -99,7 +98,6 @@ In the above note that the `href` attribute of the second `anchor` element is bl
 
 With this template code:
 
-
 {{< code file=layouts/partials/menu.html >}}
 <ul>
   {{ range .Site.Menus.main }}
index 5c1d3c2d03e46852bb11da7b625586a4897a2381..4d3e8bdaf2ed12951fc070f63f53e1284b952fc0 100644 (file)
@@ -32,7 +32,6 @@ weight = 30
 
 With this template:
 
-
 ```go-html-template
 <ul>
   {{ range .Site.Menus.main }}
index bf3ec044aafb6755675975cd5ce9e3de892bbfb4..47db9153e82c6c3e36f151dc1900ea3f322c0ab6 100644 (file)
@@ -11,7 +11,6 @@ action:
 
 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 }}
index 3774619bee0b7b32215446a5935ffb6a7cbaae7d..7ba27031a015a3ac6b35861b1c79367700cc12bf 100644 (file)
@@ -9,9 +9,7 @@ action:
   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
+The `ByWeight` method returns the given menu with its entries sorted by [`weight`](g), then by `name`, then by `identifier`. This is the default sort order.
 
 Consider this menu definition:
 
index b48d1adf4a24a889fa0c3f70bedc4998431350d2..03e14e287abd47a8046ef5e91fb5469dd70764f2 100644 (file)
@@ -10,7 +10,7 @@ action:
   signatures: [PAGE.AlternativeOutputFormats]
 ---
 
-{{% include "methods/page/_common/output-format-definition.md" %}}
+{{% glossary-term "output format" %}}
 
 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/).
 
index 5254757eeff135cfa624c4f7c75543e885d9947e..b7d15ce4c0e9c408dc365cb689d35b37baee6265 100644 (file)
@@ -9,7 +9,7 @@ action:
   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/).
+A page bundle is a directory that encapsulates both content and associated [resources](g). There are two types of page bundles: [leaf bundles](g) and [branch bundles](g). 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.
 
@@ -31,7 +31,3 @@ 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 7049feb47d4e01f63b2960c5fe681ef804900ad2..17ec652c115e927f5770a0d55a9061045194da9a 100644 (file)
@@ -19,11 +19,7 @@ action:
 {{% 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
+The current section of a [section page](g), [taxonomy page](g), [term page](g), or the home page, is itself.
 {{% /note %}}
 
 Consider this content structure:
index b8259ffa879d3866487ee6fb499d9119bd1d6ef6..b3df243c559d9387ad413b40a7053344d784fee0 100644 (file)
@@ -10,20 +10,16 @@ action:
 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
+The `Data` method on a `Page` object returns a unique data object for each [page kind](g).
 
 {{% note %}}
-The `Data` method is only useful within [taxonomy] and [term] templates.
+The `Data` method is only useful within [taxonomy](g) and [term](g) 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:
@@ -65,7 +61,7 @@ Plural
 ```
 
 Terms
-: (`page.Taxonomy`) Returns the `Taxonomy` object, consisting of a map of terms and the [weighted pages] associated with each term.
+: (`page.Taxonomy`) Returns the `Taxonomy` object, consisting of a map of terms and the [weighted pages](g) associated with each term.
 
 ```go-html-template
 {{ $taxonomyObject := .Data.Terms }} 
@@ -108,4 +104,3 @@ Learn more about [term templates].
 
 [taxonomy templates]: /templates/types/#taxonomy
 [term templates]: /templates/types/#term
-[weighted pages]: /getting-started/glossary/#weighted-page
index d591715771585a1f12b83f703c7c9e357142cb0f..a5b30ddb06f103ef70142a59dc0c90d7085aec7c 100644 (file)
@@ -10,9 +10,9 @@ action:
 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.
+By default, not all pages are backed by a file, including top level [section pages](g), [taxonomy pages](g), and [term pages](g). 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:
+To back one of the pages above with a file, create an `_index.md` file in the corresponding directory. For example:
 
 ```text
 content/
@@ -195,7 +195,3 @@ Without a backing file, Hugo will throw an error if you attempt to access a `.Fi
   {{ .ContentBaseName }}
 {{ end }}
 ```
-
-[section]: /getting-started/glossary/#section
-[taxonomy]: /getting-started/glossary/#taxonomy
-[term]: /getting-started/glossary/#term
index 0bc6b651ce2356a88e8d7579893a21537ed716a9..581cbf7c38002cf0020cabd21b27daab8873afa9 100644 (file)
@@ -11,9 +11,7 @@ action:
 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.
+In a URL, whether absolute or relative, the [fragment](g) links to an `id` attribute of an HTML element on the page.
 
 ```text
 /articles/article-1#section-2
@@ -21,9 +19,9 @@ In a URL, whether absolute or relative, the [fragment] links to an `id` attribut
        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.
+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](g) 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.
+Use the `Fragments` method on a `Page` object to create a table of contents with the `Fragments.ToHTML` method, or by [walking](g) the `Fragments.Map` data structure.
 
 ## Methods
 
@@ -34,7 +32,6 @@ Headings
 <pre>{{ debug.Dump .Fragments.Headings }}</pre>
 ```
 
-
 HeadingsMap
 : (`map`) A nested map of all headings on the page. Each map contains the following keys: `ID`, `Level`, `Title` and `Headings`. To inspect the data structure:
 
@@ -50,7 +47,7 @@ Identifiers
 ```
 
 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].
+: (`bool`) Reports whether one or more headings on the page has the given `id` attribute, useful for validating fragments within a link [render hook](g).
 
 ```go-html-template
 {{ .Fragments.Identifiers.Contains "section-2" }} → true
@@ -98,10 +95,6 @@ When using the `Fragments` methods within a shortcode, call the shortcode using
 {{% /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 3d8a9a89bb16b01dd8847f5611a6b93c26cd8ce8..7c71c5afa14db29dd42af26989212dd0686c53f9 100644 (file)
@@ -15,7 +15,7 @@ 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.
+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.
 
index b3124b3f507539415963ddb941c6d007a378114b..75ceb2239759ec825ff1af82facacb04e8c090bd 100644 (file)
@@ -73,7 +73,7 @@ In the examples above we are coding defensively using the [`with`] statement, re
 
 ## 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:
+Inside of the `with` block, the [context](g) (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" }}
@@ -97,6 +97,5 @@ Use the `$` to get the context passed into the template.
 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 8ace8463c4609ebbe32d2d52137d02196981b520..17764fbe706364e936849932febf5fbfb27bdb1a 100644 (file)
@@ -71,7 +71,7 @@ In the examples above we are coding defensively using the [`with`] statement, re
 
 ## 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:
+Inside of the `with` block, the [context](g) (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" }}
@@ -95,6 +95,5 @@ Use the `$` to get the context passed into the template.
 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 2c0599d915e7d6e0eec9cb27c58a262005a20086..f2fc7e33915c60217ed6c1a2e27031b23f3f92ff 100644 (file)
@@ -70,7 +70,7 @@ In the examples above we are coding defensively using the [`with`] statement, re
 
 ## 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:
+Inside of the `with` block, the [context](g) (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" }}
@@ -94,6 +94,5 @@ Use the `$` to get the context passed into the template.
 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 b688f88c0e6f1479ed537d87c66c2a33f74b52d8..16b04034f32cd3b8b4186794b2e53a3b414c8c71 100644 (file)
@@ -12,7 +12,7 @@ action:
   signatures: [PAGE.IsHome]
 ---
 
-The `IsHome` method on a `Page` object returns `true` if the [page kind] is `home`.
+The `IsHome` method on a `Page` object returns `true` if the [page kind](g) is `home`.
 
 ```text
 content/
@@ -27,5 +27,3 @@ content/
 ```go-html-template
 {{ .IsHome }}
 ```
-
-[page kind]: /getting-started/glossary/#page-kind
index dfdf435c50da9843685ea1b4cad0feb27c76c8f7..5335ef376fe5d8114303e2b8f52f84aee278490f 100644 (file)
@@ -12,7 +12,7 @@ action:
   signatures: [PAGE.IsNode]
 ---
 
-The `IsNode` method on a `Page` object returns `true` if the [page kind] is `home`, `section`, `taxonomy`, or `term`.
+The `IsNode` method on a `Page` object returns `true` if the [page kind](g) is `home`, `section`, `taxonomy`, or `term`.
 
 It returns `false` is the page kind is `page`.
 
@@ -33,4 +33,3 @@ content/
 ```go-html-template
 {{ .IsNode }}
 ```
-[page kind]: /getting-started/glossary/#page-kind
index 672ee61f47e8a8c003674cbeb05acedbdbc1d724..92e6101d9329e44ace1d8497125895775d0e9787 100644 (file)
@@ -12,7 +12,7 @@ action:
   signatures: [PAGE.IsPage]
 ---
 
-The `IsPage` method on a `Page` object returns `true` if the [page kind] is `page`.
+The `IsPage` method on a `Page` object returns `true` if the [page kind](g) is `page`.
 
 ```text
 content/
@@ -27,5 +27,3 @@ content/
 ```go-html-template
 {{ .IsPage }}
 ```
-
-[page kind]: /getting-started/glossary/#page-kind
index b02e58a4521d453f50d6f7325808521afacd7684..965e466cde4569be22508dd38ef62854afdac41b 100644 (file)
@@ -12,7 +12,7 @@ action:
   signatures: [PAGE.IsSection]
 ---
 
-The `IsSection` method on a `Page` object returns `true` if the [page kind] is `section`.
+The `IsSection` method on a `Page` object returns `true` if the [page kind](g) is `section`.
 
 ```text
 content/
@@ -27,5 +27,3 @@ content/
 ```go-html-template
 {{ .IsSection }}
 ```
-
-[page kind]: /getting-started/glossary/#page-kind
index 6a8f3f69e03e82eba9682b43deaf381817b792a9..47019a52c9448bb5ba3903415ca3cca57181d789 100644 (file)
@@ -46,13 +46,13 @@ content/
 └── _index.md
 ```
 
-When rendering content/en/books/book-1.md:
+When rendering `content/en/books/book-1.md`:
 
 ```go-html-template
 {{ .IsTranslated }} → true
 ```
 
-When rendering content/en/books/book-2.md:
+When rendering `content/en/books/book-2.md`:
 
 ```go-html-template
 {{ .IsTranslated }} → false
index d901e9a7d395b9b7f17408984a5f3006cf7279c5..c5b0c6b9d31303c56cb1425894e611cf7f9064bc 100644 (file)
@@ -10,7 +10,7 @@ action:
   signatures: [PAGE.Kind]
 ---
 
-The [page kind] is one of `home`, `page`, `section`, `taxonomy`, or `term`.
+The [page kind](g) is one of `home`, `page`, `section`, `taxonomy`, or `term`.
 
 ```text
 content/
@@ -31,5 +31,3 @@ To get the value within a template:
 ```go-html-template
 {{ .Kind }}
 ```
-
-[page kind]: /getting-started/glossary/#page-kind
index 03343cf8c078a76dab3ddce09d95634ef7989900..a6d014a9325226809af2ecf361198d4a6fb20b59 100644 (file)
@@ -11,7 +11,7 @@ action:
 toc: true
 ---
 
-{{% include "methods/page/_common/output-format-definition.md" %}}
+{{% glossary-term "output format" %}}
 
 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/).
 
index 4d81c04ef26ff0ee7bada7306a708c652d8b98fc..1d6867792a06a6867ff959287b983e1cd8630780 100644 (file)
@@ -9,13 +9,13 @@ action:
   signatures: [PAGE.Page]
 ---
 
-This is a convenience method, useful within partial templates that are called from both [shortcodes] and page templates.
+This is a convenience method, useful within partial templates that are called from both [shortcodes](g) 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`.
+When the shortcode calls the partial, it passes the current [context](g) (the dot). The context includes identifiers such as `Page`, `Params`, `Inner`, and `Name`.
 
 {{< code file=layouts/_default/single.html  >}}
 {{ partial "my-partial.html" . }}
@@ -34,7 +34,3 @@ 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 d446292e2fc4dc3492d718d52d85994e091dff4c..c376bc3b599a3ee04463727d99ce21ab144aa821 100644 (file)
@@ -11,7 +11,7 @@ action:
   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].
+The `Pages` method on a `Page` object is available to these [page kinds](g): `home`, `section`, `taxonomy`, and `term`. The templates for these page kinds receive a page [collection](g) in [context](g).
 
 Range through the page collection in your template:
 
@@ -70,7 +70,7 @@ When rendering lesson-2, the `Pages` method returns:
     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.
+In the last example, the collection includes pages in the resources subdirectory. That directory is not a [section](g)---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].
@@ -83,8 +83,3 @@ When used with a `Site` object, the `Pages` method recursively returns all pages
   <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 02daa64b4417efb60e82ba775cd54bbe177e2878..9d98fbb2f187fbab375cd739bad9da009d542693 100644 (file)
@@ -41,10 +41,10 @@ You can invoke pagination on the [home template], [section templates], [taxonomy
 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 embedded pagination template to create navigation links between pagers
+1. Sort the collection by title
+1. Paginate the collection, with 7 elements per pager
+1. Range over the paginated page collection, rendering a link to each page
+1. Call the embedded pagination template to create 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.
index 3dd9590060b12f13757f407f05067d57b9aaf12b..c3161da6c67cbb95a415dbb4ed5c3f4b40346a60 100644 (file)
@@ -16,13 +16,12 @@ The number of elements on each pager is determined by your [site configuration].
 
 [site configuration]: /getting-started/configuration/#pagination
 
-You can invoke pagination on the [home template], [section templates], [taxonomy templates], and [term templates]. Each of these receives a collection of regular pages in [context]. When you invoke the `Paginator` method, it paginates the page collection received in context.
+You can invoke pagination on the [home template], [section templates], [taxonomy templates], and [term templates]. Each of these receives a collection of regular pages in [context](g). When you invoke the `Paginator` method, it paginates the page collection received in context.
 
 [home template]: /templates/types/#home
 [section templates]: /templates/types/#section
 [taxonomy templates]: /templates/types/#taxonomy
 [term templates]: /templates/types/#term
-[context]: /getting-started/glossary/#context
 
 {{< code file=layouts/_default/list.html >}}
 {{ range .Paginator.Pages }}
index 219b5de9d7b017727621e01299e92a4c61dd3d97..faeda450431c366b69b2b95d1cd23d2406818127 100644 (file)
@@ -26,7 +26,7 @@ display_related = true
 
 The `title` and `date` fields are standard parameters---the other fields are user-defined.
 
-Access the custom parameters by [chaining] the [identifiers]:
+Access the custom parameters by [chaining](g) the [identifiers](g):
 
 ```go-html-template
 {{ .Params.display_related }} → true
@@ -40,5 +40,3 @@ In the template example above, each of the keys is a valid identifier. For examp
 ```
 
 [`index`]: /functions/collections/indexfunction/
-[chaining]: /getting-started/glossary/#chain
-[identifiers]: /getting-started/glossary/#identifier
index b65120d4d8e461d055cbe49e8e26ee5aedfe4abc..6574101126bca963a04f56664afd2a4d57d6c8ab 100644 (file)
@@ -14,9 +14,7 @@ toc: true
 
 {{< new-in 0.123.0 >}}
 
-The `Path` method on a `Page` object returns the logical path of the given page, regardless of whether the page is backed by a file.
-
-[logical path]: /getting-started/glossary#logical-path
+The `Path` method on a `Page` object returns the [logical path](g) of the given page, regardless of whether the page is backed by a file.
 
 ```go-html-template
 {{ .Path }} → /posts/post-1
@@ -33,12 +31,12 @@ The meaning of, and value returned by, the `Path` method on a `Page` object chan
 [v0.123.0]: https://github.com/gohugoio/hugo/releases/tag/v0.123.0
 {{% /note %}}
 
-To determine the logical path for pages backed by a file, Hugo starts with the file path, relative to the content directory, and then:
+To determine the logical path for pages backed by a file, Hugo starts with the file path, relative to the `content` directory, and then:
 
 1. Strips the file extension
-2. Strips the language identifier
-3. Converts the result to lower case
-4. Replaces spaces with hyphens
+1. Strips the language identifier
+1. Converts the result to lower case
+1. Replaces spaces with hyphens
 
 The value returned by the `Path` method on a `Page` object is independent of content format, language, and URL modifiers such as the `slug` and `url` front matter fields.
 
@@ -112,8 +110,8 @@ Methods|Functions|Shortcodes
 [`urls.RelRef`]: /functions/urls/relref/
 [`Page.GetPage`]: /methods/page/getpage/
 [`Site.GetPage`]: /methods/site/getpage/
-[`ref`]: /content-management/shortcodes/#ref
-[`relref`]: /content-management/shortcodes/#relref
+[`ref`]: /shortcodes/ref/
+[`relref`]: /shortcodes/relref/
 [`Page.Ref`]: /methods/page/ref/
 [`Page.RelRef`]: /methods/page/relref/
 [`Shortcode.Ref`]: /methods/shortcode/ref
@@ -123,7 +121,6 @@ Methods|Functions|Shortcodes
 Specify the logical path when using any of these methods, functions, or shortcodes. If you include a file extension or language identifier, Hugo will strip these values before finding the page in the logical tree.
 {{% /note %}}
 
-
 ## Logical tree
 
 Just as file paths form a file tree, logical paths form a logical tree.
index 06d2bde48f58f59b454f151c880aedcb7889f72f..e26c33529a1ad369bd6ebacffec23a338ecd2419 100644 (file)
@@ -15,7 +15,7 @@ action:
   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` method on a `Page` object renders Markdown and [shortcodes](g) to HTML, then strips the HTML [tags]. It does not strip HTML [entities].
 
 To prevent Go's [html/template] package from escaping HTML entities, pass the result through the [`htmlUnescape`] function.
 
@@ -23,7 +23,6 @@ To prevent Go's [html/template] package from escaping HTML entities, pass the re
 {{ .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
index e4ab8a28eb1dba70d9b68a38f747c1434740e458..9dab9693ecc05274e9568aec513409d6057bed55 100644 (file)
@@ -24,9 +24,8 @@ The `RawContent` method on a `Page` object returns the raw content. The raw cont
 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](g) 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 %}}
 
index e3c5569a44b80c5c23d2969f0b1145dc4e84b939..e0d42424d810949af10f34e3c35a678be92059aa 100644 (file)
@@ -15,7 +15,7 @@ action:
 The map of option contains:
 
 path
-: (`string`) The path to the page, relative to the content directory. Required.
+: (`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.
index d3327702ea0fa16e5b646af150c957410fd146fc..29a66b48f2bc530b5cfc5550ca5cc413823058fa 100644 (file)
@@ -11,7 +11,7 @@ action:
   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].
+The `RegularPages` method on a `Page` object is available to these [page kinds](g): `home`, `section`, `taxonomy`, and `term`. The templates for these page kinds receive a page [collection](g) in [context](g).
 
 Range through the page collection in your template:
 
@@ -67,7 +67,7 @@ When rendering lesson-2, the `RegularPages` method returns:
     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.
+In the last example, the collection includes pages in the resources subdirectory. That directory is not a [section](g)---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].
@@ -80,8 +80,3 @@ When used with the `Site` object, the `RegularPages` method recursively returns
   <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 3dac8c85edcc9753810fcd06a8ad31772d21409c..8e1c5f9a4550e08f4b7b14e46597f82e35382c9a 100644 (file)
@@ -11,7 +11,7 @@ action:
   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].
+The `RegularPagesRecursive` method on a `Page` object is available to these [page kinds](g): `home`, `section`, `taxonomy`, and `term`. The templates for these page kinds receive a page [collection](g) in [context](g).
 
 Range through the page collection in your template:
 
@@ -84,7 +84,3 @@ When rendering lesson-2, the `RegularPagesRecursive` method returns:
 {{% 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 4c635e0e28c0ea7cadc28753a7e3bc6834fd86ea..83ab086101af362e4da04a9c703227b11f196b15 100644 (file)
@@ -15,7 +15,7 @@ action:
 The map of option contains:
 
 path
-: (`string`) The path to the page, relative to the content directory. Required.
+: (`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.
index 66aa6be7b85e96ec933dbb812f54a4b464907a40..1adc71c6d981f7947b1dd613ac9269bbd1e4aed8 100644 (file)
@@ -28,7 +28,7 @@ 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.
+The path to the template is determined by the [content type](g).|You must specify the path to the template, relative to the `layouts/partials` directory.
 
 Consider this layout structure:
 
@@ -72,4 +72,3 @@ See [content views] for more examples.
 
 [content views]: /templates/content-view/
 [`partial`]: /functions/partials/include/
-[content type]: /getting-started/glossary/#content-type
index 70674a9c0ac2ae1888bae444559a1101e5836895..319edea69dfe2c94d4cf1dc9813988df6cd5e5c6 100644 (file)
@@ -86,7 +86,6 @@ An *emphasized* word.
 
 Note that the shortcode within the content file was rendered, but the surrounding Markdown was preserved.
 
-
 ## Limitations
 
 The primary use case for `.RenderShortcodes` is inclusion of Markdown content. If you try to use `.RenderShortcodes` inside `HTML` blocks when inside Markdown, you will get a warning similar to this:
index 0237ee352dd2a37f592c4c37eb9440502d664bb3..2495ca8dfb2d2ade6b204b5377929de672d6eda6 100644 (file)
@@ -15,7 +15,7 @@ action:
 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].
+The `Resources` method on a `Page` object returns a collection of page resources. A page resource is a file within a [page bundle](g).
 
 To work with global or remote resources, see the [`resources`] functions.
 
@@ -82,7 +82,6 @@ When working with global resources instead of page resources, use the [`resource
 
 This method is currently only useful in [js.Batch](/functions/js/batch/#import-context).
 
-
 ## Pattern matching
 
 With the `GetMatch` and `Match` methods, Hugo determines a match using a case-insensitive [glob pattern].
@@ -96,4 +95,3 @@ With the `GetMatch` and `Match` methods, Hugo determines a match using a case-in
 [`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 41b1d17fd3702d20cb802994f333703beba0cc2d..13cd3dff823c78bc16f845371dd9a8e80808b685 100644 (file)
@@ -11,6 +11,7 @@ action:
   signatures: [PAGE.Scratch]
 toc: true
 aliases: [/extras/scratch/,/doc/scratch/,/functions/scratch]
+expiryDate: 2025-11-18 #  deprecated 2024-11-18
 ---
 
 {{% deprecated-in 0.138.0 %}}
@@ -23,13 +24,12 @@ Beginning with v0.138.0 the `PAGE.Scratch` method is aliased to `PAGE.Store`.
 [`PAGE.Store`]: /methods/page/store/
 {{% /deprecated-in %}}
 
-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.
+The `Scratch` method on a `Page` object creates a [scratch pad](g) 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" %}}
 
@@ -37,9 +37,7 @@ To create a locally scoped scratch pad that is not attached to a `Page` object,
 
 The `Scratch` method is often used to set scratch pad values within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are indeterminate until Hugo renders the page content.
 
-If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop] variable:
-
-[noop]: /getting-started/glossary/#noop
+If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop](g) variable:
 
 ```go-html-template
 {{ $noop := .Content }}
index 8e027a5a11f72f24ae3efccd065fb67843afedb7..31cfb1e6fac989fad840b0238907ebeb2c8600bf 100644 (file)
@@ -49,6 +49,5 @@ This is similar to using the [`Type`] method with the `where` function
 
 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 484c27fd5c694dda99a8ba6ec111066004466774..af0f78642b5ea8724edd0a4add174ccbe8ccbcc1 100644 (file)
@@ -16,11 +16,10 @@ toc: true
 aliases: [/functions/store]
 ---
 
-The `Store` method on a `Page` object creates a persistent [scratch pad] to store and manipulate data. To create a locally scoped scratch pad that is not attached to a `Page` object, use the [`newScratch`] function.
+The `Store` method on a `Page` object creates a persistent [scratch pad](g) to store and manipulate data. 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
 
@@ -109,9 +108,7 @@ Removes the given key.
 
 The `Store` method is often used to set scratch pad values within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are indeterminate until Hugo renders the page content.
 
-If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop] variable:
-
-[noop]: /getting-started/glossary/#noop
+If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop](g) variable:
 
 ```go-html-template
 {{ $noop := .Content }}
index 490b201d06f113ddbe4cc05929d5bc2752ee769d..a875d62f057021fe8175c192cc222cbe79d99da5 100644 (file)
@@ -13,10 +13,9 @@ action:
   signatures: [PAGE.Summary]
 ---
 
-{{% comment %}}
-Do not remove the manual summary divider below.
-If you do, you will break its first literal usage on this page.
-{{% /comment %}}
+<!-- Do not remove the manual summary divider below. -->
+<!-- If you do, you will break its first literal usage on this page. -->
+
 <!--more-->
 
 You can define a [summary] manually, in front matter, or automatically. A manual summary takes precedence over a front matter summary, and a front matter summary takes precedence over an automatic summary.
index b7c62372b4f07f4955388cc54a0c554302f7d822..565f6397cbcbd77218d4065a1455d5ed46c85dd4 100644 (file)
@@ -12,7 +12,7 @@ action:
   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.
+The `Type` method on a `Page` object returns the [content type](g) 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:
 
@@ -33,7 +33,7 @@ content/
 └── _index.md
 ```
 
-To list the books, regardless of [section]:
+To list the books, regardless of [section](g):
 
 ```go-html-template
 {{ range where .Site.RegularPages.ByTitle "Type" "books" }}
@@ -51,6 +51,4 @@ Hugo renders this to;
 
 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 75c75db86a94af192034762fc188f074e6429c88..10f481baf6b4fe0394dbf0f054ab6d686cd60c4d 100644 (file)
@@ -9,9 +9,7 @@ action:
   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
+The `Weight` method on a `Page` object returns the [weight](g) of the given page as defined in front matter.
 
 {{< code-toggle file=content/recipes/sushi.md fm=true >}}
 title = 'How to make spicy tuna hand rolls'
index 79e22b10dbebe022a03a60b4b0e70c64634ed628..4a2e36ff34716bcd2318a4282ea8d9ed6874c0c9 100644 (file)
@@ -2,4 +2,4 @@
 _comment: Do not remove front matter.
 ---
 
-A _section_ is a top-level content directory, or any content directory with an&nbsp;_index.md&nbsp;file.
+A _section_ is a top-level content directory, or any content directory with an&nbsp;`_index.md`&nbsp;file.
index c71392c8fc99027fe38f9c639d81287f381ed89d..0a30222658728d7d5f95a25da8bdb85bafb6f247 100644 (file)
@@ -55,6 +55,6 @@ When you visit page-2:
 
 To reverse the meaning of _next_ and _previous_ you can change the sort direction in your [site configuration], or use the [`Next`] and [`Prev`] methods on a `Pages` object for more flexibility.
 
-[site configuration]: getting-started/configuration/#configure-page
+[site configuration]: /getting-started/configuration/#configure-page
 [`Next`]: /methods/pages/prev
 [`Prev`]: /methods/pages/prev
index f2126eaeed13490ecb7aa8bcf459da0d6774f17a..1d1f5438ac79c19883c74996dd28a05084211349 100644 (file)
@@ -55,7 +55,7 @@ When you visit page-2:
 
 To reverse the meaning of _next_ and _previous_ you can change the sort direction in your [site configuration], or use the [`Next`] and [`Prev`] methods on a `Pages` object for more flexibility.
 
-[site configuration]: getting-started/configuration/#configure-page
+[site configuration]: /getting-started/configuration/#configure-page
 [`Next`]: /methods/pages/prev
 [`Prev`]: /methods/pages/prev
 
diff --git a/content/en/methods/page/_common/output-format-definition.md b/content/en/methods/page/_common/output-format-definition.md
deleted file mode 100644 (file)
index df89447..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
----
-_comment: 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 4eafee11f12531de89c3b6500b6967ee3f86cb7f..76d12e196a83717991f2906029c0faad7cbc8ecf 100644 (file)
@@ -9,9 +9,7 @@ action:
   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
+Assign a [weight](g) 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.
 
 ```go-html-template
 {{ range .Pages.ByWeight }}
index 8b5fcd6f15aac754e5dc804d012b76c92c422a77..b29b908434df24273eb732702a0dc956a8fbf1bb 100644 (file)
@@ -15,11 +15,10 @@ action:
 
 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.
+The [layout string] has the same format as the layout string for the [`time.Format`] function. The resulting group key is [localized](g) 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" %}}
index a9b248297c07843e0e560378bb05a2d276fe72cd..261d15fb560cf2c5641548977add6d2178901da9 100644 (file)
@@ -15,11 +15,10 @@ action:
 
 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.
+The [layout string] has the same format as the layout string for the [`time.Format`] function. The resulting group key is [localized](g) 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" %}}
index 87769252163cb8649e97dc0fe452515492e8d3d3..4f9afdded71165eaa6431a60036033e497bfe353 100644 (file)
@@ -15,11 +15,10 @@ action:
 
 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.
+The [layout string] has the same format as the layout string for the [`time.Format`] function. The resulting group key is [localized](g) 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" %}}
index c7fedbb1a64f6e5cec742a4d2725623fc3cfd0a1..826d3c83ed3cd4fc800766544dce637aa44683c2 100644 (file)
@@ -13,11 +13,10 @@ action:
   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.
+The [layout string] has the same format as the layout string for the [`time.Format`] function. The resulting group key is [localized](g) 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" %}}
 
index f6603e8580657e2796ec4aeb676e6b66645b758e..40e43c3b87c4f83f753c4c85466d76d635b44166 100644 (file)
@@ -15,11 +15,10 @@ action:
 
 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.
+The [layout string] has the same format as the layout string for the [`time.Format`] function. The resulting group key is [localized](g) 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" %}}
index 1cee8874577c44cac35384cc9e4fb0621918f4cc..a80722a0ec1296e99afc5e93833d2a041dbaa67e 100644 (file)
@@ -45,7 +45,6 @@ To pass an options map:
 {{ end }}
 {{< /code >}}
 
-
 ## Options
 
 indices
@@ -60,7 +59,7 @@ namedSlices
 [`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.
+: (`slice`) A list of special keywords that is used for indices configured as type "fragments". This will match the [fragment](g) identifiers of the documents.
 
 A contrived example using all of the above:
 
@@ -75,5 +74,4 @@ A contrived example using all of the above:
 ```
 
 [details]: /content-management/related/
-[fragment]: /getting-started/glossary/#fragment
 [related content configuration]: /content-management/related/
index 9ee71ba7d6bb93b9b56c4a8ad3216c83ace5a6e0..73fe1e7aeefff21fb73463dfad93c07d39ae3614 100644 (file)
@@ -169,7 +169,6 @@ Calculate the contrast ratio to determine WCAG conformance:
 {{ end }}
 ```
 
-
 [WCAG]: https://en.wikipedia.org/wiki/Web_Content_Accessibility_Guidelines
 [contrast ratio]: https://www.w3.org/TR/WCAG21/#dfn-contrast-ratio
 [enhanced]: https://www.w3.org/WAI/WCAG22/quickref/?showtechniques=145#contrast-enhanced
index 43108fce8359ecb9eed963a7636aecb2bdd38586..f62de34d26bb55e4117abc786e0980816e1db75e 100644 (file)
@@ -17,10 +17,10 @@ The `Data` method on a resource returned by the [`resources.GetRemote`] function
 
 ```go-html-template
 {{ $url := "https://example.org/images/a.jpg" }}
-{{ with resources.GetRemote $url }}
+{{ with try (resources.GetRemote $url) }}
   {{ with .Err }}
     {{ errorf "%s" . }}
-  {{ else }}
+  {{ else with .Value }}
     {{ with .Data }}
       {{ .ContentLength }} → 42764
       {{ .ContentType }} → image/jpeg
@@ -28,9 +28,9 @@ The `Data` method on a resource returned by the [`resources.GetRemote`] function
       {{ .StatusCode }} → 200
       {{ .TransferEncoding }} → []
     {{ end }}
+  {{ else }}
+    {{ errorf "Unable to get remote resource %q" $url }}
   {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $url }}
 {{ end }}
 ```
 
@@ -49,5 +49,4 @@ StatusCode
 TransferEncoding
 : (`string`) The transfer encoding.
 
-
 [`resources.GetRemote`]: /functions/resources/getremote/
index 6baa30e47478dfa3707f9bca2abaa89f8554c2fd..776127caf8780526cb83090ee3d7851a00266285 100644 (file)
@@ -9,8 +9,15 @@ action:
     - methods/resource/Data
   returnType: resource.resourceError
   signatures: [RESOURCE.Err]
+expiryDate: 2026-01-16 # deprecated 2025-01-16
 ---
 
+{{% deprecated-in 0.141.0 %}}
+Use the `try` statement instead. See [example].
+
+[example]: /functions/go-template/try/#example
+{{% /deprecated-in %}}
+
 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/
index deeba9ab39cd741ff67c6eb295017a99f9fc5aa0..2dbd371bedca0bf30dd84eb3b1a6235a0f182971 100644 (file)
@@ -38,7 +38,6 @@ We used the [`resources.Copy`] function to change the publishing path. The `Key`
 
 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/
index 694b67baa8ed87e6dfe5f36db406a6b4b288ec74..28ccf3abf278a4447c65db8a2f52a40eb67e7889 100644 (file)
@@ -15,7 +15,7 @@ The value returned by the `Name` method on a `Resource` object depends on the re
 
 ## Global resource
 
-With a [global resource], the `Name` method returns the path to the resource, relative to the assets directory.
+With a [global resource](g), the `Name` method returns the path to the resource, relative to the `assets` directory.
 
 ```text
 assets/
@@ -31,7 +31,7 @@ assets/
 
 ## Page resource
 
-With a [page resource], if you create an element in the `resources` array in front matter, the `Name` method returns the value of the `name` parameter.
+With a [page resource](g), if you create an element in the `resources` array in front matter, the `Name` method returns the value of the `name` parameter.
 
 ```text
 content/
@@ -81,15 +81,10 @@ content/
 ```
 ## Remote resource
 
-With a [remote resource], the `Name` method returns a hashed file name.
+With a [remote resource](g), 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
-[logical path]: /getting-started/glossary/#logical-path
-[page resource]: /getting-started/glossary/#page-resource
-[remote resource]: /getting-started/glossary/#remote-resource
index ff6707f0b225f7766a7c03b2c1a9b2426a3ce04e..a171b3ddf9a1f26b3a2cccbf19b13c8a6d46fc65 100644 (file)
@@ -9,11 +9,7 @@ action:
   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
+Use the `Params` method with [page resources](g). It is not applicable to either [global resources](g) or [remote resources](g).
 
 With this content structure:
 
index e0fa9aa870aed1d9e2ea01c6c59c77a2cf302b90..4c87b4b46498267a53d171f2267a499747322027 100644 (file)
@@ -11,9 +11,7 @@ action:
   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
+The `Permalink` method on a `Resource` object writes the resource to the publish directory, typically `public`, and returns its [permalink](g).
 
 ```go-html-template
 {{ with resources.Get "images/a.jpg" }}
index 190cdf64ae17286675d89bb94db54a8c02d87fe9..a7226b0579abc2ab35a39399e111b24477d46966 100644 (file)
@@ -11,9 +11,7 @@ action:
   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
+The `Permalink` method on a `Resource` object writes the resource to the publish directory, typically `public`, and returns its [relative permalink](g).
 
 ```go-html-template
 {{ with resources.Get "images/a.jpg" }}
index c620c2448c8fe355645d79b6a33d78bbbec004d8..1a984f90240f22a43095e9e124892661bd697aae 100644 (file)
@@ -15,7 +15,7 @@ The value returned by the `Title` method on a `Resource` object depends on the r
 
 ## Global resource
 
-With a [global resource], the `Title` method returns the path to the resource, relative to the assets directory.
+With a [global resource](g), the `Title` method returns the path to the resource, relative to the `assets` directory.
 
 ```text
 assets/
@@ -31,7 +31,7 @@ assets/
 
 ## Page resource
 
-With a [page resource], if you create an element in the `resources` array in front matter, the `Title` method returns the value of the `title` parameter.
+With a [page resource](g), if you create an element in the `resources` array in front matter, the `Title` method returns the value of the `title` parameter.
 
 ```text
 content/
@@ -74,14 +74,10 @@ content/
 
 ## Remote resource
 
-With a [remote resource], the `Title` method returns a hashed file name.
+With a [remote resource](g), 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 5df2963e39a58ea342cf6dcbd05ff3a809cedca0..e410df038cf0b1912c2393ca0abe727117318512 100644 (file)
@@ -3,11 +3,5 @@ _comment: 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
-
+Use this method with [global resources](g), [page resources](g), or [remote resources](g).
 {{% /note %}}
index 2814bcc2aba2d35102c75a481e8e6530961b0b76..ef8d05ecb9c392fe6d737d745dc4eea3cd6accb1 100644 (file)
@@ -56,7 +56,6 @@ Content between opening and closing shortcode tags may include leading and/or tr
 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 RenderString
 
 Let's modify the example above to pass the value returned by `Inner` through the [`RenderString`] method on the `Page` object:
index 53fac823761a3798949c27b15fe6072e6b5e60b5..740b1ad7e1e5f8d6800adda6b3bf603846a84fbf 100644 (file)
@@ -46,5 +46,5 @@ Welcome. Today is {{</* now */>}}.
 The "now" shortcode formats the current time using:
 
 1. The `dateFormat` argument passed to the "now" shortcode, if present
-2. The `dateFormat` argument passed to the "greeting" shortcode, if present
-3. The default layout string defined at the top of the shortcode
+1. The `dateFormat` argument passed to the "greeting" shortcode, if present
+1. The default layout string defined at the top of the shortcode
index 293c772d9e62322ffdcdbb42ec8b5bf43bb23721..305e1e7d89d77e8cbe0ad96e41c57abf484f2b3f 100644 (file)
@@ -15,7 +15,7 @@ action:
 The map of option contains:
 
 path
-: (`string`) The path to the page, relative to the content directory. Required.
+: (`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.
index 07f221a99ff2865dde8a91cb6ec1b0e2c90d270e..4e367312bbc0f64d7537e7d385ba72acb1a843a1 100644 (file)
@@ -15,7 +15,7 @@ action:
 The map of option contains:
 
 path
-: (`string`) The path to the page, relative to the content directory. Required.
+: (`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.
index 811d9f9eebcfe6312947efe51644a09fa9b19298..b044a66c8fa2f48304f6a4d7fee2d33d2fae530b 100644 (file)
@@ -8,6 +8,7 @@ action:
     - functions/collections/NewScratch
   returnType: maps.Scratch
   signatures: [SHORTCODE.Scratch]
+expiryDate: 2025-11-18 #  deprecated 2024-11-18
 ---
 
 {{% deprecated-in 0.139.0 %}}
@@ -20,7 +21,7 @@ Beginning with v0.139.0 the `SHORTCODE.Scratch` method is aliased to `SHORTCODE.
 [`SHORTCODE.Store`]: /methods/shortcode/store/
 {{% /deprecated-in %}}
 
-The `Scratch` method within a shortcode creates a [scratch pad] to store and manipulate data. The scratch pad is scoped to the shortcode.
+The `Scratch` method within a shortcode creates a [scratch pad](g) to store and manipulate data. The scratch pad is scoped to the shortcode.
 
 {{% 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.
@@ -29,6 +30,4 @@ With the introduction of the [`newScratch`] function, and the ability to [assign
 [`newScratch`]: /functions/collections/newscratch/
 {{% /note %}}
 
-[scratch pad]: /getting-started/glossary/#scratch-pad
-
 {{% include "methods/page/_common/scratch-methods.md" %}}
index f7be8c8d0a407bd19dbf67b894021011db6c6c1c..2e6c467cec2a862aa19413e574945555e71a5f23 100644 (file)
@@ -15,7 +15,7 @@ action:
 
 {{< new-in 0.139.0 >}}
 
-The `Store` method within a shortcode creates a [scratch pad] to store and manipulate data. The scratch pad is scoped to the shortcode.
+The `Store` method within a shortcode creates a [scratch pad](g) to store and manipulate data. The scratch pad is scoped to the shortcode.
 
 {{% note %}}
 With the introduction of the [`newScratch`] function, and the ability to [assign values to template variables] after initialization, the `Store` method within a shortcode is mostly obsolete.
@@ -24,6 +24,4 @@ With the introduction of the [`newScratch`] function, and the ability to [assign
 [`newScratch`]: /functions/collections/newScratch/
 {{% /note %}}
 
-[Store pad]: /getting-started/glossary/#scratch-pad
-
 {{% include "methods/page/_common/scratch-methods.md" %}}
index e02c2cbbc156901c2938a583103be2d76d555838..7c6c21b570b128a8f49f869136531bd246f5d107 100644 (file)
@@ -12,12 +12,11 @@ action:
   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.
+This method returns all page [kinds](g) 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 }}
index 65cdadd0147f319a55777cab6ed4b402a2777c01..1021aad7d2de3a8a3c4c4cc3ae650db19efc05c1 100644 (file)
@@ -13,17 +13,17 @@ action:
   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.
+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.
+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:
+Consider this `data` directory:
 
 ```text
 data/
@@ -55,7 +55,7 @@ And these data files:
   isbn: 978-0521280495
 {{< /code >}}
 
-Access the data by [chaining] the [identifiers]:
+Access the data by [chaining](g) the [identifiers](g):
 
 ```go-html-template
 {{ range $category, $books := .Site.Data.books }}
@@ -101,14 +101,10 @@ To find a fiction book by ISBN:
 {{ 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. For example:
-
-[identifier]: /getting-started/glossary/#identifier
+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. For example:
 
 ```go-html-template
 {{ index .Site.Data.books "historical-fiction" }}
 ```
 
 [`index`]: /functions/collections/indexfunction/
-[chaining]: /getting-started/glossary/#chain
-[identifiers]: /getting-started/glossary/#identifier
index 2a972e2af921cd8f0334caff33dfc315664665ff..a439a578b9a2af0b4a302e446f835e39c2344930 100644 (file)
@@ -15,7 +15,7 @@ The `GetPage` method is also available on `Page` objects, allowing you to specif
 
 [details]: /methods/page/getpage/
 
-When using the `GetPage` method on a `Site` object, specify a path relative to the content directory.
+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.
 
@@ -96,7 +96,7 @@ content/
 └── _index.md
 ```
 
-In the home template, use the `GetPage` method on a `Site` object to render all the images in the headless [page bundle]:
+In the home template, use the `GetPage` method on a `Site` object to render all the images in the headless [page bundle](g):
 
 ```go-html-template
 {{ with .Site.GetPage "/headless" }}
@@ -105,5 +105,3 @@ In the home template, use the `GetPage` method on a `Site` object to render all
   {{ end }}
 {{ end }}
 ```
-
-[page bundle]: /getting-started/glossary/#page-bundle
index ac6e13c4a1461c257ee33f63beaf8052a110a72a..bb684a96da75ae22367bf27ab854c272b0f298c7 100644 (file)
@@ -12,12 +12,11 @@ action:
   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.
+This method returns all page [kinds](g) 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 }}
index b699ef2d499f4ed299a65916321ec53b5d80e231..0c2f621c8b2b4f783170c37ce9cba056facd6af3 100644 (file)
@@ -16,7 +16,6 @@ The `Param` method on a `Site` object is a convenience method to return the valu
 display_toc = true
 {{< /code-toggle >}}
 
-
 ```go-html-template
 {{ .Site.Param "display_toc" }} → true
 ```
index 95e016b81e6ce684b25c24449bfaf58bae6db3cd..418118ee3b1a98736641b2af6671643051bf53c6 100644 (file)
@@ -26,7 +26,7 @@ With this site configuration:
     rfc_3339 = '2006-01-02T15:04:05-07:00'
 {{< /code-toggle >}}
 
-Access the custom parameters by [chaining] the [identifiers]:
+Access the custom parameters by [chaining](g) the [identifiers](g):
 
 ```go-html-template
 {{ .Site.Params.subtitle }} → The Best Widgets on Earth
@@ -43,5 +43,3 @@ In the template example above, each of the keys is a valid identifier. For examp
 ```
 
 [`index`]: /functions/collections/indexfunction/
-[chaining]: /getting-started/glossary/#chain
-[identifiers]: /getting-started/glossary/#identifier
index 4488c5cfb035b7787c338cfc5e6c91e9f35719d4..65bafef6cfbbae95f93a6935e6c0ed4de2c678f4 100644 (file)
@@ -12,9 +12,7 @@ action:
   signatures: [SITE.RegularPages]
 ---
 
-The `RegularPages` method on a `Site` object returns a collection of all [regular pages].
-
-[regular pages]: /getting-started/glossary/#regular-page
+The `RegularPages` method on a `Site` object returns a collection of all [regular pages](g).
 
 ```go-html-template
 {{ range .Site.RegularPages }}
index 1c54007ab2b0d6519fff8c4c2c6de8c341982b2d..8a6c5b86eb0e6d132ce92679b8a007a9b23a2ab8 100644 (file)
@@ -16,11 +16,10 @@ toc: true
 
 {{< new-in 0.139.0 >}}
 
-The `Store` method on a `Site` object creates a persistent [scratch pad] to store and manipulate data. To create a locally scoped scratch pad that is not attached to a `Site` object, use the [`newScratch`] function.
+The `Store` method on a `Site` object creates a persistent [scratch pad](g) to store and manipulate data. To create a locally scoped scratch pad that is not attached to a `Site` object, use the [`newScratch`] function.
 
 [`Scratch`]: /methods/site/scratch/
 [`newScratch`]: /functions/collections/newscratch/
-[scratch pad]: /getting-started/glossary/#scratch-pad
 
 ## Methods
 
@@ -109,9 +108,7 @@ Removes the given key.
 
 The `Store` method is often used to set scratch pad values within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are indeterminate until Hugo renders the page content.
 
-If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop] variable:
-
-[noop]: /getting-started/glossary/#noop
+If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop](g) variable:
 
 ```go-html-template
 {{ $noop := .Content }}
index 4690e6da530a5b8a700bbc5ea3faf5a475ad6d68..ee98d2ac56d51ed6f59e7b2ee6da62e7dab3c15b 100644 (file)
@@ -9,10 +9,6 @@ action:
   signatures: [SITE.Taxonomies]
 ---
 
-{{% comment %}}
-Show template example: GetTerms
-{{% /comment %}}
-
 Conceptually, the `Taxonomies` method on a `Site` object returns a data structure such&nbsp;as:
 
 {{< code-toggle >}}
@@ -73,7 +69,6 @@ authors:
     - Pride and Prejudice
 {{< /code-toggle >}}
 
-
 To list the "suspense" books:
 
 ```go-html-template
index ea90cfdf9dfe5cc8375ec6e5d85f004bb891abd8..72cd1c355f7f45759a7b8127979a6bd3fcdb14cc 100644 (file)
@@ -11,9 +11,9 @@ action:
 toc: true
 ---
 
-The `Alphabetical` method on a `Taxonomy` object returns an [ordered taxonomy], sorted alphabetically by [term].
+The `Alphabetical` method on a `Taxonomy` object returns an [ordered taxonomy](g), sorted alphabetically by [term](g).
 
-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].
+While a `Taxonomy` object is a [map](g), an ordered taxonomy is a [slice](g), where each element is an object that contains the term and a slice of its [weighted pages](g).
 
 {{% include "methods/taxonomy/_common/get-a-taxonomy-object.md" %}}
 
@@ -69,10 +69,3 @@ Hugo renders:
   <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 68143ccff2f099241e1751965a18ead61dfeaa3f..930f8953bbe5fe52b99b0e34de015457adc308b9 100644 (file)
@@ -11,9 +11,9 @@ action:
 toc: true
 ---
 
-The `ByCount` method on a `Taxonomy` object returns an [ordered taxonomy], sorted by the number of pages associated with each [term].
+The `ByCount` method on a `Taxonomy` object returns an [ordered taxonomy](g), sorted by the number of pages associated with each [term](g).
 
-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].
+While a `Taxonomy` object is a [map](g), an ordered taxonomy is a [slice](g), where each element is an object that contains the term and a slice of its [weighted pages](g).
 
 {{% include "methods/taxonomy/_common/get-a-taxonomy-object.md" %}}
 
@@ -69,10 +69,3 @@ Hugo renders:
   <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 50f705ec9b13912f8e6e766330bdab508ddfcfe9..4b756f254a364b3e312b8e8edb4958a1f7cf162b 100644 (file)
@@ -10,7 +10,7 @@ action:
 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.
+The `Count` method on a `Taxonomy` object returns the number of number of [weighted pages](g) to which the given [term](g) has been assigned.
 
 {{% include "methods/taxonomy/_common/get-a-taxonomy-object.md" %}}
 
@@ -21,6 +21,3 @@ Now that we have captured the "genres" `Taxonomy` object, let's count the number
 ```go-html-template
 {{ $taxonomyObject.Count "suspense" }} → 3
 ```
-
-[weighted pages]: /getting-started/glossary/#weighted-page
-[term]: /getting-started/glossary/#term
index 79d25b704bd63c97d79b72e5599f349c50a743bf..107912493dccdf9844a9f70a6bce8eae80e1544f 100644 (file)
@@ -10,7 +10,7 @@ action:
 toc: true
 ---
 
-The `Get` method on a `Taxonomy` object returns a slice of [weighted pages] to which the given [term] has been assigned.
+The `Get` method on a `Taxonomy` object returns a slice of [weighted pages](g) to which the given [term](g) has been assigned.
 
 {{% include "methods/taxonomy/_common/get-a-taxonomy-object.md" %}}
 
@@ -28,7 +28,7 @@ The above is equivalent to:
 {{ $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:
+But, if the term is not a valid [identifier](g), you cannot use the [chaining](g) syntax. For example, this will throw an error because the identifier contains a hyphen:
 
 ```go-html-template
 {{ $weightedPages := $taxonomyObject.my-genre }}
@@ -65,8 +65,4 @@ Hugo renders:
 <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 928ec085aa61a0070186538791ff6163a40ddfa3..9ef2585e187a68c9297046a0f9c4280c5253bd4e 100644 (file)
@@ -59,7 +59,6 @@ Although the [`Alphabetical`] and [`ByCount`] methods provide a better data stru
 
 In the example above, the first anchor element is a link to the term page.
 
-
 [`Alphabetical`]: /methods/taxonomy/alphabetical/
 [`ByCount`]: /methods/taxonomy/bycount/
 
index a23c26ef54dfad0939babf04402239acd39b410e..ec5f8e406c0966888930875b65935ebc7fb5357a 100644 (file)
@@ -13,13 +13,12 @@ Page
 : (`page.Page`) 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.
+: (`page.Pages`) Returns a `Pages` object containing the `Page` objects to which the term is assigned, sorted by [taxonomic weight](g). 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.
+: (`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 d526b7b64f8527c711367cf17be8c3f6e94361a1..9a718b53b144ea92897c120864c68a34c7155e84 100644 (file)
@@ -24,9 +24,8 @@ aliases: [/methods/time/format]
 ```
 
 {{% note %}}
-To [localize] the return value, use the [`time.Format`] function instead.
+To [localize](g) the return value, use the [`time.Format`] function instead.
 
-[localize]: /getting-started/glossary/#localization
 [`time.Format`]: /functions/time/format/
 {{% /note %}}
 
index 988c56ba94ec1ed23aafa8a8851c984d1fded9d3..16bd2009f9551bfee90ea7dcd7d99202c6b8338a 100644 (file)
@@ -14,7 +14,7 @@ action:
 
 The rounding behavior for halfway values is to round up.
 
-The `Round` method operates on TIME as an absolute duration since the [zero time]; it does not operate on the presentation form of the time. If DURATION is a multiple of one hour, `Round` may return a time with a non-zero minute, depending on the time zone.
+The `Round` method operates on TIME as an absolute duration since the [zero time](g); it does not operate on the presentation form of the time. If DURATION is a multiple of one hour, `Round` may return a time with a non-zero minute, depending on the time zone.
 
 ```go-html-template
 {{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
@@ -22,5 +22,3 @@ The `Round` method operates on TIME as an absolute duration since the [zero time
 
 {{ ($t.Round $d).Format "2006-01-02T15:04:05-00:00" }} → 2023-01-28T00:00:00-00:00
 ```
-
-[zero time]: /getting-started/glossary/#zero-time
index da6e0b26bad3431875c240a44f10885646b5fc0c..64751f2c14feefecb0c794aba0d59cfdfb4448e5 100644 (file)
@@ -12,7 +12,7 @@ action:
   signatures: [TIME.Truncate DURATION]
 ---
 
-The `Truncate` method operates on TIME as an absolute duration since the [zero time]; it does not operate on the presentation form of the time. If DURATION is a multiple of one hour, `Truncate` may return a time with a non-zero minute, depending on the time zone.
+The `Truncate` method operates on TIME as an absolute duration since the [zero time](g); it does not operate on the presentation form of the time. If DURATION is a multiple of one hour, `Truncate` may return a time with a non-zero minute, depending on the time zone.
 
 ```go-html-template
 {{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
@@ -20,5 +20,3 @@ The `Truncate` method operates on TIME as an absolute duration since the [zero t
 
 {{ ($t.Truncate $d).Format "2006-01-02T15:04:05-00:00" }} → 2023-01-27T23:00:00-00:00
 ```
-
-[zero time]: /getting-started/glossary/#zero-time
index 08ea1e55f94c4e18d46e02c38f9af166e0a57554..969095d122bcdd85aefad1054af742ef26321498 100644 (file)
@@ -20,9 +20,9 @@ byline: "[bep](https://github.com/bep), Hugo Lead"
 To complete this showcase:
 
 1. Write the story about your site in this file.
-2. Add a summary to the `bio.md` file in this folder.
-3. Replace the `featured-template.png` with a screenshot of your site. You can rename it, but it must contain the word `featured`.
-4. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls
+1. Add a summary to the `bio.md` file in this directory.
+1. Replace the `featured-template.png` with a screenshot of your site. You can rename it, but it must contain the word `featured`.
+1. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls
 
 The content of this bundle explained:
 
@@ -34,4 +34,3 @@ bio.md
 
 featured.png
 : A reasonably sized screenshot of your website. It can be named anything, but the name must start with "featured". The sample image is `1500x750` (2:1 aspect ratio).
-
index d2e73843f86c1580fc65e951e599f4895f6113b0..946a490693c0a4f159c7e55ce4d3891de49019a9 100644 (file)
@@ -53,7 +53,7 @@ To process an emoji shortcode from within a template, use the [`emojify`] functi
 [`emojify`]: /functions/transform/emojify/
 [`RenderString`]: /methods/page/renderstring/
 
-{{% comment %}}
+<!--
 To generate the sections below:
 
     git clone https://github.com/ikatyang/emoji-cheat-sheet
@@ -67,7 +67,7 @@ Then...
     2. Search/replace (regex) "^###\s" with "## "
     3. Search/replace "^####\s " with "### "
     4. Search/replace (regex) "<br />" ""
-{{% /comment %}}
+-->
 
 ## Table of Contents
 
index 8ad9407e31b2858bd35e9b1197827cbfb03bae3e..c86929b5b27d15fb2f2894e9cb67263ffe122947 100644 (file)
@@ -13,11 +13,8 @@ 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
+assets/
+Use these `Page` methods when rendering lists on [section pages](g), [taxonomy pages](g), [term pages](g), and the home page.
 
 {{< list-pages-in-section path=/methods/page filter=methods_page_page_collections filterType=include omitElementIDs=true titlePrefix=PAGE. >}}
 
@@ -38,9 +35,9 @@ Use the [`where`] function to filter page collections.
 By default, Hugo sorts page collections by:
 
 1. [Weight]
-2. [Date] in descending order
-3. [LinkTitle] falling back to [Title]
-4. [Filename] if the page is backed by a file
+1. [Date] in descending order
+1. [LinkTitle] falling back to [Title]
+1. [Filename] if the page is backed by a file
 
 [Date]: /methods/page/date/
 [Weight]: /methods/page/weight/
index 75f62875255b00568e4461e24a1a456bd04f2bf1..92bd63c5656fc5e29b8571332732f415ee40b409 100644 (file)
@@ -6,7 +6,7 @@ _comment: Do not remove front matter.
 
 {{< new-in 0.125.0 >}}
 
-The primary use case for `PageInner` is to resolve links and [page resources] relative to an included `Page`. For example, create an "include" shortcode to compose a page from multiple content files, while preserving a global context for footnotes and the table of contents:
+The primary use case for `PageInner` is to resolve links and [page resources](g) relative to an included `Page`. For example, create an "include" shortcode to compose a page from multiple content files, while preserving a global context for footnotes and the table of contents:
 
 {{< code file=layouts/shortcodes/include.html >}}
 {{ with .Get 0 }}
@@ -45,4 +45,3 @@ As a practical example, Hugo's embedded link and image render hooks use the `Pag
 - [Embedded image render hook]({{% eturl render-image %}})
 
 [`RenderShortcodes`]: /methods/page/rendershortcodes/
-[page resources]: /getting-started/glossary/#page-resource
index 143c536d1333c584678cfefbfad4b6e1c4c24364..b0fee7239799b46955559ac8bc5de3b0bcf01615 100755 (executable)
@@ -16,9 +16,7 @@ toc: true
 
 ## Context
 
-Blockquote render hook templates receive the following [context]:
-
-[context]: /getting-started/glossary/#context
+Blockquote render hook templates receive the following [context](g):
 
 ###### AlertType
 
index f43df06c7c6070b3c09040a5ecaac2aab572d88c..5022fd3ae66411e7e342b16ef4092b65a0cb9d61 100755 (executable)
@@ -54,9 +54,7 @@ Although `style` is a global HTML attribute, when used in an info string it is a
 
 ## Context
 
-Code block render hook templates receive the following [context]:
-
-[context]: /getting-started/glossary/#context
+Code block render hook templates receive the following [context](g):
 
 ###### Attributes
 
index 2635802e870c714cb3e7a98eb420871633cef380..2b32797cc2a7aad25f399bf43b878ef64b9df84b 100755 (executable)
@@ -14,9 +14,7 @@ toc: true
 
 ## Context
 
-Heading render hook templates receive the following [context]:
-
-[context]: /getting-started/glossary/#context
+Heading render hook templates receive the following [context](g):
 
 ###### Anchor
 
index d3067c5a4835bf4c8f515c8f484144e8c677fd95..900df3c2feba556483157a60aedfea1658ca83ea 100755 (executable)
@@ -22,9 +22,7 @@ A Markdown image has three components: the image description, the image destinat
   description      destination        title
 ```
 
-These components are passed into the render hook [context] as shown below.
-
-[context]: /getting-started/glossary/#context
+These components are passed into the render hook [context](g) as shown below.
 
 ## Context
 
@@ -143,12 +141,9 @@ The embedded image render hook is automatically enabled for multilingual single-
 [duplication of shared page resources]: /getting-started/configuration-markup/#duplicateresourcefiles
 {{% /note %}}
 
-The embedded image render hook resolves internal Markdown destinations by looking for a matching [page resource], falling back to a matching [global resource]. Remote destinations are passed through, and the render hook will not throw an error or warning if unable to resolve a destination.
-
-[page resource]: /getting-started/glossary/#page-resource
-[global resource]: /getting-started/glossary/#global-resource
+The embedded image render hook resolves internal Markdown destinations by looking for a matching [page resource](g), falling back to a matching [global resource](g). Remote destinations are passed through, and the render hook will not throw an error or warning if unable to resolve a destination.
 
-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:
+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:
 
 {{< code-toggle file=hugo >}}
 [[module.mounts]]
index 2d1598fcb57ea741634ca5e019a50ddb3a39bf12..d086c91bba8d6f8483d18d8419bd4ff2abf63488 100755 (executable)
@@ -66,7 +66,7 @@ layouts/
         └── render-table.html
 ```
 
-The template lookup order allows you to create different render hooks for each page [type], [kind], language, and [output format]. For example:
+The template lookup order allows you to create different render hooks for each page [type](g), [kind](g), language, and [output format](g). For example:
 
 ```text
 layouts/
@@ -84,8 +84,4 @@ layouts/
         └── render-link.rss.xml
 ```
 
-[kind]: /getting-started/glossary/#page-kind
-[output format]: /getting-started/glossary/#output-format
-[type]: /getting-started/glossary/#content-type
-
 The remaining pages in this section describe each type of render hook, including examples and the context received by each template.
index 9505e989bc0c6e40a54b49a96ebcbaac5fb3564b..7700a540e3766191fa223ed4cd16bef16691be9c 100755 (executable)
@@ -22,16 +22,12 @@ A Markdown link has three components: the link text, the link destination, and o
   text    destination       title
 ```
 
-These components are passed into the render hook [context] as shown below.
-
-[context]: /getting-started/glossary/#context
+These components are passed into the render hook [context](g) as shown below.
 
 ## Context
 
 Link render hook templates receive the following context:
 
-[context]: /getting-started/glossary/#context
-
 ###### Destination
 
 (`string`) The link destination.
@@ -113,12 +109,9 @@ The embedded link render hook is automatically enabled for multilingual single-h
 [duplication of shared page resources]: /getting-started/configuration-markup/#duplicateresourcefiles
 {{% /note %}}
 
-The embedded link render hook resolves internal Markdown destinations by looking for a matching page, falling back to a matching [page resource], then falling back to a matching [global resource]. Remote destinations are passed through, and the render hook will not throw an error or warning if unable to resolve a destination.
-
-[page resource]: /getting-started/glossary/#page-resource
-[global resource]: /getting-started/glossary/#global-resource
+The embedded link render hook resolves internal Markdown destinations by looking for a matching page, falling back to a matching [page resource](g), then falling back to a matching [global resource](g). Remote destinations are passed through, and the render hook will not throw an error or warning if unable to resolve a destination.
 
-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:
+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:
 
 {{< code-toggle file=hugo >}}
 [[module.mounts]]
index f4b954c249752844c1798f6baff32c1f7f10718c..95bc54d88b69923c6b306981d623fdcf773fb910 100755 (executable)
@@ -45,19 +45,15 @@ inline = [['\(', '\)']]
 
 In the example above there are two sets of `block` delimiters. You may use either one in your Markdown.
 
-The Goldmark passthrough extension is often used in conjunction with the MathJax or KaTeX display engine to render [mathematical expressions] written in [LaTeX] or [Tex].
+The Goldmark passthrough extension is often used in conjunction with the MathJax or KaTeX display engine to render [mathematical expressions] written in the LaTeX markup language.
 
 [mathematical expressions]: /content-management/mathematics/
-[LaTeX]: https://www.latex-project.org/
-[Tex]: https://en.wikipedia.org/wiki/TeX
 
-To enable custom rendering of passthrough elements, create a render hook.
+To enable custom rendering of passthrough elements, create a passthrough render hook.
 
 ## Context
 
-Passthrough render hook templates receive the following [context]:
-
-[context]: /getting-started/glossary/#context
+Passthrough render hook templates receive the following [context](g):
 
 ###### Attributes
 
@@ -99,19 +95,35 @@ Hugo populates the `Attributes` map for _block_ passthrough elements. Markdown a
 
 ## Example
 
-As an alternative to rendering mathematical expressions with the MathJax or KaTeX display engine, create a passthrough render hook which calls the [`transform.ToMath`] function:
+Instead of client-side JavaScript rendering of mathematical markup using MathJax or KaTeX, create a passthrough render hook which calls the [`transform.ToMath`] function.
 
 [`transform.ToMath`]: /functions/transform/tomath/
 
 {{< code file=layouts/_default/_markup/render-passthrough.html copy=true >}}
-{{ if eq .Type "block" }}
-  {{ $opts := dict "displayMode" true }}
-  {{ transform.ToMath .Inner $opts }}
-{{ else }}
-  {{ transform.ToMath .Inner }}
-{{ end }}
+{{- $opts := dict "output" "htmlAndMathml" "displayMode" (eq .Type "block") }}
+{{- with try (transform.ToMath .Inner $opts) }}
+  {{- with .Err }}
+    {{ errorf "Unable to render mathematical markup to HTML using the transform.ToMath function. The KaTeX display engine threw the following error: %s: see %s." . $.Position }}
+  {{- else }}
+    {{- .Value }}
+    {{- $.Page.Store.Set "hasMath" true }}
+  {{- end }}
+{{- end -}}
 {{< /code >}}
 
+Then, in your base template, conditionally include the KaTeX CSS within the head element:
+
+{{< code file=layouts/_default/baseof.html copy=true >}}
+<head>
+  {{ $noop := .WordCount }}
+  {{ if .Page.Store.Get "hasMath" }}
+    <link href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css" rel="stylesheet">
+  {{ end }}
+</head>
+{{< /code >}}
+
+In the above, note the use of a [noop](g) statement to force content rendering before we check the value of `hasMath` with the `Store.Get` method.
+
 Although you can use one template with conditional logic as shown above, you can also create separate templates for each [`Type`](#type) of passthrough element:
 
 ```text
index b8a792747676a7871b3f73759f9edf8be14c2d93..4252d6de0c6ac4f2e56129fe61c9a239622393c1 100755 (executable)
@@ -16,9 +16,7 @@ toc: true
 
 ## Context
 
-Table render hook templates receive the following [context]:
-
-[context]: /getting-started/glossary/#context
+Table render hook templates receive the following [context](g):
 
 ###### Attributes
 
diff --git a/content/en/shortcodes/_index.md b/content/en/shortcodes/_index.md
new file mode 100644 (file)
index 0000000..e525ef5
--- /dev/null
@@ -0,0 +1,16 @@
+---
+title: Shortcodes
+linkTitle: In this section
+description: Insert elements such as videos, images, and social media embeds into your content using Hugo's embedded shortcodes.
+categories: []
+keywords: []
+menu:
+  docs:
+    identifier: shortcodes-in-this-section
+    parent: shortcodes
+    weight: 10
+weight: 10
+showSectionMenu: true
+---
+
+Insert elements such as videos, images, and social media embeds into your content using Hugo's embedded shortcodes.
diff --git a/content/en/shortcodes/comment.md b/content/en/shortcodes/comment.md
new file mode 100755 (executable)
index 0000000..208277b
--- /dev/null
@@ -0,0 +1,39 @@
+---
+title: Comment
+description: Include hidden comments in your content with the comment shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    identifier: shortcodes-comment
+    parent: shortcodes
+    weight:
+weight:
+expiryDate: 2025-01-22 # with v0.142.0 and later use HTML comments instead
+---
+
+{{% note %}}
+To override Hugo's embedded `comment` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl comment %}}
+{{% /note %}}
+
+{{< new-in "0.137.1" >}}
+
+Use the `comment` shortcode to include comments in your content. Hugo will ignore the text within these comments when rendering your site.
+
+Use it inline:
+
+```text
+{{%/* comment */%}} rewrite the paragraph below {{%/* /comment */%}}
+```
+
+Or as a block comment:
+
+```text
+{{%/* comment */%}}
+rewrite the paragraph below
+{{%/* /comment */%}}
+```
+
+Although you can call this shortcode using the `{{</* */>}}` notation, computationally it is more efficient to call it using the `{{%/* */%}}` notation as shown above.
diff --git a/content/en/shortcodes/details.md b/content/en/shortcodes/details.md
new file mode 100755 (executable)
index 0000000..f6e5ae6
--- /dev/null
@@ -0,0 +1,80 @@
+---
+title: Details
+description: Insert an HTML details element into your content using the details shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    parent: shortcodes
+    weight:
+weight:
+toc: true
+---
+
+{{< new-in 0.140.0 >}}
+
+{{% note %}}
+To override Hugo's embedded `details` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl details %}}
+{{% /note %}}
+
+## Example
+
+With this markup:
+
+```text
+{{</* details summary="See the details" */>}}
+This is a **bold** word.
+{{</* /details */>}}
+```
+
+Hugo renders this HTML:
+
+```html
+<details>
+  <summary>See the details</summary>
+  <p>This is a <strong>bold</strong> word.</p>
+</details>
+```
+
+Which looks like this in your browser:
+
+{{< details summary="See the details" >}}
+This is a **bold** word.
+{{< /details >}}
+
+## Parameters
+
+summary
+: (`string`) The content of the child `summary` element rendered from Markdown to HTML. Default is `Details`.
+
+open
+: (`bool`) Whether to initially display the content of the `details` element. Default is `false`.
+
+class
+: (`string`) The `class` attribute of the `details` element.
+
+name
+: (`string`) The `name` attribute of the `details` element.
+
+title
+: (`string`) The `title` attribute of the `details` element.
+
+## Styling
+
+Use CSS to style the `details` element, the `summary` element, and the content itself.
+
+```css
+/* target the details element */
+details { }
+
+/* target the summary element */
+details > summary { }
+
+/* target the children of the summary element */
+details > summary > * { }
+
+/* target the content */
+details > :not(summary) { }
+```
diff --git a/content/en/shortcodes/figure.md b/content/en/shortcodes/figure.md
new file mode 100755 (executable)
index 0000000..eb98598
--- /dev/null
@@ -0,0 +1,115 @@
+---
+title: Figure
+description: Insert an HTML figure element into your content using the figure shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    parent: shortcodes
+    weight:
+weight:
+toc: true
+---
+
+{{% note %}}
+To override Hugo's embedded `figure` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl figure %}}
+{{% /note %}}
+
+## Example
+
+With this markup:
+
+```text
+{{</* figure
+  src="/images/examples/zion-national-park.jpg"
+  alt="A photograph of Zion National Park"
+  link="https://www.nps.gov/zion/index.htm"
+  caption="Zion National Park"
+  class="ma0 w-75"
+*/>}}
+```
+
+Hugo renders this HTML:
+
+```html
+<figure class="ma0 w-75">
+  <a href="https://www.nps.gov/zion/index.htm">
+    <img 
+      src="/images/examples/zion-national-park.jpg" 
+      alt="A photograph of Zion National Park"
+    >
+  </a>
+  <figcaption>
+    <p>Zion National Park</p>
+  </figcaption>
+</figure>
+```
+
+Which looks like this in your browser:
+
+{{< figure
+  src="/images/examples/zion-national-park.jpg"
+  alt="A photograph of Zion National Park"
+  link="https://www.nps.gov/zion/index.htm"
+  caption="Zion National Park"
+  class="ma0 w-75"
+>}}
+
+## Parameters
+
+src
+: (`string`) The `src` attribute of the `img` element. Typically this is a [page resource](g) or a [global resource](g).
+
+alt
+: (`string`) The `alt` attribute of the `img` element.
+
+width
+: (`int`) The `width` attribute of the `img` element.
+
+height
+: (`int`) The `height` attribute of the `img` element.
+
+loading
+: (`string`) The `loading` attribute of the `img` element.
+
+class
+: (`string`) The `class` attribute of the `figure` element.
+
+link
+: (`string`) The `href` attribute of the anchor element that wraps the `img` element.
+
+target
+: (`string`) The `target` attribute of the anchor element that wraps the `img` element.
+
+rel
+: (`rel`) The `rel` attribute of the anchor element that wraps the `img` element.
+
+title
+: (`string`) Within the `figurecaption` element, the title is at the top, wrapped within an `h4` element.
+
+caption
+: (`string`) Within the `figurecaption` element, the caption is at the bottom and may contain plain text or markdown.
+
+attr
+: (`string`) Within the `figurecaption` element, the attribution appears next to the caption and may contain plain text or markdown.
+
+attrlink
+: (`string`) The `href` attribute of the anchor element that wraps the attribution.
+
+## Image location
+
+The `figure` shortcode resolves internal Markdown destinations by looking for a matching [page resource](g), falling back to a matching [global resource](g). Remote destinations are passed through, and the render hook will not throw an error or warning if unable to resolve a destination.
+
+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:
+
+{{< code-toggle file=hugo >}}
+[[module.mounts]]
+source = 'assets'
+target = 'assets'
+
+[[module.mounts]]
+source = 'static'
+target = 'assets'
+{{< /code-toggle >}}
diff --git a/content/en/shortcodes/gist.md b/content/en/shortcodes/gist.md
new file mode 100755 (executable)
index 0000000..dc85f28
--- /dev/null
@@ -0,0 +1,41 @@
+---
+title: Gist
+description: Embed a GitHub Gist in your content using the gist shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    parent: shortcodes
+    weight:
+weight:
+---
+
+{{% note %}}
+To override Hugo's embedded `gist` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl gist %}}
+{{% /note %}}
+
+To display a GitHub gist with this URL:
+
+```text
+https://gist.github.com/user/50a7482715eac222e230d1e64dd9a89b
+```
+
+Include this in your Markdown:
+
+```text
+{{</* gist user 23932424365401ffa5e9d9810102a477 */>}}
+```
+
+This will display all files in the gist alphabetically by file name.
+
+{{< gist jmooring 23932424365401ffa5e9d9810102a477 >}}
+
+To display a specific file within the gist:
+
+```text
+{{</* gist user 23932424365401ffa5e9d9810102a477 list.html */>}}
+```
+
+{{< gist jmooring 23932424365401ffa5e9d9810102a477 list.html >}}
diff --git a/content/en/shortcodes/highlight.md b/content/en/shortcodes/highlight.md
new file mode 100755 (executable)
index 0000000..0a35aa4
--- /dev/null
@@ -0,0 +1,117 @@
+---
+title: Highlight
+description: Insert syntax-highlighted code into your content using the highlight shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    parent: shortcodes
+    weight:
+weight:
+toc: true
+---
+
+{{% note %}}
+To override Hugo's embedded `highlight` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl highlight %}}
+{{% /note %}}
+
+{{% note %}}
+With the Markdown [content format], the `highlight` shortcode is rarely needed because, by default, Hugo automatically applies syntax highlighting to fenced code blocks.
+
+The primary use case for the `highlight` shortcode in Markdown is to apply syntax highlighting to inline code snippets.
+
+[content format]: /content-management/formats/
+{{% /note %}}
+
+The `highlight` shortcode calls the [`transform.Highlight`] function which uses the [Chroma] syntax highlighter, supporting over 200 languages with more than 40 [available styles].
+
+[chroma]: https://github.com/alecthomas/chroma
+[available styles]: https://xyproto.github.io/splash/docs/
+[`transform.Highlight`]: /functions/transform/highlight/
+
+## Arguments
+
+The `highlight` shortcode takes three arguments.
+
+```text
+{{</* highlight LANG OPTIONS */>}}
+CODE
+{{</* /highlight */>}}
+```
+
+CODE
+: (`string`) The code to highlight.
+
+LANG
+: (`string`) The language of the code to highlight. Choose from one of the [supported languages]. This value is case-insensitive.
+
+OPTIONS
+: (`string`) Zero or more space-separated key-value pairs wrapped in quotation marks. Set default values for each option in your [site configuration]. The key names are case-insensitive.
+
+[site configuration]: /getting-started/configuration-markup#highlight
+[supported languages]: /content-management/syntax-highlighting/#list-of-chroma-highlighting-languages
+
+## Example
+
+```text
+{{</* highlight go "linenos=inline, hl_Lines=3 6-8, style=emacs" */>}}
+package main
+
+import "fmt"
+
+func main() {
+    for i := 0; i < 3; i++ {
+        fmt.Println("Value of i:", i)
+    }
+}
+{{</* /highlight */>}}
+```
+
+Hugo renders this to:
+
+{{< highlight go "linenos=inline, hl_Lines=3 6-8, noClasses=true" >}}
+package main
+
+import "fmt"
+
+func main() {
+    for i := 0; i < 3; i++ {
+            fmt.Println("Value of i:", i)
+    }
+}
+{{< /highlight >}}
+
+You can also use the `highlight` shortcode for inline code snippets:
+
+```text
+This is some {{</* highlight go "hl_inline=true" */>}}fmt.Println("inline"){{</* /highlight */>}} code.
+```
+
+Hugo renders this to:
+
+This is some {{< highlight go "hl_inline=true, noClasses=true" >}}fmt.Println("inline"){{< /highlight >}} code.
+
+Given the verbosity of the example above, if you need to frequently highlight inline code snippets, create your own shortcode using a shorter name with preset options.
+
+{{< code file=layouts/shortcodes/hl.html >}}
+{{ $code := .Inner | strings.TrimSpace }}
+{{ $lang := or (.Get 0) "go"  }}
+{{ $opts := dict "hl_inline" true "noClasses" true }}
+{{ transform.Highlight $code $lang $opts }}
+{{< /code >}}
+
+```text
+This is some {{</* hl */>}}fmt.Println("inline"){{</* /hl */>}} code.
+```
+
+Hugo renders this to:
+
+This is some {{< hl >}}fmt.Println("inline"){{< /hl >}} code.
+
+## Options
+
+Pass the options when calling the shortcode. You can set their default values in your [site configuration].
+
+{{% include "functions/_common/highlighting-options" %}}
diff --git a/content/en/shortcodes/instagram.md b/content/en/shortcodes/instagram.md
new file mode 100755 (executable)
index 0000000..eb2bb76
--- /dev/null
@@ -0,0 +1,48 @@
+---
+title: Instagram
+description: Embed an Instagram post in your content using the instagram shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    parent: shortcodes
+    weight:
+weight:
+toc: true
+---
+
+{{% note %}}
+To override Hugo's embedded `instagram` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl instagram %}}
+{{% /note %}}
+
+## Example
+
+To display an Instagram post with this URL:
+
+```text
+https://www.instagram.com/p/CxOWiQNP2MO/
+```
+
+Include this in your Markdown:
+
+```text
+{{</* instagram CxOWiQNP2MO */>}}
+```
+
+Huge renders this to:
+
+{{< instagram CxOWiQNP2MO >}}
+
+## Privacy
+
+Adjust the relevant privacy settings in your site configuration.
+
+{{< code-toggle config=privacy.instagram />}}
+
+disable
+: (`bool`) Whether to disable the shortcode. Default is `false`.
+
+simple
+: (`bool`) Whether to enable simple mode for image card generation. If `true`, Hugo creates a static card without JavaScript. This mode only supports image cards, and the image is fetched directly from Instagram's servers. Default is `false`.
diff --git a/content/en/shortcodes/param.md b/content/en/shortcodes/param.md
new file mode 100755 (executable)
index 0000000..70866d4
--- /dev/null
@@ -0,0 +1,43 @@
+---
+title: Param
+description: Insert a parameter from front matter or site configuration into your content using the param shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    parent: shortcodes
+    weight:
+weight:
+---
+
+{{% note %}}
+To override Hugo's embedded `param` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl param %}}
+{{% /note %}}
+
+The `param` shortcode renders a parameter from front matter, falling back to a site parameter of the same name. The shortcode throws an error if the parameter does not exist.
+
+{{< code file=example.md lang=text >}}
+---
+title: Example
+date: 2025-01-15T23:29:46-08:00
+params:
+  color: red
+  size: medium
+---
+
+We found a {{</* param "color" */>}} shirt.
+{{< /code >}}
+
+Hugo renders this to:
+
+```html
+<p>We found a red shirt.</p>
+```
+
+Access nested values by [chaining](g) the [identifiers](g):
+
+```text
+{{</* param my.nested.param */>}}
+```
diff --git a/content/en/shortcodes/qr.md b/content/en/shortcodes/qr.md
new file mode 100755 (executable)
index 0000000..15e06cb
--- /dev/null
@@ -0,0 +1,113 @@
+---
+title: QR
+description: Insert a QR code into your content using the qr shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    parent: shortcodes
+    weight:
+weight:
+toc: true
+---
+
+{{< new-in 0.141.0 >}}
+
+{{% note %}}
+To override Hugo's embedded `qr` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl qr %}}
+{{% /note %}}
+
+The `qr` shortcode encodes the given text into a [QR code] using the specified options and renders the resulting image.
+
+Internally this shortcode calls the `images.QR` function. Please read the [related documentation] for implementation details and guidance.
+
+[QR code]: https://en.wikipedia.org/wiki/QR_code
+[related documentation]: /functions/images/qr/
+
+## Examples
+
+Use the self-closing syntax to pass the text as an argument:
+
+```text
+{{</* qr text="https://gohugo.io" /*/>}}
+```
+
+Or insert the text between the opening and closing tags:
+
+```text
+{{</* qr */>}}
+https://gohugo.io
+{{</* /qr */>}}
+```
+
+Both of the above produce this image:
+
+{{< qr text="https://gohugo.io" class="qrcode" />}}
+
+To create a QR code for a phone number:
+
+```text
+{{</* qr text="tel:+12065550101" /*/>}}
+```
+
+{{< qr text="tel:+12065550101" class="qrcode" />}}
+
+To create a QR code containing contact information in the [vCard] format:
+
+[vCard]: https://en.wikipedia.org/wiki/VCard
+
+```text
+{{</* qr level="low" scale=2 alt="QR code of vCard for John Smith" */>}}
+BEGIN:VCARD
+VERSION:2.1
+N;CHARSET=UTF-8:Smith;John;R.;Dr.;PhD
+FN;CHARSET=UTF-8:Dr. John R. Smith, PhD.
+ORG;CHARSET=UTF-8:ABC Widgets
+TITLE;CHARSET=UTF-8:Vice President Engineering
+TEL;TYPE=WORK:+12065550101
+EMAIL;TYPE=WORK:jsmith@example.org
+END:VCARD
+{{</* /qr */>}}
+```
+
+{{< qr level="low" scale=2 alt="QR code of vCard for John Smith" class="qrcode" >}}
+BEGIN:VCARD
+VERSION:2.1
+N;CHARSET=UTF-8:Smith;John;R.;Dr.;PhD
+FN;CHARSET=UTF-8:Dr. John R. Smith, PhD.
+ORG;CHARSET=UTF-8:ABC Widgets
+TITLE;CHARSET=UTF-8:Vice President Engineering
+TEL;TYPE=WORK:+12065550101
+EMAIL;TYPE=WORK:jsmith@example.org
+END:VCARD
+{{< /qr >}}
+
+## Parameters
+
+text
+: (`string`) The text to encode, falling back to the text between the opening and closing shortcode tags.
+
+level
+: (`string`) The error correction level to use when encoding the text, one of `low`, `medium`, `quartile`, or `high`. Default is `medium`.
+
+scale
+: (`int`) The number of image pixels per QR code module. Must be greater than or equal to 2. Default is `4`.
+
+targetDir
+: (`string`) The subdirectory within the [`publishDir`] where Hugo will place the generated image.
+
+[`publishDir`]: /getting-started/configuration/#publishdir
+
+alt
+: (`string`) The `alt` attribute of the `img` element.
+
+class
+: (`string`) The `class` attribute of the `img` element.
+
+id
+: (`string`) The `id` attribute of the `img` element.
+
+title
+: (`string`) The `title` attribute of the `img` element.
diff --git a/content/en/shortcodes/ref.md b/content/en/shortcodes/ref.md
new file mode 100755 (executable)
index 0000000..af13344
--- /dev/null
@@ -0,0 +1,48 @@
+---
+title: Ref
+description: Insert a permalink to the given page reference using the ref shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    parent: shortcodes
+    weight:
+weight:
+---
+
+{{% note %}}
+To override Hugo's embedded `ref` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl ref %}}
+{{% /note %}}
+
+{{% note %}}
+When working with the Markdown [content format], this shortcode has become largely redundant. Its functionality is now primarily handled by [link render hooks], specifically the embedded one provided by Hugo. This hook effectively addresses all the use cases previously covered by this shortcode.
+
+[content format]: /content-management/formats/
+[link render hooks]: /render-hooks/images/#default
+{{% /note %}}
+
+The `ref` shortcode returns the permalink of the given page reference.
+
+Example usage:
+
+```text
+[Post 1]({{%/* ref "/posts/post-1" */%}})
+[Post 1]({{%/* ref "/posts/post-1.md" */%}})
+[Post 1]({{%/* ref "/posts/post-1#foo" */%}})
+[Post 1]({{%/* ref "/posts/post-1.md#foo" */%}})
+```
+
+Rendered:
+
+```html
+<a href="https://example.org/posts/post-1/">Post 1</a>
+<a href="https://example.org/posts/post-1/">Post 1</a>
+<a href="https://example.org/posts/post-1/#foo">Post 1</a>
+<a href="https://example.org/posts/post-1/#foo">Post 1</a>
+```
+
+{{% note %}}
+Always use the `{{%/* */%}}` notation when calling this shortcode.
+{{% /note %}}
diff --git a/content/en/shortcodes/relref.md b/content/en/shortcodes/relref.md
new file mode 100755 (executable)
index 0000000..e98e829
--- /dev/null
@@ -0,0 +1,48 @@
+---
+title: Relref
+description: Insert a relative permalink to the given page reference using the relref shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    parent: shortcodes
+    weight:
+weight:
+---
+
+{{% note %}}
+To override Hugo's embedded `relref` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl relref %}}
+{{% /note %}}
+
+{{% note %}}
+When working with the Markdown [content format], this shortcode has become largely redundant. Its functionality is now primarily handled by [link render hooks], specifically the embedded one provided by Hugo. This hook effectively addresses all the use cases previously covered by this shortcode.
+
+[content format]: /content-management/formats/
+[link render hooks]: /render-hooks/links/
+{{% /note %}}
+
+The `relref` shortcode returns the relative permalink of the given page reference.
+
+Example usage:
+
+```text
+[Post 1]({{%/* relref "/posts/post-1" */%}})
+[Post 1]({{%/* relref "/posts/post-1.md" */%}})
+[Post 1]({{%/* relref "/posts/post-1#foo" */%}})
+[Post 1]({{%/* relref "/posts/post-1.md#foo" */%}})
+```
+
+Rendered:
+
+```html
+<a href="/posts/post-1/">Post 1</a>
+<a href="/posts/post-1/">Post 1</a>
+<a href="/posts/post-1/#foo">Post 1</a>
+<a href="/posts/post-1/#foo">Post 1</a>
+```
+
+{{% note %}}
+Always use the `{{%/* */%}}` notation when calling this shortcode.
+{{% /note %}}
diff --git a/content/en/shortcodes/vimeo.md b/content/en/shortcodes/vimeo.md
new file mode 100755 (executable)
index 0000000..b82ad86
--- /dev/null
@@ -0,0 +1,72 @@
+---
+title: Vimeo
+description: Embed a Vimeo video in your content using the vimeo shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    parent: shortcodes
+    weight:
+weight:
+toc: true
+---
+
+{{% note %}}
+To override Hugo's embedded `vimeo` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl vimeo %}}
+{{% /note %}}
+
+## Example
+
+To display a Vimeo video with this URL:
+
+```text
+https://vimeo.com/channels/staffpicks/55073825
+```
+
+Include this in your Markdown:
+
+```text
+{{</* vimeo 55073825 */>}}
+```
+
+Hugo renders this to:
+
+{{< vimeo 55073825 >}}
+
+## Parameters
+
+class
+: (`string`) The `class` attribute of the wrapping `div` element. Adding one or more CSS classes disables inline styling.
+
+id
+: (`string`) The `id` of the Vimeo video
+
+title
+: (`string`) The `title` attribute of the `iframe` element.
+
+If you proivde a `class` or `title` you must use a named parameter for the `id`.
+
+```text
+{{</* vimeo id=55073825 class="foo bar" title="My Video" */>}}
+```
+
+## Privacy
+
+Adjust the relevant privacy settings in your site configuration.
+
+{{< code-toggle config=privacy.vimeo />}}
+
+disable
+: (`bool`) Whether to disable the shortcode. Default is `false`.
+
+enableDNT
+: (`bool`) Whether to block the Vimeo player from tracking session data and analytics. Default is `false`.
+
+simple
+: (`bool`) Whether to enable simple mode. If `true`, the video thumbnail is fetched from Vimeo and overlaid with a play button. Clicking the thumbnail opens the video in a new Vimeo tab. Default is `false`.
+
+The source code for the simple version of the shortcode is available [here].
+
+[here]: {{% eturl vimeo_simple %}}
diff --git a/content/en/shortcodes/x.md b/content/en/shortcodes/x.md
new file mode 100755 (executable)
index 0000000..6995d72
--- /dev/null
@@ -0,0 +1,61 @@
+---
+title: X
+description: Embed an X post in your content using the x shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    parent: shortcodes
+    weight:
+weight:
+toc: true
+---
+
+{{< new-in 0.141.0 >}}
+
+{{% note %}}
+To override Hugo's embedded `x` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl x %}}
+{{% /note %}}
+
+## Example
+
+To display an X post with this URL:
+
+```txt
+https://x.com/SanDiegoZoo/status/1453110110599868418
+```
+
+Include this in your Markdown:
+
+```text
+{{</* x user="SanDiegoZoo" id="1453110110599868418" */>}}
+```
+
+Rendered:
+
+{{< x user="SanDiegoZoo" id="1453110110599868418" >}}
+
+## Privacy
+
+Adjust the relevant privacy settings in your site configuration.
+
+{{< code-toggle config=privacy.x />}}
+
+disable
+: (`bool`) Whether to disable the shortcode. Default is `false`.
+
+enableDNT
+: (`bool`) Whether to prevent X from using post and embedded page data for personalized suggestions and ads. Default is `false`.
+
+simple
+: (`bool`) Whether to enable simple mode. If `true`, Hugo builds a static version of the of the post without JavaScript. Default is `false`.
+
+The source code for the simple version of the shortcode is available [here].
+
+[here]: {{% eturl x_simple %}}
+
+If you enable simple mode you may want to disable the hardcoded inline styles by setting `disableInlineCSS` to `true` in your site configuration. The default value for this setting is `false`.
+
+{{< code-toggle config=services.x />}}
diff --git a/content/en/shortcodes/youtube.md b/content/en/shortcodes/youtube.md
new file mode 100755 (executable)
index 0000000..51e47a0
--- /dev/null
@@ -0,0 +1,97 @@
+---
+title: YouTube
+description: Embed a YouTube video in your content using the youtube shortcode.
+categories: [shortcodes]
+keywords: []
+menu:
+  docs:
+    parent: shortcodes
+    weight:
+weight:
+toc: true
+---
+
+{{% note %}}
+To override Hugo's embedded `youtube` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
+
+[source code]: {{% eturl youtube %}}
+{{% /note %}}
+
+## Example
+
+To display a YouTube video with this URL:
+
+```text
+https://www.youtube.com/watch?v=0RKpf3rK57I
+```
+
+Include this in your Markdown:
+
+```text
+{{</* youtube 0RKpf3rK57I */>}}
+```
+
+Hugo renders this to:
+
+{{< youtube 0RKpf3rK57I >}}
+
+## Parameters
+
+id
+: (`string`) The video `id`. Optional if the `id` is provided as a positional argument as shown in the example above.
+
+allowFullScreen
+{{< new-in 0.125.0 >}}
+: (`bool`) Whether the `iframe` element can activate full screen mode. Default is `true`.
+
+autoplay
+ {{< new-in 0.125.0 >}}
+: (`bool`) Whether to automatically play the video. Forces `mute` to `true`. Default is `false`.
+
+class
+: (`string`) The `class` attribute of the wrapping `div` element. When specified, removes the `style` attributes from the `iframe` element and its wrapping `div` element.
+
+controls
+{{< new-in 0.125.0 >}}
+: (`bool`) Whether to display the video controls. Default is `true`.
+
+end
+{{< new-in 0.125.0 >}}
+: (`int`) The time, measured in seconds from the start of the video, when the player should stop playing the video.
+
+loading
+{{< new-in 0.125.0 >}}
+: (`string`) The loading attribute of the `iframe` element, either `eager` or `lazy`. Default is `eager`.
+
+loop
+{{< new-in 0.125.0 >}}
+: (`bool`) Whether to indefinitely repeat the video. Ignores the `start` and `end` arguments after the first play.  Default is `false`.
+
+mute
+{{< new-in 0.125.0 >}}
+: (`bool`) Whether to mute the video. Always `true` when `autoplay` is `true`. Default is `false`.
+
+start
+{{< new-in 0.125.0 >}}
+: (`int`) The time, measured in seconds from the start of the video, when the player should start playing the video.
+
+title
+: (`string`) The `title` attribute of the `iframe` element. Defaults to "YouTube video".
+
+Example using some of the above:
+
+```text
+{{</* youtube id=0RKpf3rK57I start=30 end=60 loading=lazy */>}}
+```
+
+## Privacy
+
+Adjust the relevant privacy settings in your site configuration.
+
+{{< code-toggle config=privacy.youTube />}}
+
+disable
+: (`bool`) Whether to disable the shortcode. Default is `false`.
+
+privacyEnhanced
+: (`bool`) Whether to block YouTube from storing information about visitors on your website unless the user plays the embedded video. Default is `false`.
index ed44053c8170649fb05c8102498968c5072fc3b7..c0a66ce45edec9b9b259d1f3c70454988bc31b53 100644 (file)
@@ -21,7 +21,7 @@ Finding a tool that will make your customers, writers, designers, _and_ DevOps t
 
 **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 flexible**. Thanks to Hugo's content and layout system, we were able to preserve our existing file and directory 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.
 
index 6af694687a45ff67934eb7ccee846c71553743f4..cec1936ea3278201a8f425d2046154fa556ca894 100644 (file)
@@ -1,4 +1,4 @@
 ---
 title: Showcases
 draft: true
----
\ No newline at end of file
+---
index ef0587e41bec13b135afbc4784ca50ba4b922511..24b4e3a9f1458e0293c84f87936bd9a14801dab6 100644 (file)
@@ -62,7 +62,7 @@ The most encouraging result is how quick the site is around the world. Most Toma
 
 ---
 
-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 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 directories with files is fun when you’ve been using dynamic systems for a while – there’s something really pure about it.
 
 ---
 
index 6ad4b7840fb225a8f5612f9df2ecb6896b582145..e2f8e168ff3db1ecfeeadde8a13f0e8890f2e563 100644 (file)
@@ -9,7 +9,7 @@ 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" >}}
+{{< x 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.
 
index 1bd870984420a333544bbaa556e71d9d956720cb..b2f92f08c3f24570546301850085b9dd25931b15 100644 (file)
@@ -4,4 +4,3 @@
 The site is built by:
 
 * [Tobias Kummer](https://www.overmind-studios.de/about/)
-
index 4dc66233218e54904ff3885a75f84de43f5374e4..abfb0803cc0aef349112f61cd9089af0c5d7d355 100644 (file)
@@ -11,8 +11,8 @@ Have a **notable Hugo site[^1]**? We would love to feature it in this **Showcase
 Please:
 
 1. Fork https://github.com/gohugoio/hugoDocs.
-2. Run `hugo new content showcase/your-site`. This will use the archetype bundle in the [docs repo](https://github.com/gohugoio/hugoDocs/tree/master/archetypes).
-3. Follow the instructions in the newly created page bundle.
-4. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls.
+1. Run `hugo new content showcase/your-site`. This will use the archetype bundle in the [docs repo](https://github.com/gohugoio/hugoDocs/tree/master/archetypes).
+1. Follow the instructions in the newly created page bundle.
+1. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls.
 
 [^1]: We want this to show Hugo in its best light, so this is not for the average Hugo blog. In most cases the answer to "Is my site [notable](https://www.dictionary.com/browse/notable)?" will be obvious, but if in doubt, create an [issue](https://github.com/gohugoio/hugoDocs/issues) with a link and some words, and we can discuss it. But if you have a site with an interesting Hugo story or a company site where the company itself is notable, you are most welcome.
index cde195697f8996944a1fb216208b95b0194846fe..39df75c3db96741f6a65bd033dc38f492f77e5d6 100644 (file)
@@ -11,7 +11,7 @@ menu:
 weight: 160
 ---
 
-To render a 404 error page in the root of your site, create a 404 template in the root of the layouts directory. For example:
+To render a 404 error page in the root of your site, create a 404 template in the root of the `layouts` directory. For example:
 
 {{< code file=layouts/404.html >}}
 {{ define "main" }}
index 23b2a3eaf629fd3bab655b35b74682c2a93b637b..0d8f0a0ec7154ad0e20a7a5b69b00a036f4853ba 100644 (file)
@@ -13,4 +13,4 @@ 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.
+A template is an HTML file with [template actions](g), 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 be4d7116a14a0d49032dbc563bbfda7d6e6ddc36..7b995ece5b17d9e2a962bd47cd3c1ace9235ddad 100644 (file)
@@ -22,15 +22,15 @@ The following are common use cases for content views:
 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 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
+layouts/
+├── posts/
+│   ├── li.html
+│   ├── single.html
+│   └── summary.html
+├── project/
+│   ├── li.html
+│   └── single.html
+└── summary.html
 ```
 
 ## Which template will be rendered?
index 2c386b5df9c85741aceb99a84c3d31591315df86..246381db26bf5a2836c683a9bda986fb08aa773e 100644 (file)
@@ -15,7 +15,7 @@ aliases: [/templates/internal]
 ## Disqus
 
 {{% note %}}
-To override Hugo's embedded Disqus template, copy the [source code] to a file with the same name in the layouts/partials directory, then call it from your templates using the [`partial`] function:
+To override Hugo's embedded Disqus template, copy the [source code] to a file with the same name in the `layouts/partials` directory, then call it from your templates using the [`partial`] function:
 
 `{{ partial "disqus.html" . }}`
 
@@ -58,7 +58,7 @@ You can also set the following in the front matter for a given piece of content:
 ## Google Analytics
 
 {{% note %}}
-To override Hugo's embedded Google Analytics template, copy the [source code] to a file with the same name in the layouts/partials directory, then call it from your templates using the [`partial`] function:
+To override Hugo's embedded Google Analytics template, copy the [source code] to a file with the same name in the `layouts/partials` directory, then call it from your templates using the [`partial`] function:
 
 `{{ partial "google_analytics.html" . }}`
 
@@ -90,7 +90,7 @@ To use this value in your own template, access the configured ID with `{{ site.C
 ## Open Graph
 
 {{% note %}}
-To override Hugo's embedded Open Graph template, copy the [source code] to a file with the same name in the layouts/partials directory, then call it from your templates using the [`partial`] function:
+To override Hugo's embedded Open Graph template, copy the [source code] to a file with the same name in the `layouts/partials` directory, then call it from your templates using the [`partial`] function:
 
 `{{ partial "opengraph.html" . }}`
 
@@ -149,7 +149,7 @@ If using YouTube this will produce a og:video tag like `<meta property="og:video
 ## Schema
 
 {{% note %}}
-To override Hugo's embedded Schema template, copy the [source code] to a file with the same name in the layouts/partials directory, then call it from your templates using the [`partial`] function:
+To override Hugo's embedded Schema template, copy the [source code] to a file with the same name in the `layouts/partials` directory, then call it from your templates using the [`partial`] function:
 
 `{{ partial "schema.html" . }}`
 
@@ -170,7 +170,7 @@ To include the embedded template:
 ## X (Twitter) Cards
 
 {{% note %}}
-To override Hugo's embedded Twitter Cards template, copy the [source code] to a file with the same name in the layouts/partials directory, then call it from your templates using the [`partial`] function:
+To override Hugo's embedded Twitter Cards template, copy the [source code] to a file with the same name in the `layouts/partials` directory, then call it from your templates using the [`partial`] function:
 
 `{{ partial "twitter_cards.html" . }}`
 
index 3086791c5cd3ecb33cc93eb6226a6e6bb9750f19..088f40f26e8727f0c9f0f20d4a8a1d14822846f9 100644 (file)
@@ -14,7 +14,6 @@ aliases: [/layout/homepage/,/templates/homepage-template/,/templates/homepage/]
 
 The home 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.
 
-
 {{< youtube ut1xtRZ1QOA >}}
 
 ## Home template lookup order
@@ -23,7 +22,7 @@ See [Template Lookup](/templates/lookup-order/).
 
 ## Add content and front matter to the home page
 
-The home page 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 home page the way you would any other content file.
+The home page accepts content and front matter from an `_index.md` file. This file should live at the root of your `content` directory (i.e., `content/_index.md`). You can then add body copy and metadata to your home page the way you would any other content file.
 
 See the home template below or [Content Organization][contentorg] for more information on the role of `_index.md` in adding content and front matter to list pages.
 
index f8f50dfaa187af906fa0bdd313337e535170a0fe..b68ecf9259a9950e828e8489eb18f9fb96cbf3f9 100644 (file)
@@ -13,7 +13,7 @@ weight: 20
 toc: true
 ---
 
-A template is a file in the layouts directory of a project, theme, or module. Templates use [variables] , [functions], and [methods] to transform your content, resources, and data into a published page.
+A template is a file in the `layouts` directory of a project, theme, or module. Templates use [variables] , [functions], and [methods] to transform your content, resources, and data into a published page.
 
 [functions]: /functions/
 [methods]: /methods/
@@ -44,10 +44,7 @@ While HTML templates are the most common, you can create templates for any [outp
 
 ## Context
 
-The most important concept to understand before creating a template is _context_, the data passed into each template. The data may be a simple value, or more commonly [objects] and associated [methods].
-
-[objects]: /getting-started/glossary/#object
-[methods]: /getting-started/glossary/#method
+The most important concept to understand before creating a template is _context_, the data passed into each template. The data may be a simple value, or more commonly [objects](g) and associated [methods](g).
 
 For example, a template for a single page receives a `Page` object, and the `Page` object provides methods to return values or perform actions.
 
@@ -81,9 +78,7 @@ The current context may change within a template. For example, at the top of a t
 {{ end }}
 {{< /code >}}
 
-In the example above, the context changes as we `range` through the [slice] of values. In the first iteration the context is "foo", and in the second iteration the context is "bar". Inside of the `with` block the context is "baz". Hugo renders the above to:
-
-[slice]: /getting-started/glossary/#slice
+In the example above, the context changes as we `range` through the [slice](g) of values. In the first iteration the context is "foo", and in the second iteration the context is "bar". Inside of the `with` block the context is "baz". Hugo renders the above to:
 
 ```html
 <h2>My Page Title</h2>
@@ -116,12 +111,7 @@ Make sure that you thoroughly understand the concept of _context_ before you con
 
 In the examples above the paired opening and closing braces represent the beginning and end of a template action, a data evaluation or control structure within a template.
 
-A template action may contain literal values ([boolean], [string], [integer], and [float]), variables, functions, and methods.
-
-[boolean]: /getting-started/glossary/#boolean
-[string]: /getting-started/glossary/#string
-[integer]: /getting-started/glossary/#integer
-[float]: /getting-started/glossary/#float
+A template action may contain literal values ([boolean](g), [string](g), [integer](g), and [float](g)), variables, functions, and methods.
 
 {{< code file=layouts/_default/single.html >}}
 {{ $convertToLower := true }}
@@ -167,9 +157,7 @@ Whitespace includes spaces, horizontal tabs, carriage returns, and newlines.
 
 ### Pipes
 
-Within a template action you may [pipe] a value to a function or method. The piped value becomes the final argument to the function or method. For example, these are equivalent:
-
-[pipe]: /getting-started/glossary/#pipeline
+Within a template action you may [pipe](g) a value to a function or method. The piped value becomes the final argument to the function or method. For example, these are equivalent:
 
 ```go-html-template
 {{ strings.ToLower "Hugo" }} → hugo
@@ -207,9 +195,7 @@ You can split a template action over two or more lines. For example, these are e
 }}
 ```
 
-You can also split [raw string literals] over two or more lines. For example, these are equivalent:
-
-[raw string literals]: /getting-started/glossary/#string-literal-raw
+You can also split [raw string literals](g) over two or more lines. For example, these are equivalent:
 
 ```go-html-template
 {{ $msg := "This is line one.\nThis is line two." }}
@@ -221,16 +207,9 @@ This is line two.`
 
 ## Variables
 
-A variable is a user-defined [identifier] prepended with a dollar sign (`$`), representing a value of any data type, initialized or assigned within a template action. For example, `$foo` and `$bar` are variables.
-
-[identifier]: /getting-started/glossary/#identifier
+A variable is a user-defined [identifier](g) prepended with a dollar sign (`$`), representing a value of any data type, initialized or assigned within a template action. For example, `$foo` and `$bar` are variables.
 
-Variables may contain [scalars], [slices], [maps], or [objects].
-
-[scalars]: /getting-started/glossary/#scalar
-[slices]: /getting-started/glossary/#slice
-[maps]: /getting-started/glossary/#map
-[objects]: /getting-started/glossary/#object
+Variables may contain [scalars](g), [slices](g), [maps](g), or [objects](g).
 
 Use `:=` to initialize a variable, and use `=` to assign a value to a variable that has been previously initialized. For example:
 
@@ -260,9 +239,7 @@ With variables that represent a slice or map, use the [`index`] function to retu
 Slices and arrays are zero-based; element 0 is the first element.
 {{% /note %}}
 
-With variables that represent a map or object, [chain] identifiers to return the desired value or to access the desired method.
-
-[chain]: /getting-started/glossary/#chain
+With variables that represent a map or object, [chain](g) identifiers to return the desired value or to access the desired method.
 
 ```go-html-template
 {{ $map := dict "a" "foo" "b" "bar" "c" "baz" }}
@@ -317,7 +294,7 @@ Object|Method|Description
 `Page`|[`Date`](methods/page/date/)|Returns the date of the given page.
 `Page`|[`Params`](methods/page/params/)|Returns a map of custom parameters as defined in the front matter of the given page.
 `Page`|[`Title`](methods/page/title/)|Returns the title of the given page.
-`Site`|[`Data`](methods/site/data/)|Returns a data structure composed from the files in the data directory.
+`Site`|[`Data`](methods/site/data/)|Returns a data structure composed from the files in the `data` directory.
 `Site`|[`Params`](methods/site/params/)|Returns a map of custom parameters as defined in the site configuration.
 `Site`|[`Title`](methods/site/title/)|Returns the title as defined in the site configuration.
 
@@ -399,7 +376,7 @@ Use the [`template`] function to include one or more of Hugo's [embedded templat
 
 [`partial`]: /functions/partials/include/
 [`partialCached`]: /functions/partials/includecached/
-[`template`]: functions/go-template/template/
+[`template`]: /functions/go-template/template/
 
 Use the [`partial`] or [`partialCached`] function to include one or more [partial templates]:
 
index 3f9a9c527eb1e7bd5a8766e6ad41c57477d9808b..c1a7b2676915262d47816256beb0efd5a14ae241 100644 (file)
@@ -37,7 +37,7 @@ 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.
+Templates can live in either the project's or the themes' `layout` directories, 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
@@ -52,9 +52,7 @@ content/
 └── 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
+Files in the root of the `content` directory have a [content type](g) of `page`. To render these pages with a unique template, create a matching subdirectory:
 
 ```text
 layouts/
index 2fb338278228bf7bbc7f28a9189b456fd95704dc..674c6a5652be631e635016581a513143edb828c5 100644 (file)
@@ -27,7 +27,7 @@ The most common templating mistake related to pagination is invoking pagination
 ## Terminology
 
 paginate
-: To split a [list page] into two or more subsets.
+: To split a [list page](g) into two or more subsets.
 
 pagination
 : The process of paginating a list page.
@@ -38,8 +38,6 @@ pager
 paginator
 : A collection of pagers.
 
-[list page]: /getting-started/glossary/#list-page
-
 ## Configuration
 
 Control pagination behavior in your site configuration. These are the default settings:
@@ -116,11 +114,10 @@ To paginate a list page using the `Paginate` method:
 In the example above, we:
 
 1. Build a page collection
-2. Sort the page collection by title
-3. Paginate the page collection, with 7 pages per pager
-4. Range over the paginated page collection, rendering a link to each page
-5. Call the embedded pagination template to create navigation links between pagers
-
+1. Sort the page collection by title
+1. Paginate the page collection, with 7 pages per pager
+1. Range over the paginated page collection, rendering a link to each page
+1. Call the embedded pagination template to create navigation links between pagers
 
 To paginate a list page using the `Paginator` method:
 
@@ -135,8 +132,8 @@ To paginate a list page using the `Paginator` method:
 In the example above, we:
 
 1. Paginate the page collection passed into the template, with the default number of pages per pager
-2. Range over the paginated page collection, rendering a link to each page
-3. Call the embedded pagination template to create navigation links between pagers
+1. Range over the paginated page collection, rendering a link to each page
+1. Call the embedded pagination template to create navigation links between pagers
 
 ## Caching
 
@@ -193,7 +190,7 @@ The `terse` format has fewer controls and page slots, consuming less space when
 ```
 
 {{% note %}}
-To override Hugo's embedded pagination template, copy the [source code] to a file with the same name in the layouts/partials directory, then call it from your templates using the [`partial`] function:
+To override Hugo's embedded pagination template, copy the [source code] to a file with the same name in the `layouts/partials` directory, then call it from your templates using the [`partial`] function:
 
 `{{ partial "pagination.html" . }}`
 
index 30055e7e3ab5723143dea3533dfc86891ac1b921..996914b0511555e52cde9b9beb8c89d0aa92adbe 100644 (file)
@@ -27,8 +27,7 @@ layouts/
     ├── head/
     │   ├── favicons.html
     │   ├── metadata.html
-    │   ├── prerender.html
-    │   └── twitter.html
+    │   └── prerender.html
     └── header/
         ├── site-header.html
         └── site-nav.html
index ee07557949e916063a634d4c1a795ed3ad97a7cc..0e453c549c9b8afde3705f1ee7efa8b4040cd345 100644 (file)
@@ -33,7 +33,7 @@ Search engines that honor the Robots Exclusion Protocol will interpret this as p
 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`
+1. `/themes/<THEME>/layouts/robots.txt`
 
 ## robots.txt template example
 
@@ -50,9 +50,9 @@ This template creates a robots.txt file with a `Disallow` directive for each pag
 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.
+1. 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.
+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 %}}
index 0967bb338ce104d1669064e1e818b62e7f98480b..da7244a94f9cb2a9ffb1deb98790c53c3092f13c 100644 (file)
@@ -23,9 +23,7 @@ taxonomy = ['html']
 term = ['html']
 {{< /code-toggle >}}
 
-To disable feed generation for all [page kinds]:
-
-[page kinds]: /getting-started/glossary/#page-kind
+To disable feed generation for all [page kinds](g):
 
 {{< code-toggle file=hugo >}}
 disableKinds = ['rss']
index 5587c74790387c45772204730525d71f353dd340..452aeda593bf5d901d1db2a9c1d009f97dcaf7bd 100644 (file)
@@ -43,21 +43,21 @@ Hugo selects shortcode templates based on the shortcode name, the current output
 
 Shortcode name|Output format|Language|Template path
 :--|:--|:--|:--
-foo|html|en|layouts/shortcodes/foo.en.html
-foo|html|en|layouts/shortcodes/foo.html.html
-foo|html|en|layouts/shortcodes/foo.html
-foo|html|en|layouts/shortcodes/foo.html.en.html
+foo|html|en|`layouts/shortcodes/foo.en.html`
+foo|html|en|`layouts/shortcodes/foo.html.html`
+foo|html|en|`layouts/shortcodes/foo.html`
+foo|html|en|`layouts/shortcodes/foo.html.en.html`
 
 Shortcode name|Output format|Language|Template path
 :--|:--|:--|:--
-foo|rss|en|layouts/shortcodes/foo.en.xml
-foo|rss|en|layouts/shortcodes/foo.rss.xml
-foo|rss|en|layouts/shortcodes/foo.en.html
-foo|rss|en|layouts/shortcodes/foo.rss.en.xml
-foo|rss|en|layouts/shortcodes/foo.xml
-foo|rss|en|layouts/shortcodes/foo.html.en.html
-foo|rss|en|layouts/shortcodes/foo.html.html
-foo|rss|en|layouts/shortcodes/foo.html
+foo|rss|en|`layouts/shortcodes/foo.en.xml`
+foo|rss|en|`layouts/shortcodes/foo.rss.xml`
+foo|rss|en|`layouts/shortcodes/foo.en.html`
+foo|rss|en|`layouts/shortcodes/foo.rss.en.xml`
+foo|rss|en|`layouts/shortcodes/foo.xml`
+foo|rss|en|`layouts/shortcodes/foo.html.en.html`
+foo|rss|en|`layouts/shortcodes/foo.html.html`
+foo|rss|en|`layouts/shortcodes/foo.html`
 
 Note that templates provided by a theme or module always take precedence.
 
@@ -415,8 +415,8 @@ The same inline shortcode can be reused later in the same content file, with dif
 [`Name`]: /methods/shortcode/name/
 [`Position`]: /methods/shortcode/position/
 [built-in shortcode]: /content-management/shortcodes/
-[figure]: /content-management/shortcodes/#figure
+[figure]: /shortcodes/figure/
 [lookup order]: /templates/lookup-order/
 [source organization]: /getting-started/directory-structure/
 [vimeoexample]: #single-flexible-example-vimeo
-[youtubeshortcode]: /content-management/shortcodes/#youtube
+[youtubeshortcode]: /shortcodes/youtube/
index 9fc15221055f3da058ee21d266e93650a82fad9f..166f54933682b141f1b0b76a4282d89104b2122f 100644 (file)
@@ -60,15 +60,15 @@ title = 'News'
 
 To override the built-in sitemap.xml template, create a new file in either of these locations:
 
-- layouts/sitemap.xml
-- layouts/_default/sitemap.xml
+- `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
+- `layouts/sitemapindex.xml`
+- `layouts/_default/sitemapindex.xml`
 
 ## Disable sitemap generation
 
@@ -79,4 +79,4 @@ disableKinds = ['sitemap']
 {{</ code-toggle >}}
 
 [`publishDir`]: /getting-started/configuration#publishdir
-[sitemap protocol]: <https://www.sitemaps.org/protocol.html>
+[sitemap protocol]: https://www.sitemaps.org/protocol.html
index d0f24b1b27d9b43e662db2289599f48cde44acbd..f9f28ee57244c3f922d015bb625929c402b29905 100644 (file)
@@ -12,10 +12,8 @@ toc: true
 aliases: [/taxonomies/displaying/,/templates/terms/,/indexes/displaying/,/taxonomies/templates/,/indexes/ordering/, /templates/taxonomies/, /templates/taxonomy-templates/]
 ---
 
-The [taxonomy] template below inherits the site's shell from the [base template], and renders a list of [terms] in the current taxonomy.
+The [taxonomy](g) template below inherits the site's shell from the [base template], and renders a list of [terms](g) in the current taxonomy.
 
-[taxonomy]: /getting-started/glossary/#taxonomy
-[terms]: /getting-started/glossary/#term
 [base template]: /templates/types/
 
 {{< code file=layouts/_default/taxonomy.html >}}
@@ -57,9 +55,7 @@ Plural
 ```
 
 Terms
-: (`page.Taxonomy`) Returns the `Taxonomy` object, consisting of a map of terms and the [weighted pages] associated with each term.
-
-[weighted pages]: /getting-started/glossary/#weighted-page
+: (`page.Taxonomy`) Returns the `Taxonomy` object, consisting of a map of terms and the [weighted pages](g) associated with each term.
 
 ```go-html-template
 {{ $taxonomyObject := .Data.Terms }} 
@@ -99,9 +95,8 @@ The taxonomy template below inherits the site's shell from the base template, an
 
 ## Include content links
 
-The [`Alphabetical`] and [`ByCount`] methods used in the previous examples return an [ordered taxonomy], so we can also list the content to which each term is assigned.
+The [`Alphabetical`] and [`ByCount`] methods used in the previous examples return an [ordered taxonomy](g), so we can also list the content to which each term is assigned.
 
-[ordered taxonomy]: /getting-started/glossary/#ordered-taxonomy
 [`Alphabetical`]: /methods/taxonomy/alphabetical/
 [`ByCount`]: /methods/taxonomy/bycount/
 
@@ -124,7 +119,7 @@ The taxonomy template below inherits the site's shell from the base template, an
 
 ## Display metadata
 
-Display metadata about each term by creating a corresponding branch bundle in the content directory.
+Display metadata about each term by creating a corresponding branch bundle in the `content` directory.
 
 For example, create an "authors" taxonomy:
 
@@ -133,9 +128,7 @@ For example, create an "authors" taxonomy:
 author = 'authors'
 {{< /code-toggle >}}
 
-Then create content with one [branch bundle] for each term:
-
-[branch bundle]: /getting-started/glossary/#branch-bundle
+Then create content with one [branch bundle](g) for each term:
 
 ```text
 content/
index 5becd0aa0f138e4342e952ca434397f16cd0673a..07b8ef29a52c4daa62f564d4cfc64362dfb9e3b7 100644 (file)
@@ -11,9 +11,8 @@ weight: 100
 toc: true
 ---
 
-The [term] template below inherits the site's shell from the [base template], and renders a list of pages associated with the current term.
+The [term](g) template below inherits the site's shell from the [base template], and renders a list of pages associated with the current term.
 
-[term]: /getting-started/glossary/#term
 [base template]: /templates/types/
 
 {{< code file=layouts/_default/term.html >}}
@@ -63,7 +62,7 @@ Term
 
 ## Display metadata
 
-Display metadata about each term by creating a corresponding branch bundle in the content directory.
+Display metadata about each term by creating a corresponding branch bundle in the `content` directory.
 
 For example, create an "authors" taxonomy:
 
@@ -72,9 +71,7 @@ For example, create an "authors" taxonomy:
 author = 'authors'
 {{< /code-toggle >}}
 
-Then create content with one [branch bundle] for each term:
-
-[branch bundle]: /getting-started/glossary/#branch-bundle
+Then create content with one [branch bundle](g) for each term:
 
 ```text
 content/
index 934105d8809f4075ab81c9b74ff2699826ffc99c..0bd72ccc4b42c10fea7416ff35328feaa927935e 100644 (file)
@@ -17,7 +17,7 @@ aliases: ['/templates/lists/']
 
 ## Structure
 
-Create templates in the layouts directory in the root of your project.
+Create templates in the `layouts` directory in the root of your project.
 
 Although your site may not require each of these templates, the example below is typical for a site of medium complexity.
 
@@ -142,9 +142,7 @@ Learn more about [section templates](/templates/section/).
 
 ## Taxonomy
 
-A taxonomy template renders a list of terms in a [taxonomy].
-
-[taxonomy]: /getting-started/glossary/#taxonomy
+A taxonomy template renders a list of terms in a [taxonomy](g).
 
 For example, the taxonomy template below inherits the site's shell from the base template, and renders a list of terms in the current taxonomy.
 
@@ -164,9 +162,7 @@ Learn more about [taxonomy templates](/templates/taxonomy/).
 
 ## Term
 
-A term template renders a list of pages associated with a [term].
-
-[term]: /getting-started/glossary/#term
+A term template renders a list of pages associated with a [term](g).
 
 For example, the term template below inherits the site's shell from the base template, and renders a list of pages associated with the current term.
 
@@ -256,9 +252,7 @@ Learn more about [render hook templates](/render-hooks/).
 
 A shortcode template is used to render a component of your site. Unlike partial templates, shortcode templates are called from content pages.
 
-For example, the shortcode template below renders an audio element from a [global resource].
-
-[global resource]: /getting-started/glossary/#global-resource
+For example, the shortcode template below renders an audio element from a [global resource](g).
 
 {{< code file=layouts/shortcodes/audio.html >}}
 {{ with resources.Get (.Get "src") }}
index 99064e271343f3a3ddf6be27a978e503a05a821e..0fc78153f674a669128b2e0e494725625c9d26d9 100644 (file)
@@ -35,7 +35,7 @@ Alternatively, you can use the [Jekyll import command](/commands/hugo_import_jek
 ## DokuWiki
 
 [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 extras like the TODO plugin. Written with extensibility in mind using Python 3. Also generates a TOML header for each page. Designed to copy-paste the wiki directory into your /content directory.
+: Migrates your DokuWiki source pages from [DokuWiki syntax](https://www.dokuwiki.org/wiki:syntax) to Hugo Markdown syntax. Includes extras like the TODO plugin. Written with extensibility in mind using Python 3. Also generates a TOML header for each page. Designed to copy-paste the wiki directory into your `content` directory.
 
 ## WordPress
 
index 614bc511ccf14267d8c43e003d634d1e285d9795..73aea7ce4cc044d882269d8a073879fceca6a68d 100644 (file)
@@ -43,10 +43,9 @@ A static website with a dynamic search function? Yes, Hugo provides an alternati
 [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.
 
-[INFINI Pizza for WebAssembly](https://github.com/infinilabs/pizza-docsearch) 
+[INFINI Pizza for WebAssembly](https://github.com/infinilabs/pizza-docsearch)
 : Pizza is a super-lightweight yet fully featured search engine written in Rust. You can quickly add offline search functionality to your Hugo website in just five minutes with only three lines of code. For a step-by-step guide on integrating it with Hugo, check out [this blog tutorial](https://dev.to/medcl/adding-search-functionality-to-a-hugo-static-site-based-on-infini-pizza-for-webassembly-4h5e).
 
-
 ## Commercial
 
 [Algolia](https://www.algolia.com/)
index aa4bb71a229cb16b4b1d155e54c5763c48275171..81f2724a3cbb4906e6298475e125836155018509 100644 (file)
@@ -13,8 +13,8 @@ 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.
+1. Use Thing Two instead.
+1. We're going to remove Thing One at some point in the future.
 
 [reasons for deprecation]: https://en.wikipedia.org/wiki/Deprecation
 
@@ -30,8 +30,8 @@ Common [reasons for deprecation]:
 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
+1. Log a WARN message for another 6 minor releases
+1. Log an ERROR message and fail the build thereafter
 
 To see the INFO messages, you must use the `--logLevel` command line flag:
 
index 3fd48c62d5e3b6fbf32eb10f97b0e4d95e9ec08c..4891c566b5717b44b550055d2b49b43aa55f6f64 100644 (file)
@@ -9,7 +9,6 @@ menu:
     parent: troubleshooting
     weight: 70
 weight: 70
-# Use level 6 headings for each question.
 ---
 
 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.
@@ -30,7 +29,7 @@ To resolve, install a different edition based on the feature table above. See th
 
 ###### Why do I see "Page Not Found" when visiting the home page?
 
-In the content/_index.md file:
+In the `content/_index.md` file:
 
   - Is `draft` set to `true`?
   - Is the `date` in the future?
@@ -41,29 +40,26 @@ If the answer to any of these questions is yes, either change the field values,
 
 ###### Why is a given page not published?
 
-In the content/section/page.md file, or in the content/section/page/index.md file:
+In the `content/section/page.md` file, or in the `content/section/page/index.md` file:
 
-  - Is `draft` set to `true`?
-  - Is the `date` in the future?
-  - Is the `publishDate` in the future?
-  - Is the `expiryDate` in the past?
+- Is `draft` set to `true`?
+- Is the `date` in the future?
+- Is the `publishDate` in the future?
+- Is the `expiryDate` in the past?
 
 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`.
 
 ###### Why can't I see any of a page's descendants?
 
-You may have an index.md file instead of an _index.md file. See&nbsp;[details](/content-management/page-bundles/).
+You may have an `index.md` file instead of an `_index.md` file. See&nbsp;[details](/content-management/page-bundles/).
 
 ###### What is the difference between an index.md file and an _index.md file?
 
-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/).
-
-[branch bundle]: /getting-started/glossary/#branch-bundle
-[leaf bundle]: /getting-started/glossary/#leaf-bundle
+A directory with an `index.md file` is a [leaf bundle](g). A directory with an `_index.md` file is a [branch bundle](g). See&nbsp;[details](/content-management/page-bundles/).
 
 ###### Why is my partial template not rendered as expected?
 
-You may have neglected to pass the required [context] when calling the partial. For example:
+You may have neglected to pass the required [context](g) when calling the partial. For example:
 
 ```go-html-template
 {{/* incorrect */}}
@@ -106,13 +102,9 @@ In these cases, instead of monitoring native file system events, use the `--poll
 
 ###### Why is my page Scratch or Store missing a value?
 
-The [`Scratch`] and [`Store`] methods on a `Page` object allow you to create a [scratch pad] on the given page to store and manipulate data. Values are often set within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are not determinate until Hugo renders the page content.
-
-[scratch pad]: /getting-started/glossary/#scratch-pad
-
-If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop] variable:
+The [`Scratch`] and [`Store`] methods on a `Page` object allow you to create a [scratch pad](g) on the given page to store and manipulate data. Values are often set within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are not determinate until Hugo renders the page content.
 
-[noop]: /getting-started/glossary/#noop
+If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop](g) variable:
 
 ```go-html-template
 {{ $noop := .Content }}
@@ -137,7 +129,6 @@ For other questions please visit the [forum]. A quick search of over 20,000 topi
 
 [`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 a2df1b08ecdba9fdfc8d4574ab144a67121171b2..2cf64477a38c7b72e28eefa4efc4b93b83bd9d78 100644 (file)
@@ -90,7 +90,7 @@ total count
 : The number of times the template was executed.
 
 template
-: The path to the template, relative to the layouts directory.
+: The path to the template, relative to the `layouts` directory.
 
 [`partial`]: /functions/partials/include/
 [`partialCached`]: /functions/partials/includecached/
@@ -109,4 +109,4 @@ Note that you can create cached variants of each partial by passing additional a
 
 ## 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/).
+Use the `debug.Timer` function to determine execution time for a block of code, useful for finding performance bottlenecks in templates. See&nbsp;[details](/functions/debug/timer/).
index 73a17ab06844b277319cd95923094dcf0214991b..dc61df0e86173022c7d190bee50e19519405b30a 100644 (file)
@@ -54,6 +54,9 @@ chroma:
   - Aliases:
     - armasm
     Name: ArmAsm
+  - Aliases:
+    - atl
+    Name: ATL
   - Aliases:
     - autohotkey
     - ahk
@@ -88,6 +91,9 @@ chroma:
     - dosbatch
     - winbatch
     Name: Batchfile
+  - Aliases:
+    - beef
+    Name: Beef
   - Aliases:
     - bib
     - bibtex
@@ -190,6 +196,9 @@ chroma:
   - Aliases:
     - css
     Name: CSS
+  - Aliases:
+    - csv
+    Name: CSV
   - Aliases:
     - cue
     Name: CUE
@@ -308,7 +317,7 @@ chroma:
     - Gherkin
     Name: Gherkin
   - Aliases:
-    - gleam>
+    - gleam
     Name: Gleam
   - Aliases:
     - glsl
@@ -414,6 +423,12 @@ chroma:
   - Aliases:
     - json
     Name: JSON
+  - Aliases:
+    - jsonata
+    Name: JSONata
+  - Aliases:
+    - jsonnet
+    Name: Jsonnet
   - Aliases:
     - julia
     - jl
@@ -464,7 +479,8 @@ chroma:
     Name: Matlab
   - Aliases:
     - mcfunction
-    Name: mcfunction
+    - mcf
+    Name: MCFunction
   - Aliases:
     - meson
     - meson.build
@@ -521,6 +537,11 @@ chroma:
     - nixos
     - nix
     Name: Nix
+  - Aliases:
+    - nsis
+    - nsi
+    - nsh
+    Name: NSIS
   - Aliases:
     - objective-c
     - objectivec
@@ -752,6 +773,9 @@ chroma:
   - Aliases:
     - smarty
     Name: Smarty
+  - Aliases:
+    - snbt
+    Name: SNBT
   - Aliases:
     - snobol
     Name: Snobol
@@ -862,6 +886,9 @@ chroma:
   - Aliases:
     - typoscripthtmldata
     Name: TypoScriptHtmlData
+  - Aliases:
+    - typst
+    Name: Typst
   - Aliases: null
     Name: ucode
   - Aliases:
@@ -904,6 +931,9 @@ chroma:
   - Aliases:
     - wgsl
     Name: WebGPU Shading Language
+  - Aliases:
+    - vtt
+    Name: WebVTT
   - Aliases:
     - whiley
     Name: Whiley
@@ -993,6 +1023,7 @@ config:
   dataDir: data
   defaultContentLanguage: en
   defaultContentLanguageInSubdir: false
+  defaultOutputFormat: html
   deployment:
     confirm: false
     dryRun: false
@@ -1146,7 +1177,6 @@ config:
       lineNos: false
       lineNumbersInTable: true
       noClasses: true
-      noHl: false
       style: monokai
       tabWidth: 4
       wrapperClass: highlight
@@ -1639,6 +1669,10 @@ config:
       disable: false
       enableDNT: false
       simple: false
+    x:
+      disable: false
+      enableDNT: false
+      simple: false
     youTube:
       disable: false
       privacyEnhanced: false
@@ -1718,6 +1752,8 @@ config:
       limit: -1
     twitter:
       disableInlineCSS: false
+    x:
+      disableInlineCSS: false
   sitemap:
     changeFreq: ""
     disable: false
@@ -3196,6 +3232,11 @@ tpl:
         Args: null
         Description: ""
         Examples: null
+      Mask:
+        Aliases: null
+        Args: null
+        Description: ""
+        Examples: null
       Opacity:
         Aliases: null
         Args: null
@@ -3221,6 +3262,11 @@ tpl:
         Args: null
         Description: ""
         Examples: null
+      QR:
+        Aliases: null
+        Args: null
+        Description: ""
+        Examples: null
       Saturation:
         Aliases: null
         Args: null
index b7247f2727fba586f75aa180c6e9562892131996..f75b14f12c9c9539733f9d07db93406e7df674f3 100644 (file)
 'google_analytics' = 'google_analytics.html'
 'opengraph' = 'opengraph.html'
 'pagination' = 'pagination.html'
-'schema' = 'schema.html'
-'twitter_cards' = 'twitter_cards.html'
-
 'robots' = '_default/robots.txt'
 'rss' = '_default/rss.xml'
+'schema' = 'schema.html'
 'sitemap' = '_default/sitemap.xml'
 'sitemapindex' = '_default/sitemapindex.xml'
+'twitter_cards' = 'twitter_cards.html'
 
 # Render hooks
+'render-codeblock-goat' = '_default/_markup/render-codeblock-goat.html'
 'render-image' = '_default/_markup/render-image.html'
 'render-link' = '_default/_markup/render-link.html'
-'render-codeblock-goat' = '_default/_markup/render-codeblock-goat.html'
+'render-table' = '_default/_markup/render-table.html'
 
 # Shortcodes
-'comment' = 'shortcodes/comment.html'
 'details' = 'shortcodes/details.html'
 'figure' = 'shortcodes/figure.html'
 'gist' = 'shortcodes/gist.html'
 'highlight' = 'shortcodes/highlight.html'
 'instagram' = 'shortcodes/instagram.html'
 'param' = 'shortcodes/param.html'
+'qr' = 'shortcodes/qr.html'
 'ref' = 'shortcodes/ref.html'
 'relref' = 'shortcodes/relref.html'
 'twitter' = 'shortcodes/twitter.html'
+'twitter_simple' = 'shortcodes/twitter_simple.html'
 'vimeo' = 'shortcodes/vimeo.html'
+'vimeo_simple' = 'shortcodes/vimeo_simple.html'
+'x' = 'shortcodes/x.html'
+'x_simple' = 'shortcodes/x_simple.html'
 'youtube' = 'shortcodes/youtube.html'
diff --git a/go.mod b/go.mod
index bb45d109d30e550fe45b12528b5d33ca5fe8ddc0..56a48deacfd604475b3e4bf7f2d235684440dbc6 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs
 
 go 1.22.0
 
-require github.com/gohugoio/gohugoioTheme v0.0.0-20250106044328-feb60697e056 // indirect
+require github.com/gohugoio/gohugoioTheme v0.0.0-20250116152525-2d382cae7743 // indirect
diff --git a/go.sum b/go.sum
index abc8fbaa044a15ac9858f750606bb258013d49f7..af9b5febf1db86277fb22b7a421f84a71db3d4bc 100644 (file)
--- a/go.sum
+++ b/go.sum
@@ -1,2 +1,2 @@
-github.com/gohugoio/gohugoioTheme v0.0.0-20250106044328-feb60697e056 h1:nPfHricsQXtVewK865bX2LDLhUImhIZEuajlYPM2Bho=
-github.com/gohugoio/gohugoioTheme v0.0.0-20250106044328-feb60697e056/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
+github.com/gohugoio/gohugoioTheme v0.0.0-20250116152525-2d382cae7743 h1:gjoqq8+RnGwpuU/LQVYGGR/LsDplrfUjOabWwoROYsM=
+github.com/gohugoio/gohugoioTheme v0.0.0-20250116152525-2d382cae7743/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
diff --git a/hugo_stats.json b/hugo_stats.json
deleted file mode 100644 (file)
index ca27d89..0000000
+++ /dev/null
@@ -1,820 +0,0 @@
-{
-  "htmlElements": {
-    "tags": [
-      "",
-      "a",
-      "article",
-      "aside",
-      "blockquote",
-      "body",
-      "br",
-      "button",
-      "circle",
-      "code",
-      "date",
-      "dd",
-      "div",
-      "dl",
-      "dt",
-      "em",
-      "figcaption",
-      "figure",
-      "footer",
-      "form",
-      "g",
-      "h1",
-      "h2",
-      "h3",
-      "h4",
-      "h5",
-      "h6",
-      "head",
-      "header",
-      "hr",
-      "html",
-      "i",
-      "iframe",
-      "img",
-      "li",
-      "link",
-      "main",
-      "meta",
-      "nav",
-      "noscript",
-      "ol",
-      "p",
-      "path",
-      "pre",
-      "script",
-      "section",
-      "small",
-      "span",
-      "strong",
-      "style",
-      "sup",
-      "svg",
-      "table",
-      "tbody",
-      "td",
-      "thead",
-      "time",
-      "title",
-      "tr",
-      "ul"
-    ],
-    "classes": [
-      "!('about'",
-      "!('content-management'",
-      "!('contribute'",
-      "!('functions'",
-      "!('getting-started'",
-      "!('hosting-and-deployment'",
-      "!('modules'",
-      "!('pipes'",
-      "!('templates'",
-      "!('tools'",
-      "!('troubleshooting'",
-      "!('variables'",
-      "\u0026\u0026",
-      "(false",
-      "(true",
-      "-ml-px",
-      "-mr-12",
-      "-mr-3",
-      "-translate-x-3",
-      "-translate-y-2",
-      "absolute",
-      "absolute-l",
-      "active",
-      "admonition",
-      "admonition-content",
-      "admonition-icon",
-      "anchor",
-      "b--moon-gray",
-      "benchstat",
-      "better",
-      "bg-accent-color-dark",
-      "bg-animate",
-      "bg-black",
-      "bg-carrot-500",
-      "bg-cover",
-      "bg-gradient-to-b",
-      "bg-gray-100",
-      "bg-gray-200",
-      "bg-gray-300",
-      "bg-gray-50",
-      "bg-gray-600",
-      "bg-gray-900",
-      "bg-green-100",
-      "bg-mango-300",
-      "bg-mango-50",
-      "bg-near-white",
-      "bg-opacity-20",
-      "bg-opacity-75",
-      "bg-orange-500",
-      "bg-steel-200",
-      "bg-steel-500",
-      "bg-steel-600",
-      "bg-steel-800",
-      "bg-steel-900",
-      "bg-white",
-      "blTK",
-      "black",
-      "block",
-      "bmt1",
-      "border",
-      "border-0",
-      "border-2",
-      "border-b",
-      "border-gray-100",
-      "border-gray-200",
-      "border-gray-300",
-      "border-l",
-      "border-none",
-      "border-r",
-      "border-solid",
-      "border-t",
-      "border-transparent",
-      "bottom-0",
-      "break-inside-avoid-l",
-      "btn-primary",
-      "c",
-      "c1",
-      "chroma",
-      "clearfix",
-      "cm",
-      "code-copy-content",
-      "code-toggle",
-      "column-count-3-l",
-      "column-gap-1-l",
-      "configs",
-      "copy",
-      "cp",
-      "cursor-pointer",
-      "dark:bg-red-800",
-      "dark:border-gray-800",
-      "delta",
-      "details",
-      "dim",
-      "disabled",
-      "divide-gray-200",
-      "divide-x",
-      "err",
-      "f2-fluid",
-      "f6",
-      "filename",
-      "fill-current",
-      "fixed",
-      "fixed-lTK",
-      "flex",
-      "flex-1",
-      "flex-auto",
-      "flex-auto-ns",
-      "flex-col",
-      "flex-column",
-      "flex-none",
-      "flex-shrink-0",
-      "flex-wrap",
-      "fn",
-      "focus:border-steel-500",
-      "focus:outline-none",
-      "focus:ring-1",
-      "focus:ring-2",
-      "focus:ring-inset",
-      "focus:ring-offset-2",
-      "focus:ring-steel-500",
-      "focus:ring-white",
-      "focus:z-10",
-      "font-black",
-      "font-bold",
-      "font-extrabold",
-      "font-extralight",
-      "font-medium",
-      "font-mono",
-      "font-normal",
-      "font-sans",
-      "font-semibold",
-      "footnote-backref",
-      "footnote-ref",
-      "footnotes",
-      "from-primarydark",
-      "gap-4",
-      "ge",
-      "grid",
-      "grid-cols-1",
-      "group",
-      "grow",
-      "gs",
-      "gu",
-      "h-0",
-      "h-0.5",
-      "h-10",
-      "h-12",
-      "h-16",
-      "h-2",
-      "h-32",
-      "h-5",
-      "h-6",
-      "h-64",
-      "h-8",
-      "h-full",
-      "h-screen",
-      "h6",
-      "hidden",
-      "highlight",
-      "hl",
-      "hover",
-      "hover-bg-green",
-      "hover-bg-near-white",
-      "hover-bg-primary-color",
-      "hover-bg-primary-color-dark",
-      "hover-blue",
-      "hover:bg-gray-300",
-      "hover:bg-gray-50",
-      "hover:bg-steel-500",
-      "hover:bg-steel-700",
-      "hover:border",
-      "hover:text-gray-200",
-      "hover:text-gray-900",
-      "hover:text-hotpink-400",
-      "hover:text-hotpink-600",
-      "hover:text-limegreen-900",
-      "hover:text-royalblue-700",
-      "hover:text-steel-500",
-      "hover:text-white",
-      "img",
-      "in",
-      "inline-block",
-      "inline-flex",
-      "inset-0",
-      "inset-x-0",
-      "instagram-media",
-      "items-center",
-      "items-start",
-      "justify-between",
-      "justify-center",
-      "justify-end",
-      "k",
-      "kc",
-      "kd",
-      "kr",
-      "kt",
-      "l",
-      "language-asciidoc",
-      "language-bash",
-      "language-go",
-      "language-go-html-template",
-      "language-go-text-template",
-      "language-html",
-      "language-js",
-      "language-json",
-      "language-markdown",
-      "language-md",
-      "language-ps1",
-      "language-sh",
-      "language-svg",
-      "language-text",
-      "language-toml",
-      "language-txt",
-      "language-xml",
-      "language-yaml",
-      "language-yml",
-      "lazyload",
-      "ld",
-      "lead",
-      "leading-none",
-      "leading-normal",
-      "leading-relaxed",
-      "leading-snug",
-      "leading-tight",
-      "left-0",
-      "lg:bg-steel-700",
-      "lg:block",
-      "lg:flex",
-      "lg:flex-grow",
-      "lg:flex-shrink-0",
-      "lg:hidden",
-      "lg:inline-block",
-      "lg:items-center",
-      "lg:max-w-lg",
-      "lg:mb-0",
-      "lg:mr-auto",
-      "lg:mt-0",
-      "lg:p-4",
-      "lg:pb-5",
-      "lg:prose-lg",
-      "lg:pt-0",
-      "lg:px-4",
-      "lg:px-5",
-      "lg:px-8",
-      "lg:py-5",
-      "lg:py-8",
-      "lg:rounded-md",
-      "lg:shadow-lg",
-      "lg:space-x-4",
-      "lg:text-5xl",
-      "lg:w-1/2",
-      "lg:w-1/4",
-      "lg:w-1/5",
-      "lg:w-11/12",
-      "lg:w-3/5",
-      "lg:w-4/5",
-      "lg:w-auto",
-      "light-gray",
-      "link",
-      "list-reset",
-      "lnt",
-      "lntable",
-      "lntd",
-      "m",
-      "m-0",
-      "m-1",
-      "max-w-6xl",
-      "max-w-lg",
-      "max-w-xs",
-      "mb-0",
-      "mb-1",
-      "mb-2",
-      "mb-3",
-      "mb-4",
-      "mb-8",
-      "mb5",
-      "mb7",
-      "md:flex",
-      "md:flex-col",
-      "md:flex-grow",
-      "md:grid-cols-2",
-      "md:mt-8",
-      "md:pb-12",
-      "menu))",
-      "menu['about']",
-      "menu['content-management']",
-      "menu['contribute']",
-      "menu['functions']",
-      "menu['getting-started']",
-      "menu['hosting-and-deployment']",
-      "menu['modules']",
-      "menu['pipes']",
-      "menu['templates']",
-      "menu['tools']",
-      "menu['troubleshooting']",
-      "menu['variables']",
-      "mf",
-      "mi",
-      "min-h-screen",
-      "min-w-0",
-      "minor",
-      "ml-1",
-      "ml-10",
-      "ml-4",
-      "ml-6",
-      "ml1",
-      "mr-1.5",
-      "mr-10",
-      "mr-3",
-      "mr-4",
-      "mt-0",
-      "mt-1",
-      "mt-2",
-      "mt-4",
-      "mt-5",
-      "mt-6",
-      "mt-8",
-      "mt3",
-      "mt4",
-      "mv2",
-      "mv3",
-      "mv4",
-      "mv6",
-      "mw-100",
-      "mw5-l",
-      "mx-auto",
-      "my-0",
-      "n",
-      "na",
-      "navbar-menu",
-      "nb",
-      "needs-js",
-      "nested-blockquote",
-      "nested-copy-seperator",
-      "nested-img",
-      "nested-links",
-      "nested-linksTK",
-      "nested-list-reset",
-      "nf",
-      "ni",
-      "nightwind",
-      "nightwind-prevent",
-      "nightwind-prevent-block",
-      "nn",
-      "no-js",
-      "no-underline",
-      "nodelta",
-      "note",
-      "note-icon",
-      "nt",
-      "nt3",
-      "nv",
-      "nx",
-      "o",
-      "o-0",
-      "o-80",
-      "oldnew",
-      "opacity-60",
-      "open",
-      "order-0",
-      "order-0-l",
-      "order-1",
-      "order-1-l",
-      "order-2",
-      "output-content",
-      "overflow-hidden",
-      "overflow-x-scroll",
-      "overflow-y-auto",
-      "p",
-      "p-0",
-      "p-2",
-      "p-3",
-      "p-4",
-      "p-5",
-      "p-8",
-      "pa4-m",
-      "page-item",
-      "page-link",
-      "pagination",
-      "pb-1",
-      "pb-2",
-      "pb-3",
-      "pb-4",
-      "pb-5",
-      "pb-7",
-      "pb-8",
-      "pb2",
-      "ph1",
-      "ph2",
-      "ph4",
-      "pl-0",
-      "pl-1",
-      "pl-2",
-      "pl-3",
-      "pl-6",
-      "pl5-l",
-      "pr-2",
-      "pr1",
-      "primary-color",
-      "prose",
-      "pt-0",
-      "pt-1",
-      "pt-2",
-      "pt-3",
-      "pt-4",
-      "pt-5",
-      "pv1",
-      "px-0",
-      "px-2",
-      "px-3",
-      "px-4",
-      "py-0",
-      "py-0.5",
-      "py-1.5",
-      "py-2",
-      "py-3",
-      "py-4",
-      "py-6",
-      "relative",
-      "right-0",
-      "rounded",
-      "rounded-full",
-      "rounded-l-lg",
-      "rounded-l-md",
-      "rounded-lg",
-      "rounded-md",
-      "rounded-r-md",
-      "row",
-      "s",
-      "s1",
-      "s2",
-      "san-serif",
-      "se",
-      "shadow",
-      "shadow-lg",
-      "shadow-md",
-      "shadow-sm",
-      "show",
-      "sm:flex",
-      "sm:grid-cols-2",
-      "sm:mb-0",
-      "sm:mt-0",
-      "sm:mt-8",
-      "sm:p-4",
-      "sm:pb-0",
-      "sm:pb-6",
-      "sm:pt-3",
-      "sm:pt-5",
-      "sm:px-4",
-      "sm:px-5",
-      "sm:px-6",
-      "sm:py-0",
-      "sm:py-4",
-      "sm:py-5",
-      "sm:py-6",
-      "sm:text-2xl",
-      "sm:text-4xl",
-      "sm:text-base",
-      "sm:text-center",
-      "sm:text-left",
-      "sm:w-1/2",
-      "sm:w-1/5",
-      "sm:w-11/12",
-      "sm:w-4/5",
-      "space-x-4",
-      "space-x-8",
-      "space-y-1",
-      "sr-only",
-      "table",
-      "table-bordered",
-      "tc",
-      "text-2xl",
-      "text-3xl",
-      "text-4xl",
-      "text-5xl",
-      "text-base",
-      "text-black",
-      "text-center",
-      "text-gray-200",
-      "text-gray-300",
-      "text-gray-400",
-      "text-gray-500",
-      "text-gray-600",
-      "text-gray-900",
-      "text-lg",
-      "text-limegreen-600",
-      "text-limegreen-700",
-      "text-mango-100",
-      "text-mango-300",
-      "text-md",
-      "text-royalblue-500",
-      "text-royalblue-600",
-      "text-sm",
-      "text-steel-100",
-      "text-steel-500",
-      "text-steel-900",
-      "text-white",
-      "text-xl",
-      "text-xs",
-      "tile",
-      "tip",
-      "tip-icon",
-      "to-steel-800",
-      "top-0",
-      "top-2",
-      "tracked",
-      "tracking-normal",
-      "tracking-tight",
-      "transform",
-      "twitter-tweet",
-      "unchanged",
-      "uppercase",
-      "v-base",
-      "v-mid",
-      "v-top",
-      "w",
-      "w-1/5",
-      "w-10",
-      "w-11/12",
-      "w-12",
-      "w-14",
-      "w-2",
-      "w-2/3",
-      "w-30-l",
-      "w-32",
-      "w-5",
-      "w-50-m",
-      "w-6",
-      "w-64",
-      "w-8",
-      "w-80-nsTK",
-      "w-96",
-      "w-auto",
-      "w-full",
-      "w-two-third-l",
-      "warning",
-      "whitespace-no-wrap",
-      "worse",
-      "x",
-      "xl:flex",
-      "xl:flex-col",
-      "z-0",
-      "z-40",
-      "z-999",
-      "||"
-    ],
-    "ids": [
-      ".gitlab-ci.yml",
-      "/blog/greatest-city/index.html",
-      "/content/actors/bruce-willis/_index.md",
-      "/layouts/shortcodes/img.html",
-      "/layouts/shortcodes/vimeo.html",
-      "/layouts/shortcodes/year.html",
-      "/layouts/shortcodes/youtube.html",
-      "/themes/yourtheme/layouts/review/single.html",
-      "404.html",
-      "TableOfContents",
-      "addrobotstxt.sh",
-      "all-taxonomies-keys-and-pages.html",
-      "all-taxonomies.html",
-      "archetype-example.sh",
-      "archetypes/functions.md",
-      "archetypes/newsletter.md",
-      "articles.html",
-      "asciicast-3mf1JGaN0AX0Z7j5kLGl3hSh8",
-      "asciicast-7naKerRYUGVPj8kiDmdh5k5h9",
-      "asciicast-BvJBsF6egk9c163bMsObhuNXj",
-      "asciicast-ItACREbFgvJ0HjnSNeTknxWy9",
-      "asciicast-Lc5iwTVny2kuUC8lqvNnL6oDU",
-      "asciicast-eUojYCfRTZvkEiqc52fUsJRBR",
-      "bad-url-sidebar-menu-output.html",
-      "base-64-output.html",
-      "base64-input.html",
-      "baseof.html",
-      "bf-config.toml",
-      "bf-config.yml",
-      "boxfile.yml",
-      "breadcrumb.html",
-      "check-title-length.html",
-      "clone-herring-cove-theme.sh",
-      "config.toml",
-      "content-header.html",
-      "content-image.md",
-      "content/blog/greatest-city.md",
-      "content/posts/_index.md",
-      "content/posts/default-function-example.md",
-      "content/posts/my-awesome-post.md",
-      "content/posts/my-post.md",
-      "content/posts/old-post.md",
-      "content/posts/old-url.md",
-      "content/tutorials/learn-html.md",
-      "correct-url-sidebar-menu-output.html",
-      "delimit-example-front-matter.toml",
-      "delimit-page-tags-final-and-input.html",
-      "delimit-page-tags-final-and-output.html",
-      "delimit-page-tags-input.html",
-      "delimit-page-tags-output.html",
-      "disqus.html",
-      "dot-notation-default-return-value.html",
-      "dot-notation-default-value.html",
-      "example-tweet-input.md",
-      "example-tweet-output.html",
-      "example-vimeo-input.md",
-      "example-vimeo-output.html",
-      "example-youtube-input-with-autoplay.md",
-      "example-youtube-input-with-title.md",
-      "example-youtube-input.md",
-      "example-youtube-output.html",
-      "example.com/posts/index.html",
-      "example.com/quote/index.html",
-      "external-links.svg",
-      "figure-input-example.md",
-      "figure-output-example.html",
-      "first-and-where-together.html",
-      "fn:1",
-      "fn:2",
-      "fnref:1",
-      "fnref:2",
-      "footer.html",
-      "from-gh.sh",
-      "gist-input.md",
-      "gist-output.html",
-      "gitignore.sh",
-      "gohugoio",
-      "grab-top-two-tags.html",
-      "header.html",
-      "highlight-example.md",
-      "how-many-posts.html",
-      "hugo-new-site.sh",
-      "if-instead-of-default.html",
-      "img-output.html",
-      "index.html",
-      "instagram-hide-caption-output.html",
-      "instagram-input-hide-caption.md",
-      "instagram-input.md",
-      "install-brew.sh",
-      "install-extended-with-chocolatey.ps1",
-      "install-go.sh",
-      "install-openssh.sh",
-      "install-with-chocolatey.ps1",
-      "install-with-homebrew.sh",
-      "install-with-linuxbrew.sh",
-      "install-with-macports.sh",
-      "install.sh",
-      "layout/_default/section.html",
-      "layout/_default/single.html",
-      "layouts/404.html",
-      "layouts/_default/_markup/render-heading.html",
-      "layouts/_default/_markup/render-image.html",
-      "layouts/_default/_markup/render-link.html",
-      "layouts/_default/baseof.html",
-      "layouts/_default/li.html",
-      "layouts/_default/list.html",
-      "layouts/_default/section.html",
-      "layouts/_default/single.html",
-      "layouts/_default/summary.html",
-      "layouts/_default/taxonomy.html",
-      "layouts/index.html",
-      "layouts/partials/all-taxonomies.html",
-      "layouts/partials/alllanguages.html",
-      "layouts/partials/bad-url-sidebar-menu.html",
-      "layouts/partials/breadcrumb.html",
-      "layouts/partials/by-date-reverse.html",
-      "layouts/partials/by-date.html",
-      "layouts/partials/by-expiry-date.html",
-      "layouts/partials/by-group-by-page.html",
-      "layouts/partials/by-last-mod.html",
-      "layouts/partials/by-length.html",
-      "layouts/partials/by-link-title.html",
-      "layouts/partials/by-nested-param.html",
-      "layouts/partials/by-page-date.html",
-      "layouts/partials/by-page-expiry-date.html",
-      "layouts/partials/by-page-field.html",
-      "layouts/partials/by-page-lastmod.html",
-      "layouts/partials/by-page-param-as-date.html",
-      "layouts/partials/by-page-param.html",
-      "layouts/partials/by-page-publish-date.html",
-      "layouts/partials/by-publish-date.html",
-      "layouts/partials/by-rating.html",
-      "layouts/partials/by-title.html",
-      "layouts/partials/by-weight.html",
-      "layouts/partials/content-header.html",
-      "layouts/partials/correct-url-sidebar-menu.html",
-      "layouts/partials/default-order.html",
-      "layouts/partials/disqus.html",
-      "layouts/partials/footer.html",
-      "layouts/partials/get-csv.html",
-      "layouts/partials/groups.html",
-      "layouts/partials/head.html",
-      "layouts/partials/header.html",
-      "layouts/partials/i18nlist.html",
-      "layouts/partials/post-tag-link.html",
-      "layouts/partials/post-tag-list.html",
-      "layouts/partials/related.html",
-      "layouts/partials/schemaorg-metadata.html",
-      "layouts/partials/sidebar.html",
-      "layouts/partials/svgs/external-links.svg",
-      "layouts/partials/toc.html",
-      "layouts/partials/twitter.html",
-      "layouts/partials/upcoming-events.html",
-      "layouts/posts/single.html",
-      "layouts/robots.txt",
-      "layouts/section/articles.html",
-      "layouts/section/posts.html",
-      "layouts/shortcodes/gallery.html",
-      "layouts/shortcodes/img.html",
-      "layouts/shortcodes/imgproc.html",
-      "li.html",
-      "links-to-all-tags.html",
-      "list.html",
-      "netlify.toml",
-      "note-with-heading.html",
-      "note-with-heading.md",
-      "page-list-with-summaries.html",
-      "partial-cached-example.html",
-      "partials/templates/random-tweets.html",
-      "post-tag-list.html",
-      "prose",
-      "push-wecker-to-gh.sh",
-      "range-through-tags-w-global.html",
-      "remove-herring-cove-git.sh",
-      "robots.txt",
-      "schemaorg-metadata.html",
-      "section.html",
-      "setup-gh-repo.sh",
-      "shuffle-input.html",
-      "shuffle-output.html",
-      "sidebar.html",
-      "single.html",
-      "slice.html",
-      "summary.html",
-      "syntax-highlighted.html",
-      "tags-range-with-page-variable.html",
-      "taxonomy.html",
-      "time-passed.html",
-      "tip-output.html",
-      "toc.html",
-      "tutorials/learn-html/index.html",
-      "tweets.html",
-      "unix-to-month-integer.html",
-      "upcoming-events.html",
-      "using-tip.md",
-      "variable-as-default-value.html",
-      "vimeo-iframes.html",
-      "warning-admonition-input.md",
-      "warning-admonition-output.html",
-      "wercker-build-step.yml",
-      "wercker.yml",
-      "where-intersect-variables.html",
-      "with-instead-of-default.html",
-      "yourbaseurl/review/book01/index.html",
-      "youtube-embed.html"
-    ]
-  }
-}
\ No newline at end of file
diff --git a/hugoreleaser.toml b/hugoreleaser.toml
deleted file mode 100644 (file)
index 3ee1aad..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-project = "hugoDocs"
-
-[release_settings]
-  name             = "${HUGORELEASER_TAG}"
-  type             = "github"
-  repository       = "hugoDocs"
-  repository_owner = "gohugoio"
-
-  draft      = true
-  prerelease = false
-
-  [release_settings.release_notes_settings]
-    generate         = true
-    generate_on_host = false
-    short_threshold  = 10
-    short_title      = "What's Changed"
-
-    groups = [
-      { regexp = "snapcraft:|Merge commit|Merge branch|netlify:|release:|Squashed", ignore = true },
-      { title = "Typo fixes", regexp = "typo", ordinal = 20 },
-      { title = "Dependency Updates", regexp = "deps", ordinal = 30 },
-      { title = "Improvements", regexp = ".*", ordinal = 10 },
-    ]
-
-[[releases]]
-  paths = ["archives/**"]
-  # In this file we have only one release, but path can be used to partition the release step, e.g.:
-  #    hugoreleaser release -paths "releases/myrelease"
-  path = "myrelease"
diff --git a/hugoreleaser.yaml b/hugoreleaser.yaml
new file mode 100644 (file)
index 0000000..9f8671e
--- /dev/null
@@ -0,0 +1,29 @@
+project: hugoDocs
+release_settings:
+  name: ${HUGORELEASER_TAG}
+  type: github
+  repository: hugoDocs
+  repository_owner: gohugoio
+  draft: true
+  prerelease: false
+  release_notes_settings:
+    generate: true
+    generate_on_host: false
+    short_threshold: 10
+    short_title: What's Changed
+    groups:
+      - regexp: snapcraft:|Merge commit|Merge branch|netlify:|release:|Squashed
+        ignore: true
+      - title: Typo fixes
+        regexp: typo
+        ordinal: 20
+      - title: Dependency Updates
+        regexp: deps
+        ordinal: 30
+      - title: Improvements
+        regexp: .*
+        ordinal: 10
+releases:
+  - paths:
+      - archives/**
+    path: myrelease
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
new file mode 100644 (file)
index 0000000..a0ee6b1
--- /dev/null
@@ -0,0 +1,317 @@
+{{- /* Last modified: 2025-01-19T14:44:56-08:00 */}}
+
+{{- /*
+Copyright 2025 Veriphor LLC
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+*/}}
+
+{{- /*
+This render hook resolves internal destinations by looking for a matching:
+
+  1. Content page
+  2. Page resource (a file in the current page bundle)
+  3. Section resource (a file in the current section)
+  4. Global resource (a file in the assets directory)
+
+It skips the section resource lookup if the current page is a leaf bundle.
+
+External destinations are not modified.
+
+You must place global resources in the assets directory. If you have placed
+your resources in the static directory, and you are unable or unwilling to move
+them, you must mount the static directory to the assets directory by including
+both of these entries in your site configuration:
+
+  [[module.mounts]]
+  source = 'assets'
+  target = 'assets'
+
+  [[module.mounts]]
+  source = 'static'
+  target = 'assets'
+
+By default, if this render hook is unable to resolve a destination, including a
+fragment if present, it passes the destination through without modification. To
+emit a warning or error, set the error level in your site configuration:
+
+  [params.render_hooks.link]
+  errorLevel = 'warning' # ignore (default), warning, or error (fails the build)
+
+When you set the error level to warning, and you are in a development
+environment, you can visually highlight broken internal links:
+
+  [params.render_hooks.link]
+  errorLevel = 'warning' # ignore (default), warning, or error (fails the build)
+  highlightBroken = true # true or false (default)
+
+This will add a "broken" class to anchor elements with invalid src attributes.
+Add a rule to your CSS targeting the broken links:
+
+  a.broken {
+    background: #ff0;
+    border: 2px solid #f00;
+    padding: 0.1em 0.2em;
+  }
+
+This render hook may be unable to resolve destinations created with the ref and
+relref shortcodes. Unless you set the error level to ignore you should not use
+either of these shortcodes in conjunction with this render hook.
+
+@context {string} Destination The link destination.
+@context {page} Page A reference to the page containing the link.
+@context {string} PlainText The link description as plain text.
+@context {string} Text The link description.
+@context {string} Title The link title.
+
+@returns {template.html}
+*/}}
+
+{{- /* Initialize. */}}
+{{- $renderHookName := "link" }}
+
+{{- /* Verify minimum required version. */}}
+{{- $minHugoVersion := "0.141.0" }}
+{{- if lt hugo.Version $minHugoVersion }}
+  {{- errorf "The %q render hook requires Hugo v%s or later." $renderHookName $minHugoVersion }}
+{{- end }}
+
+{{- /* Error level when unable to resolve destination: ignore, warning, or error. */}}
+{{- $errorLevel := or site.Params.render_hooks.link.errorLevel "ignore" | lower }}
+
+{{- /* If true, adds "broken" class to broken links. Applicable in development environment when errorLevel is warning. */}}
+{{- $highlightBrokenLinks := or site.Params.render_hooks.link.highlightBroken false }}
+
+{{- /* Validate error level. */}}
+{{- if not (in (slice "ignore" "warning" "error") $errorLevel) }}
+  {{- errorf "The %q render hook is misconfigured. The errorLevel %q is invalid. Please check your site configuration." $renderHookName $errorLevel }}
+{{- end }}
+
+{{- /* Determine content path for warning and error messages. */}}
+{{- $contentPath := .Page.String }}
+
+{{- /* Parse destination. */}}
+{{- $u := urls.Parse .Destination }}
+
+{{- /* Set common message. */}}
+{{- $msg := printf "The %q render hook was unable to resolve the destination %q in %s" $renderHookName $u.String $contentPath }}
+
+{{- /* Set attributes for anchor element. */}}
+{{- $attrs := dict "href" $u.String }}
+{{- if eq $u.String "g" }}
+  {{- /* Destination is a glossary term. */}}
+  {{- $ctx := dict
+    "contentPath" $contentPath
+    "errorLevel" $errorLevel
+    "renderHookName" $renderHookName
+    "text" .Text
+  }}
+  {{- $attrs = partial "inline/h-rh-l/get-glossary-link-attributes.html" $ctx }}
+{{- else if $u.IsAbs }}
+  {{- /* Destination is a remote resource. */}}
+  {{- $attrs = merge $attrs (dict "rel" "external") }}
+{{- else }}
+  {{- with $u.Path }}
+    {{- with $p := or ($.PageInner.GetPage .) ($.PageInner.GetPage (strings.TrimRight "/" .)) }}
+      {{- /* Destination is a page. */}}
+      {{- $href := .RelPermalink }}
+      {{- with $u.RawQuery }}
+        {{- $href = printf "%s?%s" $href . }}
+      {{- end }}
+      {{- with $u.Fragment }}
+        {{- $ctx := dict
+          "contentPath" $contentPath
+          "errorLevel" $errorLevel
+          "page" $p
+          "parsedURL" $u
+          "renderHookName" $renderHookName
+        }}
+        {{- partial "inline/h-rh-l/validate-fragment.html" $ctx }}
+        {{- $href = printf "%s#%s" $href . }}
+      {{- end }}
+      {{- $attrs = dict "href" $href }}
+    {{- else with $.PageInner.Resources.Get $u.Path }}
+      {{- /* Destination is a page resource; drop query and fragment. */}}
+      {{- $attrs = dict "href" .RelPermalink }}
+    {{- else with (and (ne $.Page.BundleType "leaf") ($.Page.CurrentSection.Resources.Get $u.Path)) }}
+      {{- /* Destination is a section resource, and current page is not a leaf bundle. */}}
+      {{- $attrs = dict "href" .RelPermalink }}
+    {{- else with resources.Get $u.Path }}
+      {{- /* Destination is a global resource; drop query and fragment. */}}
+      {{- $attrs = dict "href" .RelPermalink }}
+    {{- else }}
+      {{- if eq $errorLevel "warning" }}
+        {{- warnf $msg }}
+        {{- if and $highlightBrokenLinks hugo.IsDevelopment }}
+          {{- $attrs = merge $attrs (dict "class" "broken") }}
+        {{- end }}
+      {{- else if eq $errorLevel "error" }}
+        {{- errorf $msg }}
+      {{- end }}
+    {{- end }}
+  {{- else }}
+    {{- with $u.Fragment }}
+      {{- /* Destination is on the same page; prepend relative permalink. */}}
+      {{- $ctx := dict
+        "contentPath" $contentPath
+        "errorLevel" $errorLevel
+        "page" $.Page
+        "parsedURL" $u
+        "renderHookName" $renderHookName
+      }}
+      {{- partial "inline/h-rh-l/validate-fragment.html" $ctx }}
+      {{- $attrs = dict "href" (printf "%s#%s" $.Page.RelPermalink .) }}
+    {{- else }}
+      {{- if eq $errorLevel "warning" }}
+        {{- warnf $msg }}
+        {{- if and $highlightBrokenLinks hugo.IsDevelopment }}
+          {{- $attrs = merge $attrs (dict "class" "broken") }}
+        {{- end }}
+      {{- else if eq $errorLevel "error" }}
+        {{- errorf $msg }}
+      {{- end }}
+    {{- end }}
+  {{- end }}
+{{- end }}
+
+{{- /* Render anchor element. */ -}}
+<a
+  {{- with .Title }} title="{{ . }}" {{- end }}
+  {{- range $k, $v := $attrs }}
+    {{- if $v }}
+      {{- printf " %s=%q" $k ($v | transform.HTMLEscape) | safeHTMLAttr }}
+    {{- end }}
+  {{- end -}}
+>{{ .Text }}</a>
+
+{{- define "partials/inline/h-rh-l/validate-fragment.html" }}
+  {{- /*
+  Validates the fragment portion of a link destination.
+
+  @context {string} contentPath The page containing the link.
+  @context {string} errorLevel The error level when unable to resolve destination; ignore (default), warning, or error.
+  @context {page} page The page corresponding to the link destination
+  @context {struct} parsedURL The link destination parsed by urls.Parse.
+  @context {string} renderHookName The name of the render hook.
+  */}}
+
+  {{- /* Initialize. */}}
+  {{- $contentPath := .contentPath }}
+  {{- $errorLevel := .errorLevel }}
+  {{- $p := .page }}
+  {{- $u := .parsedURL }}
+  {{- $renderHookName := .renderHookName }}
+
+  {{- /* Validate. */}}
+  {{- with $u.Fragment }}
+    {{- if $p.Fragments.Identifiers.Contains . }}
+      {{- if gt ($p.Fragments.Identifiers.Count .) 1 }}
+        {{- $msg := printf "The %q render hook detected duplicate heading IDs %q in %s" $renderHookName . $contentPath }}
+        {{- if eq $errorLevel "warning" }}
+          {{- warnf $msg }}
+        {{- else if eq $errorLevel "error" }}
+          {{- errorf $msg }}
+        {{- end }}
+      {{- end }}
+    {{- else }}
+      {{- /* Determine target path for warning and error message. */}}
+      {{- $targetPath := "" }}
+      {{- with $p.File }}
+        {{- $targetPath = .Path }}
+      {{- else }}
+        {{- $targetPath = .Path }}
+      {{- end }}
+      {{- /* Set common message. */}}
+      {{- $msg := printf "The %q render hook was unable to find heading ID %q in %s. See %s" $renderHookName . $targetPath $contentPath }}
+      {{- if eq $targetPath $contentPath }}
+        {{- $msg = printf "The %q render hook was unable to find heading ID %q in %s" $renderHookName . $targetPath }}
+      {{- end }}
+      {{- /* Throw warning or error. */}}
+      {{- if eq $errorLevel "warning" }}
+        {{- warnf $msg }}
+      {{- else if eq $errorLevel "error" }}
+        {{- errorf $msg }}
+      {{- end }}
+    {{- end }}
+  {{- end }}
+{{- end }}
+
+{{- define "partials/inline/h-rh-l/get-glossary-link-attributes.html" }}
+  {{- /*
+  Returns the anchor element attributes for a link to the given glossary term.
+
+  It first checks for the existence of a glossary page for the given term. If
+  no page is found, it then checks for a glossary page for the singular form of
+  the term. If neither page exists it throws a warning or error dependent on
+  the errorLevel setting
+
+  The returned href attribute does not point to the glossary term page.
+  Instead, via its fragment, it points to an entry on the glossary page.
+
+  @context {string} contentPath The page containing the link.
+  @context {string} errorLevel The error level when unable to resolve destination; ignore (default), warning, or error.
+  @context {string} renderHookName The name of the render hook.
+  @context {string} text The link text.
+  */}}
+
+  {{- /* Get context.. */}}
+  {{- $contentPath := .contentPath }}
+  {{- $errorLevel := .errorLevel }}
+  {{- $renderHookName := .renderHookName }}
+  {{- $text := .text | transform.Plainify | strings.ToLower }}
+
+  {{- /* Initialize. */}}
+  {{- $glossaryPath := "/getting-started/glossary" }}
+  {{- $termGiven := $text }}
+  {{- $termActual := "" }}
+  {{- $termSingular := inflect.Singularize $termGiven }}
+
+  {{- /* Verify that the glossary page exists. */}}
+  {{- $glossaryPage := site.GetPage $glossaryPath }}
+  {{- if not $glossaryPage }}
+    {{- errorf "The %q render hook was unable to find %s: see %s" $renderHookName $glossaryPath $contentPath }}
+  {{- end }}
+
+  {{- /* Theres a better way to handle this, but it works for now. */}}
+  {{- $cheating := dict
+    "chaining" "chain"
+    "localize" "localization"
+    "localized" "localization"
+    "paginating" "paginate"
+    "walking" "walk"
+  }}
+
+  {{- /* Verify that a glossary term page exists for the given term. */}}
+  {{- if site.GetPage (urls.JoinPath $glossaryPath ($termGiven | urlize)) }}
+    {{- $termActual = $termGiven }}
+  {{- else if site.GetPage (urls.JoinPath $glossaryPath ($termSingular | urlize)) }}
+    {{- $termActual = $termSingular }}
+  {{- else }}
+    {{- $termToTest := index $cheating $termGiven }}
+    {{- if site.GetPage (urls.JoinPath $glossaryPath ($termToTest | urlize)) }}
+      {{- $termActual = $termToTest }}
+    {{- end }}
+  {{- end }}
+
+  {{- if not $termActual }}
+    {{- errorf "The %q render hook was unable to find a glossary page for either the singular or plural form of the term %q: see %s" $renderHookName $termGiven $contentPath }}
+  {{- end }}
+
+  {{- /* Create the href attribute. */}}
+  {{- $href := ""}}
+  {{- if $termActual }}
+    {{- $href = fmt.Printf "%s#%s" $glossaryPage.RelPermalink (anchorize $termActual) }}
+  {{- end }}
+
+  {{- return (dict "href" $href) }}
+{{- end -}}
diff --git a/layouts/shortcodes/glossary-term.html b/layouts/shortcodes/glossary-term.html
new file mode 100644 (file)
index 0000000..92ad933
--- /dev/null
@@ -0,0 +1,20 @@
+{{- /*
+Renders the definition of the given glossary term.
+
+@param {string} (.Get 0) The glossary term.
+@returns {template.HTML}
+
+@example {{% glossary-term float %}}
+@example {{% glossary-term "floating point" %}}
+*/}}
+
+{{- with .Get 0 }}
+  {{- $path := printf "/getting-started/glossary/%s" (urlize .) }}
+  {{- with site.GetPage $path }}
+{{ .RenderShortcodes }}{{/* Do not indent. */}}
+  {{- else }}
+    {{- errorf "The glossary term (%s) shortcode was unable to find %s: see %s" $.Name $path $.Position }}
+  {{- end }}
+{{- else }}
+  {{- errorf "The glossary term (%s) shortcode requires one positional parameter: see %s" $.Name $.Position }}
+{{- end }}
diff --git a/layouts/shortcodes/glossary.html b/layouts/shortcodes/glossary.html
new file mode 100644 (file)
index 0000000..3273efd
--- /dev/null
@@ -0,0 +1,43 @@
+{{- /*
+Renders the glossary of terms.
+
+When you call this shortcode using the {{% %}} notation, the glossary terms are
+Markdown headings (level 6) which means they are members of .Page.Fragments.
+This allows the link render hook to verify links to glossary terms.
+
+Yes, the terms themselves are pages, but we don't want to link to the pages, at
+least not right now. Instead, we want to link to the fragments rendered by this
+shortcode.
+
+@returns {template.HTML}
+
+@example {{% glossary %}}
+*/}}
+{{- $path := "/getting-started/glossary" }}
+{{- with site.GetPage $path }}
+  {{- with $p := .Pages.ByTitle }}
+
+    {{- /* Build and render alphabetical index. */}}
+    {{- $m := dict }}
+    {{- range $p }}
+      {{- $k := substr .Title 0 1 | strings.ToUpper }}
+      {{- if index $m $k }}
+        {{- continue }}
+      {{- end }}
+      {{- $anchor := path.BaseName .Path | anchorize }}
+      {{- $m = merge $m (dict $k $anchor) }}
+    {{- end }}
+    {{- range $k, $v := $m }}
+[{{ $k }}](#{{ $v }})&nbsp;{{/* Do not indent. */}}
+    {{- end }}
+
+    {{- /* Render glossary terms. */}}
+    {{- range $p }}
+###### {{ .Title }}{{/* Do not indent. */}}
+{{ .RenderShortcodes }}{{/* Do not indent. */}}
+    {{- end }}
+
+  {{- end }}
+{{- else }}
+  {{- errorf "The %q shortcode was unable to get %s: see %s" .Name $path .Position}}
+{{- end }}
index f1269e32de968a28920a9229c1169de36f28f551..52699de3a3b97a085fbc7775989a04ef3f4f4a35 100644 (file)
@@ -3,7 +3,7 @@
   command = "hugo --gc --minify"
 
   [build.environment]
-    HUGO_VERSION = "0.140.2"
+    HUGO_VERSION = "0.142.0"
 
 [context.production.environment]
   HUGO_ENV           = "production"