From b6cae5cbc662fa92a00d123bd758fe1205b8a07e Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Wed, 5 Mar 2025 04:50:06 -0800 Subject: [PATCH] content: Consolidate configuration documentation --- .cspell.json | 4 +- .prettierignore | 7 +- LICENSE.md | 2 +- archetypes/default.md | 6 + archetypes/functions.md | 11 +- archetypes/glossary.md | 3 +- archetypes/methods.md | 9 +- archetypes/news.md | 7 + archetypes/news/index.md | 5 - archetypes/showcase/bio.md | 7 - archetypes/showcase/index.md | 36 - assets/css/components/content.css | 13 +- assets/css/styles.css | 7 + content/en/_common/_index.md | 4 +- content/en/_common/content-format-table.md | 13 + .../_common/filter-sort-group.md | 0 .../functions/fmt/format-string.md} | 0 .../functions}/go-html-template-package.md | 0 .../functions/go-template}/text-template.md | 0 .../functions/images}/apply-image-filter.md | 0 .../functions/js}/options.md | 14 +- .../_common => _common/functions}/locales.md | 1 - .../functions}/postcss-windows-warning.md | 0 .../functions}/regular-expressions.md | 0 .../functions}/truthy-falsy.md | 0 .../functions/urls}/anchorize-vs-urlize.md | 2 +- .../{functions => }/_common/glob-patterns.md | 0 .../installation}/01-editions.md | 2 +- .../installation}/02-prerequisites.md | 0 .../installation}/03-prebuilt-binaries.md | 0 .../installation}/04-build-from-source.md | 0 .../installation}/homebrew.md | 0 .../menu-entries/pre-and-post.md} | 0 content/en/_common/menu-entry-properties.md | 31 + .../methods/page}/next-and-prev.md | 2 +- .../page}/nextinsection-and-previnsection.md | 2 +- .../methods/page/output-format-methods.md | 35 + .../methods/pages}/group-sort-order.md | 0 .../methods/pages}/next-and-prev.md | 2 +- .../resource}/global-page-remote-resources.md | 0 .../methods/resource}/processing-spec.md | 0 .../taxonomy}/get-a-taxonomy-object.md | 2 +- .../ordered-taxonomy-element-methods.md | 0 .../_common/parsable-date-time-strings.md | 0 content/en/_common/permalink-tokens.md | 71 ++ .../_common/ref-and-relref-error-handling.md | 10 + content/en/_common/ref-and-relref-options.md | 12 + .../render-hooks}/pageinner.md | 2 +- content/en/_common/store-methods.md | 16 +- .../syntax-highlighting-options.md} | 22 +- .../_common/time-layout-string.md | 0 content/en/_index.md | 6 +- content/en/about/_index.md | 9 +- content/en/about/features.md | 21 +- content/en/about/introduction.md | 17 +- content/en/about/license.md | 11 +- content/en/about/security.md | 80 +- content/en/commands/_index.md | 4 - content/en/configuration/_index.md | 7 + content/en/configuration/all.md | 364 +++++++ .../build.md} | 55 +- content/en/configuration/caches.md | 30 + content/en/configuration/cascade.md | 80 ++ content/en/configuration/content-types.md | 63 ++ content/en/configuration/deployment.md | 162 +++ content/en/configuration/front-matter.md | 91 ++ content/en/configuration/http-cache.md | 111 ++ content/en/configuration/imaging.md | 68 ++ content/en/configuration/introduction.md | 294 ++++++ content/en/configuration/languages.md | 199 ++++ content/en/configuration/markup.md | 355 +++++++ content/en/configuration/media-types.md | 83 ++ content/en/configuration/menus.md | 138 +++ content/en/configuration/minify.md | 15 + content/en/configuration/module.md | 183 ++++ content/en/configuration/output-formats.md | 210 ++++ content/en/configuration/outputs.md | 51 + content/en/configuration/page.md | 35 + content/en/configuration/pagination.md | 45 + content/en/configuration/params.md | 101 ++ content/en/configuration/permalinks.md | 163 +++ .../en/{about => configuration}/privacy.md | 16 +- content/en/configuration/related-content.md | 113 ++ content/en/configuration/security.md | 52 + content/en/configuration/segments.md | 79 ++ content/en/configuration/server.md | 128 +++ content/en/configuration/services.md | 53 + content/en/configuration/sitemap.md | 24 + content/en/configuration/taxonomies.md | 68 ++ content/en/configuration/ugly-urls.md | 36 + .../en/content-management/_common/_index.md | 13 - .../content-management/_common/page-kinds.md | 17 - content/en/content-management/_index.md | 8 - content/en/content-management/archetypes.md | 10 +- .../en/content-management/build-options.md | 55 +- content/en/content-management/comments.md | 18 +- .../en/content-management/content-adapters.md | 38 +- .../en/content-management/cross-references.md | 148 --- content/en/content-management/data-sources.md | 10 +- content/en/content-management/diagrams.md | 18 +- content/en/content-management/formats.md | 27 +- content/en/content-management/front-matter.md | 379 +++---- .../image-processing/index.md | 75 +- .../content-management/markdown-attributes.md | 10 +- content/en/content-management/mathematics.md | 21 +- content/en/content-management/menus.md | 146 +-- content/en/content-management/multilingual.md | 230 +--- .../1-featured-content-bundles.png | Bin 34394 -> 0 bytes .../content-management/organization/index.md | 20 +- content/en/content-management/page-bundles.md | 22 +- .../en/content-management/page-resources.md | 12 +- .../en/content-management/related-content.md | 103 ++ content/en/content-management/related.md | 156 --- content/en/content-management/sections.md | 15 +- content/en/content-management/shortcodes.md | 34 +- content/en/content-management/summaries.md | 12 +- .../content-management/syntax-highlighting.md | 176 ++-- content/en/content-management/taxonomies.md | 84 +- content/en/content-management/types.md | 10 +- content/en/content-management/urls.md | 251 +---- content/en/contribute/_index.md | 9 +- content/en/contribute/development.md | 72 +- content/en/contribute/documentation.md | 288 +++-- content/en/contribute/themes.md | 9 +- content/en/documentation.md | 22 +- content/en/functions/_common/_index.md | 13 - content/en/functions/_index.md | 9 - content/en/functions/cast/ToFloat.md | 15 +- content/en/functions/cast/ToInt.md | 15 +- content/en/functions/cast/ToString.md | 15 +- content/en/functions/cast/_index.md | 7 +- content/en/functions/collections/After.md | 15 +- content/en/functions/collections/Append.md | 17 +- content/en/functions/collections/Apply.md | 11 +- .../en/functions/collections/Complement.md | 17 +- content/en/functions/collections/Delimit.md | 13 +- .../en/functions/collections/Dictionary.md | 13 +- content/en/functions/collections/First.md | 19 +- content/en/functions/collections/Group.md | 11 +- content/en/functions/collections/In.md | 21 +- .../en/functions/collections/IndexFunction.md | 12 +- content/en/functions/collections/Intersect.md | 17 +- content/en/functions/collections/IsSet.md | 15 +- content/en/functions/collections/KeyVals.md | 15 +- content/en/functions/collections/Last.md | 17 +- content/en/functions/collections/Merge.md | 13 +- .../en/functions/collections/NewScratch.md | 36 +- content/en/functions/collections/Querify.md | 14 +- content/en/functions/collections/Reverse.md | 17 +- content/en/functions/collections/Seq.md | 17 +- content/en/functions/collections/Shuffle.md | 17 +- content/en/functions/collections/Slice.md | 13 +- content/en/functions/collections/Sort.md | 18 +- content/en/functions/collections/SymDiff.md | 19 +- content/en/functions/collections/Union.md | 31 +- content/en/functions/collections/Uniq.md | 19 +- content/en/functions/collections/Where.md | 21 +- content/en/functions/collections/_index.md | 7 +- content/en/functions/compare/Conditional.md | 13 +- content/en/functions/compare/Default.md | 17 +- content/en/functions/compare/Eq.md | 21 +- content/en/functions/compare/Ge.md | 21 +- content/en/functions/compare/Gt.md | 21 +- content/en/functions/compare/Le.md | 21 +- content/en/functions/compare/Lt.md | 21 +- content/en/functions/compare/Ne.md | 21 +- content/en/functions/compare/_index.md | 7 +- content/en/functions/crypto/FNV32a.md | 13 +- content/en/functions/crypto/HMAC.md | 19 +- content/en/functions/crypto/MD5.md | 19 +- content/en/functions/crypto/SHA1.md | 19 +- content/en/functions/crypto/SHA256.md | 19 +- content/en/functions/crypto/_index.md | 7 +- content/en/functions/css/PostCSS.md | 49 +- content/en/functions/css/Sass.md | 34 +- content/en/functions/css/TailwindCSS.md | 35 +- content/en/functions/css/_index.md | 7 +- content/en/functions/data/GetCSV.md | 12 +- content/en/functions/data/GetJSON.md | 12 +- content/en/functions/data/_index.md | 7 +- content/en/functions/debug/Dump.md | 11 +- content/en/functions/debug/Timer.md | 11 +- content/en/functions/debug/_index.md | 7 +- content/en/functions/diagrams/Goat.md | 12 +- content/en/functions/diagrams/_index.md | 7 +- content/en/functions/encoding/Base64Decode.md | 15 +- content/en/functions/encoding/Base64Encode.md | 13 +- content/en/functions/encoding/Jsonify.md | 18 +- content/en/functions/encoding/_index.md | 7 +- content/en/functions/fmt/Errorf.md | 19 +- content/en/functions/fmt/Erroridf.md | 19 +- content/en/functions/fmt/Print.md | 15 +- content/en/functions/fmt/Printf.md | 17 +- content/en/functions/fmt/Println.md | 15 +- content/en/functions/fmt/Warnf.md | 19 +- content/en/functions/fmt/Warnidf.md | 19 +- content/en/functions/fmt/_common/_index.md | 13 - content/en/functions/fmt/_index.md | 7 +- content/en/functions/global/_index.md | 7 +- content/en/functions/global/page.md | 16 +- content/en/functions/global/site.md | 13 +- .../functions/go-template/_common/_index.md | 13 - content/en/functions/go-template/_index.md | 9 +- content/en/functions/go-template/and.md | 19 +- content/en/functions/go-template/block.md | 17 +- content/en/functions/go-template/break.md | 17 +- content/en/functions/go-template/continue.md | 17 +- content/en/functions/go-template/define.md | 23 +- content/en/functions/go-template/else.md | 21 +- content/en/functions/go-template/end.md | 19 +- content/en/functions/go-template/if.md | 23 +- content/en/functions/go-template/len.md | 21 +- content/en/functions/go-template/not.md | 17 +- content/en/functions/go-template/or.md | 19 +- content/en/functions/go-template/range.md | 24 +- content/en/functions/go-template/return.md | 16 +- content/en/functions/go-template/template.md | 19 +- content/en/functions/go-template/try.md | 22 +- content/en/functions/go-template/urlquery.md | 15 +- content/en/functions/go-template/with.md | 24 +- content/en/functions/hash/FNV32a.md | 23 +- content/en/functions/hash/XxHash.md | 21 +- content/en/functions/hash/_index.md | 7 +- content/en/functions/hugo/BuildDate.md | 11 +- content/en/functions/hugo/CommitHash.md | 11 +- content/en/functions/hugo/Deps.md | 11 +- content/en/functions/hugo/Environment.md | 15 +- content/en/functions/hugo/Generator.md | 15 +- content/en/functions/hugo/GoVersion.md | 11 +- content/en/functions/hugo/IsDevelopment.md | 15 +- content/en/functions/hugo/IsExtended.md | 11 +- content/en/functions/hugo/IsMultihost.md | 13 +- content/en/functions/hugo/IsMultilingual.md | 12 +- content/en/functions/hugo/IsProduction.md | 15 +- content/en/functions/hugo/IsServer.md | 11 +- content/en/functions/hugo/Store.md | 34 +- content/en/functions/hugo/Version.md | 13 +- content/en/functions/hugo/WorkingDir.md | 11 +- content/en/functions/hugo/_index.md | 7 +- content/en/functions/images/AutoOrient.md | 19 +- content/en/functions/images/Brightness.md | 18 +- content/en/functions/images/ColorBalance.md | 18 +- content/en/functions/images/Colorize.md | 18 +- content/en/functions/images/Config.md | 11 +- content/en/functions/images/Contrast.md | 18 +- content/en/functions/images/Dither.md | 26 +- content/en/functions/images/Filter.md | 14 +- content/en/functions/images/Gamma.md | 18 +- content/en/functions/images/GaussianBlur.md | 18 +- content/en/functions/images/Grayscale.md | 18 +- content/en/functions/images/Hue.md | 18 +- content/en/functions/images/Invert.md | 18 +- content/en/functions/images/Mask.md | 20 +- content/en/functions/images/Opacity.md | 18 +- content/en/functions/images/Overlay.md | 18 +- content/en/functions/images/Padding.md | 18 +- content/en/functions/images/Pixelate.md | 18 +- content/en/functions/images/Process.md | 20 +- content/en/functions/images/QR.md | 15 +- content/en/functions/images/Saturation.md | 18 +- content/en/functions/images/Sepia.md | 18 +- content/en/functions/images/Sigmoid.md | 18 +- content/en/functions/images/Text.md | 16 +- content/en/functions/images/UnsharpMask.md | 18 +- content/en/functions/images/_common/_index.md | 13 - content/en/functions/images/_index.md | 5 - content/en/functions/inflect/Humanize.md | 15 +- content/en/functions/inflect/Pluralize.md | 15 +- content/en/functions/inflect/Singularize.md | 15 +- content/en/functions/inflect/_index.md | 7 +- content/en/functions/js/Babel.md | 75 +- content/en/functions/js/Batch.md | 118 +-- content/en/functions/js/Build.md | 28 +- content/en/functions/js/_common/_index.md | 13 - content/en/functions/js/_index.md | 7 +- content/en/functions/lang/FormatAccounting.md | 21 +- content/en/functions/lang/FormatCurrency.md | 21 +- content/en/functions/lang/FormatNumber.md | 21 +- .../en/functions/lang/FormatNumberCustom.md | 21 +- content/en/functions/lang/FormatPercent.md | 21 +- content/en/functions/lang/Merge.md | 11 +- content/en/functions/lang/Translate.md | 26 +- content/en/functions/lang/_index.md | 7 +- content/en/functions/math/Abs.md | 11 +- content/en/functions/math/Acos.md | 25 +- content/en/functions/math/Add.md | 21 +- content/en/functions/math/Asin.md | 25 +- content/en/functions/math/Atan.md | 25 +- content/en/functions/math/Atan2.md | 25 +- content/en/functions/math/Ceil.md | 15 +- content/en/functions/math/Cos.md | 25 +- content/en/functions/math/Counter.md | 11 +- content/en/functions/math/Div.md | 21 +- content/en/functions/math/Floor.md | 15 +- content/en/functions/math/Log.md | 11 +- content/en/functions/math/Max.md | 13 +- content/en/functions/math/Min.md | 13 +- content/en/functions/math/Mod.md | 13 +- content/en/functions/math/ModBool.md | 13 +- content/en/functions/math/Mul.md | 21 +- content/en/functions/math/Pi.md | 25 +- content/en/functions/math/Pow.md | 13 +- content/en/functions/math/Product.md | 21 +- content/en/functions/math/Rand.md | 11 +- content/en/functions/math/Round.md | 15 +- content/en/functions/math/Sin.md | 25 +- content/en/functions/math/Sqrt.md | 13 +- content/en/functions/math/Sub.md | 23 +- content/en/functions/math/Sum.md | 21 +- content/en/functions/math/Tan.md | 25 +- content/en/functions/math/ToDegrees.md | 15 +- content/en/functions/math/ToRadians.md | 15 +- content/en/functions/math/_index.md | 7 +- content/en/functions/openapi3/Unmarshal.md | 11 +- content/en/functions/openapi3/_index.md | 7 +- content/en/functions/os/FileExists.md | 21 +- content/en/functions/os/Getenv.md | 24 +- content/en/functions/os/ReadDir.md | 19 +- content/en/functions/os/ReadFile.md | 21 +- content/en/functions/os/Stat.md | 21 +- content/en/functions/os/_index.md | 7 +- content/en/functions/partials/Include.md | 19 +- .../en/functions/partials/IncludeCached.md | 24 +- content/en/functions/partials/_index.md | 7 +- content/en/functions/path/Base.md | 25 +- content/en/functions/path/BaseName.md | 23 +- content/en/functions/path/Clean.md | 23 +- content/en/functions/path/Dir.md | 23 +- content/en/functions/path/Ext.md | 23 +- content/en/functions/path/Join.md | 25 +- content/en/functions/path/Split.md | 25 +- content/en/functions/path/_index.md | 7 +- content/en/functions/reflect/IsMap.md | 13 +- content/en/functions/reflect/IsSlice.md | 13 +- content/en/functions/reflect/_index.md | 7 +- content/en/functions/resources/GetMatch.md | 6 +- content/en/functions/resources/GetRemote.md | 7 +- content/en/functions/resources/Match.md | 2 +- content/en/functions/resources/PostProcess.md | 13 +- .../en/functions/resources/_common/_index.md | 12 - content/en/functions/resources/_index.md | 7 +- content/en/functions/safe/CSS.md | 24 +- content/en/functions/safe/HTML.md | 24 +- content/en/functions/safe/HTMLAttr.md | 26 +- content/en/functions/safe/JS.md | 24 +- content/en/functions/safe/JSStr.md | 24 +- content/en/functions/safe/URL.md | 24 +- content/en/functions/safe/_index.md | 9 +- content/en/functions/strings/Chomp.md | 23 +- content/en/functions/strings/Contains.md | 21 +- content/en/functions/strings/ContainsAny.md | 21 +- .../en/functions/strings/ContainsNonSpace.md | 21 +- content/en/functions/strings/Count.md | 19 +- content/en/functions/strings/CountRunes.md | 19 +- content/en/functions/strings/CountWords.md | 19 +- content/en/functions/strings/Diff/index.md | 9 +- .../en/functions/strings/FindRESubmatch.md | 19 +- content/en/functions/strings/FindRe.md | 19 +- content/en/functions/strings/FirstUpper.md | 17 +- content/en/functions/strings/HasPrefix.md | 21 +- content/en/functions/strings/HasSuffix.md | 21 +- content/en/functions/strings/Repeat.md | 11 +- content/en/functions/strings/Replace.md | 17 +- content/en/functions/strings/ReplaceRE.md | 19 +- content/en/functions/strings/RuneCount.md | 19 +- content/en/functions/strings/SliceString.md | 13 +- content/en/functions/strings/Split.md | 13 +- content/en/functions/strings/Substr.md | 15 +- content/en/functions/strings/Title.md | 19 +- content/en/functions/strings/ToLower.md | 17 +- content/en/functions/strings/ToUpper.md | 17 +- content/en/functions/strings/Trim.md | 23 +- content/en/functions/strings/TrimLeft.md | 23 +- content/en/functions/strings/TrimPrefix.md | 23 +- content/en/functions/strings/TrimRight.md | 23 +- content/en/functions/strings/TrimSpace.md | 21 +- content/en/functions/strings/TrimSuffix.md | 23 +- content/en/functions/strings/Truncate.md | 11 +- content/en/functions/strings/_index.md | 7 +- content/en/functions/templates/Defer.md | 18 +- content/en/functions/templates/Exists.md | 11 +- content/en/functions/templates/_index.md | 8 +- content/en/functions/time/AsTime.md | 24 +- content/en/functions/time/Duration.md | 21 +- content/en/functions/time/Format.md | 28 +- content/en/functions/time/Now.md | 19 +- content/en/functions/time/ParseDuration.md | 19 +- content/en/functions/time/_common/_index.md | 13 - content/en/functions/time/_index.md | 7 +- .../en/functions/transform/CanHighlight.md | 15 +- content/en/functions/transform/Emojify.md | 16 +- content/en/functions/transform/HTMLEscape.md | 13 +- .../en/functions/transform/HTMLUnescape.md | 13 +- content/en/functions/transform/Highlight.md | 28 +- .../functions/transform/HighlightCodeBlock.md | 15 +- content/en/functions/transform/Markdownify.md | 15 +- content/en/functions/transform/Plainify.md | 11 +- .../en/functions/transform/PortableText.md | 19 +- content/en/functions/transform/Remarshal.md | 15 +- content/en/functions/transform/ToMath.md | 32 +- content/en/functions/transform/Unmarshal.md | 22 +- content/en/functions/transform/XMLEscape.md | 11 +- content/en/functions/transform/_index.md | 7 +- content/en/functions/urls/AbsLangURL.md | 60 +- content/en/functions/urls/AbsURL.md | 31 +- content/en/functions/urls/Anchorize.md | 17 +- content/en/functions/urls/JoinPath.md | 13 +- content/en/functions/urls/Parse.md | 12 +- content/en/functions/urls/Ref.md | 75 +- content/en/functions/urls/RelLangURL.md | 70 +- content/en/functions/urls/RelRef.md | 81 +- content/en/functions/urls/RelURL.md | 53 +- content/en/functions/urls/URLize.md | 15 +- content/en/functions/urls/_common/_index.md | 13 - content/en/functions/urls/_index.md | 7 +- content/en/getting-started/_index.md | 12 - .../getting-started/configuration-markup.md | 395 ------- content/en/getting-started/configuration.md | 996 ------------------ .../en/getting-started/directory-structure.md | 72 +- .../external-learning-resources/index.md | 13 +- content/en/getting-started/quick-start.md | 24 +- content/en/getting-started/usage.md | 23 +- content/en/host-and-deploy/_index.md | 8 + .../deploy-with-hugo-deploy.md | 105 ++ .../deploy-with-rclone.md} | 24 +- .../deploy-with-rsync.md} | 20 +- .../host-on-21yunbox.md} | 32 +- .../host-on-aws-amplify}/amplify-step-05.png | Bin .../host-on-aws-amplify}/amplify-step-06.png | Bin .../host-on-aws-amplify}/amplify-step-07.png | Bin .../host-on-aws-amplify}/amplify-step-08.png | Bin .../host-on-aws-amplify}/amplify-step-09.png | Bin .../host-on-aws-amplify}/amplify-step-11.png | Bin .../host-on-aws-amplify}/index.md | 75 +- .../host-on-azure-static-web-apps.md} | 11 +- .../host-on-cloudflare-pages.md} | 11 +- .../host-on-codeberg-pages.md} | 44 +- .../host-on-firebase.md} | 23 +- .../host-on-github-pages}/gh-pages-1.png | Bin .../host-on-github-pages}/gh-pages-2.png | Bin .../host-on-github-pages}/gh-pages-3.png | Bin .../host-on-github-pages}/gh-pages-4.png | Bin .../host-on-github-pages}/gh-pages-5.png | Bin .../host-on-github-pages}/index.md | 64 +- .../host-on-gitlab-pages.md} | 26 +- .../host-on-keycdn}/index.md | 16 +- .../host-on-keycdn}/keycdn-pull-zone.png | Bin .../host-on-keycdn}/secret-api-key.png | Bin .../host-on-keycdn}/secret-zone-id.png | Bin .../host-on-netlify}/index.md | 104 +- .../host-on-netlify}/netlify-step-02.png | Bin .../host-on-netlify}/netlify-step-03.png | Bin .../host-on-netlify}/netlify-step-04.png | Bin .../host-on-netlify}/netlify-step-05.png | Bin .../host-on-netlify}/netlify-step-06.png | Bin .../host-on-netlify}/netlify-step-07.png | Bin .../host-on-netlify}/netlify-step-08.png | Bin .../host-on-netlify}/netlify-step-09.png | Bin .../host-on-netlify}/netlify-step-10.png | Bin .../host-on-netlify}/netlify-step-11.png | Bin .../host-on-netlify}/netlify-step-12.png | Bin .../host-on-netlify}/netlify-step-13.png | Bin .../host-on-render.md} | 21 +- .../host-on-sourcehut-pages.md} | 47 +- content/en/hosting-and-deployment/_index.md | 15 - .../en/hosting-and-deployment/hugo-deploy.md | 261 ----- content/en/hugo-modules/_index.md | 21 - content/en/hugo-modules/configuration.md | 191 ---- content/en/hugo-modules/introduction.md | 19 + content/en/hugo-modules/theme-components.md | 34 +- content/en/hugo-modules/use-modules.md | 37 +- content/en/hugo-pipes/_index.md | 5 - content/en/hugo-pipes/bundling.md | 7 +- content/en/hugo-pipes/fingerprint.md | 7 +- content/en/hugo-pipes/introduction.md | 11 +- content/en/hugo-pipes/js.md | 7 +- content/en/hugo-pipes/minification.md | 7 +- content/en/hugo-pipes/postcss.md | 7 +- content/en/hugo-pipes/postprocess.md | 7 +- content/en/hugo-pipes/resource-from-string.md | 7 +- .../en/hugo-pipes/resource-from-template.md | 7 +- .../en/hugo-pipes/transpile-sass-to-css.md | 7 +- content/en/installation/_common/_index.md | 13 - content/en/installation/_index.md | 10 +- content/en/installation/bsd.md | 17 +- content/en/installation/linux.md | 35 +- content/en/installation/macos.md | 19 +- content/en/installation/windows.md | 17 +- content/en/methods/_index.md | 9 - content/en/methods/duration/Abs.md | 13 +- content/en/methods/duration/Hours.md | 13 +- content/en/methods/duration/Microseconds.md | 13 +- content/en/methods/duration/Milliseconds.md | 13 +- content/en/methods/duration/Minutes.md | 13 +- content/en/methods/duration/Nanoseconds.md | 13 +- content/en/methods/duration/Round.md | 13 +- content/en/methods/duration/Seconds.md | 13 +- content/en/methods/duration/Truncate.md | 13 +- content/en/methods/duration/_index.md | 5 - content/en/methods/menu-entry/Children.md | 11 +- content/en/methods/menu-entry/HasChildren.md | 11 +- content/en/methods/menu-entry/Identifier.md | 11 +- content/en/methods/menu-entry/KeyName.md | 11 +- content/en/methods/menu-entry/Menu.md | 13 +- content/en/methods/menu-entry/Name.md | 9 +- content/en/methods/menu-entry/Page.md | 9 +- content/en/methods/menu-entry/PageRef.md | 12 +- content/en/methods/menu-entry/Params.md | 9 +- content/en/methods/menu-entry/Parent.md | 11 +- content/en/methods/menu-entry/Post.md | 15 +- content/en/methods/menu-entry/Pre.md | 15 +- content/en/methods/menu-entry/Title.md | 13 +- content/en/methods/menu-entry/URL.md | 9 +- content/en/methods/menu-entry/Weight.md | 15 +- .../en/methods/menu-entry/_common/_index.md | 13 - content/en/methods/menu-entry/_index.md | 5 - content/en/methods/menu/ByName.md | 9 +- content/en/methods/menu/ByWeight.md | 9 +- content/en/methods/menu/Limit.md | 9 +- content/en/methods/menu/Reverse.md | 9 +- content/en/methods/menu/_index.md | 5 - content/en/methods/page/Aliases.md | 9 +- content/en/methods/page/AllTranslations.md | 17 +- .../methods/page/AlternativeOutputFormats.md | 15 +- content/en/methods/page/Ancestors.md | 27 +- content/en/methods/page/BundleType.md | 9 +- content/en/methods/page/CodeOwners.md | 11 +- content/en/methods/page/Content.md | 21 +- .../en/methods/page/ContentWithoutSummary.md | 21 +- content/en/methods/page/CurrentSection.md | 23 +- content/en/methods/page/Data.md | 10 +- content/en/methods/page/Date.md | 19 +- content/en/methods/page/Description.md | 13 +- content/en/methods/page/Draft.md | 9 +- content/en/methods/page/Eq.md | 11 +- content/en/methods/page/ExpiryDate.md | 19 +- content/en/methods/page/File.md | 40 +- content/en/methods/page/FirstSection.md | 27 +- content/en/methods/page/Fragments.md | 46 +- content/en/methods/page/FuzzyWordCount.md | 15 +- content/en/methods/page/GetPage.md | 13 +- content/en/methods/page/GetTerms.md | 9 +- content/en/methods/page/GitInfo.md | 46 +- content/en/methods/page/HasMenuCurrent.md | 11 +- content/en/methods/page/HasShortcode.md | 15 +- content/en/methods/page/HeadingsFiltered.md | 15 +- content/en/methods/page/InSection.md | 28 +- content/en/methods/page/IsAncestor.md | 26 +- content/en/methods/page/IsDescendant.md | 25 +- content/en/methods/page/IsHome.md | 15 +- content/en/methods/page/IsMenuCurrent.md | 11 +- content/en/methods/page/IsNode.md | 15 +- content/en/methods/page/IsPage.md | 15 +- content/en/methods/page/IsSection.md | 15 +- content/en/methods/page/IsTranslated.md | 15 +- content/en/methods/page/Keywords.md | 11 +- content/en/methods/page/Kind.md | 11 +- content/en/methods/page/Language.md | 21 +- content/en/methods/page/Lastmod.md | 23 +- content/en/methods/page/Layout.md | 11 +- content/en/methods/page/Len.md | 11 +- content/en/methods/page/LinkTitle.md | 11 +- content/en/methods/page/Next.md | 21 +- content/en/methods/page/NextInSection.md | 19 +- content/en/methods/page/OutputFormats.md | 18 +- content/en/methods/page/Page.md | 15 +- content/en/methods/page/Pages.md | 15 +- content/en/methods/page/Paginate.md | 13 +- content/en/methods/page/Paginator.md | 15 +- content/en/methods/page/Param.md | 9 +- content/en/methods/page/Params.md | 15 +- content/en/methods/page/Parent.md | 23 +- content/en/methods/page/Path.md | 35 +- content/en/methods/page/Permalink.md | 11 +- content/en/methods/page/Plain.md | 21 +- content/en/methods/page/PlainWords.md | 21 +- content/en/methods/page/Prev.md | 21 +- content/en/methods/page/PrevInSection.md | 19 +- content/en/methods/page/PublishDate.md | 17 +- content/en/methods/page/RawContent.md | 25 +- content/en/methods/page/ReadingTime.md | 13 +- content/en/methods/page/Ref.md | 37 +- content/en/methods/page/RegularPages.md | 15 +- .../en/methods/page/RegularPagesRecursive.md | 15 +- content/en/methods/page/RelPermalink.md | 11 +- content/en/methods/page/RelRef.md | 37 +- content/en/methods/page/Render.md | 13 +- content/en/methods/page/RenderShortcodes.md | 28 +- content/en/methods/page/RenderString.md | 13 +- content/en/methods/page/Resources.md | 39 +- content/en/methods/page/Scratch.md | 9 +- content/en/methods/page/Section.md | 17 +- content/en/methods/page/Sections.md | 25 +- content/en/methods/page/Site.md | 11 +- content/en/methods/page/Sitemap.md | 27 +- content/en/methods/page/Sites.md | 11 +- content/en/methods/page/Slug.md | 9 +- content/en/methods/page/Store.md | 18 +- content/en/methods/page/Summary.md | 17 +- content/en/methods/page/TableOfContents.md | 11 +- content/en/methods/page/Title.md | 17 +- content/en/methods/page/TranslationKey.md | 15 +- content/en/methods/page/Translations.md | 17 +- content/en/methods/page/Truncated.md | 11 +- content/en/methods/page/Type.md | 13 +- content/en/methods/page/Weight.md | 9 +- content/en/methods/page/WordCount.md | 13 +- content/en/methods/page/_common/_index.md | 13 - .../page/_common/output-format-methods.md | 27 - content/en/methods/page/_index.md | 5 - content/en/methods/pager/First.md | 21 +- content/en/methods/pager/HasNext.md | 21 +- content/en/methods/pager/HasPrev.md | 21 +- content/en/methods/pager/Last.md | 21 +- content/en/methods/pager/Next.md | 21 +- content/en/methods/pager/NumberOfElements.md | 13 +- content/en/methods/pager/PageGroups.md | 11 +- content/en/methods/pager/PageNumber.md | 13 +- content/en/methods/pager/PageSize.md | 9 +- content/en/methods/pager/PagerSize.md | 11 +- content/en/methods/pager/Pagers.md | 11 +- content/en/methods/pager/Pages.md | 11 +- content/en/methods/pager/Prev.md | 21 +- .../en/methods/pager/TotalNumberOfElements.md | 13 +- content/en/methods/pager/TotalPages.md | 13 +- content/en/methods/pager/URL.md | 11 +- content/en/methods/pager/_index.md | 10 +- content/en/methods/pages/ByDate.md | 17 +- content/en/methods/pages/ByExpiryDate.md | 17 +- content/en/methods/pages/ByLanguage.md | 9 +- content/en/methods/pages/ByLastmod.md | 17 +- content/en/methods/pages/ByLength.md | 9 +- content/en/methods/pages/ByLinkTitle.md | 13 +- content/en/methods/pages/ByParam.md | 13 +- content/en/methods/pages/ByPublishDate.md | 17 +- content/en/methods/pages/ByTitle.md | 13 +- content/en/methods/pages/ByWeight.md | 9 +- content/en/methods/pages/GroupBy.md | 11 +- content/en/methods/pages/GroupByDate.md | 23 +- content/en/methods/pages/GroupByExpiryDate.md | 23 +- content/en/methods/pages/GroupByLastmod.md | 23 +- content/en/methods/pages/GroupByParam.md | 11 +- content/en/methods/pages/GroupByParamDate.md | 21 +- .../en/methods/pages/GroupByPublishDate.md | 23 +- content/en/methods/pages/Len.md | 9 +- content/en/methods/pages/Limit.md | 9 +- content/en/methods/pages/Next.md | 21 +- content/en/methods/pages/Prev.md | 21 +- content/en/methods/pages/Related.md | 25 +- content/en/methods/pages/Reverse.md | 9 +- content/en/methods/pages/_common/_index.md | 13 - content/en/methods/pages/_index.md | 5 - content/en/methods/resource/Colors.md | 29 +- content/en/methods/resource/Content.md | 14 +- content/en/methods/resource/Crop.md | 26 +- content/en/methods/resource/Data.md | 32 +- content/en/methods/resource/Err.md | 15 +- content/en/methods/resource/Exif.md | 37 +- content/en/methods/resource/Fill.md | 28 +- content/en/methods/resource/Filter.md | 16 +- content/en/methods/resource/Fit.md | 28 +- content/en/methods/resource/Height.md | 15 +- content/en/methods/resource/Key.md | 45 - content/en/methods/resource/MediaType.md | 41 +- content/en/methods/resource/Name.md | 12 +- content/en/methods/resource/Params.md | 9 +- content/en/methods/resource/Permalink.md | 19 +- content/en/methods/resource/Process.md | 26 +- content/en/methods/resource/Publish.md | 17 +- content/en/methods/resource/RelPermalink.md | 17 +- content/en/methods/resource/Resize.md | 25 +- content/en/methods/resource/ResourceType.md | 15 +- content/en/methods/resource/Title.md | 12 +- content/en/methods/resource/Width.md | 15 +- content/en/methods/resource/_common/_index.md | 13 - content/en/methods/resource/_index.md | 5 - content/en/methods/shortcode/Get.md | 22 +- content/en/methods/shortcode/Inner.md | 28 +- content/en/methods/shortcode/InnerDeindent.md | 19 +- content/en/methods/shortcode/IsNamedParams.md | 15 +- content/en/methods/shortcode/Name.md | 15 +- content/en/methods/shortcode/Ordinal.md | 17 +- content/en/methods/shortcode/Page.md | 11 +- content/en/methods/shortcode/Params.md | 19 +- content/en/methods/shortcode/Parent.md | 17 +- content/en/methods/shortcode/Position.md | 17 +- content/en/methods/shortcode/Ref.md | 38 +- content/en/methods/shortcode/RelRef.md | 37 +- content/en/methods/shortcode/Scratch.md | 9 +- content/en/methods/shortcode/Site.md | 11 +- content/en/methods/shortcode/Store.md | 20 +- content/en/methods/shortcode/_index.md | 5 - content/en/methods/site/AllPages.md | 17 +- content/en/methods/site/BaseURL.md | 17 +- content/en/methods/site/BuildDrafts.md | 9 +- content/en/methods/site/Config.md | 18 +- content/en/methods/site/Copyright.md | 11 +- content/en/methods/site/Data.md | 19 +- content/en/methods/site/DisqusShortname.md | 9 +- content/en/methods/site/GetPage.md | 12 +- content/en/methods/site/GoogleAnalytics.md | 9 +- content/en/methods/site/Home.md | 9 +- content/en/methods/site/IsDevelopment.md | 9 +- content/en/methods/site/IsMultiLingual.md | 9 +- content/en/methods/site/IsServer.md | 9 +- content/en/methods/site/Language.md | 24 +- content/en/methods/site/LanguagePrefix.md | 13 +- content/en/methods/site/Languages.md | 11 +- content/en/methods/site/LastChange.md | 9 +- content/en/methods/site/Lastmod.md | 9 +- content/en/methods/site/MainSections.md | 16 +- content/en/methods/site/Menus.md | 13 +- content/en/methods/site/Pages.md | 19 +- content/en/methods/site/Param.md | 9 +- content/en/methods/site/Params.md | 15 +- content/en/methods/site/RegularPages.md | 26 +- content/en/methods/site/Sections.md | 19 +- content/en/methods/site/Sites.md | 9 +- content/en/methods/site/Store.md | 32 +- content/en/methods/site/Taxonomies.md | 13 +- content/en/methods/site/Title.md | 9 +- content/en/methods/site/_index.md | 5 - content/en/methods/taxonomy/Alphabetical.md | 18 +- content/en/methods/taxonomy/ByCount.md | 18 +- content/en/methods/taxonomy/Count.md | 12 +- content/en/methods/taxonomy/Get.md | 12 +- content/en/methods/taxonomy/Page.md | 9 +- content/en/methods/taxonomy/_common/_index.md | 13 - content/en/methods/taxonomy/_index.md | 6 - content/en/methods/time/Add.md | 15 +- content/en/methods/time/AddDate.md | 10 +- content/en/methods/time/After.md | 15 +- content/en/methods/time/Before.md | 15 +- content/en/methods/time/Day.md | 21 +- content/en/methods/time/Equal.md | 15 +- content/en/methods/time/Format.md | 19 +- content/en/methods/time/Hour.md | 21 +- content/en/methods/time/IsDST.md | 11 +- content/en/methods/time/IsZero.md | 11 +- content/en/methods/time/Local.md | 13 +- content/en/methods/time/Minute.md | 21 +- content/en/methods/time/Month.md | 21 +- content/en/methods/time/Nanosecond.md | 11 +- content/en/methods/time/Round.md | 15 +- content/en/methods/time/Second.md | 21 +- content/en/methods/time/Sub.md | 11 +- content/en/methods/time/Truncate.md | 15 +- content/en/methods/time/UTC.md | 13 +- content/en/methods/time/Unix.md | 19 +- content/en/methods/time/UnixMicro.md | 19 +- content/en/methods/time/UnixMilli.md | 19 +- content/en/methods/time/UnixNano.md | 19 +- content/en/methods/time/Weekday.md | 13 +- content/en/methods/time/Year.md | 21 +- content/en/methods/time/YearDay.md | 9 +- content/en/methods/time/_index.md | 6 - content/en/myshowcase/featured.png | Bin 41270 -> 0 bytes content/en/news/_index.md | 2 +- content/en/quick-reference/_index.md | 10 +- content/en/quick-reference/emojis.md | 10 +- content/en/quick-reference/functions.md | 10 +- content/en/quick-reference/glossary/_index.md | 17 +- content/en/quick-reference/glossary/cli.md | 2 +- .../glossary/default-sort-order.md | 7 +- .../quick-reference/glossary/environment.md | 6 +- content/en/quick-reference/glossary/glob.md | 2 +- .../en/quick-reference/glossary/interval.md | 6 +- .../quick-reference/glossary/logical-path.md | 4 +- .../glossary/markdown-attribute.md | 2 +- .../en/quick-reference/glossary/media-type.md | 6 + content/en/quick-reference/glossary/method.md | 2 +- .../glossary/ordered-taxonomy.md | 5 +- .../quick-reference/glossary/output-format.md | 4 +- .../en/quick-reference/glossary/pipeline.md | 2 +- .../glossary/primary-output-format.md | 10 + .../glossary/regular-expression.md | 8 + .../quick-reference/glossary/resource-type.md | 5 +- .../en/quick-reference/glossary/resource.md | 2 +- .../quick-reference/glossary/scratch-pad.md | 5 +- .../en/quick-reference/glossary/shortcode.md | 2 +- .../glossary/template-action.md | 2 +- content/en/quick-reference/methods.md | 10 +- .../en/quick-reference/page-collections.md | 31 +- .../syntax-highlighting-styles.md | 35 + content/en/render-hooks/_common/_index.md | 13 - content/en/render-hooks/_index.md | 9 - content/en/render-hooks/blockquotes.md | 76 +- content/en/render-hooks/code-blocks.md | 53 +- content/en/render-hooks/headings.md | 65 +- content/en/render-hooks/images.md | 89 +- content/en/render-hooks/introduction.md | 11 +- content/en/render-hooks/links.md | 45 +- content/en/render-hooks/passthrough.md | 79 +- content/en/render-hooks/tables.md | 72 +- content/en/shortcodes/_index.md | 9 - content/en/shortcodes/comment.md | 8 +- content/en/shortcodes/details.md | 10 +- content/en/shortcodes/figure.md | 10 +- content/en/shortcodes/gist.md | 9 +- content/en/shortcodes/highlight.md | 22 +- content/en/shortcodes/instagram.md | 8 +- content/en/shortcodes/param.md | 9 +- content/en/shortcodes/qr.md | 15 +- content/en/shortcodes/ref.md | 60 +- content/en/shortcodes/relref.md | 57 +- content/en/shortcodes/vimeo.md | 10 +- content/en/shortcodes/x.md | 8 +- content/en/shortcodes/youtube.md | 14 +- content/en/showcase/1password-support/bio.md | 1 - .../en/showcase/1password-support/index.md | 16 +- content/en/showcase/_index.md | 5 +- .../{myshowcase => showcase/_template}/bio.md | 5 +- .../en/showcase/_template}/featured.png | Bin .../_template}/index.md | 12 +- content/en/showcase/alora-labs/index.md | 2 +- content/en/showcase/ampio-help/bio.md | 5 +- content/en/showcase/ampio-help/index.md | 5 +- content/en/showcase/bypasscensorship/bio.md | 4 +- content/en/showcase/bypasscensorship/index.md | 3 +- content/en/showcase/digitalgov/bio.md | 1 - content/en/showcase/digitalgov/index.md | 8 +- content/en/showcase/fireship/bio.md | 3 +- content/en/showcase/fireship/index.md | 2 +- content/en/showcase/forestry/bio.md | 1 - content/en/showcase/forestry/index.md | 26 +- content/en/showcase/godot-tutorials/index.md | 7 - content/en/showcase/hapticmedia/index.md | 2 +- content/en/showcase/hartwell-insurance/bio.md | 1 - .../en/showcase/hartwell-insurance/index.md | 34 +- content/en/showcase/keycdn/index.md | 22 +- content/en/showcase/letsencrypt/bio.md | 2 - content/en/showcase/letsencrypt/index.md | 8 +- content/en/showcase/linode/bio.md | 1 - content/en/showcase/linode/index.md | 4 +- content/en/showcase/overmindstudios/bio.md | 3 +- content/en/showcase/overmindstudios/index.md | 1 + content/en/showcase/pharmaseal/index.md | 10 - .../index.md | 16 +- content/en/showcase/template/bio.md | 7 - .../showcase/template/featured-template.png | Bin 41270 -> 0 bytes content/en/showcase/template/index.md | 18 - content/en/showcase/tomango/bio.md | 1 - content/en/showcase/tomango/index.md | 9 +- content/en/templates/404.md | 8 +- content/en/templates/_common/_index.md | 13 - content/en/templates/_index.md | 8 - content/en/templates/base.md | 9 +- content/en/templates/content-view.md | 19 +- content/en/templates/embedded.md | 13 +- content/en/templates/home.md | 13 +- content/en/templates/introduction.md | 20 +- content/en/templates/lookup-order.md | 11 +- content/en/templates/menu.md | 16 +- content/en/templates/output-formats.md | 241 ----- content/en/templates/pagination.md | 47 +- content/en/templates/partial.md | 9 +- content/en/templates/robots.md | 10 +- content/en/templates/rss.md | 9 +- content/en/templates/section.md | 9 +- content/en/templates/shortcode.md | 37 +- content/en/templates/single.md | 9 +- content/en/templates/sitemap.md | 27 +- content/en/templates/taxonomy.md | 9 +- content/en/templates/term.md | 9 +- .../en/templates/{types/index.md => types.md} | 22 +- content/en/templates/types/site-hierarchy.svg | 1 - content/en/tools/_index.md | 13 - content/en/tools/editors.md | 12 +- content/en/tools/front-ends.md | 11 +- content/en/tools/migrations.md | 15 +- content/en/tools/other.md | 10 +- content/en/tools/search.md | 11 +- content/en/troubleshooting/_index.md | 8 - content/en/troubleshooting/audit/index.md | 7 +- content/en/troubleshooting/deprecation.md | 7 +- content/en/troubleshooting/faq.md | 143 ++- content/en/troubleshooting/inspection.md | 7 +- content/en/troubleshooting/logging.md | 8 +- content/en/troubleshooting/performance.md | 8 +- hugo.toml | 253 ++--- layouts/_default/_markup/render-heading.html | 1 - layouts/_default/_markup/render-link.html | 2 +- layouts/_default/list.html | 9 +- layouts/_default/single.html | 2 +- layouts/index.redir | 4 +- layouts/partials/docs/functions-aliases.html | 2 +- .../partials/docs/functions-return-type.html | 2 +- .../partials/docs/functions-signatures.html | 2 +- .../helpers/debug/list-item-metadata.html | 23 + layouts/partials/layouts/home/opensource.html | 7 +- layouts/partials/layouts/related.html | 7 +- layouts/partials/layouts/toc.html | 12 +- layouts/shortcodes/chroma-lexers.html | 34 +- layouts/shortcodes/code-toggle.html | 65 +- layouts/shortcodes/datatable.html | 2 +- layouts/shortcodes/deprecated-in.html | 22 +- layouts/shortcodes/eturl.html | 37 +- layouts/shortcodes/glossary-term.html | 9 +- layouts/shortcodes/glossary.html | 66 +- layouts/shortcodes/hl.html | 11 +- layouts/shortcodes/img.html | 143 ++- layouts/shortcodes/imgproc.html | 17 +- layouts/shortcodes/include.html | 6 +- layouts/shortcodes/list-pages-in-section.html | 8 +- layouts/shortcodes/module-mounts-note.html | 5 +- layouts/shortcodes/new-in.html | 31 +- layouts/shortcodes/note.html | 14 +- layouts/shortcodes/per-lang-config-keys.html | 71 ++ layouts/shortcodes/quick-reference.html | 45 +- .../shortcodes/root-configuration-keys.html | 25 + .../syntax-highlighting-styles.html | 70 ++ 911 files changed, 10902 insertions(+), 11171 deletions(-) create mode 100644 archetypes/default.md create mode 100644 archetypes/news.md delete mode 100644 archetypes/news/index.md delete mode 100644 archetypes/showcase/bio.md delete mode 100644 archetypes/showcase/index.md create mode 100644 content/en/_common/content-format-table.md rename content/en/{templates => }/_common/filter-sort-group.md (100%) rename content/en/{functions/fmt/_common/fmt-layout.md => _common/functions/fmt/format-string.md} (100%) rename content/en/{functions/_common => _common/functions}/go-html-template-package.md (100%) rename content/en/{functions/go-template/_common => _common/functions/go-template}/text-template.md (100%) rename content/en/{functions/images/_common => _common/functions/images}/apply-image-filter.md (100%) rename content/en/{functions/js/_common => _common/functions/js}/options.md (91%) rename content/en/{functions/_common => _common/functions}/locales.md (99%) rename content/en/{functions/resources/_common => _common/functions}/postcss-windows-warning.md (100%) rename content/en/{functions/_common => _common/functions}/regular-expressions.md (100%) rename content/en/{functions/go-template/_common => _common/functions}/truthy-falsy.md (100%) rename content/en/{functions/urls/_common => _common/functions/urls}/anchorize-vs-urlize.md (92%) rename content/en/{functions => }/_common/glob-patterns.md (100%) rename content/en/{installation/_common => _common/installation}/01-editions.md (94%) rename content/en/{installation/_common => _common/installation}/02-prerequisites.md (100%) rename content/en/{installation/_common => _common/installation}/03-prebuilt-binaries.md (100%) rename content/en/{installation/_common => _common/installation}/04-build-from-source.md (100%) rename content/en/{installation/_common => _common/installation}/homebrew.md (100%) rename content/en/{methods/menu-entry/_common/pre-post.md => _common/menu-entries/pre-and-post.md} (100%) create mode 100644 content/en/_common/menu-entry-properties.md rename content/en/{methods/page/_common => _common/methods/page}/next-and-prev.md (96%) rename content/en/{methods/page/_common => _common/methods/page}/nextinsection-and-previnsection.md (96%) create mode 100644 content/en/_common/methods/page/output-format-methods.md rename content/en/{methods/pages/_common => _common/methods/pages}/group-sort-order.md (100%) rename content/en/{methods/pages/_common => _common/methods/pages}/next-and-prev.md (98%) rename content/en/{methods/resource/_common => _common/methods/resource}/global-page-remote-resources.md (100%) rename content/en/{methods/resource/_common => _common/methods/resource}/processing-spec.md (100%) rename content/en/{methods/taxonomy/_common => _common/methods/taxonomy}/get-a-taxonomy-object.md (97%) rename content/en/{methods/taxonomy/_common => _common/methods/taxonomy}/ordered-taxonomy-element-methods.md (100%) rename content/en/{functions/time => }/_common/parsable-date-time-strings.md (100%) create mode 100644 content/en/_common/permalink-tokens.md create mode 100644 content/en/_common/ref-and-relref-error-handling.md create mode 100644 content/en/_common/ref-and-relref-options.md rename content/en/{render-hooks/_common => _common/render-hooks}/pageinner.md (97%) rename content/en/{functions/_common/highlighting-options.md => _common/syntax-highlighting-options.md} (75%) rename content/en/{functions => }/_common/time-layout-string.md (100%) create mode 100644 content/en/configuration/_index.md create mode 100644 content/en/configuration/all.md rename content/en/{getting-started/configuration-build.md => configuration/build.md} (58%) create mode 100644 content/en/configuration/caches.md create mode 100644 content/en/configuration/cascade.md create mode 100644 content/en/configuration/content-types.md create mode 100644 content/en/configuration/deployment.md create mode 100644 content/en/configuration/front-matter.md create mode 100644 content/en/configuration/http-cache.md create mode 100644 content/en/configuration/imaging.md create mode 100644 content/en/configuration/introduction.md create mode 100644 content/en/configuration/languages.md create mode 100644 content/en/configuration/markup.md create mode 100644 content/en/configuration/media-types.md create mode 100644 content/en/configuration/menus.md create mode 100644 content/en/configuration/minify.md create mode 100644 content/en/configuration/module.md create mode 100644 content/en/configuration/output-formats.md create mode 100644 content/en/configuration/outputs.md create mode 100644 content/en/configuration/page.md create mode 100644 content/en/configuration/pagination.md create mode 100644 content/en/configuration/params.md create mode 100644 content/en/configuration/permalinks.md rename content/en/{about => configuration}/privacy.md (90%) create mode 100644 content/en/configuration/related-content.md create mode 100644 content/en/configuration/security.md create mode 100644 content/en/configuration/segments.md create mode 100644 content/en/configuration/server.md create mode 100644 content/en/configuration/services.md create mode 100644 content/en/configuration/sitemap.md create mode 100644 content/en/configuration/taxonomies.md create mode 100644 content/en/configuration/ugly-urls.md delete mode 100644 content/en/content-management/_common/_index.md delete mode 100644 content/en/content-management/_common/page-kinds.md delete mode 100644 content/en/content-management/cross-references.md delete mode 100644 content/en/content-management/organization/1-featured-content-bundles.png create mode 100644 content/en/content-management/related-content.md delete mode 100644 content/en/content-management/related.md delete mode 100644 content/en/functions/_common/_index.md delete mode 100644 content/en/functions/fmt/_common/_index.md delete mode 100644 content/en/functions/go-template/_common/_index.md delete mode 100644 content/en/functions/images/_common/_index.md delete mode 100644 content/en/functions/js/_common/_index.md delete mode 100644 content/en/functions/resources/_common/_index.md delete mode 100644 content/en/functions/time/_common/_index.md delete mode 100644 content/en/functions/urls/_common/_index.md delete mode 100644 content/en/getting-started/configuration-markup.md delete mode 100644 content/en/getting-started/configuration.md create mode 100644 content/en/host-and-deploy/_index.md create mode 100644 content/en/host-and-deploy/deploy-with-hugo-deploy.md rename content/en/{hosting-and-deployment/deployment-with-rclone.md => host-and-deploy/deploy-with-rclone.md} (64%) rename content/en/{hosting-and-deployment/deployment-with-rsync.md => host-and-deploy/deploy-with-rsync.md} (88%) rename content/en/{hosting-and-deployment/hosting-on-21yunbox.md => host-and-deploy/host-on-21yunbox.md} (51%) rename content/en/{hosting-and-deployment/hosting-on-aws-amplify => host-and-deploy/host-on-aws-amplify}/amplify-step-05.png (100%) rename content/en/{hosting-and-deployment/hosting-on-aws-amplify => host-and-deploy/host-on-aws-amplify}/amplify-step-06.png (100%) rename content/en/{hosting-and-deployment/hosting-on-aws-amplify => host-and-deploy/host-on-aws-amplify}/amplify-step-07.png (100%) rename content/en/{hosting-and-deployment/hosting-on-aws-amplify => host-and-deploy/host-on-aws-amplify}/amplify-step-08.png (100%) rename content/en/{hosting-and-deployment/hosting-on-aws-amplify => host-and-deploy/host-on-aws-amplify}/amplify-step-09.png (100%) rename content/en/{hosting-and-deployment/hosting-on-aws-amplify => host-and-deploy/host-on-aws-amplify}/amplify-step-11.png (100%) rename content/en/{hosting-and-deployment/hosting-on-aws-amplify => host-and-deploy/host-on-aws-amplify}/index.md (69%) rename content/en/{hosting-and-deployment/hosting-on-azure-static-web-apps.md => host-and-deploy/host-on-azure-static-web-apps.md} (73%) rename content/en/{hosting-and-deployment/hosting-on-cloudflare-pages.md => host-and-deploy/host-on-cloudflare-pages.md} (60%) rename content/en/{hosting-and-deployment/hosting-on-codeberg.md => host-and-deploy/host-on-codeberg-pages.md} (51%) rename content/en/{hosting-and-deployment/hosting-on-firebase.md => host-and-deploy/host-on-firebase.md} (82%) rename content/en/{hosting-and-deployment/hosting-on-github => host-and-deploy/host-on-github-pages}/gh-pages-1.png (100%) rename content/en/{hosting-and-deployment/hosting-on-github => host-and-deploy/host-on-github-pages}/gh-pages-2.png (100%) rename content/en/{hosting-and-deployment/hosting-on-github => host-and-deploy/host-on-github-pages}/gh-pages-3.png (100%) rename content/en/{hosting-and-deployment/hosting-on-github => host-and-deploy/host-on-github-pages}/gh-pages-4.png (100%) rename content/en/{hosting-and-deployment/hosting-on-github => host-and-deploy/host-on-github-pages}/gh-pages-5.png (100%) rename content/en/{hosting-and-deployment/hosting-on-github => host-and-deploy/host-on-github-pages}/index.md (79%) rename content/en/{hosting-and-deployment/hosting-on-gitlab.md => host-and-deploy/host-on-gitlab-pages.md} (77%) rename content/en/{hosting-and-deployment/hosting-on-keycdn => host-and-deploy/host-on-keycdn}/index.md (79%) rename content/en/{hosting-and-deployment/hosting-on-keycdn => host-and-deploy/host-on-keycdn}/keycdn-pull-zone.png (100%) rename content/en/{hosting-and-deployment/hosting-on-keycdn => host-and-deploy/host-on-keycdn}/secret-api-key.png (100%) rename content/en/{hosting-and-deployment/hosting-on-keycdn => host-and-deploy/host-on-keycdn}/secret-zone-id.png (100%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/index.md (53%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/netlify-step-02.png (100%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/netlify-step-03.png (100%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/netlify-step-04.png (100%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/netlify-step-05.png (100%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/netlify-step-06.png (100%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/netlify-step-07.png (100%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/netlify-step-08.png (100%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/netlify-step-09.png (100%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/netlify-step-10.png (100%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/netlify-step-11.png (100%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/netlify-step-12.png (100%) rename content/en/{hosting-and-deployment/hosting-on-netlify => host-and-deploy/host-on-netlify}/netlify-step-13.png (100%) rename content/en/{hosting-and-deployment/hosting-on-render.md => host-and-deploy/host-on-render.md} (85%) rename content/en/{hosting-and-deployment/hosting-on-sourcehut.md => host-and-deploy/host-on-sourcehut-pages.md} (56%) delete mode 100644 content/en/hosting-and-deployment/_index.md delete mode 100644 content/en/hosting-and-deployment/hugo-deploy.md delete mode 100644 content/en/hugo-modules/configuration.md create mode 100644 content/en/hugo-modules/introduction.md delete mode 100644 content/en/installation/_common/_index.md delete mode 100644 content/en/methods/menu-entry/_common/_index.md delete mode 100644 content/en/methods/page/_common/_index.md delete mode 100644 content/en/methods/page/_common/output-format-methods.md delete mode 100644 content/en/methods/pages/_common/_index.md delete mode 100644 content/en/methods/resource/Key.md delete mode 100644 content/en/methods/resource/_common/_index.md delete mode 100644 content/en/methods/taxonomy/_common/_index.md delete mode 100644 content/en/myshowcase/featured.png create mode 100644 content/en/quick-reference/glossary/media-type.md create mode 100644 content/en/quick-reference/glossary/primary-output-format.md create mode 100644 content/en/quick-reference/glossary/regular-expression.md create mode 100644 content/en/quick-reference/syntax-highlighting-styles.md delete mode 100644 content/en/render-hooks/_common/_index.md rename content/en/{myshowcase => showcase/_template}/bio.md (51%) rename {archetypes/showcase => content/en/showcase/_template}/featured.png (100%) rename content/en/{myshowcase => showcase/_template}/index.md (90%) delete mode 100644 content/en/showcase/template/bio.md delete mode 100644 content/en/showcase/template/featured-template.png delete mode 100644 content/en/showcase/template/index.md delete mode 100644 content/en/templates/_common/_index.md delete mode 100644 content/en/templates/output-formats.md rename content/en/templates/{types/index.md => types.md} (91%) delete mode 100644 content/en/templates/types/site-hierarchy.svg delete mode 100644 layouts/_default/_markup/render-heading.html create mode 100644 layouts/partials/helpers/debug/list-item-metadata.html create mode 100644 layouts/shortcodes/per-lang-config-keys.html create mode 100644 layouts/shortcodes/root-configuration-keys.html create mode 100644 layouts/shortcodes/syntax-highlighting-styles.html diff --git a/.cspell.json b/.cspell.json index 8d51085ab..264d0f01a 100644 --- a/.cspell.json +++ b/.cspell.json @@ -161,7 +161,7 @@ "# ----------------------------------------------------------------------", "achristie", "ccpa", - "crpa", + "cpra", "ddmaurier", "dring", "fleqn", @@ -171,6 +171,8 @@ "jsmith", "leqno", "milli", + "monokai", + "mysanityprojectid", "rgba", "rsmith", "tdewolff", diff --git a/.prettierignore b/.prettierignore index 39d080729..630782282 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,11 +1,12 @@ # Ignore all SVG icons. **/icons.html + # These are whitespace sensitive. layouts/_default/_markup/render-code* layouts/_default/_markup/render-table* - -# Odd template syntax. -layouts/_default/_markup/render-heading* +layouts/shortcodes/glossary-term.html +layouts/shortcodes/glossary.html +layouts/shortcodes/highlighting-styles.html # No root node. layouts/partials/layouts/head/head.html diff --git a/LICENSE.md b/LICENSE.md index 979711275..d4facbf8a 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,3 +1,3 @@ See [content/LICENSE.md](content/LICENSE.md) for the license of the content of this repository. -The theme (layouts, CSS, JavaScript etc.) of this repository has no open source license. It is custom made for the Hugo sites and is not meant for reuse. \ No newline at end of file +The theme (layouts, CSS, JavaScript etc.) of this repository has no open source license. It is custom made for the Hugo sites and is not meant for reuse. diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 000000000..58a60edc4 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: {{ replace .File.ContentBaseName "-" " " | strings.FirstUpper }} +description: +categories: [] +keywords: [] +--- diff --git a/archetypes/functions.md b/archetypes/functions.md index 44a2a5635..85859dc04 100644 --- a/archetypes/functions.md +++ b/archetypes/functions.md @@ -3,9 +3,10 @@ title: {{ replace .File.ContentBaseName "-" " " | title }} description: categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: - signatures: [] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: + signatures: [] --- diff --git a/archetypes/glossary.md b/archetypes/glossary.md index 4fa4669ec..1eeb4ef4b 100644 --- a/archetypes/glossary.md +++ b/archetypes/glossary.md @@ -1,6 +1,7 @@ --- title: {{ replace .File.ContentBaseName "-" " " }} -reference: +params: + reference: --- diff --git a/content/en/_common/content-format-table.md b/content/en/_common/content-format-table.md new file mode 100644 index 000000000..c0a66a146 --- /dev/null +++ b/content/en/_common/content-format-table.md @@ -0,0 +1,13 @@ +--- +_comment: Do not remove front matter. +--- + +Content format|Media type|Identifier|File extensions +:--|:--|:--|:-- +Markdown|`text/markdown`|`markdown`|`markdown`,`md`, `mdown` +HTML|`text/html`|`html`|`htm`, `html` +Emacs Org Mode|`text/org`|`org`|`org` +AsciiDoc|`text/asciidoc`|`asciidoc`|`ad`, `adoc`, `asciidoc` +Pandoc|`text/pandoc`|`pandoc`|`pandoc`, `pdc` +reStructuredText|`text/rst`|`rst`|`rst` + diff --git a/content/en/templates/_common/filter-sort-group.md b/content/en/_common/filter-sort-group.md similarity index 100% rename from content/en/templates/_common/filter-sort-group.md rename to content/en/_common/filter-sort-group.md diff --git a/content/en/functions/fmt/_common/fmt-layout.md b/content/en/_common/functions/fmt/format-string.md similarity index 100% rename from content/en/functions/fmt/_common/fmt-layout.md rename to content/en/_common/functions/fmt/format-string.md diff --git a/content/en/functions/_common/go-html-template-package.md b/content/en/_common/functions/go-html-template-package.md similarity index 100% rename from content/en/functions/_common/go-html-template-package.md rename to content/en/_common/functions/go-html-template-package.md diff --git a/content/en/functions/go-template/_common/text-template.md b/content/en/_common/functions/go-template/text-template.md similarity index 100% rename from content/en/functions/go-template/_common/text-template.md rename to content/en/_common/functions/go-template/text-template.md diff --git a/content/en/functions/images/_common/apply-image-filter.md b/content/en/_common/functions/images/apply-image-filter.md similarity index 100% rename from content/en/functions/images/_common/apply-image-filter.md rename to content/en/_common/functions/images/apply-image-filter.md diff --git a/content/en/functions/js/_common/options.md b/content/en/_common/functions/js/options.md similarity index 91% rename from content/en/functions/js/_common/options.md rename to content/en/_common/functions/js/options.md index 12037c1ab..9dabb9426 100644 --- a/content/en/functions/js/_common/options.md +++ b/content/en/_common/functions/js/options.md @@ -8,16 +8,16 @@ params ```go-html-template {{ $js := resources.Get "js/main.js" | js.Build (dict "params" (dict "api" "https://example.org/api")) }} ``` -: And then in your JS file: + And then in your JS file: ```js import * as params from '@params'; ``` -: Note that this is meant for small data sets, e.g. configuration settings. For larger data, please put/mount the files into `assets` and import them directly. + 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. +: (`bool`) Whether to let `js.Build` handle the minification. loaders : {{< new-in 0.140.0 />}} @@ -34,7 +34,7 @@ shims {{ $js = $js | js.Build dict "shims" $shims }} ``` -: The _shim_ files may look like these: + The _shim_ files may look like these: ```js // js/shims/react.js @@ -46,7 +46,7 @@ shims module.exports = window.ReactDOM; ``` -: With the above, these imports should work in both scenarios: + With the above, these imports should work in both scenarios: ```js import * as React from 'react'; @@ -90,13 +90,13 @@ JSXImportSource : {{< new-in 0.124.0 />}} : (`string`) Which library to use to automatically import its JSX helper functions from. This only works if `JSX` is set to `automatic`. The specified library needs to be installed through npm and expose certain exports. See https://esbuild.github.io/api/#jsx-import-source. -: The combination of `JSX` and `JSXImportSource` is helpful if you want to use a non-React JSX library like Preact, e.g.: + The combination of `JSX` and `JSXImportSource` is helpful if you want to use a non-React JSX library like Preact, e.g.: ```go-html-template {{ $js := resources.Get "js/main.jsx" | js.Build (dict "JSX" "automatic" "JSXImportSource" "preact") }} ``` -: With the above, you can use Preact components and JSX without having to manually import `h` and `Fragment` every time: + With the above, you can use Preact components and JSX without having to manually import `h` and `Fragment` every time: ```jsx import { render } from 'preact'; diff --git a/content/en/functions/_common/locales.md b/content/en/_common/functions/locales.md similarity index 99% rename from content/en/functions/_common/locales.md rename to content/en/_common/functions/locales.md index abcfb41c2..f27cfd893 100644 --- a/content/en/functions/_common/locales.md +++ b/content/en/_common/functions/locales.md @@ -3,7 +3,6 @@ _comment: Do not remove front matter. --- {{< note >}} - Localization of dates, currencies, numbers, and percentages is performed by the [gohugoio/locales] package. The language tag of the current site must match one of the listed locales. [gohugoio/locales]: https://github.com/gohugoio/locales diff --git a/content/en/functions/resources/_common/postcss-windows-warning.md b/content/en/_common/functions/postcss-windows-warning.md similarity index 100% rename from content/en/functions/resources/_common/postcss-windows-warning.md rename to content/en/_common/functions/postcss-windows-warning.md diff --git a/content/en/functions/_common/regular-expressions.md b/content/en/_common/functions/regular-expressions.md similarity index 100% rename from content/en/functions/_common/regular-expressions.md rename to content/en/_common/functions/regular-expressions.md diff --git a/content/en/functions/go-template/_common/truthy-falsy.md b/content/en/_common/functions/truthy-falsy.md similarity index 100% rename from content/en/functions/go-template/_common/truthy-falsy.md rename to content/en/_common/functions/truthy-falsy.md diff --git a/content/en/functions/urls/_common/anchorize-vs-urlize.md b/content/en/_common/functions/urls/anchorize-vs-urlize.md similarity index 92% rename from content/en/functions/urls/_common/anchorize-vs-urlize.md rename to content/en/_common/functions/urls/anchorize-vs-urlize.md index 710a3c592..e00c181b8 100644 --- a/content/en/functions/urls/_common/anchorize-vs-urlize.md +++ b/content/en/_common/functions/urls/anchorize-vs-urlize.md @@ -2,7 +2,7 @@ _comment: Do not remove front matter. --- -The [`anchorize`] and [`urlize`] functions are similar: +The [`anchorize`] and [`urlize`] functions are similar: [`anchorize`]: /functions/urls/anchorize/ [`urlize`]: /functions/urls/urlize/ diff --git a/content/en/functions/_common/glob-patterns.md b/content/en/_common/glob-patterns.md similarity index 100% rename from content/en/functions/_common/glob-patterns.md rename to content/en/_common/glob-patterns.md diff --git a/content/en/installation/_common/01-editions.md b/content/en/_common/installation/01-editions.md similarity index 94% rename from content/en/installation/_common/01-editions.md rename to content/en/_common/installation/01-editions.md index 11e7e9080..634002822 100644 --- a/content/en/installation/_common/01-editions.md +++ b/content/en/_common/installation/01-editions.md @@ -13,4 +13,4 @@ Deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or [dart sass]: /functions/css/sass/#dart-sass [processing images]: /content-management/image-processing/ [transpile sass to css]: /functions/css/sass/ -[details]: /hosting-and-deployment/hugo-deploy/ +[details]: /host-and-deploy/deploy-with-hugo-deploy/ diff --git a/content/en/installation/_common/02-prerequisites.md b/content/en/_common/installation/02-prerequisites.md similarity index 100% rename from content/en/installation/_common/02-prerequisites.md rename to content/en/_common/installation/02-prerequisites.md diff --git a/content/en/installation/_common/03-prebuilt-binaries.md b/content/en/_common/installation/03-prebuilt-binaries.md similarity index 100% rename from content/en/installation/_common/03-prebuilt-binaries.md rename to content/en/_common/installation/03-prebuilt-binaries.md diff --git a/content/en/installation/_common/04-build-from-source.md b/content/en/_common/installation/04-build-from-source.md similarity index 100% rename from content/en/installation/_common/04-build-from-source.md rename to content/en/_common/installation/04-build-from-source.md diff --git a/content/en/installation/_common/homebrew.md b/content/en/_common/installation/homebrew.md similarity index 100% rename from content/en/installation/_common/homebrew.md rename to content/en/_common/installation/homebrew.md diff --git a/content/en/methods/menu-entry/_common/pre-post.md b/content/en/_common/menu-entries/pre-and-post.md similarity index 100% rename from content/en/methods/menu-entry/_common/pre-post.md rename to content/en/_common/menu-entries/pre-and-post.md diff --git a/content/en/_common/menu-entry-properties.md b/content/en/_common/menu-entry-properties.md new file mode 100644 index 000000000..daeadd79d --- /dev/null +++ b/content/en/_common/menu-entry-properties.md @@ -0,0 +1,31 @@ +--- +_comment: Do not remove front matter. +--- + + + +identifier +: (`string`) Required when two or more menu entries have the same `name`, or when localizing the `name` using translation tables. Must start with a letter, followed by letters, digits, or underscores. + +name +: (`string`) The text to display when rendering the menu entry. + +params +: (`map`) User-defined properties for the menu entry. + +parent +: (`string`) The `identifier` of the parent menu entry. If `identifier` is not defined, use `name`. Required for child entries in a nested menu. + +post +: (`string`) The HTML to append when rendering the menu entry. + +pre +: (`string`) The HTML to prepend when rendering the menu entry. + +title +: (`string`) The HTML `title` attribute of the rendered menu entry. + +weight +: (`int`) A non-zero integer indicating the entry's position relative the root of the menu, or to its parent for a child entry. Lighter entries float to the top, while heavier entries sink to the bottom. diff --git a/content/en/methods/page/_common/next-and-prev.md b/content/en/_common/methods/page/next-and-prev.md similarity index 96% rename from content/en/methods/page/_common/next-and-prev.md rename to content/en/_common/methods/page/next-and-prev.md index 0a3022265..babc88ff4 100644 --- a/content/en/methods/page/_common/next-and-prev.md +++ b/content/en/_common/methods/page/next-and-prev.md @@ -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]: /configuration/page/ [`Next`]: /methods/pages/prev [`Prev`]: /methods/pages/prev diff --git a/content/en/methods/page/_common/nextinsection-and-previnsection.md b/content/en/_common/methods/page/nextinsection-and-previnsection.md similarity index 96% rename from content/en/methods/page/_common/nextinsection-and-previnsection.md rename to content/en/_common/methods/page/nextinsection-and-previnsection.md index 1d1f5438a..3d87a2d7a 100644 --- a/content/en/methods/page/_common/nextinsection-and-previnsection.md +++ b/content/en/_common/methods/page/nextinsection-and-previnsection.md @@ -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]: /configuration/page/ [`Next`]: /methods/pages/prev [`Prev`]: /methods/pages/prev diff --git a/content/en/_common/methods/page/output-format-methods.md b/content/en/_common/methods/page/output-format-methods.md new file mode 100644 index 000000000..1e914db03 --- /dev/null +++ b/content/en/_common/methods/page/output-format-methods.md @@ -0,0 +1,35 @@ +--- +_comment: Do not remove front matter. +--- + +### Get IDENTIFIER + +(`any`) Returns the `OutputFormat` object with the given identifier. + +### MediaType + +(`media.Type`) Returns the media type of the output format. + +### MediaType.MainType + +(`string`) Returns the main type of the output format's media type. + +### MediaType.SubType + +(`string`) Returns the subtype of the current format's media type. + +### Name + +(`string`) Returns the output identifier of the output format. + +### Permalink + +(`string`) Returns the permalink of the page generated by the current output format. + +### Rel + +(`string`) Returns the `rel` value of the output format, either the default or as defined in the site configuration. + +### RelPermalink + +(`string`) Returns the relative permalink of the page generated by the current output format. diff --git a/content/en/methods/pages/_common/group-sort-order.md b/content/en/_common/methods/pages/group-sort-order.md similarity index 100% rename from content/en/methods/pages/_common/group-sort-order.md rename to content/en/_common/methods/pages/group-sort-order.md diff --git a/content/en/methods/pages/_common/next-and-prev.md b/content/en/_common/methods/pages/next-and-prev.md similarity index 98% rename from content/en/methods/pages/_common/next-and-prev.md rename to content/en/_common/methods/pages/next-and-prev.md index 540783992..621d6b079 100644 --- a/content/en/methods/pages/_common/next-and-prev.md +++ b/content/en/_common/methods/pages/next-and-prev.md @@ -33,7 +33,7 @@ content/ And these templates: {{< code file=layouts/_default/list.html >}} -{{ range .Pages.ByWeight}} +{{ range .Pages.ByWeight }}

{{ .LinkTitle }}

{{ end }} {{< /code >}} diff --git a/content/en/methods/resource/_common/global-page-remote-resources.md b/content/en/_common/methods/resource/global-page-remote-resources.md similarity index 100% rename from content/en/methods/resource/_common/global-page-remote-resources.md rename to content/en/_common/methods/resource/global-page-remote-resources.md diff --git a/content/en/methods/resource/_common/processing-spec.md b/content/en/_common/methods/resource/processing-spec.md similarity index 100% rename from content/en/methods/resource/_common/processing-spec.md rename to content/en/_common/methods/resource/processing-spec.md diff --git a/content/en/methods/taxonomy/_common/get-a-taxonomy-object.md b/content/en/_common/methods/taxonomy/get-a-taxonomy-object.md similarity index 97% rename from content/en/methods/taxonomy/_common/get-a-taxonomy-object.md rename to content/en/_common/methods/taxonomy/get-a-taxonomy-object.md index 9ef2585e1..d52f7ee4c 100644 --- a/content/en/methods/taxonomy/_common/get-a-taxonomy-object.md +++ b/content/en/_common/methods/taxonomy/get-a-taxonomy-object.md @@ -34,7 +34,7 @@ To capture the "genres" `Taxonomy` object from within any template, use the [`Ta To capture the "genres" `Taxonomy` object when rendering its page with a taxonomy template, use the [`Terms`] method on the page's [`Data`] object: -{{< code file=layouts/_default/taxonomy.html >}} +{{< code file=layouts/_default/taxonomy.html >}} {{ $taxonomyObject := .Data.Terms }} {{< /code >}} diff --git a/content/en/methods/taxonomy/_common/ordered-taxonomy-element-methods.md b/content/en/_common/methods/taxonomy/ordered-taxonomy-element-methods.md similarity index 100% rename from content/en/methods/taxonomy/_common/ordered-taxonomy-element-methods.md rename to content/en/_common/methods/taxonomy/ordered-taxonomy-element-methods.md diff --git a/content/en/functions/time/_common/parsable-date-time-strings.md b/content/en/_common/parsable-date-time-strings.md similarity index 100% rename from content/en/functions/time/_common/parsable-date-time-strings.md rename to content/en/_common/parsable-date-time-strings.md diff --git a/content/en/_common/permalink-tokens.md b/content/en/_common/permalink-tokens.md new file mode 100644 index 000000000..4aec68fb8 --- /dev/null +++ b/content/en/_common/permalink-tokens.md @@ -0,0 +1,71 @@ +--- +_comment: Do not remove front matter. +--- + +`:year` +: The 4-digit year as defined in the front matter `date` field. + +`:month` +: The 2-digit month as defined in the front matter `date` field. + +`:monthname` +: The name of the month as defined in the front matter `date` field. + +`:day` +: The 2-digit day as defined in the front matter `date` field. + +`:weekday` +: The 1-digit day of the week as defined in the front matter `date` field (Sunday = `0`). + +`:weekdayname` +: The name of the day of the week as defined in the front matter `date` field. + +`:yearday` +: The 1- to 3-digit day of the year as defined in the front matter `date` field. + +`:section` +: The content's section. + +`:sections` +: The content's sections hierarchy. You can use a selection of the sections using _slice syntax_: `:sections[1:]` includes all but the first, `:sections[:last]` includes all but the last, `:sections[last]` includes only the last, `:sections[1:2]` includes section 2 and 3. Note that this slice access will not throw any out-of-bounds errors, so you don't have to be exact. + +`:title` +: The `title` as defined in front matter, else the automatic title. Hugo generates titles automatically for section, taxonomy, and term pages that are not backed by a file. + +`:slug` +: The `slug` as defined in front matter, else the `title` as defined in front matter, else the automatic title. Hugo generates titles automatically for section, taxonomy, and term pages that are not backed by a file. + +`:filename` +: The content's file name without extension, applicable to the `page` page kind. + + {{< deprecated-in v0.144.0 >}} + The `:filename` token has been deprecated. Use `:contentbasename` instead. + {{< /deprecated-in >}} + +`:slugorfilename` +: The `slug` as defined in front matter, else the content's file name without extension, applicable to the `page` page kind. + + {{< deprecated-in v0.144.0 >}} + The `:slugorfilename` token has been deprecated. Use `:slugorcontentbasename` instead. + {{< /deprecated-in >}} + +`:contentbasename` +: {{< new-in 0.144.0 />}} +: The [content base name]. + +[content base name]: /methods/page/file/#contentbasename + +`:slugorcontentbasename` +: {{< new-in 0.144.0 />}} +: The `slug` as defined in front matter, else the [content base name]. + +For time-related values, you can also use the layout string components defined in Go's [time package]. For example: + +[time package]: https://pkg.go.dev/time#pkg-constants + +{{< code-toggle file=hugo >}} +permalinks: + posts: /:06/:1/:2/:title/ +{{< /code-toggle >}} + +[content base name]: /methods/page/file/#contentbasename diff --git a/content/en/_common/ref-and-relref-error-handling.md b/content/en/_common/ref-and-relref-error-handling.md new file mode 100644 index 000000000..1d67bbc1f --- /dev/null +++ b/content/en/_common/ref-and-relref-error-handling.md @@ -0,0 +1,10 @@ +--- +_comment: Do not remove front matter. +--- + +By default, Hugo will throw an error and fail the build if it cannot resolve the path. You can change this to a warning in your site configuration, and specify a URL to return when the path cannot be resolved. + +{{< code-toggle file=hugo >}} +refLinksErrorLevel = 'warning' +refLinksNotFoundURL = '/some/other/url' +{{< /code-toggle >}} diff --git a/content/en/_common/ref-and-relref-options.md b/content/en/_common/ref-and-relref-options.md new file mode 100644 index 000000000..ed0dd14c6 --- /dev/null +++ b/content/en/_common/ref-and-relref-options.md @@ -0,0 +1,12 @@ +--- +_comment: Do not remove front matter. +--- + +path +: (`string`) The path to the target page. Paths without a leading slash (`/`) are resolved first relative to the current page, and then relative to the rest of the site. + +lang +: (`string`) The language of the target page. Default is the current language. Optional. + +outputFormat +: (`string`) The output format of the target page. Default is the current output format. Optional. diff --git a/content/en/render-hooks/_common/pageinner.md b/content/en/_common/render-hooks/pageinner.md similarity index 97% rename from content/en/render-hooks/_common/pageinner.md rename to content/en/_common/render-hooks/pageinner.md index 96a12bf3b..29c7eaa2b 100644 --- a/content/en/render-hooks/_common/pageinner.md +++ b/content/en/_common/render-hooks/pageinner.md @@ -22,7 +22,7 @@ The primary use case for `PageInner` is to resolve links and [page resources](g) Then call the shortcode in your Markdown: -{{< code file=content/posts/p1.md >}} +{{< code file=content/posts/p1.md lang=text >}} {{%/* include "/posts/p2" */%}} {{< /code >}} diff --git a/content/en/_common/store-methods.md b/content/en/_common/store-methods.md index 074216f7b..1dd776130 100644 --- a/content/en/_common/store-methods.md +++ b/content/en/_common/store-methods.md @@ -4,7 +4,7 @@ ## Methods -###### Set +### Set Sets the value of the given key. @@ -12,7 +12,7 @@ Sets the value of the given key. {{ .Store.Set "greeting" "Hello" }} ``` -###### Get +### Get Gets the value of the given key. @@ -21,7 +21,7 @@ Gets the value of the given key. {{ .Store.Get "greeting" }} → Hello ``` -###### Add +### Add Adds the given value to the existing value(s) of the given key. @@ -45,7 +45,7 @@ For single values, `Add` accepts values that support Go's `+` operator. If the f {{ .Store.Get "greetings" }} → [Hello Welcome Cheers] ``` -###### SetInMap +### SetInMap Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`. @@ -53,9 +53,9 @@ Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to th {{ .Store.SetInMap "greetings" "english" "Hello" }} {{ .Store.SetInMap "greetings" "french" "Bonjour" }} {{ .Store.Get "greetings" }} → map[english:Hello french:Bonjour] -``` + ``` -###### DeleteInMap +### DeleteInMap Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`. @@ -66,7 +66,7 @@ Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`. {{ .Store.Get "greetings" }} → map[french:Bonjour] ``` -###### GetSortedMapValues +### GetSortedMapValues Returns an array of values from `key` sorted by `mapKey`. @@ -76,7 +76,7 @@ Returns an array of values from `key` sorted by `mapKey`. {{ .Store.GetSortedMapValues "greetings" }} → [Hello Bonjour] ``` -###### Delete +### Delete Removes the given key. diff --git a/content/en/functions/_common/highlighting-options.md b/content/en/_common/syntax-highlighting-options.md similarity index 75% rename from content/en/functions/_common/highlighting-options.md rename to content/en/_common/syntax-highlighting-options.md index d3f986502..baf10c6e2 100644 --- a/content/en/functions/_common/highlighting-options.md +++ b/content/en/_common/syntax-highlighting-options.md @@ -11,9 +11,9 @@ codeFences 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 >}} + {{< 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. @@ -34,18 +34,20 @@ 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`. +: (`bool`) Whether to use inline CSS styles instead of an external CSS file. Default is `true`. To use an external CSS file, set this value to `false` and generate the CSS file from the command line: + + ```text + hugo gen chromastyles --style=monokai > syntax.css + ``` 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/ +: (`string`) The CSS styles to apply to the highlighted code. Case-sensitive. Default is `monokai`. See [syntax highlighting styles]. 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 />}} +: {{< new-in 0.140.2 />}} : (`string`) The class or classes to use for the outermost element of the highlighted code. Default is `highlight`. {{< note >}} @@ -57,3 +59,7 @@ lineNos=inline lineNos=table : equivalent to `lineNos=true` and `lineNumbersInTable=true` {{< /note >}} + +[Short snippets]: https://xyproto.github.io/splash/docs/all.html +[Long snippets]: https://xyproto.github.io/splash/docs/longer/all.html +[syntax highlighting styles]: /quick-reference/syntax-highlighting-styles/ diff --git a/content/en/functions/_common/time-layout-string.md b/content/en/_common/time-layout-string.md similarity index 100% rename from content/en/functions/_common/time-layout-string.md rename to content/en/_common/time-layout-string.md diff --git a/content/en/_index.md b/content/en/_index.md index 2074ed8b8..358f6a4d9 100644 --- a/content/en/_index.md +++ b/content/en/_index.md @@ -1,6 +1,4 @@ --- -title: The world’s fastest framework for building websites -date: 2017-03-02T12:00:00-05:00 +title: The world's fastest framework for building websites +description: Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again. --- - -Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again. diff --git a/content/en/about/_index.md b/content/en/about/_index.md index f15c38dcc..e55800959 100644 --- a/content/en/about/_index.md +++ b/content/en/about/_index.md @@ -1,16 +1,9 @@ --- title: About Hugo -linktitle: About +linkTitle: About description: Learn about Hugo and its features, privacy protections, and security model. categories: [] keywords: [] -menu: - docs: - identifier: about-hugo-in-this-section - parent: about - weight: 10 weight: 10 aliases: [/about-hugo/,/docs/] --- - -Learn about Hugo and its features, privacy protections, and security model. diff --git a/content/en/about/features.md b/content/en/about/features.md index 883d53407..ff8b220d5 100644 --- a/content/en/about/features.md +++ b/content/en/about/features.md @@ -1,14 +1,9 @@ --- title: Features description: Hugo's rich and powerful feature set provides the framework and tools to create static sites that build in seconds, often less. -categories: [about] +categories: [] keywords: [] -menu: - docs: - parent: about - weight: 30 -weight: 30 -toc: true +weight: 20 --- ## Framework @@ -61,7 +56,7 @@ toc: true : 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. [Shortcodes] -: Use Hugo's embedded shortcodes, or create your own, to insert complex content. For example, use shortcodes to include `audio` and `video` elements, render tables from local or remote data sources, insert snippets from other pages, and more. +: Use Hugo's embedded shortcodes, or create your own, to insert complex content. For example, use shortcodes to include `audio` and `video` elements, render tables from local or remote data sources, insert snippets from other pages, and more. ## Content management @@ -107,18 +102,18 @@ toc: true [Multilingual]: /content-management/multilingual/ [Multiplatform]: /installation/ -[Output formats]: /templates/output-formats/ +[Output formats]: /configuration/output-formats/ [Templates]: /templates/introduction/ [Themes]: https://themes.gohugo.io/ [Modules]: /hugo-modules/ -[Privacy]: /about/privacy/ +[Privacy]: /configuration/privacy/ [Security]: /about/security/ [Content formats]: /content-management/formats/ [CommonMark]: https://spec.commonmark.org/current/ [GitHub Flavored Markdown]: https://github.github.com/gfm/ [Markdown attributes]: /content-management/markdown-attributes/ -[Markdown extensions]: /getting-started/configuration-markup/#goldmark-extensions +[Markdown extensions]: /configuration/markup/#extensions [Markdown render hooks]: /render-hooks/introduction/ [Diagrams]: /content-management/diagrams/ [Mathematics]: /content-management/mathematics/ @@ -137,5 +132,5 @@ toc: true [Tailwind CSS processing]: /functions/css/tailwindcss/ [Caching]: /functions/partials/includecached/ -[Segmentation]: /getting-started/configuration/#configure-segments -[Minification]: /getting-started/configuration/#configure-minify +[Segmentation]: /configuration/segments/ +[Minification]: /configuration/minify/ diff --git a/content/en/about/introduction.md b/content/en/about/introduction.md index d89938eed..9586d08f8 100644 --- a/content/en/about/introduction.md +++ b/content/en/about/introduction.md @@ -1,14 +1,9 @@ --- title: Introduction -description: Hugo is a static site generator written in Go, optimized for speed and designed for flexibility. -categories: [about] +description: Hugo is a static site generator written in Go, optimized for speed and designed for flexibility. +categories: [] keywords: [] -menu: - docs: - identifier: about-introduction - parent: about - weight: 20 -weight: 20 +weight: 10 aliases: [/about/what-is-hugo/,/about/benefits/] --- @@ -32,8 +27,8 @@ Learn more about Hugo's [features], [privacy protections], and [security model]. [Go]: https://go.dev [Hugo Modules]: /hugo-modules/ [static site generator]: https://en.wikipedia.org/wiki/Static_site_generator -[features]: /about/features -[security model]: /about/security -[privacy protections]: /about/privacy +[features]: /about/features/ +[security model]: about/security/ +[privacy protections]: /configuration/privacy {{< youtube 0RKpf3rK57I >}} diff --git a/content/en/about/license.md b/content/en/about/license.md index f434b233e..06a3a695d 100644 --- a/content/en/about/license.md +++ b/content/en/about/license.md @@ -1,18 +1,13 @@ --- title: License description: Hugo is released under the Apache 2.0 license. -categories: [about] -keywords: [apache] -menu: - docs: - parent: about - weight: 60 -weight: 60 +categories: [] +keywords: [] +weight: 40 --- ## Apache License - _Version 2.0, January 2004_ __ diff --git a/content/en/about/security.md b/content/en/about/security.md index 29f2c7ed1..509ca6a75 100644 --- a/content/en/about/security.md +++ b/content/en/about/security.md @@ -2,71 +2,57 @@ title: Security model linkTitle: Security description: A summary of Hugo's security model. -categories: [about] -keywords: [security,privacy] -menu: - docs: - parent: about - weight: 50 -weight: 50 -toc: true +categories: [] +keywords: [] +weight: 30 aliases: [/about/security-model/] --- ## Runtime security -Hugo produces static output, so once built, the runtime is the browser (assuming the output is HTML) and any server (API) that you integrate with. +Hugo generates static websites, meaning the final output runs directly in the browser and interacts with any integrated APIs. However, during development and site building, the `hugo` executable itself is the runtime environment. -But when developing and building your site, the runtime is the `hugo` executable. Securing a runtime can be [a real challenge](https://blog.logrocket.com/how-to-protect-your-node-js-applications-from-malicious-dependencies-5f2e60ea08f9/). +Securing a runtime is a complex task. Hugo addresses this through a robust sandboxing approach and a strict security policy with default protections. Key features include: -**Hugo's main approach is that of sandboxing and a security policy with strict defaults:** +- Virtual file system: Hugo employs a virtual file system, limiting file access. Only the main project, not external components, can access files or directories outside the project root. +- Read-Only access: User-defined components have read-only access to the file system, preventing unintended modifications. +- Controlled external binaries: While Hugo utilizes external binaries for features like Asciidoctor support, these are strictly predefined with specific flags and are disabled by default. The [security policy] details these limitations. +- No arbitrary commands: To mitigate risks, Hugo intentionally avoids implementing general functions that would allow users to execute arbitrary operating system commands. -* Hugo has a virtual file system and only the main project (not third-party components) is allowed to mount directories or files outside the project root. -* User-defined components have read-only access to the filesystem. -* We shell out to some external binaries to support [Asciidoctor](/content-management/formats/#formats) and similar, but those binaries and their flags are predefined and disabled by default (see [Security Policy](#security-policy)). General functions to run arbitrary external OS commands have been [discussed](https://github.com/gohugoio/hugo/issues/796), but not implemented because of security concerns. +This combination of sandboxing and strict defaults effectively minimizes potential security vulnerabilities during the Hugo build process. -## Security policy - -Hugo has a built-in security policy that restricts access to [os/exec](https://pkg.go.dev/os/exec), remote communication and similar. - -The default configuration is listed below. Any build using features not in the allow list of the security policy will fail with a detailed message about what needs to be done. Most of these settings are allow lists (string or slice, [Regular Expressions](https://pkg.go.dev/regexp) or `none` which matches nothing). - -{{< code-toggle config=security />}} - -By default, Hugo permits the [`resources.GetRemote`] function to download files with media types corresponding to an internal allow list. To add media types to the allow list: - -[`resources.GetRemote`]: /functions/resources/getremote - -{{< code-toggle file=hugo >}} -[security.http] -mediaTypes = ['^image/avif$'] -{{< /code-toggle >}} - -Note that these and other configuration settings in Hugo can be overridden by the OS environment. For example, if you want to block all remote HTTP fetching of data: - -```txt -HUGO_SECURITY_HTTP_URLS=none hugo -``` +[security policy]: /configuration/security/ ## Dependency security -Hugo is built as a static binary using [Go Modules](https://github.com/golang/go/wiki/Modules) to manage its dependencies. Go Modules have several safeguards, one of them being the `go.sum` file. This is a database of the expected cryptographic checksums of all of your dependencies, including transitive dependencies. +Hugo utilizes [Go Modules] to manage its dependencies, compiling as a static binary. Go Modules create a `go.sum` file, a critical security feature. This file acts as a database, storing the expected cryptographic checksums of all dependencies, including those required indirectly (transitive dependencies). -[Hugo Modules](/hugo-modules/) is a feature built on top of the functionality of Go Modules. Like Go Modules, a Hugo project using Hugo Modules will have a `go.sum` file. We recommend that you commit this file to your version control system. The Hugo build will fail if there is a checksum mismatch, which would be an indication of [dependency tampering](https://julienrenaux.fr/2019/12/20/github-actions-security-risk/). +[Hugo Modules], which extend Go Modules' functionality, also produce a `go.sum` file. To ensure dependency integrity, commit this `go.sum` file to your version control. If Hugo detects a checksum mismatch during the build process, it will fail, indicating a possible attempt to [tamper with your project's dependencies]. + +[Go Modules]: https://go.dev/wiki/Modules#modules +[Hugo Modules]: /hugo-modules/ +[tamper with your project's dependencies]: https://julienrenaux.fr/2019/12/20/github-actions-security-risk/ ## Web application security -These are the security threats as defined by [OWASP](https://en.wikipedia.org/wiki/OWASP). +Hugo's security philosophy is rooted in established security standards, primarily aligning with the threats defined by [OWASP]. For HTML output, Hugo operates under a clear trust model. This model assumes that template and configuration authors, the developers, are trustworthy. However, the data supplied to these templates is inherently considered untrusted. This distinction is crucial for understanding how Hugo handles potential security risks. -For HTML output, this is the core security model: +[OWASP]: https://en.wikipedia.org/wiki/OWASP - +To prevent unintended escaping of data that developers know is safe, Hugo provides [`safe`] functions, such as [`safeHTML`]. These functions allow developers to explicitly mark data as trusted, bypassing the default escaping mechanisms. This is essential for scenarios where data is generated or sourced from reliable sources. However, an exception exists: enabling [inline shortcodes]. By activating this feature, you are implicitly trusting the logic within the shortcodes and the data contained within your content files. -In short: +[`safeHTML`]: /functions/safe/html/ +[inline shortcodes]: /content-management/shortcodes/#inline -Template and configuration authors (you) are trusted, but the data you send in is not. -This is why you sometimes need to use the _safe_ functions, such as `safeHTML`, to avoid escaping of data you know is safe. -There is one exception to the above, as noted in the documentation: If you enable inline shortcodes, you also say that the shortcodes and data handling in content files are trusted, as those macros are treated as pure text. -It may be worth adding that Hugo is a static site generator with no concept of dynamic user input. +It's vital to remember that Hugo is a static site generator. This architectural choice significantly reduces the attack surface by eliminating the complexities and vulnerabilities associated with dynamic user input. Unlike dynamic websites, Hugo generates static HTML files, minimizing the risk of real-time attacks. Regarding content, Hugo's default Markdown renderer is [configured to sanitize] potentially unsafe content. This default behavior ensures that potentially malicious code or scripts are removed or escaped. However, this setting can be reconfigured if you have a high degree of confidence in the safety of your content sources. -For content, the default Markdown renderer is [configured](/getting-started/configuration-markup) to remove or escape potentially unsafe content. This behavior can be reconfigured if you trust your content. +[configured to sanitize]: /configuration/markup/#rendererunsafe + +In essence, Hugo prioritizes secure output by establishing a clear trust boundary between developers and data. By default, it errs on the side of caution, sanitizing potentially unsafe content and escaping data. Developers have the flexibility to adjust these defaults through [`safe`] functions and [configuration options], but they must do so with a clear understanding of the security implications. Hugo's static site generation model further strengthens its security posture by minimizing dynamic vulnerabilities. + +[`safe`]: /functions/safe +[configuration options]: /configuration/security + +## Configuration + +See [configure security](/configuration/security/). diff --git a/content/en/commands/_index.md b/content/en/commands/_index.md index 89f673bf2..5869bfd9d 100644 --- a/content/en/commands/_index.md +++ b/content/en/commands/_index.md @@ -4,9 +4,5 @@ linkTitle: CLI description: Use the command line interface (CLI) to manage your site. categories: [] keywords: [] -menu: - docs: - parent: commands - weight: 10 weight: 10 --- diff --git a/content/en/configuration/_index.md b/content/en/configuration/_index.md new file mode 100644 index 000000000..7cb08cc73 --- /dev/null +++ b/content/en/configuration/_index.md @@ -0,0 +1,7 @@ +--- +title: Configuration +description: Configure your site. +categories: [] +keywords: [] +weight: 10 +--- diff --git a/content/en/configuration/all.md b/content/en/configuration/all.md new file mode 100644 index 000000000..a4c51e83c --- /dev/null +++ b/content/en/configuration/all.md @@ -0,0 +1,364 @@ +--- +title: All settings +description: The complete list of Hugo configuration settings. +categories: [] +keywords: [] +weight: 20 +aliases: [/getting-started/configuration/] +--- + +## Settings + +archetypeDir +: (`string`) The designated directory for [archetypes](g). Default is `archetypes`. {{% module-mounts-note %}} + +assetDir +: (`string`) The designated directory for [global resources](g). Default is `assets`. {{% module-mounts-note %}} + +baseURL +: (`string`) The absolute URL of your published site including the protocol, host, path, and a trailing slash. + +build +: See [configure build](/configuration/build/). + +buildDrafts +: (`bool`) Whether to include draft content when building a site. Default is `false`. + +buildExpired +: (`bool`) Whether to include expired content when building a site. Default is `false`. + +buildFuture +: (`bool`) Whether to include future content when building a site. Default is `false`. + +cacheDir +: (`string`) The designated cache directory. See [details](#cache-directory). + +caches +: See [configure file caches](/configuration/caches/). + +canonifyURLs +: (`bool`) See [details](/content-management/urls/#canonical-urls) before enabling this feature. Default is `false`. + +capitalizeListTitles +: {{< new-in 0.123.3 />}} +: (`bool`) Whether to capitalize automatic list titles. Applicable to section, taxonomy, and term pages. Default is `true`. Use the [`titleCaseStyle`](#titlecasestyle) setting to configure capitalization rules. + +cascade +: See [configure cascade](/configuration/cascade/). + +cleanDestinationDir +: (`bool`) Whether to remove files from the site's destination directory that do not have corresponding files in the `static` directory during the build. Default is `false`. + +contentDir +: (`string`) The designated directory for content files. Default is `content`. {{% module-mounts-note %}} + +copyright +: (`string`) The copyright notice for a site, typically displayed in the footer. + +dataDir +: (`string`) The designated directory for data files. Default is `data`. {{% module-mounts-note %}} + +defaultContentLanguage +: (`string`) The project's default language key, conforming to the syntax described in [RFC 5646]. This value must match one of the defined language keys. Default is `en`. + +defaultContentLanguageInSubdir +: (`bool`) Whether to publish the default language site to a subdirectory matching the `defaultContentLanguage`. Default is `false`. + +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. + +deployment +: See [configure deployment](/configuration/deployment/). + +disableAliases +: (`bool`) Whether to disable generation of alias redirects. Even if this option is enabled, the defined aliases will still be present on the page. This allows you to manage redirects separately, for example, by generating 301 redirects in an `.htaccess` file or a Netlify `_redirects` file using a custom output format. Default is `false`. + +disableDefaultLanguageRedirect +: {{< new-in 0.140.0 />}} +: (`bool`) Whether to disable generation of the alias redirect to the default language when `DefaultContentLanguageInSubdir` is `true`. Default is `false`. + +disableHugoGeneratorInject +: (`bool`) Whether to disable injection of a `` tag into the home page. Default is `false`. + +disableKinds +: (`[]string`) A slice of page [kinds](g) to disable during the build process, any of `404`, `home`, `page`, `robotstxt`, `rss`, `section`, `sitemap`, `taxonomy`, or `term`. + +disableLanguages +: (`[]string]`) A slice of language keys representing the languages to disable during the build process. Although this is functional, consider using the [`disabled`] key under each language instead. + +disableLiveReload +: (`bool`) Whether to disable automatic live reloading of the browser window. Default is `false`. + +disablePathToLower +: (`bool`) Whether to disable transformation of page URLs to lower case. + +enableEmoji +: (`bool`) Whether to allow emoji in Markdown. Default is `false`. + +enableGitInfo +: (`bool`) For sites under Git version control, whether to enable the [`GitInfo`] object for each page. With the [default front matter configuration], the `Lastmod` method on a `Page` object will return the Git author date. Default is `false`. + +enableMissingTranslationPlaceholders +: (`bool`) Whether to show a placeholder instead of the default value or an empty string if a translation is missing. Default is `false`. + +enableRobotsTXT +: (`bool`) Whether to enable generation of a `robots.txt` file. Default is `false`. + +environment +: (`string`) The build environment. Default is `production` when running `hugo` and `development` when running `hugo server`. + +frontmatter +: See [configure front matter](/configuration/front-matter/). + +hasCJKLanguage +: (`bool`) Whether to automatically detect [CJK](g) languages in content. Affects the values returned by the [`WordCount`] and [`FuzzyWordCount`] methods. Default is `false`. + +HTTPCache +: See [configure HTTP cache](/configuration/http-cache/). + +i18nDir +: (`string`) The designated directory for translation tables. Default is `i18n`. {{% module-mounts-note %}} + +ignoreCache +: (`bool`) Whether to ignore the cache directory. Default is `false`. + +ignoreFiles +: (`[]string]`) A slice of regular expressions used to exclude specific files from a build. These expressions are matched against the absolute file path and apply to files within the `content`, `data`, and `i18n` directories. For more advanced file exclusion options, see the section on [module mounts]. + +ignoreLogs +: (`[]string`) A slice of message identifiers corresponding to warnings and errors you wish to suppress. See [`erroridf`] and [`warnidf`]. + +ignoreVendorPaths +: (`string`) A [glob](g) pattern matching the module paths to exclude from the `_vendor` directory. + +imaging +: See [configure imaging](/configuration/imaging/). + +languageCode +: (`string`) The site's language tag, conforming to the syntax described in [RFC 5646]. This value does not affect translations or localization. Hugo uses this value to populate: + + - The `language` element in the [embedded RSS template] + - The `lang` attribute of the `html` element in the [embedded alias template] + - The `og:locale` `meta` element in the [embedded Open Graph template] + + When present in the root of the configuration, this value is ignored if one or more language keys exists. Please specify this value independently for each language key. + +languages +: See [configure languages](/configuration/languages/). + +layoutDir +: (`string`) The designated directory for templates. Default is `layouts`. {{% module-mounts-note %}} + +mainSections +: (`string` or `[]string`) The main sections of a site. If set, the [`MainSections`] method on the `Site` object returns the given sections, otherwise it returns the section with the most pages. + +markup +: See [configure markup](/configuration/markup/). + +mediaTypes +: See [configure media types](/configuration/media-types/). + +menus +: See [configure menus](/configuration/menus/). + +minify +: See [configure minify](/configuration/minify/). + +module +: See [configure modules](/configuration/module/). + +newContentEditor +: (`string`) The editor to use when creating new content. + +noBuildLock +: (`bool`) Whether to disable creation of the `.hugo_build.lock` file. Default is `false`. + +noChmod +: (`bool`) Whether to disable synchronization of file permission modes. Default is `false`. + +noTimes +: (`bool`) Whether to disable synchronization of file modification times. Default is `false`. + +outputFormats +: See [configure output formats](/configuration/output-formats/). + +outputs +: See [configure outputs](/configuration/outputs/). + +page +: See [configure page](/configuration/page/). + +pagination +: See [configure pagination](/configuration/pagination/). + +panicOnWarning +: (`bool`) Whether to panic on the first WARNING. Default is `false`. + +params +: See [configure params](/configuration/params/). + +permalinks +: See [configure permalinks](/configuration/permalinks/). + +pluralizeListTitles +: (`bool`) Whether to pluralize automatic list titles. Applicable to section pages. Default is `true`. + +printI18nWarnings +: (`bool`) Whether to log WARNINGs for each missing translation. Default is `false`. + +printPathWarnings +: (`bool`) Whether to log WARNINGs when Hugo publishes two or more files to the same path. Default is `false`. + +printUnusedTemplates +: (`bool`) Whether to log WARNINGs for each unused template. Default is `false`. + +privacy +: See [configure privacy](/configuration/privacy/). + +publishDir +: (`string`) The designated directory for publishing the site. Default is `public`. + +refLinksErrorLevel +: (`string`) The logging error level to use when the `ref` and `relref` functions, methods, and shortcodes are unable to resolve a reference to a page. Either `ERROR` or `WARNING`. Any `ERROR` will fail the build. Default is `ERROR`. + +refLinksNotFoundURL +: (`string`) The URL to return when the `ref` and `relref` functions, methods, and shortcodes are unable to resolve a reference to a page. + +related +: See [configure related content](/configuration/related-content/). + +relativeURLs +: (`bool`) See [details](/content-management/urls/#relative-urls) before enabling this feature. Default is `false`. + +removePathAccents +: (`bool`) Whether to remove [non-spacing marks](https://www.compart.com/en/unicode/category/Mn) from [composite characters](https://en.wikipedia.org/wiki/Precomposed_character) in content paths. Default is `false`. + +renderSegments +: {{< new-in 0.124.0 />}} +: (`[]string`) A slice of [segments](g) to render. If omitted, all segments are rendered. This option is typically set via a command-line flag, such as `hugo --renderSegments segment1,segment2`. The provided segment names must correspond to those defined in the [`segments`] configuration. + +resourceDir +: (`string`) The designated directory for caching output from [asset pipelines](g). Default is `resources`. + +security +: See [configure security](/configuration/security/). + +sectionPagesMenu +: (`string`) When set, each top-level section will be added to the menu identified by the provided value. See [details](/content-management/menus/#define-automatically). + +segments +: See [configure segments](/configuration/segments/). + +server +: See [configure server](/configuration/server/). + +services +: See [configure services](/configuration/services/). + +sitemap +: See [configure sitemap](/configuration/sitemap/). + +staticDir +: (`string`) The designated directory for static files. Default is `static`. {{% module-mounts-note %}} + +summaryLength +: (`int`) Applicable to [automatic summaries], the minimum number of words returned by the [`Summary`] method on a `Page` object. The `Summary` method will return content truncated at the paragraph boundary closest to the specified `summaryLength`, but at least this minimum number of words. + +taxonomies +: See [configure taxonomies](/configuration/taxonomies/). + +templateMetrics +: (`bool`) Whether to print template execution metrics to the console. Default is `false`. See [details](/troubleshooting/performance/#template-metrics). + +templateMetricsHints +: (`bool`) Whether to print template execution improvement hints to the console. Applicable when `templateMetrics` is `true`. Default is `false`. See [details](/troubleshooting/performance/#template-metrics). + +theme +: (`string` or `[]string`) The [theme](g) to use. Multiple themes can be listed, with precedence given from left to right. See [details](/hugo-modules/theme-components/). + +themesDir +: (`string`) The designated directory for themes. Default is `themes`. + +timeout +: (`string`) The timeout for generating page content, either as a [duration] or in seconds. This timeout is used to prevent infinite recursion during content generation. You may need to increase this value if your pages take a long time to generate, for example, due to extensive image processing or reliance on remote content. Default is `30s`. + +timeZone +: (`string`) The time zone used to parse dates without time zone offsets, including front matter date fields and values passed to the [`time.AsTime`] and [`time.Format`] template functions. The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone Database]. For example, `America/Los_Angeles` and `Europe/Oslo` are valid time zones. + +title +: (`string`) The site title. + +titleCaseStyle +: (`string`) The capitalization rules to follow when Hugo automatically generates a section title, or when using the [`strings.Title`] function. One of `ap`, `chicago`, `go`, `firstupper`, or `none`. Default is `ap`. See [details](#title-case-style). + +uglyurls +: See [configure ugly URLs](/configuration/ugly-urls/). + +[IANA Time Zone Database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones +[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1 +[`FuzzyWordCount`]: /methods/page/fuzzywordcount/ +[`GitInfo`]: /methods/page/gitinfo/ +[`MainSections`]: /methods/site/mainsections/ +[`Summary`]: /methods/page/summary/ +[`WordCount`]: /methods/page/wordcount/ +[`disabled`]: /configuration/languages/#disabled +[`erroridf`]: /functions/fmt/erroridf/ +[`segments`]: /configuration/segments/ +[`strings.Title`]: /functions/strings/title +[`time.AsTime`]: /functions/time/astime/ +[`time.Format`]: /functions/time/format/ +[`warnidf`]: /functions/fmt/warnidf/ +[automatic summaries]: /content-management/summaries/#automatic-summary +[default front matter configuration]: /configuration/front-matter/ +[duration]: https://pkg.go.dev/time#Duration +[embedded Open Graph template]: {{% eturl opengraph %}} +[embedded RSS template]: {{% eturl rss %}} +[embedded alias template]: {{% eturl alias %}} +[module mounts]: /configuration/module/#mounts + +## Cache directory + +Hugo's file cache directory is configurable via the [`cacheDir`] configuration option or the `HUGO_CACHEDIR` environment variable. If neither is set, Hugo will use, in order of preference: + +1. If running on Netlify: `/opt/build/cache/hugo_cache/`. This means that if you run your builds on Netlify, all caches configured with `:cacheDir` will be saved and restored on the next build. For other CI vendors, please read their documentation. For an CircleCI example, see [this configuration]. +1. In a `hugo_cache` directory below the OS user cache directory as defined by Go's [os.UserCacheDir]. On Unix systems, per the [XDG base directory specification], this is `$XDG_CACHE_HOME` if non-empty, else `$HOME/.cache`. On MacOS, this is `$HOME/Library/Caches`. On Windows, this is`%LocalAppData%`. On Plan 9, this is `$home/lib/cache`. +1. In a `hugo_cache_$USER` directory below the OS temp dir. + +To determine the current `cacheDir`: + +```sh +hugo config | grep cachedir +``` + +[XDG base directory specification]: https://specifications.freedesktop.org/basedir-spec/latest/ +[`cacheDir`]: #cachedir +[os.UserCacheDir]: https://pkg.go.dev/os#UserCacheDir +[this configuration]: https://github.com/bep/hugo-sass-test/blob/6c3960a8f4b90e8938228688bc49bdcdd6b2d99e/.circleci/config.yml + +## Title case style + +Hugo's [`titleCaseStyle`] setting governs capitalization for automatically generated section titles and the [`strings.Title`] function. By default, it follows the capitalization rules published in the Associated Press Stylebook. Change this setting to use other capitalization rules. + +ap +: Use the capitalization rules published in the [Associated Press Stylebook]. This is the default. + +chicago +: Use the capitalization rules published in the [Chicago Manual of Style]. + +go +: Capitalize the first letter of every word. + +firstupper +: Capitalize the first letter of the first word. + +none +: Disable transformation of automatic section titles, and disable the transformation performed by the `strings.Title` function. This is useful if you would prefer to manually capitalize section titles as needed, and to bypass opinionated theme usage of the `strings.Title` function. + +[Associated Press Stylebook]: https://www.apstylebook.com/ +[Chicago Manual of Style]: https://www.chicagomanualofstyle.org/home.html +[`strings.Title`]: /functions/strings/title/ +[`titleCaseStyle`]: #titlecasestyle + +## Localized settings + +Some configuration settings, such as menus and custom parameters, can be defined separately for each language. See [configure languages](/configuration/languages/#localized-settings). diff --git a/content/en/getting-started/configuration-build.md b/content/en/configuration/build.md similarity index 58% rename from content/en/getting-started/configuration-build.md rename to content/en/configuration/build.md index b6b766ac7..a86e0ac71 100644 --- a/content/en/getting-started/configuration-build.md +++ b/content/en/configuration/build.md @@ -1,38 +1,29 @@ --- title: Configure build +linkTitle: Build description: Configure global build options. -categories: [getting started,fundamentals] -keywords: [build,buildStats,cache] -menu: - docs: - parent: getting-started - weight: 70 -weight: 70 -slug: configuration-build -toc: true +categories: [] +keywords: [] +aliases: [/getting-started/configuration-build/] --- The `build` configuration section contains global build-related configuration options. {{< code-toggle config=build />}} -###### buildStats +buildStats +: See the [build stats](#build-stats) section below. -See [Configure buildStats](#configure-build-stats). +cachebusters +: See the [cache busters](#cache-busters) section below. -###### cachebusters +noJSConfigInAssets +: (`bool`) Whether to disable 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. -See [Configure Cache Busters](#configure-cache-busters). +useResourceCacheWhen +: (`string`) When to use the resource file cache, one of `never`, `fallback`, or `always`. Applicable when transpiling Sass to CSS. Default is `fallback`. -###### noJSConfigInAssets - -(`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 resource file cache, one of `never`, `fallback`, or `always`. Applicable when transpiling Sass to CSS. Default is `fallback`. - -## Configure cache busters +## Cache busters 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: @@ -57,25 +48,33 @@ The `build.cachebusters` configuration option was added to support development u When `buildStats` is enabled, Hugo writes a `hugo_stats.json` file on each build with HTML classes etc. that's used in the rendered output. Changes to this file will trigger a rebuild of the `styles.css` file. You also need to add `hugo_stats.json` to Hugo's server watcher. See [Hugo Starter Tailwind Basic](https://github.com/bep/hugo-starter-tailwind-basic) for a running example. source -: A regexp matching file(s) relative to one of the virtual component directories in Hugo, typically `assets/...`. +: (`string`) A regular expression matching file(s) relative to one of the virtual component directories in Hugo, typically `assets/...`. target -: A regexp matching the keys in the resource cache that should be expired when `source` changes. You can use the matching regexp groups from `source` in the expression, e.g. `$1`. +: (`string`) A regular expression matching the keys in the resource cache that should be expired when `source` changes. You can use the matching regexp groups from `source` in the expression, e.g. `$1`. -## Configure build stats +## Build stats {{< code-toggle config=build.buildStats />}} -If `enable` is set to `true`, creates a `hugo_stats.json` file in the root of your project. This file contains arrays of the `class` attributes, `id` attributes, and tags of every HTML element within your published site. Use this file as data source when [removing unused CSS] from your site. This process is also known as pruning, purging, or tree shaking. +enable +: (`bool`) Whether to create a `hugo_stats.json` file in the root of your project. This file contains arrays of the `class` attributes, `id` attributes, and tags of every HTML element within your published site. Use this file as data source when [removing unused CSS] from your site. This process is also known as pruning, purging, or tree shaking. Default is `false`. [removing unused CSS]: /functions/resources/postprocess/ -Exclude `class` attributes, `id` attributes, or tags from `hugo_stats.json` with the `disableClasses`, `disableIDs`, and `disableTags` keys. +disableIDs +: (`bool`) Whether to exclude `id` attributes. Default is `false`. + +disableTags +: (`bool`) Whether to exclude element tags. Default is `false`. + +disableClasses +: (`bool`) Whether to exclude `class` attributes. Default is `false`. {{< note >}} 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`]: /configuration/introduction/#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 >}} diff --git a/content/en/configuration/caches.md b/content/en/configuration/caches.md new file mode 100644 index 000000000..af2e2c8a8 --- /dev/null +++ b/content/en/configuration/caches.md @@ -0,0 +1,30 @@ +--- +title: Configure file caches +linkTitle: Caches +description: Configure file caches. +categories: [] +keywords: [] +--- + +This is the default configuration: + +{{< code-toggle config=caches />}} + +## Keys + +dir +: (`string`) The absolute file system path where the cached files will be stored. You can begin the path with the `:cacheDir` or `:resourceDir` token. These tokens will be replaced with the actual configured cache directory and resource directory paths, respectively. + +maxAge +: (`string`) The `duration` a cached entry remains valid before being evicted. A value of `0` disables the cache. A value of `-1` means the cache entry never expires (the default). + +## Tokens + +`:cacheDir` +: (`string`) The designated cache directory. See [details](/configuration/all/#cachedir). + +`:project` +: (`string`) The base directory name of the current Hugo project. By default, this ensures each project has isolated file caches, so running `hugo --gc` will only affect the current project's cache and not those of other Hugo projects on the same machine. + +`:resourceDir` +: (`string`) The designated directory for caching output from [asset pipelines](g). See [details](/configuration/all/#resourcedir). diff --git a/content/en/configuration/cascade.md b/content/en/configuration/cascade.md new file mode 100644 index 000000000..403c8f2a7 --- /dev/null +++ b/content/en/configuration/cascade.md @@ -0,0 +1,80 @@ +--- +title: Configure cascade +linkTitle: Cascade +description: Configure cascade. +categories: [] +keywords: [] +--- + +You can configure your site to cascade front matter values to the home page and any of its descendants. However, this cascading will be prevented if the descendant already defines the field, or if a closer ancestor [node](g) has already cascaded a value for the same field through its front matter's `cascade` key. + +{{< note >}} +You can also configure cascading behavior within a page's front matter. See [details]. + +[details]: /content-management/front-matter/#cascade-1 +{{< /note >}} + +For example, to cascade a "color" parameter to the home page and all its descendants: + +{{< code-toggle file=hugo >}} +title = 'Home' +[cascade.params] +color = 'red' +{{< /code-toggle >}} + +## Target + + + +The `target`[^1] keyword allows you to target specific pages or [environments](g). For example, to cascade a "color" parameter to pages within the "articles" section, including the "articles" section page itself: + +[^1]: The `_target` alias for `target` is deprecated and will be removed in a future release. + +{{< code-toggle file=hugo >}} +[cascade.params] +color = 'red' +[cascade.target] +path = '{/articles,/articles/**}' +{{< /code-toggle >}} + +Use any combination of these keywords to target pages and/or environments: + +environment +: (`string`) A [glob](g) pattern matching the build [environment](g). For example: `{staging,production}`. + +kind +: (`string`) A [glob](g) pattern matching the [page kind](g). For example: ` {taxonomy,term}`. + +lang +: (`string`) A [glob](g) pattern matching the [page language]. For example: `{en,de}`. + +path +: (`string`) A [glob](g) pattern matching the page's [logical path](g). For example: `{/books,/books/**}`. + + +[page language]: /methods/page/language/ + +## Array + +Define an array of cascade parameters to apply different values to different targets. For example: + +{{< code-toggle file=hugo >}} +[[cascade]] +[cascade.params] +color = 'red' +[cascade.target] +path = '{/books/**}' +kind = 'page' +lang = '{en,de}' +[[cascade]] +[cascade.params] +color = 'blue' +[cascade.target] +path = '{/films/**}' +kind = 'page' +environment = 'production' +{{< /code-toggle >}} diff --git a/content/en/configuration/content-types.md b/content/en/configuration/content-types.md new file mode 100644 index 000000000..4c5b5a23b --- /dev/null +++ b/content/en/configuration/content-types.md @@ -0,0 +1,63 @@ +--- +title: Configure content types +linkTitle: Content types +description: Configure content types. +categories: [] +keywords: [] +--- + +{{< new-in 0.144.0 />}} + +Hugo supports six [content formats](g): + +{{% include "/_common/content-format-table.md" %}} + +These can be used as either page content or [page resources](g). When used as page resources, their [resource type](g) is `page`. + +Consider this example of a [page bundle](g): + +```text +content/ +└── example/ + ├── index.md <-- content + ├── a.adoc <-- resource (resource type: page) + ├── b.html <-- resource (resource type: page) + ├── c.md <-- resource (resource type: page) + ├── d.org <-- resource (resource type: page) + ├── e.pdc <-- resource (resource type: page) + ├── f.rst <-- resource (resource type: page) + ├── g.jpg <-- resource (resource type: image) + └── h.png <-- resource (resource type: image) +``` + +The `index.md` file is the page's content, while the other files are page resources. Files `a` through `f` are of resource type `page`, while `g` and `h` are of resource type `image`. + +When you build a site, Hugo does not publish page resources having a resource type of `page`. For example, this is the result of building the site above: + +```text +public/ +├── example/ +│ ├── g.jpg +│ ├── h.png +│ └── index.html +└── index.html +``` + +The default behavior is appropriate in most cases. Given that page resources containing markup are typically intended for inclusion in the main content, publishing them independently is generally undesirable. + +The default behavior is determined by the `contentTypes` configuration: + +{{< code-toggle config=contentTypes />}} + +In this default configuration, page resources with those media types will have a resource type of `page`, and will not be automatically published. To change the resource type assignment from `page` to `text` for a given media type, remove the corresponding entry from the list. + +For example, to set the resource type of `text/html` files to `text`, thereby enabling automatic publication, remove the `text/html` entry: + +{{< code-toggle file=hugo >}} +contentTypes: + text/asciidoc: {} + text/markdown: {} + text/org: {} + text/pandoc: {} + text/rst: {} +{{< /code-toggle >}} diff --git a/content/en/configuration/deployment.md b/content/en/configuration/deployment.md new file mode 100644 index 000000000..1f520aa0f --- /dev/null +++ b/content/en/configuration/deployment.md @@ -0,0 +1,162 @@ +--- +title: Configure deployment +linkTitle: Deployment +description: Configure deployments to Amazon S3, Azure Blob Storage, or Google Cloud Storage. +categories: [] +keywords: [] +--- + +{{< note >}} +This configuration is only relevant when running `hugo deploy`. See [details](/host-and-deploy/deploy-with-hugo-deploy/). +{{< /note >}} + +## Top-level options + +These settings control the overall behavior of the deployment process. This is the default configuration: + +{{< code-toggle file=hugo config=deployment />}} + +confirm +: (`bool`) Whether to prompt for confirmation before deploying. Default is `false`. + +dryRun +: (`bool`) Whether to simulate the deployment without any remote changes. Default is `false`. + +force +: (`bool`) Whether to re-upload all files. Default is `false`. + +invalidateCDN +: (`bool`) Whether to invalidate the CDN cache listed in the deployment target. Default is `true`. + +maxDeletes +: (`int`) The maximum number of files to delete, or `-1` to disable. Default is `256`. + +matchers +: (`[]*Matcher`) A slice of [matchers](#matchers-1). + +order +: (`[]string`) An ordered slice of [RE2] regular expressions that determines upload priority (left to right). Files not matching any expression are uploaded last in an arbitrary order. + +target +: (`string`) The target deployment [`name`](#name). Defaults to the first target. + +targets +: (`[]*Target`) A slice of [targets](#targets-1). + +workers +: (`int`) The number of concurrent workers to use when uploading files. Default is `10`. + +[RE2]: https://github.com/google/re2/wiki/Syntax/ + +## Targets + +A target represents a deployment target such as "staging" or "production". + +cloudFrontDistributionID +: (`string`) The CloudFront Distribution ID, applicable if you are using the Amazon Web Services CloudFront CDN. Hugo will invalidate the CDN when deploying this target. + +exclude +: (`string`) A [glob](g) pattern matching files to exclude when deploying to this target. Local files failing the include/exclude filters are not uploaded, and remote files failing these filters are not deleted. + +googleCloudCDNOrigin +: (`string`) The Google Cloud project and CDN origin to invalidate when deploying this target, specified as `/`. + +include +: (`string`) A [glob](g) pattern matching files to include when deploying to this target. Local files failing the include/exclude filters are not uploaded, and remote files failing these filters are not deleted. + +name +: (`string`) An arbitrary name for this target. + +stripIndexHTML +: (`bool`) Whether to map files named `/index.html` to `` on the remote (except for the root `index.html`). This is useful for key-value cloud storage (e.g., Amazon S3, Google Cloud Storage, Azure Blob Storage) to align canonical URLs with object keys. Default is `false`. + +url +: (`string`) The [destination URL](#destination-urls) for deployment. + +## Matchers + +A Matcher represents a configuration to be applied to files whose paths match +the specified pattern. + +cacheControl +: (`string`) The caching attributes to use when serving the blob. See [details][cacheControl]. + +contentEncoding +: (`string`) The encoding used for the blob's content, if any. See [details][contentEncoding]. + +contentType +: (`string`) The media type of the blob being written. See [details][contentType]. + +force +: (`bool`) Whether matching files should be re-uploaded. Useful when other route-determined metadata (e.g., `contentType`) has changed. Default is `false`. + +gzip +: (`bool`) Whether the file should be gzipped before upload. If so, the `ContentEncoding` field will automatically be set to `gzip`. Default is `false`. + +pattern +: (`string`) An [RE2] regular expression used to match paths. Paths are converted to use forward slashes (`/`) before matching. + +[cacheControl]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control +[contentEncoding]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding +[contentType]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type + +## Destination URLs + +Service|URL example +:--|:-- +Amazon Simple Storage Service (S3)|`s3://my-bucket?region=us-west-1` +Azure Blob Storage|`azblob://my-container` +Google Cloud Storage (GCS)|`gs://my-bucket` + +With Google Cloud Storage you can target a subdirectory: + +```text +gs://my-bucket?prefix=a/subdirectory +``` + +You can also to deploy to storage servers compatible with Amazon S3 such as: + +- [Ceph] +- [MinIO] +- [SeaweedFS] + +[Ceph]: https://ceph.com/ +[Minio]: https://www.minio.io/ +[SeaweedFS]: https://github.com/chrislusf/seaweedfs + +For example, the `url` for a MinIO deployment target might resemble this: + +```text +s3://my-bucket?endpoint=https://my.minio.instance&awssdk=v2&use_path_style=true&disable_https=false +``` + +## Example + +{{< code-toggle file=hugo >}} +[deployment] + order = ['.jpg$', '.gif$'] + [[deployment.matchers]] + cacheControl = 'max-age=31536000, no-transform, public' + gzip = true + pattern = '^.+\.(js|css|svg|ttf)$' + [[deployment.matchers]] + cacheControl = 'max-age=31536000, no-transform, public' + gzip = false + pattern = '^.+\.(png|jpg)$' + [[deployment.matchers]] + contentType = 'application/xml' + gzip = true + pattern = '^sitemap\.xml$' + [[deployment.matchers]] + gzip = true + pattern = '^.+\.(html|xml|json)$' + [[deployment.targets]] + url = 's3://my_production_bucket?region=us-west-1' + cloudFrontDistributionID = 'E1234567890ABCDEF0' + exclude = '**.{heic,psd}' + name = 'production' + [[deployment.targets]] + url = 's3://my_staging_bucket?region=us-west-1' + exclude = '**.{heic,psd}' + name = 'staging' +{{< /code-toggle >}} diff --git a/content/en/configuration/front-matter.md b/content/en/configuration/front-matter.md new file mode 100644 index 000000000..9f51b8a5a --- /dev/null +++ b/content/en/configuration/front-matter.md @@ -0,0 +1,91 @@ +--- +title: Configure front matter +linkTitle: Front matter +description: Configure front matter. +categories: [] +keywords: [] +--- + +## Dates + +There are four methods on a `Page` object that return a date. + +Method|Description +:--|:-- +[`Date`]|Returns the date of the given page. +[`ExpiryDate`]|Returns the expiry date of the given page. +[`Lastmod`]|Returns the last modification date of the given page. +[`PublishDate`]|Returns the publish date of the given page. + +[`Date`]: /methods/page/date +[`ExpiryDate`]: /methods/page/expirydate +[`Lastmod`]: /methods/page/lastmod +[`PublishDate`]: /methods/page/publishdate + +Hugo determines the values to return based on this configuration: + +{{< code-toggle config=frontmatter />}} + +The `ExpiryDate` method, for example, returns the `expirydate` value if it exists, otherwise it returns `unpublishdate`. + +You can also use custom date parameters: + +{{< code-toggle file=hugo >}} +[frontmatter] +date = ["myDate", "date"] +{{< /code-toggle >}} + +In the example above, the `Date` method returns the `myDate` value if it exists, otherwise it returns `date`. + +To fall back to the default sequence of dates, use the `:default` token: + +{{< code-toggle file=hugo >}} +[frontmatter] +date = ["myDate", ":default"] +{{< /code-toggle >}} + +In the example above, the `Date` method returns the `myDate` value if it exists, otherwise it returns the first valid date from `date`, `publishdate`, `pubdate`, `published`, `lastmod`, and `modified`. + +## Aliases + +Some of the front matter fields have aliases. + +Front matter field|Aliases +:--|:-- +`expiryDate`|`unpublishdate` +`lastmod`|`modified` +`publishDate`|`pubdate`, `published` + +The default front matter configuration includes these aliases. + +## Tokens + +Hugo provides several [tokens](g) to assist with front matter configuration. + +Token|Description +:--|:-- +`:default`|The default ordered sequence of date fields. +`:fileModTime`|The file's last modification timestamp. +`:filename`|The date from the file name, if present. +`:git`|The Git author date for the file's last revision. + +When Hugo extracts a date from a file name, it uses the rest of the file name to generate the page's [`slug`], but only if a slug isn't already specified in the page's front matter. For example, given the name `2025-02-01-article.md`, Hugo will set the `date` to `2025-02-01` and the `slug` to `article`. + +[`slug`]: /content-management/front-matter/#slug + +To enable access to the Git author date, set [`enableGitInfo`] to `true`, or use\ +the `--enableGitInfo` flag when building your site. + +[`enableGitInfo`]: /configuration/all/#enablegitinfo + +Consider this example: + +{{< code-toggle file=hugo >}} +[frontmatter] +date = [':filename', ':default'] +lastmod = ['lastmod', ':fileModTime'] +{{< /code-toggle >}} + +To determine `date`, Hugo tries to extract the date from the file name, falling back to the default ordered sequence of date fields. + +To determine `lastmod`, Hugo looks for a `lastmod` field in front matter, falling back to the file's last modification timestamp. diff --git a/content/en/configuration/http-cache.md b/content/en/configuration/http-cache.md new file mode 100644 index 000000000..bbd092946 --- /dev/null +++ b/content/en/configuration/http-cache.md @@ -0,0 +1,111 @@ +--- +title: Configure the HTTP cache +linkTitle: HTTP cache +description: Configure the HTTP cache. +categories: [] +keywords: [] +--- + +{{< note >}} +This configuration is only relevant when using the [`resources.GetRemote`] function. + +[`resources.GetRemote`]: /functions/resources/getremote/ +{{< /note >}} + +## Layered caching + +Hugo employs a layered caching system. + +```goat {.w-40} + .-----------. +| dynacache | + '-----+-----' + | + v + .----------. +| HTTP cache | + '-----+----' + | + v + .----------. +| file cache | + '-----+----' +``` + +Dynacache +: An in-memory cache employing a Least Recently Used (LRU) eviction policy. Entries are removed from the cache when changes occur, when they match [cache-busting] patterns, or under low-memory conditions. + +HTTP Cache +: An HTTP cache for remote resources as specified in [RFC 9111]. Optimal performance is achieved when resources include appropriate HTTP cache headers. The HTTP cache utilizes the file cache for storage and retrieval of cached resources. + +File cache +: See [configure file caches]. + +[cache-busting]: /configuration/build/#cache-busters +[RFC 9111]: https://datatracker.ietf.org/doc/html/rfc9111 +[configure file caches]: /configuration/caches/ + +The HTTP cache involves two key aspects: determining which content to cache (the caching process itself) and defining the frequency with which to check for updates (the polling strategy). + +## HTTP caching + +The HTTP cache behavior is defined for a configured set of resources. Stale resources will be refreshed from the file cache, even if their configured Time-To-Live (TTL) has not expired. If HTTP caching is disabled for a resource, Hugo will bypass the cache and access the file directly. + +The default configuration disables everything: + +{{< code-toggle file=hugo >}} +[HTTPCache.cache.for] +excludes = ['**'] +includes = [] +{{< /code-toggle >}} + +cache.for.excludes +: (`string`) A list of [glob](g) patterns to exclude from caching. + +cache.for.includes +: (`string`) A list of [glob](g) patterns to cache. + +## HTTP polling + +Polling is used in watch mode (e.g., `hugo server`) to detect changes in remote resources. Polling can be enabled even if HTTP caching is disabled. Detected changes trigger a rebuild of pages using the affected resource. Polling can be disabled for specific resources, typically those known to be static. + +The default configuration disables everything: + +{{< code-toggle file=hugo >}} +[[HTTPCache.polls]] +disable = true +high = '0s' +low = '0s' +[HTTPCache.polls.for] +includes = ['**'] +excludes = [] +{{< /code-toggle >}} + +polls +: A slice of polling configurations. + +polls.disable +: (`bool`) Whether to disable polling for this configuration. + +polls.low +: (`string`) The minimum polling interval expressed as a [duration](g). This is used after a recent change and gradually increases towards `polls.high`. + +polls.high +: (`string`) The maximum polling interval expressed as a [duration](g). This is used when the resource is considered stable. + +polls.for.excludes +: (`string`) A list of [glob](g) patterns to exclude from polling for this configuration. + +polls.for.includes +: (`string`) A list of [glob](g) patterns to include in polling for this configuration. + + +## Behavior + +Polling and HTTP caching interact as follows: + +- With polling enabled, rebuilds are triggered only by actual changes, detected via `eTag` changes (Hugo generates an MD5 hash if the server doesn't provide one). +- If polling is enabled but HTTP caching is disabled, the remote is checked for changes only after the file cache's TTL expires (e.g., a `maxAge` of `10h` with a `1s` polling interval is inefficient). +- If both polling and HTTP caching are enabled, changes are checked for even before the file cache's TTL expires. Cached `eTag` and `last-modified` values are sent in `if-none-match` and `if-modified-since` headers, respectively, and a cached response is returned on HTTP [304]. + +[304]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304 diff --git a/content/en/configuration/imaging.md b/content/en/configuration/imaging.md new file mode 100644 index 000000000..021e82ecf --- /dev/null +++ b/content/en/configuration/imaging.md @@ -0,0 +1,68 @@ +--- +title: Configure imaging +linkTitle: Imaging +description: Configure imaging. +categories: [] +keywords: [] +--- + +## Processing options + +These are the default settings for processing images: + +{{< code-toggle file=hugo >}} +[imaging] +anchor = 'Smart' +bgColor = '#ffffff' +hint = 'photo' +quality = 75 +resampleFilter = 'box' +{{< /code-toggle >}} + + +anchor +: (`string`) When using the Crop or Fill method, the anchor determines the placement of the crop box. One of `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. Default is `Smart`. + +bgColor +: (`string`) The background color of the resulting image. Applicable when converting from a format that supports transparency to a format that does not support transparency, for example, when converting from PNG to JPEG. Expressed as an RGB [hexadecimal] value. Default is `#ffffff`. + +[hexadecimal]: https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color + +hint +: (`string`) Applicable to WebP images, this option corresponds to a set of predefined encoding parameters. One of `drawing`, `icon`, `photo`, `picture`, or `text`. Default is `photo`. See [details](/content-management/image-processing/#hint). + +quality +: (`int`) Applicable to JPEG and WebP images, this value determines the quality of the converted image. Higher values produce better quality images, while lower values produce smaller files. Set this value to a whole number between `1` and `100`, inclusive. Default is `75`. + +resampleFilter +: (`string`) The resampling filter used when resizing an image. Default is `box`. See [details](/content-management/image-processing/#resampling-filter) + +## EXIF data + +These are the default settings for extracting EXIF data from images: + +{{< code-toggle file=hugo >}} +[imaging.exif] +includeFields = "" +excludeFields = "" +disableDate = false +disableLatLong = false +{{< /code-toggle >}} + +disableDate +: (`bool`) Whether to disable extraction of the image creation date/time. Default is `false`. + +disableLatLong +: (`bool`) Whether to disable extraction of the GPS latitude and longitude. Default is `false`. + +excludeFields +: (`string`) A regular expression matching the tags to exclude when extracting EXIF data. + +includeFields +: (`string`) A regular expression matching the tags to include when extracting EXIF data. To include all available tags, set this value to `".*"`. + +{{< note >}} +To improve performance and decrease cache size, Hugo excludes the following tags: `ColorSpace`, `Contrast`, `Exif`, `Exposure[M|P|B]`, `Flash`, `GPS`, `JPEG`, `Metering`, `Resolution`, `Saturation`, `Sensing`, `Sharp`, and `WhiteBalance`. + +To control tag availability, change the `excludeFields` or `includeFields` settings as described above. +{{< /note >}} diff --git a/content/en/configuration/introduction.md b/content/en/configuration/introduction.md new file mode 100644 index 000000000..82cca48bb --- /dev/null +++ b/content/en/configuration/introduction.md @@ -0,0 +1,294 @@ +--- +title: Introduction +description: Configure your site using files, directories, and environment variables. +categories: [] +keywords: [] +weight: 10 +--- + +## Sensible defaults + +Hugo offers many configuration options, but its defaults are often sufficient. A new site requires only these settings: + +{{< code-toggle file=hugo >}} +baseURL = 'https://example.org/' +languageCode = 'en-us' +title = 'My New Hugo Site' +{{< /code-toggle >}} + +Only define settings that deviate from the defaults. A smaller configuration file is easier to read, understand, and debug. Keep your configuration concise. + +{{< note >}} +The best configuration file is a short configuration file. +{{< /note >}} + +## Configuration file + +Create a site configuration file in the root of your project directory, naming it `hugo.toml`, `hugo.yaml`, or `hugo.json`, with that order of precedence. + +```text +my-project/ +└── hugo.toml +``` + +{{< note >}} +For versions v0.109.0 and earlier, the site configuration file was named `config`. While you can still use this name, it's recommended to switch to the newer naming convention, `hugo`. +{{< /note >}} + +A simple example: + +{{< code-toggle file=hugo >}} +baseURL = 'https://example.org/' +languageCode = 'en-us' +title = 'ABC Widgets, Inc.' +[params] +subtitle = 'The Best Widgets on Earth' +[params.contact] +email = 'info@example.org' +phone = '+1 202-555-1212' +{{< /code-toggle >}} + +To use a different configuration file when building your site, use the `--config` flag: + +```sh +hugo --config other.toml +``` + +Combine two or more configuration files, with left-to-right precedence: + +```sh +hugo --config a.toml,b.yaml,c.json +``` + +{{< note >}} +See the specifications for each file format: [TOML], [YAML], and [JSON]. + +[TOML]: https://toml.io/en/latest +[YAML]: https://yaml.org/spec/ +[JSON]: https://datatracker.ietf.org/doc/html/rfc7159 +{{< /note >}} + +## Configuration directory + +Instead of a single site configuration file, split your configuration by [environment](g), root configuration key, and language. For example: + +```text +my-project/ +└── config/ + ├── _default/ + │ ├── hugo.toml + │ ├── menus.en.toml + │ ├── menus.de.toml + │ └── params.toml + └── production/ + └── params.toml +``` + +The root configuration keys are {{< root-configuration-keys >}}. + +### Omit the root key + +When splitting the configuration by root key, omit the root key in the component file. For example, these are equivalent: + +{{< code-toggle file=config/_default/hugo >}} +[params] +foo = 'bar' +{{< /code-toggle >}} + +{{< code-toggle file=config/_default/params >}} +foo = 'bar' +{{< /code-toggle >}} + +### Recursive parsing + +Hugo parses the `config` directory recursively, allowing you to organize the files into subdirectories. For example: + +```text +my-project/ +└── config/ + └── _default/ + ├── navigation/ + │ ├── menus.de.toml + │ └── menus.en.toml + └── hugo.toml +``` + +### Example + +```text +my-project/ +└── config/ + ├── _default/ + │ ├── hugo.toml + │ ├── menus.en.toml + │ ├── menus.de.toml + │ └── params.toml + ├── production/ + │ ├── hugo.toml + │ └── params.toml + └── staging/ + ├── hugo.toml + └── params.toml +``` + +Considering the structure above, when running `hugo --environment staging`, Hugo will use every setting from `config/_default` and merge `staging`'s on top of those. + +Let's take an example to understand this better. Let's say you are using Google Analytics for your website. This requires you to specify a [Google tag ID] in your site configuration: + +[Google tag ID]: https://support.google.com/tagmanager/answer/12326985?hl=en + +{{< code-toggle file=hugo >}} +[services.googleAnalytics] +ID = 'G-XXXXXXXXX' +{{< /code-toggle >}} + +Now consider the following scenario: + +1. You don't want to load the analytics code when running `hugo server`. +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 + +To satisfy these requirements, configure your site as follows: + +1. `config/_default/hugo.toml` + - Exclude the `services.googleAnalytics` section. This will prevent loading of the analytics code when you run `hugo server`. + - By default, Hugo sets its `environment` to `development` when running `hugo server`. In the absence of a `config/development` directory, Hugo uses the `config/_default` directory. +1. `config/production/hugo.toml` + - Include this section only: + + {{< code-toggle file=hugo >}} + [services.googleAnalytics] + ID = 'G-PPPPPPPPP' + {{< /code-toggle >}} + + - You do not need to include other parameters in this file. Include only those parameters that are specific to your production environment. Hugo will merge these parameters with the default configuration. + - By default, Hugo sets its `environment` to `production` when running `hugo`. The analytics code will use the `G-PPPPPPPPP` tag ID. + +1. `config/staging/hugo.toml` + + - Include this section only: + + {{< code-toggle file=hugo >}} + [services.googleAnalytics] + ID = 'G-SSSSSSSSS' + {{< /code-toggle >}} + + - You do not need to include other parameters in this file. Include only those parameters that are specific to your staging environment. Hugo will merge these parameters with the default configuration. + - To build your staging site, run `hugo --environment staging`. The analytics code will use the `G-SSSSSSSSS` tag ID. + +## Merge configuration settings + +Hugo merges configuration settings from themes and modules, prioritizing the project's own settings. Given this simplified project structure with two themes: + +```text +project/ +├── themes/ +│ ├── theme-a/ +│ │ └── hugo.toml +│ └── theme-b/ +│ └── hugo.toml +└── hugo.toml +``` + +and this project-level configuration: + +{{< code-toggle file=hugo >}} +baseURL = 'https://example.org/' +languageCode = 'en-us' +title = 'My New Hugo Site' +theme = ['theme-a','theme-b'] +{{< /code-toggle >}} + +Hugo merges settings in this order: + +1. Project configuration (`hugo.toml` in the project root) +1. `theme-a` configuration +1. `theme-b` configuration + +The `_merge` setting within each top-level configuration key controls _which_ settings are merged and _how_ they are merged. + +The value for `_merge` can be one of: + +none +: No merge. + +shallow +: Only add values for new keys. + +deep +: Add values for new keys, merge existing. + +Note that you don't need to be so verbose as in the default setup below; a `_merge` value higher up will be inherited if not set. + +{{< code-toggle file=hugo dataKey="config_helpers.mergeStrategy" skipHeader=true />}} + +## Environment variables + +You can also configure settings using operating system environment variables: + +```sh +export HUGO_BASEURL=https://example.org/ +export HUGO_ENABLEGITINFO=true +export HUGO_ENVIRONMENT=staging +hugo +``` + +The above sets the [`baseURL`], [`enableGitInfo`], and [`environment`] configuration options and then builds your site. + +[`baseURL`]: /configuration/all#baseurl +[`enableGitInfo`]: /configuration/all#enablegitinfo +[`environment`]: /configuration/all#environment + +{{< note >}} +An environment variable takes precedence over the values set in the configuration file. This means that if you set a configuration value with both an environment variable and in the configuration file, the value in the environment variable will be used. +{{< /note >}} + +Environment variables simplify configuration for CI/CD deployments like GitHub Pages, GitLab Pages, and Netlify by allowing you to set values directly within their respective configuration and workflow files. + +[CI/CD]: https://en.wikipedia.org/wiki/CI/CD + +{{< note >}} +Environment variable names must be prefixed with `HUGO_`. + +To set custom site parameters, prefix the name with `HUGO_PARAMS_`. +{{< /note >}} + +For snake_case variable names, the standard `HUGO_` prefix won't work. Hugo infers the delimiter from the first character following `HUGO`. This allows for variations like `HUGOxPARAMSxAPI_KEY=abcdefgh` using any [permitted delimiter]. + +[permitted delimiter]: https://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap08.html + +In addition to configuring standard settings, environment variables may be used to override default values for certain internal settings: + +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_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`. + +HUGO_MEMORYLIMIT +: {{< new-in 0.123.0 />}} +: (`int`) The maximum amount of system memory, in gigabytes, that Hugo can use while rendering your site. Default is 25% of total system memory. + +HUGO_NUMWORKERMULTIPLIER +: (`int`) The number of workers used in parallel processing. Default is the number of logical CPUs. + +## Current configuration + +Display the complete site configuration with: + +```sh +hugo config +``` + +Display a specific configuration setting with: + +```sh +hugo config | grep [key] +``` + +Display the configured file mounts with: + +```sh +hugo config mounts +``` diff --git a/content/en/configuration/languages.md b/content/en/configuration/languages.md new file mode 100644 index 000000000..348f545e6 --- /dev/null +++ b/content/en/configuration/languages.md @@ -0,0 +1,199 @@ +--- +title: Configure languages +linkTitle: Languages +description: Configure the languages in your multilingual site. +categories: [] +keywords: [] +--- + +## Base settings + +Configure the following base settings within the site's root configuration: + +{{< code-toggle file=hugo >}} +defaultContentLanguage = 'en' +defaultContentLanguageInSubdir = false +disableDefaultLanguageRedirect = false +disableLanguages = [] +{{< /code-toggle >}} + +defaultContentLanguage +: (`string`) The project's default language key, conforming to the syntax described in [RFC 5646]. This value must match one of the defined [language keys](#language-keys). Default is `en`. + +defaultContentLanguageInSubdir +: (`bool`) Whether to publish the default language site to a subdirectory matching the `defaultContentLanguage`. Default is `false`. + +disableDefaultLanguageRedirect +: {{< new-in 0.140.0 />}} +: (`bool`) Whether to disable generation of the alias redirect to the default language when `DefaultContentLanguageInSubdir` is `true`. Default is `false`. + +disableLanguages +: (`[]string]`) A slice of language keys representing the languages to disable during the build process. Although this is functional, consider using the [`disabled`](#disabled) key under each language instead. + +[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1 + +## Language settings + +Configure each language under the `languages` key: + +{{< code-toggle config=languages />}} + +In the above, `en` is the [language key](#language-keys). + +disabled +: (`bool`) Whether to disable this language when building the site. Default is `false`. + +languageCode +: (`string`) The language tag as described in [RFC 5646]. This value does not affect localization or URLs. Hugo uses this value to populate: + + - The `lang` attribute of the `html` element in the [built-in alias template] + - The `language` element in the [built-in RSS template] + - The `locale` property in the [built-in OpenGraph template] + + Access this value from a template using the [`Language.LanguageCode`] method on a `Site` or `Page` object. + +languageDirection +: (`string`) The language direction, either left-to-right (`ltr`) or right-to-left (`rtl`). Use this value in your templates with the global [`dir`] HTML attribute. Access this value from a template using the [`Language.LanguageDirection`] method on a `Site` or `Page` object. + +languageName +: (`string`) The language name, typically used when rendering a language switcher. Access this value from a template using the [`Language.LanguageName`] method on a `Site` or `Page` object. + +title +: (`string`) The site title for this language. Access this value from a template using the [`Title`] method on a `Site` object. + +weight +: (`int`) The language [weight](g). When set to a non-zero value, this is the primary sort criteria for this language. Access this value from a template using the [`Language.Weight`] method on a `Site` or `Page` object. + +[`Language.LanguageCode`]: /methods/site/language/#languagecode +[`Language.LanguageDirection`]: /methods/site/language/#languagedirection +[`Language.LanguageName`]: /methods/site/language/#languagename +[`Language.Weight`]: /methods/site/language/#weight +[`Title`]: /methods/site/title/ +[`dir`]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir +[built-in OpenGraph template]: {{% eturl opengraph %}} +[built-in RSS template]: {{% eturl rss %}} +[built-in alias template]: {{% eturl alias %}} + +## Localized settings + +Some configuration settings can be defined separately for each language. For example: + +{{< code-toggle file=hugo >}} +[languages.en] +languageCode = 'en-US' +languageName = 'English' +weight = 1 +title = 'Project Documentation' +timeZone = 'America/New_York' +[languages.en.pagination] +path = 'page' +[languages.en.params] +subtitle = 'Reference, Tutorials, and Explanations' +{{< /code-toggle >}} + +The following configuration keys can be defined separately for each language: + +{{< per-lang-config-keys >}} + +Any key not defined in a `languages` object will fall back to the global value in the root of the site configuration. + +## Language keys + +Language keys must conform to the syntax described in [RFC 5646]. For example: + +{{< code-toggle file=hugo >}} +defaultContentLanguage = 'de' +[languages.de] + weight = 1 +[languages.en-US] + weight = 2 +[languages.pt-BR] + weight = 3 +{{< /code-toggle >}} + +Artificial languages with private use subtags as defined in [RFC 5646 § 2.2.7] are also supported. Omit the `art-x-` prefix from the language key. For example: + +{{< code-toggle file=hugo >}} +defaultContentLanguage = 'en' +[languages.en] +weight = 1 +[languages.hugolang] +weight = 2 +{{< /code-toggle >}} + +{{< note >}} +Private use subtags must not exceed 8 alphanumeric characters. +{{< /note >}} + +[RFC 5646 § 2.2.7]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.2.7 + +## Example + +{{< code-toggle file=hugo >}} +defaultContentLanguage = 'de' +defaultContentLanguageInSubdir = true +disableDefaultLanguageRedirect = false + +[languages.de] +contentDir = 'content/de' +disabled = false +languageCode = 'de-DE' +languageDirection = 'ltr' +languageName = 'Deutsch' +title = 'Projekt Dokumentation' +weight = 1 + +[languages.de.params] +subtitle = 'Referenz, Tutorials und Erklärungen' + +[languages.en] +contentDir = 'content/en' +disabled = false +languageCode = 'en-US' +languageDirection = 'ltr' +languageName = 'English' +title = 'Project Documentation' +weight = 2 + +[languages.en.params] +subtitle = 'Reference, Tutorials, and Explanations' +{{< /code-toggle >}} + +{{< note >}} +In the example above, omit `contentDir` if [translating by file name]. + +[translating by file name]: /content-management/multilingual/#translation-by-file-name +{{< /note >}} + +## Multihost + +Hugo supports multiple languages in a multihost configuration. This means you can configure a `baseURL` per `language`. + +{{< note >}} +If you define a `baseURL` for one language, you must define a unique `baseURL` for all languages. +{{< /note >}} + +For example: + +{{< code-toggle file=hugo >}} +defaultContentLanguage = 'fr' +[languages] + [languages.en] + baseURL = 'https://en.example.org/' + languageName = 'English' + title = 'In English' + weight = 2 + [languages.fr] + baseURL = 'https://fr.example.org' + languageName = 'Français' + title = 'En Français' + weight = 1 +{{}} + +With the above, Hugo publishes two sites, each with their own root: + +```text +public +├── en +└── fr +``` diff --git a/content/en/configuration/markup.md b/content/en/configuration/markup.md new file mode 100644 index 000000000..4a46e5ba0 --- /dev/null +++ b/content/en/configuration/markup.md @@ -0,0 +1,355 @@ +--- +title: Configure markup +linkTitle: Markup +description: Configure markup. +categories: [] +keywords: [] +aliases: [/getting-started/configuration-markup/] +--- + +## Default handler + +In its default configuration, Hugo uses [Goldmark] to render Markdown to HTML. + +{{< code-toggle file=hugo >}} +[markup] +defaultMarkdownHandler = 'goldmark' +{{< /code-toggle >}} + +Files with ending with `.md`, `.mdown`, or `.markdown` are processed as Markdown, unless you've explicitly set a different format using the `markup` field in your front matter. + +To use a different renderer for Markdown files, specify one of `asciidocext`, `org`, `pandoc`, or `rst` in your site configuration. + +`defaultMarkdownHandler`|Renderer +:--|:-- +`asciidocext`|[AsciiDoc] +`goldmark`|[Goldmark] +`org`|[Emacs Org Mode] +`pandoc`|[Pandoc] +`rst`|[reStructuredText] + +To use AsciiDoc, Pandoc, or reStructuredText you must install the relevant renderer and update your [security policy]. + +{{< note >}} +Unless you need a unique capability provided by one of the alternative Markdown handlers, we strongly recommend that you use the default setting. Goldmark is fast, well maintained, conforms to the [CommonMark] specification, and is compatible with [GitHub Flavored Markdown] (GFM). + +[commonmark]: https://spec.commonmark.org/0.30/ +[github flavored markdown]: https://github.github.com/gfm/ +{{< /note >}} + +[asciidoc]: https://asciidoc.org/ +[content format]: /content-management/formats/#formats +[emacs org mode]: https://orgmode.org/ +[goldmark]: https://github.com/yuin/goldmark/ +[pandoc]: https://pandoc.org/ +[restructuredtext]: https://docutils.sourceforge.io/rst.html +[security policy]: /configuration/security/ + +## Goldmark + +This is the default configuration for the Goldmark Markdown renderer: + +{{< code-toggle config=markup.goldmark />}} + +### Extensions + +The extensions below, excluding Extras and Passthrough, are enabled by default. + +Extension|Documentation|Enabled +:--|:--|:-: +`cjk`|[Goldmark Extensions: CJK]|:heavy_check_mark: +`definitionList`|[PHP Markdown Extra: Definition lists]|:heavy_check_mark: +`extras`|[Hugo Goldmark Extensions: Extras]|| +`footnote`|[PHP Markdown Extra: Footnotes]|:heavy_check_mark: +`linkify`|[GitHub Flavored Markdown: Autolinks]|:heavy_check_mark: +`passthrough`|[Hugo Goldmark Extensions: Passthrough]|| +`strikethrough`|[GitHub Flavored Markdown: Strikethrough]|:heavy_check_mark: +`table`|[GitHub Flavored Markdown: Tables]|:heavy_check_mark: +`taskList`|[GitHub Flavored Markdown: Task list items]|:heavy_check_mark: +`typographer`|[Goldmark Extensions: Typographer]|:heavy_check_mark: + +[GitHub Flavored Markdown: Autolinks]: https://github.github.com/gfm/#autolinks-extension- +[GitHub Flavored Markdown: Strikethrough]: https://github.github.com/gfm/#strikethrough-extension- +[GitHub Flavored Markdown: Tables]: https://github.github.com/gfm/#tables-extension- +[GitHub Flavored Markdown: Task list items]: https://github.github.com/gfm/#task-list-items-extension- +[Goldmark Extensions: CJK]: https://github.com/yuin/goldmark?tab=readme-ov-file#cjk-extension +[Goldmark Extensions: Typographer]: https://github.com/yuin/goldmark?tab=readme-ov-file#typographer-extension +[Hugo Goldmark Extensions: Extras]: https://github.com/gohugoio/hugo-goldmark-extensions?tab=readme-ov-file#extras-extension +[Hugo Goldmark Extensions: Passthrough]: https://github.com/gohugoio/hugo-goldmark-extensions?tab=readme-ov-file#passthrough-extension +[PHP Markdown Extra: Definition lists]: https://michelf.ca/projects/php-markdown/extra/#def-list +[PHP Markdown Extra: Footnotes]: https://michelf.ca/projects/php-markdown/extra/#footnotes + +#### Extras + +{{< new-in 0.126.0 />}} + +Enable [deleted text], [inserted text], [mark text], [subscript], and [superscript] elements in Markdown. + +Element|Markdown|Rendered +:--|:--|:-- +Deleted text|`~~foo~~`|`foo` +Inserted text|`++bar++`|`bar` +Mark text|`==baz==`|`baz` +Subscript|`H~2~O`|`H2O` +Superscript|`1^st^`|`1st` + +[deleted text]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del +[inserted text]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins +[mark text]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark +[subscript]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sub +[superscript]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sup + +To avoid a conflict when enabling the "subscript" feature of the Extras extension, if you want to render subscript and strikethrough text concurrently you must: + +1. Disable the Strikethrough extension +1. Enable the "deleted text" feature of the Extras extension + +For example: + +{{< code-toggle file=hugo >}} +[markup.goldmark.extensions] +strikethrough = false + +[markup.goldmark.extensions.extras.delete] +enable = true + +[markup.goldmark.extensions.extras.subscript] +enable = true +{{< /code-toggle >}} + +#### Passthrough + +{{< new-in 0.122.0 />}} + +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/ + +#### Typographer + +The Typographer extension replaces certain character combinations with HTML entities as specified below: + +Markdown|Replaced by|Description +:--|:--|:-- +`...`|`…`|horizontal ellipsis +`'`|`’`|apostrophe +`--`|`–`|en dash +`---`|`—`|em dash +`«`|`«`|left angle quote +`“`|`“`|left double quote +`‘`|`‘`|left single quote +`»`|`»`|right angle quote +`”`|`”`|right double quote +`’`|`’`|right single quote + +### Settings explained + +Most of the Goldmark settings above are self-explanatory, but some require explanation. + +duplicateResourceFiles +: {{< new-in 0.123.0 />}} +: (`bool`) Whether to duplicate shared page resources for each language on multilingual single-host sites. See [multilingual page resources] for details. Default is `false`. + + {{< note >}} + With multilingual single-host sites, setting this parameter to `false` will enable Hugo's [embedded link render hook] and [embedded image render hook]. This is the default configuration for multilingual single-host sites. + + [embedded image render hook]: /render-hooks/images/#default + [embedded link render hook]: /render-hooks/links/#default + {{< /note >}} + +parser.wrapStandAloneImageWithinParagraph +: (`bool`) Whether to wrap image elements without adjacent content within a `p` element when rendered. This is the default Markdown behavior. Set to `false` when using an [image render hook] to render standalone images as `figure` elements. Default is `true`. + +parser.autoDefinitionTermID +: {{< new-in 0.144.0 />}} +: (`bool`) Whether to automatically add `id` attributes to description list terms (i.e., `dt` elements). When `true`, the `id` attribute of each `dt` element is accessible through the [`Fragments.Identifiers`] method on a `Page` object. + +parser.autoHeadingID +: (`bool`) Whether to automatically add `id` attributes to headings (i.e., `h1`, `h2`, `h3`, `h4`, `h5`, and `h6` elements). + +parser.autoIDType +: (`string`) The strategy used to automatically generate `id` attributes, one of `github`, `github-ascii` or `blackfriday`. + + - `github` produces GitHub-compatible `id` attributes + - `github-ascii` drops any non-ASCII characters after accent normalization + - `blackfriday` produces `id` attributes compatible with the Blackfriday Markdown renderer + + This is also the strategy used by the [anchorize](/functions/urls/anchorize) template function. Default is `github`. + +parser.attribute.block +: (`bool`) Whether to enable [Markdown attributes] for block elements. Default is `false`. + +parser.attribute.title +: (`bool`) Whether to enable [Markdown attributes] for headings. Default is `true`. + +renderHooks.image.enableDefault +: {{< new-in 0.123.0 />}} +: (`bool`) Whether to enable the [embedded image render hook]. Default is `false`. + + {{< note >}} + The embedded image render hook is automatically enabled for multilingual single-host sites if [duplication of shared page resources] is disabled. This is the default configuration for multilingual single-host sites. + + [duplication of shared page resources]: /configuration/markup/#duplicateresourcefiles + {{< /note >}} + +renderHooks.link.enableDefault +: {{< new-in 0.123.0 />}} +: (`bool`) Whether to enable the [embedded link render hook]. Default is `false`. + + {{< note >}} + The embedded link render hook is automatically enabled for multilingual single-host sites if [duplication of shared page resources] is disabled. This is the default configuration for multilingual single-host sites. + + [duplication of shared page resources]: /configuration/markup/#duplicateresourcefiles + {{< /note >}} + +renderer.hardWraps +: (`bool`) Whether to replace newline characters within a paragraph with `br` elements. Default is `false`. + +renderer.unsafe +: (`bool`) Whether to render raw HTML mixed within Markdown. This is unsafe unless the content is under your control. Default is `false`. + +[Markdown attributes]: /content-management/markdown-attributes/ +[embedded image render hook]: /render-hooks/images/#default +[embedded link render hook]: /render-hooks/links/#default +[image render hook]: /render-hooks/images/ +[multilingual page resources]: /content-management/page-resources/#multilingual +[`Fragments.Identifiers`]: /methods/page/fragments/#identifiers +## AsciiDoc + +This is the default configuration for the AsciiDoc renderer: + +{{< code-toggle config=markup.asciidocExt />}} + +### Settings explained + +attributes +: (`map`) A map of key-value pairs, each a document attribute. See Asciidoctor's [attributes]. + +backend +: (`string`) The backend output file format. Default is `html5`. + +extensions +: (`string array`) An array of enabled extensions, one or more of `asciidoctor-html5s`, `asciidoctor-bibtex`, `asciidoctor-diagram`, `asciidoctor-interdoc-reftext`, `asciidoctor-katex`, `asciidoctor-latex`, `asciidoctor-mathematical`, or `asciidoctor-question`. + + {{< note >}} + To mitigate security risks, entries in the extension array may not contain forward slashes (`/`), backslashes (`\`), or periods. Due to this restriction, extensions must be in Ruby's `$LOAD_PATH`. + {{< /note >}} + +failureLevel +: (`string`) The minimum logging level that triggers a non-zero exit code (failure). Default is `fatal`. + +noHeaderOrFooter +: (`bool`) Whether to output an embeddable document, which excludes the header, the footer, and everything outside the body of the document. Default is `true`. + +preserveTOC +: (`bool`) Whether to preserve the table of contents (TOC) rendered by Asciidoctor. By default, to make the TOC compatible with existing themes, Hugo removes the TOC rendered by Asciidoctor. To render the TOC, use the [`TableOfContents`] method on a `Page` object in your templates. Default is `false`. + +safeMode +: (`string`) The safe mode level, one of `unsafe`, `safe`, `server`, or `secure`. Default is `unsafe`. + +sectionNumbers +: (`bool`) Whether to number each section title. Default is `false`. + +trace +: (`bool`) Whether to include backtrace information on errors. Default is `false`. + +verbose +: (`bool`) Whether to verbosely print processing information and configuration file checks to stderr. Default is `false`. + +workingFolderCurrent +: (`bool`) Whether to set the working directory to be the same as that of the AsciiDoc file being processed, allowing [includes] to work with relative paths. Set to `true` to render diagrams with the [asciidoctor-diagram] extension. Default is `false`. + +[`TableOfContents`]: /methods/page/tableofcontents/ +[asciidoctor-diagram]: https://asciidoctor.org/docs/asciidoctor-diagram/ +[attributes]: https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#attributes-and-substitutions +[includes]: https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#includes + +### Configuration example + +{{< code-toggle file=hugo >}} +[markup.asciidocExt] + extensions = ["asciidoctor-html5s", "asciidoctor-diagram"] + workingFolderCurrent = true + [markup.asciidocExt.attributes] + my-base-url = "https://example.com/" + my-attribute-name = "my value" +{{< /code-toggle >}} + +### Syntax highlighting + +Follow the steps below to enable syntax highlighting. + +#### Step 1 + +Set the `source-highlighter` attribute in your site configuration. For example: + +{{< code-toggle file=hugo >}} +[markup.asciidocExt.attributes] +source-highlighter = 'rouge' +{{< /code-toggle >}} + +#### Step 2 + +Generate the highlighter CSS. For example: + +```text +rougify style monokai.sublime > assets/css/syntax.css +``` + +#### Step 3 + +In your base template add a link to the CSS file: + +{{< code file=layouts/_default/baseof.html >}} + + ... + {{ with resources.Get "css/syntax.css" }} + + {{ end }} + ... + +{{< /code >}} + +Then add the code to be highlighted to your markup: + +```text +[#hello,ruby] +---- +require 'sinatra' + +get '/hi' do + "Hello World!" +end +---- +``` + +### Troubleshooting + +Run `hugo --logLevel debug` to examine Hugo's call to the Asciidoctor executable: + +```txt +INFO 2019/12/22 09:08:48 Rendering book-as-pdf.adoc with C:\Ruby26-x64\bin\asciidoctor.bat using asciidoc args [--no-header-footer -r asciidoctor-html5s -b html5s -r asciidoctor-diagram --base-dir D:\prototypes\hugo_asciidoc_ddd\docs -a outdir=D:\prototypes\hugo_asciidoc_ddd\build -] ... +``` + +## Highlight + +This is the default configuration. + +{{< code-toggle config=markup.highlight />}} + +{{% include "/_common/syntax-highlighting-options.md" %}} + +## Table of contents + +This is the default configuration for the table of contents, applicable to Goldmark and Asciidoctor: + +{{< code-toggle config=markup.tableOfContents />}} + +startLevel +: (`int`) Heading levels less than this value will be excluded from the table of contents. For example, to exclude `h1` elements from the table of contents, set this value to `2`. Default is `2`. + +endLevel +: (`int`) Heading levels greater than this value will be excluded from the table of contents. For example, to exclude `h4`, `h5`, and `h6` elements from the table of contents, set this value to `3`. Default is `3`. + +ordered +: (`bool`) Whether to generates an ordered list instead of an unordered list. Default is `false`. diff --git a/content/en/configuration/media-types.md b/content/en/configuration/media-types.md new file mode 100644 index 000000000..f1b8f1020 --- /dev/null +++ b/content/en/configuration/media-types.md @@ -0,0 +1,83 @@ +--- +title: Configure media types +linkTitle: Media types +description: Configure media types. +categories: [] +keywords: [] +--- + +{{% glossary-term "media type" %}} + +Configured media types serve multiple purposes in Hugo, including the definition of [output formats](g). This is the default media type configuration in tabular form: + +{{< datatable "config" "mediaTypes" "_key" "suffixes" >}} + +The `suffixes` column in the table above shows the suffixes associated with each media type. For example, Hugo associates `.html` and `.htm` files with the `text/html` media type. + +{{< note >}} +The first suffix is the primary suffix. Use the primary suffix when naming template files. For example, when creating a template for an RSS feed, use the `xml` suffix. +{{< /note >}} + +## Default configuration + +The following is the default configuration that matches the table above: + +{{< code-toggle file=hugo config=mediaTypes />}} + +delimiter +: (`string`) The delimiter between the file name and the suffix. The delimiter, in conjunction with the suffix, forms the file extension. Default is `"."`. + +suffixes +: (`[]string`) The suffixes associated with this media type. The first suffix is the primary suffix. + +## Modify a media type + +You can modify any of the default media types. For example, to switch the primary suffix for `text/html` from `html` to `htm`: + +{{< code-toggle file=hugo >}} +[mediaTypes.'text/html'] +suffixes = ['htm','html'] +{{< /code-toggle >}} + +If you alter a default media type, you must also explicitly redefine all output formats that utilize that media type. For example, to ensure the changes above affect the `html` output format, redefine the `html` output format: + +{{< code-toggle file=hugo >}} +[outputFormats.html] +mediaType = 'text/html' +{{< /code-toggle >}} + +## Create a media type + +You can create new media types as needed. For example, to create a media type for an Atom feed: + +{{< code-toggle file=hugo >}} +[mediaTypes.'application/atom+xml'] +suffixes = ['atom'] +{{< /code-toggle >}} + +## Media types without suffixes + +Occasionally, you may need to create a media type without a suffix or delimiter. For example, [Netlify] recognizes configuration files named `_redirects` and `_headers`, which Hugo can generate using custom [output formats](g). + +To support these custom output formats, register a custom media type with no suffix or delimiter: + +{{< code-toggle file=hugo >}} +[mediaTypes."text/netlify"] +delimiter = "" +{{< /code-toggle >}} + +The custom output format definitions would look something like this: + +{{< code-toggle file=hugo >}} +[outputFormats.redir] +baseName = "_redirects" +isPlainText = true +mediatype = "text/netlify" +[outputFormats.headers] +baseName = "_headers" +isPlainText = true +mediatype = "text/netlify" +notAlternative = true +{{< /code-toggle >}} + +[Netlify]: https://www.netlify.com/ diff --git a/content/en/configuration/menus.md b/content/en/configuration/menus.md new file mode 100644 index 000000000..533ac9098 --- /dev/null +++ b/content/en/configuration/menus.md @@ -0,0 +1,138 @@ +--- +title: Configure menus +linkTitle: Menus +description: Centrally define menu entries for one or more menus. +categories: [] +keywords: [] +--- + +{{< note >}} +To understand Hugo's menu system, please refer to the [menus] page. + +[menus]: /content-management/menus/ +{{< /note >}} + +There are three ways to define menu entries: + +1. [Automatically] +1. [In front matter] +1. In site configuration + +This page covers the site configuration method. + +## Example + +To define entries for a "main" menu: + +{{< code-toggle file=hugo >}} +[[menus.main]] +name = 'Home' +pageRef = '/' +weight = 10 + +[[menus.main]] +name = 'Products' +pageRef = '/products' +weight = 20 + +[[menus.main]] +name = 'Services' +pageRef = '/services' +weight = 30 +{{< /code-toggle >}} + +This creates a menu structure that you can access with [`Menus`] method on a `Site` object: + +```go-html-template +{{ range .Site.Menus.main }} + ... +{{ end }} +``` + +See [menu templates] for a detailed example. + +To define entries for a "footer" menu: + +{{< code-toggle file=hugo >}} +[[menus.footer]] +name = 'Terms' +pageRef = '/terms' +weight = 10 + +[[menus.footer]] +name = 'Privacy' +pageRef = '/privacy' +weight = 20 +{{< /code-toggle >}} + +Access this menu structure in the same way: + +```go-html-template +{{ range .Site.Menus.footer }} + ... +{{ end }} +``` + +[Automatically]: /content-management/menus/#define-automatically +[In front matter]: /content-management/menus/#define-in-front-matter +[`Menus`]: /methods/site/menus/ +[menu templates]: /templates/menu/ + +## Properties + +Menu entries usually include at least three properties: `name`, `weight`, and either `pageRef` or `url`. Use `pageRef` for internal page destinations and `url` for external destinations. + +These are the available menu entry properties: + +{{% include "/_common/menu-entry-properties.md" %}} + +pageRef +: (`string`) The [logical path](g) of the target page. For example: + + page kind|pageRef + :--|:-- + home|`/` + page|`/books/book-1` + section|`/books` + taxonomy|`/tags` + term|`/tags/foo` + + +url +: (`string`) The destination URL. Use this for external destinations only. + +## Nested menu + +This nested menu demonstrates some of the available properties: + +{{< code-toggle file=hugo >}} +[[menus.main]] +name = 'Products' +pageRef = '/products' +weight = 10 + +[[menus.main]] +name = 'Hardware' +pageRef = '/products/hardware' +parent = 'Products' +weight = 1 + +[[menus.main]] +name = 'Software' +pageRef = '/products/software' +parent = 'Products' +weight = 2 + +[[menus.main]] +name = 'Services' +pageRef = '/services' +weight = 20 + +[[menus.main]] +name = 'Hugo' +pre = '' +url = 'https://gohugo.io/' +weight = 30 +[menus.main.params] +rel = 'external' +{{< /code-toggle >}} diff --git a/content/en/configuration/minify.md b/content/en/configuration/minify.md new file mode 100644 index 000000000..a530cb73d --- /dev/null +++ b/content/en/configuration/minify.md @@ -0,0 +1,15 @@ +--- +title: Configure minify +linkTitle: Minify +description: Configure minify. +categories: [] +keywords: [] +--- + +This is the default configuration: + +{{< code-toggle config=minify />}} + +See the [tdewolff/minify] project page for details. + +[tdewolff/minify]: https://github.com/tdewolff/minify diff --git a/content/en/configuration/module.md b/content/en/configuration/module.md new file mode 100644 index 000000000..dca63a494 --- /dev/null +++ b/content/en/configuration/module.md @@ -0,0 +1,183 @@ +--- +title: Configure modules +linkTitle: Modules +description: Configure modules. +categories: [] +keywords: [] +aliases: [/hugo-modules/configuration/] +--- + +## Top-level options + +This is the default configuration: + +{{< code-toggle file=hugo >}} +[module] +noProxy = 'none' +noVendor = '' +private = '*.*' +proxy = 'direct' +vendorClosest = false +workspace = 'off' +{{< /code-toggle >}} + +auth +: {{< new-in 0.144.0 />}} +: (`string`) Configures `GOAUTH` when running the Go command for module operations. This is a semicolon-separated list of authentication commands for go-import and HTTPS module mirror interactions. This is useful for private repositories. See `go help goauth` for more information. + +noProxy +: (`string`) A comma-separated list of [glob](g) patterns matching paths that should not use the [configured proxy server](#proxy). + +noVendor +: (`string`) A [glob](g) pattern matching module paths to skip when vendoring. + +private +: (`string`) A comma-separated list of [glob](g) patterns matching paths that should be treated as private. + +proxy +: (`string`) The proxy server to use to download remote modules. Default is `direct`, which means `git clone` and similar. + +replacements +: (`string`) Primarily useful for local module development, a comma-separated list of mappings from module paths to directories. Paths may be absolute or relative to the [`themesDir`]. + + {{< code-toggle file=hugo >}} + [module] + replacements = 'github.com/bep/my-theme -> ../..,github.com/bep/shortcodes -> /some/path' + {{< /code-toggle >}} + +vendorClosest +: (`bool`) Whether to pick the vendored module closest to the module using it. The default behavior is to pick the first. Note that there can still be only one dependency of a given module path, so once it is in use it cannot be redefined. Default is `false`. + +workspace +: (`string`) The Go workspace file to use, either as an absolute path or a path relative to the current working directory. Enabling this activates Go workspace mode and requires Go 1.18 or later. The default is `off`. + +You may also use environment variables to set any of the above. For example: + +```sh +export HUGO_MODULE_PROXY="https://proxy.example.org" +export HUGO_MODULE_REPLACEMENTS="github.com/bep/my-theme -> ../.." +export HUGO_MODULE_WORKSPACE="/my/hugo.work" +``` + +{{< gomodules-info >}} + +## Hugo version + +You can specify a required Hugo version for your module in the `module` section. Users will then receive a warning if their Hugo version is incompatible. + +This is the default configuration: + +{{< code-toggle config=module.hugoVersion />}} + +You can omit any of the settings above. + +extended +: (`bool`) Whether the extended edition of Hugo is required, satisfied by installing either the extended or extended/deploy edition. + +max +: (`string`) The maximum Hugo version supported, for example `0.143.0`. + +min +: (`string`) The minimum Hugo version supported, for example `0.123.0`. + +[`themesDir`]: /configuration/all/#themesdir + + +## Imports + +{{< code-toggle file=hugo >}} +[[module.imports]] +disable = false +ignoreConfig = false +ignoreImports = false +path = "github.com/gohugoio/hugoTestModules1_linux/modh1_2_1v" +[[module.imports]] +path = "my-shortcodes" +{{< /code-toggle >}} + +disable +: (`bool`) Whether to disable the module but keep version information in the `go.*` files. Default is `false`. + +ignoreConfig +: (`bool`) Whether to ignore module configuration files, for example, `hugo.toml`. This will also prevent loading of any transitive module dependencies. Default is `false`. + +ignoreImports +: (`bool`) Whether to ignore module imports. Default is `false`. + +noMounts +: (`bool`) Whether to disable directory mounting for this import. Default is `false`. + +noVendor +: (`bool`) Whether to disable vendoring for this import. This setting is restricted to the main project. Default is `false`. + +path +: (`string`) The module path, either a valid Go module path (e.g., `github.com/gohugoio/myShortcodes`) or the directory name if stored in the [`themesDir`]. + +[`themesDir`]: /configuration/all#themesDir + +{{< gomodules-info >}} + +## Mounts + +Before Hugo v0.56.0, custom component paths could only be configured by setting [`archetypeDir`], [`assetDir`], [`contentDir`], [`dataDir`], [`i18nDir`], [`layoutDi`], or [`staticDir`] in the site configuration. Module mounts offer greater flexibility than these legacy settings, but +you cannot use both. + + +[`archetypeDir`]: /configuration/all/ +[`assetDir`]: /configuration/all/ +[`contentDir`]: /configuration/all/ +[`dataDir`]: /configuration/all/ +[`i18nDir`]: /configuration/all/ +[`layoutDi`]: /configuration/all/ +[`staticDir`]: /configuration/all/ + +{{< note >}} +If you use module mounts do not use the legacy settings. +{{< /note >}} + +### Default mounts + +{{< note >}} +Adding a new mount to a target root will cause the existing default mount for that root to be ignored. If you still need the default mount, you must explicitly add it along with the new mount. +{{< /note >}} + +The are the default mounts: + +{{< code-toggle config=module.mounts />}} + +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 the mount will reside within Hugo's virtual file system. It must begin with one of Hugo's component directories: `archetypes`, `assets`, `content`, `data`, `i18n`, `layouts`, or `static`. For example, `content/blog`. + +disableWatch +: {{< new-in 0.128.0 />}} +: (`bool`) Whether to disable watching in watch mode for this mount. Default is `false`. + +lang +: (`string`) The language code, e.g. "en". Relevant for `content` mounts, and `static` mounts when in multihost mode. + +includeFiles +: (`string` or `[]string`) One or more [glob](g) patterns matching files or directories to include. If `excludeFiles` is not set, the files matching `includeFiles` will be the files mounted. + + The glob patterns are matched against file names relative to the source root. Use Unix-style forward slashes (`/`), even on Windows. A single forward slash (`/`) matches the mount root, and double asterisks (`**`) act as a recursive wildcard, matching all directories and files beneath a given point (e.g., `/posts/**.jpg`). The search is case-insensitive. + +excludeFiles +: (`string` or `[]string`) One or more [glob](g) patterns matching files to exclude. + +### Example + +{{< code-toggle file=hugo >}} +[module] +[[module.mounts]] + source="content" + target="content" + excludeFiles="docs/*" +[[module.mounts]] + source="node_modules" + target="assets" +[[module.mounts]] + source="assets" + target="assets" +{{< /code-toggle >}} diff --git a/content/en/configuration/output-formats.md b/content/en/configuration/output-formats.md new file mode 100644 index 000000000..e1264e27c --- /dev/null +++ b/content/en/configuration/output-formats.md @@ -0,0 +1,210 @@ +--- +title: Configure output formats +linkTitle: Output formats +description: Configure output formats. +categories: [] +keywords: [] +--- + +{{% glossary-term "output format" %}} + +You can output a page in as many formats as you want. Define an infinite number of output formats, provided they each resolve to a unique file system path. + +This is the default output format configuration in tabular form: + +{{< datatable + "config" + "outputFormats" + "_key" + "mediaType" + "weight" + "baseName" + "isHTML" + "isPlainText" + "noUgly" + "notAlternative" + "path" + "permalinkable" + "protocol" + "rel" + "root" + "ugly" +>}} + +## Default configuration + +The following is the default configuration that matches the table above: + +{{< code-toggle config=outputFormats />}} + +baseName +: (`string`) The base name of the published file. Default is `index`. + +isHTML +: (`bool`) Whether to classify the output format as HTML. Hugo uses this value to determine when to create alias redirects and when to inject the LiveReload script. Default is `false`. + +isPlainText +: (`bool`) Whether to parse templates for this output format with Go's [text/template] package instead of the [html/template] package. Default is `false`. + +mediaType +: (`string`) The [media type](g) of the published file. This must match one of the [configured media types]. + +notAlternative +: (`bool`) Whether to exclude this output format from the values returned by the [`AlternativeOutputFormats`] method on a `Page` object. Default is `false`. + +noUgly +: (`bool`) Whether to disable ugly URLs for this output format when [`uglyURLs`] are enabled in your site configuration. Default is `false`. + +path +: (`string`) The published file's directory path, relative to the root of the publish directory. If not specified, the file will be published using its content path. + +permalinkable +: (`bool`) Whether to return the rendering output format rather than main output format when invoking the [`Permalink`] and [`RelPermalink`] methods on a `Page` object. See [details](#link-to-output-formats). Enabled by default for the `html` and `amp` output formats. Default is `false`. + +protocol +: (`string`) The protocol (scheme) of the URL for this output format. For example, `https://` or `webcal://`. Default is the scheme of the [`baseURL`] parameter in your site configuration, typically `https://`. + +rel +: (`string`) If provided, you can assign this value to `rel` attributes in `link` elements when iterating over output formats in your templates. Default is `alternate`. + +root +: (`bool`) Whether to publish files to the root of the publish directory. Default is `false`. + +ugly +: (`bool`) Whether to enable uglyURLs for this output format when `uglyURLs` is `false` in your site configuration. Default is `false`. + +weight +: (`int`) When set to a non-zero value, Hugo uses the `weight` as the first criteria when sorting output formats, falling back to the name of the output format. Lighter items float to the top, while heavier items sink to the bottom. Hugo renders output formats sequentially based on the sort order. Default is `0`, except for the `html` output format, which has a default weight of `10`. + +## Modify an output format + +You can modify any of the default output formats. For example, to prioritize `json` rendering over `html` rendering, when both are generated, adjust the [`weight`](#weight): + +{{< code-toggle file=hugo >}} +[outputFormats.json] +weight = 1 +[outputFormats.html] +weight = 2 +{{< /code-toggle >}} + +The example above shows that when you modify a default content format, you only need to define the properties that differ from their default values. + +## Create an output format + +You can create new output formats as needed. For example, you may wish to create an output format to support Atom feeds. + +### Step 1 + +You must specify a media type when you create an output format. Because `application/atom+xml`, the media type for Atom feeds, is not a [default media type], begin by creating a new one: + +{{< code-toggle file=hugo >}} +[mediaTypes.'application/atom+xml'] +suffixes = ['atom'] +{{< /code-toggle >}} + +See [configure media types] for more information. + +### Step 2 + +Create a new output format: + +{{< code-toggle file=hugo >}} +[outputFormats.atom] +mediaType = 'application/atom+xml' +noUgly = true +{{< /code-toggle >}} + +Note that we use the default settings for all other output format properties. + +### Step 3 + +Specify the page [kinds](g) for which to render this output format: + +{{< code-toggle file=hugo >}} +[outputs] +home = ['html', 'rss', 'atom'] +section = ['html', 'rss', 'atom'] +taxonomy = ['html', 'rss', 'atom'] +term = ['html', 'rss', 'atom'] +{{< /code-toggle >}} + +See [configure outputs] for more information. + +### Step 4 + +Create a template to render the output format. Since Atom feeds are lists, you need to create a list template. Consult the [template lookup order] to find the correct template path: + +```text +layouts/_default/list.atom.atom +``` + +We leave writing the template code as an exercise for you. Aim for a result similar to the [embedded RSS template]. + + +## List output formats + +To access output formats, each `Page` object provides two methods: [`OutputFormats`] (for all formats, including the current one) and [`AlternativeOutputFormats`]. Use `AlternativeOutputFormats` to create a link `rel` list within your site's `head` element, as shown below: + +```go-html-template +{{ range .AlternativeOutputFormats -}} + +{{ end }} +``` + +## Link to output formats + +By default, a `Page` object's [`Permalink`] and [`RelPermalink`] methods return the URL of the [primary output format](g), typically `html`. This behavior remains consistent regardless of the template used. + +For example, in `single.json.json`, you'll see: + +```go-html-template +{{ .RelPermalink }} → /that-page/ +{{ with .OutputFormats.Get "json" }} + {{ .RelPermalink }} → /that-page/index.json +{{ end }} +``` + +To make these methods return the URL of the _current_ template's output format, you must set the [`permalinkable`] setting to `true` for that format. + +With `permalinkable` set to true for `json` in the same `single.json.json` template: + +```go-html-template +{{ .RelPermalink }} → /that-page/index.json +{{ with .OutputFormats.Get "html" }} + {{ .RelPermalink }} → /that-page/ +{{ end }} +``` + +## Template lookup order + +Each output format requires a template conforming to the [template lookup order]. + +For the highest specificity in the template lookup order, include the page kind, output format, and suffix in the file name: + +```text +[page kind].[output format].[suffix] +``` + +For example, for section pages: + +Output format|Template path +:--|:-- +`html`|`layouts/_default/section.html.html` +`json`|`layouts/_default/section.json.json` +`rss`|`layouts/_default/section.rss.xml` + +[`AlternativeOutputFormats`]: /methods/page/alternativeoutputformats/ +[`OutputFormats`]: /methods/page/outputformats/ +[`Permalink`]: /methods/page/permalink/ +[`RelPermalink`]: /methods/page/relpermalink/ +[`baseURL`]: /configuration/all/#baseurl +[`permalinkable`]: #permalinkable +[`uglyURLs`]: /configuration/ugly-urls/ +[configure media types]: /configuration/media-types/ +[configure outputs]: /configuration/outputs/ +[configured media types]: /configuration/media-types/ +[default media type]: /configuration/media-types/ +[embedded RSS template]: {{% eturl rss %}} +[html/template]: https://pkg.go.dev/html/template +[template lookup order]: /templates/lookup-order/ +[text/template]: https://pkg.go.dev/text/template diff --git a/content/en/configuration/outputs.md b/content/en/configuration/outputs.md new file mode 100644 index 000000000..2ceaa6518 --- /dev/null +++ b/content/en/configuration/outputs.md @@ -0,0 +1,51 @@ +--- +title: Configure outputs +linkTitle: Outputs +description: Configure which output formats to render for each page kind. +categories: [] +keywords: [] +--- + +{{% glossary-term "output format" %}} + +Learn more about creating and configuring output formats in the [configure output formats] section. + +[configure output formats]: /configuration/output-formats/ + +## Outputs per page kind + +The following default configuration determines the output formats generated for each page kind: + +{{< code-toggle config=outputs />}} + +To render the built-in `json` output format for the `home` page kind, assuming you've already created the necessary template, add the following to your configuration: + +{{< code-toggle file=hugo >}} +[outputs] +home = ['html','rss','json'] +{{< /code-toggle >}} + +Notice in this example that we only specified the `home` page kind. You don't need to include entries for other page kinds unless you intend to modify their default output formats. + +{{< note >}} +The order of the output formats in the arrays above is important. The first element will be the _primary output format_ for that page kind, and in most cases that should be `html` as shown in the default configuration. + +The primary output format for a given page kind determines the value returned by the [`Permalink`] and [`RelPermalink`] methods on a `Page` object. + +See the [link to output formats] section for details. + +[`Permalink`]: /methods/page/permalink/ +[`RelPermalink`]: /methods/page/relpermalink/ +[link to output formats]: configuration/output-formats/#link-to-output-formats +{{< /note >}} + +## Outputs per page + +Add output formats to a page's rendering using the `outputs` field in its front matter. For example, to include `json` in the output formats rendered for a specific page: + +{{< code-toggle file=content/example.md fm=true >}} +title = 'Example' +outputs = ['json'] +{{< /code-toggle >}} + +In its default configuration, Hugo will render both the `html` and `json` output formats for this page. The `outputs` field appends to, rather than replaces, the site's configured outputs. diff --git a/content/en/configuration/page.md b/content/en/configuration/page.md new file mode 100644 index 000000000..0af23c1c8 --- /dev/null +++ b/content/en/configuration/page.md @@ -0,0 +1,35 @@ +--- +title: Configure page +linkTitle: Page +description: Configure page behavior. +categories: [] +keywords: [] +--- + +{{< new-in 0.133.0 />}} + +{{% glossary-term "default sort order" %}} + +Hugo uses the default sort order to determine the _next_ and _previous_ page relative to the current page when calling these methods on a `Page` object: + +- [`Next`](/methods/page/next/) and [`Prev`](/methods/page/prev/) +- [`NextInSection`](/methods/page/nextinsection/) and [`PrevInSection`](/methods/page/previnsection/) + +This is based on this default site configuration: + +{{< code-toggle config=page />}} + +To reverse the meaning of _next_ and _previous_: + +{{< code-toggle file=hugo >}} +[page] + nextPrevInSectionSortOrder = 'asc' + nextPrevSortOrder = 'asc' +{{< /code-toggle >}} + +{{< note >}} +These settings do not apply to the [`Next`] or [`Prev`] methods on a `Pages` object. + +[`Next`]: /methods/pages/next +[`Prev`]: /methods/pages/next +{{< /note >}} diff --git a/content/en/configuration/pagination.md b/content/en/configuration/pagination.md new file mode 100644 index 000000000..66b3b8cf4 --- /dev/null +++ b/content/en/configuration/pagination.md @@ -0,0 +1,45 @@ +--- +title: Configure pagination +linkTitle: Pagination +description: Configure pagination. +categories: [] +keywords: [] +--- + +This is the default configuration: + +{{< code-toggle config=pagination />}} + +disableAliases +: (`bool`) Whether to disable alias generation for the first pager. Default is `false`. + +pagerSize +: (`int`) The number of pages per pager. Default is `10`. + +path +: (`string`) The segment of each pager URL indicating that the target page is a pager. Default is `page`. + +With multilingual sites you can define the pagination behavior for each language: + +{{< code-toggle file=hugo >}} +[languages.en] +contentDir = 'content/en' +languageCode = 'en-US' +languageDirection = 'ltr' +languageName = 'English' +weight = 1 +[languages.en.pagination] +disableAliases = true +pagerSize = 10 +path = 'page' +[languages.de] +contentDir = 'content/de' +languageCode = 'de-DE' +languageDirection = 'ltr' +languageName = 'Deutsch' +weight = 2 +[languages.de.pagination] +disableAliases = true +pagerSize = 20 +path = 'blatt' +{{< /code-toggle >}} diff --git a/content/en/configuration/params.md b/content/en/configuration/params.md new file mode 100644 index 000000000..03308e5d1 --- /dev/null +++ b/content/en/configuration/params.md @@ -0,0 +1,101 @@ +--- +title: Configure params +linkTitle: Params +description: Create custom site parameters. +categories: [] +keywords: [] +--- + +Use the `params` key for custom parameters: + +{{< code-toggle file=hugo >}} +baseURL = 'https://example.org/' +title = 'Project Documentation' +languageCode = 'en-US' +[params] +subtitle = 'Reference, Tutorials, and Explanations' +[params.contact] +email = 'info@example.org' +phone = '+1 206-555-1212' +{{< /code-toggle >}} + +Access the custom parameters from your templates using the [`Params`] method on a `Site` object: + +[`Params`]: /methods/site/params/ + +```go-html-template +{{ .Site.Params.subtitle }} → Reference, Tutorials, and Explanations +{{ .Site.Params.contact.email }} → info@example.org +``` + +Key names should use camelCase or snake_case. While TOML, YAML, and JSON allow kebab-case keys, they are not valid [identifiers](g) and cannot be used when [chaining](g) identifiers. + +For example, you can do either of these: + +```go-html-template +{{ .Site.params.camelCase.foo }} +{{ .Site.params.snake_case.foo }} +``` + +But you cannot do this: + + +```go-html-template +{{ .Site.params.kebab-case.foo }} +``` + +## Multilingual sites + +For multilingual sites, create a `params` key under each language: + +{{< code-toggle file=hugo >}} +baseURL = 'https://example.org/' +defaultContentLanguage = 'en' + +[languages.de] +languageCode = 'de-DE' +languageDirection = 'ltr' +languageName = 'Deutsch' +title = 'Projekt Dokumentation' +weight = 1 + +[languages.de.params] +subtitle = 'Referenz, Tutorials und Erklärungen' + +[languages.de.params.contact] +email = 'info@de.example.org' +phone = '+49 30 1234567' + +[languages.en] +languageCode = 'en-US' +languageDirection = 'ltr' +languageName = 'English' +title = 'Project Documentation' +weight = 2 + +[languages.en.params] +subtitle = 'Reference, Tutorials, and Explanations' + +[languages.en.params.contact] +email = 'info@example.org' +phone = '+1 206-555-1212' +{{< /code-toggle >}} + +## Namespacing + +To prevent naming conflicts, module and theme developers should namespace any custom parameters specific to their module or theme. + +{{< code-toggle file=hugo >}} +[params.modules.myModule.colors] +background = '#efefef' +font = '#222222' +{{< /code-toggle >}} + +To access the module/theme settings: + +```go-html-template +{{ $cfg := .Site.Params.module.mymodule }} + +{{ $cfg.colors.background }} → #efefef +{{ $cfg.colors.font }} → #222222 +``` diff --git a/content/en/configuration/permalinks.md b/content/en/configuration/permalinks.md new file mode 100644 index 000000000..294b44e15 --- /dev/null +++ b/content/en/configuration/permalinks.md @@ -0,0 +1,163 @@ +--- +title: Configure permalinks +linkTitle: Permalinks +description: Configure permalinks. +categories: [] +keywords: [] +--- + +This is the default configuration: + +{{< code-toggle config=permalinks />}} + +Define a URL pattern for each top-level section. Each URL pattern can target a given language and/or page kind. + +{{< note >}} +The [`url`] front matter field overrides any matching permalink pattern. + +[`url`]: /content-management/front-matter/#url +{{< /note >}} + +## Monolingual example + +With this content structure: + +```text +content/ +├── posts/ +│ ├── bash-in-slow-motion.md +│ └── tls-in-a-nutshell.md +├── tutorials/ +│ ├── git-for-beginners.md +│ └── javascript-bundling-with-hugo.md +└── _index.md +``` + +Render tutorials under "training", and render the posts under "articles" with a date-base hierarchy: + +{{< code-toggle file=hugo >}} +[permalinks.page] +posts = '/articles/:year/:month/:slug/' +tutorials = '/training/:slug/' +[permalinks.section] +posts = '/articles/' +tutorials = '/training/' +{{< /code-toggle >}} + +The structure of the published site will be: + +```text +public/ +├── articles/ +│ ├── 2023/ +│ │ ├── 04/ +│ │ │ └── bash-in-slow-motion/ +│ │ │ └── index.html +│ │ └── 06/ +│ │ └── tls-in-a-nutshell/ +│ │ └── index.html +│ └── index.html +├── training/ +│ ├── git-for-beginners/ +│ │ └── index.html +│ ├── javascript-bundling-with-hugo/ +│ │ └── index.html +│ └── index.html +└── index.html +``` + +To create a date-based hierarchy for regular pages in the content root: + +{{< code-toggle file=hugo >}} +[permalinks.page] +"/" = "/:year/:month/:slug/" +{{< /code-toggle >}} + +Use the same approach with taxonomy terms. For example, to omit the taxonomy segment of the URL: + +{{< code-toggle file=hugo >}} +[permalinks.term] +'tags' = '/:slug/' +{{< /code-toggle >}} + +## Multilingual example + +Use the `permalinks` configuration as a component of your localization strategy. + +With this content structure: + +```text +content/ +├── en/ +│ ├── books/ +│ │ ├── les-miserables.md +│ │ └── the-hunchback-of-notre-dame.md +│ └── _index.md +└── es/ + ├── books/ + │ ├── les-miserables.md + │ └── the-hunchback-of-notre-dame.md + └── _index.md +``` + +And this site configuration: + +{{< code-toggle file=hugo >}} +defaultContentLanguage = 'en' +defaultContentLanguageInSubdir = true + +[languages.en] +contentDir = 'content/en' +languageCode = 'en-US' +languageDirection = 'ltr' +languageName = 'English' +weight = 1 + +[languages.en.permalinks.page] +books = "/books/:slug/" + +[languages.en.permalinks.section] +books = "/books/" + +[languages.es] +contentDir = 'content/es' +languageCode = 'es-ES' +languageDirection = 'ltr' +languageName = 'Español' +weight = 2 + +[languages.es.permalinks.page] +books = "/libros/:slug/" + +[languages.es.permalinks.section] +books = "/libros/" +{{< /code-toggle >}} + +The structure of the published site will be: + +```text +public/ +├── en/ +│ ├── books/ +│ │ ├── les-miserables/ +│ │ │ └── index.html +│ │ ├── the-hunchback-of-notre-dame/ +│ │ │ └── index.html +│ │ └── index.html +│ └── index.html +├── es/ +│ ├── libros/ +│ │ ├── les-miserables/ +│ │ │ └── index.html +│ │ ├── the-hunchback-of-notre-dame/ +│ │ │ └── index.html +│ │ └── index.html +│ └── index.html +└── index.html +```` + +## Tokens + +Use these tokens when defining a URL pattern. + +{{% include "/_common/permalink-tokens.md" %}} diff --git a/content/en/about/privacy.md b/content/en/configuration/privacy.md similarity index 90% rename from content/en/about/privacy.md rename to content/en/configuration/privacy.md index 828995c07..4ea8f5cb6 100644 --- a/content/en/about/privacy.md +++ b/content/en/configuration/privacy.md @@ -1,17 +1,10 @@ --- -title: Privacy +title: Configure privacy linkTitle: Privacy description: Configure your site to help comply with regional privacy regulations. -categories: [about] -keywords: ["GDPR", "Privacy", "Data Protection"] -menu: - docs: - parent: about - weight: 40 -weight: 40 -toc: true -aliases: [/gdpr/,/about/hugo-and-gdpr/] -toc: true +categories: [] +keywords: [] +aliases: [/about/privacy/] --- ## Responsibility @@ -31,7 +24,6 @@ Hugo provides [embedded templates](g) to simplify site and content creation. Som Some of these templates include settings to enhance privacy. - ## Configuration {{< note >}} diff --git a/content/en/configuration/related-content.md b/content/en/configuration/related-content.md new file mode 100644 index 000000000..230231742 --- /dev/null +++ b/content/en/configuration/related-content.md @@ -0,0 +1,113 @@ +--- +title: Configure related content +linkTitle: Related content +description: Configure related content. +categories: [] +keywords: [] +--- + +{{< note >}} +To understand Hugo's related content identification, please refer to the [related content] page. + +[related content]: /content-management/related-content/ +{{< /note >}} + +Hugo provides a sensible default configuration for identifying related content, but you can customize it in your site configuration, either globally or per language. + +## Default configuration + +This is the default configuration: + +{{< code-toggle config=related />}} + +{{< note >}} +Adding a `related` section to your site configuration requires you to provide a full configuration. You cannot override individual default values without specifying all related settings. +{{< /note >}} + +## Top-level options + +threshold +: (`int`) A value between 0-100, inclusive. A lower value will return more, but maybe not so relevant, matches. + +includeNewer +: (`bool`) Whether to include pages newer than the current page in the related content listing. This will mean that the output for older posts may change as new related content gets added. Default is `false`. + +toLower +: (`bool`) Whether to transform keywords in both the indexes and the queries to lower case. This may give more accurate results at a slight performance penalty. Default is `false`. + +## Per-index options + +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 +: (`string`) One of `basic` or `fragments`. Default is `basic`. + +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. Default is `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 +: (`string`) This is currently only relevant for dates. When listing related content, we may want to list content that is also close in time. Setting "2006" (default value for date indexes) as the pattern for a date index will add weight to pages published in the same year. For busier blogs, "200601" (year and month) may be a better default. + +toLower +: (`bool`) Whether to transform keywords in both the indexes and the queries to lower case. This may give more accurate results at a slight performance penalty. Default is `false`. + +## Example + +Imagine we're building a book review site. Our main content will be book reviews, and we'll use genres and authors as taxonomies. When someone views a book review, we want to show a short list of related reviews based on shared authors and genres. + +Create the content: + +```text +content/ +└── book-reviews/ + ├── book-review-1.md + ├── book-review-2.md + ├── book-review-3.md + ├── book-review-4.md + └── book-review-5.md +``` + +Configure the taxonomies: + +{{< code-toggle file=hugo >}} +[taxonomies] +author = 'authors' +genre = 'genres' +{{< /code-toggle >}} + +Configure the related content identification: + +{{< code-toggle file=hugo >}} +[related] +includeNewer = true +threshold = 80 +toLower = true +[[related.indices]] +name = 'authors' +weight = 2 +[[related.indices]] +name = 'genres' +weight = 1 +{{< /code-toggle >}} + +We've configured the `authors` index with a weight of `2` and the `genres` index with a weight of `1`. This means Hugo prioritizes shared `authors` as twice as significant as shared `genres`. + +Then render a list of 5 related reviews with a partial template like this: + +{{< code file=layouts/partials/related.html copy=true >}} +{{ with site.RegularPages.Related . | first 5 }} +

Related content:

+ +{{ end }} +{{< /code >}} diff --git a/content/en/configuration/security.md b/content/en/configuration/security.md new file mode 100644 index 000000000..fb95e87e1 --- /dev/null +++ b/content/en/configuration/security.md @@ -0,0 +1,52 @@ +--- +title: Configure security +linkTitle: Security +description: Configure security. +categories: [] +keywords: [] +--- + +Hugo's built-in security policy, which restricts access to `os/exec`, remote communication, and similar operations, is configured via allow lists. By default, access is restricted. If a build attempts to use a feature not included in the allow list, it will fail, providing a detailed message. + +This is the default security configuration: + +{{< code-toggle config=security />}} + +enableInlineShortcodes +: (`bool`) Whether to enable [inline shortcodes]. Default is `false`. + +exec.allow +: (`[]string`) A slice of [regular expressions](g) matching the names of external executables that Hugo is allowed to run. + +exec.osEnv +: (`[]string`) A slice of regular expressions matching the names of operating system environment variables that Hugo is allowed to access. + +funcs.getenv +: (`[]string`) A slice of regular expressions matching the names of operating system environment variables that Hugo is allowed to access with the [`os.Getenv`] function. + +http.methods +: (`[]string`) A slice of regular expressions matching the HTTP methods that the [`resources.GetRemote`] function is allowed to use. + +http.mediaTypes +: (`[]string`) Applicable to the `resources.GetRemote` function, a slice of regular expressions matching the `Content-Type` in HTTP responses that Hugo trusts, bypassing file content analysis for media type detection. + +http.urls +: (`[]string`) A slice of regular expressions matching the URLs that the `resources.GetRemote` function is allowed to access. + +[inline shortcodes]: /content-management/shortcodes/#inline +[`os.Getenv`]: /functions/os/getenv +[`resources.GetRemote`]: /functions/resources/getremote + +{{< note >}} +Setting an allow list to the string `none` will completely disable the associated feature. +{{< /note >}} + +You can also override the site configuration with environment variables. For example, to block `resources.GetRemote` from accessing any URL: + +```txt +export HUGO_SECURITY_HTTP_URLS=none +``` + +Learn more about [using environment variables] to configure your site. + +[using environment variables]: /configuration/introduction/#environment-variables diff --git a/content/en/configuration/segments.md b/content/en/configuration/segments.md new file mode 100644 index 000000000..180d6389b --- /dev/null +++ b/content/en/configuration/segments.md @@ -0,0 +1,79 @@ +--- +title: Configure segments +linkTitle: Segments +description: Configure your site for segmented rendering. +categories: [] +keywords: [] +--- + +{{< new-in 0.124.0 />}} + +{{< note >}} +The `segments` configuration applies only to segmented rendering. While it controls when content is rendered, it doesn't restrict access to Hugo's complete object graph (sites and pages), which remains fully available. +{{< /note >}} + +Segmented rendering offers several advantages: + +- Faster builds: Process large sites more efficiently. +- Rapid development: Render only a subset of your site for quicker iteration. +- Scheduled rebuilds: Rebuild specific sections at different frequencies (e.g., home page and news hourly, full site weekly). +- Targeted output: Generate specific output formats (like JSON for search indexes). + +## Segment definition + +Each segment is defined by include and exclude filters: + +- Filters: Each segment has zero or more exclude filters and zero or more include filters. +- Matchers: Each filter contains one or more field [glob](g) matchers. +- Logic: Matchers within a filter use AND logic. Filters within a section (include or exclude) use OR logic. + +## Filter fields + +Available fields for filtering: + +kind +: (`string`) A [glob](g) pattern matching the [page kind](g). For example: ` {taxonomy,term}`. + +lang +: (`string`) A [glob](g) pattern matching the [page language]. For example: `{en,de}`. + +output +: (`string`) A [glob](g) pattern matching the [output format](g) of the page. For example: `{html,json}`. + +path +: (`string`) A [glob](g) pattern matching the page's [logical path](g). For example: `{/books,/books/**}`. + +[page language]: /methods/page/language/ + +## Example + +Place broad filters, such as those for language or output format, in the excludes section. For example: + +{{< code-toggle file=hugo >}} +[segments.segment1] + [[segments.segment1.excludes]] + lang = "n*" + [[segments.segment1.excludes]] + lang = "en" + output = "rss" + [[segments.segment1.includes]] + kind = "{home,term,taxonomy}" + [[segments.segment1.includes]] + path = "{/docs,/docs/**}" +{{< /code-toggle >}} + +## Rendering segments + +Render specific segments using the [`renderSegments`] configuration or the `--renderSegments` flag: + +```bash +hugo --renderSegments segment1 +``` + +You can configure multiple segments and use a comma-separated list with `--renderSegments` to render them all. + +```bash +hugo --renderSegments segment1,segment2 +``` + +[`renderSegments`]: /configuration/all/#rendersegments diff --git a/content/en/configuration/server.md b/content/en/configuration/server.md new file mode 100644 index 000000000..c38ece466 --- /dev/null +++ b/content/en/configuration/server.md @@ -0,0 +1,128 @@ +--- +title: Configure server +linkTitle: Server +description: Configure the development server. +categories: [] +keywords: [] +--- + +These settings are exclusive to Hugo's development server, so a dedicated [configuration directory] for development, where the server is configured accordingly, is the recommended approach. + +[configuration directory]: /configuration/introduction/#configuration-directory + +```text +project/ +└── config/ + ├── _default/ + │ └── hugo.toml + └── development/ + └── server.toml +``` + +## Default settings + +The development server defaults to redirecting to `/404.html` for any requests to URLs that don't exist. See the [404 errors](#404-errors) section below for details. + +{{< code-toggle config=server />}} + +force +: (`bool`) Whether to force a redirect even if there is existing content in the path. + +from +: (`string`) A [glob](g) pattern matching the requested URL. Either `from` or `fromRE` must be set. If both `from` and `fromRe` are specified, the URL must match both patterns. + +fromHeaders +: {{< new-in 0.144.0 />}} +: (`map[string][string]`) Headers to match for the redirect. This maps the HTTP header name to a [glob](g) pattern with values to match. If the map is empty, the redirect will always be triggered. + +fromRe +: {{< new-in 0.144.0 />}} +: (`string`) A regular expression used to match the requested URL. Either `from` or `fromRE` must be set. If both `from` and `fromRe` are specified, the URL must match both patterns. Capture groups from the regular expression are accessible in the `to` field as `$1`, `$2`, and so on. + +status +: (`string`) The HTTP status code to use for the redirect. A status code of 200 will trigger a URL rewrite. + +to +: (`string`) The URL to forward the request to. + +## Headers + +Include headers in every server response to facilitate testing, particularly for features like Content Security Policies. + +[Content Security Policies]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP + +{{< code-toggle file=config/development/server >}} +[[headers]] +for = "/**" + +[headers.values] +X-Frame-Options = "DENY" +X-XSS-Protection = "1; mode=block" +X-Content-Type-Options = "nosniff" +Referrer-Policy = "strict-origin-when-cross-origin" +Content-Security-Policy = "script-src localhost:1313" +{{< /code-toggle >}} + +## Redirects + +You can define simple redirect rules. + +{{< code-toggle file=config/development/server >}} +[[redirects]] +from = "/myspa/**" +to = "/myspa/" +status = 200 +force = false +{{< /code-toggle >}} + +The `200` status code in this example triggers a URL rewrite, which is typically the desired behavior for [single-page applications]. + +[single-page applications]: https://en.wikipedia.org/wiki/Single-page_application + +## 404 errors + +The development server defaults to redirecting to /404.html for any requests to URLs that don't exist. + +{{< code-toggle config=server />}} + +If you've already defined other redirects, you must explicitly add the 404 redirect. + +{{< code-toggle file=config/development/server >}} +[[redirects]] +force = false +from = "/**" +to = "/404.html" +status = 404 +{{< /code-toggle >}} + +For multilingual sites, ensure the default language 404 redirect is defined last: + +{{< code-toggle file=config/development/server >}} +defaultContentLanguage = 'en' +defaultContentLanguageInSubdir = false +[[redirects]] +from = '/fr/**' +to = '/fr/404.html' +status = 404 + +[[redirects]] # Default language must be last. +from = '/**' +to = '/404.html' +status = 404 +{{< /code-toggle >}} + +When the default language is served from a subdirectory: + +{{< code-toggle file=config/development/server >}} +defaultContentLanguage = 'en' +defaultContentLanguageInSubdir = true +[[redirects]] +from = '/fr/**' +to = '/fr/404.html' +status = 404 + +[[redirects]] # Default language must be last. +from = '/**' +to = '/en/404.html' +status = 404 +{{< /code-toggle >}} diff --git a/content/en/configuration/services.md b/content/en/configuration/services.md new file mode 100644 index 000000000..1c433449f --- /dev/null +++ b/content/en/configuration/services.md @@ -0,0 +1,53 @@ +--- +title: Configure services +linkTitle: Services +description: Configure embedded templates. +categories: [] +keywords: [] +--- + +Hugo provides [embedded templates](g) to simplify site and content creation. Some of these templates are configurable. For example, the embedded Google Analytics template requires a Google tag ID. + +This is the default configuration: + +{{< code-toggle config=services />}} + +disqus.shortname +: (`string`) The `shortname` used with the Disqus commenting system. See [details](/templates/embedded/#disqus). To access this value from a template: + + ```go-html-template + {{ .Site.Config.Services.Disqus.Shortname }} + ``` + +googleAnalytics.id +: (`string`) The Google tag ID for Google Analytics 4 properties. See [details](/templates/embedded/#google-analytics). To access this value from a template: + + ```go-html-template + {{ .Site.Config.Services.GoogleAnalytics.ID }} + ``` + +instagram.accessToken +: (`string`) Do not use. Deprecated in [v0.123.0]. The embedded `instagram` shortcode no longer uses this setting. + +instagram.disableInlineCSS +: (`bool`) Do not use. Deprecated in [v0.123.0]. The embedded `instagram` shortcode no longer uses this setting. + +rss.limit +: (`int`) The maximum number of items to include in an RSS feed. Set to `-1` for no limit. Default is `-1`. See [details](/templates/rss/). To access this value from a template: + + ```go-html-template + {{ .Site.Config.Services.RSS.Limit }} + ``` + +twitter.disableInlineCSS +: (`bool`) Do not use. Deprecated in [v0.141.0]. Use the `x` shortcode instead. + +x.disableInlineCSS +: (`bool`) Whether to disable the inline CSS rendered by the embedded `x` shortode. See [details](/shortcodes/x/#privacy). Default is `false`. To access this value from a template: + + ```go-html-template + {{ .Site.Config.Services.X.DisableInlineCSS }} + + +[v0.141.0]: https://github.com/gohugoio/hugo/releases/tag/v0.141.0 +[v0.123.0]: https://github.com/gohugoio/hugo/releases/tag/v0.123.0 diff --git a/content/en/configuration/sitemap.md b/content/en/configuration/sitemap.md new file mode 100644 index 000000000..bc972994c --- /dev/null +++ b/content/en/configuration/sitemap.md @@ -0,0 +1,24 @@ +--- +title: Configure sitemap +linkTitle: Sitemap +description: Configure the sitemap. +categories: [] +keywords: [] +--- + +These are the default sitemap configuration values. They apply to all pages unless overridden in front matter. + +{{< code-toggle config=sitemap />}} + +changefreq +: (`string`) How frequently a page is likely to change. Valid values are `always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly`, and `never`. With the default value of `""` Hugo will omit this field from the sitemap. See [details](https://www.sitemaps.org/protocol.html#changefreqdef). + +disable +: {{< new-in 0.125.0 />}} +: (`bool`) Whether to disable page inclusion. Default is `false`. Set to `true` in front matter to exclude the page. + +filename +: (`string`) The name of the generated file. Default is `sitemap.xml`. + +priority +: (`float`) The priority of a page relative to any other page on the site. Valid values range from 0.0 to 1.0. With the default value of `-1` Hugo will omit this field from the sitemap. See [details](https://www.sitemaps.org/protocol.html#prioritydef). diff --git a/content/en/configuration/taxonomies.md b/content/en/configuration/taxonomies.md new file mode 100644 index 000000000..4b5ba97a5 --- /dev/null +++ b/content/en/configuration/taxonomies.md @@ -0,0 +1,68 @@ +--- +title: Configure taxonomies +linkTitle: Taxonomies +description: Configure taxonomies. +categories: [] +keywords: [] +--- + +The default configuration defines two [taxonomies](g), `categories` and `tags`. + +{{< code-toggle config=taxonomies />}} + +When creating a taxonomy: + +- Use the singular form for the key (e.g., `category`). +- Use the plural form for the value (e.g., `categories`). + +Then use the value as the key in front matter: + +{{< code-toggle file=content/example.md fm=true >}} +--- +title: Example +categories: + - vegetarian + - gluten-free +tags: + - appetizer + - main course +{{< /code-toggle >}} + +If you do not expect to assign more than one [term](g) from a given taxonomy to a content page, you may use the singular form for both key and value: + +{{< code-toggle file=hugo >}} +taxonomies: + author: author +{{< /code-toggle >}} + +Then in front matter: + +{{< code-toggle file=content/example.md fm=true >}} +--- +title: Example +author: + - Robert Smith +{{< /code-toggle >}} + +The example above illustrates that even with a single term, the value is still provided as an array. + +You must explicitly define the default taxonomies to maintain them when adding a new one: + +{{< code-toggle file=hugo >}} +taxonomies: + author: author + category: categories + tag: tags +{{< /code-toggle >}} + +To disable the taxonomy system, use the [`disableKinds`] setting in the root of your site configuration to disable the `taxonomy` and `term` page [kinds](g). + +{{< code-toggle file=hugo >}} +disableKinds = ['categories','tags'] +{{< /code-toggle >}} + +[`disableKinds`]: /configuration/all/#disablekinds + +See the [taxonomies] section for more information. + +[taxonomies]: /content-management/taxonomies/ diff --git a/content/en/configuration/ugly-urls.md b/content/en/configuration/ugly-urls.md new file mode 100644 index 000000000..ec1dd8a49 --- /dev/null +++ b/content/en/configuration/ugly-urls.md @@ -0,0 +1,36 @@ +--- +title: Configure ugly URLs +linkTitle: Ugly URLs +description: Configure ugly URLs. +categories: [] +keywords: [] +--- + +{{% glossary-term "ugly url" %}} For example: + +```text +https://example.org/section/article.html +``` + +In its default configuration, Hugo generates [pretty URLs](g). For example: +```text +https://example.org/section/article/ +``` + +This is the default configuration: + +{{< code-toggle config=uglyURLs />}} + +To generate ugly URLs for the entire site: + +{{< code-toggle file=hugo >}} +uglyURLs = true +{{< /code-toggle >}} + +To generate ugly URLs for specific sections of your site: + +{{< code-toggle file=hugo >}} +[uglyURLs] +books = true +films = false +{{< /code-toggle >}} diff --git a/content/en/content-management/_common/_index.md b/content/en/content-management/_common/_index.md deleted file mode 100644 index 4328d4d14..000000000 --- a/content/en/content-management/_common/_index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -cascade: - _build: - list: never - publishResources: false - render: never ---- - - diff --git a/content/en/content-management/_common/page-kinds.md b/content/en/content-management/_common/page-kinds.md deleted file mode 100644 index 8f10dcd79..000000000 --- a/content/en/content-management/_common/page-kinds.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -_comment: Do not remove front matter. ---- - -| Kind | Description | Example | -|----------------|--------------------------------------------------------------------|-------------------------------------------------------------------------------| -| `home` | The landing page for the home page | `/index.html` | -| `page` | The landing page for a given page | `my-post` page (`/posts/my-post/index.html`) | -| `section` | The landing page of a given section | `posts` section (`/posts/index.html`) | -| `taxonomy` | The landing page for a taxonomy | `tags` taxonomy (`/tags/index.html`) | -| `term` | The landing page for one taxonomy's term | term `awesome` in `tags` taxonomy (`/tags/awesome/index.html`) | - -Four other page kinds unrelated to content are `robotsTXT`, `RSS`, `sitemap`, and `404`. Although primarily for internal use, you can specify the name when disabling one or more page kinds on your site. For example: - -{{< code-toggle file=hugo >}} -disableKinds = ['robotsTXT','404'] -{{< /code-toggle >}} diff --git a/content/en/content-management/_index.md b/content/en/content-management/_index.md index 21d0b8739..4e2060756 100644 --- a/content/en/content-management/_index.md +++ b/content/en/content-management/_index.md @@ -1,16 +1,8 @@ --- title: Content management - description: Hugo makes managing large static sites easy with support for archetypes, content types, menus, cross references, summaries, and more. categories: [] keywords: [] -menu: - docs: - identifier: content-management-in-this-section - parent: content-management - weight: 10 weight: 10 aliases: [/content/,/content/organization] --- - -A static site generator needs to extend beyond front matter and a couple of templates to be both scalable and *manageable*. Hugo was designed with not only developers in mind, but also content managers and authors. diff --git a/content/en/content-management/archetypes.md b/content/en/content-management/archetypes.md index 79f9722fd..5e25b54a5 100644 --- a/content/en/content-management/archetypes.md +++ b/content/en/content-management/archetypes.md @@ -1,14 +1,8 @@ --- title: Archetypes description: An archetype is a template for new content. -categories: [content management] -keywords: [archetypes,generators,metadata,front matter] -menu: - docs: - parent: content-management - weight: 140 -weight: 140 -toc: true +categories: [] +keywords: [] aliases: [/content/archetypes/] --- diff --git a/content/en/content-management/build-options.md b/content/en/content-management/build-options.md index 22f6ba65b..c003347ed 100644 --- a/content/en/content-management/build-options.md +++ b/content/en/content-management/build-options.md @@ -1,19 +1,19 @@ --- title: Build options description: Build options help define how Hugo must treat a given page when building the site. -categories: [content management,fundamentals] -keywords: [build,content,front matter, page resources] -menu: - docs: - parent: content-management - weight: 70 -weight: 70 -toc: true +categories: [] +keywords: [] aliases: [/content/build-options/] --- + + Build options are stored in a reserved front matter object named `build`[^1] with these defaults: +[^1]: The `_build` alias for `build` is deprecated and will be removed in a future release. + {{< code-toggle file=content/example/index.md fm=true >}} [build] list = 'always' @@ -24,35 +24,22 @@ render = 'always' list : When to include the page within page collections. Specify one of: - - `always` - : Include the page in _all_ page collections. For example, `site.RegularPages`, `.Pages`, etc. This is the default value. - - - `local` - : Include the page in _local_ page collections. For example, `.RegularPages`, `.Pages`, etc. Use this option to create fully navigable but headless content sections. - - - `never` - : Do not include the page in _any_ page collection. + - `always`: Include the page in _all_ page collections. For example, `site.RegularPages`, `.Pages`, etc. This is the default value. + - `local`: Include the page in _local_ page collections. For example, `.RegularPages`, `.Pages`, etc. Use this option to create fully navigable but headless content sections. + - `never`: Do not include the page in _any_ page collection. publishResources : Applicable to [page bundles], determines whether to publish the associated [page resources]. Specify one of: - - `true` - : Always publish resources. This is the default value. - - - `false` - : Only publish a resource when invoking its [`Permalink`], [`RelPermalink`], or [`Publish`] method within a template. + - `true`: Always publish resources. This is the default value. + - `false`: Only publish a resource when invoking its [`Permalink`], [`RelPermalink`], or [`Publish`] method within a template. render : When to render the page. Specify one of: - - `always` - : Always render the page to disk. This is the default value. - - - `link` - : Do not render the page to disk, but assign `Permalink` and `RelPermalink` values. - - - `never` - : Never render the page to disk, and exclude it from all page collections. + - `always`: Always render the page to disk. This is the default value. + - `link`: Do not render the page to disk, but assign `Permalink` and `RelPermalink` values. + - `never`: Never render the page to disk, and exclude it from all page collections. [page bundles]: /content-management/page-bundles/ [page resources]: /content-management/page-resources/ @@ -92,7 +79,7 @@ title = 'Headless page' To include the content and images on the home page: -{{< code file=layouts/_default/home.html >}} +{{< code file=layouts/_default/home.html >}} {{ with .Site.GetPage "/headless" }} {{ .Content }} {{ range .Resources.ByType "image" }} @@ -152,7 +139,7 @@ In the front matter above, note that we have set `list` to `local` to include th To include the content and images on the home page: -{{< code file=layouts/_default/home.html >}} +{{< code file=layouts/_default/home.html >}} {{ with .Site.GetPage "/headless" }} {{ range .Pages }} {{ .Content }} @@ -211,7 +198,7 @@ render = 'always' To render the glossary: -{{< code file=layouts/glossary/list.html >}} +{{< code file=layouts/glossary/list.html >}}
{{ range .Pages }}
{{ .Title }}
@@ -296,7 +283,7 @@ title = 'Internal' [cascade.build] render = 'never' list = 'never' -[cascade._target] +[cascade.target] environment = 'production' {{< /code-toggle >}} @@ -318,5 +305,3 @@ public/ │ └── index.html └── index.html ``` - -[^1]: For historical reasons, `_build` is an alias for `build`. diff --git a/content/en/content-management/comments.md b/content/en/content-management/comments.md index 721f1fe5a..fee4fb372 100644 --- a/content/en/content-management/comments.md +++ b/content/en/content-management/comments.md @@ -1,14 +1,8 @@ --- title: Comments description: Hugo ships with an internal Disqus template, but this isn't the only commenting system that will work with your new Hugo website. -categories: [content management] -keywords: [sections,content,organization] -menu: - docs: - parent: content-management - weight: 220 -weight: 220 -toc: true +categories: [] +keywords: [] aliases: [/extras/comments/] --- @@ -31,9 +25,9 @@ shortname = 'your-disqus-shortname' For many websites, this is enough configuration. However, you also have the option to set the following in the [front matter] of a single content file: -* `disqus_identifier` -* `disqus_title` -* `disqus_url` +- `disqus_identifier` +- `disqus_title` +- `disqus_url` ### Render Hugo's built-in Disqus partial template @@ -67,7 +61,7 @@ Open-source commenting systems: - [Talkyard](https://blog-comments.talkyard.io/) - [Utterances](https://utteranc.es/) -[configuration]: /getting-started/configuration/ +[configuration]: /configuration/ [disquspartial]: /templates/embedded/#disqus [disqussetup]: https://disqus.com/profile/signup/ [forum]: https://discourse.gohugo.io diff --git a/content/en/content-management/content-adapters.md b/content/en/content-management/content-adapters.md index 7339b4c68..1163fb75a 100644 --- a/content/en/content-management/content-adapters.md +++ b/content/en/content-management/content-adapters.md @@ -1,14 +1,8 @@ --- title: Content adapters description: Create content adapters to dynamically add content when building your site. -categories: [content management] +categories: [] keywords: [] -menu: - docs: - parent: content-management - weight: 290 -weight: 290 -toc: true --- {{< new-in 0.126.0 />}} @@ -39,7 +33,7 @@ Each content adapter is named _content.gotmpl and uses the same [syntax] as temp Use these methods within a content adapter. -###### AddPage +### AddPage Adds a page to the site. @@ -57,7 +51,7 @@ Adds a page to the site. {{ .AddPage $page }} {{< /code >}} -###### AddResource +### AddResource Adds a page resource to the site. @@ -83,7 +77,7 @@ Then retrieve the new page resource with something like: {{ end }} {{< /code >}} -###### Site +### Site Returns the `Site` to which the pages will be added. @@ -95,7 +89,7 @@ Returns the `Site` to which the pages will be added. Note that the `Site` returned isn't fully built when invoked from the content adapters; if you try to call methods that depends on pages, e.g. `.Site.Pages`, you will get an error saying "this method cannot be called before the site is fully initialized". {{< /note >}} -###### Store +### Store Returns a persistent “scratch pad” to store and manipulate data. The main use case for this is to transfer values between executions when [EnableAllLanguages](#enablealllanguages) is set. See [examples](/methods/page/store/). @@ -104,7 +98,7 @@ Returns a persistent “scratch pad” to store and manipulate data. The main us {{ .Store.Get "key" }} {{< /code >}} -###### EnableAllLanguages +### EnableAllLanguages By default, Hugo executes the content adapter for the language defined by the _content.gotmpl file . Use this method to activate the content adapter for all languages. @@ -170,8 +164,9 @@ When setting the `path`, Hugo transforms the given string to a logical path. For Create pages from remote data, where each page represents a book review. -Step 1 -: Create the content structure. +### Step 1 + +Create the content structure. ```text content/ @@ -180,13 +175,13 @@ content/ └── _index.md ``` -Step 2 -: Inspect the remote data to determine how to map key-value pairs to front matter fields. +### Step 2 +Inspect the remote data to determine how to map key-value pairs to front matter fields.\ + -: +### Step 3 -Step 3 -: Create the content adapter. +Create the content adapter. {{< code file=content/books/_content.gotmpl copy=true >}} {{/* Get remote data. */}} @@ -243,8 +238,9 @@ Step 3 {{ end }} {{< /code >}} -Step 4 -: Create a single template to render each book review. +### Step 4 + +Create a single template to render each book review. {{< code file=layouts/books/single.html copy=true >}} {{ define "main" }} diff --git a/content/en/content-management/cross-references.md b/content/en/content-management/cross-references.md deleted file mode 100644 index 66a77924f..000000000 --- a/content/en/content-management/cross-references.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -title: Links and cross references -description: Shortcodes for creating links to documents. -categories: [content management] -keywords: [cross references,references,anchors,urls] -menu: - docs: - parent: content-management - weight: 170 -weight: 170 -toc: true -aliases: [/extras/crossreferences/] ---- - -The `ref` and `relref` shortcodes display the absolute and relative permalinks to a document, respectively. - -## Use of `ref` and `relref` - -The `ref` and `relref` shortcodes require a single argument: the path to a content document, with or without a file extension, with or without an anchor. Paths without a leading `/` are first resolved relative to the current page, then to the remainder of the site. - -```text -. -└── content - ├── about - | ├── _index.md - | └── credits.md - ├── pages - | ├── document1.md - | └── document2.md // has anchor #anchor - ├── products - | └── index.md - └── blog - └── my-post.md -``` - -The pages can be referenced as follows: - -```text -{{}} <-- From pages/document1.md, relative path -{{}} -{{}} -{{}} -{{}} <-- From pages/document2.md -{{}} <-- From anywhere, absolute path -{{}} -{{}} -{{}} -{{}} -{{}} -``` - -`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 -{{}} <-- References /about/_index.md -{{}} <-- Raises REF_NOT_FOUND error -{{}} <-- References /about/credits.md - -{{}} <-- References /products/index.md -{{}} <-- References /products/index.md -``` - -To generate a hyperlink using `ref` or `relref` in Markdown: - -```text -[About]({{}} "About Us") -``` - -Hugo emits an error or warning if a document cannot be uniquely resolved. The error behavior is configurable; see below. - -### Link to another language version - -Using `ref` or `relref` without specifying a language, will make the reference resolve to the language of the current content page. - -To link to another language version of a document, use this syntax: - -```text -{{}} -``` - -### Get another output format - -To link to another Output Format of a document, use this syntax: - -```text -{{}} -``` - -### Heading IDs - -When using Markdown document types, Hugo generates element IDs for every heading on a page. For example: - -```text -## Reference -``` - -produces this HTML: - -```html -

Reference

-``` - -Get the permalink to a heading by appending the ID to the path when using the `ref` or `relref` shortcodes: - -```text -{{}} -{{}} -``` - -Generate a custom heading ID by including an attribute. For example: - -```text -## Reference A {#foo} -## Reference B {id="bar"} -``` - -produces this HTML: - -```html -

Reference A

-

Reference B

-``` - -Hugo will generate unique element IDs if the same heading appears more than once on a page. For example: - -```text -## Reference -## Reference -## Reference -``` - -produces this HTML: - -```html -

Reference

-

Reference

-

Reference

-``` - -## Ref and RelRef Configuration - -The behavior can be configured in `hugo.toml`: - -refLinksErrorLevel ("ERROR") -: When using `ref` or `relref` to resolve page links and a link cannot be resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`). - -refLinksNotFoundURL -: URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is. diff --git a/content/en/content-management/data-sources.md b/content/en/content-management/data-sources.md index b6942aaa0..586fcc9d8 100644 --- a/content/en/content-management/data-sources.md +++ b/content/en/content-management/data-sources.md @@ -1,14 +1,8 @@ --- title: Data sources description: Use local and remote data sources to augment or create content. -categories: [content management] -keywords: [data,json,toml,yaml,xml] -menu: - docs: - parent: content-management - weight: 280 -weight: 280 -toc: true +categories: [] +keywords: [] aliases: [/extras/datafiles/,/extras/datadrivencontent/,/doc/datafiles/,/templates/data-templates/] --- diff --git a/content/en/content-management/diagrams.md b/content/en/content-management/diagrams.md index f9f3cd30f..4c233dbec 100644 --- a/content/en/content-management/diagrams.md +++ b/content/en/content-management/diagrams.md @@ -1,14 +1,8 @@ --- title: Diagrams description: Use fenced code blocks and Markdown render hooks to include diagrams in your content. -categories: [content management] -keywords: [diagrams,drawing] -menu: - docs: - parent: content-management - weight: 260 -weight: 260 -toc: true +categories: [] +keywords: [] --- ## GoAT diagrams (ASCII) @@ -57,7 +51,7 @@ Hugo does not provide a built-in template for Mermaid diagrams. Create your own {{ .Page.Store.Set "hasMermaid" true }} {{< /code >}} -And then include this snippet at the bottom of the content template: +And then include this snippet at the _bottom_ of the content template, before the closing `body` tag: ```go-html-template {{ if .Store.Get "hasMermaid" }} @@ -158,7 +152,7 @@ sequenceDiagram Created from -```goat { width=300 color="orange" } +```goat {width=300 color="orange"} ───Linux─┬─Android ├─Debian─┬─Ubuntu─┬─Lubuntu │ │ ├─Kubuntu @@ -173,7 +167,7 @@ Created from -```goat { class="w-40" } +```goat {class="w-40"} ┌─────┐ ┌───┐ │Alice│ │Bob│ └──┬──┘ └─┬─┘ @@ -238,7 +232,7 @@ Created from -```goat { class="w-80 dark-blue" } +```goat {class="w-80 dark-blue"} ┌────────────────────────────────────────────────┐ │ │ ├────────────────────────────────────────────────┤ diff --git a/content/en/content-management/formats.md b/content/en/content-management/formats.md index a1f203f3c..08f0a2432 100644 --- a/content/en/content-management/formats.md +++ b/content/en/content-management/formats.md @@ -1,14 +1,8 @@ --- title: Content formats description: Create your content using Markdown, HTML, Emacs Org Mode, AsciiDoc, Pandoc, or reStructuredText. -categories: [content management] -keywords: [markdown,asciidoc,pandoc,content format] -menu: - docs: - parent: content-management - weight: 40 -weight: 40 -toc: true +categories: [] +keywords: [] aliases: [/content/markdown-extras/,/content/supported-formats/,/doc/supported-formats/] --- @@ -58,13 +52,13 @@ Hugo provides custom Markdown features including: [Attributes]: /content-management/markdown-attributes/ [CommonMark]: https://spec.commonmark.org/current/ -[Extensions]: /getting-started/configuration-markup/#goldmark-extensions +[Extensions]: /configuration/markup/#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 +[configure goldmark]:/configuration/markup/#goldmark ### HTML @@ -98,8 +92,8 @@ hugo --logLevel info ``` [AsciiDoc]: https://asciidoc.org/ -[configure the AsciiDoc renderer]: /getting-started/configuration-markup/#asciidoc -[configure asciidoc]: /getting-started/configuration-markup/#asciidoc +[configure the AsciiDoc renderer]: /configuration/markup/#asciidoc +[configure asciidoc]: /configuration/markup/#asciidoc ### Pandoc @@ -128,14 +122,7 @@ Hugo passes these CLI flags when calling the rst2html executable: ## Classification -Content format|Media type|Identifier|File extensions -:--|:--|:--|:-- -Markdown|`text/markdown`|`markdown`|`markdown`,`md`, `mdown` -HTML|`text/html`|`html`|`htm`, `html` -Emacs Org Mode|`text/org`|`org`|`org` -AsciiDoc|`text/asciidoc`|`asciidoc`|`ad`, `adoc`, `asciidoc` -Pandoc|`text/pandoc`|`pandoc`|`pandoc`, `pdc` -reStructuredText|`text/rst`|`rst`|`rst` +{{% include "/_common/content-format-table.md" %}} When converting content to HTML, Hugo uses: diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md index 0493c3308..954364278 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -1,14 +1,8 @@ --- title: Front matter description: Use front matter to add metadata to your content. -categories: [content management] -keywords: [front matter,yaml,toml,json,metadata,archetypes] -menu: - docs: - parent: content-management - weight: 60 -weight: 60 -toc: true +categories: [] +keywords: [] aliases: [/content/front-matter/] --- @@ -51,210 +45,135 @@ The field names below are reserved. For example, you cannot create a custom fiel [parameters]: #parameters {{< /note >}} -###### aliases +aliases +: (`string array`) An array of one or more aliases, where each alias is a relative URL that will redirect the browser to the current location. Access these values from a template using the [`Aliases`] method on a `Page` object. See the [aliases] section for details. -(`string array`) An array of one or more aliases, where each alias is a relative URL that will redirect the browser to the current location. Access these values from a template using the [`Aliases`] method on a `Page` object. See the [aliases] section for details. +build +: (`map`) A map of [build options]. -[`aliases`]: /methods/page/aliases/ -[aliases]: /content-management/urls/#aliases +cascade +: (`map`) A map of front matter keys whose values are passed down to the page's descendants unless overwritten by self or a closer ancestor's cascade. See the [cascade] section for details. -###### build +date +: (`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. -(`map`) A map of [build options]. +description +: (`string`) Conceptually different than the page `summary`, the description is typically rendered within a `meta` element within the `head` element of the published HTML file. Access this value from a template using the [`Description`] method on a `Page` object. -[build options]: /content-management/build-options/ +draft +: (`bool`) Whether to disable rendering unless you pass the `--buildDrafts` flag to the `hugo` command. Access this value from a template using the [`Draft`] method on a `Page` object. -###### cascade {#cascade-field} +expiryDate +: (`string`) The page expiration date. On or after the expiration date, the page will not be rendered unless you pass the `--buildExpired` flag to the `hugo` command. 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 [`ExpiryDate`] method on a `Page` object. -(`map`) A map of front matter keys whose values are passed down to the page’s descendants unless overwritten by self or a closer ancestor’s cascade. See the [cascade] section for details. +headless +: (`bool`) Applicable to [leaf bundles], whether to set the `render` and `list` [build options] to `never`, creating a headless bundle of [page resources]. -[cascade]: #cascade +isCJKLanguage +: (`bool`) Whether 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. -###### date +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](g) to classify content. Access these values from a template using the [`Keywords`] method on a `Page` object. -(`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. +lastmod +: (`string`) The date that the page was last modified. 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 [`Lastmod`] method on a `Page` object. -[`date`]: /methods/page/date/ +layout +: (`string`) Provide a template name to [target a specific template], overriding the default [template lookup order]. Set the value to the base file name of the template, excluding its extension. Access this value from a template using the [`Layout`] method on a `Page` object. -###### description +linkTitle +: (`string`) Typically a shorter version of the `title`. Access this value from a template using the [`LinkTitle`] method on a `Page` object. -(`string`) Conceptually different than the page `summary`, the description is typically rendered within a `meta` element within the `head` element of the published HTML file. Access this value from a template using the [`Description`] method on a `Page` object. +markup +: (`string`) An identifier corresponding to one of the supported [content formats]. If not provided, Hugo determines the content renderer based on the file extension. -[`description`]: /methods/page/description/ +menus +: (`string`, `string array`, or `map`) If set, Hugo adds the page to the given menu or menus. See the [menus] page for details. -###### draft +modified +: Alias to [lastmod](#lastmod). -(`bool`) -If `true`, the page will not be rendered unless you pass the `--buildDrafts` flag to the `hugo` command. Access this value from a template using the [`Draft`] method on a `Page` object. +outputs +: (`string array`) The [output formats] to render. See [configure outputs] for more information. -[`draft`]: /methods/page/draft/ +params +: {{< new-in 0.123.0 />}} +: (`map`) A map of custom [page parameters]. -###### expiryDate +pubdate +: Alias to [publishDate](#publishdate). -(`string`) The page expiration date. On or after the expiration date, the page will not be rendered unless you pass the `--buildExpired` flag to the `hugo` command. 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 [`ExpiryDate`] method on a `Page` object. +publishDate +: (`string`) The page publication date. Before the publication date, the page will not be rendered unless you pass the `--buildFuture` flag to the `hugo` command. 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 [`PublishDate`] method on a `Page` object. -[`expirydate`]: /methods/page/expirydate/ +published +: Alias to [publishDate](#publishdate). -###### headless +resources +: (`map array`) An array of maps to provide metadata for [page resources]. -(`bool`) Applicable to [leaf bundles], if `true` this value sets the `render` and `list` [build options] to `never`, creating a headless bundle of [page resources]. +sitemap +: (`map`) A map of sitemap options. See the [sitemap templates] page for details. Access these values from a template using the [`Sitemap`] method on a `Page` object. -[leaf bundles]: /content-management/page-bundles/#leaf-bundles -[page resources]: /content-management/page-resources/ +slug +: (`string`) Overrides the last segment of the URL path. Not applicable to section pages. See the [URL management] page for details. Access this value from a template using the [`Slug`] method on a `Page` object. -###### isCJKLanguage +summary +: (`string`) Conceptually different than the page `description`, the summary either summarizes the content or serves as a teaser to encourage readers to visit the page. Access this value from a template using the [`Summary`] method 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. +title +: (`string`) The page title. Access this value from a template using the [`Title`] method on a `Page` object. -[`fuzzywordcount`]: /methods/page/wordcount/ -[`readingtime`]: /methods/page/readingtime/ -[`summary`]: /methods/page/summary/ -[`wordcount`]: /methods/page/wordcount/ +translationKey +: (`string`) An arbitrary value used to relate two or more translations of the same page, useful when the translated pages do not share a common path. Access this value from a template using the [`TranslationKey`] method on a `Page` object. -###### keywords +type +: (`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. -(`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. +unpublishdate +: Alias to [expirydate](#expirydate). -[`keywords`]: /methods/page/keywords/ +url +: (`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](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. - - - -###### lastmod - -(`string`) The date that the page was last modified. 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 [`Lastmod`] method on a `Page` object. - -[`lastmod`]: /methods/page/date/ - -###### layout - -(`string`) Provide a template name to [target a specific template], overriding the default [template lookup order]. Set the value to the base file name of the template, excluding its extension. Access this value from a template using the [`Layout`] method on a `Page` object. - -[`layout`]: /methods/page/layout/ -[template lookup order]: /templates/lookup-order/ -[target a specific template]: /templates/lookup-order/#target-a-template - -###### linkTitle - -(`string`) Typically a shorter version of the `title`. Access this value from a template using the [`LinkTitle`] method on a `Page` object. - -[`linktitle`]: /methods/page/linktitle/ - -###### markup - -(`string`) An identifier corresponding to one of the supported [content formats]. If not provided, Hugo determines the content renderer based on the file extension. - -[content formats]: /content-management/formats/#classification - -###### menus - -(`string`, `string array`, or `map`) If set, Hugo adds the page to the given menu or menus. See the [menus] page for details. - -[menus]: /content-management/menus/#define-in-front-matter - -###### modified - -Alias to [lastmod](#lastmod). - -###### outputs - -(`string array`) The [output formats] to render. - -[output formats]: /templates/output-formats/ - - - - -###### params - -{{< new-in 0.123.0 />}} - -(`map`) A map of custom [page parameters]. - -[page parameters]: #parameters - -###### pubdate - -Alias to [publishDate](#publishdate). - -###### publishDate - -(`string`) The page publication date. Before the publication date, the page will not be rendered unless you pass the `--buildFuture` flag to the `hugo` command. 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 [`PublishDate`] method on a `Page` object. - -[`publishdate`]: /methods/page/publishdate/ - -###### published - -Alias to [publishDate](#publishdate). - -###### resources - -(`map array`) An array of maps to provide metadata for [page resources]. - -[page-resources]: /content-management/page-resources/#page-resources-metadata - -###### sitemap - -(`map`) A map of sitemap options. See the [sitemap templates] page for details. Access these values from a template using the [`Sitemap`] method on a `Page` object. - -[sitemap templates]: /templates/sitemap/ -[`sitemap`]: /methods/page/sitemap/ - -###### slug - -(`string`) Overrides the last segment of the URL path. Not applicable to section pages. See the [URL management] page for details. Access this value from a template using the [`Slug`] method on a `Page` object. - -[`slug`]: /methods/page/slug/ [URL management]: /content-management/urls/#slug - -###### summary - -(`string`) Conceptually different than the page `description`, the summary either summarizes the content or serves as a teaser to encourage readers to visit the page. Access this value from a template using the [`Summary`] method on a `Page` object. - [`Summary`]: /methods/page/summary/ - -###### title - -(`string`) The page title. Access this value from a template using the [`Title`] method on a `Page` object. - +[`aliases`]: /methods/page/aliases/ +[`date`]: /methods/page/date/ +[`description`]: /methods/page/description/ +[`draft`]: /methods/page/draft/ +[`expirydate`]: /methods/page/expirydate/ +[`fuzzywordcount`]: /methods/page/wordcount/ +[`keywords`]: /methods/page/keywords/ +[`lastmod`]: /methods/page/date/ +[`layout`]: /methods/page/layout/ +[`linktitle`]: /methods/page/linktitle/ +[`publishdate`]: /methods/page/publishdate/ +[`readingtime`]: /methods/page/readingtime/ +[`sitemap`]: /methods/page/sitemap/ +[`slug`]: /methods/page/slug/ +[`summary`]: /methods/page/summary/ [`title`]: /methods/page/title/ - -###### translationKey - -(`string`) An arbitrary value used to relate two or more translations of the same page, useful when the translated pages do not share a common path. Access this value from a template using the [`TranslationKey`] method on a `Page` object. - [`translationkey`]: /methods/page/translationkey/ - -###### type - -(`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. - [`type`]: /methods/page/type/ - -###### unpublishdate - -Alias to [expirydate](#expirydate). - -###### url - -(`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](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. - [`weight`]: /methods/page/weight/ +[`wordcount`]: /methods/page/wordcount/ +[aliases]: /content-management/urls/#aliases +[build options]: /content-management/build-options/ +[cascade]: #cascade-1 +[configure outputs]: /configuration/outputs/#outputs-per-page +[content formats]: /content-management/formats/#classification +[leaf bundles]: /content-management/page-bundles/#leaf-bundles +[menus]: /content-management/menus/#define-in-front-matter +[output formats]: /configuration/output-formats/ +[page parameters]: #parameters +[page resources]: /content-management/page-resources/#metadata +[sitemap templates]: /templates/sitemap/ +[target a specific template]: /templates/lookup-order/#target-a-template +[template lookup order]: /templates/lookup-order/ ## Parameters @@ -340,69 +259,73 @@ Access taxonomy terms from a template using the [`Params`] or [`GetTerms`] metho ## Cascade -Any [node](g) can pass down to its descendants a set of front matter values. +A [node](g) can cascade front matter values to its descendants. However, this cascading will be prevented if the descendant already defines the field, or if a closer ancestor node has already cascaded a value for that same field. -### Target specific pages - -The `cascade` block can be an array with an optional `_target` keyword, allowing you to target different page sets while cascading values. +For example, to cascade a "color" parameter from the home page to all its descendants: {{< code-toggle file=content/_index.md fm=true >}} -title ="Home" +title = 'Home' +[cascade.params] +color = 'red' +{{< /code-toggle >}} + +### Target + + + +The `target`[^1] keyword allows you to target specific pages or [environments](g). For example, to cascade a "color" parameter from the home page only to pages within the "articles" section, including the "articles" section page itself: + +[^1]: The `_target` alias for `target` is deprecated and will be removed in a future release. + +{{< code-toggle file=content/_index.md fm=true >}} +title = 'Home' +[cascade.params] +color = 'red' +[cascade.target] +path = '{/articles,/articles/**}' +{{< /code-toggle >}} + +Use any combination of these keywords to target pages and/or environments: + +environment +: (`string`) A [glob](g) pattern matching the build [environment](g). For example: `{staging,production}`. + +kind +: (`string`) A [glob](g) pattern matching the [page kind](g). For example: ` {taxonomy,term}`. + +path +: (`string`) A [glob](g) pattern matching the page's [logical path](g). For example: `{/books,/books/**}`. + +### Array + +Define an array of cascade parameters to apply different values to different targets. For example: + +{{< code-toggle file=content/_index.md fm=true >}} +title = 'Home' [[cascade]] [cascade.params] -background = "yosemite.jpg" -[cascade._target] -path="/articles/**" -lang="en" -kind="page" +color = 'red' +[cascade.target] +path = '{/books/**}' +kind = 'page' [[cascade]] [cascade.params] -background = "goldenbridge.jpg" -[cascade._target] -kind="section" -{{}} - -Use any combination of these keywords to target a set of pages: - -###### path {#cascade-path} - -(`string`) A [Glob](https://github.com/gobwas/glob) pattern matching the content path below /content. Expects Unix-styled slashes. Note that this is the virtual path, so it starts at the mount root. The matching supports double-asterisks so you can match for patterns like `/blog/*/**` to match anything from the third level and down. - -###### kind {#cascade-kind} - -(`string`) A Glob pattern matching the Page's Kind(s), e.g. "{home,section}". - -###### lang {#cascade-lang} - -(`string`) A Glob pattern matching the Page's language, e.g. "{en,sv}". - -###### environment {#cascade-environment} - -(`string`) A Glob pattern matching the build environment, e.g. "{production,development}" - -Any of the above can be omitted. +color = 'blue' +[cascade.target] +path = '{/films/**}' +kind = 'page' +{{< /code-toggle >}} {{< note >}} -With a multilingual site it may be more efficient to define the `cascade` values in your site configuration to avoid duplicating the `cascade` values on the section, taxonomy, or term page for each language. +For multilingual sites, defining cascade values in your site configuration is often more efficient. This avoids repeating the same cascade values on the home, section, taxonomy, or term page for each language. See [details](/configuration/cascade/). -With a multilingual site, if you choose to define the `cascade` values in front matter, you must create a section, taxonomy, or term page for each language; the `lang` keyword is ignored. +If you choose to define cascade values in front matter for a multilingual site, you must create a corresponding home, section, taxonomy, or term page for every language. {{< /note >}} -### Example - -{{< code-toggle file=content/posts/_index.md fm=true >}} -date = 2024-02-01T21:25:36-08:00 -title = 'Posts' -[cascade] - [cascade.params] - banner = 'images/typewriter.jpg' -{{}} - -With the above example the posts section page and its descendants will return `images/typewriter.jpg` when `.Params.banner` is invoked unless: - -- Said descendant has its own `banner` value set -- Or a closer ancestor node has its own `cascade.banner` value set. - ## Emacs Org Mode If your [content format] is [Emacs Org Mode], you may provide front matter using Org Mode keywords. For example: @@ -432,9 +355,9 @@ Note that you can also specify array elements on a single line: When populating a date field, whether a [custom page parameter](#parameters) or one of the four predefined fields ([`date`](#date), [`expiryDate`](#expirydate), [`lastmod`](#lastmod), [`publishDate`](#publishdate)), use one of these parsable formats: -{{% include "functions/time/_common/parsable-date-time-strings.md" %}} +{{% include "/_common/parsable-date-time-strings.md" %}} -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: +To override the default time zone, set the [`timeZone`](/configuration/all/#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 1. The time zone specified in your site configuration diff --git a/content/en/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md index 05f40cd73..3549f35e6 100644 --- a/content/en/content-management/image-processing/index.md +++ b/content/en/content-management/image-processing/index.md @@ -1,14 +1,8 @@ --- title: Image processing description: Resize, crop, rotate, filter, and convert images. -categories: [content management,fundamentals] -keywords: [resources,images] -menu: - docs: - parent: content-management - weight: 90 -toc: true -weight: 90 +categories: [] +keywords: [] --- ## Image resources @@ -17,7 +11,7 @@ To process an image you must access the file as a page resource, global resource ### Page resource -A page resource is a file within a [page bundle]. A page bundle is a directory with an `index.md` or `_index.md` file at its root. +{{% glossary-term "page resource" %}} ```text content/ @@ -35,7 +29,7 @@ To access an image as a page resource: ### Global resource -A global resource is a file within the `assets` directory, or within any directory [mounted] to the `assets` directory. +{{% glossary-term "global resource" %}} ```text assets/ @@ -51,7 +45,9 @@ To access an image as a global resource: ### Remote resource -A remote resource is a file on a remote server, accessible via HTTP or HTTPS. To access an image as a remote resource: +{{% glossary-term "remote resource" %}} + +To access an image as a remote resource: ```go-html-template {{ $image := resources.GetRemote "https://gohugo.io/img/hugo-logo.png" }} @@ -413,58 +409,9 @@ _The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pe {{< imgproc path="sunset.jpg" spec="resize 360x q10" alt="A sunset" />}} -## Imaging configuration +## Configuration -### Processing options - -Define an `imaging` section in your site configuration to set the default [image processing options](#image-processing-options). - -{{< code-toggle config=imaging />}} - -anchor -: See image processing options: [anchor](#anchor). - -bgColor -: See image processing options: [background color](#background-color). - -hint -: See image processing options: [hint](#hint). - -quality -: See image processing options: [quality](#quality). - -resampleFilter -: See image processing options: [resampling filter](#resampling-filter). - -### EXIF data - -Define an `imaging.exif` section in your site configuration to control the availability of EXIF data. - -{{< code-toggle file=hugo >}} -[imaging.exif] -includeFields = "" -excludeFields = "" -disableDate = false -disableLatLong = false -{{< /code-toggle >}} - -disableDate -: Hugo extracts the image creation date/time into `.Date`. Set this to `true` to disable. Default is `false`. - -disableLatLong -: Hugo extracts the GPS latitude and longitude into `.Lat` and `.Long`. Set this to `true` to disable. Default is `false`. - -excludeFields -: Regular expression matching the EXIF tags to exclude from the `.Tags` collection. Default is `""`. - -includeFields -: Regular expression matching the EXIF tags to include in the `.Tags` collection. Default is `""`. To include all available tags, set this value to `".*"`. - - {{< note >}} - To improve performance and decrease cache size, Hugo excludes the following tags: `ColorSpace`, `Contrast`, `Exif`, `Exposure[M|P|B]`, `Flash`, `GPS`, `JPEG`, `Metering`, `Resolution`, `Saturation`, `Sensing`, `Sharp`, and `WhiteBalance`. - - To control tag availability, change the `excludeFields` or `includeFields` settings as described above. - {{< /note >}} +See [configure imaging](/configuration/imaging). ## Smart cropping of images @@ -487,7 +434,7 @@ hugo --gc ``` [`anchor`]: /content-management/image-processing#anchor -[mounted]: /hugo-modules/configuration#module-configuration-mounts +[mounted]: /configuration/module/#mounts [page bundle]: /content-management/page-bundles/ [`lang.FormatNumber`]: /functions/lang/formatnumber/ [filters]: /functions/images/filter/#image-filters @@ -502,5 +449,5 @@ hugo --gc [`Filter`]: #filter [`Fit`]: #fit [`Resize`]: #resize -[site configuration]: #processing-options +[site configuration]: /configuration/imaging/ [`with`]: /functions/go-template/with/ diff --git a/content/en/content-management/markdown-attributes.md b/content/en/content-management/markdown-attributes.md index a465f244d..f52a48f17 100644 --- a/content/en/content-management/markdown-attributes.md +++ b/content/en/content-management/markdown-attributes.md @@ -1,14 +1,8 @@ --- title: Markdown attributes description: Use Markdown attributes to add HTML attributes when rendering Markdown to HTML. -categories: [content management] -keywords: [goldmark,markdown] -menu: - docs: - parent: content-management - weight: 240 -weight: 240 -toc: true +categories: [] +keywords: [] --- ## Overview diff --git a/content/en/content-management/mathematics.md b/content/en/content-management/mathematics.md index a8c1066b5..5c9e71bd7 100644 --- a/content/en/content-management/mathematics.md +++ b/content/en/content-management/mathematics.md @@ -2,15 +2,8 @@ title: Mathematics in Markdown linkTitle: Mathematics description: Include mathematical equations and expressions in Markdown using LaTeX markup. -categories: [content management] -keywords: [katex,latex,math,mathjax,typesetting] -menu: - docs: - parent: content-management - weight: 270 -weight: 270 -toc: true -math: true +categories: [] +keywords: [] --- {{< new-in 0.122.0 />}} @@ -55,7 +48,7 @@ The first approach is described below. Follow these instructions to include mathematical equations and expressions in your Markdown using LaTeX markup. -###### Step 1 +### Step 1 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. @@ -94,7 +87,7 @@ block = [['@@', '@@']] inline = [['@', '@']] {{< /code-toggle >}} -###### Step 2 +### Step 2 Create a partial template to load MathJax or KaTeX. The example below loads MathJax, or you can use KaTeX as described in the [engines](#engines) section. @@ -115,7 +108,7 @@ Create a partial template to load MathJax or KaTeX. The example below loads Math The delimiters above must match the delimiters in your site configuration. -###### Step 3 +### Step 3 Conditionally call the partial template from the base template. @@ -131,7 +124,7 @@ Conditionally call the partial template from the base template. The example above loads the partial template if you have set the `math` parameter in front matter to `true`. If you have not set the `math` parameter in front matter, the conditional statement falls back to the `math` parameter in your site configuration. -###### Step 4 +### Step 4 Include mathematical equations and expressions in Markdown using LaTeX markup. @@ -248,4 +241,4 @@ As shown in [Step 2] above, MathJax supports chemical equations without addition [Step 1]: #step-1 [Step 2]: #step-2 [Step 3]: #step-3 -[passthrough extension]: /getting-started/configuration-markup/#passthrough +[passthrough extension]: /configuration/markup/#passthrough diff --git a/content/en/content-management/menus.md b/content/en/content-management/menus.md index 1f7b339be..2defcfd12 100644 --- a/content/en/content-management/menus.md +++ b/content/en/content-management/menus.md @@ -1,14 +1,8 @@ --- title: Menus -description: Create menus by defining entries, localizing each entry, and rendering the resulting data structure. -categories: [content management] -keywords: [menus] -menu: - docs: - parent: content-management - weight: 190 -weight: 190 -toc: true +description: Create menus by defining entries, localizing each entry, and rendering the resulting data structure. +categories: [] +keywords: [] aliases: [/extras/menus/] --- @@ -66,35 +60,13 @@ Access the entry with `site.Menus.main` and `site.Menus.footer` in your template The configuration key in the examples above is `menus`. The `menu` (singular) configuration key is an alias for `menus`. {{< /note >}} -### Properties {#properties-front-matter} +### Properties Use these properties when defining menu entries in front matter: -identifier -: (`string`) Required when two or more menu entries have the same `name`, or when localizing the `name` using translation tables. Must start with a letter, followed by letters, digits, or underscores. +{{% include "/_common/menu-entry-properties.md" %}} -name -: (`string`) The text to display when rendering the menu entry. - -params -: (`map`) User-defined properties for the menu entry. - -parent -: (`string`) The `identifier` of the parent menu entry. If `identifier` is not defined, use `name`. Required for child entries in a nested menu. - -post -: (`string`) The HTML to append when rendering the menu entry. - -pre -: (`string`) The HTML to prepend when rendering the menu entry. - -title -: (`string`) The HTML `title` attribute of the rendered menu entry. - -weight -: (`int`) A non-zero integer indicating the entry's position relative the root of the menu, or to its parent for a child entry. Lighter entries float to the top, while heavier entries sink to the bottom. - -### Example {#example-front-matter} +### Example This front matter menu entry demonstrates some of the available properties: @@ -112,111 +84,7 @@ Access the entry with `site.Menus.main` in your templates. See [menu templates] ## Define in site configuration -To define entries for the "main" menu: - -{{< code-toggle file=hugo >}} -[[menus.main]] -name = 'Home' -pageRef = '/' -weight = 10 - -[[menus.main]] -name = 'Products' -pageRef = '/products' -weight = 20 - -[[menus.main]] -name = 'Services' -pageRef = '/services' -weight = 30 -{{< /code-toggle >}} - -This creates a menu structure that you can access with `site.Menus.main` in your templates. See [menu templates] for details. - -To define entries for the "footer" menu: - -{{< code-toggle file=hugo >}} -[[menus.footer]] -name = 'Terms' -pageRef = '/terms' -weight = 10 - -[[menus.footer]] -name = 'Privacy' -pageRef = '/privacy' -weight = 20 -{{< /code-toggle >}} - -This creates a menu structure that you can access with `site.Menus.footer` in your templates. See [menu templates] for details. - -{{< note >}} -The configuration key in the examples above is `menus`. The `menu` (singular) configuration key is an alias for `menus`. -{{< /note >}} - -### Properties {#properties-site-configuration} - -{{< note >}} -The [properties available to entries defined in front matter] are also available to entries defined in site configuration. - -[properties available to entries defined in front matter]: /content-management/menus/#properties-front-matter -{{< /note >}} - -Each menu entry defined in site configuration requires two or more properties: - -- Specify `name` and `pageRef` for internal links -- Specify `name` and `url` for external links - -pageRef -: (`string`) The logical path of the target page, relative to the `content` directory. Omit language code and file extension. Required for *internal* links. - -Kind|pageRef -:--|:-- -home|`/` -page|`/books/book-1` -section|`/books` -taxonomy|`/tags` -term|`/tags/foo` - -url -: (`string`) Required for *external* links. - -### Example {#example-site-configuration} - -This nested menu demonstrates some of the available properties: - -{{< code-toggle file=hugo >}} -[[menus.main]] -name = 'Products' -pageRef = '/products' -weight = 10 - -[[menus.main]] -name = 'Hardware' -pageRef = '/products/hardware' -parent = 'Products' -weight = 1 - -[[menus.main]] -name = 'Software' -pageRef = '/products/software' -parent = 'Products' -weight = 2 - -[[menus.main]] -name = 'Services' -pageRef = '/services' -weight = 20 - -[[menus.main]] -name = 'Hugo' -pre = '' -url = 'https://gohugo.io/' -weight = 30 -[menus.main.params] -rel = 'external' -{{< /code-toggle >}} - -This creates a menu structure that you can access with `site.Menus.main` in your templates. See [menu templates] for details. +See [configure menus](/configuration/menus/). ## Localize diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md index e532da5af..9a5d1a0e6 100644 --- a/content/en/content-management/multilingual.md +++ b/content/en/content-management/multilingual.md @@ -2,217 +2,14 @@ title: Multilingual mode linkTitle: Multilingual description: Localize your project for each language and region, including translations, images, dates, currencies, numbers, percentages, and collation sequence. Hugo's multilingual framework supports single-host and multihost configurations. -categories: [content management] -keywords: [multilingual,i18n,internationalization] -menu: - docs: - parent: content-management - weight: 230 -weight: 230 -toc: true +categories: [] +keywords: [] aliases: [/content/multilingual/,/tutorials/create-a-multilingual-site/] --- -## Configure languages +## Configuration -This is the default language configuration: - -{{< code-toggle config=languages />}} - -In the above, `en` is the language key. - -Language keys must conform to the syntax described in [RFC 5646]. For example: - -- `en` -- `en-US` - -Artificial languages with private use subtags as defined in [RFC 5646 § 2.2.7] are also supported. Omit the `art-x-` prefix from the language key. For example: - -- `hugolang` - -{{< note >}} -Private use subtags must not exceed 8 alphanumeric characters. -{{< /note >}} - -[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1 -[RFC 5646 § 2.2.7]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.2.7 - -This is an example of a site configuration for a multilingual project. Any key not defined in a `languages` object will fall back to the global value in the root of your site configuration. - -{{< code-toggle file=hugo >}} -defaultContentLanguage = 'de' -defaultContentLanguageInSubdir = true - -[languages.de] -contentDir = 'content/de' -disabled = false -languageCode = 'de-DE' -languageDirection = 'ltr' -languageName = 'Deutsch' -title = 'Projekt Dokumentation' -weight = 1 - -[languages.de.params] -subtitle = 'Referenz, Tutorials und Erklärungen' - -[languages.en] -contentDir = 'content/en' -disabled = false -languageCode = 'en-US' -languageDirection = 'ltr' -languageName = 'English' -title = 'Project Documentation' -weight = 2 - -[languages.en.params] -subtitle = 'Reference, Tutorials, and Explanations' -{{< /code-toggle >}} - -defaultContentLanguage -: (`string`) The project's default language key, conforming to the syntax described in [RFC 5646]. This value must match one of the defined language keys. Examples: - -- `en` -- `en-GB` -- `pt-BR` - -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]. - -disabled -: (`bool`) If `true`, Hugo will not render content for this language. Default is `false`. - -languageCode -: (`string`) The language tag as described in [RFC 5646]. This value does not affect localization or URLs. Hugo uses this value to populate the `language` element in the [built-in RSS template], and the `lang` attribute of the `html` element in the [built-in alias template]. Examples: - -- `en` -- `en-GB` -- `pt-BR` - -languageDirection -: (`string`) The language direction, either left-to-right (`ltr`) or right-to-left (`rtl`). Use this value in your templates with the global [`dir`] HTML attribute. - -languageName -: (`string`) The language name, typically used when rendering a language switcher. - -title -: (`string`) The site title for this language (optional). - -weight -: (`int`) The language weight. When set to a non-zero value, this is the primary sort criteria for this language. - -[`dir`]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir -[built-in RSS template]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml -[built-in alias template]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/alias.html -[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1 -[translating by file name]: #translation-by-file-name - -### Site parameters - -Set language-specific site parameters under each language's `params` key: - -{{< code-toggle file=hugo >}} -[params] -color = "red" - -[languages] - [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 >}} - -When building the English site: - -```go-html-template -{{ site.Params.color }} --> red -{{ site.Params.subtitle }} --> Reference, Tutorials, and Explanations -``` - -When building the German site: - -```go-html-template -{{ site.Params.color }} --> blue -{{ site.Params.subtitle }} --> 'Referenz, Tutorials und Erklärungen' -``` - -### Disable a language - -To disable a language within a `languages` object in your site configuration: - -{{< code-toggle file=hugo >}} -[languages.es] -disabled = true -{{< /code-toggle >}} - -To disable one or more languages in the root of your site configuration: - -{{< code-toggle file=hugo >}} -disableLanguages = ["es", "fr"] -{{< /code-toggle >}} - -To disable one or more languages using an environment variable: - -```sh -HUGO_DISABLELANGUAGES="es fr" hugo -``` - -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 >}} -If a `baseURL` is set on the `language` level, then all languages must have one and they must all be different. -{{< /note >}} - -Example: - -{{< code-toggle file=hugo >}} -[languages] - [languages.en] - baseURL = 'https://en.example.org/' - languageName = 'English' - title = 'In English' - weight = 2 - [languages.fr] - baseURL = 'https://fr.example.org' - languageName = 'Français' - title = 'En Français' - weight = 1 -{{}} - -With the above, the two sites will be generated into `public` with their own root: - -```text -public -├── en -└── fr -``` - -**All URLs (i.e `.Permalink` etc.) will be generated from that root. So the English home page above will have its `.Permalink` set to `https://example.org/`.** - -When you run `hugo server` we will start multiple HTTP servers. You will typically see something like this in the console: - -```text -Web Server is available at 127.0.0.1:1313 (bind address 127.0.0.1) fr -Web Server is available at 127.0.0.1:1314 (bind address 127.0.0.1) en -Press Ctrl+C to stop -``` - -Live reload and `--navigateToChanged` between the servers work as expected. +See [configure languages](/configuration/languages/). ## Translate your content @@ -276,7 +73,7 @@ Considering the following example: 1. `/content/om.nn.md` 1. `/content/presentation/a-propos.fr.md` -{{< code-toggle >}} +{{< code-toggle file=hugo >}} translationKey: "about" {{< /code-toggle >}} @@ -305,14 +102,14 @@ At render, Hugo will build both `/about/` and `/fr/a-propos/` without affecting ### Page bundles -To avoid the burden of having to duplicate files, each Page Bundle inherits the resources of its linked translated pages' bundles except for the content files (Markdown files, HTML files etc...). +To avoid the burden of having to duplicate files, each Page Bundle inherits the resources of its linked translated pages' bundles except for the content files (Markdown files, HTML files etc.). Therefore, from within a template, the page will have access to the files from all linked pages' bundles. If, across the linked bundles, two or more files share the same basename, only one will be included and chosen as follows: -* File from current language bundle, if present. -* First file found across bundles by order of language `Weight`. +- File from current language bundle, if present. +- First file found across bundles by order of language `Weight`. {{< note >}} Page Bundle resources follow the same language assignment logic as content files, both by file name (`image.jpg`, `image.fr.jpg`) and by directory (`english/about/header.jpg`, `french/about/header.jpg`). @@ -384,7 +181,7 @@ weight = 3 With this front matter: -{{< code-toggle >}} +{{< code-toggle file=hugo >}} date = 2021-11-03T12:34:56+01:00 {{< /code-toggle >}} @@ -538,7 +335,7 @@ pageRef = '/services' weight = 20 {{< /code-toggle >}} -[configuration directory]: /getting-started/configuration/#configuration-directory +[configuration directory]: /configuration/introduction/#configuration-directory ### Use translation tables @@ -605,8 +402,8 @@ i18n|MISSING_TRANSLATION|en|wordCount To support Multilingual mode in your themes, some considerations must be taken for the URLs in the templates. If there is more than one language, URLs must meet the following criteria: -* Come from the built-in `.Permalink` or `.RelPermalink` -* Be constructed with the [`relLangURL`] or [`absLangURL`] template function, or be prefixed with `{{ .LanguagePrefix }}` +- Come from the built-in `.Permalink` or `.RelPermalink` +- Be constructed with the [`relLangURL`] or [`absLangURL`] template function, or be prefixed with `{{ .LanguagePrefix }}` If there is more than one language defined, the `LanguagePrefix` method will return `/en` (or whatever the current language is). If not enabled, it will be an empty string (and is therefore harmless for single-language Hugo websites). @@ -627,7 +424,7 @@ hugo new content content/de/post/test.md ``` [`abslangurl`]: /functions/urls/abslangurl/ -[config]: /getting-started/configuration/ +[config]: /configuration/ [go-i18n-source]: https://github.com/nicksnyder/go-i18n [go-i18n]: https://github.com/nicksnyder/go-i18n [Hugo Multilingual Part 1: Content translation]: https://regisphilibert.com/blog/2018/08/hugo-multilingual-part-1-managing-content-translation/ @@ -639,6 +436,5 @@ hugo new content content/de/post/test.md [lang.FormatPercent]: /functions/lang/formatpercent/ [lang.Merge]: /functions/lang/merge/ [menus]: /content-management/menus/ -[OS environment]: /getting-started/configuration/#configure-with-environment-variables [`rellangurl`]: /functions/urls/rellangurl/ [`time.Format`]: /functions/time/format/ diff --git a/content/en/content-management/organization/1-featured-content-bundles.png b/content/en/content-management/organization/1-featured-content-bundles.png deleted file mode 100644 index 501e671e2f4cefe1789f168a7eee86222dff82ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34394 zcmcG$cT`i|w=RqbDxjb!AYJJ_8k+Rj=q2FQ&%ukXUTTw{w7MZ zT=pWTxVb@ph4d=s+Hy}*ti<|?9wvD%$M=pqD_doldM&_OhRR;*j#;Yqm2CTO-|aFm zZ(Cd4e`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27*>*P~G-fFuAtCg2l27EQaY!Ci{A#lq9&G%BswOw3q3 zs$P;JE9@!&@7lIwnxUdOL2phjQeNS7d~i{JSLkll2&7niG_NFb5^4H<5WVZ2Mc z)I!GJc~$RmK9o)TVyQUi@-Y78uaCD72}KQF(sY#updn4a8}=kci{MgSu9YDdxuh4| zvsDIlcg#+rbC-s-EdAsp*9Vbl2PqvD7|P5eI9QokB^Uz>zB6D|-Y4QAjC(tmR_OU~ zG~XzvAm{<^x4J@_q!1euk`#I1O}*}?clWEpca1v<$r39VBu4_Vy^U(0Et6_D%#0ts zm)sw#pN^j?TIN?w2>it4({I(#sL$3mMIYiP0?(2ja#}Ya$<@c;NJ9`+!jWjo0GGpU8Q1Iw=$1xDiNcN^9EHaT(soe@!x5SSzNu2rskXj;Lnh z@HA$#iv1Zng^mNS{9he#Y~jrRp9AK0B?lr*!1Dmp7X6VfQt%rc!~yH=zxduokaW)0 zHYqynM1PGr0{9<&5PDzqzkmJxA9lHa54{iCZT*jX{)eN`dtYw;KaY>z^Z#-Qn1S9# Zo%#X@Iw*G^7J@!RR!T{-Sp22`{{lr$7?1z} diff --git a/content/en/content-management/organization/index.md b/content/en/content-management/organization/index.md index 5d4f65a2d..1cbce5f09 100644 --- a/content/en/content-management/organization/index.md +++ b/content/en/content-management/organization/index.md @@ -2,14 +2,8 @@ title: Content organization linkTitle: Organization description: Hugo assumes that the same structure that works to organize your source content is used to organize the rendered site. -categories: [content management,fundamentals] -keywords: [sections,content,organization,bundle,resources] -menu: - docs: - parent: content-management - weight: 20 -weight: 20 -toc: true +categories: [] +keywords: [] aliases: [/content/sections/] --- @@ -71,7 +65,7 @@ The following demonstrates the relationships between your content organization a ### Index pages: `_index.md` -`_index.md` has a special role in Hugo. It allows you to add front matter and content to `home`, `section`, `taxonomy`, and `term` pages. +`_index.md` has a special role in Hugo. It allows you to add front matter and content to `home`, `section`, `taxonomy`, and `term` pages. {{< note >}} **Tip:** You can get a reference to the content and metadata in `_index.md` using the [`.Site.GetPage` function](/methods/page/getpage). @@ -143,16 +137,16 @@ The `slug` is the last segment of the URL path, defined by the file name and opt ### `path` -A content's `path` is determined by the section's path to the file. The file `path` +A content's `path` is determined by the section's path to the file. The file `path`: -* is based on the path to the content's location AND -* does not include the slug +- Is based on the path to the content's location AND +- Does not include the slug ### `url` The `url` is the entire URL path, defined by the file path and optionally overridden by a `url` value in front matter. See [URL Management](/content-management/urls/#slug) for details. -[config]: /getting-started/configuration/ +[config]: /configuration/ [formats]: /content-management/formats/ [front matter]: /content-management/front-matter/ [getpage]: /methods/page/getpage/ diff --git a/content/en/content-management/page-bundles.md b/content/en/content-management/page-bundles.md index d08db5cf4..da34646aa 100644 --- a/content/en/content-management/page-bundles.md +++ b/content/en/content-management/page-bundles.md @@ -1,14 +1,8 @@ --- title: Page bundles description: Use page bundles to logically associate one or more resources with content. -categories: [content management] -keywords: [page,bundle,leaf,branch] -menu : - docs: - parent: content-management - weight: 30 -weight: 30 -toc: true +categories: [] +keywords: [] --- ## Introduction @@ -33,7 +27,7 @@ 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. 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](g). For example, use `index.md` for Markdown content, `index.html` for HTML content, `index.adoc` for AsciiDoc content, etc. @@ -94,13 +88,13 @@ about my-post : 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 + - content-1, content-2 - These are resources of resource type `page`, accessible via the [`Resources`] method on the `Page` object. Hugo will not render these as individual pages. + These are resources of resource type `page`, accessible via the [`Resources`] method on the `Page` object. Hugo will not render these as individual pages. -- image-1, image-2 + - image-1, image-2 - These are resources of resource type `image`, accessible via the `Resources` method on the `Page` object + These are resources of resource type `image`, accessible via the `Resources` method on the `Page` object my-other-post : This leaf bundle does not contain any page resources. @@ -114,7 +108,7 @@ Create leaf bundles at any depth within the `content` directory, but a leaf bund ## 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/ diff --git a/content/en/content-management/page-resources.md b/content/en/content-management/page-resources.md index 978edad30..174612594 100644 --- a/content/en/content-management/page-resources.md +++ b/content/en/content-management/page-resources.md @@ -1,14 +1,8 @@ --- title: Page resources description: Use page resources to logically associate assets with a page. -categories: [content management] -keywords: [bundle,content,resources] -menu: - docs: - parent: content-management - weight: 80 -weight: 80 -toc: true +categories: [] +keywords: [] --- Page resources are only accessible from [page bundles](/content-management/page-bundles), those directories with `index.md` or @@ -46,7 +40,7 @@ Use any of these methods on a `Page` object to capture page resources: - [`Resources.GetMatch`] - [`Resources.Match`] - Once you have captured a resource, use any of the applicable [`Resource`] methods to return a value or perform an action. + Once you have captured a resource, use any of the applicable [`Resource`] methods to return a value or perform an action. [`Resource`]: /methods/resource [`Resources.ByType`]: /methods/page/resources#bytype diff --git a/content/en/content-management/related-content.md b/content/en/content-management/related-content.md new file mode 100644 index 000000000..6552f7bb1 --- /dev/null +++ b/content/en/content-management/related-content.md @@ -0,0 +1,103 @@ +--- +title: Related content +description: List related content in "See Also" sections. +categories: [] +keywords: [] +aliases: [/content/related/,/related/,/content-management/related/] +--- + +Hugo uses a set of factors to identify a page's related content based on front matter parameters. This can be tuned to the desired set of indices and parameters or left to Hugo's default [related content configuration](/configuration/related-content/). + +## List related content + +To list up to 5 related pages (which share the same _date_ or _keyword_ parameters) is as simple as including something similar to this partial in your template: + +{{< code file=layouts/partials/related.html copy=true >}} +{{ with site.RegularPages.Related . | first 5 }} +

Related content:

+ +{{ end }} +{{< /code >}} + +The `Related` method takes one argument which may be a `Page` or an options map. The options map has these options: + +indices +: (`slice`) The indices to search within. + +document +: (`page`) The page for which to find related content. Required when specifying an options map. + +namedSlices +: (`slice`) The keywords to search for, expressed as a slice of `KeyValues` using the [`keyVals`] function. + +fragments +: (`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. + +[`keyVals`]: /functions/collections/keyvals/ + +A fictional example using all of the above options: + +```go-html-template +{{ $page := . }} +{{ $opts := dict + "indices" (slice "tags" "keywords") + "document" $page + "namedSlices" (slice (keyVals "tags" "hugo" "rocks") (keyVals "date" $page.Date)) + "fragments" (slice "heading-1" "heading-2") +}} +``` + +{{< note >}} +We improved and simplified this feature in Hugo 0.111.0. Before this we had 3 different methods: `Related`, `RelatedTo` and `RelatedIndices`. Now we have only one method: `Related`. The old methods are still available but deprecated. Also see [this blog article](https://regisphilibert.com/blog/2018/04/hugo-optmized-relashionships-with-related-content/) for a great explanation of more advanced usage of this feature. +{{< /note >}} + +## Index content headings + +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 >}} +[related] +threshold = 20 +includeNewer = true +toLower = false +[[related.indices]] +name = "fragmentrefs" +type = "fragments" +applyFilter = true +weight = 80 +{{< /code-toggle >}} + +- The `name` maps to a optional front matter slice attribute that can be used to link from the page level down to the fragment/heading level. +- If `applyFilter` is enabled, the `.HeadingsFiltered` on each page in the result will reflect the filtered headings. This is useful if you want to show the headings in the related content listing: + +```go-html-template +{{ $related := .Site.RegularPages.Related . | first 5 }} +{{ with $related }} +

See Also

+
    + {{ range $i, $p := . }} +
  • + {{ .LinkTitle }} + {{ with .HeadingsFiltered }} +
      + {{ range . }} + {{ $link := printf "%s#%s" $p.RelPermalink .ID | safeURL }} +
    • + {{ .Title }} +
    • + {{ end }} +
    + {{ end }} +
  • + {{ end }} +
+{{ end }} +``` + +## Configuration + +See [configure related content](/configuration/related-content/). diff --git a/content/en/content-management/related.md b/content/en/content-management/related.md deleted file mode 100644 index bd24635db..000000000 --- a/content/en/content-management/related.md +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: Related content -description: List related content in "See Also" sections. -categories: [content management] -keywords: [content] -menu: - docs: - parent: content-management - weight: 110 -weight: 110 -toc: true -aliases: [/content/related/,/related/] ---- - -Hugo uses a set of factors to identify a page's related content based on front matter parameters. This can be tuned to the desired set of indices and parameters or left to Hugo's default [Related Content configuration](#configure-related-content). - -## List related content - -To list up to 5 related pages (which share the same _date_ or _keyword_ parameters) is as simple as including something similar to this partial in your template: - -{{< code file=layouts/partials/related.html >}} -{{ $related := .Site.RegularPages.Related . | first 5 }} -{{ with $related }} -

See Also

- -{{ end }} -{{< /code >}} - -The `Related` method takes one argument which may be a `Page` or a options map. The options map have these options: - -indices -: (`slice`) The indices to search within. - -document -: (`page`) The page for which to find related content. Required when specifying an options map. - -namedSlices -: (`slice`) The keywords to search for, expressed as a slice of `KeyValues` using the [`keyVals`] function. - -fragments -: (`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. - -[`keyVals`]: /functions/collections/keyvals/ - -A fictional example using all of the above options: - -```go-html-template -{{ $page := . }} -{{ $opts := dict - "indices" (slice "tags" "keywords") - "document" $page - "namedSlices" (slice (keyVals "tags" "hugo" "rocks") (keyVals "date" $page.Date)) - "fragments" (slice "heading-1" "heading-2") -}} -``` - -{{< note >}} -We improved and simplified this feature in Hugo 0.111.0. Before this we had 3 different methods: `Related`, `RelatedTo` and `RelatedIndices`. Now we have only one method: `Related`. The old methods are still available but deprecated. Also see [this blog article](https://regisphilibert.com/blog/2018/04/hugo-optmized-relashionships-with-related-content/) for a great explanation of more advanced usage of this feature. -{{< /note >}} - -## Index content headings in related content - -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 >}} -[related] -threshold = 20 -includeNewer = true -toLower = false -[[related.indices]] -name = "fragmentrefs" -type = "fragments" -applyFilter = true -weight = 80 -{{< /code-toggle >}} - -* The `name` maps to a optional front matter slice attribute that can be used to link from the page level down to the fragment/heading level. -* If `applyFilter` is enabled, the `.HeadingsFiltered` on each page in the result will reflect the filtered headings. This is useful if you want to show the headings in the related content listing: - -```go-html-template -{{ $related := .Site.RegularPages.Related . | first 5 }} -{{ with $related }} -

See Also

-
    - {{ range $i, $p := . }} -
  • - {{ .LinkTitle }} - {{ with .HeadingsFiltered }} -
      - {{ range . }} - {{ $link := printf "%s#%s" $p.RelPermalink .ID | safeURL }} -
    • - {{ .Title }} -
    • - {{ end }} -
    - {{ end }} -
  • - {{ end }} -
-{{ end }} -``` - -## Configure related content - -Hugo provides a sensible default configuration of Related Content, but you can fine-tune this in your configuration, on the global or language level if needed. - -### Default configuration - -Without any `related` configuration set on the project, Hugo's Related Content methods will use the following. - -{{< code-toggle config=related />}} - -Custom configuration should be set using the same syntax. - -{{< note >}} -If you add a `related` configuration section, you need to add a complete configuration. It is not possible to just set, say, `includeNewer` and use the rest from the Hugo defaults. -{{< /note >}} - -### Top level configuration options - -threshold -: (`int`) A value between 0-100. Lower value will give more, but maybe not so relevant, matches. - -includeNewer -: (`bool`) Set to `true` to include **pages newer than the current page** in the related content listing. This will mean that the output for older posts may change as new related content gets added. - -toLower -: (`bool`) Set to `true` to lower case keywords in both the indexes and the queries. This may give more accurate results at a slight performance penalty. Note that this can also be set per index. - -### Configuration options per index - -name -: (`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 -: (`string`) One of `basic`(default) or `fragments`. - -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 -: (`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 -: (`string`) This is currently only relevant for dates. When listing related content, we may want to list content that is also close in time. Setting "2006" (default value for date indexes) as the pattern for a date index will add weight to pages published in the same year. For busier blogs, "200601" (year and month) may be a better default. - -toLower -: (`bool`) See above. diff --git a/content/en/content-management/sections.md b/content/en/content-management/sections.md index 3b8864339..70440bde3 100644 --- a/content/en/content-management/sections.md +++ b/content/en/content-management/sections.md @@ -2,14 +2,8 @@ title: Sections description: Organize content into sections. -categories: [content management] -keywords: [lists,sections,content types,organization] -menu: - docs: - parent: content-management - weight: 120 -weight: 120 -toc: true +categories: [] +keywords: [] aliases: [/content/sections/] --- @@ -74,16 +68,13 @@ Have list pages|:heavy_check_mark:|:x: With the file structure from the [example above](#overview): 1. The list page for the articles section includes all articles, regardless of directory structure; none of the subdirectories are sections. - 1. The articles/2022 and articles/2023 directories do not have list pages; they are not sections. - 1. The list page for the products section, by default, includes product-1 and product-2, but not their descendant pages. To include descendant pages, use the `RegularPagesRecursive` method instead of the `Pages` method in the list template. +1. All directories in the products section have list pages; each directory is a section. [`Pages`]: /methods/page/pages/ [`RegularPagesRecursive`]: /methods/page/regularpagesrecursive/ -1. All directories in the products section have list pages; each directory is a section. - ## Template selection Hugo has a defined [lookup order] to determine which template to use when rendering a page. The [lookup rules] consider the top-level section name; subsection names are not considered when selecting a template. diff --git a/content/en/content-management/shortcodes.md b/content/en/content-management/shortcodes.md index f373f5a05..f217e443b 100644 --- a/content/en/content-management/shortcodes.md +++ b/content/en/content-management/shortcodes.md @@ -1,15 +1,9 @@ --- title: Shortcodes description: Use embedded, custom, or inline shortcodes to insert elements such as videos, images, and social media embeds into your content. -categories: [content management] +categories: [] keywords: [] -menu: - docs: - parent: content-management - weight: 100 -weight: 100 aliases: [/extras/shortcodes/] -toc: true --- ## Introduction @@ -20,7 +14,7 @@ There are three types of shortcodes: embedded, custom, and inline. ## Embedded -Hugo's embedded shortcodes are pre-defined templates within the application. Refer to each shortcode's documentation for specific usage instructions and available arguments. +Hugo's embedded shortcodes are pre-defined templates within the application. Refer to each shortcode's documentation for specific usage instructions and available arguments. {{< list-pages-in-section path=/shortcodes >}} @@ -36,7 +30,7 @@ Create custom shortcodes to simplify and standardize content creation. For examp Then call the shortcode from within markup: -{{< code file=content/example.md >}} +{{< code file=content/example.md lang=text >}} {{}} {{< /code >}} @@ -50,18 +44,20 @@ An inline shortcode is a shortcode template defined within content. Hugo's security model is based on the premise that template and configuration authors are trusted, but content authors are not. This model enables generation of HTML output safe against code injection. -To conform with this security model, creating shortcode templates within content is disabled by default. If you trust your content authors, you can enable this functionality in your site's configuration: +To conform with this security model, creating shortcode templates within content is disabled by default. If you trust your content authors, you can enable this functionality in your site's configuration: {{< code-toggle file=hugo >}} [security] enableInlineShortcodes = true {{< /code-toggle >}} +For more information see [configure security](/configuration/security). + The following example demonstrates an inline shortcode, `date.inline`, that accepts a single positional argument: a date/time [layout string]. [layout string]: /functions/time/format/#layout-string -{{< code file=content/example.md lang=go >}} +{{< code file=content/example.md lang=text >}} Today is {{}} {{- now | time.Format (.Get 0) -}} @@ -131,7 +127,7 @@ Refer to each shortcode's documentation for specific usage instructions and avai Shortcode arguments can be either _named_ or _positional_. -Named arguments are passed as case-sensitive key-value pairs, as seen in this example with the embedded [`figure`] shortcode. The `src` argument, for instance, is required. +Named arguments are passed as case-sensitive key-value pairs, as seen in this example with the embedded [`figure`] shortcode. The `src` argument, for instance, is required. [`figure`]: /shortcodes/figure @@ -139,7 +135,7 @@ Named arguments are passed as case-sensitive key-value pairs, as seen in this ex {{}} ``` -Positional arguments, on the other hand, are determined by their position. The embedded `instagram` shortcode, for example, expects the first argument to be the Instagram post ID. +Positional arguments, on the other hand, are determined by their position. The embedded `instagram` shortcode, for example, expects the first argument to be the Instagram post ID. ```text {{}} @@ -171,7 +167,7 @@ You can optionally use multiple lines when providing several arguments to a shor Use a [raw string literal](g) if you need to pass a multiline string: ```text -{{HTML, +{{HTML, and a new line with a "quoted string".` */>}} ``` @@ -188,13 +184,13 @@ Notation|Example Markdown|`{{%/* foo */%}} ## Section 1 {{%/* /foo */%}}` Standard|`{{}} ## Section 2 {{}}` -###### Markdown notation +#### Markdown notation Hugo processes the shortcode before the page content is rendered by the Markdown renderer. This means, for instance, that Markdown headings inside a Markdown-notation shortcode will be included when invoking the [`TableOfContents`] method on the `Page` object. [`TableOfContents`]: /methods/page/tableofcontents/ -###### Standard notation +#### Standard notation With standard notation, Hugo processes the shortcode separately, merging the output into the page content after Markdown rendering. This means, for instance, that Markdown headings inside a standard-notation shortcode will be excluded when invoking the `TableOfContents` method on the `Page` object. @@ -206,7 +202,7 @@ By way of example, with this shortcode template: And this markdown: -{{< code file=content/example.md >}} +{{< code file=content/example.md lang=text >}} {{%/* foo */%}} ## Section 1 {{%/* /foo */%}} {{}} ## Section 2 {{}} @@ -222,13 +218,13 @@ Hugo renders this HTML: In the above, "Section 1" will be included when invoking the `TableOfContents` method, while "Section 2" will not. -The shortcode author determines which notation to use. Consult each shortcode's documentation for specific usage instructions and available arguments. +The shortcode author determines which notation to use. Consult each shortcode's documentation for specific usage instructions and available arguments. ## Nesting Shortcodes (excluding [inline](#inline) shortcodes) can be nested, creating parent-child relationships. For example, a gallery shortcode might contain several image shortcodes: -{{< code file=content/example.md >}} +{{< code file=content/example.md lang=text >}} {{}} {{}} {{}} diff --git a/content/en/content-management/summaries.md b/content/en/content-management/summaries.md index dbe8ff248..894548f46 100644 --- a/content/en/content-management/summaries.md +++ b/content/en/content-management/summaries.md @@ -2,14 +2,8 @@ title: Content summaries linkTitle: Summaries description: Create and render content summaries. -categories: [content management] -keywords: [summaries,abstracts,read more] -menu: - docs: - parent: content-management - weight: 160 -weight: 160 -toc: true +categories: [] +keywords: [] aliases: [/content/summaries/,/content-management/content-summaries/] --- @@ -63,7 +57,7 @@ This is the second paragraph. If you do not define the summary manually or in front matter, Hugo automatically defines the summary based on the [`summaryLength`] in your site configuration. -[`summaryLength`]: /getting-started/configuration/#summarylength +[`summaryLength`]: /configuration/all/#summarylength {{< code file=content/example.md >}} +++ diff --git a/content/en/content-management/syntax-highlighting.md b/content/en/content-management/syntax-highlighting.md index b3e991a96..589101785 100644 --- a/content/en/content-management/syntax-highlighting.md +++ b/content/en/content-management/syntax-highlighting.md @@ -1,138 +1,102 @@ --- title: Syntax highlighting -description: Hugo comes with really fast syntax highlighting from Chroma. -categories: [content management] -keywords: [highlighting,chroma,code blocks,syntax] -menu: - docs: - parent: content-management - weight: 250 -weight: 250 -toc: true +description: Add syntax highlighting to code examples. +categories: [] +keywords: [] aliases: [/extras/highlighting/,/extras/highlight/,/tools/syntax-highlighting/] --- -Hugo uses [Chroma](https://github.com/alecthomas/chroma) as its code highlighter; it is built in Go and is really, really fast. +Hugo provides several methods to add syntax highlighting to code examples: -## Configure syntax highlighter +- Use the [`transform.Highlight`] function within your templates +- Use the [`highlight`] shortcode with any [content format](g) +- Use fenced code blocks with the Markdown content format -See [Configure Highlight](/getting-started/configuration-markup#highlight). +[`transform.Highlight`]: /functions/transform/highlight/ +[`highlight`]: /shortcodes/highlight/ -## Generate syntax highlighter CSS +## Fenced code blocks -If you run with `markup.highlight.noClasses=false` in your site configuration, you need a style sheet. The style sheet will override the style specified in [`markup.highlight.style`](/functions/transform/highlight/#options). +In its default configuration, Hugo highlights code examples within fenced code blocks, following this form: -You can generate one with Hugo: - -```sh -hugo gen chromastyles --style=monokai > syntax.css +{{< code file=content/example.md lang=text >}} +```LANG [OPTIONS] +CODE ``` +{{< /code >}} -Run `hugo gen chromastyles -h` for more options. See https://xyproto.github.io/splash/docs/ for a gallery of available styles. +CODE +: The code to highlight. -## Highlight shortcode +LANG +: The language of the code to highlight. Choose from one of the [supported languages]. This value is case-insensitive. -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 +: One or more space-separated or comma-separated key-value pairs wrapped in braces. Set default values for each option in your [site configuration]. The key names are case-insensitive. -Options: +[supported languages]: #languages +[site configuration]: /configuration/markup/#highlight -* `linenos`: configure line numbers. Valid values are `true`, `false`, `table`, or `inline`. `false` will turn off line numbers if it's configured to be on in site configuration. `table` will give copy-and-paste friendly code blocks. -* `hl_lines`: lists a set of line numbers or line number ranges to be highlighted. -* `linenostart=199`: starts the line number count from 199. -* `anchorlinenos`: Configure anchors on line numbers. Valid values are `true` or `false`; -* `lineanchors`: Configure a prefix for the anchors on line numbers. Will be suffixed with `-`, so linking to the line number 1 with the option `lineanchors=prefix` adds the anchor `prefix-1` to the page. -* `hl_inline` Highlight inside a `` (inline HTML element) tag. Valid values are `true` or `false`. The `code` tag will get a class with name `code-inline`. +For example, with this Markdown: -### Example: highlight shortcode +{{< code file=content/example.md lang=text >}} +```go {linenos=inline hl_lines=[3,"6-8"] style=emacs} +package main -```go-html-template -{{}} -// ... code -{{}} -``` +import "fmt" -Gives this: - -{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}} -// GetTitleFunc returns a func that can be used to transform a string to -// title case. -// -// The supported styles are -// -// - "Go" (strings.Title) -// - "AP" (see https://www.apstylebook.com/) -// - "Chicago" (see https://www.chicagomanualofstyle.org/home.html) -// -// If an unknown or empty style is provided, AP style is what you get. -func GetTitleFunc(style string) func(s string) string { - switch strings.ToLower(style) { - case "go": - return strings.Title - case "chicago": - return transform.NewTitleConverter(transform.ChicagoStyle) - default: - return transform.NewTitleConverter(transform.APStyle) - } +func main() { + for i := 0; i < 3; i++ { + fmt.Println("Value of i:", i) + } } -{{< / highlight >}} - -## Highlight Hugo/Go template code - -For highlighting Hugo/Go template code on your page, add `/*` after the opening double curly braces and `*/` before closing curly braces. - -``` go -{{}} ``` +{{< /code >}} -Gives this: +Hugo renders this: -``` go -{{}} -``` +```go {linenos=inline, hl_lines=[3, "6-8"], style=emacs} +package main -## Highlight template function +import "fmt" -See [Highlight](/functions/transform/highlight/). - -## Highlighting in code fences - -Highlighting in code fences is enabled by default. - -````txt -```go {linenos=table,hl_lines=[8,"15-17"],linenostart=199} -// ... code -``` -```` - -Gives this: - -```go {linenos=table,hl_lines=[8,"15-17"],linenostart=199} -// GetTitleFunc returns a func that can be used to transform a string to -// title case. -// -// The supported styles are -// -// - "Go" (strings.Title) -// - "AP" (see https://www.apstylebook.com/) -// - "Chicago" (see https://www.chicagomanualofstyle.org/home.html) -// -// If an unknown or empty style is provided, AP style is what you get. -func GetTitleFunc(style string) func(s string) string { - switch strings.ToLower(style) { - case "go": - return strings.Title - case "chicago": - return transform.NewTitleConverter(transform.ChicagoStyle) - default: - return transform.NewTitleConverter(transform.APStyle) - } +func main() { + for i := 0; i < 3; i++ { + fmt.Println("Value of i:", i) + } } ``` -The options are the same as in the [highlighting shortcode](/content-management/syntax-highlighting/#highlight-shortcode), including `linenos=false`, but note the slightly different Markdown attribute syntax. +## Options -## List of Chroma highlighting languages +{{% include "_common/syntax-highlighting-options.md" %}} -The full list of Chroma lexers and their aliases (which is the identifier used in the `highlight` template func or when doing highlighting in code fences): +## Escaping + +When documenting shortcode usage, escape the tag delimiters: + +{{< code file=content/example.md lang=text >}} +```text {linenos=inline} +{{}} + +{{%/*/* shortcode-2 */*/%}} +``` +{{< /code >}} + +Hugo renders this to: + +```text {linenos=inline} +{{}} + +{{%/* shortcode-2 */%}} +``` + +## Languages + +These are the supported languages. Use one of the identifiers, not the language name, when specifying a language for: + +- The [`transform.Highlight`] function +- The [`highlight`] shortcode +- Fenced code blocks {{< chroma-lexers >}} diff --git a/content/en/content-management/taxonomies.md b/content/en/content-management/taxonomies.md index ae80fc8a5..e8ba04c28 100644 --- a/content/en/content-management/taxonomies.md +++ b/content/en/content-management/taxonomies.md @@ -1,14 +1,8 @@ --- title: Taxonomies description: Hugo includes support for user-defined taxonomies. -categories: [content management] -keywords: [taxonomies,metadata,front matter,terms] -menu: - docs: - parent: content-management - weight: 150 -weight: 150 -toc: true +categories: [] +keywords: [] aliases: [/taxonomies/overview/,/taxonomies/usage/,/indexes/overview/,/doc/indexes/,/extras/indexes] --- @@ -19,24 +13,24 @@ Hugo includes support for user-defined groupings of content called **taxonomies* ### Definitions Taxonomy -: a categorization that can be used to classify content +: A categorization that can be used to classify content Term -: a key within the taxonomy +: A key within the taxonomy Value -: a piece of content assigned to a term +: A piece of content assigned to a term ## Example taxonomy: movie website Let's assume you are making a website about movies. You may want to include the following taxonomies: -* Actors -* Directors -* Studios -* Genre -* Year -* Awards +- Actors +- Directors +- Studios +- Genre +- Year +- Awards Then, in each of the movies, you would specify terms for each of these taxonomies (i.e., in the [front matter] of each of your movie content files). From these terms, Hugo would automatically create pages for each Actor, Director, Studio, Genre, Year, and Award, with each listing all of the Movies that matched that specific Actor, Director, Studio, Genre, Year, and Award. @@ -75,60 +69,16 @@ Moonrise Kingdom <- Value ... ``` -## Default taxonomies - -Hugo natively supports taxonomies. - -Without adding a single line to your [site configuration] file, Hugo will automatically create taxonomies for `tags` and `categories`. That would be the same as manually [configuring your taxonomies](#configure-taxonomies) as below: - -{{< code-toggle config=taxonomies />}} - -If you do not want Hugo to create any taxonomies, set `disableKinds` in your [site configuration] to the following: - -{{< code-toggle file=hugo >}} -disableKinds = ["taxonomy","term"] -{{}} - -{{% include "content-management/_common/page-kinds.md" %}} - ### Default destinations When taxonomies are used---and [taxonomy templates] are provided---Hugo will automatically create both a page listing all the taxonomy's terms and individual pages with lists of content associated with each term. For example, a `categories` taxonomy declared in your configuration and used in your content front matter will create the following pages: -* A single page at `example.com/categories/` that lists all the terms within the taxonomy -* [Individual taxonomy list pages][taxonomy templates] (e.g., `/categories/development/`) for each of the terms that shows a listing of all pages marked as part of that taxonomy within any content file's [front matter] +- A single page at `example.com/categories/` that lists all the terms within the taxonomy +- [Individual taxonomy list pages][taxonomy templates] (e.g., `/categories/development/`) for each of the terms that shows a listing of all pages marked as part of that taxonomy within any content file's [front matter] -## Configure taxonomies +## Configuration -Custom taxonomies other than the [defaults](#default-taxonomies) must be defined in your [site configuration] before they can be used throughout the site. You need to provide both the plural and singular labels for each taxonomy. For example, `singular key = "plural value"` for TOML and `singular key: "plural value"` for YAML. - -### Example: adding a custom taxonomy named "series" - -{{< note >}} -While adding custom taxonomies, you need to put in the default taxonomies too, _if you want to keep them_. -{{< /note >}} - -{{< code-toggle file=hugo >}} -[taxonomies] - tag = "tags" - category = "categories" - series = "series" -{{}} - -### Example: removing default taxonomies - -If you want to have just the default `tags` taxonomy, and remove the `categories` taxonomy for your site, you can do so by modifying the `taxonomies` value in your [site configuration]. - -{{< code-toggle file=hugo >}} -[taxonomies] - tag = "tags" -{{}} - -If you want to disable all taxonomies altogether, see the use of `disableKinds` in [Hugo Taxonomy Defaults](#default-taxonomies). - -{{< note >}} -You can add content and front matter to your taxonomy list and taxonomy terms pages. See [Content Organization](/content-management/organization/) for more information on how to add an `_index.md` for this purpose. -{{< /note >}} +See [configure taxonomies](/configuration/taxonomies/). ## Assign terms to content @@ -148,7 +98,7 @@ The following show a piece of content that has a weight of 22, which can be used ### Example: taxonomic `weight` -{{< code-toggle >}} +{{< code-toggle file=hugo >}} title = "foo" tags = [ "a", "b", "c" ] tags_weight = 22 @@ -172,4 +122,4 @@ wikipedia: "https://en.wikipedia.org/wiki/Bruce_Willis" [documentation on archetypes]: /content-management/archetypes/ [front matter]: /content-management/front-matter/ [taxonomy templates]: /templates/types/#taxonomy -[site configuration]: /getting-started/configuration/ +[site configuration]: /configuration/ diff --git a/content/en/content-management/types.md b/content/en/content-management/types.md index 9b44645e9..08e9adda2 100644 --- a/content/en/content-management/types.md +++ b/content/en/content-management/types.md @@ -1,14 +1,8 @@ --- title: Content types description: Hugo is built around content organized in sections. -categories: [content management] -keywords: [lists,sections,content types,types,organization] -menu: - docs: - parent: content-management - weight: 130 -weight: 130 -toc: true +categories: [] +keywords: [] aliases: [/content/types] --- diff --git a/content/en/content-management/urls.md b/content/en/content-management/urls.md index 76ef5e010..f399bd6cb 100644 --- a/content/en/content-management/urls.md +++ b/content/en/content-management/urls.md @@ -1,14 +1,8 @@ --- title: URL management description: Control the structure and appearance of URLs through front matter entries and settings in your site configuration. -categories: [content management] -keywords: [aliases,redirects,permalinks,urls] -menu: - docs: - parent: content-management - weight: 180 -weight: 180 -toc: true +categories: [] +keywords: [] aliases: [/extras/permalinks/,/extras/aliases/,/extras/urls/,/doc/redirects/,/doc/alias/,/doc/aliases/] --- @@ -107,7 +101,7 @@ https://example.org/articles/my-first-article.html With monolingual sites, `url` values with or without a leading slash are relative to the [`baseURL`]. With multilingual sites, `url` values with a leading slash are relative to the `baseURL`, and `url` values without a leading slash are relative to the `baseURL` plus the language prefix. -[`baseURL`]: /getting-started/configuration/#baseurl +[`baseURL`]: /configuration/all/#baseurl Site type|Front matter `url`|Resulting URL :--|:--|:-- @@ -120,7 +114,7 @@ multilingual|`about`|`https://example.org/de/about/` {{< new-in 0.131.0 />}} -You can also use [tokens](#tokens) when setting the `url` value. This is typically used in `cascade` sections: +You can also usetokens when setting the `url` value. This is typically used in `cascade` sections: {{< code-toggle file=content/foo/bar/_index.md fm=true >}} title ="Bar" @@ -128,244 +122,19 @@ title ="Bar" url = "/:sections[last]/:slug" {{< /code-toggle >}} +Use any of these tokens: + +{{% include "/_common/permalink-tokens.md" %}} + ## Site configuration ### Permalinks -In your site configuration, define a URL pattern for each top-level section. Each URL pattern can target a given language and/or page kind. - -Front matter `url` values override the URL patterns defined in the `permalinks` section of your site configuration. - -#### Monolingual examples {#permalinks-monolingual-examples} - -With this content structure: - -```text -content/ -├── posts/ -│ ├── bash-in-slow-motion.md -│ └── tls-in-a-nutshell.md -├── tutorials/ -│ ├── git-for-beginners.md -│ └── javascript-bundling-with-hugo.md -└── _index.md -``` - -Render tutorials under "training", and render the posts under "articles" with a date-base hierarchy: - -{{< code-toggle file=hugo >}} -[permalinks.page] -posts = '/articles/:year/:month/:slug/' -tutorials = '/training/:slug/' -[permalinks.section] -posts = '/articles/' -tutorials = '/training/' -{{< /code-toggle >}} - -The structure of the published site will be: - -```text -public/ -├── articles/ -│ ├── 2023/ -│ │ ├── 04/ -│ │ │ └── bash-in-slow-motion/ -│ │ │ └── index.html -│ │ └── 06/ -│ │ └── tls-in-a-nutshell/ -│ │ └── index.html -│ └── index.html -├── training/ -│ ├── git-for-beginners/ -│ │ └── index.html -│ ├── javascript-bundling-with-hugo/ -│ │ └── index.html -│ └── index.html -└── index.html -``` - -To create a date-based hierarchy for regular pages in the content root: - -{{< code-toggle file=hugo >}} -[permalinks.page] -"/" = "/:year/:month/:slug/" -{{< /code-toggle >}} - -Use the same approach with taxonomy terms. For example, to omit the taxonomy segment of the URL: - -{{< code-toggle file=hugo >}} -[permalinks.term] -'tags' = '/:slug/' -{{< /code-toggle >}} - -#### Multilingual example {#permalinks-multilingual-example} - -Use the `permalinks` configuration as a component of your localization strategy. - -With this content structure: - -```text -content/ -├── en/ -│ ├── books/ -│ │ ├── les-miserables.md -│ │ └── the-hunchback-of-notre-dame.md -│ └── _index.md -└── es/ - ├── books/ - │ ├── les-miserables.md - │ └── the-hunchback-of-notre-dame.md - └── _index.md -``` - -And this site configuration: - -{{< code-toggle file=hugo >}} -defaultContentLanguage = 'en' -defaultContentLanguageInSubdir = true - -[languages.en] -contentDir = 'content/en' -languageCode = 'en-US' -languageDirection = 'ltr' -languageName = 'English' -weight = 1 - -[languages.en.permalinks.page] -books = "/books/:slug/" - -[languages.en.permalinks.section] -books = "/books/" - -[languages.es] -contentDir = 'content/es' -languageCode = 'es-ES' -languageDirection = 'ltr' -languageName = 'Español' -weight = 2 - -[languages.es.permalinks.page] -books = "/libros/:slug/" - -[languages.es.permalinks.section] -books = "/libros/" -{{< /code-toggle >}} - -The structure of the published site will be: - -```text -public/ -├── en/ -│ ├── books/ -│ │ ├── les-miserables/ -│ │ │ └── index.html -│ │ ├── the-hunchback-of-notre-dame/ -│ │ │ └── index.html -│ │ └── index.html -│ └── index.html -├── es/ -│ ├── libros/ -│ │ ├── les-miserables/ -│ │ │ └── index.html -│ │ ├── the-hunchback-of-notre-dame/ -│ │ │ └── index.html -│ │ └── index.html -│ └── index.html -└── index.html -```` - -#### Tokens - -Use these tokens when defining the URL pattern. You can also use these tokens when setting the [`url`](#permalinks-tokens-in-front-matter) value in front matter. - -`:year` -: The 4-digit year as defined in the front matter `date` field. - -`:month` -: The 2-digit month as defined in the front matter `date` field. - -`:monthname` -: The name of the month as defined in the front matter `date` field. - -`:day` -: The 2-digit day as defined in the front matter `date` field. - -`:weekday` -: The 1-digit day of the week as defined in the front matter `date` field (Sunday = 0). - -`:weekdayname` -: The name of the day of the week as defined in the front matter `date` field. - -`:yearday` -: The 1- to 3-digit day of the year as defined in the front matter `date` field. - -`:section` -: The content's section. - -`:sections` -: The content's sections hierarchy. You can use a selection of the sections using _slice syntax_: `:sections[1:]` includes all but the first, `:sections[:last]` includes all but the last, `:sections[last]` includes only the last, `:sections[1:2]` includes section 2 and 3. Note that this slice access will not throw any out-of-bounds errors, so you don't have to be exact. - -`:title` -: The `title` as defined in front matter, else the automatic title. Hugo generates titles automatically for section, taxonomy, and term pages that are not backed by a file. - -`:slug` -: The `slug` as defined in front matter, else the `title` as defined in front matter, else the automatic title. Hugo generates titles automatically for section, taxonomy, and term pages that are not backed by a file. - -`:filename` -: The content's file name without extension, applicable to the `page` page kind. - - {{< deprecated-in v0.144.0 >}} - The `:filename` token has been deprecated. Use `:contentbasename` instead. - {{< /deprecated-in >}} - -`:slugorfilename` -: The `slug` as defined in front matter, else the content's file name without extension, applicable to the `page` page kind. - - {{< deprecated-in v0.144.0 >}} - The `:slugorfilename` token has been deprecated. Use `:slugorcontentbasename` instead. - {{< /deprecated-in >}} - -`:contentbasename` -: {{< new-in 0.144.0 />}} -: The [content base name]. - -[content base name]: /methods/page/file/#contentbasename - -`:slugorcontentbasename` -: {{< new-in 0.144.0 />}} -: The `slug` as defined in front matter, else the [content base name]. - -For time-related values, you can also use the layout string components defined in Go's [time package]. For example: - -[time package]: https://pkg.go.dev/time#pkg-constants - -{{< code-toggle file=hugo >}} -permalinks: - posts: /:06/:1/:2/:title/ -{{< /code-toggle >}} +See [configure permalinks](/configuration/permalinks). ### Appearance -The appearance of a URL is either ugly or pretty. - -Type|Path|URL -:--|:--|:-- -ugly|content/about.md|`https://example.org/about.html` -pretty|content/about.md|`https://example.org/about/` - -By default, Hugo produces pretty URLs. To generate ugly URLs, change your site configuration: - -{{< code-toggle file=hugo >}} -uglyURLs = true -{{< /code-toggle >}} - -You can also enable uglyURLs by section. For example, with a site that contains sections for books and films: - -{{< code-toggle file=hugo >}} -[uglyURLs] -books = true -films = false -{{< /code-toggle >}} +See [configure ugly URLs](/configuration/ugly-urls/). ### Post-processing diff --git a/content/en/contribute/_index.md b/content/en/contribute/_index.md index a8ffaf4fa..d0ae954b0 100644 --- a/content/en/contribute/_index.md +++ b/content/en/contribute/_index.md @@ -1,16 +1,9 @@ --- title: Contribute to the Hugo project -linktitle: Contribute +linkTitle: Contribute description: Contribute to development, documentation, and themes. categories: [] keywords: [] -menu: - docs: - identifier: contribute-in-this-section - parent: contribute - weight: 10 weight: 10 aliases: [/tutorials/how-to-contribute-to-hugo/,/community/contributing/] --- - -Hugo relies heavily on the enthusiasm and participation of the open-source community. We need your support. diff --git a/content/en/contribute/development.md b/content/en/contribute/development.md index cde48a4c8..b4e669772 100644 --- a/content/en/contribute/development.md +++ b/content/en/contribute/development.md @@ -1,14 +1,8 @@ --- title: Development description: Contribute to the development of Hugo. -categories: [contribute] -keywords: [development] -menu: - docs: - parent: contribute - weight: 20 -weight: 20 -toc: true +categories: [] +keywords: [] --- ## Introduction @@ -70,16 +64,17 @@ This section assumes that you have a working knowledge of Go, Git and GitHub, an Use this workflow to create and submit pull requests. -Step 1 -: Fork the [project repository]. +### Step 1 -[project repository]: https://github.com/gohugoio/hugo/ +Fork the [project repository]. -Step 2 -: Clone your fork. +### Step 2 -Step 3 -: Create a new branch with a descriptive name that includes the corresponding issue number. +Clone your fork. + +### Step 3 + +Create a new branch with a descriptive name that includes the corresponding issue number. For a new feature: @@ -93,11 +88,13 @@ For a bug fix: git checkout -b fix/fix-some-bug-99999 ``` -Step 4 -: Make changes. +### Step 4 -Step 5 -: Compile and install. +Make changes. + +### Step 5 + +Compile and install. To compile and install the standard edition: @@ -117,22 +114,22 @@ To compile and install the extended/deploy edition: CGO_ENABLED=1 go install -tags extended,withdeploy ``` -Step 6 -: Test your changes: +### Step 6 + +Test your changes: ```text go test ./... ``` -Step 7 -: Commit your changes with a descriptive commit message: +### Step 7 + +Commit your changes with a descriptive commit message: - Provide a summary on the first line, typically 50 characters or less, followed by a blank line. - Optionally, provide a detailed description where each line is 80 characters or less, followed by a blank line. - Add one or more "Fixes" or "Closes" keywords, each on its own line, referencing the [issues] addressed by this change. -[issues]: https://github.com/gohugoio/hugo/issues - For example: ```sh @@ -148,16 +145,21 @@ Closes #99999" See the [commit message guidelines] for details. +### Step 8 + +Push the new branch to your fork of the documentation repository. + +### Step 9 + +Visit the [project repository] and create a pull request (PR). + +### Step 10 + +A project maintainer will review your PR and may request changes. You may delete your branch after the maintainer merges your PR. + [commit message guidelines]: https://github.com/gohugoio/hugo/blob/master/CONTRIBUTING.md#git-commit-message-guidelines - -Step 8 -: Push the new branch to your fork of the documentation repository. - -Step 9 -: Visit the [project repository] and create a pull request (PR). - -Step 10 -: A project maintainer will review your PR and may request changes. You may delete your branch after the maintainer merges your PR. +[issues]: https://github.com/gohugoio/hugo/issues +[project repository]: https://github.com/gohugoio/hugo/ ## Building from source @@ -172,7 +174,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.141.0 +CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.144.2 ``` To build and install at the latest commit on the master branch: diff --git a/content/en/contribute/documentation.md b/content/en/contribute/documentation.md index 61643fcf0..51f78a0d4 100644 --- a/content/en/contribute/documentation.md +++ b/content/en/contribute/documentation.md @@ -1,59 +1,48 @@ --- title: Documentation description: Help us to improve the documentation by identifying issues and suggesting changes. -categories: [contribute] -keywords: [documentation] -menu: - docs: - parent: contribute - weight: 30 -weight: 30 -toc: true +categories: [] +keywords: [] aliases: [/contribute/docs/] --- ## Introduction -We welcome corrections and improvements to the documentation. Please note that the documentation resides in its own repository, separate from the project repository. +We welcome corrections and improvements to the documentation. The documentation lives in a separate repository from the main project. To contribute: -For corrections and improvements to the current documentation, please submit issues and pull requests to the [documentation repository]. - -For documentation related to a new feature, please include the documentation changes when you submit a pull request to the [project repository]. +- For corrections and improvements to existing documentation, submit issues and pull requests to the [documentation repository]. +- For documentation of new features, include the documentation changes in your pull request to the [project repository]. ## Guidelines ### Style -Please adhere to Google's [developer documentation style guide]. +Follow Google's [developer documentation style guide]. [developer documentation style guide]: https://developers.google.com/style ### Markdown -Please follow these guidelines: +Adhere to these Markdown conventions: -- 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 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 +- Use [ATX] headings (levels 2-4), not [setext] headings. +- Use [fenced code blocks], not [indented code blocks]. +- Use hyphens, not asterisks, for unordered [list items]. +- Use the [note shortcode] instead of blockquotes or bold text for emphasis. +- Do not mix [raw HTML] within Markdown. +- Do not use bold text in place of a heading or description term (`dt`). +- Remove consecutive blank lines (limit to two). +- Remove trailing spaces. ### Glossary -Glossary terms are maintained on individual pages. While not directly accessible to site visitors, these pages act as a central repository for term definitions. +[Glossary] terms are defined on individual pages, providing a central repository for definitions, though these pages are not directly linked from the site. -Definitions must be presented in complete sentences, with the first sentence always introducing the term being defined. To enhance readability and consistency, the first occurrence of the term and any other referenced glossary terms should be italicized. +Definitions must be complete sentences, with the first sentence defining the term. Italicize the first occurrence of the term and any referenced glossary terms for consistency. -To link to a term definition on the glossary page, use this custom link syntax: +Link to glossary terms using this syntax: `[term](g)` -```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 term: +Term lookups are case-insensitive, ignore formatting, and support singular and plural forms. For example, all of these variations will link to the same glossary term: ```text [global resource](g) @@ -62,7 +51,7 @@ Lookups are case-insensitive, ignore formatting, and support both singular and p [`Global Resources`](g) ``` -To insert a term definition, use the [`glossary-term`] shortcode: +Use the glossary-term shortcode to insert a term definition: ```text {{%/* glossary-term "global resource" */%}} @@ -70,29 +59,27 @@ To insert a term definition, use the [`glossary-term`] shortcode: ### Terminology -Please link to the glossary (see above) when necessary, and use the terms consistently throughout the documentation. Of special note: +Link to the [glossary] as needed and use terms consistently. Pay particular attention to: -- The term "front matter" is two words unless you are referring to the configuration key -- The term "home page" is two words -- The term "website" is one word -- The term "standalone" is one word, not hyphenated -- Use the word "map" instead of "dictionary" -- Use the word "flag" instead of "option" when referring to a command line flag -- Use "client side" as a noun, and "client-side" as an adjective -- Capitalize the word "Markdown" -- Hyphenate the term "open-source" when used an adjective. +- "front matter" (two words, except when referring to the configuration key) +- "home page" (two words) +- "website" (one word) +- "standalone" (one word, no hyphen) +- "map" (instead of "dictionary") +- "flag" (instead of "option" for command-line flags) +- "client side" (noun), "client-side" (adjective) +- "Markdown" (capitalized) +- "open-source" (hyphenated adjective) -### Page titles and headings +### Titles and headings -Please follow these guidelines for page titles and headings: +- Use sentence-style capitalization. +- Avoid formatted strings. +- Keep them concise. -- Use sentence-style capitalization -- Avoid formatted strings in headings and page titles -- Shorter is better +### Writing style -### Use active voice with present tense - -In software documentation, passive voice is unavoidable in some cases. Please use active voice when possible. +Use active voice and present tense wherever possible. No → With Hugo you can build a static site.\ Yes → Build a static site with Hugo. @@ -100,13 +87,13 @@ Yes → Build a static site with Hugo. No → This will cause Hugo to generate HTML files in the `public` directory.\ Yes → Hugo generates HTML files in the `public` directory. -### Use second person instead of third person +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 +Minimize adverbs. No → Hugo is extremely fast.\ Yes → Hugo is fast. @@ -115,50 +102,49 @@ 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 are styled as `dt` elements. This was implemented to support a [glossary] with linkable terms. - ### 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". - -For example: - -- `Returns the URL aliases as defined in front matter.` -- `Reports whether the given page is in the given section.` +Start descriptions in the functions and methods sections with "Returns" or "Reports whether" (for boolean values). [functions]: /functions [methods]: /methods -### Directory names, file names, and file paths +### File paths and names -Enclose directory names, file names, and file paths within backticks, with the following exceptions: +Enclose directory names, file names, and file paths in backticks, except when used in: - Page titles - Section headings (h1-h6) - Definition list terms -- The description field in front matter +- The `description` field in front matter ### Miscellaneous -Other guidelines to consider: +Other best practices: -- Do not place list items directly under a heading; include an introductory sentence or phrase before the list. -- Avoid use of **bold** text. Use the [note shortcode] to draw attention to important content. -- Do not place description terms (`dt`) within backticks unless required for syntactic clarity. -- Do not use Hugo's `ref` or `relref` shortcodes. We use a link render hook to resolve and validate link destinations, including fragments. -- Shorter is better. If there is more than one way to do something, describe the current best practice. For example, avoid phrases such as "you can also do..." and "in older versions you had to..." -- When including code samples, use short snippets that demonstrate the concept. -- The Hugo user community is global; use [basic english](https://simple.wikipedia.org/wiki/Basic_English) when possible. +- Introduce lists with a sentence or phrase, not directly under a heading. +- Avoid bold text; use the note shortcode for emphasis. +- Do not put description terms (`dt`) in backticks unless syntactically necessary. +- Do not use Hugo's `ref` or `relref` shortcodes. +- Prioritize current best practices over multiple options or historical - information. +- Use short, focused code examples. +- Use [basic english] where possible for a global audience. + +[basic english]: https://simple.wikipedia.org/wiki/Basic_English ## Code examples -Indent code by two spaces. With examples of template code, include a space after opening action delimiters, and include a space before closing action delimiters. +Indent code by two spaces. With examples of template code, ddd spaces around template code action delimiters: + +```go-html-template +{{ if eq $foo $bar }} + {{ fmt.Printf "%s is %s" $foo $bar }} +{{ end }} +``` ### Fenced code blocks -Always include the language code when using a fenced code block: +Always specify the language: ````text ```go-html-template @@ -168,25 +154,16 @@ Always include the language code when using a fenced code block: ``` ```` -```go-html-template -{{ if eq $foo "bar" }} - {{ print "foo is bar" }} -{{ end }} -``` - ### Shortcode calls -Use this syntax to include shortcodes calls within your code examples: +Use this syntax : +````text ```text {{}} {{%/*/* foo */*/%}} ``` - -```text -{{}} -{{%/* foo */%}} -``` +```` ### Site configuration @@ -200,12 +177,6 @@ title = 'My Site' {{}} ``` -{{< code-toggle file=hugo >}} -baseURL = 'https://example.org/' -languageCode = 'en-US' -title = 'My Site' -{{< /code-toggle >}} - ### Front matter Use the [code-toggle shortcode] to include front matter examples: @@ -218,15 +189,9 @@ draft = false {{}} ``` -{{< code-toggle file=content/posts/my-first-post.md fm=true >}} -title = 'My first post' -date = 2023-11-09T12:56:07-08:00 -draft = false -{{< /code-toggle >}} - ### Other code examples -Use the [code shortcode] for other code examples that require a file name: +Use the [code shortcode] for code examples that require a file name: ```text {{}} @@ -236,19 +201,13 @@ Use the [code shortcode] for other code examples that require a file name: {{}} ``` -{{< code file=layouts/_default/single.html >}} -{{ range .Site.RegularPages }} -

{{ .LinkTitle }}

-{{ end }} -{{< /code >}} - ## Shortcodes These shortcodes are commonly used throughout the documentation. Other shortcodes are available for specialized use. ### 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 code examples that require a file name. This shortcode takes these arguments: copy : (`bool`) Whether to display a copy-to-clipboard button. Default is `false`. @@ -264,14 +223,9 @@ lang Some code here {{}} ``` - -{{< 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. This shortcode takes these arguments: config : (`string`) The section of `site.Data.docs.config` to render. @@ -280,44 +234,35 @@ 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. Default is `hugo` +: (`string`) The file name to display. Omit the file extension for site configuration examples. 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`. +: (`bool`) Whether to omit top-level key(s) when rendering a section of `site.Data.docs.config`. ```text -{{}} -title: Example -draft: false +{{}} +baseURL = 'https://example.org/' +languageCode = 'en-US' +title = 'My Site' {{}} ``` -{{< code-toggle >}} -title: Example -draft: false -{{< /code-toggle >}} - ### deprecated-in Use the `deprecated-in` shortcode to indicate that a feature is deprecated: ```text {{}} + Use [`hugo.IsServer`] instead. [`hugo.IsServer`]: /functions/hugo/isserver/ {{}} ``` -{{< deprecated-in 0.144.0 >}} -Use [`hugo.IsServer`] instead. - -[`hugo.IsServer`]: /functions/hugo/isserver/ -{{< /deprecated-in >}} - ### 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). @@ -328,10 +273,6 @@ This is a link to the [embedded alias template]. [embedded alias template]: {{%/* eturl alias */%}} ``` -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. @@ -340,14 +281,12 @@ Use the `glossary-term` shortcode to insert the definition of the given glossary {{%/* glossary-term scalar */%}} ``` -{{% glossary-term scalar %}} - ### include Use the `include` shortcode to include content from another page. ```text -{{%/* include "functions/_common/glob-patterns" */%}} +{{%/* include "_common/glob-patterns.md" */%}} ``` ### new-in @@ -355,10 +294,16 @@ Use the `include` shortcode to include content from another page. Use the `new-in` shortcode to indicate a new feature: ```text -{{}} +{{}} ``` -{{< new-in 0.127.0 />}} +You can also include details: + +```text +{{}} +This is a new feature. +{{}} +``` ### note @@ -372,38 +317,32 @@ Use the [`math.Mod`] function to control... {{}} ``` -{{< note >}} -Use the [`math.Mod`] function to control... - -[`math.Mod`]: /functions/math/mod/ -{{< /note >}} - ## New features -Use the "new-in" shortcode to indicate a new feature: +Use the [`new-in`](#new-in) shortcode to indicate a new feature: -{{< code file=content/something/foo.md lang=text >}} -{{}} -{{< /code >}} +```text +{{}} +``` The "new in" label will be hidden if the specified version is older than a predefined threshold, based on differences in major and minor versions. See [details](https://github.com/gohugoio/hugoDocs/blob/master/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/new-in.html). ## Deprecated features -Use the "deprecated-in" shortcode to indicate that a feature is deprecated: +Use the [`deprecated-in`](#deprecated-in) shortcode to indicate that a feature is deprecated: -{{< code file=content/something/foo.md >}} +```text {{}} Use [`hugo.IsServer`] instead. [`hugo.IsServer`]: /functions/hugo/isserver/ {{}} -{{< /code >}} +``` When deprecating a function or method, add something like this to front matter: {{< code-toggle file=content/something/foo.md fm=true >}} -expiryDate: 2024-10-30 # deprecated 2022-10-30 in v0.123.0 +expiryDate: 2027-02-17 # deprecated 2025-02-17 in v0.144.0 {{< /code-toggle >}} Set the `expiryDate` to two years from the date of deprecation, and add a brief front matter comment to explain the setting. @@ -416,27 +355,33 @@ This section assumes that you have a working knowledge of Git and GitHub, and ar Use this workflow to create and submit pull requests. -Step 1 -: Fork the [documentation repository]. +### Step 1 -Step 2 -: Clone your fork. +Fork the [documentation repository]. -Step 3 -: Create a new branch with a descriptive name that includes the corresponding issue number, if any: +### Step 2 + +Clone your fork. + +### Step 3 + +Create a new branch with a descriptive name that includes the corresponding issue number, if any: ```sh git checkout -b restructure-foo-page-99999 ``` -Step 4 -: Make changes. +### Step 4 -Step 5 -: Build the site locally to preview your changes. +Make changes. -Step 6 -: Commit your changes with a descriptive commit message: +### Step 5 + +Build the site locally to preview your changes. + +### Step 6 + +Commit your changes with a descriptive commit message: - Provide a summary on the first line, typically 50 characters or less, followed by a blank line. - Optionally, provide a detailed description where each line is 80 characters or less, followed by a blank line. @@ -444,7 +389,7 @@ Step 6 For example: -```sh +```text git commit -m "Restructure the taxonomy page This restructures the taxonomy page by splitting topics into logical @@ -454,14 +399,17 @@ Fixes #9999 Closes #9998" ``` -Step 7 -: Push the new branch to your fork of the documentation repository. +### Step 7 -Step 8 -: Visit the [documentation repository] and create a pull request (PR). +Push the new branch to your fork of the documentation repository. -Step 9 -: A project maintainer will review your PR and may request changes. You may delete your branch after the maintainer merges your PR. +### Step 8 + +Visit the [documentation repository] and create a pull request (PR). + +### Step 9 + +A project maintainer will review your PR and may request changes. You may delete your branch after the maintainer merges your PR. [ATX]: https://spec.commonmark.org/0.30/#atx-headings [Microsoft Writing Style Guide]: https://learn.microsoft.com/en-us/style-guide/welcome/ diff --git a/content/en/contribute/themes.md b/content/en/contribute/themes.md index 7277e2927..8a3457ba3 100644 --- a/content/en/contribute/themes.md +++ b/content/en/contribute/themes.md @@ -1,13 +1,8 @@ --- title: Themes description: If you've built a Hugo theme and want to contribute back to the Hugo Community, please share it with us. -categories: [contribute] -keywords: [themes] -menu: - docs: - parent: contribute - weight: 40 -weight: 40 +categories: [] +keywords: [] aliases: [/contribute/theme/] --- diff --git a/content/en/documentation.md b/content/en/documentation.md index 11f843f91..6f96c1f9c 100644 --- a/content/en/documentation.md +++ b/content/en/documentation.md @@ -2,21 +2,19 @@ title: Hugo Documentation linkTitle: Docs description: Hugo is the world's fastest static website engine. It's written in Go (aka Golang) and developed by bep, spf13 and friends. -menu: - main: - weight: 1 -weight: 1 layout: list --- -A fast and flexible [static site generator] built with love by [bep], [spf13], and [friends] in [Go]. + diff --git a/content/en/functions/_common/_index.md b/content/en/functions/_common/_index.md deleted file mode 100644 index 4328d4d14..000000000 --- a/content/en/functions/_common/_index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -cascade: - _build: - list: never - publishResources: false - render: never ---- - - diff --git a/content/en/functions/_index.md b/content/en/functions/_index.md index 95d766b13..d3081210b 100644 --- a/content/en/functions/_index.md +++ b/content/en/functions/_index.md @@ -1,17 +1,8 @@ --- title: Functions - description: Use these functions within your templates and archetypes. categories: [] keywords: [] -menu: - docs: - identifier: functions-in-this-section - parent: functions - weight: 10 weight: 10 -showSectionMenu: true aliases: [/layout/functions/,/templates/functions] --- - -Use these functions within your templates and archetypes. diff --git a/content/en/functions/cast/ToFloat.md b/content/en/functions/cast/ToFloat.md index 51bc908b6..2f5afd61d 100644 --- a/content/en/functions/cast/ToFloat.md +++ b/content/en/functions/cast/ToFloat.md @@ -3,13 +3,14 @@ title: cast.ToFloat description: Converts a value to a decimal floating-point number (base 10). categories: [] keywords: [] -action: - aliases: [float] - related: - - functions/cast/ToInt - - functions/cast/ToString - returnType: float64 - signatures: [cast.ToFloat INPUT] +params: + functions_and_methods: + aliases: [float] + related: + - functions/cast/ToInt + - functions/cast/ToString + returnType: float64 + signatures: [cast.ToFloat INPUT] aliases: [/functions/float] --- diff --git a/content/en/functions/cast/ToInt.md b/content/en/functions/cast/ToInt.md index 3e272cba4..2d97b8d84 100644 --- a/content/en/functions/cast/ToInt.md +++ b/content/en/functions/cast/ToInt.md @@ -2,13 +2,14 @@ title: cast.ToInt description: Converts a value to a decimal integer (base 10). keywords: [] -action: - aliases: [int] - related: - - functions/cast/ToFloat - - functions/cast/ToString - returnType: int - signatures: [cast.ToInt INPUT] +params: + functions_and_methods: + aliases: [int] + related: + - functions/cast/ToFloat + - functions/cast/ToString + returnType: int + signatures: [cast.ToInt INPUT] aliases: [/functions/int] --- diff --git a/content/en/functions/cast/ToString.md b/content/en/functions/cast/ToString.md index a701c9421..f90ef14c0 100644 --- a/content/en/functions/cast/ToString.md +++ b/content/en/functions/cast/ToString.md @@ -3,13 +3,14 @@ title: cast.ToString description: Converts a value to a string. categories: [] keywords: [] -action: - aliases: [string] - related: - - functions/cast/ToFloat - - functions/cast/ToInt - returnType: string - signatures: [cast.ToString INPUT] +params: + functions_and_methods: + aliases: [string] + related: + - functions/cast/ToFloat + - functions/cast/ToInt + returnType: string + signatures: [cast.ToString INPUT] aliases: [/functions/string] --- diff --git a/content/en/functions/cast/_index.md b/content/en/functions/cast/_index.md index 82389237a..1584ab159 100644 --- a/content/en/functions/cast/_index.md +++ b/content/en/functions/cast/_index.md @@ -1,12 +1,7 @@ --- title: Cast functions linkTitle: cast -description: Template functions to cast a value from one data type to another. +description: Use these functions to cast a value from one data type to another. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to cast a value from one data type to another. diff --git a/content/en/functions/collections/After.md b/content/en/functions/collections/After.md index 1f2759da6..909836030 100644 --- a/content/en/functions/collections/After.md +++ b/content/en/functions/collections/After.md @@ -3,13 +3,14 @@ title: collections.After description: Slices an array to the items after the Nth item. categories: [] keywords: [] -action: - aliases: [after] - related: - - functions/collections/First - - functions/collections/Last - returnType: any - signatures: [collections.After INDEX COLLECTION] +params: + functions_and_methods: + aliases: [after] + related: + - functions/collections/First + - functions/collections/Last + returnType: any + signatures: [collections.After INDEX COLLECTION] aliases: [/functions/after] --- diff --git a/content/en/functions/collections/Append.md b/content/en/functions/collections/Append.md index 7189c9068..fd37305d2 100644 --- a/content/en/functions/collections/Append.md +++ b/content/en/functions/collections/Append.md @@ -3,14 +3,15 @@ title: collections.Append description: Appends one or more elements to a slice and returns the resulting slice. categories: [] keywords: [] -action: - aliases: [append] - related: - - functions/collections/Merge - returnType: any - signatures: - - collections.Append ELEMENT [ELEMENT...] COLLECTION - - collections.Append COLLECTION1 COLLECTION2 +params: + functions_and_methods: + aliases: [append] + related: + - functions/collections/Merge + returnType: any + signatures: + - collections.Append ELEMENT [ELEMENT...] COLLECTION + - collections.Append COLLECTION1 COLLECTION2 aliases: [/functions/append] --- diff --git a/content/en/functions/collections/Apply.md b/content/en/functions/collections/Apply.md index 9153e546a..6d8c5c8d4 100644 --- a/content/en/functions/collections/Apply.md +++ b/content/en/functions/collections/Apply.md @@ -3,11 +3,12 @@ title: collections.Apply description: Returns a new collection with each element transformed by the given function. categories: [] keywords: [] -action: - aliases: [apply] - related: [] - returnType: '[]any' - signatures: [collections.Apply COLLECTION FUNCTION PARAM...] +params: + functions_and_methods: + aliases: [apply] + related: [] + returnType: '[]any' + signatures: [collections.Apply COLLECTION FUNCTION PARAM...] aliases: [/functions/apply] --- diff --git a/content/en/functions/collections/Complement.md b/content/en/functions/collections/Complement.md index b4c59822d..44235f4eb 100644 --- a/content/en/functions/collections/Complement.md +++ b/content/en/functions/collections/Complement.md @@ -3,14 +3,15 @@ title: collections.Complement description: Returns the elements of the last collection that are not in any of the others. categories: [] keywords: [] -action: - aliases: [complement] - related: - - functions/collections/Intersect - - functions/collections/SymDiff - - functions/collections/Union - returnType: any - signatures: ['collections.Complement COLLECTION [COLLECTION...]'] +params: + functions_and_methods: + aliases: [complement] + related: + - functions/collections/Intersect + - functions/collections/SymDiff + - functions/collections/Union + returnType: any + signatures: ['collections.Complement COLLECTION [COLLECTION...]'] aliases: [/functions/complement] --- diff --git a/content/en/functions/collections/Delimit.md b/content/en/functions/collections/Delimit.md index 6370ca17d..b403c5b43 100644 --- a/content/en/functions/collections/Delimit.md +++ b/content/en/functions/collections/Delimit.md @@ -3,12 +3,13 @@ title: collections.Delimit description: Loops through any array, slice, or map and returns a string of all the values separated by a delimiter. categories: [] keywords: [] -action: - aliases: [delimit] - related: - - functions/strings/Split - returnType: string - signatures: ['collections.Delimit COLLECTION DELIMITER [LAST]'] +params: + functions_and_methods: + aliases: [delimit] + related: + - functions/strings/Split + returnType: string + signatures: ['collections.Delimit COLLECTION DELIMITER [LAST]'] aliases: [/functions/delimit] --- diff --git a/content/en/functions/collections/Dictionary.md b/content/en/functions/collections/Dictionary.md index a55838e27..cc99d4aed 100644 --- a/content/en/functions/collections/Dictionary.md +++ b/content/en/functions/collections/Dictionary.md @@ -3,12 +3,13 @@ title: collections.Dictionary description: Returns a map composed of the given key-value pairs. categories: [] keywords: [] -action: - aliases: [dict] - related: - - functions/collections/Slice - returnType: map[string]any - signatures: ['collections.Dictionary [VALUE...]'] +params: + functions_and_methods: + aliases: [dict] + related: + - functions/collections/Slice + returnType: map[string]any + signatures: ['collections.Dictionary [VALUE...]'] aliases: [/functions/dict] --- diff --git a/content/en/functions/collections/First.md b/content/en/functions/collections/First.md index 07634d6b8..ec46e3b3d 100644 --- a/content/en/functions/collections/First.md +++ b/content/en/functions/collections/First.md @@ -3,14 +3,15 @@ title: collections.First description: Returns the given collection, limited to the first N elements. categories: [] keywords: [] -action: - aliases: [first] - related: - - functions/collections/After - - functions/collections/Last - - methods/pages/Limit - returnType: any - signatures: [collections.First N COLLECTION] +params: + functions_and_methods: + aliases: [first] + related: + - functions/collections/After + - functions/collections/Last + - methods/pages/Limit + returnType: any + signatures: [collections.First N COLLECTION] aliases: [/functions/first] --- @@ -23,7 +24,7 @@ aliases: [/functions/first] Set `N` to zero to return an empty collection. ```go-html-template -{{ $emptyPageCollection := first 0 .Pages}} +{{ $emptyPageCollection := first 0 .Pages }} ``` Use `first` and [`where`] together. diff --git a/content/en/functions/collections/Group.md b/content/en/functions/collections/Group.md index 0ec45516c..dc2c227f8 100644 --- a/content/en/functions/collections/Group.md +++ b/content/en/functions/collections/Group.md @@ -3,11 +3,12 @@ title: collections.Group description: Groups the given page collection by the given key. categories: [] keywords: [] -action: - aliases: [group] - related: [] - returnType: any - signatures: [collections.Group KEY PAGES] +params: + functions_and_methods: + aliases: [group] + related: [] + returnType: any + signatures: [collections.Group KEY PAGES] aliases: [/functions/group] --- diff --git a/content/en/functions/collections/In.md b/content/en/functions/collections/In.md index 754c65f83..dbe7d5e4d 100644 --- a/content/en/functions/collections/In.md +++ b/content/en/functions/collections/In.md @@ -3,16 +3,17 @@ title: collections.In description: Reports whether the given value is a member of the given set. categories: [] keywords: [] -action: - aliases: [in] - related: - - functions/strings/Contains - - functions/strings/ContainsAny - - functions/strings/ContainsNonSpace - - functions/strings/HasPrefix - - functions/strings/HasSuffix - returnType: bool - signatures: [collections.In SET VALUE] +params: + functions_and_methods: + aliases: [in] + related: + - functions/strings/Contains + - functions/strings/ContainsAny + - functions/strings/ContainsNonSpace + - functions/strings/HasPrefix + - functions/strings/HasSuffix + returnType: bool + signatures: [collections.In SET VALUE] aliases: [/functions/in] --- diff --git a/content/en/functions/collections/IndexFunction.md b/content/en/functions/collections/IndexFunction.md index 977e14d1e..439e0cd49 100644 --- a/content/en/functions/collections/IndexFunction.md +++ b/content/en/functions/collections/IndexFunction.md @@ -3,12 +3,12 @@ title: collections.Index description: Returns the object, element, or value associated with the given key or keys. categories: [] keywords: [] -action: - aliases: [index] - related: [] - returnType: any - signatures: - - collections.Index COLLECTION KEY... +params: + functions_and_methods: + aliases: [index] + related: [] + returnType: any + signatures: [collections.Index COLLECTION KEY...] aliases: [/functions/index,/functions/index-function] --- diff --git a/content/en/functions/collections/Intersect.md b/content/en/functions/collections/Intersect.md index 9e9cc0c76..4c4b44784 100644 --- a/content/en/functions/collections/Intersect.md +++ b/content/en/functions/collections/Intersect.md @@ -3,14 +3,15 @@ title: collections.Intersect description: Returns the common elements of two arrays or slices, in the same order as the first array. categories: [] keywords: [] -action: - aliases: [intersect] - related: - - functions/collections/Complement - - functions/collections/SymDiff - - functions/collections/Union - returnType: any - signatures: [collections.Intersect SET1 SET2] +params: + functions_and_methods: + aliases: [intersect] + related: + - functions/collections/Complement + - functions/collections/SymDiff + - functions/collections/Union + returnType: any + signatures: [collections.Intersect SET1 SET2] aliases: [/functions/intersect] --- diff --git a/content/en/functions/collections/IsSet.md b/content/en/functions/collections/IsSet.md index 431a2aae6..c6dbb976c 100644 --- a/content/en/functions/collections/IsSet.md +++ b/content/en/functions/collections/IsSet.md @@ -3,13 +3,14 @@ title: collections.IsSet description: Reports whether the key exists within the collection. categories: [] keywords: [] -action: - aliases: [isset] - related: - - functions/go-template/if - - functions/go-template/with - returnType: bool - signatures: [collections.IsSet COLLECTION KEY] +params: + functions_and_methods: + aliases: [isset] + related: + - functions/go-template/if + - functions/go-template/with + returnType: bool + signatures: [collections.IsSet COLLECTION KEY] aliases: [/functions/isset] --- diff --git a/content/en/functions/collections/KeyVals.md b/content/en/functions/collections/KeyVals.md index 6a2109e78..f9d73910d 100644 --- a/content/en/functions/collections/KeyVals.md +++ b/content/en/functions/collections/KeyVals.md @@ -3,12 +3,13 @@ title: collections.KeyVals description: Returns a KeyVals struct. categories: [] keywords: [] -action: - aliases: [keyVals] - related: - - methods/pages/Related - returnType: types.KeyValues - signatures: [collections.KeyVals KEY VALUE...] +params: + functions_and_methods: + aliases: [keyVals] + related: + - methods/pages/Related + returnType: types.KeyValues + signatures: [collections.KeyVals KEY VALUE...] aliases: [/functions/keyvals] --- @@ -16,7 +17,7 @@ The primary application for this function is the definition of the `namedSlices` [`Related`]: /methods/pages/related/ -See [related content](/content-management/related). +See [related content](/content-management/related-content/). ```go-html-template {{ $kv := keyVals "foo" "a" "b" "c" }} diff --git a/content/en/functions/collections/Last.md b/content/en/functions/collections/Last.md index 7739b8726..624bbf868 100644 --- a/content/en/functions/collections/Last.md +++ b/content/en/functions/collections/Last.md @@ -3,13 +3,14 @@ title: collections.Last description: Returns the given collection, limited to the last N elements. categories: [] keywords: [] -action: - aliases: [last] - related: - - functions/collections/After - - functions/collections/First - returnType: any - signatures: [collections.Last N COLLECTION] +params: + functions_and_methods: + aliases: [last] + related: + - functions/collections/After + - functions/collections/First + returnType: any + signatures: [collections.Last N COLLECTION] aliases: [/functions/last] --- @@ -22,7 +23,7 @@ aliases: [/functions/last] Set `N` to zero to return an empty collection. ```go-html-template -{{ $emptyPageCollection := last 0 .Pages}} +{{ $emptyPageCollection := last 0 .Pages }} ``` Use `last` and [`where`] together. diff --git a/content/en/functions/collections/Merge.md b/content/en/functions/collections/Merge.md index 7cc788f85..b2c4e37c5 100644 --- a/content/en/functions/collections/Merge.md +++ b/content/en/functions/collections/Merge.md @@ -3,12 +3,13 @@ title: collections.Merge description: Returns the result of merging two or more maps. categories: [] keywords: [] -action: - aliases: [merge] - related: - - functions/collections/Append - returnType: any - signatures: [collections.Merge MAP MAP...] +params: + functions_and_methods: + aliases: [merge] + related: + - functions/collections/Append + returnType: any + signatures: [collections.Merge MAP MAP...] aliases: [/functions/merge] --- diff --git a/content/en/functions/collections/NewScratch.md b/content/en/functions/collections/NewScratch.md index a76168961..053b7158b 100644 --- a/content/en/functions/collections/NewScratch.md +++ b/content/en/functions/collections/NewScratch.md @@ -3,23 +3,23 @@ title: collections.NewScratch description: Returns a locally scoped "scratch pad" to store and manipulate data. categories: [] keywords: [] -action: - aliases: [newScratch] - related: - - methods/page/Store - - methods/site/Store - - methods/shortcode/Store - - functions/hugo/Store - returnType: maps.Scratch +params: + functions_and_methods: + aliases: [newScratch] + related: + - methods/page/Store + - methods/site/Store + - methods/shortcode/Store + - functions/hugo/Store + returnType: maps.Scratch signatures: [collections.NewScratch ] -toc: true --- Use the `collections.NewScratch` function to create a locally scoped [scratch pad](g) to store and manipulate data. To create a scratch pad with a different [scope](g), refer to the [scope](#scope) section below. ## Methods -###### Set +### Set Sets the value of the given key. @@ -28,7 +28,7 @@ Sets the value of the given key. {{ $s.Set "greeting" "Hello" }} ``` -###### Get +### Get Gets the value of the given key. @@ -38,7 +38,7 @@ Gets the value of the given key. {{ $s.Get "greeting" }} → Hello ``` -###### Add +### Add Adds the given value to existing value(s) of the given key. @@ -65,7 +65,7 @@ For single values, `Add` accepts values that support Go's `+` operator. If the f {{ $s.Get "greetings" }} → [Hello Welcome Cheers] ``` -###### SetInMap +### SetInMap Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`. @@ -76,7 +76,7 @@ Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to th {{ $s.Get "greetings" }} → map[english:Hello french:Bonjour] ``` -###### DeleteInMap +### DeleteInMap Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`. @@ -88,7 +88,7 @@ Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`. {{ $s.Get "greetings" }} → map[french:Bonjour] ``` -###### GetSortedMapValues +### GetSortedMapValues Returns an array of values from `key` sorted by `mapKey`. @@ -99,7 +99,7 @@ Returns an array of values from `key` sorted by `mapKey`. {{ $s.GetSortedMapValues "greetings" }} → [Hello Bonjour] ``` -###### Delete +### Delete Removes the given key. @@ -109,9 +109,9 @@ Removes the given key. {{ $s.Delete "greeting" }} ``` -###### Values +### Values -Returns the raw backing map. Do not use with `Scratch` or `Store` methods on a `Page` object due to concurrency issues. +Returns the raw backing map. Do not use with `Store` methods on a `Page` object due to concurrency issues. ```go-html-template {{ $s := newScratch }} diff --git a/content/en/functions/collections/Querify.md b/content/en/functions/collections/Querify.md index 0eb409421..92979285f 100644 --- a/content/en/functions/collections/Querify.md +++ b/content/en/functions/collections/Querify.md @@ -3,13 +3,13 @@ title: collections.Querify description: Returns a URL query string composed of the given key-value pairs, encoded and sorted by key. categories: [] keywords: [] -action: - aliases: [querify] - related: - - functions/go-template/urlquery.md - returnType: string - signatures: - - collections.Querify [VALUE...] +params: + functions_and_methods: + aliases: [querify] + related: + - functions/go-template/urlquery.md + returnType: string + signatures: ['collections.Querify [VALUE...]'] aliases: [/functions/querify] --- diff --git a/content/en/functions/collections/Reverse.md b/content/en/functions/collections/Reverse.md index d0a449763..a8914a3d0 100644 --- a/content/en/functions/collections/Reverse.md +++ b/content/en/functions/collections/Reverse.md @@ -3,14 +3,15 @@ title: collections.Reverse description: Reverses the order of a collection. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/collections/Sort - - functions/collections/Shuffle - - functions/collections/Uniq - returnType: any - signatures: [collections.Reverse COLLECTION] +params: + functions_and_methods: + aliases: [] + related: + - functions/collections/Sort + - functions/collections/Shuffle + - functions/collections/Uniq + returnType: any + signatures: [collections.Reverse COLLECTION] aliases: [/functions/collections.reverse] --- diff --git a/content/en/functions/collections/Seq.md b/content/en/functions/collections/Seq.md index b9f66e8d7..efae0b5fd 100644 --- a/content/en/functions/collections/Seq.md +++ b/content/en/functions/collections/Seq.md @@ -3,14 +3,15 @@ title: collections.Seq description: Returns a slice of integers. categories: [] keywords: [] -action: - aliases: [seq] - related: [] - returnType: '[]int' - signatures: - - collections.Seq LAST - - collections.Seq FIRST LAST - - collections.Seq FIRST INCREMENT LAST +params: + functions_and_methods: + aliases: [seq] + related: [] + returnType: '[]int' + signatures: + - collections.Seq LAST + - collections.Seq FIRST LAST + - collections.Seq FIRST INCREMENT LAST aliases: [/functions/seq] --- diff --git a/content/en/functions/collections/Shuffle.md b/content/en/functions/collections/Shuffle.md index 0f28eb4d8..ca85334b2 100644 --- a/content/en/functions/collections/Shuffle.md +++ b/content/en/functions/collections/Shuffle.md @@ -3,14 +3,15 @@ title: collections.Shuffle description: Returns a random permutation of a given array or slice. categories: [] keywords: [] -action: - aliases: [shuffle] - related: - - functions/collections/Reverse - - functions/collections/Sort - - functions/collections/Uniq - returnType: any - signatures: [collections.Shuffle COLLECTION] +params: + functions_and_methods: + aliases: [shuffle] + related: + - functions/collections/Reverse + - functions/collections/Sort + - functions/collections/Uniq + returnType: any + signatures: [collections.Shuffle COLLECTION] aliases: [/functions/shuffle] --- diff --git a/content/en/functions/collections/Slice.md b/content/en/functions/collections/Slice.md index 385f9b658..750763ed9 100644 --- a/content/en/functions/collections/Slice.md +++ b/content/en/functions/collections/Slice.md @@ -3,12 +3,13 @@ title: collections.Slice description: Returns a slice composed of the given values. categories: [] keywords: [] -action: - aliases: [slice] - related: - - functions/collections/Dictionary - returnType: any - signatures: ['collections.Slice [VALUE...]'] +params: + functions_and_methods: + aliases: [slice] + related: + - functions/collections/Dictionary + returnType: any + signatures: ['collections.Slice [VALUE...]'] aliases: [/functions/slice] --- diff --git a/content/en/functions/collections/Sort.md b/content/en/functions/collections/Sort.md index ae8f30609..ba0d5814e 100644 --- a/content/en/functions/collections/Sort.md +++ b/content/en/functions/collections/Sort.md @@ -3,15 +3,15 @@ title: collections.Sort description: Sorts slices, maps, and page collections. categories: [] keywords: [] -action: - aliases: [sort] - related: - - functions/collections/Reverse - - functions/collections/Shuffle - - functions/collections/Uniq - returnType: any - signatures: ['collections.Sort COLLECTION [KEY] [ORDER]'] -toc: true +params: + functions_and_methods: + aliases: [sort] + related: + - functions/collections/Reverse + - functions/collections/Shuffle + - functions/collections/Uniq + returnType: any + signatures: ['collections.Sort COLLECTION [KEY] [ORDER]'] aliases: [/functions/sort] --- diff --git a/content/en/functions/collections/SymDiff.md b/content/en/functions/collections/SymDiff.md index 7eba3ef42..d1d4adb2b 100644 --- a/content/en/functions/collections/SymDiff.md +++ b/content/en/functions/collections/SymDiff.md @@ -3,15 +3,16 @@ title: collections.SymDiff description: Returns the symmetric difference of two collections. categories: [] keywords: [] -action: - aliases: [symdiff] - related: - - functions/collections/Complement - - functions/collections/Intersect - - functions/collections/SymDiff - - functions/collections/Union - returnType: any - signatures: [COLLECTION | collections.SymDiff COLLECTION] +params: + functions_and_methods: + aliases: [symdiff] + related: + - functions/collections/Complement + - functions/collections/Intersect + - functions/collections/SymDiff + - functions/collections/Union + returnType: any + signatures: [COLLECTION | collections.SymDiff COLLECTION] aliases: [/functions/symdiff] --- diff --git a/content/en/functions/collections/Union.md b/content/en/functions/collections/Union.md index 7fed49a10..cb0457d6e 100644 --- a/content/en/functions/collections/Union.md +++ b/content/en/functions/collections/Union.md @@ -3,32 +3,29 @@ title: collections.Union description: Given two arrays or slices, returns a new array that contains the elements that belong to either or both arrays/slices. categories: [] keywords: [] -action: - aliases: [union] - related: - - functions/collections/Complement - - functions/collections/Intersect - - functions/collections/SymDiff - - functions/collections/Union - returnType: any - signatures: [collections.Union SET1 SET2] +params: + functions_and_methods: + aliases: [union] + related: + - functions/collections/Complement + - functions/collections/Intersect + - functions/collections/SymDiff + - functions/collections/Union + returnType: any + signatures: [collections.Union SET1 SET2] aliases: [/functions/union] --- Given two arrays (or slices) A and B, this function will return a new array that contains the elements or objects that belong to either A or to B or to both. ```go-html-template -{{ union (slice 1 2 3) (slice 3 4 5) }} - +{{ union (slice 1 2 3) (slice 3 4 5) }} → [1 2 3 4 5] -{{ union (slice 1 2 3) nil }} - +{{ union (slice 1 2 3) nil }} → [1 2 3] -{{ union nil (slice 1 2 3) }} - +{{ union nil (slice 1 2 3) }} → [1 2 3] -{{ union nil nil }} - +{{ union nil nil }} → [] ``` ## OR filter in where query diff --git a/content/en/functions/collections/Uniq.md b/content/en/functions/collections/Uniq.md index 02b590c18..6fd3c23d7 100644 --- a/content/en/functions/collections/Uniq.md +++ b/content/en/functions/collections/Uniq.md @@ -3,15 +3,16 @@ title: collections.Uniq description: Returns the given collection, removing duplicate elements. categories: [] keywords: [] -action: - aliases: [uniq] - related: - - functions/collections/Reverse - - functions/collections/Shuffle - - functions/collections/Sort - - functions/collections/Uniq - returnType: any - signatures: [collections.Uniq COLLECTION] +params: + functions_and_methods: + aliases: [uniq] + related: + - functions/collections/Reverse + - functions/collections/Shuffle + - functions/collections/Sort + - functions/collections/Uniq + returnType: any + signatures: [collections.Uniq COLLECTION] aliases: [/functions/uniq] --- diff --git a/content/en/functions/collections/Where.md b/content/en/functions/collections/Where.md index ea02d3ef2..0c03d01a6 100644 --- a/content/en/functions/collections/Where.md +++ b/content/en/functions/collections/Where.md @@ -3,12 +3,12 @@ title: collections.Where description: Returns the given collection, removing elements that do not satisfy the comparison condition. categories: [] keywords: [] -action: - aliases: [where] - related: [] - returnType: any - signatures: ['collections.Where COLLECTION KEY [OPERATOR] VALUE'] -toc: true +params: + functions_and_methods: + aliases: [where] + related: [] + returnType: any + signatures: ['collections.Where COLLECTION KEY [OPERATOR] VALUE'] aliases: [/functions/where] --- @@ -176,7 +176,7 @@ To return a collection of pages where the "author" page parameter begins with ei {{ $pages := where .Site.RegularPages "Params.author" "like" `(?i)^victor` }} ``` -{{% include "functions/_common/regular-expressions.md" %}} +{{% include "/_common/functions/regular-expressions.md" %}} {{< note >}} Use the `like` operator to compare string values. Comparing other data types will result in an empty collection. @@ -281,11 +281,10 @@ Useful for theme authors, avoid hardcoding section names by using the `where` fu With this construct, a theme author can instruct users to specify their main sections in the site configuration: {{< code-toggle file=hugo >}} -[params] mainSections = ['blog','galleries'] {{< /code-toggle >}} -If `params.mainSections` is not defined in the site configuration, the `MainSections` method returns a slice with one element---the top level section with the most pages. +If `mainSections` is not defined in the site configuration, the `MainSections` method returns a slice with one element---the top-level section with the most pages. ## Boolean/undefined comparison @@ -393,7 +392,7 @@ This template: ```go-html-template {{ $p1 := where .Site.RegularPages "Params.exclude" "ne" true }} -{{ $p2 := where .Site.RegularPages "Params.exclude" "eq" nil }} +{{ $p2 := where .Site.RegularPages "Params.exclude" "eq" nil }}
    {{ range $p1 | complement $p2 }}
  • {{ .LinkTitle }}
  • @@ -413,7 +412,7 @@ This template: ```go-html-template {{ $p1 := where .Site.RegularPages "Params.exclude" "ne" false }} -{{ $p2 := where .Site.RegularPages "Params.exclude" "eq" nil }} +{{ $p2 := where .Site.RegularPages "Params.exclude" "eq" nil }}
      {{ range $p1 | complement $p2 }}
    • {{ .LinkTitle }}
    • diff --git a/content/en/functions/collections/_index.md b/content/en/functions/collections/_index.md index 51981f79b..c7b856f4f 100644 --- a/content/en/functions/collections/_index.md +++ b/content/en/functions/collections/_index.md @@ -1,12 +1,7 @@ --- title: Collections functions linkTitle: collections -description: Template functions to work with arrays, slices, maps, and page collections. +description: Use these functions to work with arrays, slices, maps, and page collections. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to work with arrays, slices, maps, and page collections. diff --git a/content/en/functions/compare/Conditional.md b/content/en/functions/compare/Conditional.md index 997b71e94..ad20f94aa 100644 --- a/content/en/functions/compare/Conditional.md +++ b/content/en/functions/compare/Conditional.md @@ -3,12 +3,13 @@ title: compare.Conditional description: Returns one of two arguments depending on the value of the control argument. categories: [] keywords: [] -action: - aliases: [cond] - related: - - functions/compare/Default - returnType: any - signatures: [compare.Conditional CONTROL ARG1 ARG2] +params: + functions_and_methods: + aliases: [cond] + related: + - functions/compare/Default + returnType: any + signatures: [compare.Conditional CONTROL ARG1 ARG2] aliases: [/functions/cond] --- diff --git a/content/en/functions/compare/Default.md b/content/en/functions/compare/Default.md index ab52367ec..0f9eb5b62 100644 --- a/content/en/functions/compare/Default.md +++ b/content/en/functions/compare/Default.md @@ -2,13 +2,14 @@ title: compare.Default description: Returns the second argument if set, else the first argument. keywords: [] -action: - aliases: [default] - related: - - functions/compare/Conditional - - functions/go-template/Or - returnType: any - signatures: [compare.Default DEFAULT INPUT] +params: + functions_and_methods: + aliases: [default] + related: + - functions/compare/Conditional + - functions/go-template/Or + returnType: any + signatures: [compare.Default DEFAULT INPUT] aliases: [/functions/default] --- @@ -17,7 +18,7 @@ The `default` function returns the second argument if set, else the first argume {{< note >}} When the second argument is the boolean `false` value, the `default` function returns `false`. All _other_ falsy values are considered unset. -{{% include "functions/go-template/_common/truthy-falsy.md" %}} +{{% include "/_common/functions/truthy-falsy.md" %}} To set a default value based on truthiness, use the [`or`] operator instead. diff --git a/content/en/functions/compare/Eq.md b/content/en/functions/compare/Eq.md index a877aeddf..b57168ed0 100644 --- a/content/en/functions/compare/Eq.md +++ b/content/en/functions/compare/Eq.md @@ -3,16 +3,17 @@ title: compare.Eq description: Returns the boolean truth of arg1 == arg2 || arg1 == arg3. categories: [] keywords: [] -action: - aliases: [eq] - related: - - functions/compare/Ge - - functions/compare/Gt - - functions/compare/Le - - functions/compare/Lt - - functions/compare/Ne - returnType: bool - signatures: ['compare.Eq ARG1 ARG2 [ARG...]'] +params: + functions_and_methods: + aliases: [eq] + related: + - functions/compare/Ge + - functions/compare/Gt + - functions/compare/Le + - functions/compare/Lt + - functions/compare/Ne + returnType: bool + signatures: ['compare.Eq ARG1 ARG2 [ARG...]'] aliases: [/functions/eq] --- diff --git a/content/en/functions/compare/Ge.md b/content/en/functions/compare/Ge.md index ce1fd2302..4fe5c6bff 100644 --- a/content/en/functions/compare/Ge.md +++ b/content/en/functions/compare/Ge.md @@ -3,16 +3,17 @@ title: compare.Ge description: Returns the boolean truth of arg1 >= arg2 && arg1 >= arg3. categories: [] keywords: [] -action: - aliases: [ge] - related: - - functions/compare/Eq - - functions/compare/Gt - - functions/compare/Le - - functions/compare/Lt - - functions/compare/Ne - returnType: bool - signatures: ['compare.Ge ARG1 ARG2 [ARG...]'] +params: + functions_and_methods: + aliases: [ge] + related: + - functions/compare/Eq + - functions/compare/Gt + - functions/compare/Le + - functions/compare/Lt + - functions/compare/Ne + returnType: bool + signatures: ['compare.Ge ARG1 ARG2 [ARG...]'] aliases: [/functions/ge] --- diff --git a/content/en/functions/compare/Gt.md b/content/en/functions/compare/Gt.md index 9ff3b0c89..ecbbe9258 100644 --- a/content/en/functions/compare/Gt.md +++ b/content/en/functions/compare/Gt.md @@ -3,16 +3,17 @@ title: compare.Gt description: Returns the boolean truth of arg1 > arg2 && arg1 > arg3. categories: [] keywords: [] -action: - aliases: [gt] - related: - - functions/compare/Eq - - functions/compare/Ge - - functions/compare/Le - - functions/compare/Lt - - functions/compare/Ne - returnType: bool - signatures: ['compare.Gt ARG1 ARG2 [ARG...]'] +params: + functions_and_methods: + aliases: [gt] + related: + - functions/compare/Eq + - functions/compare/Ge + - functions/compare/Le + - functions/compare/Lt + - functions/compare/Ne + returnType: bool + signatures: ['compare.Gt ARG1 ARG2 [ARG...]'] aliases: [/functions/gt] --- diff --git a/content/en/functions/compare/Le.md b/content/en/functions/compare/Le.md index a0fbed29d..d35ec1bed 100644 --- a/content/en/functions/compare/Le.md +++ b/content/en/functions/compare/Le.md @@ -3,16 +3,17 @@ title: compare.Le description: Returns the boolean truth of arg1 <= arg2 && arg1 <= arg3. categories: [] keywords: [] -action: - aliases: [le] - related: - - functions/compare/Eq - - functions/compare/Ge - - functions/compare/Gt - - functions/compare/Lt - - functions/compare/Ne - returnType: bool - signatures: ['compare.Le ARG1 ARG2 [ARG...]'] +params: + functions_and_methods: + aliases: [le] + related: + - functions/compare/Eq + - functions/compare/Ge + - functions/compare/Gt + - functions/compare/Lt + - functions/compare/Ne + returnType: bool + signatures: ['compare.Le ARG1 ARG2 [ARG...]'] aliases: [/functions/le] --- diff --git a/content/en/functions/compare/Lt.md b/content/en/functions/compare/Lt.md index b306a97b5..51a7b094a 100644 --- a/content/en/functions/compare/Lt.md +++ b/content/en/functions/compare/Lt.md @@ -3,16 +3,17 @@ title: compare.Lt description: Returns the boolean truth of arg1 < arg2 && arg1 < arg3. categories: [] keywords: [] -action: - aliases: [lt] - related: - - functions/compare/Eq - - functions/compare/Ge - - functions/compare/Gt - - functions/compare/Le - - functions/compare/Ne - returnType: bool - signatures: ['compare.Lt ARG1 ARG2 [ARG...]'] +params: + functions_and_methods: + aliases: [lt] + related: + - functions/compare/Eq + - functions/compare/Ge + - functions/compare/Gt + - functions/compare/Le + - functions/compare/Ne + returnType: bool + signatures: ['compare.Lt ARG1 ARG2 [ARG...]'] aliases: [/functions/lt] --- diff --git a/content/en/functions/compare/Ne.md b/content/en/functions/compare/Ne.md index dbe0a3898..ce908a766 100644 --- a/content/en/functions/compare/Ne.md +++ b/content/en/functions/compare/Ne.md @@ -3,16 +3,17 @@ title: compare.Ne description: Returns the boolean truth of arg1 != arg2 && arg1 != arg3. categories: [] keywords: [] -action: - aliases: [ne] - related: - - functions/compare/Eq - - functions/compare/Ge - - functions/compare/Gt - - functions/compare/Le - - functions/compare/Lt - returnType: bool - signatures: ['compare.Ne ARG1 ARG2 [ARG...]'] +params: + functions_and_methods: + aliases: [ne] + related: + - functions/compare/Eq + - functions/compare/Ge + - functions/compare/Gt + - functions/compare/Le + - functions/compare/Lt + returnType: bool + signatures: ['compare.Ne ARG1 ARG2 [ARG...]'] aliases: [/functions/ne] --- diff --git a/content/en/functions/compare/_index.md b/content/en/functions/compare/_index.md index a9b3a7b27..59673a2c8 100644 --- a/content/en/functions/compare/_index.md +++ b/content/en/functions/compare/_index.md @@ -1,12 +1,7 @@ --- title: Compare functions linkTitle: compare -description: Template functions to compare two or more values. +description: Use these functions to compare two or more values. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to compare two or more values. diff --git a/content/en/functions/crypto/FNV32a.md b/content/en/functions/crypto/FNV32a.md index 3c13346c5..76c3c3e39 100644 --- a/content/en/functions/crypto/FNV32a.md +++ b/content/en/functions/crypto/FNV32a.md @@ -1,13 +1,14 @@ --- title: crypto.FNV32a -description: Returns the 32-bit FNV (Fowler–Noll–Vo) non-cryptographic hash of the given string. +description: Returns the 32-bit FNV (Fowler-Noll-Vo) non-cryptographic hash of the given string. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: int - signatures: [crypto.FNV32a STRING] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: int + signatures: [crypto.FNV32a STRING] expiryDate: 2026-07-31 # deprecated 2024-07-31 in v0.129.0 --- diff --git a/content/en/functions/crypto/HMAC.md b/content/en/functions/crypto/HMAC.md index 1906689a2..13df44f1a 100644 --- a/content/en/functions/crypto/HMAC.md +++ b/content/en/functions/crypto/HMAC.md @@ -3,15 +3,16 @@ title: crypto.HMAC description: Returns a cryptographic hash that uses a key to sign a message. categories: [] keywords: [] -action: - aliases: [hmac] - related: - - functions/crypto/FNV32a - - functions/crypto/MD5 - - functions/crypto/SHA1 - - functions/crypto/SHA256 - returnType: string - signatures: ['crypto.HMAC HASH_TYPE KEY MESSAGE [ENCODING]'] +params: + functions_and_methods: + aliases: [hmac] + related: + - functions/crypto/FNV32a + - functions/crypto/MD5 + - functions/crypto/SHA1 + - functions/crypto/SHA256 + returnType: string + signatures: ['crypto.HMAC HASH_TYPE KEY MESSAGE [ENCODING]'] aliases: [/functions/hmac] --- diff --git a/content/en/functions/crypto/MD5.md b/content/en/functions/crypto/MD5.md index ba44660df..7eac2607d 100644 --- a/content/en/functions/crypto/MD5.md +++ b/content/en/functions/crypto/MD5.md @@ -3,15 +3,16 @@ title: crypto.MD5 description: Hashes the given input and returns its MD5 checksum encoded to a hexadecimal string. categories: [] keywords: [] -action: - aliases: [md5] - related: - - functions/crypto/FNV32a - - functions/crypto/HMAC - - functions/crypto/SHA1 - - functions/crypto/SHA256 - returnType: string - signatures: [crypto.MD5 INPUT] +params: + functions_and_methods: + aliases: [md5] + related: + - functions/crypto/FNV32a + - functions/crypto/HMAC + - functions/crypto/SHA1 + - functions/crypto/SHA256 + returnType: string + signatures: [crypto.MD5 INPUT] aliases: [/functions/md5] --- diff --git a/content/en/functions/crypto/SHA1.md b/content/en/functions/crypto/SHA1.md index 204ff0384..9784e3140 100644 --- a/content/en/functions/crypto/SHA1.md +++ b/content/en/functions/crypto/SHA1.md @@ -3,15 +3,16 @@ title: crypto.SHA1 description: Hashes the given input and returns its SHA1 checksum encoded to a hexadecimal string. categories: [] keywords: [] -action: - aliases: [sha1] - related: - - functions/crypto/FNV32a - - functions/crypto/HMAC - - functions/crypto/MD5 - - functions/crypto/SHA256 - returnType: string - signatures: [crypto.SHA1 INPUT] +params: + functions_and_methods: + aliases: [sha1] + related: + - functions/crypto/FNV32a + - functions/crypto/HMAC + - functions/crypto/MD5 + - functions/crypto/SHA256 + returnType: string + signatures: [crypto.SHA1 INPUT] aliases: [/functions/sha,/functions/sha1] --- diff --git a/content/en/functions/crypto/SHA256.md b/content/en/functions/crypto/SHA256.md index 6fb657767..3157a09fe 100644 --- a/content/en/functions/crypto/SHA256.md +++ b/content/en/functions/crypto/SHA256.md @@ -3,15 +3,16 @@ title: crypto.SHA256 description: Hashes the given input and returns its SHA256 checksum encoded to a hexadecimal string. categories: [] keywords: [] -action: - aliases: [sha256] - related: - - functions/crypto/FNV32a - - functions/crypto/HMAC - - functions/crypto/MD5 - - functions/crypto/SHA1 - returnType: string - signatures: [crypto.SHA256 INPUT] +params: + functions_and_methods: + aliases: [sha256] + related: + - functions/crypto/FNV32a + - functions/crypto/HMAC + - functions/crypto/MD5 + - functions/crypto/SHA1 + returnType: string + signatures: [crypto.SHA256 INPUT] aliases: [/functions/sha256] --- diff --git a/content/en/functions/crypto/_index.md b/content/en/functions/crypto/_index.md index 5c95aab6e..5771630d4 100644 --- a/content/en/functions/crypto/_index.md +++ b/content/en/functions/crypto/_index.md @@ -1,12 +1,7 @@ --- title: Crypto functions linkTitle: crypto -description: Template functions to create cryptographic hashes. +description: Use these functions to create cryptographic hashes. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to create cryptographic hashes. diff --git a/content/en/functions/css/PostCSS.md b/content/en/functions/css/PostCSS.md index 9b806c2a9..aa8e520d1 100644 --- a/content/en/functions/css/PostCSS.md +++ b/content/en/functions/css/PostCSS.md @@ -3,14 +3,14 @@ title: css.PostCSS description: Processes the given resource with PostCSS using any PostCSS plugin. categories: [] keywords: [] -action: - aliases: [postCSS] - related: - - functions/css/Sass - - functions/css/TailwindCSS - returnType: resource.Resource - signatures: ['css.PostCSS [OPTIONS] RESOURCE'] -toc: true +params: + functions_and_methods: + aliases: [postCSS] + related: + - functions/css/Sass + - functions/css/TailwindCSS + returnType: resource.Resource + signatures: ['css.PostCSS [OPTIONS] RESOURCE'] --- {{< new-in 0.128.0 />}} @@ -27,20 +27,23 @@ Follow the steps below to transform CSS using any of the available [PostCSS plug [postcss plugins]: https://postcss.org/docs/postcss-plugins -Step 1 -: Install [Node.js]. +### Step 1 + +Install [Node.js]. [node.js]: https://nodejs.org/en/download -Step 2 -: Install the required Node.js packages in the root of your project. For example, to add vendor prefixes to your CSS rules: +### Step 2 + +Install the required Node.js packages in the root of your project. For example, to add vendor prefixes to your CSS rules: ```sh npm i -D postcss postcss-cli autoprefixer ``` -Step 3 -: Create a PostCSS configuration file in the root of your project. +### Step 3 + +Create a PostCSS configuration file in the root of your project. {{< code file=postcss.config.js >}} module.exports = { @@ -51,14 +54,16 @@ module.exports = { {{< /code >}} {{< note >}} -{{% include "functions/resources/_common/postcss-windows-warning.md" %}} +{{% include "/_common/functions/postcss-windows-warning.md" %}} {{< /note >}} -Step 4 -: Place your CSS file within the `assets/css` directory. +### Step 4 -Step 5 -: Process the resource with PostCSS: +Place your CSS file within the `assets/css` directory. + +### Step 5 + +Process the resource with PostCSS: ```go-html-template {{ with resources.Get "css/main.css" | postCSS }} @@ -74,13 +79,13 @@ config : (`string`) The directory that contains the PostCSS configuration file. Default is the root of the project directory. noMap -: (`bool`) Default is `false`. If `true`, disables inline sourcemaps. +: (`bool`) Whether to disable inline source maps. Default is `false`. inlineImports -: (`bool`) Default is `false`. Enable inlining of @import statements. It does so recursively, but will only import a file once. URL imports (e.g. `@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');`) and imports with media queries will be ignored. Note that this import routine does not care about the CSS spec, so you can have @import anywhere in the file. Hugo will look for imports relative to the module mount and will respect theme overrides. +: (`bool`) Whether to enable inlining of import statements. It does so recursively, but will only import a file once. URL imports (e.g. `@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');`) and imports with media queries will be ignored. Note that this import routine does not care about the CSS spec, so you can have @import anywhere in the file. Hugo will look for imports relative to the module mount and will respect theme overrides. Default is `false`. skipInlineImportsNotFound -: (`bool`) Default is `false`. Before Hugo 0.99.0 when `inlineImports` was enabled and we failed to resolve an import, we logged it as a warning. We now fail the build. If you have regular CSS imports in your CSS that you want to preserve, you can either use imports with URL or media queries (Hugo does not try to resolve those) or set `skipInlineImportsNotFound` to true. +: (`bool`) Whether to allow the build process to continue despite unresolved import statements, preserving the original import declarations. If you have regular CSS imports in your CSS that you want to preserve, you can either use imports with URL or media queries (Hugo does not try to resolve those) or set this option to `true`. Default is `false`." ```go-html-template {{ $opts := dict "config" "config-directory" "noMap" true }} diff --git a/content/en/functions/css/Sass.md b/content/en/functions/css/Sass.md index 73f7af1ea..8fe205d3e 100644 --- a/content/en/functions/css/Sass.md +++ b/content/en/functions/css/Sass.md @@ -3,16 +3,16 @@ title: css.Sass description: Transpiles Sass to CSS. categories: [] keywords: [] -action: - aliases: [toCSS] - related: - - functions/resources/Fingerprint - - functions/resources/Minify - - functions/css/PostCSS - - functions/resources/PostProcess - returnType: resource.Resource - signatures: ['css.Sass [OPTIONS] RESOURCE'] -toc: true +params: + functions_and_methods: + aliases: [toCSS] + related: + - functions/resources/Fingerprint + - functions/resources/Minify + - functions/css/PostCSS + - functions/resources/PostProcess + returnType: resource.Resource + signatures: ['css.Sass [OPTIONS] RESOURCE'] --- {{< new-in 0.128.0 />}} @@ -70,10 +70,10 @@ precision : (`int`) Precision of floating point math. Not applicable to Dart Sass. enableSourceMap -: (`bool`) If `true`, generates a source map. +: (`bool`) Whether to generate a source map. Default is `false`. sourceMapIncludeSources -: (`bool`) If `true`, embeds sources in the generated source map. Not applicable to LibSass. +: (`bool`) Whether to embed sources in the generated source map. Not applicable to LibSass. Default is `false`. includePaths : (`slice`) A slice of paths, relative to the project root, that the transpiler will use when resolving `@use` and `@import` statements. @@ -149,8 +149,8 @@ To install Dart Sass for your builds on GitLab Pages, the `.gitlab-ci.yml` file ```yaml variables: - HUGO_VERSION: 0.141.0 - DART_SASS_VERSION: 1.83.4 + HUGO_VERSION: 0.144.2 + DART_SASS_VERSION: 1.85.0 GIT_DEPTH: 0 GIT_STRATEGY: clone GIT_SUBMODULE_STRATEGY: recursive @@ -183,8 +183,8 @@ To install Dart Sass for your builds on Netlify, the `netlify.toml` file should ```toml [build.environment] -HUGO_VERSION = "0.141.0" -DART_SASS_VERSION = "1.83.4" +HUGO_VERSION = "0.144.2" +DART_SASS_VERSION = "1.85.0" NODE_VERSION = "22" TZ = "America/Los_Angeles" @@ -234,7 +234,7 @@ If you build Hugo from source and run `mage test -v`, the test will fail if you [libsass]: https://sass-lang.com/libsass [prebuilt binaries]: https://github.com/sass/dart-sass/releases/latest [scoop.sh]: https://scoop.sh/#/apps?q=sass -[site configuration]: /getting-started/configuration/#configure-build +[site configuration]: /configuration/build/ [snap package]: /installation/linux/#snap [snapcraft.io]: https://snapcraft.io/dart-sass [starter workflow]: https://github.com/actions/starter-workflows/blob/main/pages/hugo.yml diff --git a/content/en/functions/css/TailwindCSS.md b/content/en/functions/css/TailwindCSS.md index 44c549196..1657a87df 100644 --- a/content/en/functions/css/TailwindCSS.md +++ b/content/en/functions/css/TailwindCSS.md @@ -3,20 +3,20 @@ title: css.TailwindCSS description: Processes the given resource with the Tailwind CSS CLI. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/resources/Fingerprint - - functions/resources/Minify - - functions/css/PostCSS - returnType: resource.Resource - signatures: ['css.TailwindCSS [OPTIONS] RESOURCE'] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/resources/Fingerprint + - functions/resources/Minify + - functions/css/PostCSS + returnType: resource.Resource + signatures: ['css.TailwindCSS [OPTIONS] RESOURCE'] --- {{< new-in 0.128.0 />}} -Use the `css.TailwindCSS` function to process your Tailwind CSS files. This function uses the Tailwind CSS CLI to: +Use the `css.TailwindCSS` function to process your Tailwind CSS files. This function uses the Tailwind CSS CLI to: 1. Scan your templates for Tailwind CSS utility class usage. 1. Compile those utility classes into standard CSS. @@ -24,7 +24,7 @@ Use the `css.TailwindCSS` function to process your Tailwind CSS files. This fun ## Setup -###### Step 1 +### Step 1 Install the Tailwind CSS CLI v4.0 or later: @@ -36,7 +36,7 @@ The TailwindCSS CLI is also available as a [standalone executable] if you want t [standalone executable]: https://github.com/tailwindlabs/tailwindcss/releases/latest -###### Step 2 +### Step 2 Add this to your site configuration: @@ -58,8 +58,7 @@ source = "(postcss|tailwind)\\.config\\.js" target = "css" {{< /code-toggle >}} - -###### Step 3 +### Step 3 Create a CSS entry file: @@ -70,7 +69,7 @@ Create a CSS entry file: Tailwind CSS respects `.gitignore` files. This means that if `hugo_stats.json` is listed in your `.gitignore` file, Tailwind CSS will ignore it. To make `hugo_stats.json` available to Tailwind CSS you must explicitly source it as shown in the example above. -###### Step 4 +### Step 4 Create a partial template to process the CSS with the Tailwind CSS CLI: @@ -94,7 +93,7 @@ Create a partial template to process the CSS with the Tailwind CSS CLI: {{ end }} {{< /code >}} -###### Step 5 +### Step 5 Call the partial template from your base template: @@ -106,7 +105,7 @@ Call the partial template from your base template: {{< /code >}} -###### Step 6 +### Step 6 Optionally create a `tailwind.config.js` file in the root of your project as shown below. This is necessary if you use the [Tailwind CSS IntelliSense extension] for Visual Studio Code. @@ -137,4 +136,4 @@ inlineImports : (`bool`) Whether to enable inlining of `@import` statements. Inlining is performed recursively, but currently once only per file. It is not possible to import the same file in different scopes (root, media query, etc.). Note that this import routine does not care about the CSS specification, so you can have `@import` statements anywhere in the file. Default is `false`. skipInlineImportsNotFound -: (`bool`) When `inlineImports` is enabled, we fail the build if an import cannot be resolved. Enable this option to allow the build to continue and leave the import statement in place. Note that the inline importer does not process URL location or imports with media queries, so those will be left as-is even without enabling this option. Default is `false`. +: (`bool`) Whether to allow the build process to continue despite unresolved import statements, preserving the original import declarations. It is important to note that the inline importer does not process URL-based imports or those with media queries, and these will remain unaltered even when this option is disabled. Default is `false`. diff --git a/content/en/functions/css/_index.md b/content/en/functions/css/_index.md index a83a23819..9faabbbe9 100644 --- a/content/en/functions/css/_index.md +++ b/content/en/functions/css/_index.md @@ -1,12 +1,7 @@ --- title: CSS functions linkTitle: css -description: Template functions to work with CSS and Sass files. +description: Use these functions to work with CSS and Sass files. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to work with CSS and Sass files. diff --git a/content/en/functions/data/GetCSV.md b/content/en/functions/data/GetCSV.md index 40e6de7e1..305021639 100644 --- a/content/en/functions/data/GetCSV.md +++ b/content/en/functions/data/GetCSV.md @@ -3,12 +3,12 @@ title: data.GetCSV description: Returns an array of arrays from a local or remote CSV file, or an error if the file does not exist. categories: [] keywords: [] -action: - aliases: [getCSV] - related: [] - returnType: '[][]string' - signatures: ['data.GetCSV SEPARATOR INPUT... [OPTIONS]'] -toc: true +params: + functions_and_methods: + aliases: [getCSV] + related: [] + returnType: '[][]string' + signatures: ['data.GetCSV SEPARATOR INPUT... [OPTIONS]'] expiryDate: 2026-02-19 # deprecated 2024-02-19 in v0.123.0 --- diff --git a/content/en/functions/data/GetJSON.md b/content/en/functions/data/GetJSON.md index 58334174b..1965fdc6e 100644 --- a/content/en/functions/data/GetJSON.md +++ b/content/en/functions/data/GetJSON.md @@ -3,12 +3,12 @@ title: data.GetJSON description: Returns a JSON object from a local or remote JSON file, or an error if the file does not exist. categories: [] keywords: [] -action: - aliases: [getJSON] - related: [] - returnType: any - signatures: ['data.GetJSON INPUT... [OPTIONS]'] -toc: true +params: + functions_and_methods: + aliases: [getJSON] + related: [] + returnType: any + signatures: ['data.GetJSON INPUT... [OPTIONS]'] expiryDate: 2026-02-19 # deprecated 2024-02-19 in v0.123.0 --- diff --git a/content/en/functions/data/_index.md b/content/en/functions/data/_index.md index 142d6b528..2177bc528 100644 --- a/content/en/functions/data/_index.md +++ b/content/en/functions/data/_index.md @@ -1,12 +1,7 @@ --- title: Data functions linkTitle: data -description: Template functions to read local or remote data files. +description: Use these functions to read local or remote data files. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to read local or remote data files. diff --git a/content/en/functions/debug/Dump.md b/content/en/functions/debug/Dump.md index 20c0ae8a2..4cba6f66d 100644 --- a/content/en/functions/debug/Dump.md +++ b/content/en/functions/debug/Dump.md @@ -3,11 +3,12 @@ title: debug.Dump description: Returns an object dump as a string. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: string - signatures: [debug.Dump VALUE] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: string + signatures: [debug.Dump VALUE] --- ```go-html-template diff --git a/content/en/functions/debug/Timer.md b/content/en/functions/debug/Timer.md index 519c195c1..c688ee14a 100644 --- a/content/en/functions/debug/Timer.md +++ b/content/en/functions/debug/Timer.md @@ -3,11 +3,12 @@ title: debug.Timer description: Creates a named timer that reports elapsed time to the console. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: debug.Timer - signatures: [debug.Timer NAME] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: debug.Timer + signatures: [debug.Timer NAME] --- {{< new-in 0.120.0 />}} diff --git a/content/en/functions/debug/_index.md b/content/en/functions/debug/_index.md index 418828515..49fe416ed 100644 --- a/content/en/functions/debug/_index.md +++ b/content/en/functions/debug/_index.md @@ -1,12 +1,7 @@ --- title: Debug functions linkTitle: debug -description: Template functions to debug your templates. +description: Use these functions to debug your templates. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to debug your templates. diff --git a/content/en/functions/diagrams/Goat.md b/content/en/functions/diagrams/Goat.md index 69a099bb7..483dcb26f 100644 --- a/content/en/functions/diagrams/Goat.md +++ b/content/en/functions/diagrams/Goat.md @@ -3,12 +3,12 @@ title: diagrams.Goat description: Converts ASCII art to an SVG diagram, returning a GoAT diagram object. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: diagrams.goatDiagram - signatures: ['diagrams.Goat INPUT'] -toc: true +params: + functions_and_methods: + aliases: [] + related: [] + returnType: diagrams.goatDiagram + signatures: ['diagrams.Goat INPUT'] --- Useful in a [code block render hook], the `diagram.Goat` function converts ASCII art to an SVG diagram, returning a [GoAT] diagram object with the following methods: diff --git a/content/en/functions/diagrams/_index.md b/content/en/functions/diagrams/_index.md index e136b4f33..6aa407071 100644 --- a/content/en/functions/diagrams/_index.md +++ b/content/en/functions/diagrams/_index.md @@ -1,12 +1,7 @@ --- title: Diagram functions linkTitle: diagrams -description: Template functions to render diagrams. +description: Use these functions to render diagrams. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to render diagrams. diff --git a/content/en/functions/encoding/Base64Decode.md b/content/en/functions/encoding/Base64Decode.md index 0745718bb..c7fb75630 100644 --- a/content/en/functions/encoding/Base64Decode.md +++ b/content/en/functions/encoding/Base64Decode.md @@ -3,12 +3,13 @@ title: encoding.Base64Decode description: Returns the base64 decoding of the given content. categories: [] keywords: [] -action: - aliases: [base64Decode] - related: - - functions/encoding/Base64Encode - returnType: string - signatures: [encoding.Base64Decode INPUT] +params: + functions_and_methods: + aliases: [base64Decode] + related: + - functions/encoding/Base64Encode + returnType: string + signatures: [encoding.Base64Decode INPUT] aliases: [/functions/base64Decode] --- @@ -29,7 +30,7 @@ To retrieve and render the content: {{ with try (resources.GetRemote $url) }} {{ with .Err }} {{ errorf "%s" . }} - {{ else with .Value}} + {{ else with .Value }} {{ with . | transform.Unmarshal }} {{ .content | base64Decode | markdownify }} {{ end }} diff --git a/content/en/functions/encoding/Base64Encode.md b/content/en/functions/encoding/Base64Encode.md index 14f67a132..576b0732b 100644 --- a/content/en/functions/encoding/Base64Encode.md +++ b/content/en/functions/encoding/Base64Encode.md @@ -3,12 +3,13 @@ title: encoding.Base64Encode description: Returns the base64 decoding of the given content. categories: [] keywords: [] -action: - aliases: [base64Encode] - related: - - functions/encoding/Base64Decode - returnType: string - signatures: [encoding.Base64Encode INPUT] +params: + functions_and_methods: + aliases: [base64Encode] + related: + - functions/encoding/Base64Decode + returnType: string + signatures: [encoding.Base64Encode INPUT] aliases: [/functions/base64, /functions/base64Encode] --- diff --git a/content/en/functions/encoding/Jsonify.md b/content/en/functions/encoding/Jsonify.md index 475f8a76a..5e799e907 100644 --- a/content/en/functions/encoding/Jsonify.md +++ b/content/en/functions/encoding/Jsonify.md @@ -3,14 +3,14 @@ title: encoding.Jsonify description: Encodes the given object to JSON. categories: [] keywords: [] -action: - aliases: [jsonify] - returnType: template.HTML - related: - - functions/transform/Remarshal - - functions/transform/Unmarshal - signatures: - - encoding.Jsonify [OPTIONS] INPUT +params: + functions_and_methods: + aliases: [jsonify] + returnType: template.HTML + related: + - functions/transform/Remarshal + - functions/transform/Unmarshal + signatures: ['encoding.Jsonify [OPTIONS] INPUT'] aliases: [/functions/jsonify] --- @@ -34,4 +34,4 @@ prefix : (`string`) Indentation prefix. Default is "". noHTMLEscape -: (`bool`) Disable escaping of problematic HTML characters inside JSON quoted strings. The default behavior is to escape `&`, `<`, and `>` to `\u0026`, `\u003c`, and `\u003e` to avoid certain safety problems that can arise when embedding JSON in HTML. Default is `false`. +: (`bool`) Whether to disable escaping of problematic HTML characters inside JSON quoted strings. The default behavior is to escape `&`, `<`, and `>` to `\u0026`, `\u003c`, and `\u003e` to avoid certain safety problems that can arise when embedding JSON in HTML. Default is `false`. diff --git a/content/en/functions/encoding/_index.md b/content/en/functions/encoding/_index.md index 3c4c4519e..f2819f0a7 100644 --- a/content/en/functions/encoding/_index.md +++ b/content/en/functions/encoding/_index.md @@ -1,12 +1,7 @@ --- title: Encoding functions linkTitle: encoding -description: Template functions to encode and decode data. +description: Use these functions to encode and decode data. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to encode and decode data. diff --git a/content/en/functions/fmt/Errorf.md b/content/en/functions/fmt/Errorf.md index 93f546351..8b40c6293 100644 --- a/content/en/functions/fmt/Errorf.md +++ b/content/en/functions/fmt/Errorf.md @@ -3,18 +3,19 @@ title: fmt.Errorf description: Log an ERROR from a template. categories: [] keywords: [] -action: - aliases: [errorf] - related: - - functions/fmt/Erroridf - - functions/fmt/Warnf - - functions/fmt/Warnidf - returnType: string - signatures: ['fmt.Errorf FORMAT [INPUT]'] +params: + functions_and_methods: + aliases: [errorf] + related: + - functions/fmt/Erroridf + - functions/fmt/Warnf + - functions/fmt/Warnidf + returnType: string + signatures: ['fmt.Errorf FORMAT [INPUT]'] aliases: [/functions/errorf] --- -{{% include "functions/fmt/_common/fmt-layout.md" %}} +{{% include "/_common/functions/fmt/format-string.md" %}} The `errorf` function evaluates the format string, then prints the result to the ERROR log and fails the build. diff --git a/content/en/functions/fmt/Erroridf.md b/content/en/functions/fmt/Erroridf.md index f442f09bf..bd84b4430 100644 --- a/content/en/functions/fmt/Erroridf.md +++ b/content/en/functions/fmt/Erroridf.md @@ -3,18 +3,19 @@ title: fmt.Erroridf description: Log a suppressible ERROR from a template. categories: [] keywords: [] -action: - aliases: [erroridf] - related: - - functions/fmt/Errorf - - functions/fmt/Warnf - - functions/fmt/Warnidf - returnType: string - signatures: ['fmt.Erroridf ID FORMAT [INPUT]'] +params: + functions_and_methods: + aliases: [erroridf] + related: + - functions/fmt/Errorf + - functions/fmt/Warnf + - functions/fmt/Warnidf + returnType: string + signatures: ['fmt.Erroridf ID FORMAT [INPUT]'] aliases: [/functions/erroridf] --- -{{% include "functions/fmt/_common/fmt-layout.md" %}} +{{% include "/_common/functions/fmt/format-string.md" %}} The `erroridf` function evaluates the format string, then prints the result to the ERROR log and fails the build. Unlike the [`errorf`] function, you may suppress errors logged by the `erroridf` function by adding the message ID to the `ignoreLogs` array in your site configuration. diff --git a/content/en/functions/fmt/Print.md b/content/en/functions/fmt/Print.md index 6f3128e5f..73b80b51a 100644 --- a/content/en/functions/fmt/Print.md +++ b/content/en/functions/fmt/Print.md @@ -3,13 +3,14 @@ title: fmt.Print description: Prints the default representation of the given arguments using the standard `fmt.Print` function. categories: [] keywords: [] -action: - aliases: [print] - related: - - functions/fmt/Printf - - functions/fmt/Println - returnType: string - signatures: [fmt.Print INPUT] +params: + functions_and_methods: + aliases: [print] + related: + - functions/fmt/Printf + - functions/fmt/Println + returnType: string + signatures: [fmt.Print INPUT] aliases: [/functions/print] --- diff --git a/content/en/functions/fmt/Printf.md b/content/en/functions/fmt/Printf.md index 5d0127460..cb77f237d 100644 --- a/content/en/functions/fmt/Printf.md +++ b/content/en/functions/fmt/Printf.md @@ -3,17 +3,18 @@ title: fmt.Printf description: Formats a string using the standard `fmt.Sprintf` function. categories: [] keywords: [] -action: - aliases: [printf] - related: - - functions/fmt/Print - - functions/fmt/Println - returnType: string - signatures: ['fmt.Printf FORMAT [INPUT]'] +params: + functions_and_methods: + aliases: [printf] + related: + - functions/fmt/Print + - functions/fmt/Println + returnType: string + signatures: ['fmt.Printf FORMAT [INPUT]'] aliases: [/functions/printf] --- -{{% include "functions/fmt/_common/fmt-layout.md" %}} +{{% include "/_common/functions/fmt/format-string.md" %}} ```go-html-template {{ $var := "world" }} diff --git a/content/en/functions/fmt/Println.md b/content/en/functions/fmt/Println.md index a4db56ffb..e4d901bcc 100644 --- a/content/en/functions/fmt/Println.md +++ b/content/en/functions/fmt/Println.md @@ -3,13 +3,14 @@ title: fmt.Println description: Prints the default representation of the given argument using the standard `fmt.Print` function and enforces a line break. categories: [] keywords: [] -action: - aliases: [println] - related: - - functions/fmt/Print - - functions/fmt/Printf - returnType: string - signatures: [fmt.Println INPUT] +params: + functions_and_methods: + aliases: [println] + related: + - functions/fmt/Print + - functions/fmt/Printf + returnType: string + signatures: [fmt.Println INPUT] aliases: [/functions/println] --- diff --git a/content/en/functions/fmt/Warnf.md b/content/en/functions/fmt/Warnf.md index 643defd30..8b0289e59 100644 --- a/content/en/functions/fmt/Warnf.md +++ b/content/en/functions/fmt/Warnf.md @@ -3,18 +3,19 @@ title: fmt.Warnf description: Log a WARNING from a template. categories: [] keywords: [] -action: - aliases: [warnf] - related: - - functions/fmt/Errorf - - functions/fmt/Erroridf - - functions/fmt/Warnidf - returnType: string - signatures: ['fmt.Warnf FORMAT [INPUT]'] +params: + functions_and_methods: + aliases: [warnf] + related: + - functions/fmt/Errorf + - functions/fmt/Erroridf + - functions/fmt/Warnidf + returnType: string + signatures: ['fmt.Warnf FORMAT [INPUT]'] aliases: [/functions/warnf] --- -{{% include "functions/fmt/_common/fmt-layout.md" %}} +{{% include "/_common/functions/fmt/format-string.md" %}} The `warnf` function evaluates the format string, then prints the result to the WARNING log. Hugo prints each unique message once to avoid flooding the log with duplicate warnings. diff --git a/content/en/functions/fmt/Warnidf.md b/content/en/functions/fmt/Warnidf.md index 70c109b5b..33b399386 100644 --- a/content/en/functions/fmt/Warnidf.md +++ b/content/en/functions/fmt/Warnidf.md @@ -3,20 +3,21 @@ title: fmt.Warnidf description: Log a suppressible WARNING from a template. categories: [] keywords: [] -action: - aliases: [warnidf] - related: - - functions/fmt/Errorf - - functions/fmt/Erroridf - - functions/fmt/Warnf - returnType: string - signatures: ['fmt.Warnidf ID FORMAT [INPUT]'] +params: + functions_and_methods: + aliases: [warnidf] + related: + - functions/fmt/Errorf + - functions/fmt/Erroridf + - functions/fmt/Warnf + returnType: string + signatures: ['fmt.Warnidf ID FORMAT [INPUT]'] aliases: [/functions/warnidf] --- {{< new-in 0.123.0 />}} -{{% include "functions/fmt/_common/fmt-layout.md" %}} +{{% include "/_common/functions/fmt/format-string.md" %}} The `warnidf` function evaluates the format string, then prints the result to the WARNING log. Unlike the [`warnf`] function, you may suppress warnings logged by the `warnidf` function by adding the message ID to the `ignoreLogs` array in your site configuration. diff --git a/content/en/functions/fmt/_common/_index.md b/content/en/functions/fmt/_common/_index.md deleted file mode 100644 index 4328d4d14..000000000 --- a/content/en/functions/fmt/_common/_index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -cascade: - _build: - list: never - publishResources: false - render: never ---- - - diff --git a/content/en/functions/fmt/_index.md b/content/en/functions/fmt/_index.md index 51ef847ca..d388df112 100644 --- a/content/en/functions/fmt/_index.md +++ b/content/en/functions/fmt/_index.md @@ -1,12 +1,7 @@ --- title: Fmt functions linkTitle: fmt -description: Template functions to print strings within a template or to print messages to the terminal +description: Use these functions to print strings within a template or to print messages to the terminal. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to print strings within a template or to print messages to the terminal. diff --git a/content/en/functions/global/_index.md b/content/en/functions/global/_index.md index 1e609b56e..3d935176c 100644 --- a/content/en/functions/global/_index.md +++ b/content/en/functions/global/_index.md @@ -1,11 +1,6 @@ --- title: Global functions linkTitle: global -description: Global template functions to access page and site data. +description: Use these global functions to access page and site data. categories: [] -menu: - docs: - parent: functions --- - -Use these global functions to access page and site data. diff --git a/content/en/functions/global/page.md b/content/en/functions/global/page.md index 0ebb3a7d8..43488538b 100644 --- a/content/en/functions/global/page.md +++ b/content/en/functions/global/page.md @@ -3,13 +3,13 @@ title: page description: Provides global access to a Page object. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/global/site - returnType: - signatures: [page] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/global/site + returnType: + signatures: [page] aliases: [/functions/page] --- @@ -33,7 +33,7 @@ Do not use the global `page` function in shortcodes, partials called by shortcod ## Explanation -Hugo almost always passes a `Page` as the data context into the top level template (e.g., `single.html`). The one exception is the multihost sitemap template. This means that you can access the current page with the `.` in the template. +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](g), [partial](g), or [render hook](g), it is not always practical or possible to access the `Page` object. diff --git a/content/en/functions/global/site.md b/content/en/functions/global/site.md index fd29bd6de..eea85d060 100644 --- a/content/en/functions/global/site.md +++ b/content/en/functions/global/site.md @@ -3,12 +3,13 @@ title: site description: Provides global access to the current Site object. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/global/page - returnType: - signatures: [site] +params: + functions_and_methods: + aliases: [] + related: + - functions/global/page + returnType: + signatures: [site] aliases: [/functions/site] --- diff --git a/content/en/functions/go-template/_common/_index.md b/content/en/functions/go-template/_common/_index.md deleted file mode 100644 index 4328d4d14..000000000 --- a/content/en/functions/go-template/_common/_index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -cascade: - _build: - list: never - publishResources: false - render: never ---- - - diff --git a/content/en/functions/go-template/_index.md b/content/en/functions/go-template/_index.md index 9075756aa..627dc2849 100644 --- a/content/en/functions/go-template/_index.md +++ b/content/en/functions/go-template/_index.md @@ -1,14 +1,7 @@ --- title: Go template functions, operators, and statements linkTitle: go template -description: Template functions, operators, and statements provided by Go's text/template package. +description: These are the functions, operators, and statements provided by Go's text/template package. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -These are the functions, operators, and statements provided by Go's [text/template] package. - -[text/template]: https://pkg.go.dev/text/template diff --git a/content/en/functions/go-template/and.md b/content/en/functions/go-template/and.md index 6bc8c60a5..4d8129e18 100644 --- a/content/en/functions/go-template/and.md +++ b/content/en/functions/go-template/and.md @@ -3,16 +3,17 @@ title: and description: Returns the first falsy argument. If all arguments are truthy, returns the last argument. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/not - - functions/go-template/or - returnType: any - signatures: [and VALUE...] +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/not + - functions/go-template/or + returnType: any + signatures: [and VALUE...] --- -{{% include "functions/go-template/_common/truthy-falsy.md" %}} +{{% include "/_common/functions/truthy-falsy.md" %}} ```go-html-template {{ and 1 0 "" }} → 0 (int) @@ -22,5 +23,3 @@ action: {{ and "a" "b" "c" }} → c (string) {{ and "a" 1 true }} → true (bool) ``` - -{{% include "functions/go-template/_common/text-template.md" %}} diff --git a/content/en/functions/go-template/block.md b/content/en/functions/go-template/block.md index f8a082037..b71e3d562 100644 --- a/content/en/functions/go-template/block.md +++ b/content/en/functions/go-template/block.md @@ -3,13 +3,14 @@ title: block description: Defines a template and executes it in place. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/define - - functions/go-template/end - returnType: - signatures: [block NAME CONTEXT] +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/define + - functions/go-template/end + returnType: + signatures: [block NAME CONTEXT] --- A block is shorthand for defining a template: @@ -52,4 +53,4 @@ The typical use is to define a set of root templates that are then customized by {{ end }} {{< /code >}} -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} diff --git a/content/en/functions/go-template/break.md b/content/en/functions/go-template/break.md index 14074d7c0..9744acf7b 100644 --- a/content/en/functions/go-template/break.md +++ b/content/en/functions/go-template/break.md @@ -3,13 +3,14 @@ title: break description: Used with the range statement, stops the innermost iteration and bypasses all remaining iterations. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/continue - - functions/go-template/range - returnType: - signatures: [break] +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/continue + - functions/go-template/range + returnType: + signatures: [break] --- This template code: @@ -30,4 +31,4 @@ Is rendered to:

      foo

      ``` -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} diff --git a/content/en/functions/go-template/continue.md b/content/en/functions/go-template/continue.md index c8030b8b7..7d9f40591 100644 --- a/content/en/functions/go-template/continue.md +++ b/content/en/functions/go-template/continue.md @@ -3,13 +3,14 @@ title: continue description: Used with the range statement, stops the innermost iteration and continues to the next iteration. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/break - - functions/go-template/range - returnType: - signatures: [continue] +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/break + - functions/go-template/range + returnType: + signatures: [continue] --- This template code: @@ -31,4 +32,4 @@ Is rendered to:

      baz

      ``` -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} diff --git a/content/en/functions/go-template/define.md b/content/en/functions/go-template/define.md index f15dd6ff0..c2e98c2f2 100644 --- a/content/en/functions/go-template/define.md +++ b/content/en/functions/go-template/define.md @@ -3,16 +3,17 @@ title: define description: Defines a template. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/block - - functions/go-template/end - - functions/go-template/template - - functions/partials/Include - - functions/partials/IncludeCached - returnType: - signatures: [define NAME] +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/block + - functions/go-template/end + - functions/go-template/template + - functions/partials/Include + - functions/partials/IncludeCached + returnType: + signatures: [define NAME] --- Use with the [`block`] statement: @@ -52,4 +53,4 @@ Use with the [`template`] function: [`template`]: /functions/go-template/block/ [`partial`]: /functions/partials/include/ -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} diff --git a/content/en/functions/go-template/else.md b/content/en/functions/go-template/else.md index 698998bd8..7d0067010 100644 --- a/content/en/functions/go-template/else.md +++ b/content/en/functions/go-template/else.md @@ -3,15 +3,16 @@ title: else description: Begins an alternate block for if, with, and range statements. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/if - - functions/go-template/range - - functions/go-template/with - - functions/go-template/end - returnType: - signatures: [else VALUE] +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/if + - functions/go-template/range + - functions/go-template/with + - functions/go-template/end + returnType: + signatures: [else VALUE] --- Use with the [`if`] statement: @@ -62,7 +63,7 @@ Use `else if` to check multiple conditions. {{ end }} ``` -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} [`if`]: /functions/go-template/if/ [`with`]: /functions/go-template/with/ diff --git a/content/en/functions/go-template/end.md b/content/en/functions/go-template/end.md index 6fb5bbfd6..92b4ec2e4 100644 --- a/content/en/functions/go-template/end.md +++ b/content/en/functions/go-template/end.md @@ -3,14 +3,15 @@ title: end description: Terminates if, with, range, block, and define statements. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/block - - functions/go-template/define - - functions/go-template/if - - functions/go-template/range - - functions/go-template/with +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/block + - functions/go-template/define + - functions/go-template/if + - functions/go-template/range + - functions/go-template/with returnType: signatures: [end] --- @@ -56,7 +57,7 @@ Use with the [`define`] statement: {{ end }} ``` -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} [`block`]: /functions/go-template/block/ [`define`]: /functions/go-template/define/ diff --git a/content/en/functions/go-template/if.md b/content/en/functions/go-template/if.md index 9fdf80e99..969356e1b 100644 --- a/content/en/functions/go-template/if.md +++ b/content/en/functions/go-template/if.md @@ -3,18 +3,19 @@ title: if description: Executes the block if the expression is truthy. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/with - - functions/go-template/else - - functions/go-template/end - - functions/collections/IsSet - returnType: - signatures: [if EXPR] +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/with + - functions/go-template/else + - functions/go-template/end + - functions/collections/IsSet + returnType: + signatures: [if EXPR] --- -{{% include "functions/go-template/_common/truthy-falsy.md" %}} +{{% include "/_common/functions/truthy-falsy.md" %}} ```go-html-template {{ $var := "foo" }} @@ -49,6 +50,6 @@ Use `else if` to check multiple conditions: {{ end }} ``` -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} [`else`]: /functions/go-template/else/ diff --git a/content/en/functions/go-template/len.md b/content/en/functions/go-template/len.md index 43f150a5f..c717889cb 100644 --- a/content/en/functions/go-template/len.md +++ b/content/en/functions/go-template/len.md @@ -3,15 +3,16 @@ title: len description: Returns the length of a string, slice, map, or collection. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/strings/Count - - functions/strings/CountRunes - - functions/strings/CountWords - - functions/strings/RuneCount - returnType: int - signatures: [len VALUE] +params: + functions_and_methods: + aliases: [] + related: + - functions/strings/Count + - functions/strings/CountRunes + - functions/strings/CountWords + - functions/strings/RuneCount + returnType: int + signatures: [len VALUE] aliases: [/functions/len] --- @@ -48,4 +49,4 @@ You may also determine the number of pages in a collection with: {{ site.RegularPages.Len }} → 42 ``` -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} diff --git a/content/en/functions/go-template/not.md b/content/en/functions/go-template/not.md index 4c7747c7b..6f3340f00 100644 --- a/content/en/functions/go-template/not.md +++ b/content/en/functions/go-template/not.md @@ -3,13 +3,14 @@ title: not description: Returns the boolean negation of its single argument. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/and - - functions/go-template/or - returnType: bool - signatures: [not VALUE] +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/and + - functions/go-template/or + returnType: bool + signatures: [not VALUE] --- Unlike the `and` and `or` operators, the `not` operator always returns a boolean value. @@ -32,4 +33,4 @@ Use the `not` operator, twice in succession, to cast any value to a boolean valu {{ "" | not | not }} → false ``` -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} diff --git a/content/en/functions/go-template/or.md b/content/en/functions/go-template/or.md index 0d8619608..4ae6ea2c6 100644 --- a/content/en/functions/go-template/or.md +++ b/content/en/functions/go-template/or.md @@ -3,16 +3,17 @@ title: or description: Returns the first truthy argument. If all arguments are falsy, returns the last argument. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/and - - functions/go-template/not - returnType: any - signatures: [or VALUE...] +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/and + - functions/go-template/not + returnType: any + signatures: [or VALUE...] --- -{{% include "functions/go-template/_common/truthy-falsy.md" %}} +{{% include "/_common/functions/truthy-falsy.md" %}} ```go-html-template {{ or 0 1 2 }} → 1 @@ -23,4 +24,4 @@ action: {{ or 0 "" false }} → false ``` -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} diff --git a/content/en/functions/go-template/range.md b/content/en/functions/go-template/range.md index 94f654a55..099d31305 100644 --- a/content/en/functions/go-template/range.md +++ b/content/en/functions/go-template/range.md @@ -3,20 +3,20 @@ title: range description: Iterates over a non-empty collection, binds context (the dot) to successive elements, and executes the block. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/break - - functions/go-template/continue - - functions/go-template/else - - functions/go-template/end - returnType: - signatures: [range COLLECTION] +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/break + - functions/go-template/continue + - functions/go-template/else + - functions/go-template/end + returnType: + signatures: [range COLLECTION] aliases: [/functions/range] -toc: true --- -{{% include "functions/go-template/_common/truthy-falsy.md" %}} +{{% include "/_common/functions/truthy-falsy.md" %}} ```go-html-template {{ $s := slice "foo" "bar" "baz" }} @@ -191,7 +191,7 @@ Is rendered to: Unlike ranging over an array or slice, Hugo sorts by key when ranging over a map. -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} [`else`]: /functions/go-template/else/ [`break`]: /functions/go-template/break/ diff --git a/content/en/functions/go-template/return.md b/content/en/functions/go-template/return.md index 9b40889e1..a7f2287d4 100644 --- a/content/en/functions/go-template/return.md +++ b/content/en/functions/go-template/return.md @@ -3,14 +3,14 @@ title: return description: Used within partial templates, terminates template execution and returns the given value, if any. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/partials/Include - - functions/partials/IncludeCached - returnType: any - signatures: ['return [VALUE]'] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/partials/Include + - functions/partials/IncludeCached + returnType: any + signatures: ['return [VALUE]'] --- 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. diff --git a/content/en/functions/go-template/template.md b/content/en/functions/go-template/template.md index 0a72acdaa..0edcf5b47 100644 --- a/content/en/functions/go-template/template.md +++ b/content/en/functions/go-template/template.md @@ -3,14 +3,15 @@ title: template description: Executes the given template, optionally passing context. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/define - - functions/partials/Include - - functions/partials/IncludeCached - returnType: - signatures: ['template NAME [CONTEXT]'] +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/define + - functions/partials/Include + - functions/partials/IncludeCached + returnType: + signatures: ['template NAME [CONTEXT]'] --- Use the `template` function to execute [embedded templates]. For example: @@ -42,7 +43,7 @@ The example above can be rewritten using an [inline partial] template: {{ end }} ``` -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} [`partial`]: /functions/partials/include/ [inline partial]: /templates/partial/#inline-partials diff --git a/content/en/functions/go-template/try.md b/content/en/functions/go-template/try.md index 979c90b61..48364d520 100644 --- a/content/en/functions/go-template/try.md +++ b/content/en/functions/go-template/try.md @@ -3,12 +3,12 @@ title: try description: Returns a TryValue object after evaluating the given expression. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: TryValue - signatures: ['try EXPRESSION'] -toc: true +params: + functions_and_methods: + aliases: [] + related: [] + returnType: TryValue + signatures: ['try EXPRESSION'] --- {{< new-in 0.141.0 />}} @@ -21,11 +21,13 @@ The `try` statement is a non-standard extension to Go's [text/template] package. 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. +### Err -Value -: (`any`) Returns the result of the expression if the evaluation was successful, or returns `nil` if an error occurred while evaluating the expression. +(`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 diff --git a/content/en/functions/go-template/urlquery.md b/content/en/functions/go-template/urlquery.md index 946828f56..58e63072a 100644 --- a/content/en/functions/go-template/urlquery.md +++ b/content/en/functions/go-template/urlquery.md @@ -3,12 +3,13 @@ title: urlquery description: Returns the escaped value of the textual representation of its arguments in a form suitable for embedding in a URL query. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/collections/Querify - returnType: string - signatures: ['urlquery VALUE [VALUE...]'] +params: + functions_and_methods: + aliases: [] + related: + - functions/collections/Querify + returnType: string + signatures: ['urlquery VALUE [VALUE...]'] aliases: [/functions/urlquery] --- @@ -25,4 +26,4 @@ Is rendered to: Link ``` -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} diff --git a/content/en/functions/go-template/with.md b/content/en/functions/go-template/with.md index 64f8859bf..0f5e7466b 100644 --- a/content/en/functions/go-template/with.md +++ b/content/en/functions/go-template/with.md @@ -3,20 +3,20 @@ title: with description: Binds context (the dot) to the expression and executes the block if expression is truthy. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/go-template/if - - functions/go-template/else - - functions/go-template/end - - functions/collections/IsSet - returnType: - signatures: [with EXPR] +params: + functions_and_methods: + aliases: [] + related: + - functions/go-template/if + - functions/go-template/else + - functions/go-template/end + - functions/collections/IsSet + returnType: + signatures: [with EXPR] aliases: [/functions/with] -toc: true --- -{{% include "functions/go-template/_common/truthy-falsy.md" %}} +{{% include "/_common/functions/truthy-falsy.md" %}} ```go-html-template {{ $var := "foo" }} @@ -94,6 +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 >}} -{{% include "functions/go-template/_common/text-template.md" %}} +{{% include "/_common/functions/go-template/text-template.md" %}} [`else`]: /functions/go-template/else/ diff --git a/content/en/functions/hash/FNV32a.md b/content/en/functions/hash/FNV32a.md index b5af77519..701cf576d 100644 --- a/content/en/functions/hash/FNV32a.md +++ b/content/en/functions/hash/FNV32a.md @@ -1,18 +1,19 @@ --- title: hash.FNV32a -description: Returns the 32-bit FNV (Fowler–Noll–Vo) non-cryptographic hash of the given string. +description: Returns the 32-bit FNV (Fowler-Noll-Vo) non-cryptographic hash of the given string. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/hash/Xxhash - - functions/crypto/HMAC - - functions/crypto/MD5 - - functions/crypto/SHA1 - - functions/crypto/SHA256 - returnType: int - signatures: [hash.FNV32a STRING] +params: + functions_and_methods: + aliases: [] + related: + - functions/hash/Xxhash + - functions/crypto/HMAC + - functions/crypto/MD5 + - functions/crypto/SHA1 + - functions/crypto/SHA256 + returnType: int + signatures: [hash.FNV32a STRING] aliases: [/functions/crypto.fnv32a] --- diff --git a/content/en/functions/hash/XxHash.md b/content/en/functions/hash/XxHash.md index 7d35c18e5..b208697cb 100644 --- a/content/en/functions/hash/XxHash.md +++ b/content/en/functions/hash/XxHash.md @@ -3,16 +3,17 @@ title: hash.XxHash description: Returns the 64-bit xxHash non-cryptographic hash of the given string. categories: [] keywords: [] -action: - aliases: [xxhash] - related: - - functions/hash/FNV32a - - functions/crypto/HMAC - - functions/crypto/MD5 - - functions/crypto/SHA1 - - functions/crypto/SHA256 - returnType: string - signatures: [hash.XxHash STRING] +params: + functions_and_methods: + aliases: [xxhash] + related: + - functions/hash/FNV32a + - functions/crypto/HMAC + - functions/crypto/MD5 + - functions/crypto/SHA1 + - functions/crypto/SHA256 + returnType: string + signatures: [hash.XxHash STRING] --- ```go-html-template diff --git a/content/en/functions/hash/_index.md b/content/en/functions/hash/_index.md index bf21c5b7b..956f7fb8d 100644 --- a/content/en/functions/hash/_index.md +++ b/content/en/functions/hash/_index.md @@ -1,12 +1,7 @@ --- title: Hash functions linkTitle: hash -description: Template functions to create non-cryptographic hashes. +description: Use these functions to create non-cryptographic hashes. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to create non-cryptographic hashes. diff --git a/content/en/functions/hugo/BuildDate.md b/content/en/functions/hugo/BuildDate.md index 1fbdbeac6..1350091f0 100644 --- a/content/en/functions/hugo/BuildDate.md +++ b/content/en/functions/hugo/BuildDate.md @@ -3,11 +3,12 @@ title: hugo.BuildDate description: Returns the compile date of the Hugo binary. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: string - signatures: [hugo.BuildDate] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: string + signatures: [hugo.BuildDate] --- The `hugo.BuildDate` function returns the compile date of the Hugo binary, formatted per [RFC 3339]. diff --git a/content/en/functions/hugo/CommitHash.md b/content/en/functions/hugo/CommitHash.md index cd4f2ce92..f1f46db92 100644 --- a/content/en/functions/hugo/CommitHash.md +++ b/content/en/functions/hugo/CommitHash.md @@ -3,11 +3,12 @@ title: hugo.CommitHash description: Returns the Git commit hash of the Hugo binary. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: string - signatures: [hugo.CommitHash] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: string + signatures: [hugo.CommitHash] --- ```go-html-template diff --git a/content/en/functions/hugo/Deps.md b/content/en/functions/hugo/Deps.md index 2f3f75e65..fe5e050b5 100644 --- a/content/en/functions/hugo/Deps.md +++ b/content/en/functions/hugo/Deps.md @@ -3,11 +3,12 @@ title: hugo.Deps description: Returns a slice of project dependencies, either Hugo Modules or local theme components. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: '[]hugo.Dependency' - signatures: [hugo.Deps] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: '[]hugo.Dependency' + signatures: [hugo.Deps] --- The `hugo.Deps` function returns a slice of project dependencies, either Hugo Modules or local theme components. Each dependency contains: diff --git a/content/en/functions/hugo/Environment.md b/content/en/functions/hugo/Environment.md index 374a39f6c..d15a18412 100644 --- a/content/en/functions/hugo/Environment.md +++ b/content/en/functions/hugo/Environment.md @@ -3,13 +3,14 @@ title: hugo.Environment description: Returns the current running environment. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/hugo/IsDevelopment - - functions/hugo/IsProduction - returnType: string - signatures: [hugo.Environment] +params: + functions_and_methods: + aliases: [] + related: + - functions/hugo/IsDevelopment + - functions/hugo/IsProduction + returnType: string + signatures: [hugo.Environment] --- The `hugo.Environment` function returns the current running [environment](g) as defined through the `--environment` command line flag. diff --git a/content/en/functions/hugo/Generator.md b/content/en/functions/hugo/Generator.md index 17eb47e1d..c8b4067bc 100644 --- a/content/en/functions/hugo/Generator.md +++ b/content/en/functions/hugo/Generator.md @@ -1,15 +1,16 @@ --- title: hugo.Generator -description: Renders an HTML meta element identifying the software that generated the site. +description: Renders an HTML meta element identifying the software that generated the site. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: template.HTML - signatures: [hugo.Generator] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: template.HTML + signatures: [hugo.Generator] --- ```go-html-template -{{ hugo.Generator }} → +{{ hugo.Generator }} → ``` diff --git a/content/en/functions/hugo/GoVersion.md b/content/en/functions/hugo/GoVersion.md index 34c6266bf..cc66ef098 100644 --- a/content/en/functions/hugo/GoVersion.md +++ b/content/en/functions/hugo/GoVersion.md @@ -3,11 +3,12 @@ title: hugo.GoVersion description: Returns the Go version used to compile the Hugo binary categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: string - signatures: [hugo.GoVersion] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: string + signatures: [hugo.GoVersion] --- ```go-html-template diff --git a/content/en/functions/hugo/IsDevelopment.md b/content/en/functions/hugo/IsDevelopment.md index bfbc0eaa1..690913c76 100644 --- a/content/en/functions/hugo/IsDevelopment.md +++ b/content/en/functions/hugo/IsDevelopment.md @@ -3,13 +3,14 @@ title: hugo.IsDevelopment description: Reports whether the current running environment is "development". categories: [] keywords: [] -action: - aliases: [] - related: - - functions/hugo/IsProduction - - functions/hugo/Environment - returnType: bool - signatures: [hugo.IsDevelopment] +params: + functions_and_methods: + aliases: [] + related: + - functions/hugo/IsProduction + - functions/hugo/Environment + returnType: bool + signatures: [hugo.IsDevelopment] --- {{< new-in 0.120.0 />}} diff --git a/content/en/functions/hugo/IsExtended.md b/content/en/functions/hugo/IsExtended.md index 9beac6e49..b006ff0e2 100644 --- a/content/en/functions/hugo/IsExtended.md +++ b/content/en/functions/hugo/IsExtended.md @@ -3,11 +3,12 @@ title: hugo.IsExtended description: Reports whether the Hugo binary is either the extended or extended/deploy edition. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: bool - signatures: [hugo.IsExtended] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: bool + signatures: [hugo.IsExtended] --- ```go-html-template diff --git a/content/en/functions/hugo/IsMultihost.md b/content/en/functions/hugo/IsMultihost.md index 5c1cb9f83..d1df9c67f 100644 --- a/content/en/functions/hugo/IsMultihost.md +++ b/content/en/functions/hugo/IsMultihost.md @@ -3,12 +3,13 @@ title: hugo.IsMultihost description: Reports whether each configured language has a unique base URL. categories: [] keywords: [] -action: - aliases: [] - related: - - /functions/hugo/IsMultilingual - returnType: bool - signatures: [hugo.IsMultihost] +params: + functions_and_methods: + aliases: [] + related: + - /functions/hugo/IsMultilingual + returnType: bool + signatures: [hugo.IsMultihost] --- {{< new-in 0.124.0 />}} diff --git a/content/en/functions/hugo/IsMultilingual.md b/content/en/functions/hugo/IsMultilingual.md index 91beb0d52..4b3c6e766 100644 --- a/content/en/functions/hugo/IsMultilingual.md +++ b/content/en/functions/hugo/IsMultilingual.md @@ -3,11 +3,13 @@ title: hugo.IsMultilingual description: Reports whether there are two or more configured languages. categories: [] keywords: [] -action: - related: - - /functions/hugo/IsMultihost - returnType: bool - signatures: [hugo.IsMultilingual] +params: + functions_and_methods: + aliases: [] + related: + - /functions/hugo/IsMultihost + returnType: bool + signatures: [hugo.IsMultilingual] --- {{< new-in 0.124.0 />}} diff --git a/content/en/functions/hugo/IsProduction.md b/content/en/functions/hugo/IsProduction.md index 7e9bda0e3..2e6fca0d9 100644 --- a/content/en/functions/hugo/IsProduction.md +++ b/content/en/functions/hugo/IsProduction.md @@ -3,13 +3,14 @@ title: hugo.IsProduction description: Reports whether the current running environment is "production". categories: [] keywords: [] -action: - aliases: [] - related: - - functions/hugo/IsDevelopment - - functions/hugo/Environment - returnType: bool - signatures: [hugo.IsProduction] +params: + functions_and_methods: + aliases: [] + related: + - functions/hugo/IsDevelopment + - functions/hugo/Environment + returnType: bool + signatures: [hugo.IsProduction] --- ```go-html-template diff --git a/content/en/functions/hugo/IsServer.md b/content/en/functions/hugo/IsServer.md index 0fa42fc15..5517fc271 100644 --- a/content/en/functions/hugo/IsServer.md +++ b/content/en/functions/hugo/IsServer.md @@ -3,11 +3,12 @@ title: hugo.IsServer description: Reports whether the built-in development server is running. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: bool - signatures: [hugo.IsServer] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: bool + signatures: [hugo.IsServer] --- {{< new-in 0.120.0 />}} diff --git a/content/en/functions/hugo/Store.md b/content/en/functions/hugo/Store.md index 4f3250954..5248a0222 100644 --- a/content/en/functions/hugo/Store.md +++ b/content/en/functions/hugo/Store.md @@ -3,15 +3,15 @@ title: hugo.Store description: Returns a globally scoped "scratch pad" to store and manipulate data. categories: [] keywords: [] -action: - related: - - methods/page/Store - - methods/site/Store - - methods/shortcode/Store - - functions/collections/NewScratch - returnType: maps.Scratch - signatures: [hugo.Store] -toc: true +params: + functions_and_methods: + related: + - methods/page/Store + - methods/site/Store + - methods/shortcode/Store + - functions/collections/NewScratch + returnType: maps.Scratch + signatures: [hugo.Store] --- {{< new-in 0.139.0 />}} @@ -20,7 +20,7 @@ Use the `hugo.Store` function to create a globally scoped [scratch pad](g) to st ## Methods -###### Set +### Set Sets the value of the given key. @@ -28,7 +28,7 @@ Sets the value of the given key. {{ hugo.Store.Set "greeting" "Hello" }} ``` -###### Get +### Get Gets the value of the given key. @@ -37,7 +37,7 @@ Gets the value of the given key. {{ hugo.Store.Get "greeting" }} → Hello ``` -###### Add +### Add Adds the given value to the existing value(s) of the given key. @@ -61,7 +61,7 @@ For single values, `Add` accepts values that support Go's `+` operator. If the f {{ hugo.Store.Get "greetings" }} → [Hello Welcome Cheers] ``` -###### SetInMap +### SetInMap Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`. @@ -71,7 +71,7 @@ Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to th {{ hugo.Store.Get "greetings" }} → map[english:Hello french:Bonjour] ``` -###### DeleteInMap +### DeleteInMap Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`. @@ -80,9 +80,9 @@ Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`. {{ hugo.Store.SetInMap "greetings" "french" "Bonjour" }} {{ hugo.Store.DeleteInMap "greetings" "english" }} {{ hugo.Store.Get "greetings" }} → map[french:Bonjour] -``` + ``` -###### GetSortedMapValues +### GetSortedMapValues Returns an array of values from `key` sorted by `mapKey`. @@ -92,7 +92,7 @@ Returns an array of values from `key` sorted by `mapKey`. {{ hugo.Store.GetSortedMapValues "greetings" }} → [Hello Bonjour] ``` -###### Delete +### Delete Removes the given key. diff --git a/content/en/functions/hugo/Version.md b/content/en/functions/hugo/Version.md index e6e1207b8..a6afc04cd 100644 --- a/content/en/functions/hugo/Version.md +++ b/content/en/functions/hugo/Version.md @@ -3,13 +3,14 @@ title: hugo.Version description: Returns the current version of the Hugo binary. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: hugo.VersionString - signatures: [hugo.Version] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: hugo.VersionString + signatures: [hugo.Version] --- ```go-html-template -{{ hugo.Version }} → 0.141.0 +{{ hugo.Version }} → 0.144.2 ``` diff --git a/content/en/functions/hugo/WorkingDir.md b/content/en/functions/hugo/WorkingDir.md index ac3835ea8..4e04cfb9b 100644 --- a/content/en/functions/hugo/WorkingDir.md +++ b/content/en/functions/hugo/WorkingDir.md @@ -3,11 +3,12 @@ title: hugo.WorkingDir description: Returns the project working directory. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: string - signatures: [hugo.WorkingDir] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: string + signatures: [hugo.WorkingDir] --- ```go-html-template diff --git a/content/en/functions/hugo/_index.md b/content/en/functions/hugo/_index.md index c3ad686da..b1c9216c4 100644 --- a/content/en/functions/hugo/_index.md +++ b/content/en/functions/hugo/_index.md @@ -1,12 +1,7 @@ --- title: Hugo functions linkTitle: hugo -description: Template functions to access information about the Hugo application and the current environment. +description: Use these functions to access information about the Hugo application and the current environment. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to access information about the Hugo application and the current environment. diff --git a/content/en/functions/images/AutoOrient.md b/content/en/functions/images/AutoOrient.md index fca9d392e..953f6d5cc 100644 --- a/content/en/functions/images/AutoOrient.md +++ b/content/en/functions/images/AutoOrient.md @@ -3,14 +3,14 @@ title: images.AutoOrient description: Returns an image filter that rotates and flips an image as needed per its EXIF orientation tag. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.AutoOrient] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.AutoOrient] --- {{< new-in 0.121.2 />}} @@ -23,7 +23,8 @@ Create the filter: {{ $filter := images.AutoOrient }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} + +{{% include "/_common/functions/images/apply-image-filter.md" %}} {{< note >}} When using with other filters, specify `images.AutoOrient` first. diff --git a/content/en/functions/images/Brightness.md b/content/en/functions/images/Brightness.md index 0001bcba8..b8e5b62b2 100644 --- a/content/en/functions/images/Brightness.md +++ b/content/en/functions/images/Brightness.md @@ -3,14 +3,14 @@ title: images.Brightness description: Returns an image filter that changes the brightness of an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Brightness PERCENTAGE] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Brightness PERCENTAGE] --- The percentage must be in the range [-100, 100] where 0 has no effect. A value of `-100` produces a solid black image, and a value of `100` produces a solid white image. @@ -23,7 +23,7 @@ Create the image filter: {{ $filter := images.Brightness 12 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/ColorBalance.md b/content/en/functions/images/ColorBalance.md index 29829f9e6..10654cba4 100644 --- a/content/en/functions/images/ColorBalance.md +++ b/content/en/functions/images/ColorBalance.md @@ -3,14 +3,14 @@ title: images.ColorBalance description: Returns an image filter that changes the color balance of an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.ColorBalance PCTRED PCTGREEN PCTBLUE] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.ColorBalance PCTRED PCTGREEN PCTBLUE] --- The percentage for each channel (red, green, blue) must be in the range [-100, 500]. @@ -23,7 +23,7 @@ Create the filter: {{ $filter := images.ColorBalance -10 10 50 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/Colorize.md b/content/en/functions/images/Colorize.md index c974103b9..f6e065197 100644 --- a/content/en/functions/images/Colorize.md +++ b/content/en/functions/images/Colorize.md @@ -3,14 +3,14 @@ title: images.Colorize description: Returns an image filter that produces a colorized version of an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Colorize HUE SATURATION PERCENTAGE] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Colorize HUE SATURATION PERCENTAGE] --- The hue is the angle on the color wheel, typically in the range [0, 360]. @@ -27,7 +27,7 @@ Create the filter: {{ $filter := images.Colorize 180 50 20 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/Config.md b/content/en/functions/images/Config.md index 4df088033..f435a247c 100644 --- a/content/en/functions/images/Config.md +++ b/content/en/functions/images/Config.md @@ -3,11 +3,12 @@ title: images.Config description: Returns an image.Config structure from the image at the specified path, relative to the working directory. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: image.Config - signatures: [images.Config PATH] +params: + functions_and_methods: + aliases: [] + related: [] + returnType: image.Config + signatures: [images.Config PATH] aliases: [/functions/imageconfig] --- diff --git a/content/en/functions/images/Contrast.md b/content/en/functions/images/Contrast.md index 532ae8c9c..a59d045fe 100644 --- a/content/en/functions/images/Contrast.md +++ b/content/en/functions/images/Contrast.md @@ -3,14 +3,14 @@ title: images.Contrast description: Returns an image filter that changes the contrast of an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Contrast PERCENTAGE] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Contrast PERCENTAGE] --- The percentage must be in the range [-100, 100] where 0 has no effect. A value of `-100` produces a solid grey image, and a value of `100` produces an over-contrasted image. @@ -23,7 +23,7 @@ Create the filter: {{ $filter := images.Contrast -20 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/Dither.md b/content/en/functions/images/Dither.md index d6ae603a8..9f3106401 100644 --- a/content/en/functions/images/Dither.md +++ b/content/en/functions/images/Dither.md @@ -3,16 +3,16 @@ title: images.Dither description: Returns an image filter that dithers an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - functions/images/Process - - methods/resource/Colors - - methods/resource/Filter - returnType: images.filter - signatures: ['images.Dither [OPTIONS]'] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - functions/images/Process + - methods/resource/Colors + - methods/resource/Filter + returnType: images.filter + signatures: ['images.Dither [OPTIONS]'] --- {{< new-in 0.123.0 />}} @@ -28,7 +28,7 @@ method : (`string`) The dithering method. See the [dithering methods](#dithering-methods) section below for a list of the available methods. Default is `FloydSteinberg`. serpentine -: (`bool`) Applicable to error diffusion dithering methods, serpentine controls whether the error diffusion matrix is applied in a serpentine manner, meaning that it goes right-to-left every other line. This greatly reduces line-type artifacts. Default is `true`. +: (`bool`) Applicable to error diffusion dithering methods, whether to apply the error diffusion matrix in a serpentine manner, meaning that it goes right-to-left every other line. This greatly reduces line-type artifacts. Default is `true`. strength : (`float`) The strength at which to apply the dithering matrix, typically a value in the range [0, 1]. A value of `1.0` applies the dithering matrix at 100% strength (no modification of the dither matrix). The `strength` is inversely proportional to contrast; reducing the strength increases the contrast. Setting `strength` to a value such as `0.8` can be useful to reduce noise in the dithered image. Default is `1.0`. @@ -57,13 +57,13 @@ Or create the filter using the default settings: {{ $filter := images.Dither }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Dithering methods See the [Go documentation] for descriptions of each of the dithering methods below. -[Go documentation]: https://pkg.go.dev/github.com/makeworld-the-better-one/dither/v2#pkg-variables +[Go documentation]: https://pkg.go.dev/github.com/makeworld-the-better-one/dither/v2#pkg-variables Error diffusion dithering methods: diff --git a/content/en/functions/images/Filter.md b/content/en/functions/images/Filter.md index 2961d7f47..1701b0928 100644 --- a/content/en/functions/images/Filter.md +++ b/content/en/functions/images/Filter.md @@ -3,13 +3,13 @@ title: images.Filter description: Applies one or more image filters to the given image resource. categories: [] keywords: [] -action: - aliases: [] - related: - - methods/resource/Filter - returnType: images.ImageResource - signatures: [images.Filter FILTERS... IMAGE] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - methods/resource/Filter + returnType: images.ImageResource + signatures: [images.Filter FILTERS... IMAGE] --- Apply one or more [image filters](#image-filters) to the given image. diff --git a/content/en/functions/images/Gamma.md b/content/en/functions/images/Gamma.md index affbdcfa8..35e0f6dc8 100644 --- a/content/en/functions/images/Gamma.md +++ b/content/en/functions/images/Gamma.md @@ -3,14 +3,14 @@ title: images.Gamma description: Returns an image filter that performs gamma correction on an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Gamma GAMMA] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Gamma GAMMA] --- The gamma value must be positive. A value greater than 1 lightens the image, while a value less than 1 darkens the image. The filter has no effect when the gamma value is 1. @@ -23,7 +23,7 @@ Create the filter: {{ $filter := images.Gamma 1.667 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/GaussianBlur.md b/content/en/functions/images/GaussianBlur.md index e2f49a847..0340681bc 100644 --- a/content/en/functions/images/GaussianBlur.md +++ b/content/en/functions/images/GaussianBlur.md @@ -3,14 +3,14 @@ title: images.GaussianBlur description: Returns an image filter that applies a gaussian blur to an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.GaussianBlur SIGMA] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.GaussianBlur SIGMA] --- The sigma value must be positive, and indicates how much the image will be blurred. The blur-affected radius is approximately 3 times the sigma value. @@ -23,7 +23,7 @@ Create the filter: {{ $filter := images.GaussianBlur 5 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/Grayscale.md b/content/en/functions/images/Grayscale.md index d8a89b7f2..ef1955140 100644 --- a/content/en/functions/images/Grayscale.md +++ b/content/en/functions/images/Grayscale.md @@ -3,14 +3,14 @@ title: images.Grayscale description: Returns an image filter that produces a grayscale version of an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Grayscale] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Grayscale] --- ## Usage @@ -21,7 +21,7 @@ Create the filter: {{ $filter := images.Grayscale }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/Hue.md b/content/en/functions/images/Hue.md index 6eafac437..b41b6b0c8 100644 --- a/content/en/functions/images/Hue.md +++ b/content/en/functions/images/Hue.md @@ -3,14 +3,14 @@ title: images.Hue description: Returns an image filter that rotates the hue of an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Hue SHIFT] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Hue SHIFT] --- The hue angle shift is typically in the range [-180, 180] where 0 has no effect. @@ -23,7 +23,7 @@ Create the filter: {{ $filter := images.Hue -15 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/Invert.md b/content/en/functions/images/Invert.md index 1ee85e514..94def1b41 100644 --- a/content/en/functions/images/Invert.md +++ b/content/en/functions/images/Invert.md @@ -3,14 +3,14 @@ title: images.Invert description: Returns an image filter that negates the colors of an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Invert] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Invert] --- ## Usage @@ -21,7 +21,7 @@ Create the filter: {{ $filter := images.Invert }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/Mask.md b/content/en/functions/images/Mask.md index 11fce93b0..a8fb1d680 100644 --- a/content/en/functions/images/Mask.md +++ b/content/en/functions/images/Mask.md @@ -3,14 +3,14 @@ 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 +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Mask RESOURCE] --- {{< new-in 0.141.0 />}} @@ -18,7 +18,7 @@ toc: true 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. +Of the formats supported by Hugo's imaging pipeline, 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: @@ -27,7 +27,7 @@ When applying a mask to a non-transparent image format such as JPEG, the masked {{ $filter := images.Process "#00ff00" }} ``` -[site configuration]: /content-management/image-processing/#imaging-configuration +[site configuration]: /configuration/imaging/ ## Usage diff --git a/content/en/functions/images/Opacity.md b/content/en/functions/images/Opacity.md index 32b1bd23c..00dbf3f15 100644 --- a/content/en/functions/images/Opacity.md +++ b/content/en/functions/images/Opacity.md @@ -3,14 +3,14 @@ title: images.Opacity description: Returns an image filter that changes the opacity of an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Opacity OPACITY] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Opacity OPACITY] --- {{< new-in 0.119.0 />}} @@ -25,7 +25,7 @@ Create the filter: {{ $filter := images.Opacity 0.65 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} The `images.Opacity` filter is most useful for target formats such as PNG and WebP that support transparency. If the source image does not support transparency, combine this filter with the `images.Process` filter: diff --git a/content/en/functions/images/Overlay.md b/content/en/functions/images/Overlay.md index d1cd7cf3f..ed65ba6ca 100644 --- a/content/en/functions/images/Overlay.md +++ b/content/en/functions/images/Overlay.md @@ -3,14 +3,14 @@ title: images.Overlay description: Returns an image filter that overlays the source image at the given coordinates, relative to the upper left corner. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Overlay RESOURCE X Y] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Overlay RESOURCE X Y] --- ## Usage @@ -35,7 +35,7 @@ Create the filter: {{ $filter := images.Overlay $overlay 20 20 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/Padding.md b/content/en/functions/images/Padding.md index e2c2695a1..5eb55beba 100644 --- a/content/en/functions/images/Padding.md +++ b/content/en/functions/images/Padding.md @@ -3,14 +3,14 @@ title: images.Padding description: Returns an image filter that resizes the image canvas without resizing the image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: ['images.Padding V1 [V2] [V3] [V4] [COLOR]'] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: ['images.Padding V1 [V2] [V3] [V4] [COLOR]'] --- {{< new-in 0.120.0 />}} @@ -28,7 +28,7 @@ Create the filter: {{ $filter := images.Padding 20 40 "#976941" }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} Combine with the [`Colors`] method to create a border with one of the image's most dominant colors: diff --git a/content/en/functions/images/Pixelate.md b/content/en/functions/images/Pixelate.md index 2016877ed..a3e98c160 100644 --- a/content/en/functions/images/Pixelate.md +++ b/content/en/functions/images/Pixelate.md @@ -3,14 +3,14 @@ title: images.Pixelate description: Returns an image filter that applies a pixelation effect to an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Pixelate SIZE] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Pixelate SIZE] --- ## Usage @@ -21,7 +21,7 @@ Create the filter: {{ $filter := images.Pixelate 4 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/Process.md b/content/en/functions/images/Process.md index 959770c65..724e23ac2 100644 --- a/content/en/functions/images/Process.md +++ b/content/en/functions/images/Process.md @@ -3,15 +3,15 @@ title: images.Process description: Returns an image filter that processes the given image using the given specification. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - - methods/resource/Process - returnType: images.filter - signatures: [images.Process SPEC] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + - methods/resource/Process + returnType: images.filter + signatures: [images.Process SPEC] --- {{< new-in 0.119.0 />}} @@ -101,7 +101,7 @@ Create a filter: {{ $filter := images.Process "resize 256x q40 webp" }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/QR.md b/content/en/functions/images/QR.md index cbefaefff..6d6a5485a 100644 --- a/content/en/functions/images/QR.md +++ b/content/en/functions/images/QR.md @@ -2,13 +2,12 @@ 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 +params: + functions_and_methods: + aliases: [] + related: [] + returnType: images.ImageResource + signatures: ['images.QR TEXT [OPTIONS]'] --- {{< new-in 0.141.0 />}} @@ -41,7 +40,7 @@ scale 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 +[`publishDir`]: /configuration/all/#publishdir ## Examples diff --git a/content/en/functions/images/Saturation.md b/content/en/functions/images/Saturation.md index 118bd0213..9fda889b4 100644 --- a/content/en/functions/images/Saturation.md +++ b/content/en/functions/images/Saturation.md @@ -3,14 +3,14 @@ title: images.Saturation description: Returns an image filter that changes the saturation of an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Saturation PERCENTAGE] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Saturation PERCENTAGE] --- The percentage must be in the range [-100, 500] where 0 has no effect. @@ -23,7 +23,7 @@ Create the filter: {{ $filter := images.Saturation 65 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/Sepia.md b/content/en/functions/images/Sepia.md index 9f0b7adfb..a82ee85ea 100644 --- a/content/en/functions/images/Sepia.md +++ b/content/en/functions/images/Sepia.md @@ -3,14 +3,14 @@ title: images.Sepia description: Returns an image filter that produces a sepia-toned version of an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Sepia PERCENTAGE] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Sepia PERCENTAGE] --- The percentage must be in the range [0, 100] where 0 has no effect. @@ -23,7 +23,7 @@ Create the filter: {{ $filter := images.Sepia 75 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/Sigmoid.md b/content/en/functions/images/Sigmoid.md index 32765f923..c7ad8016a 100644 --- a/content/en/functions/images/Sigmoid.md +++ b/content/en/functions/images/Sigmoid.md @@ -3,14 +3,14 @@ title: images.Sigmoid description: Returns an image filter that changes the contrast of an image using a sigmoidal function. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.Sigmoid MIDPOINT FACTOR] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.Sigmoid MIDPOINT FACTOR] --- This is a non-linear contrast change useful for photo adjustments; it preserves highlight and shadow detail. @@ -27,7 +27,7 @@ Create the filter: {{ $filter := images.Sigmoid 0.6 -4 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/Text.md b/content/en/functions/images/Text.md index c8d23565c..df86d6ed9 100644 --- a/content/en/functions/images/Text.md +++ b/content/en/functions/images/Text.md @@ -3,14 +3,14 @@ title: images.Text description: Returns an image filter that adds text to an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: ['images.Text TEXT [OPTIONS]'] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: ['images.Text TEXT [OPTIONS]'] --- ## Options diff --git a/content/en/functions/images/UnsharpMask.md b/content/en/functions/images/UnsharpMask.md index 9ea58f2b6..1dd55f2f6 100644 --- a/content/en/functions/images/UnsharpMask.md +++ b/content/en/functions/images/UnsharpMask.md @@ -3,14 +3,14 @@ title: images.UnsharpMask description: Returns an image filter that sharpens an image. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/images/Filter - - methods/resource/Filter - returnType: images.filter - signatures: [images.UnsharpMask SIGMA AMOUNT THRESHOLD] -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/images/Filter + - methods/resource/Filter + returnType: images.filter + signatures: [images.UnsharpMask SIGMA AMOUNT THRESHOLD] --- The sigma argument is used in a gaussian function and affects the radius of effect. Sigma must be positive. The sharpen radius is approximately 3 times the sigma value. @@ -27,7 +27,7 @@ Create the filter: {{ $filter := images.UnsharpMask 10 0.4 0.03 }} ``` -{{% include "functions/images/_common/apply-image-filter.md" %}} +{{% include "/_common/functions/images/apply-image-filter.md" %}} ## Example diff --git a/content/en/functions/images/_common/_index.md b/content/en/functions/images/_common/_index.md deleted file mode 100644 index 4328d4d14..000000000 --- a/content/en/functions/images/_common/_index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -cascade: - _build: - list: never - publishResources: false - render: never ---- - - diff --git a/content/en/functions/images/_index.md b/content/en/functions/images/_index.md index 13542ea73..f92e16e7a 100644 --- a/content/en/functions/images/_index.md +++ b/content/en/functions/images/_index.md @@ -4,9 +4,4 @@ linkTitle: images description: Use these functions to create an image filter, apply an image filter to an image, and to retrieve image information. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -Use these functions to create an image filter, apply an image filter to an image, and to retrieve image information. diff --git a/content/en/functions/inflect/Humanize.md b/content/en/functions/inflect/Humanize.md index 71b4a5fd2..4e38ddac2 100644 --- a/content/en/functions/inflect/Humanize.md +++ b/content/en/functions/inflect/Humanize.md @@ -3,13 +3,14 @@ title: inflect.Humanize description: Returns the humanized version of the input with the first letter capitalized. categories: [] keywords: [] -action: - aliases: [humanize] - related: - - functions/inflect/Pluralize - - functions/inflect/Singularize - returnType: string - signatures: [inflect.Humanize INPUT] +params: + functions_and_methods: + aliases: [humanize] + related: + - functions/inflect/Pluralize + - functions/inflect/Singularize + returnType: string + signatures: [inflect.Humanize INPUT] aliases: [/functions/humanize] --- diff --git a/content/en/functions/inflect/Pluralize.md b/content/en/functions/inflect/Pluralize.md index c25f89617..dc1fe7fe8 100644 --- a/content/en/functions/inflect/Pluralize.md +++ b/content/en/functions/inflect/Pluralize.md @@ -3,13 +3,14 @@ title: inflect.Pluralize description: Pluralizes the given word according to a set of common English pluralization rules. categories: [] keywords: [] -action: - aliases: [pluralize] - related: - - functions/inflect/Humanize - - functions/inflect/Singularize - returnType: string - signatures: [inflect.Pluralize INPUT] +params: + functions_and_methods: + aliases: [pluralize] + related: + - functions/inflect/Humanize + - functions/inflect/Singularize + returnType: string + signatures: [inflect.Pluralize INPUT] aliases: [/functions/pluralize] --- diff --git a/content/en/functions/inflect/Singularize.md b/content/en/functions/inflect/Singularize.md index d2a8572f6..eee5c5002 100644 --- a/content/en/functions/inflect/Singularize.md +++ b/content/en/functions/inflect/Singularize.md @@ -3,13 +3,14 @@ title: inflect.Singularize description: Singularizes the given word according to a set of common English singularization rules. categories: [] keywords: [] -action: - aliases: [singularize] - related: - - functions/inflect/Humanize - - functions/inflect/Pluralize - returnType: string - signatures: [inflect.Singularize INPUT] +params: + functions_and_methods: + aliases: [singularize] + related: + - functions/inflect/Humanize + - functions/inflect/Pluralize + returnType: string + signatures: [inflect.Singularize INPUT] aliases: [/functions/singularize] --- diff --git a/content/en/functions/inflect/_index.md b/content/en/functions/inflect/_index.md index 601b409e6..2afe4fe33 100644 --- a/content/en/functions/inflect/_index.md +++ b/content/en/functions/inflect/_index.md @@ -1,12 +1,7 @@ --- title: Inflect functions linkTitle: inflect -description: Template functions to inflect English nouns. +description: These functions provide word inflection features such as singularization and pluralization of English nouns. categories: [] keywords: [] -menu: - docs: - parent: functions --- - -These functions provide word inflection features such as singularization and pluralization of English nouns. diff --git a/content/en/functions/js/Babel.md b/content/en/functions/js/Babel.md index 08bce47e5..cd6a5095f 100644 --- a/content/en/functions/js/Babel.md +++ b/content/en/functions/js/Babel.md @@ -3,17 +3,16 @@ title: js.Babel description: Compile the given JavaScript resource with Babel. categories: [] keywords: [] -action: - aliases: [babel] - related: - - functions/js/Batch - - functions/js/Build - - functions/resources/Fingerprint - - functions/resources/Minify - returnType: resource.Resource - signatures: ['js.Babel [OPTIONS] RESOURCE'] -weight: 30 -toc: true +params: + functions_and_methods: + aliases: [babel] + related: + - functions/js/Batch + - functions/js/Build + - functions/resources/Fingerprint + - functions/resources/Minify + returnType: resource.Resource + signatures: ['js.Babel [OPTIONS] RESOURCE'] --- ```go-html-template @@ -37,18 +36,21 @@ toc: true ## Setup -Step 1 -: Install [Node.js](https://nodejs.org/en/download) +### Step 1 -Step 2 -: Install the required Node.js packages in the root of your project. +Install [Node.js](https://nodejs.org/en/download) + +### Step 2 + +Install the required Node.js packages in the root of your project. ```sh npm install --save-dev @babel/core @babel/cli ``` -Step 3 -: Add the babel executable to Hugo's `security.exec.allow` list in your site configuration: +### Step 3 + +Add the babel executable to Hugo's `security.exec.allow` list in your site configuration: {{< code-toggle file=hugo >}} [security.exec] @@ -75,32 +77,29 @@ module.exports = { ## Options -###### compact +compact +: (`bool`) Whether to remove optional newlines and whitespace. Enabled when `minified` is `true`. Default is `false` -(`bool`) Whether to remove optional newlines and whitespace. Enabled when `minified` is `true`. Default is `false` +config +: (`string`) Path to the Babel configuration file. Hugo will, by default, look for a `babel.config.js` file in the root of your project. See [details](https://babeljs.io/docs/en/configuration). -###### config +minified +: (`bool`) Whether to minify the compiled code. Enables the `compact` option. Default is `false`. -(`string`) Path to the Babel configuration file. Hugo will, by default, look for a `babel.config.js` file in the root of your project. See [details](https://babeljs.io/docs/en/configuration). +noBabelrc +: (`string`) Whether to ignore `.babelrc` and `.babelignore` files. Default is `false`. -###### minified +noComments +: (`bool`) Whether to remove comments. Default is `false`. -(`bool`) Whether to minify the compiled code. Enables the `compact` option. Default is `false`. +sourceMap +: (`string`) Whether to generate source maps, one of `external`, `inline`, or `none`. Default is `none`. -###### noBabelrc -(`string`) Whether to ignore `.babelrc` and `.babelignore` files. Default is `false`. +verbose +: (`bool`) Whether to enable verbose logging. Default is `false` -###### noComments - -(`bool`) Whether to remove comments. Default is `false`. - -###### sourceMap - -(`string`) Whether to generate source maps, one of `external`, `inline`, or `none`. Default is `none`. - - - -###### verbose - -(`bool`) Whether to enable verbose logging. Default is `false` + diff --git a/content/en/functions/js/Batch.md b/content/en/functions/js/Batch.md index fe9ec979f..5bce47889 100644 --- a/content/en/functions/js/Batch.md +++ b/content/en/functions/js/Batch.md @@ -3,17 +3,16 @@ title: js.Batch description: Build JavaScript bundle groups with global code splitting and flexible hooks/runners setup. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/js/Build - - functions/js/Babel - - functions/resources/Fingerprint - - functions/resources/Minify - returnType: js.Batcher - signatures: ['js.Batch [ID]'] -weight: 20 -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/js/Build + - functions/js/Babel + - functions/resources/Fingerprint + - functions/resources/Minify + returnType: js.Batcher + signatures: ['js.Batch [ID]'] --- {{< note >}} @@ -22,21 +21,21 @@ For a runnable example of this feature, see [this test and demo repo](https://gi The Batch `ID` is used to create the base directory for this batch. Forward slashes are allowed. `js.Batch` returns an object with an API with this structure: -* [Group] - * [Script] - * [SetOptions] - * [Instance] - * [SetOptions] - * [Runner] - * [SetOptions] - * [Config] - * [SetOptions] +- [Group] + - [Script] + - [SetOptions] + - [Instance] + - [SetOptions] + - [Runner] + - [SetOptions] + - [Config] + - [SetOptions] ## Group The `Group` method take an `ID` (`string`) as argument. No slashes. It returns an object with these methods: -#### Script +### 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. @@ -50,9 +49,9 @@ The `Script` method takes an `ID` (`string`) as argument. No slashes. It returns {{ end }} ``` -`SetOptions` takes a [script options] map. Note that if you want the script to be handled by a [runner], you need to set the `export` option to match what you want to pass on to the runner (default is `*`). +`SetOptions` takes a [script options] map. Note that if you want the script to be handled by a [runner], you need to set the `export` option to match what you want to pass on to the runner (default is `*`). -#### Instance +### Instance The `Instance` method takes two `string` arguments `SCRIPT_ID` and `INSTANCE_ID`. No slashes. It returns an [OptionsSetter] that can be used to set [params options] for this instance. @@ -68,7 +67,7 @@ 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 +### 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. @@ -131,34 +130,34 @@ import * as ReactDOM from 'react-dom/client'; import * as React from 'react'; export default function Run(group) { - console.log('Running react-create-elements.js', group); - const scripts = group.scripts; - for (const script of scripts) { - for (const instance of script.instances) { - /* This is a convention in this project. */ - let elId = `${script.id}-${instance.id}`; - let el = document.getElementById(elId); - if (!el) { - console.warn(`Element with id ${elId} not found`); - continue; - } - const root = ReactDOM.createRoot(el); - const reactEl = React.createElement(script.binding, instance.params); - root.render(reactEl); - } - } + console.log('Running react-create-elements.js', group); + const scripts = group.scripts; + for (const script of scripts) { + for (const instance of script.instances) { + /* This is a convention in this project. */ + let elId = `${script.id}-${instance.id}`; + let el = document.getElementById(elId); + if (!el) { + console.warn(`Element with id ${elId} not found`); + continue; + } + const root = ReactDOM.createRoot(el); + const reactEl = React.createElement(script.binding, instance.params); + root.render(reactEl); + } + } } ``` -#### Config +### 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: -* `targetPath` is set automatically (there may be multiple outputs). -* `format` must be `esm`, currently the only format supporting [code splitting]. -* `params` will be available in the `@params/config` namespace in the scripts. This way you can import both the [script] or [runner] params and the [config] params with: +- `targetPath` is set automatically (there may be multiple outputs). +- ``format` must be `esm`, currently the only format supporting [code splitting]. +- ``params` will be available in the `@params/config` namespace in the scripts. This way you can import both the [script] or [runner] params and the [config] params with: ```js import * as params from "@params"; @@ -185,14 +184,14 @@ Setting the `Config` for a batch can be done from any template (including shortc ## Options -### Build Options +### Build options format : (`string`) Currently only `esm` is supported in [ESBuild's code splitting]. -{{% include "./_common/options.md" %}} +{{% include "/_common/functions/js/options.md" %}} -### Script Options +### Script options resource : The resource to build. This can be a file resource or a virtual resource. @@ -205,18 +204,17 @@ importContext params : A map of parameters that will be passed to the script as JSON. These gets bound to the `@params` namespace: -```js -import * as params from '@params'; -``` -### Script Options + ```js + import * as params from '@params'; + ``` -### Params Options +### Params options params -: A map of parameters that will be passed to the script as JSON. +: A map of parameters that will be passed to the script as JSON. -### Import Context +### Import context Hugo will, by default, first try to resolve any import in [assets](/hugo-pipes/introduction/#asset-directory) and, if not found, let [ESBuild] resolve it (e.g. from `node_modules`). The `importContext` option can be used to set the first context for resolving imports. A common use of this is to resolve imports inside a [page bundle](/content-management/page-bundles/). @@ -243,12 +241,12 @@ An `OptionsSetter` is a special object that is returned once only. This means th The `Build` method returns an object with the following structure: -* Groups (map) - * [`Resources`] +- Groups (map) + - [`Resources`] -Eeach [`Resource`] will be of media type `application/javascript` or `text/css`. +Each [`Resource`] will be of media type `application/javascript` or `text/css`. - In a template you would typically handle one group with a given `ID` (e.g. scripts for the current section). Because of the concurrent build, this needs to be done in a [`templates.Defer`] block: +In a template you would typically handle one group with a given `ID` (e.g. scripts for the current section). Because of the concurrent build, this needs to be done in a [`templates.Defer`] block: {{< note >}} The [`templates.Defer`] acts as a synchronisation point to handle scripts added concurrently by different templates. If you have a setup with where the batch is created in one go (in one template), you don't need it. @@ -281,8 +279,8 @@ See [this discussion](https://discourse.gohugo.io/t/js-batch-with-simple-global- In the official documentation for [ESBuild's code splitting], there's a warning note in the header. The two issues are: -* `esm` is currently the only implemented output format. This means that it will not work for very old browsers. See [caniuse](https://caniuse.com/?search=ESM). -* There's a known import ordering issue. + - `esm` is currently the only implemented output format. This means that it will not work for very old browsers. See [caniuse](https://caniuse.com/?search=ESM). + - There's a known import ordering issue. 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: diff --git a/content/en/functions/js/Build.md b/content/en/functions/js/Build.md index 497e19203..137c8a50f 100644 --- a/content/en/functions/js/Build.md +++ b/content/en/functions/js/Build.md @@ -3,17 +3,16 @@ title: js.Build description: Bundle, transpile, tree shake, and minify JavaScript resources. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/js/Batch - - functions/js/Babel - - functions/resources/Fingerprint - - functions/resources/Minify - returnType: resource.Resource - signatures: ['js.Build [OPTIONS] RESOURCE'] -weight: 10 -toc: true +params: + functions_and_methods: + aliases: [] + related: + - functions/js/Batch + - functions/js/Babel + - functions/resources/Fingerprint + - functions/resources/Minify + returnType: resource.Resource + signatures: ['js.Build [OPTIONS] RESOURCE'] --- The `js.Build` function uses the [evanw/esbuild] package to: @@ -48,13 +47,12 @@ The `js.Build` function uses the [evanw/esbuild] package to: ## Options targetPath -: (`string`) If not set, the source path will be used as the base target path. -Note that the target path's extension may change if the target MIME type is different, e.g. when the source is TypeScript. +: (`string`) If not set, the source path will be used as the base target path. Note that the target path's extension may change if the target MIME type is different, e.g. when the source is TypeScript. format : (`string`) The output format. One of: `iife`, `cjs`, `esm`. Default is `iife`, a self-executing function, suitable for inclusion as a ` {{ end }} ``` - -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} diff --git a/content/en/methods/resource/Crop.md b/content/en/methods/resource/Crop.md index 711fc07b0..e6873d418 100644 --- a/content/en/methods/resource/Crop.md +++ b/content/en/methods/resource/Crop.md @@ -3,18 +3,20 @@ title: Crop description: Applicable to images, returns an image resource cropped to the given dimensions without resizing. categories: [] keywords: [] -action: - related: - - methods/resource/Fit - - methods/resource/Fill - - methods/resource/Resize - - methods/resource/Process - - functions/images/Process - returnType: images.ImageResource - signatures: [RESOURCE.Crop SPEC] -toc: true +params: + functions_and_methods: + related: + - methods/resource/Fit + - methods/resource/Fill + - methods/resource/Resize + - methods/resource/Process + - functions/images/Process + returnType: images.ImageResource + signatures: [RESOURCE.Crop SPEC] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + Crop an image to match the given dimensions without resizing. You must provide both width and height. ```go-html-template @@ -25,9 +27,7 @@ Crop an image to match the given dimensions without resizing. You must provide b {{ end }} ``` -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} - -{{% include "/methods/resource/_common/processing-spec.md" %}} +{{% include "/_common/methods/resource/processing-spec.md" %}} ## Example diff --git a/content/en/methods/resource/Data.md b/content/en/methods/resource/Data.md index b6744d1be..8ba05dfe3 100644 --- a/content/en/methods/resource/Data.md +++ b/content/en/methods/resource/Data.md @@ -3,18 +3,21 @@ title: Data description: Applicable to resources returned by the resources.GetRemote function, returns information from the HTTP response. categories: [] keywords: [] -action: - related: - - functions/resources/GetRemote - - methods/resource/Err - returnType: map - signatures: [RESOURCE.Data] +params: + functions_and_methods: + related: + - functions/resources/GetRemote + - methods/resource/Err + returnType: map + signatures: [RESOURCE.Data] --- The `Data` method on a resource returned by the [`resources.GetRemote`] function returns information from the HTTP response. [`resources.GetRemote`]: /functions/resources/getremote/ +## Example + ```go-html-template {{ $url := "https://example.org/images/a.jpg" }} {{ $opts := dict "responseHeaders" (slice "Server") }} @@ -36,30 +39,31 @@ The `Data` method on a resource returned by the [`resources.GetRemote`] function {{ end }} ``` -###### ContentLength +## Methods + +### ContentLength (`int`) The content length in bytes. -###### ContentType +### ContentType (`string`) The content type. -###### Headers +### Headers (`map[string][]string`) A map of response headers matching those requested in the [`responseHeaders`] option passed to the `resources.GetRemote` function. The header name matching is case-insensitive. In most cases there will be one value per header key. -[`responseHeaders`]: /functions/resources/getremote/#responseheaders - -###### Status +### Status (`string`) The HTTP status text. -###### StatusCode +### StatusCode (`int`) The HTTP status code. -###### TransferEncoding +### TransferEncoding (`string`) The transfer encoding. [`resources.GetRemote`]: /functions/resources/getremote/ +[`responseHeaders`]: /functions/resources/getremote/#responseheaders diff --git a/content/en/methods/resource/Err.md b/content/en/methods/resource/Err.md index 11c1dd77b..20a05040d 100644 --- a/content/en/methods/resource/Err.md +++ b/content/en/methods/resource/Err.md @@ -1,14 +1,15 @@ --- title: Err -description: Applicable to resources returned by the resources.GetRemote function, returns an error message if the HTTP request fails, else nil. +description: Applicable to resources returned by the resources.GetRemote function, returns an error message if the HTTP request fails, else nil. categories: [] keywords: [] -action: - related: - - functions/resources/GetRemote - - methods/resource/Data - returnType: resource.resourceError - signatures: [RESOURCE.Err] +params: + functions_and_methods: + related: + - functions/resources/GetRemote + - methods/resource/Data + returnType: resource.resourceError + signatures: [RESOURCE.Err] expiryDate: 2027-01-16 # deprecated 2025-01-16 in v0.141.0 --- diff --git a/content/en/methods/resource/Exif.md b/content/en/methods/resource/Exif.md index a8e5a42aa..f624d23e9 100644 --- a/content/en/methods/resource/Exif.md +++ b/content/en/methods/resource/Exif.md @@ -3,28 +3,36 @@ title: Exif description: Applicable to JPEG, PNG, TIFF, and WebP images, returns an EXIF object containing image metadata. categories: [] keywords: [] -action: - related: [] - returnType: exif.ExifInfo - signatures: [RESOURCE.Exif] -toc: true +params: + functions_and_methods: + related: [] + returnType: exif.ExifInfo + signatures: [RESOURCE.Exif] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + Applicable to JPEG, PNG, TIFF, and WebP images, the `Exif` method on an image `Resource` object returns an [EXIF] object containing image metadata. ## Methods -Date -: (`time.Time`) Returns the image creation date/time. Format with the [`time.Format`] function. +### Date -Lat -: (`float64`) Returns the GPS latitude in degrees. +(`time.Time`) Returns the image creation date/time. Format with the [`time.Format`] function. -Long -: (`float64`) Returns the GPS longitude in degrees. +### Lat -Tags -: (`exif.Tags`) Returns a collection of the available EXIF tags for this image. You may include or exclude specific tags from this collection in the [site configuration]. +(`float64`) Returns the GPS latitude in degrees. + +### Long + +(`float64`) Returns the GPS longitude in degrees. + +### Tags + +(`exif.Tags`) Returns a collection of the available EXIF tags for this image. You may include or exclude specific tags from this collection. See [configure imaging]. + +[configure imaging]: /configuration/imaging/#exif-data ## Examples @@ -71,8 +79,5 @@ To list specific values: {{ end }} ``` -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} - [exif]: https://en.wikipedia.org/wiki/Exif -[site configuration]: /content-management/image-processing/#exif-data [`time.Format`]: /functions/time/format/ diff --git a/content/en/methods/resource/Fill.md b/content/en/methods/resource/Fill.md index 8bbaf93ee..3c067620b 100644 --- a/content/en/methods/resource/Fill.md +++ b/content/en/methods/resource/Fill.md @@ -1,20 +1,22 @@ --- title: Fill -description: Applicable to images, returns an image resource cropped and resized to the given dimensions. +description: Applicable to images, returns an image resource cropped and resized to the given dimensions. categories: [] keywords: [] -action: - related: - - methods/resource/Crop - - methods/resource/Fit - - methods/resource/Resize - - methods/resource/Process - - functions/images/Process - returnType: images.ImageResource - signatures: [RESOURCE.Fill SPEC] -toc: true +params: + functions_and_methods: + related: + - methods/resource/Crop + - methods/resource/Fit + - methods/resource/Resize + - methods/resource/Process + - functions/images/Process + returnType: images.ImageResource + signatures: [RESOURCE.Fill SPEC] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + Crop and resize an image to match the given dimensions. You must provide both width and height. ```go-html-template @@ -25,9 +27,7 @@ Crop and resize an image to match the given dimensions. You must provide both wi {{ end }} ``` -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} - -{{% include "/methods/resource/_common/processing-spec.md" %}} +{{% include "/_common/methods/resource/processing-spec.md" %}} ## Example diff --git a/content/en/methods/resource/Filter.md b/content/en/methods/resource/Filter.md index 2b059c993..e44deb23d 100644 --- a/content/en/methods/resource/Filter.md +++ b/content/en/methods/resource/Filter.md @@ -3,14 +3,16 @@ title: Filter description: Applicable to images, applies one or more image filters to the given image resource. categories: [] keywords: [] -action: - related: - - functions/images/Filter - returnType: images.ImageResource - signatures: [RESOURCE.Filter FILTER...] -toc: true +params: + functions_and_methods: + related: + - functions/images/Filter + returnType: images.ImageResource + signatures: [RESOURCE.Filter FILTER...] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + Apply one or more [image filters](#image-filters) to the given image. To apply a single filter: @@ -41,8 +43,6 @@ You can also apply image filters using the [`images.Filter`] function. [`images.Filter`]: /functions/images/filter/ -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} - ## Example ```go-html-template diff --git a/content/en/methods/resource/Fit.md b/content/en/methods/resource/Fit.md index 13354fe5a..e4abe0018 100644 --- a/content/en/methods/resource/Fit.md +++ b/content/en/methods/resource/Fit.md @@ -1,20 +1,22 @@ --- title: Fit -description: Applicable to images, returns an image resource downscaled to fit the given dimensions while maintaining aspect ratio. +description: Applicable to images, returns an image resource downscaled to fit the given dimensions while maintaining aspect ratio. categories: [] keywords: [] -action: - related: - - methods/resource/Crop - - methods/resource/Fill - - methods/resource/Resize - - methods/resource/Process - - functions/images/Process - returnType: images.ImageResource - signatures: [RESOURCE.Fit SPEC] -toc: true +params: + functions_and_methods: + related: + - methods/resource/Crop + - methods/resource/Fill + - methods/resource/Resize + - methods/resource/Process + - functions/images/Process + returnType: images.ImageResource + signatures: [RESOURCE.Fit SPEC] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + Downscale an image to fit the given dimensions while maintaining aspect ratio. You must provide both width and height. ```go-html-template @@ -25,9 +27,7 @@ Downscale an image to fit the given dimensions while maintaining aspect ratio. Y {{ end }} ``` -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} - -{{% include "/methods/resource/_common/processing-spec.md" %}} +{{% include "/_common/methods/resource/processing-spec.md" %}} ## Example diff --git a/content/en/methods/resource/Height.md b/content/en/methods/resource/Height.md index dcaf6c514..40b8b70d9 100644 --- a/content/en/methods/resource/Height.md +++ b/content/en/methods/resource/Height.md @@ -3,13 +3,16 @@ title: Height description: Applicable to images, returns the height of the given resource. categories: [] keywords: [] -action: - related: - - methods/resource/Width - returnType: int - signatures: [RESOURCE.Height] +params: + functions_and_methods: + related: + - methods/resource/Width + returnType: int + signatures: [RESOURCE.Height] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + ```go-html-template {{ with resources.Get "images/a.jpg" }} {{ .Height }} → 400 @@ -23,5 +26,3 @@ Use the `Width` and `Height` methods together when rendering an `img` element: {{ end }} ``` - -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} diff --git a/content/en/methods/resource/Key.md b/content/en/methods/resource/Key.md deleted file mode 100644 index 2dbd371be..000000000 --- a/content/en/methods/resource/Key.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Key -description: Returns the unique key for the given resource, equivalent to its publishing path. -draft: true -categories: [] -keywords: [] -action: - related: - - methods/resource/Permalink - - methods/resource/RelPermalink - - methods/resource/Publish - returnType: string - signatures: [RESOURCE.Key] ---- - -By way of example, consider this site configuration: - -{{< code-toggle file=hugo >}} -baseURL = 'https://example.org/docs/' -{{< /code-toggle >}} - -And this template: - -```go-html-template - {{ with resources.Get "images/a.jpg" }} - {{ with resources.Copy "foo/bar/b.jpg" . }} - {{ .Key }} → foo/bar/b.jpg - - {{ .Name }} → images/a.jpg - {{ .Title }} → images/a.jpg - - {{ .RelPermalink }} → /docs/foo/bar/b.jpg - {{ end }} - {{ end }} -``` - -We used the [`resources.Copy`] function to change the publishing path. The `Key` method returns the updated path, but note that it is different than the value returned by [`RelPermalink`]. The `RelPermalink` value includes the subdirectory segment of the `baseURL` in the site configuration. - -The `Key` method is useful if you need to get the resource's publishing path without publishing the resource. Unlike the `Permalink`, `RelPermalink`, or `Publish` methods, calling `Key` will not publish the resource. - -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} - -[`Permalink`]: /methods/resource/permalink/ -[`RelPermalink`]: /methods/resource/relpermalink/ -[`resources.Copy`]: /functions/resources/copy/ diff --git a/content/en/methods/resource/MediaType.md b/content/en/methods/resource/MediaType.md index 6dea8706c..51a3e1364 100644 --- a/content/en/methods/resource/MediaType.md +++ b/content/en/methods/resource/MediaType.md @@ -3,18 +3,22 @@ title: MediaType description: Returns a media type object for the given resource. categories: [] keywords: [] -action: - related: [] - returnType: media.Type - signatures: [RESOURCE.MediaType] +params: + functions_and_methods: + related: [] + returnType: media.Type + signatures: [RESOURCE.MediaType] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + The `MediaType` method on a `Resource` object returns an object with additional methods. ## Methods -Type -: (`string`) The resource's media type. +### Type + +(`string`) The resource's media type. ```go-html-template {{ with resources.Get "images/a.jpg" }} @@ -22,8 +26,9 @@ Type {{ end }} ``` -MainType -: (`string`) The main type of the resource’s media type. +### MainType + +(`string`) The main type of the resource's media type. ```go-html-template {{ with resources.Get "images/a.jpg" }} @@ -31,8 +36,9 @@ MainType {{ end }} ``` -SubType -: (`string`) The subtype of the resource’s media type. This may or may not correspond to the file suffix. +### SubType + +(`string`) The subtype of the resource's media type. This may or may not correspond to the file suffix. ```go-html-template {{ with resources.Get "images/a.jpg" }} @@ -40,8 +46,9 @@ SubType {{ end }} ``` -Suffixes -: (`slice`) A slice of possible file suffixes for the resource’s media type. +### Suffixes + +(`slice`) A slice of possible file suffixes for the resource's media type. ```go-html-template {{ with resources.Get "images/a.jpg" }} @@ -49,4 +56,12 @@ Suffixes {{ end }} ``` -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} +### FirstSuffix.Suffix + +(`string`) The first of the possible file suffixes for the resource's media type. + +```go-html-template +{{ with resources.Get "images/a.jpg" }} + {{ .MediaType.FirstSuffix.Suffix }} → jpg +{{ end }} +``` diff --git a/content/en/methods/resource/Name.md b/content/en/methods/resource/Name.md index 28ccf3abf..d10a77933 100644 --- a/content/en/methods/resource/Name.md +++ b/content/en/methods/resource/Name.md @@ -3,12 +3,12 @@ title: Name description: Returns the name of the given resource as optionally defined in front matter, falling back to its file path. categories: [] keywords: [] -action: - related: - - methods/resource/Title - returnType: string - signatures: [RESOURCE.Name] -toc: true +params: + functions_and_methods: + related: + - methods/resource/Title + returnType: string + signatures: [RESOURCE.Name] --- The value returned by the `Name` method on a `Resource` object depends on the resource type. diff --git a/content/en/methods/resource/Params.md b/content/en/methods/resource/Params.md index a171b3ddf..59183c4c3 100644 --- a/content/en/methods/resource/Params.md +++ b/content/en/methods/resource/Params.md @@ -3,10 +3,11 @@ title: Params description: Returns a map of resource parameters as defined in front matter. categories: [] keywords: [] -action: - related: [] - returnType: map - signatures: [RESOURCE.Params] +params: + functions_and_methods: + related: [] + returnType: map + signatures: [RESOURCE.Params] --- Use the `Params` method with [page resources](g). It is not applicable to either [global resources](g) or [remote resources](g). diff --git a/content/en/methods/resource/Permalink.md b/content/en/methods/resource/Permalink.md index 4c87b4b46..99e8ceb45 100644 --- a/content/en/methods/resource/Permalink.md +++ b/content/en/methods/resource/Permalink.md @@ -1,16 +1,19 @@ --- title: Permalink -description: Publishes the given resource and returns its permalink. +description: Publishes the given resource and returns its permalink. categories: [] keywords: [] -action: - related: - - methods/resource/RelPermalink - - methods/resource/Publish - returnType: string - signatures: [RESOURCE.Permalink] +params: + functions_and_methods: + related: + - methods/resource/RelPermalink + - methods/resource/Publish + returnType: string + signatures: [RESOURCE.Permalink] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + The `Permalink` method on a `Resource` object writes the resource to the publish directory, typically `public`, and returns its [permalink](g). ```go-html-template @@ -18,5 +21,3 @@ The `Permalink` method on a `Resource` object writes the resource to the publish {{ .Permalink }} → https://example.org/images/a.jpg {{ end }} ``` - -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} diff --git a/content/en/methods/resource/Process.md b/content/en/methods/resource/Process.md index 550b06401..d805e129f 100644 --- a/content/en/methods/resource/Process.md +++ b/content/en/methods/resource/Process.md @@ -3,18 +3,20 @@ title: Process description: Applicable to images, returns an image resource processed with the given specification. categories: [] keywords: [] -action: - related: - - methods/resource/Crop - - methods/resource/Fit - - methods/resource/Fill - - methods/resource/Resize - - functions/images/Process - returnType: images.ImageResource - signatures: [RESOURCE.Process SPEC] -toc: true +params: + functions_and_methods: + related: + - methods/resource/Crop + - methods/resource/Fit + - methods/resource/Fill + - methods/resource/Resize + - functions/images/Process + returnType: images.ImageResource + signatures: [RESOURCE.Process SPEC] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + Process an image with the given specification. The specification can contain an optional action, one of `crop`, `fill`, `fit`, or `resize`. This means that you can use this method instead of [`Crop`], [`Fill`], [`Fit`], or [`Resize`]. ```go-html-template @@ -37,9 +39,7 @@ You can also use this method to apply simple transformations such as rotation an The `Process` method is also available as a filter, which is more effective if you need to apply multiple filters to an image. See [`images.Process`]. -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} - -{{% include "/methods/resource/_common/processing-spec.md" %}} +{{% include "/_common/methods/resource/processing-spec.md" %}} ## Example diff --git a/content/en/methods/resource/Publish.md b/content/en/methods/resource/Publish.md index 05344c658..fc9d9a234 100644 --- a/content/en/methods/resource/Publish.md +++ b/content/en/methods/resource/Publish.md @@ -3,14 +3,17 @@ title: Publish description: Publishes the given resource. categories: [] keywords: [] -action: - related: - - methods/resource/Permalink - - methods/resource/RelPermalink - returnType: nil - signatures: [RESOURCE.Publish] +params: + functions_and_methods: + related: + - methods/resource/Permalink + - methods/resource/RelPermalink + returnType: nil + signatures: [RESOURCE.Publish] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + The `Publish` method on a `Resource` object writes the resource to the publish directory, typically `public`. ```go-html-template @@ -30,5 +33,3 @@ Instead of this: ```go-html-template {{ $noop := $resource.Permalink }} ``` - -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} diff --git a/content/en/methods/resource/RelPermalink.md b/content/en/methods/resource/RelPermalink.md index a7226b057..723c8c71d 100644 --- a/content/en/methods/resource/RelPermalink.md +++ b/content/en/methods/resource/RelPermalink.md @@ -3,14 +3,17 @@ title: RelPermalink description: Publishes the given resource and returns its relative permalink. categories: [] keywords: [] -action: - related: - - methods/resource/Permalink - - methods/resource/Publish - returnType: string - signatures: [RESOURCE.RelPermalink] +params: + functions_and_methods: + related: + - methods/resource/Permalink + - methods/resource/Publish + returnType: string + signatures: [RESOURCE.RelPermalink] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + 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 @@ -18,5 +21,3 @@ The `Permalink` method on a `Resource` object writes the resource to the publish {{ .RelPermalink }} → /images/a.jpg {{ end }} ``` - -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} diff --git a/content/en/methods/resource/Resize.md b/content/en/methods/resource/Resize.md index 4ba054bb5..4f7587094 100644 --- a/content/en/methods/resource/Resize.md +++ b/content/en/methods/resource/Resize.md @@ -3,17 +3,20 @@ title: Resize description: Applicable to images, returns an image resource resized to the given width and/or height. categories: [] keywords: [] -action: - related: - - methods/resource/Crop - - methods/resource/Fit - - methods/resource/Fill - - methods/resource/Process - - functions/images/Process - returnType: images.ImageResource - signatures: [RESOURCE.Resize SPEC] +params: + functions_and_methods: + related: + - methods/resource/Crop + - methods/resource/Fit + - methods/resource/Fill + - methods/resource/Process + - functions/images/Process + returnType: images.ImageResource + signatures: [RESOURCE.Resize SPEC] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + Resize an image to the given width and/or height. If you specify both width and height, the resulting image will be disproportionally scaled unless the original image has the same aspect ratio. @@ -26,9 +29,7 @@ If you specify both width and height, the resulting image will be disproportiona {{ end }} ``` -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} - -{{% include "/methods/resource/_common/processing-spec.md" %}} +{{% include "/_common/methods/resource/processing-spec.md" %}} ## Example diff --git a/content/en/methods/resource/ResourceType.md b/content/en/methods/resource/ResourceType.md index db52e7b10..56e60856f 100644 --- a/content/en/methods/resource/ResourceType.md +++ b/content/en/methods/resource/ResourceType.md @@ -3,12 +3,15 @@ title: ResourceType description: Returns the main type of the given resource's media type. categories: [] keywords: [] -action: - related: [] - returnType: string - signatures: [RESOURCE.ResourceType] +params: + functions_and_methods: + related: [] + returnType: string + signatures: [RESOURCE.ResourceType] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + Common resource types include `audio`, `image`, `text`, and `video`. ```go-html-template @@ -34,10 +37,8 @@ content/ With the structure above, we can range through page resources of type `page` to build content: -{{< code file=layouts/lessons/single.html >}} +{{< code file=layouts/lessons/single.html >}} {{ range .Resources.ByType "page" }} {{ .Content }} {{ end }} {{< /code >}} - -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} diff --git a/content/en/methods/resource/Title.md b/content/en/methods/resource/Title.md index 1a984f902..d3e9c5d5b 100644 --- a/content/en/methods/resource/Title.md +++ b/content/en/methods/resource/Title.md @@ -3,12 +3,12 @@ title: Title description: Returns the title of the given resource as optionally defined in front matter, falling back to a relative path or hashed file name depending on resource type. categories: [] keywords: [] -action: - related: - - methods/resource/Name - returnType: string - signatures: [RESOURCE.Title] -toc: true +params: + functions_and_methods: + related: + - methods/resource/Name + returnType: string + signatures: [RESOURCE.Title] --- The value returned by the `Title` method on a `Resource` object depends on the resource type. diff --git a/content/en/methods/resource/Width.md b/content/en/methods/resource/Width.md index 8b96c95e8..f31fb62bc 100644 --- a/content/en/methods/resource/Width.md +++ b/content/en/methods/resource/Width.md @@ -3,13 +3,16 @@ title: Width description: Applicable to images, returns the width of the given resource. categories: [] keywords: [] -action: - related: - - methods/resource/Height - returnType: int - signatures: [RESOURCE.Width] +params: + functions_and_methods: + related: + - methods/resource/Height + returnType: int + signatures: [RESOURCE.Width] --- +{{% include "/_common/methods/resource/global-page-remote-resources.md" %}} + ```go-html-template {{ with resources.Get "images/a.jpg" }} {{ .Width }} → 600 @@ -23,5 +26,3 @@ Use the `Width` and `Height` methods together when rendering an `img` element: {{ end }} ``` - -{{% include "methods/resource/_common/global-page-remote-resources.md" %}} diff --git a/content/en/methods/resource/_common/_index.md b/content/en/methods/resource/_common/_index.md deleted file mode 100644 index 4328d4d14..000000000 --- a/content/en/methods/resource/_common/_index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -cascade: - _build: - list: never - publishResources: false - render: never ---- - - diff --git a/content/en/methods/resource/_index.md b/content/en/methods/resource/_index.md index e9426e1a5..edfbc5b14 100644 --- a/content/en/methods/resource/_index.md +++ b/content/en/methods/resource/_index.md @@ -4,9 +4,4 @@ linkTitle: Resource description: Use these methods with global, page, and remote Resource objects. categories: [] keywords: [] -menu: - docs: - parent: methods --- - -Use these methods with global, page, and remote Resource objects. diff --git a/content/en/methods/shortcode/Get.md b/content/en/methods/shortcode/Get.md index ec37fddd5..04ce6ad0b 100644 --- a/content/en/methods/shortcode/Get.md +++ b/content/en/methods/shortcode/Get.md @@ -3,13 +3,13 @@ title: Get description: Returns the value of the given argument. categories: [] keywords: [] -action: - related: - - methods/shortcode/IsNamedParams - - methods/shortcode/Params - returnType: any - signatures: [SHORTCODE.Get ARG] -toc: true +params: + functions_and_methods: + related: + - methods/shortcode/IsNamedParams + - methods/shortcode/Params + returnType: any + signatures: [SHORTCODE.Get ARG] --- Specify the argument by position or by name. When calling a shortcode within Markdown, use either positional or named argument, but not both. @@ -22,13 +22,13 @@ Some shortcodes support positional arguments, some support named arguments, and This shortcode call uses positional arguments: -{{< code file=content/about.md lang=md >}} +{{< code file=content/about.md lang=text >}} {{}} {{< /code >}} To retrieve arguments by position: -{{< code file=layouts/shortcodes/myshortcode.html >}} +{{< code file=layouts/shortcodes/myshortcode.html >}} {{ printf "%s %s." (.Get 0) (.Get 1) }} → Hello world. {{< /code >}} @@ -36,13 +36,13 @@ To retrieve arguments by position: This shortcode call uses named arguments: -{{< code file=content/about.md lang=md >}} +{{< code file=content/about.md lang=text >}} {{}} {{< /code >}} To retrieve arguments by name: -{{< code file=layouts/shortcodes/myshortcode.html >}} +{{< code file=layouts/shortcodes/myshortcode.html >}} {{ printf "%s %s." (.Get "greeting") (.Get "firstName") }} → Hello world. {{< /code >}} diff --git a/content/en/methods/shortcode/Inner.md b/content/en/methods/shortcode/Inner.md index bf70f0f9a..698b44ac1 100644 --- a/content/en/methods/shortcode/Inner.md +++ b/content/en/methods/shortcode/Inner.md @@ -3,20 +3,20 @@ title: Inner description: Returns the content between opening and closing shortcode tags, applicable when the shortcode call includes a closing tag. categories: [] keywords: [] -action: - related: - - functions/strings/Trim - - methods/page/RenderString - - functions/transform/Markdownify - - methods/shortcode/InnerDeindent - returnType: template.HTML - signatures: [SHORTCODE.Inner] -toc: true +params: + functions_and_methods: + related: + - functions/strings/Trim + - methods/page/RenderString + - functions/transform/Markdownify + - methods/shortcode/InnerDeindent + returnType: template.HTML + signatures: [SHORTCODE.Inner] --- This content: -{{< code file=content/services.md lang=md >}} +{{< code file=content/services.md lang=text >}} {{}} We design the **best** widgets in the world. {{}} @@ -24,7 +24,7 @@ We design the **best** widgets in the world. With this shortcode: -{{< code file=layouts/shortcodes/card.html >}} +{{< code file=layouts/shortcodes/card.html >}}
      {{ with .Get "title" }}
      {{ . }}
      @@ -62,7 +62,7 @@ Let's modify the example above to pass the value returned by `Inner` through the [`RenderString`]: /methods/page/renderstring/ -{{< code file=layouts/shortcodes/card.html >}} +{{< code file=layouts/shortcodes/card.html >}}
      {{ with .Get "title" }}
      {{ . }}
      @@ -93,7 +93,7 @@ You can use the [`markdownify`] function instead of the `RenderString` method, b Instead of calling the shortcode with the `{{}}` notation, use the `{{%/* */%}}` notation: -{{< code file=content/services.md lang=md >}} +{{< code file=content/services.md lang=text >}} {{%/* card title="Product Design" */%}} We design the **best** widgets in the world. {{%/* /card */%}} @@ -112,7 +112,7 @@ This configuration is not unsafe if _you_ control the content. Read more about H Second, because we are rendering the entire shortcode as Markdown, we must adhere to the rules governing [indentation] and inclusion of [raw HTML blocks] as provided in the [CommonMark] specification. -{{< code file=layouts/shortcodes/card.html >}} +{{< code file=layouts/shortcodes/card.html >}}
      {{ with .Get "title" }}
      {{ . }}
      diff --git a/content/en/methods/shortcode/InnerDeindent.md b/content/en/methods/shortcode/InnerDeindent.md index ab4263709..d45e9eb96 100644 --- a/content/en/methods/shortcode/InnerDeindent.md +++ b/content/en/methods/shortcode/InnerDeindent.md @@ -1,13 +1,14 @@ --- title: InnerDeindent -description: Returns the content between opening and closing shortcode tags, with indentation removed, applicable when the shortcode call includes a closing tag. +description: Returns the content between opening and closing shortcode tags, with indentation removed, applicable when the shortcode call includes a closing tag. categories: [] keywords: [] -action: - related: - - methods/shortcode/Inner - returnType: template.HTML - signatures: [SHORTCODE.InnerDeindent] +params: + functions_and_methods: + related: + - methods/shortcode/Inner + returnType: template.HTML + signatures: [SHORTCODE.InnerDeindent] --- Similar to the [`Inner`] method, `InnerDeindent` returns the content between opening and closing shortcode tags. However, with `InnerDeindent`, indentation before the content is removed. @@ -16,7 +17,7 @@ This allows us to effectively bypass the rules governing [indentation] as provid Consider this Markdown, an unordered list with a small gallery of thumbnail images within each list item: -{{< code file=content/about.md lang=md >}} +{{< code file=content/about.md lang=text >}} - Gallery one {{}} @@ -36,7 +37,7 @@ In the example above, notice that the content between the opening and closing sh With this shortcode, calling `Inner` instead of `InnerDeindent`: -{{< code file=layouts/shortcodes/gallery.html >}} +{{< code file=layouts/shortcodes/gallery.html >}} @@ -67,7 +68,7 @@ Hugo renders the Markdown to: Although technically correct per the CommonMark specification, this is not what we want. If we remove the indentation using the `InnerDeindent` method: -{{< code file=layouts/shortcodes/gallery.html >}} +{{< code file=layouts/shortcodes/gallery.html >}} diff --git a/content/en/methods/shortcode/IsNamedParams.md b/content/en/methods/shortcode/IsNamedParams.md index a1d93ddac..782e6baa4 100644 --- a/content/en/methods/shortcode/IsNamedParams.md +++ b/content/en/methods/shortcode/IsNamedParams.md @@ -3,18 +3,19 @@ title: IsNamedParams description: Reports whether the shortcode call uses named arguments. categories: [] keywords: [] -action: - related: - - methods/shortcode/Get - returnType: bool - signatures: [SHORTCODE.IsNamedParams] +params: + functions_and_methods: + related: + - methods/shortcode/Get + returnType: bool + signatures: [SHORTCODE.IsNamedParams] --- To support both positional and named arguments when calling a shortcode, use the `IsNamedParams` method to determine how the shortcode was called. With this shortcode template: -{{< code file=layouts/shortcodes/myshortcode.html >}} +{{< code file=layouts/shortcodes/myshortcode.html >}} {{ if .IsNamedParams }} {{ printf "%s %s." (.Get "greeting") (.Get "firstName") }} {{ else }} @@ -24,7 +25,7 @@ With this shortcode template: Both of these calls return the same value: -{{< code file=content/about.md lang=md >}} +{{< code file=content/about.md lang=text >}} {{}} {{}} {{< /code >}} diff --git a/content/en/methods/shortcode/Name.md b/content/en/methods/shortcode/Name.md index fcf92718f..7e55d2df6 100644 --- a/content/en/methods/shortcode/Name.md +++ b/content/en/methods/shortcode/Name.md @@ -3,17 +3,18 @@ title: Name description: Returns the shortcode file name, excluding the file extension. categories: [] keywords: [] -action: - related: - - methods/shortcode/Position - - functions/fmt/Errorf - returnType: string - signatures: [SHORTCODE.Name] +params: + functions_and_methods: + related: + - methods/shortcode/Position + - functions/fmt/Errorf + returnType: string + signatures: [SHORTCODE.Name] --- The `Name` method is useful for error reporting. For example, if your shortcode requires a "greeting" argument: -{{< code file=layouts/shortcodes/myshortcode.html >}} +{{< code file=layouts/shortcodes/myshortcode.html >}} {{ $greeting := "" }} {{ with .Get "greeting" }} {{ $greeting = . }} diff --git a/content/en/methods/shortcode/Ordinal.md b/content/en/methods/shortcode/Ordinal.md index 6e70d134a..fcbea1bab 100644 --- a/content/en/methods/shortcode/Ordinal.md +++ b/content/en/methods/shortcode/Ordinal.md @@ -3,21 +3,22 @@ title: Ordinal description: Returns the zero-based ordinal of the shortcode in relation to its parent. categories: [] keywords: [] -action: - related: [] - returnType: int - signatures: [SHORTCODE.Ordinal] +params: + functions_and_methods: + related: [] + returnType: int + signatures: [SHORTCODE.Ordinal] --- The `Ordinal` method returns the zero-based ordinal of the shortcode in relation to its parent. If the parent is the page itself, the ordinal represents the position of this shortcode in the page content. {{< note >}} -Hugo increments the ordinal with each shortcode call, regardless of the specific shortcode type. This means that the ordinal value is tracked sequentially across all shortcodes within a given page. +Hugo increments the ordinal with each shortcode call, regardless of the specific shortcode type. This means that the ordinal value is tracked sequentially across all shortcodes within a given page. {{< /note >}} This method is useful for, among other things, assigning unique element IDs when a shortcode is called two or more times from the same page. For example: -{{< code file=content/about.md lang=md >}} +{{< code file=content/about.md lang=text >}} {{}} {{}} @@ -25,7 +26,7 @@ This method is useful for, among other things, assigning unique element IDs when This shortcode performs error checking, then renders an HTML `img` element with a unique `id` attribute: -{{< code file=layouts/shortcodes/img.html >}} +{{< code file=layouts/shortcodes/img.html >}} {{ $src := "" }} {{ with .Get "src" }} {{ $src = . }} @@ -48,7 +49,7 @@ Hugo renders the page to: ``` {{< note >}} -In the shortcode template above, the [`with`] statement is used to create conditional blocks. Remember that the `with` statement binds context (the dot) to its expression. Inside of a `with` block, preface shortcode method calls with a `$` to access the top level context passed into the template. +In the shortcode template above, the [`with`] statement is used to create conditional blocks. Remember that the `with` statement binds context (the dot) to its expression. Inside of a `with` block, preface shortcode method calls with a `$` to access the top-level context passed into the template. [`with`]: /functions/go-template/with/ {{< /note >}} diff --git a/content/en/methods/shortcode/Page.md b/content/en/methods/shortcode/Page.md index 8bb58fa18..b5ca5d6cd 100644 --- a/content/en/methods/shortcode/Page.md +++ b/content/en/methods/shortcode/Page.md @@ -3,10 +3,11 @@ title: Page description: Returns the Page object from which the shortcode was called. categories: [] keywords: [] -action: - related: [] - returnType: hugolib.pageForShortcode - signatures: [SHORTCODE.Page] +params: + functions_and_methods: + related: [] + returnType: hugolib.pageForShortcode + signatures: [SHORTCODE.Page] --- With this content: @@ -26,7 +27,7 @@ Calling this shortcode: We can access the front matter values using the `Page` method: -{{< code file=layouts/shortcodes/book-details.html >}} +{{< code file=layouts/shortcodes/book-details.html >}}
      • Title: {{ .Page.Title }}
      • Author: {{ .Page.Params.author }}
      • diff --git a/content/en/methods/shortcode/Params.md b/content/en/methods/shortcode/Params.md index c0772e36a..5a79174d2 100644 --- a/content/en/methods/shortcode/Params.md +++ b/content/en/methods/shortcode/Params.md @@ -3,31 +3,32 @@ title: Params description: Returns a collection of the shortcode arguments. categories: [] keywords: [] -action: - related: - - methods/shortcode/Get - returnType: any - signatures: [SHORTCODE.Params] +params: + functions_and_methods: + related: + - methods/shortcode/Get + returnType: any + signatures: [SHORTCODE.Params] --- When you call a shortcode using positional arguments, the `Params` method returns a slice. -{{< code file=content/about.md lang=md >}} +{{< code file=content/about.md lang=text >}} {{}} {{< /code >}} -{{< code file=layouts/shortcodes/myshortcode.html >}} +{{< code file=layouts/shortcodes/myshortcode.html >}} {{ index .Params 0 }} → Hello {{ index .Params 1 }} → world {{< /code >}} When you call a shortcode using named arguments, the `Params` method returns a map. -{{< code file=content/about.md lang=md >}} +{{< code file=content/about.md lang=text >}} {{}} {{< /code >}} -{{< code file=layouts/shortcodes/myshortcode.html >}} +{{< code file=layouts/shortcodes/myshortcode.html >}} {{ .Params.greeting }} → Hello {{ .Params.name }} → world {{< /code >}} diff --git a/content/en/methods/shortcode/Parent.md b/content/en/methods/shortcode/Parent.md index 740b1ad7e..d18bc8139 100644 --- a/content/en/methods/shortcode/Parent.md +++ b/content/en/methods/shortcode/Parent.md @@ -1,31 +1,32 @@ --- title: Parent -description: Returns the parent shortcode context in nested shortcodes. +description: Returns the parent shortcode context in nested shortcodes. categories: [] keywords: [] -action: - related: [] - returnType: hugolib.ShortcodeWithPage - signatures: [SHORTCODE.Parent] +params: + functions_and_methods: + related: [] + returnType: hugolib.ShortcodeWithPage + signatures: [SHORTCODE.Parent] --- This is useful for inheritance of common shortcode arguments from the root. In this contrived example, the "greeting" shortcode is the parent, and the "now" shortcode is child. -{{< code file=content/welcome.md lang=md >}} +{{< code file=content/welcome.md lang=text >}} {{}} Welcome. Today is {{}}. {{}} {{< /code >}} -{{< code file=layouts/shortcodes/greeting.html >}} +{{< code file=layouts/shortcodes/greeting.html >}}
        {{ .Inner | strings.TrimSpace | .Page.RenderString }}
        {{< /code >}} -{{< code file=layouts/shortcodes/now.html >}} +{{< code file=layouts/shortcodes/now.html >}} {{- $dateFormat := "January 2, 2006 15:04:05" }} {{- with .Params }} diff --git a/content/en/methods/shortcode/Position.md b/content/en/methods/shortcode/Position.md index e3a60a456..8a2c62efd 100644 --- a/content/en/methods/shortcode/Position.md +++ b/content/en/methods/shortcode/Position.md @@ -1,19 +1,20 @@ --- title: Position -description: Returns the filename and position from which the shortcode was called. +description: Returns the file name and position from which the shortcode was called. categories: [] keywords: [] -action: - related: - - methods/shortcode/Name - - functions/fmt/Errorf - returnType: text.Position - signatures: [SHORTCODE.Position] +params: + functions_and_methods: + related: + - methods/shortcode/Name + - functions/fmt/Errorf + returnType: text.Position + signatures: [SHORTCODE.Position] --- The `Position` method is useful for error reporting. For example, if your shortcode requires a "greeting" argument: -{{< code file=layouts/shortcodes/myshortcode.html >}} +{{< code file=layouts/shortcodes/myshortcode.html >}} {{ $greeting := "" }} {{ with .Get "greeting" }} {{ $greeting = . }} diff --git a/content/en/methods/shortcode/Ref.md b/content/en/methods/shortcode/Ref.md index 305e1e7d8..84c5678cf 100644 --- a/content/en/methods/shortcode/Ref.md +++ b/content/en/methods/shortcode/Ref.md @@ -3,27 +3,28 @@ title: Ref description: Returns the absolute URL of the page with the given path, language, and output format. categories: [] keywords: [] -action: - related: - - methods/shortcode/RelRef - - functions/urls/RelRef - - functions/urls/Ref - returnType: string - signatures: [SHORTCODE.Ref OPTIONS] +params: + functions_and_methods: + related: + - methods/shortcode/RelRef + - functions/urls/RelRef + - functions/urls/Ref + returnType: string + signatures: [SHORTCODE.Ref OPTIONS] --- -The map of option contains: -path -: (`string`) The path to the page, relative to the `content` directory. Required. +## Usage -lang -: (`string`) The language (site) to search for the page. Default is the current language. Optional. +The `Ref` method accepts a single argument: an options map. -outputFormat -: (`string`) The output format to search for the page. Default is the current output format. Optional. +## Options -The examples below show the rendered output when visiting a page on the English language version of the site: +{{% include "_common/ref-and-relref-options.md" %}} + +## Examples + +The following examples show the rendered output for a page on the English version of the site: ```go-html-template {{ $opts := dict "path" "/books/book-1" }} @@ -36,9 +37,6 @@ The examples below show the rendered output when visiting a page on the English {{ .Ref $opts }} → https://example.org/de/books/book-1/index.json ``` -By default, Hugo will throw an error and fail the build if it cannot resolve the path. You can change this to a warning in your site configuration, and specify a URL to return when the path cannot be resolved. +## Error handling -{{< code-toggle file=hugo >}} -refLinksErrorLevel = 'warning' -refLinksNotFoundURL = '/some/other/url' -{{< /code-toggle >}} +{{% include "_common/ref-and-relref-error-handling.md" %}} diff --git a/content/en/methods/shortcode/RelRef.md b/content/en/methods/shortcode/RelRef.md index 4e367312b..3186d53d4 100644 --- a/content/en/methods/shortcode/RelRef.md +++ b/content/en/methods/shortcode/RelRef.md @@ -3,27 +3,27 @@ title: RelRef description: Returns the relative URL of the page with the given path, language, and output format. categories: [] keywords: [] -action: - related: - - methods/shortcode/Ref - - functions/urls/Ref - - functions/urls/RelRef - returnType: string - signatures: [SHORTCODE.RelRef OPTIONS] +params: + functions_and_methods: + related: + - methods/shortcode/Ref + - functions/urls/Ref + - functions/urls/RelRef + returnType: string + signatures: [SHORTCODE.RelRef OPTIONS] --- -The map of option contains: +## Usage -path -: (`string`) The path to the page, relative to the `content` directory. Required. +The `RelRef` method accepts a single argument: an options map. -lang -: (`string`) The language (site) to search for the page. Default is the current language. Optional. +## Options -outputFormat -: (`string`) The output format to search for the page. Default is the current output format. Optional. +{{% include "_common/ref-and-relref-options.md" %}} -The examples below show the rendered output when visiting a page on the English language version of the site: +## Examples + +The following examples show the rendered output for a page on the English version of the site: ```go-html-template {{ $opts := dict "path" "/books/book-1" }} @@ -36,9 +36,6 @@ The examples below show the rendered output when visiting a page on the English {{ .RelRef $opts }} → /de/books/book-1/index.json ``` -By default, Hugo will throw an error and fail the build if it cannot resolve the path. You can change this to a warning in your site configuration, and specify a URL to return when the path cannot be resolved. +## Error handling -{{< code-toggle file=hugo >}} -refLinksErrorLevel = 'warning' -refLinksNotFoundURL = '/some/other/url' -{{< /code-toggle >}} +{{% include "_common/ref-and-relref-error-handling.md" %}} diff --git a/content/en/methods/shortcode/Scratch.md b/content/en/methods/shortcode/Scratch.md index c8be53724..49598397b 100644 --- a/content/en/methods/shortcode/Scratch.md +++ b/content/en/methods/shortcode/Scratch.md @@ -3,10 +3,11 @@ title: Scratch description: Returns a "scratch pad" to store and manipulate data, scoped to the current shortcode. categories: [] keywords: [] -action: - related: [] - returnType: maps.Scratch - signatures: [SHORTCODE.Scratch] +params: + functions_and_methods: + related: [] + returnType: maps.Scratch + signatures: [SHORTCODE.Scratch] expiryDate: 2026-11-18 # deprecated 2024-11-18 (soft) --- diff --git a/content/en/methods/shortcode/Site.md b/content/en/methods/shortcode/Site.md index af2a755ee..0e9af8d4e 100644 --- a/content/en/methods/shortcode/Site.md +++ b/content/en/methods/shortcode/Site.md @@ -3,11 +3,12 @@ title: Site description: Returns the Site object. categories: [] keywords: [] -action: - related: - - methods/page/Sites - returnType: page.siteWrapper - signatures: [SHORTCODE.Site] +params: + functions_and_methods: + related: + - methods/page/Sites + returnType: page.siteWrapper + signatures: [SHORTCODE.Site] --- See [Site methods]. diff --git a/content/en/methods/shortcode/Store.md b/content/en/methods/shortcode/Store.md index 1517e1f7d..ed4af3456 100644 --- a/content/en/methods/shortcode/Store.md +++ b/content/en/methods/shortcode/Store.md @@ -3,15 +3,15 @@ title: Store description: Returns a "scratch pad" to store and manipulate data, scoped to the current shortcode. categories: [] keywords: [] -action: - related: - - methods/page/Store - - methods/site/Store - - functions/hugo/Store - - functions/collections/NewScratch - returnType: maps.Scratch - signatures: [SHORTCODE.Store] -toc: true +params: + functions_and_methods: + related: + - methods/page/Store + - methods/site/Store + - functions/hugo/Store + - functions/collections/NewScratch + returnType: maps.Scratch + signatures: [SHORTCODE.Store] --- {{< new-in 0.139.0 />}} @@ -21,7 +21,7 @@ Use the `Store` method to create a [scratch pad](g) to store and manipulate data {{< 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. -[assign values to template variables]: https://go.dev/doc/go1.11#text/template +[assign values to template variables]: https://go.dev/doc/go1.11#texttemplatepkgtexttemplate [`newScratch`]: /functions/collections/newScratch/ {{< /note >}} diff --git a/content/en/methods/shortcode/_index.md b/content/en/methods/shortcode/_index.md index 1c99adba7..0064f42aa 100644 --- a/content/en/methods/shortcode/_index.md +++ b/content/en/methods/shortcode/_index.md @@ -4,10 +4,5 @@ linkTitle: Shortcode description: Use these methods in your shortcode templates. categories: [] keywords: [] -menu: - docs: - parent: methods aliases: [/variables/shortcodes] --- - -Use these methods in your shortcode templates. diff --git a/content/en/methods/site/AllPages.md b/content/en/methods/site/AllPages.md index 7c6c21b57..5c5240ebe 100644 --- a/content/en/methods/site/AllPages.md +++ b/content/en/methods/site/AllPages.md @@ -3,16 +3,17 @@ title: AllPages description: Returns a collection of all pages in all languages. categories: [] keywords: [] -action: - related: - - methods/site/Pages - - methods/site/RegularPages - - methods/site/Sections - returnType: page.Pages - signatures: [SITE.AllPages] +params: + functions_and_methods: + related: + - methods/site/Pages + - methods/site/RegularPages + - methods/site/Sections + returnType: page.Pages + signatures: [SITE.AllPages] --- -This method returns all page [kinds](g) 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, in the [default sort order](g). That includes the home page, section pages, taxonomy pages, term pages, and regular pages. In most cases you should use the [`RegularPages`] method instead. diff --git a/content/en/methods/site/BaseURL.md b/content/en/methods/site/BaseURL.md index 239b19a38..476515823 100644 --- a/content/en/methods/site/BaseURL.md +++ b/content/en/methods/site/BaseURL.md @@ -3,14 +3,15 @@ title: BaseURL description: Returns the base URL as defined in the site configuration. categories: [] keywords: [] -action: - related: - - functions/urls/AbsURL - - functions/urls/AbsLangURL - - functions/urls/RelURL - - functions/urls/RelLangURL - returnType: string - signatures: [SITE.BaseURL] +params: + functions_and_methods: + related: + - functions/urls/AbsURL + - functions/urls/AbsLangURL + - functions/urls/RelURL + - functions/urls/RelLangURL + returnType: string + signatures: [SITE.BaseURL] --- Site configuration: diff --git a/content/en/methods/site/BuildDrafts.md b/content/en/methods/site/BuildDrafts.md index 0d85c78fd..0cd1f92d0 100644 --- a/content/en/methods/site/BuildDrafts.md +++ b/content/en/methods/site/BuildDrafts.md @@ -3,10 +3,11 @@ title: BuildDrafts description: Reports whether the current build includes draft pages. categories: [] keywords: [] -action: - related: [] - returnType: bool - signatures: [SITE.BuildDrafts] +params: + functions_and_methods: + related: [] + returnType: bool + signatures: [SITE.BuildDrafts] --- By default, draft pages are not published when building a site. You can change this behavior with a command line flag: diff --git a/content/en/methods/site/Config.md b/content/en/methods/site/Config.md index 0ff4cddec..03b0125c7 100644 --- a/content/en/methods/site/Config.md +++ b/content/en/methods/site/Config.md @@ -3,20 +3,18 @@ title: Config description: Returns a subset of the site configuration. categories: [] keywords: [] -action: - related: [] - returnType: page.SiteConfig - signatures: [SITE.Config] -toc: true +params: + functions_and_methods: + related: [] + returnType: page.SiteConfig + signatures: [SITE.Config] --- The `Config` method on a `Site` object provides access to a subset of the site configuration, specifically the `services` and `privacy` keys. ## Services -These are the default service settings, typically used by Hugo's built-in templates and shortcodes. - -{{< code-toggle config=services />}} +See [configure services](/configuration/services). For example, to use Hugo's built-in Google Analytics template you must add a [Google tag ID]: @@ -37,9 +35,7 @@ You must capitalize each identifier as shown above. ## Privacy -These are the default privacy settings, typically used by Hugo's built-in templates and shortcodes: - -{{< code-toggle config=privacy />}} +See [configure privacy](/configuration/privacy). For example, to disable usage of the built-in YouTube shortcode: diff --git a/content/en/methods/site/Copyright.md b/content/en/methods/site/Copyright.md index e2ae7d2a5..5e8923b6d 100644 --- a/content/en/methods/site/Copyright.md +++ b/content/en/methods/site/Copyright.md @@ -1,12 +1,13 @@ --- title: Copyright -description: Returns the copyright notice as defined in the site configuration. +description: Returns the copyright notice as defined in the site configuration. categories: [] keywords: [] -action: - related: [] - returnType: string - signatures: [SITE.Copyright] +params: + functions_and_methods: + related: [] + returnType: string + signatures: [SITE.Copyright] --- Site configuration: diff --git a/content/en/methods/site/Data.md b/content/en/methods/site/Data.md index 16130fb79..a181fc9e6 100644 --- a/content/en/methods/site/Data.md +++ b/content/en/methods/site/Data.md @@ -3,19 +3,20 @@ title: Data description: Returns a data structure composed from the files in the data directory. categories: [] keywords: [] -action: - related: - - functions/collections/IndexFunction - - functions/transform/Unmarshal - - functions/collections/Where - - functions/collections/Sort - returnType: map - signatures: [SITE.Data] +params: + functions_and_methods: + related: + - functions/collections/IndexFunction + - functions/transform/Unmarshal + - functions/collections/Where + - functions/collections/Sort + returnType: map + signatures: [SITE.Data] --- Use the `Data` method on a `Site` object to access data within the `data` directory, or within any directory [mounted] to the `data` directory. Supported data formats include JSON, TOML, YAML, and XML. -[mounted]: /hugo-modules/configuration/#module-configuration-mounts +[mounted]: /configuration/module/#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. diff --git a/content/en/methods/site/DisqusShortname.md b/content/en/methods/site/DisqusShortname.md index fac1b4f0b..d2b311519 100644 --- a/content/en/methods/site/DisqusShortname.md +++ b/content/en/methods/site/DisqusShortname.md @@ -3,10 +3,11 @@ title: DisqusShortname description: Returns the Disqus shortname as defined in the site configuration. categories: [] keywords: [] -action: - related: [] - returnType: string - signatures: [SITE.DisqusShortname] +params: + functions_and_methods: + related: [] + returnType: string + signatures: [SITE.DisqusShortname] expiryDate: 2025-10-30 # deprecated 2023-10-30 in v0.120.0 --- diff --git a/content/en/methods/site/GetPage.md b/content/en/methods/site/GetPage.md index a439a578b..6b27f3dbd 100644 --- a/content/en/methods/site/GetPage.md +++ b/content/en/methods/site/GetPage.md @@ -3,12 +3,12 @@ title: GetPage description: Returns a Page object from the given path. categories: [] keywords: [] -action: - related: - - methods/page/GetPage - returnType: page.Page - signatures: [SITE.GetPage PATH] -toc: true +params: + functions_and_methods: + related: + - methods/page/GetPage + returnType: page.Page + signatures: [SITE.GetPage PATH] --- The `GetPage` method is also available on `Page` objects, allowing you to specify a path relative to the current page. See [details]. diff --git a/content/en/methods/site/GoogleAnalytics.md b/content/en/methods/site/GoogleAnalytics.md index b0633fab9..0e3ca2aa7 100644 --- a/content/en/methods/site/GoogleAnalytics.md +++ b/content/en/methods/site/GoogleAnalytics.md @@ -3,10 +3,11 @@ title: GoogleAnalytics description: Returns the Google Analytics tracking ID as defined in the site configuration. categories: [] keywords: [] -action: - related: [] - returnType: string - signatures: [SITE.GoogleAnalytics] +params: + functions_and_methods: + related: [] + returnType: string + signatures: [SITE.GoogleAnalytics] expiryDate: 2025-10-30 # deprecated 2023-10-30 in v0.120.0 --- diff --git a/content/en/methods/site/Home.md b/content/en/methods/site/Home.md index a25491a8e..456dee0b8 100644 --- a/content/en/methods/site/Home.md +++ b/content/en/methods/site/Home.md @@ -3,10 +3,11 @@ title: Home description: Returns the home Page object for the given site. categories: [] keywords: [] -action: - related: [] - returnType: page.Page - signatures: [SITE.Home] +params: + functions_and_methods: + related: [] + returnType: page.Page + signatures: [SITE.Home] --- This method is useful for obtaining a link to the home page. diff --git a/content/en/methods/site/IsDevelopment.md b/content/en/methods/site/IsDevelopment.md index 4ca4069a7..4d2d51961 100644 --- a/content/en/methods/site/IsDevelopment.md +++ b/content/en/methods/site/IsDevelopment.md @@ -3,10 +3,11 @@ title: IsDevelopment description: Reports whether the current running environment is “development”. categories: [] keywords: [] -action: - related: [] - returnType: bool - signatures: [SITE.IsDevelopment] +params: + functions_and_methods: + related: [] + returnType: bool + signatures: [SITE.IsDevelopment] expiryDate: 2025-10-30 # deprecated 2023-10-30 in v0.120.0 --- diff --git a/content/en/methods/site/IsMultiLingual.md b/content/en/methods/site/IsMultiLingual.md index d7b642f8c..185f3f93f 100644 --- a/content/en/methods/site/IsMultiLingual.md +++ b/content/en/methods/site/IsMultiLingual.md @@ -3,10 +3,11 @@ title: IsMultiLingual description: Reports whether there are two or more configured languages. categories: [] keywords: [] -action: - related: [] - returnType: bool - signatures: [SITE.IsMultiLingual] +params: + functions_and_methods: + related: [] + returnType: bool + signatures: [SITE.IsMultiLingual] expiryDate: 2026-03-16 # deprecated 2024-03-16 in 0.124.0 --- diff --git a/content/en/methods/site/IsServer.md b/content/en/methods/site/IsServer.md index 6d8817847..d8766432e 100644 --- a/content/en/methods/site/IsServer.md +++ b/content/en/methods/site/IsServer.md @@ -3,10 +3,11 @@ title: IsServer description: Reports whether the built-in development server is running. categories: [] keywords: [] -action: - related: [] - returnType: bool - signatures: [SITE.IsServer] +params: + functions_and_methods: + related: [] + returnType: bool + signatures: [SITE.IsServer] expiryDate: 2025-10-30 # deprecated 2023-10-30 in v0.120.0 --- diff --git a/content/en/methods/site/Language.md b/content/en/methods/site/Language.md index 2400c225a..3ce728318 100644 --- a/content/en/methods/site/Language.md +++ b/content/en/methods/site/Language.md @@ -1,14 +1,14 @@ --- title: Language -description: Returns the language object for the given site. +description: Returns the language object for the given site. categories: [] keywords: [] -action: - related: - - methods/page/language - returnType: langs.Language - signatures: [SITE.Language] -toc: true +params: + functions_and_methods: + related: + - methods/page/language + returnType: langs.Language + signatures: [SITE.Language] --- The `Language` method on a `Site` object returns the language object for the given site. The language object points to the language definition in the site configuration. @@ -27,7 +27,7 @@ languageName = 'Deutsch' weight = 1 {{< /code-toggle >}} -###### Lang +### Lang (`string`) The language tag as defined by [RFC 5646]. @@ -35,7 +35,7 @@ weight = 1 {{ .Site.Language.Lang }} → de ``` -###### LanguageCode +### LanguageCode (`string`) The language code from the site configuration. Falls back to `Lang` if not defined. @@ -43,7 +43,7 @@ weight = 1 {{ .Site.Language.LanguageCode }} → de-DE ``` -###### LanguageDirection +### LanguageDirection (`string`) The language direction from the site configuration, either `ltr` or `rtl`. @@ -51,7 +51,7 @@ weight = 1 {{ .Site.Language.LanguageDirection }} → ltr ``` -###### LanguageName +### LanguageName (`string`) The language name from the site configuration. @@ -59,7 +59,7 @@ weight = 1 {{ .Site.Language.LanguageName }} → Deutsch ``` -###### Weight +### Weight (`int`) The language weight from the site configuration which determines its order in the slice of languages returned by the `Languages` method on a `Site` object. diff --git a/content/en/methods/site/LanguagePrefix.md b/content/en/methods/site/LanguagePrefix.md index 88808eda0..33b75df76 100644 --- a/content/en/methods/site/LanguagePrefix.md +++ b/content/en/methods/site/LanguagePrefix.md @@ -3,12 +3,13 @@ title: LanguagePrefix description: Returns the URL language prefix, if any, for the given site. categories: [] keywords: [] -action: - related: - - functions/urls/AbsLangURL - - functions/urls/RelLangURL - returnType: string - signatures: [SITE.LanguagePrefix] +params: + functions_and_methods: + related: + - functions/urls/AbsLangURL + - functions/urls/RelLangURL + returnType: string + signatures: [SITE.LanguagePrefix] --- Consider this site configuration: diff --git a/content/en/methods/site/Languages.md b/content/en/methods/site/Languages.md index cfa1ade6b..3b0f71e81 100644 --- a/content/en/methods/site/Languages.md +++ b/content/en/methods/site/Languages.md @@ -3,11 +3,12 @@ title: Languages description: Returns a collection of language objects for all sites, ordered by language weight. categories: [] keywords: [] -action: - related: - - methods/site/Language - returnType: langs.Languages - signatures: [SITE.Languages] +params: + functions_and_methods: + related: + - methods/site/Language + returnType: langs.Languages + signatures: [SITE.Languages] --- The `Languages` method on a `Site` object returns a collection of language objects for all sites, ordered by language weight. Each language object points to its language definition in the site configuration. diff --git a/content/en/methods/site/LastChange.md b/content/en/methods/site/LastChange.md index 0110cf855..962223a09 100644 --- a/content/en/methods/site/LastChange.md +++ b/content/en/methods/site/LastChange.md @@ -3,10 +3,11 @@ title: LastChange description: Returns the last modification date of site content. categories: [] keywords: [] -action: - related: [] - returnType: time.Time - signatures: [SITE.LastChange] +params: + functions_and_methods: + related: [] + returnType: time.Time + signatures: [SITE.LastChange] expiryDate: 2026-02-19 # deprecated 2024-02-19 in v0.123.0 --- diff --git a/content/en/methods/site/Lastmod.md b/content/en/methods/site/Lastmod.md index f1663db49..7aa828abd 100644 --- a/content/en/methods/site/Lastmod.md +++ b/content/en/methods/site/Lastmod.md @@ -3,10 +3,11 @@ title: Lastmod description: Returns the last modification date of site content. categories: [] keywords: [] -action: - related: [] - returnType: time.Time - signatures: [SITE.Lastmod] +params: + functions_and_methods: + related: [] + returnType: time.Time + signatures: [SITE.Lastmod] --- {{< new-in 0.123.0 />}} diff --git a/content/en/methods/site/MainSections.md b/content/en/methods/site/MainSections.md index aa6e84bda..a415e4ded 100644 --- a/content/en/methods/site/MainSections.md +++ b/content/en/methods/site/MainSections.md @@ -1,18 +1,18 @@ --- title: MainSections -description: Returns a slice of the main section names as defined in the site configuration, falling back to the top level section with the most pages. +description: Returns a slice of the main section names as defined in the site configuration, falling back to the top-level section with the most pages. categories: [] keywords: [] -action: - related: [] - returnType: '[]string' - signatures: [SITE.MainSections] +params: + functions_and_methods: + related: [] + returnType: '[]string' + signatures: [SITE.MainSections] --- Site configuration: {{< code-toggle file=hugo >}} -[params] mainSections = ['books','films'] {{< /code-toggle >}} @@ -22,7 +22,7 @@ Template: {{ .Site.MainSections }} → [books films] ``` -If `params.mainSections` is not defined in the site configuration, this method returns a slice with one element---the top level section with the most pages. +If `mainSections` is not defined in the site configuration, this method returns a slice with one element---the top-level section with the most pages. With this content structure, the "films" section has the most pages: @@ -44,7 +44,7 @@ Template: {{ .Site.MainSections }} → [films] ``` -When creating a theme, instead of hardcoding section names when listing the most relevant pages on the front page, instruct site authors to set `params.mainSections` in their site configuration. +When creating a theme, instead of hardcoding section names when listing the most relevant pages on the front page, instruct site authors to set `mainSections` in their site configuration. Then your home template can do something like this: diff --git a/content/en/methods/site/Menus.md b/content/en/methods/site/Menus.md index 896d552e3..7e43ca588 100644 --- a/content/en/methods/site/Menus.md +++ b/content/en/methods/site/Menus.md @@ -3,12 +3,13 @@ title: Menus description: Returns a collection of menu objects for the given site. categories: [] keywords: [] -action: - related: - - methods/page/IsMenuCurrent - - methods/page/HasMenuCurrent - returnType: navigation.Menus - signatures: [SITE.Menus] +params: + functions_and_methods: + related: + - methods/page/IsMenuCurrent + - methods/page/HasMenuCurrent + returnType: navigation.Menus + signatures: [SITE.Menus] --- The `Menus` method on a `Site` object returns a collection of menus, where each menu contains one or more entries, either flat or nested. Each entry points to a page within the site, or to an external resource. diff --git a/content/en/methods/site/Pages.md b/content/en/methods/site/Pages.md index bb684a96d..1ced7834d 100644 --- a/content/en/methods/site/Pages.md +++ b/content/en/methods/site/Pages.md @@ -3,16 +3,19 @@ title: Pages description: Returns a collection of all pages. categories: [] keywords: [] -action: - related: - - methods/site/AllPages - - methods/site/RegularPages - - methods/site/Sections - returnType: page.Pages - signatures: [SITE.Pages] +params: + functions_and_methods: + related: + - methods/site/AllPages + - methods/site/RegularPages + - methods/site/Sections + returnType: page.Pages + signatures: [SITE.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. +This method returns all page [kinds](g) in the current language, in the [default sort order](g). That includes the home page, section pages, taxonomy pages, term pages, and regular pages. + + In most cases you should use the [`RegularPages`] method instead. diff --git a/content/en/methods/site/Param.md b/content/en/methods/site/Param.md index 0c2f621c8..ffc663ff7 100644 --- a/content/en/methods/site/Param.md +++ b/content/en/methods/site/Param.md @@ -3,10 +3,11 @@ title: Param description: Returns the site parameter with the given key. categories: [] keywords: [] -action: - related: [] - returnType: any - signatures: [SITE.Param KEY] +params: + functions_and_methods: + related: [] + returnType: any + signatures: [SITE.Param KEY] --- The `Param` method on a `Site` object is a convenience method to return the value of a user-defined parameter in the site configuration. diff --git a/content/en/methods/site/Params.md b/content/en/methods/site/Params.md index 418118ee3..40b344d43 100644 --- a/content/en/methods/site/Params.md +++ b/content/en/methods/site/Params.md @@ -3,13 +3,14 @@ title: Params description: Returns a map of custom parameters as defined in the site configuration. categories: [] keywords: [] -action: - related: - - functions/collections/indexFunction - - methods/page/Params - - methods/page/Param - returnType: maps.Params - signatures: [SITE.Params] +params: + functions_and_methods: + related: + - functions/collections/indexFunction + - methods/page/Params + - methods/page/Param + returnType: maps.Params + signatures: [SITE.Params] --- With this site configuration: diff --git a/content/en/methods/site/RegularPages.md b/content/en/methods/site/RegularPages.md index 65bafef6c..b13cb82dd 100644 --- a/content/en/methods/site/RegularPages.md +++ b/content/en/methods/site/RegularPages.md @@ -3,16 +3,17 @@ title: RegularPages description: Returns a collection of all regular pages. categories: [] keywords: [] -action: - related: - - methods/site/AllPages - - methods/site/RegularPages - - methods/site/Sections - returnType: page.Pages - signatures: [SITE.RegularPages] +params: + functions_and_methods: + related: + - methods/site/AllPages + - methods/site/RegularPages + - methods/site/Sections + returnType: page.Pages + signatures: [SITE.RegularPages] --- -The `RegularPages` method on a `Site` object returns a collection of all [regular pages](g). +The `RegularPages` method on a `Site` object returns a collection of all [regular pages](g), in the [default sort order](g). ```go-html-template {{ range .Site.RegularPages }} @@ -20,14 +21,9 @@ The `RegularPages` method on a `Site` object returns a collection of all [regula {{ end }} ``` -By default, Hugo sorts page collections by: +{{% glossary-term "default sort order" %}} -1. The page `weight` as defined in front matter -1. The page `date` as defined in front matter -1. The page `linkTitle` as defined in front matter -1. The file path - -If the `linkTitle` is not defined, Hugo evaluates the `title` instead. +[default sort order](g) To change the sort order, use any of the `Pages` [sorting methods]. For example: diff --git a/content/en/methods/site/Sections.md b/content/en/methods/site/Sections.md index a397c5926..751e71044 100644 --- a/content/en/methods/site/Sections.md +++ b/content/en/methods/site/Sections.md @@ -1,17 +1,20 @@ --- title: Sections -description: Returns a collection of first level section pages. +description: Returns a collection of top-level section pages. categories: [] keywords: [] -action: - related: - - methods/site/AllPages - - methods/site/Pages - - methods/site/RegularPages - returnType: page.Pages - signatures: [SITE.Sections] +params: + functions_and_methods: + related: + - methods/site/AllPages + - methods/site/Pages + - methods/site/RegularPages + returnType: page.Pages + signatures: [SITE.Sections] --- +The `Sections` method on a `Site` object returns a collection of top-level [section pages](g), in the [default sort order](g). + Given this content structure: ```text diff --git a/content/en/methods/site/Sites.md b/content/en/methods/site/Sites.md index ac287d3b4..096805f47 100644 --- a/content/en/methods/site/Sites.md +++ b/content/en/methods/site/Sites.md @@ -3,10 +3,11 @@ title: Sites description: Returns a collection of all Site objects, one for each language, ordered by default content language then by language weight. categories: [] keywords: [] -action: - related: [] - returnType: page.Sites - signatures: [SITE.Sites] +params: + functions_and_methods: + related: [] + returnType: page.Sites + signatures: [SITE.Sites] --- With this site configuration: diff --git a/content/en/methods/site/Store.md b/content/en/methods/site/Store.md index dcc3a0bed..02e3b27d9 100644 --- a/content/en/methods/site/Store.md +++ b/content/en/methods/site/Store.md @@ -3,14 +3,14 @@ title: Store description: Returns a "scratch pad" to store and manipulate data, scoped to the current site. categories: [] keywords: [] -action: - related: - - methods/page/store - - functions/hugo/store - - functions/collections/NewScratch - returnType: maps.Scratch - signatures: [site.Store] -toc: true +params: + functions_and_methods: + related: + - methods/page/store + - functions/hugo/store + - functions/collections/NewScratch + returnType: maps.Scratch + signatures: [site.Store] --- {{< new-in 0.139.0 />}} @@ -19,7 +19,7 @@ Use the `Store` method on a `Site` object to create a [scratch pad](g) to store ## Methods -###### Set +### Set Sets the value of a given key. @@ -27,7 +27,7 @@ Sets the value of a given key. {{ site.Store.Set "greeting" "Hello" }} ``` -###### Get +### Get Gets the value of a given key. @@ -36,7 +36,7 @@ Gets the value of a given key. {{ site.Store.Get "greeting" }} → Hello ``` -###### Add +### Add Adds a given value to existing value(s) of the given key. @@ -58,9 +58,9 @@ For single values, `Add` accepts values that support Go's `+` operator. If the f {{ site.Store.Set "greetings" (slice "Hello") }} {{ site.Store.Add "greetings" (slice "Welcome" "Cheers") }} {{ site.Store.Get "greetings" }} → [Hello Welcome Cheers] -``` + ``` -###### SetInMap +### SetInMap Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`. @@ -70,7 +70,7 @@ Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to th {{ site.Store.Get "greetings" }} → map[english:Hello french:Bonjour] ``` -###### DeleteInMap +### DeleteInMap Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`. @@ -81,7 +81,7 @@ Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`. {{ site.Store.Get "greetings" }} → map[french:Bonjour] ``` -###### GetSortedMapValues +### GetSortedMapValues Returns an array of values from `key` sorted by `mapKey`. @@ -91,7 +91,7 @@ Returns an array of values from `key` sorted by `mapKey`. {{ site.Store.GetSortedMapValues "greetings" }} → [Hello Bonjour] ``` -###### Delete +### Delete Removes the given key. diff --git a/content/en/methods/site/Taxonomies.md b/content/en/methods/site/Taxonomies.md index cad665d0d..5b69efff3 100644 --- a/content/en/methods/site/Taxonomies.md +++ b/content/en/methods/site/Taxonomies.md @@ -3,15 +3,16 @@ title: Taxonomies description: Returns a data structure containing the site's Taxonomy objects, the terms within each Taxonomy object, and the pages to which the terms are assigned. categories: [] keywords: [] -action: - related: [] - returnType: page.TaxonomyList - signatures: [SITE.Taxonomies] +params: + functions_and_methods: + related: [] + returnType: page.TaxonomyList + signatures: [SITE.Taxonomies] --- Conceptually, the `Taxonomies` method on a `Site` object returns a data structure such as: -{{< code-toggle >}} +{{< code-toggle file=hugo >}} taxonomy a: - term 1: - page 1 @@ -50,7 +51,7 @@ content/ Conceptually, the taxonomies data structure looks like: -{{< code-toggle >}} +{{< code-toggle file=hugo >}} genres: - suspense: - And Then There Were None diff --git a/content/en/methods/site/Title.md b/content/en/methods/site/Title.md index a357286c1..e157f62ea 100644 --- a/content/en/methods/site/Title.md +++ b/content/en/methods/site/Title.md @@ -3,10 +3,11 @@ title: Title description: Returns the title as defined in the site configuration. categories: [] keywords: [] -action: - related: [] - returnType: string - signatures: [SITE.Title] +params: + functions_and_methods: + related: [] + returnType: string + signatures: [SITE.Title] --- Site configuration: diff --git a/content/en/methods/site/_index.md b/content/en/methods/site/_index.md index bf322ee07..f395a3693 100644 --- a/content/en/methods/site/_index.md +++ b/content/en/methods/site/_index.md @@ -4,10 +4,5 @@ linkTitle: Site description: Use these methods with Site objects. categories: [] keywords: [] -menu: - docs: - parent: methods aliases: [/variables/site/] --- - -Use these methods with Site objects. A multilingual project will have two or more sites, one for each language. diff --git a/content/en/methods/taxonomy/Alphabetical.md b/content/en/methods/taxonomy/Alphabetical.md index 72cd1c355..35fafac43 100644 --- a/content/en/methods/taxonomy/Alphabetical.md +++ b/content/en/methods/taxonomy/Alphabetical.md @@ -3,23 +3,23 @@ title: Alphabetical description: Returns an ordered taxonomy, sorted alphabetically by term. categories: [] keywords: [] -action: - related: - - methods/taxonomy/ByCount - returnType: page.OrderedTaxonomy - signatures: [TAXONOMY.Alphabetical] -toc: true +params: + functions_and_methods: + related: + - methods/taxonomy/ByCount + returnType: page.OrderedTaxonomy + signatures: [TAXONOMY.Alphabetical] --- The `Alphabetical` method on a `Taxonomy` object returns an [ordered taxonomy](g), sorted alphabetically by [term](g). 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" %}} +{{% include "/_common/methods/taxonomy/get-a-taxonomy-object.md" %}} ## Get the ordered taxonomy -Now that we have captured the “genres” Taxonomy object, let’s get the ordered taxonomy sorted alphabetically by term: +Now that we have captured the “genres” Taxonomy object, let's get the ordered taxonomy sorted alphabetically by term: ```go-html-template {{ $taxonomyObject.Alphabetical }} @@ -37,7 +37,7 @@ To inspect the data structure:
        {{ debug.Dump $taxonomyObject.Alphabetical }}
        ``` -{{% include "methods/taxonomy/_common/ordered-taxonomy-element-methods.md" %}} +{{% include "/_common/methods/taxonomy/ordered-taxonomy-element-methods.md" %}} ## Example diff --git a/content/en/methods/taxonomy/ByCount.md b/content/en/methods/taxonomy/ByCount.md index 930f8953b..7f576953c 100644 --- a/content/en/methods/taxonomy/ByCount.md +++ b/content/en/methods/taxonomy/ByCount.md @@ -3,23 +3,23 @@ title: ByCount description: Returns an ordered taxonomy, sorted by the number of pages associated with each term. categories: [] keywords: [] -action: - related: - - methods/taxonomy/Alphabetical - returnType: page.OrderedTaxonomy - signatures: [TAXONOMY.ByCount] -toc: true +params: + functions_and_methods: + related: + - methods/taxonomy/Alphabetical + returnType: page.OrderedTaxonomy + signatures: [TAXONOMY.ByCount] --- 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](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" %}} +{{% include "/_common/methods/taxonomy/get-a-taxonomy-object.md" %}} ## Get the ordered taxonomy -Now that we have captured the “genres” Taxonomy object, let’s get the ordered taxonomy sorted by the number of pages associated with each term: +Now that we have captured the “genres” Taxonomy object, let's get the ordered taxonomy sorted by the number of pages associated with each term: ```go-html-template {{ $taxonomyObject.ByCount }} @@ -37,7 +37,7 @@ To inspect the data structure:
        {{ debug.Dump $taxonomyObject.ByCount }}
        ``` -{{% include "methods/taxonomy/_common/ordered-taxonomy-element-methods.md" %}} +{{% include "/_common/methods/taxonomy/ordered-taxonomy-element-methods.md" %}} ## Example diff --git a/content/en/methods/taxonomy/Count.md b/content/en/methods/taxonomy/Count.md index 4b756f254..78de79779 100644 --- a/content/en/methods/taxonomy/Count.md +++ b/content/en/methods/taxonomy/Count.md @@ -3,16 +3,16 @@ title: Count description: Returns the number of number of weighted pages to which the given term has been assigned. categories: [] keywords: [] -action: - related: [] - returnType: int - signatures: [TAXONOMY.Count TERM] -toc: true +params: + functions_and_methods: + related: [] + returnType: int + signatures: [TAXONOMY.Count TERM] --- 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" %}} +{{% include "/_common/methods/taxonomy/get-a-taxonomy-object.md" %}} ## Count the weighted pages diff --git a/content/en/methods/taxonomy/Get.md b/content/en/methods/taxonomy/Get.md index 107912493..41c2d6645 100644 --- a/content/en/methods/taxonomy/Get.md +++ b/content/en/methods/taxonomy/Get.md @@ -3,16 +3,16 @@ title: Get description: Returns a slice of weighted pages to which the given term has been assigned. categories: [] keywords: [] -action: - related: [] - returnType: page.WeightedPages - signatures: [TAXONOMY.Get TERM] -toc: true +params: + functions_and_methods: + related: [] + returnType: page.WeightedPages + signatures: [TAXONOMY.Get TERM] --- 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" %}} +{{% include "/_common/methods/taxonomy/get-a-taxonomy-object.md" %}} ## Get the weighted pages diff --git a/content/en/methods/taxonomy/Page.md b/content/en/methods/taxonomy/Page.md index 039719b93..9fcc4853c 100644 --- a/content/en/methods/taxonomy/Page.md +++ b/content/en/methods/taxonomy/Page.md @@ -3,10 +3,11 @@ title: Page description: Returns the taxonomy page or nil if the taxonomy has no terms. categories: [] keywords: [] -action: - related: [] - returnType: page.Page - signatures: [TAXONOMY.Page] +params: + functions_and_methods: + related: [] + returnType: page.Page + signatures: [TAXONOMY.Page] --- {{< new-in 0.125.0 />}} diff --git a/content/en/methods/taxonomy/_common/_index.md b/content/en/methods/taxonomy/_common/_index.md deleted file mode 100644 index 4328d4d14..000000000 --- a/content/en/methods/taxonomy/_common/_index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -cascade: - _build: - list: never - publishResources: false - render: never ---- - - diff --git a/content/en/methods/taxonomy/_index.md b/content/en/methods/taxonomy/_index.md index 18c7f12c9..13acdb10c 100644 --- a/content/en/methods/taxonomy/_index.md +++ b/content/en/methods/taxonomy/_index.md @@ -3,11 +3,5 @@ title: Taxonomy methods linkTitle: Taxonomy description: Use these methods with Taxonomy objects. keywords: [] -menu: - docs: - identifier: - parent: methods aliases: [/variables/taxonomy/] --- - -Use these methods with Taxonomy objects. diff --git a/content/en/methods/time/Add.md b/content/en/methods/time/Add.md index 8fd755244..10aa54951 100644 --- a/content/en/methods/time/Add.md +++ b/content/en/methods/time/Add.md @@ -3,13 +3,14 @@ title: Add description: Returns the given time plus the given duration. categories: [] keywords: [] -action: - related: - - functions/time/AsTime - - functions/time/Duration - - functions/time/ParseDuration - returnType: time.Time - signatures: [TIME.Add DURATION] +params: + functions_and_methods: + related: + - functions/time/AsTime + - functions/time/Duration + - functions/time/ParseDuration + returnType: time.Time + signatures: [TIME.Add DURATION] --- ```go-html-template diff --git a/content/en/methods/time/AddDate.md b/content/en/methods/time/AddDate.md index a4ef482ed..c7d534ecd 100644 --- a/content/en/methods/time/AddDate.md +++ b/content/en/methods/time/AddDate.md @@ -3,11 +3,11 @@ title: AddDate description: Returns the time corresponding to adding the given number of years, months, and days to the given time.Time value. categories: [] keywords: [] -action: - aliases: [] - related: [] - returnType: time.Time - signatures: [TIME.AddDate YEARS MONTHS DAYS] +params: + functions_and_methods: + related: [] + returnType: time.Time + signatures: [TIME.AddDate YEARS MONTHS DAYS] aliases: [/functions/adddate] --- diff --git a/content/en/methods/time/After.md b/content/en/methods/time/After.md index 64c6cfe67..866d5dfc7 100644 --- a/content/en/methods/time/After.md +++ b/content/en/methods/time/After.md @@ -3,13 +3,14 @@ title: After description: Reports whether TIME1 is after TIME2. categories: [] keywords: [] -action: - related: - - methods/time/Before - - methods/time/Equal - - functions/time/AsTime - returnType: bool - signatures: [TIME1.After TIME2] +params: + functions_and_methods: + related: + - methods/time/Before + - methods/time/Equal + - functions/time/AsTime + returnType: bool + signatures: [TIME1.After TIME2] --- ```go-html-template diff --git a/content/en/methods/time/Before.md b/content/en/methods/time/Before.md index c3d582860..2290b88d7 100644 --- a/content/en/methods/time/Before.md +++ b/content/en/methods/time/Before.md @@ -3,13 +3,14 @@ title: Before description: Reports whether TIME1 is before TIME2. categories: [] keywords: [] -action: - related: - - methods/time/After - - methods/time/Equal - - functions/time/AsTime - returnType: bool - signatures: [TIME1.Before TIME2] +params: + functions_and_methods: + related: + - methods/time/After + - methods/time/Equal + - functions/time/AsTime + returnType: bool + signatures: [TIME1.Before TIME2] --- ```go-html-template diff --git a/content/en/methods/time/Day.md b/content/en/methods/time/Day.md index 1173b8489..4488b1505 100644 --- a/content/en/methods/time/Day.md +++ b/content/en/methods/time/Day.md @@ -3,16 +3,17 @@ title: Day description: Returns the day of the month of the given time.Time value. categories: [] keywords: [] -action: - related: - - methods/time/Year - - methods/time/Month - - methods/time/Hour - - methods/time/Minute - - methods/time/Second - - functions/time/AsTime - returnType: int - signatures: [TIME.Day] +params: + functions_and_methods: + related: + - methods/time/Year + - methods/time/Month + - methods/time/Hour + - methods/time/Minute + - methods/time/Second + - functions/time/AsTime + returnType: int + signatures: [TIME.Day] --- ```go-html-template diff --git a/content/en/methods/time/Equal.md b/content/en/methods/time/Equal.md index 4d45a3ada..e4dd33b6a 100644 --- a/content/en/methods/time/Equal.md +++ b/content/en/methods/time/Equal.md @@ -3,13 +3,14 @@ title: Equal description: Reports whether TIME1 is equal to TIME2. categories: [] keywords: [] -action: - related: - - methods/time/After - - methods/time/Before - - functions/time/AsTime - returnType: bool - signatures: [TIME1.Equal TIME2] +params: + functions_and_methods: + related: + - methods/time/After + - methods/time/Before + - functions/time/AsTime + returnType: bool + signatures: [TIME1.Equal TIME2] --- ```go-html-template diff --git a/content/en/methods/time/Format.md b/content/en/methods/time/Format.md index 928af0ee7..b3b290a47 100644 --- a/content/en/methods/time/Format.md +++ b/content/en/methods/time/Format.md @@ -3,15 +3,14 @@ title: Format description: Returns a textual representation of the time.Time value formatted according to the layout string. categories: [] keywords: [] -action: - aliases: [] - related: - - functions/time/AsTime - - methods/time/UTC - - methods/time/Local - returnType: string - signatures: [TIME.Format LAYOUT] -toc: true +params: + functions_and_methods: + related: + - functions/time/AsTime + - methods/time/UTC + - methods/time/Local + returnType: string + signatures: [TIME.Format LAYOUT] aliases: [/methods/time/format] --- @@ -48,7 +47,7 @@ Use the [`time.Format`] function to format string representations of dates, and ## Layout string -{{% include "functions/_common/time-layout-string.md" %}} +{{% include "/_common/time-layout-string.md" %}} ## Examples diff --git a/content/en/methods/time/Hour.md b/content/en/methods/time/Hour.md index 58ed00260..2e6b122be 100644 --- a/content/en/methods/time/Hour.md +++ b/content/en/methods/time/Hour.md @@ -3,16 +3,17 @@ title: Hour description: Returns the hour within the day of the given time.Time value, in the range [0, 23]. categories: [] keywords: [] -action: - related: - - methods/time/Year - - methods/time/Month - - methods/time/Day - - methods/time/Minute - - methods/time/Second - - functions/time/AsTime - returnType: int - signatures: [TIME.Hour] +params: + functions_and_methods: + related: + - methods/time/Year + - methods/time/Month + - methods/time/Day + - methods/time/Minute + - methods/time/Second + - functions/time/AsTime + returnType: int + signatures: [TIME.Hour] --- ```go-html-template diff --git a/content/en/methods/time/IsDST.md b/content/en/methods/time/IsDST.md index df2b84cae..37985bf13 100644 --- a/content/en/methods/time/IsDST.md +++ b/content/en/methods/time/IsDST.md @@ -3,11 +3,12 @@ title: IsDST description: Reports whether the given time.Time value is in Daylight Savings Time. categories: [] keywords: [] -action: - related: - - functions/time/AsTime - returnType: bool - signatures: [TIME.IsDST] +params: + functions_and_methods: + related: + - functions/time/AsTime + returnType: bool + signatures: [TIME.IsDST] --- ```go-html-template diff --git a/content/en/methods/time/IsZero.md b/content/en/methods/time/IsZero.md index 2026f3b2e..c447b94cf 100644 --- a/content/en/methods/time/IsZero.md +++ b/content/en/methods/time/IsZero.md @@ -3,11 +3,12 @@ title: IsZero description: Reports whether the given time.Time value represents the zero time instant, January 1, year 1, 00:00:00 UTC. categories: [] keywords: [] -action: - related: - - functions/time/AsTime - returnType: bool - signatures: [TIME.IsZero] +params: + functions_and_methods: + related: + - functions/time/AsTime + returnType: bool + signatures: [TIME.IsZero] --- ````go-html-template diff --git a/content/en/methods/time/Local.md b/content/en/methods/time/Local.md index bd40e3a44..ec50a1eb6 100644 --- a/content/en/methods/time/Local.md +++ b/content/en/methods/time/Local.md @@ -3,12 +3,13 @@ title: Local description: Returns the given time.Time value with the location set to local time. categories: [] keywords: [] -action: - related: - - methods/time/UTC - - functions/time/AsTime - returnType: time.Time - signatures: [TIME.Local] +params: + functions_and_methods: + related: + - methods/time/UTC + - functions/time/AsTime + returnType: time.Time + signatures: [TIME.Local] --- ```go-html-template diff --git a/content/en/methods/time/Minute.md b/content/en/methods/time/Minute.md index d482fab5d..5af1fe26a 100644 --- a/content/en/methods/time/Minute.md +++ b/content/en/methods/time/Minute.md @@ -3,16 +3,17 @@ title: Minute description: Returns the minute offset within the hour of the given time.Time value, in the range [0, 59]. categories: [] keywords: [] -action: - related: - - methods/time/Year - - methods/time/Month - - methods/time/Day - - methods/time/Hour - - methods/time/Second - - functions/time/AsTime - returnType: int - signatures: [TIME.Minute] +params: + functions_and_methods: + related: + - methods/time/Year + - methods/time/Month + - methods/time/Day + - methods/time/Hour + - methods/time/Second + - functions/time/AsTime + returnType: int + signatures: [TIME.Minute] --- ```go-html-template diff --git a/content/en/methods/time/Month.md b/content/en/methods/time/Month.md index 0a01d1a70..36d56bf30 100644 --- a/content/en/methods/time/Month.md +++ b/content/en/methods/time/Month.md @@ -3,16 +3,17 @@ title: Month description: Returns the month of the year of the given time.Time value. categories: [] keywords: [] -action: - related: - - methods/time/Year - - methods/time/Day - - methods/time/Hour - - methods/time/Minute - - methods/time/Second - - functions/time/AsTime - returnType: time.Month - signatures: [TIME.Month] +params: + functions_and_methods: + related: + - methods/time/Year + - methods/time/Day + - methods/time/Hour + - methods/time/Minute + - methods/time/Second + - functions/time/AsTime + returnType: time.Month + signatures: [TIME.Month] --- To convert the `time.Month` value to a string: diff --git a/content/en/methods/time/Nanosecond.md b/content/en/methods/time/Nanosecond.md index 606143139..5adacfa1c 100644 --- a/content/en/methods/time/Nanosecond.md +++ b/content/en/methods/time/Nanosecond.md @@ -3,11 +3,12 @@ title: Nanosecond description: Returns the nanosecond offset within the second of the given time.Time value, in the range [0, 999999999]. categories: [] keywords: [] -action: - related: - - functions/time/AsTime - returnType: int - signatures: [TIME.Nanosecond] +params: + functions_and_methods: + related: + - functions/time/AsTime + returnType: int + signatures: [TIME.Nanosecond] --- ```go-html-template diff --git a/content/en/methods/time/Round.md b/content/en/methods/time/Round.md index 16bd2009f..38646faa2 100644 --- a/content/en/methods/time/Round.md +++ b/content/en/methods/time/Round.md @@ -3,13 +3,14 @@ title: Round description: Returns the result of rounding TIME to the nearest multiple of DURATION since January 1, 0001, 00:00:00 UTC. categories: [] keywords: [] -action: - related: - - functions/time/AsTime - - functions/time/ParseDuration - - methods/time/Truncate - returnType: time.Time - signatures: [TIME.Round DURATION] +params: + functions_and_methods: + related: + - functions/time/AsTime + - functions/time/ParseDuration + - methods/time/Truncate + returnType: time.Time + signatures: [TIME.Round DURATION] --- The rounding behavior for halfway values is to round up. diff --git a/content/en/methods/time/Second.md b/content/en/methods/time/Second.md index e326c64bc..dffa2c0a1 100644 --- a/content/en/methods/time/Second.md +++ b/content/en/methods/time/Second.md @@ -3,16 +3,17 @@ title: Second description: Returns the second offset within the minute of the given time.Time value, in the range [0, 59]. categories: [] keywords: [] -action: - related: - - methods/time/Year - - methods/time/Month - - methods/time/Day - - methods/time/Hour - - methods/time/Minute - - functions/time/AsTime - returnType: int - signatures: [TIME.Second] +params: + functions_and_methods: + related: + - methods/time/Year + - methods/time/Month + - methods/time/Day + - methods/time/Hour + - methods/time/Minute + - functions/time/AsTime + returnType: int + signatures: [TIME.Second] --- ```go-html-template diff --git a/content/en/methods/time/Sub.md b/content/en/methods/time/Sub.md index 9678365eb..404ad5623 100644 --- a/content/en/methods/time/Sub.md +++ b/content/en/methods/time/Sub.md @@ -3,11 +3,12 @@ title: Sub description: Returns the duration computed by subtracting TIME2 from TIME1. categories: [] keywords: [] -action: - related: - - functions/time/AsTime - returnType: time.Duration - signatures: [TIME1.Sub TIME2] +params: + functions_and_methods: + related: + - functions/time/AsTime + returnType: time.Duration + signatures: [TIME1.Sub TIME2] --- ```go-html-template diff --git a/content/en/methods/time/Truncate.md b/content/en/methods/time/Truncate.md index 64751f2c1..f5fe10507 100644 --- a/content/en/methods/time/Truncate.md +++ b/content/en/methods/time/Truncate.md @@ -3,13 +3,14 @@ title: Truncate description: Returns the result of rounding TIME down to a multiple of DURATION since January 1, 0001, 00:00:00 UTC. categories: [] keywords: [] -action: - related: - - functions/time/AsTime - - functions/time/ParseDuration - - methods/time/Round - returnType: time.Time - signatures: [TIME.Truncate DURATION] +params: + functions_and_methods: + related: + - functions/time/AsTime + - functions/time/ParseDuration + - methods/time/Round + returnType: time.Time + signatures: [TIME.Truncate DURATION] --- 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. diff --git a/content/en/methods/time/UTC.md b/content/en/methods/time/UTC.md index 6fd7b526d..426a7ab60 100644 --- a/content/en/methods/time/UTC.md +++ b/content/en/methods/time/UTC.md @@ -3,12 +3,13 @@ title: UTC description: Returns the given time.Time value with the location set to UTC. categories: [] keywords: [] -action: - related: - - methods/time/Local - - functions/time/AsTime - returnType: time.Time - signatures: [TIME.UTC] +params: + functions_and_methods: + related: + - methods/time/Local + - functions/time/AsTime + returnType: time.Time + signatures: [TIME.UTC] --- ```go-html-template diff --git a/content/en/methods/time/Unix.md b/content/en/methods/time/Unix.md index fcfc661fe..d03974786 100644 --- a/content/en/methods/time/Unix.md +++ b/content/en/methods/time/Unix.md @@ -1,15 +1,16 @@ --- title: Unix -description: Returns the given time.Time value expressed as the number of seconds elapsed since January 1, 1970 UTC. +description: Returns the given time.Time value expressed as the number of seconds elapsed since January 1, 1970 UTC. categories: [] -action: - related: - - methods/time/UnixMilli - - methods/time/UnixMicro - - methods/time/UnixNano - - functions/time/AsTime - returnType: int64 - signatures: [TIME.Unix] +params: + functions_and_methods: + related: + - methods/time/UnixMilli + - methods/time/UnixMicro + - methods/time/UnixNano + - functions/time/AsTime + returnType: int64 + signatures: [TIME.Unix] aliases: [/functions/unix] --- diff --git a/content/en/methods/time/UnixMicro.md b/content/en/methods/time/UnixMicro.md index 150497cd3..e04a4b116 100644 --- a/content/en/methods/time/UnixMicro.md +++ b/content/en/methods/time/UnixMicro.md @@ -1,16 +1,17 @@ --- title: UnixMicro -description: Returns the given time.Time value expressed as the number of microseconds elapsed since January 1, 1970 UTC. +description: Returns the given time.Time value expressed as the number of microseconds elapsed since January 1, 1970 UTC. categories: [] keywords: [] -action: - related: - - methods/time/Unix - - methods/time/UnixMilli - - methods/time/UnixNano - - functions/time/AsTime - returnType: int64 - signatures: [TIME.UnixMicro] +params: + functions_and_methods: + related: + - methods/time/Unix + - methods/time/UnixMilli + - methods/time/UnixNano + - functions/time/AsTime + returnType: int64 + signatures: [TIME.UnixMicro] --- See [Unix epoch](https://en.wikipedia.org/wiki/Unix_time). diff --git a/content/en/methods/time/UnixMilli.md b/content/en/methods/time/UnixMilli.md index e5e90ba25..0d14131ce 100644 --- a/content/en/methods/time/UnixMilli.md +++ b/content/en/methods/time/UnixMilli.md @@ -1,16 +1,17 @@ --- title: UnixMilli -description: Returns the given time.Time value expressed as the number of milliseconds elapsed since January 1, 1970 UTC. +description: Returns the given time.Time value expressed as the number of milliseconds elapsed since January 1, 1970 UTC. categories: [] keywords: [] -action: - related: - - methods/time/Unix - - methods/time/UnixMicro - - methods/time/UnixNano - - functions/time/AsTime - returnType: int64 - signatures: [TIME.UnixMilli] +params: + functions_and_methods: + related: + - methods/time/Unix + - methods/time/UnixMicro + - methods/time/UnixNano + - functions/time/AsTime + returnType: int64 + signatures: [TIME.UnixMilli] --- See [Unix epoch](https://en.wikipedia.org/wiki/Unix_time). diff --git a/content/en/methods/time/UnixNano.md b/content/en/methods/time/UnixNano.md index 63db320a3..a6a4f83b2 100644 --- a/content/en/methods/time/UnixNano.md +++ b/content/en/methods/time/UnixNano.md @@ -1,16 +1,17 @@ --- title: UnixNano -description: Returns the given time.Time value expressed as the number of nanoseconds elapsed since January 1, 1970 UTC. +description: Returns the given time.Time value expressed as the number of nanoseconds elapsed since January 1, 1970 UTC. categories: [] keywords: [] -action: - related: - - methods/time/Unix - - methods/time/UnixMilli - - methods/time/UnixMicro - - functions/time/AsTime - returnType: int64 - signatures: [TIME.UnixNano] +params: + functions_and_methods: + related: + - methods/time/Unix + - methods/time/UnixMilli + - methods/time/UnixMicro + - functions/time/AsTime + returnType: int64 + signatures: [TIME.UnixNano] --- See [Unix epoch](https://en.wikipedia.org/wiki/Unix_time). diff --git a/content/en/methods/time/Weekday.md b/content/en/methods/time/Weekday.md index b2a95fe9c..06766a76a 100644 --- a/content/en/methods/time/Weekday.md +++ b/content/en/methods/time/Weekday.md @@ -1,13 +1,14 @@ --- title: Weekday -description: Returns the day of the week of the given time.Time value. +description: Returns the day of the week of the given time.Time value. categories: [] keywords: [] -action: - related: - - functions/time/AsTime - returnType: time.Weekday - signatures: [TIME.Weekday] +params: + functions_and_methods: + related: + - functions/time/AsTime + returnType: time.Weekday + signatures: [TIME.Weekday] --- To convert the `time.Weekday` value to a string: diff --git a/content/en/methods/time/Year.md b/content/en/methods/time/Year.md index b046896f4..23641f55b 100644 --- a/content/en/methods/time/Year.md +++ b/content/en/methods/time/Year.md @@ -3,16 +3,17 @@ title: Year description: Returns the year of the given time.Time value. categories: [] keywords: [] -action: - related: - - methods/time/Month - - methods/time/Day - - methods/time/Hour - - methods/time/Minute - - methods/time/Second - - functions/time/AsTime - returnType: int - signatures: [TIME.Year] +params: + functions_and_methods: + related: + - methods/time/Month + - methods/time/Day + - methods/time/Hour + - methods/time/Minute + - methods/time/Second + - functions/time/AsTime + returnType: int + signatures: [TIME.Year] --- ```go-html-template diff --git a/content/en/methods/time/YearDay.md b/content/en/methods/time/YearDay.md index f380cdffe..39e7e9b7d 100644 --- a/content/en/methods/time/YearDay.md +++ b/content/en/methods/time/YearDay.md @@ -3,10 +3,11 @@ title: YearDay description: Returns the day of the year of the given time.Time value, in the range [1, 365] for non-leap years, and [1, 366] in leap years. categories: [] keywords: [] -action: - related: [] - returnType: int - signatures: [TIME.YearDay] +params: + functions_and_methods: + related: [] + returnType: int + signatures: [TIME.YearDay] --- ```go-html-template diff --git a/content/en/methods/time/_index.md b/content/en/methods/time/_index.md index 81d4690e0..8114664d3 100644 --- a/content/en/methods/time/_index.md +++ b/content/en/methods/time/_index.md @@ -4,10 +4,4 @@ linkTitle: Time description: Use these methods with time.Time values. categories: [] keywords: [] -menu: - docs: - identifier: time-methods - parent: methods --- - -Use these methods with time.Time values. diff --git a/content/en/myshowcase/featured.png b/content/en/myshowcase/featured.png deleted file mode 100644 index 4f390132eb13d9640019d30f13aa1cb882e5c5eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 41270 zcmdpd^+S`<_x}_HX%#7vPy|$((WxR`BGM(&5~ByBR0O02q*GE_Y7E9e>F#EXjuD&G z28{U5_b2{>&rjdyr#<(%_ndprdEIl*J?AXqwYCa1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 description: Stay up-to-date with the latest news and announcements. outputs: - html - rss -aliases: [/release-notes/] weight: 10 +aliases: [/release-notes/] --- diff --git a/content/en/quick-reference/_index.md b/content/en/quick-reference/_index.md index f2673ba37..98f978f4f 100644 --- a/content/en/quick-reference/_index.md +++ b/content/en/quick-reference/_index.md @@ -1,16 +1,8 @@ --- title: Quick reference guides -linktitle: Quick reference +linkTitle: Quick reference description: Use these quick reference guides for quick access to key information. categories: [] keywords: [] -menu: - docs: - identifier: quick-reference-in-this-section - parent: quick-reference - weight: 10 weight: 10 -showSectionMenu: false --- - -{{% param description %}} diff --git a/content/en/quick-reference/emojis.md b/content/en/quick-reference/emojis.md index 946a49069..15c2e60e6 100644 --- a/content/en/quick-reference/emojis.md +++ b/content/en/quick-reference/emojis.md @@ -1,14 +1,8 @@ --- title: Emojis description: Include emoji shortcodes in your Markdown or templates. -categories: [quick reference] -keywords: [emoji] -menu: - docs: - parent: quick-reference - weight: 20 -weight: 20 -toc: true +categories: [] +keywords: [] --- ## Attribution diff --git a/content/en/quick-reference/functions.md b/content/en/quick-reference/functions.md index 42eafedd3..ee8844775 100644 --- a/content/en/quick-reference/functions.md +++ b/content/en/quick-reference/functions.md @@ -1,14 +1,8 @@ --- title: Functions description: A quick reference guide to Hugo's functions, grouped by namespace. Aliases, if any, appear in parentheses to the right of the function name. -categories: [quick reference] +categories: [] keywords: [] -menu: - docs: - parent: quick-reference - weight: 30 -weight: 30 -toc: true --- -{{% quick-reference section="functions" %}} +{{< quick-reference section="functions" >}} diff --git a/content/en/quick-reference/glossary/_index.md b/content/en/quick-reference/glossary/_index.md index 238d4610d..42894c4da 100644 --- a/content/en/quick-reference/glossary/_index.md +++ b/content/en/quick-reference/glossary/_index.md @@ -1,17 +1,8 @@ --- title: Glossary description: Terms commonly used throughout the documentation. -categories: [quick-reference] -keywords: [glossary] -params: - hide_in_this_section: true -menu: - docs: - parent: quick-reference - weight: 40 -aliases: [/getting-started/glossary/] -weight: 40 -layout: single +categories: [] +keywords: [] build: render: always list: always @@ -19,6 +10,10 @@ cascade: build: render: never list: local +layout: single +params: + hide_in_this_section: true +aliases: [/getting-started/glossary/] --- {{% glossary %}} diff --git a/content/en/quick-reference/glossary/cli.md b/content/en/quick-reference/glossary/cli.md index 61269dc8e..8f898e364 100644 --- a/content/en/quick-reference/glossary/cli.md +++ b/content/en/quick-reference/glossary/cli.md @@ -2,4 +2,4 @@ title: CLI --- -_CLI_ is an abbreviation of Command Line Interface. +_CLI_ stands for command-line interface, a text-based method for interacting with computer programs or operating systems. diff --git a/content/en/quick-reference/glossary/default-sort-order.md b/content/en/quick-reference/glossary/default-sort-order.md index 2b5588d56..9b981a7e9 100644 --- a/content/en/quick-reference/glossary/default-sort-order.md +++ b/content/en/quick-reference/glossary/default-sort-order.md @@ -2,4 +2,9 @@ title: default sort order --- -The _default sort order_ is the default order in which Hugo sorts page collections: by [_weight_](g), then by date (descending), then by link title, and then by file path. +The _default sort order_ for [_page collections_](g), used when no other criteria are set, follows this priority: + + 1. [`weight`](/content-management/front-matter/#weight) (ascending) + 1. [`date`](/content-management/front-matter/#date) (descending) + 1. [`linkTitle`](/content-management/front-matter/#linktitle) falling back to [`title`](/content-management/front-matter/#title) (ascending) + 1. [logical path](g) (ascending) diff --git a/content/en/quick-reference/glossary/environment.md b/content/en/quick-reference/glossary/environment.md index 6605c2263..ebba0ccdf 100644 --- a/content/en/quick-reference/glossary/environment.md +++ b/content/en/quick-reference/glossary/environment.md @@ -4,8 +4,6 @@ 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. + 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/ + To determine the current environment within a template, use the [`hugo.Environment`](/functions/hugo/environment/) function. diff --git a/content/en/quick-reference/glossary/glob.md b/content/en/quick-reference/glossary/glob.md index 5243d1ef9..bb9c5a4d8 100644 --- a/content/en/quick-reference/glossary/glob.md +++ b/content/en/quick-reference/glossary/glob.md @@ -3,4 +3,4 @@ title: glob reference: https://github.com/gobwas/glob?tab=readme-ov-file#example --- -A _glob_ is a pattern used to match filenames and paths. It's a shorthand for specifying a set of files, making it easier to work with multiple files at once. +A _glob_ is a pattern used to match file names and paths. It's a shorthand for specifying a set of files, making it easier to work with multiple files at once. diff --git a/content/en/quick-reference/glossary/interval.md b/content/en/quick-reference/glossary/interval.md index f1ce7bc93..a7ed8a6cd 100644 --- a/content/en/quick-reference/glossary/interval.md +++ b/content/en/quick-reference/glossary/interval.md @@ -4,8 +4,8 @@ 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, 1] is the interval where `0 <= x <= 1`. + - A _closed interval_, denoted by brackets, includes its endpoints. For example, [0, 1] is the interval where `0 <= x <= 1`. -- An _open interval_, denoted by parentheses, excludes its endpoints. For example, (0, 1) is the interval where `0 < x < 1`. + - An _open interval_, denoted by parentheses, excludes its endpoints. For example, (0, 1) is the interval where `0 < x < 1`. -- A _half-open interval_ includes only one of its endpoints. For example, (0, 1] is the _left-open_ interval where `0 < x <= 1`, while [0, 1) is the _right-open_ interval where `0 <= x < 1`. + - A _half-open interval_ includes only one of its endpoints. For example, (0, 1] is the _left-open_ interval where `0 < x <= 1`, while [0, 1) is the _right-open_ interval where `0 <= x < 1`. diff --git a/content/en/quick-reference/glossary/logical-path.md b/content/en/quick-reference/glossary/logical-path.md index aa5ce9374..2eeee751f 100644 --- a/content/en/quick-reference/glossary/logical-path.md +++ b/content/en/quick-reference/glossary/logical-path.md @@ -3,6 +3,4 @@ title: logical path reference: /methods/page/path/#examples --- -{{< new-in 0.123.0 />}} - -A _logical path_ is 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. +A _logical path_ is 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. Path segments are separated with a slash (`/`). diff --git a/content/en/quick-reference/glossary/markdown-attribute.md b/content/en/quick-reference/glossary/markdown-attribute.md index ccbcefd66..f5c57c728 100644 --- a/content/en/quick-reference/glossary/markdown-attribute.md +++ b/content/en/quick-reference/glossary/markdown-attribute.md @@ -3,4 +3,4 @@ title: Markdown attribute reference: /content-management/markdown-attributes/ --- -A _Markdown attribute_ is a key-value pair attached to a Markdown element. These attributes are commonly used to add HTML attributes, like `class` and `id`, to the element when it's rendered into HTML. They provide a way to extend the basic Markdown syntax and add more semantic meaning or styling hooks to your content. +A _Markdown attribute_ is a key-value pair attached to a Markdown element. These attributes are commonly used to add HTML attributes, like `class` and `id`, to the element when it's rendered into HTML. They provide a way to extend the basic Markdown syntax and add more semantic meaning or styling hooks to your content. diff --git a/content/en/quick-reference/glossary/media-type.md b/content/en/quick-reference/glossary/media-type.md new file mode 100644 index 000000000..2994360ef --- /dev/null +++ b/content/en/quick-reference/glossary/media-type.md @@ -0,0 +1,6 @@ +--- +title: media type +reference: /configuration/media-types/ +--- + +A _media type_ (formerly known as a MIME type) is a two-part identifier for file formats and transmitted content. For example, the media type for JSON data is `application/json`. diff --git a/content/en/quick-reference/glossary/method.md b/content/en/quick-reference/glossary/method.md index b7618bbf9..634cd4b97 100644 --- a/content/en/quick-reference/glossary/method.md +++ b/content/en/quick-reference/glossary/method.md @@ -2,4 +2,4 @@ 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). +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 a `Page` object which returns `true` if the current page is the home page. See also [_function_](g). diff --git a/content/en/quick-reference/glossary/ordered-taxonomy.md b/content/en/quick-reference/glossary/ordered-taxonomy.md index 7e0e2763d..9b6c1d92c 100644 --- a/content/en/quick-reference/glossary/ordered-taxonomy.md +++ b/content/en/quick-reference/glossary/ordered-taxonomy.md @@ -2,7 +2,4 @@ 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/ +Created by invoking the [`Alphabetical`](/methods/taxonomy/alphabetical/) or [`ByCount`](/methods/taxonomy/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). diff --git a/content/en/quick-reference/glossary/output-format.md b/content/en/quick-reference/glossary/output-format.md index 9004dc223..df042d06b 100644 --- a/content/en/quick-reference/glossary/output-format.md +++ b/content/en/quick-reference/glossary/output-format.md @@ -1,6 +1,6 @@ --- title: output format -reference: /templates/output-formats/ +reference: /configuration/output-formats/ --- -An _output format_ is a collection of settings that defines how Hugo renders a file when building a site. For example, `html`, `rss`, and `json` are built-in output formats. You can create multiple output formats and control their generation based on [page kind](g), or by enabling one or more output formats for specific pages. +An _output format_ is a collection of settings that defines how Hugo renders a file when building a site. For example, `html`, `json`, and `rss` are built-in output formats. You can create multiple output formats and control their generation based on [page kind](g), or by enabling one or more output formats for specific pages. diff --git a/content/en/quick-reference/glossary/pipeline.md b/content/en/quick-reference/glossary/pipeline.md index 2bb3fa3b7..6dab52578 100644 --- a/content/en/quick-reference/glossary/pipeline.md +++ b/content/en/quick-reference/glossary/pipeline.md @@ -4,4 +4,4 @@ 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. + 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. diff --git a/content/en/quick-reference/glossary/primary-output-format.md b/content/en/quick-reference/glossary/primary-output-format.md new file mode 100644 index 000000000..c40c0176c --- /dev/null +++ b/content/en/quick-reference/glossary/primary-output-format.md @@ -0,0 +1,10 @@ +--- +title: primary output format +details: /configuration/outputs/ +--- + +A _primary output format_ defines the default URL returned by the [`Permalink`] and [`RelPermalink`] methods for a given [page kind](g). It is specified as the first entry within the [outputs configuration] for that page kind. + +[`Permalink`]: /methods/page/permalink/ +[`RelPermalink`]: /methods/page/relpermalink/ +[outputs configuration]: /configuration/outputs/ diff --git a/content/en/quick-reference/glossary/regular-expression.md b/content/en/quick-reference/glossary/regular-expression.md new file mode 100644 index 000000000..222f289d9 --- /dev/null +++ b/content/en/quick-reference/glossary/regular-expression.md @@ -0,0 +1,8 @@ +--- +title: regular expression +reference: +--- + +A _regular expression_, also known as a _regex_, is a sequence of characters that defines a search pattern. Use the [RE2 syntax] when defining regular expressions in your templates or site configuration. + + [RE2 syntax]: https://github.com/google/re2/wiki/syntax diff --git a/content/en/quick-reference/glossary/resource-type.md b/content/en/quick-reference/glossary/resource-type.md index 64d9c27ab..9a2412fb9 100644 --- a/content/en/quick-reference/glossary/resource-type.md +++ b/content/en/quick-reference/glossary/resource-type.md @@ -2,7 +2,4 @@ title: resource type --- -A _resource type_ is 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/ +A _resource type_ is the main type of a resource's [media type](/methods/resource/mediatype/). Content files such as Markdown, HTML, AsciiDoc, Pandoc, reStructuredText, and Emacs Org Mode have resource type `page`. Other resource types include `image`, `text`, `video`, and others. Retrieve the resource type using the [`ResourceType`](/methods/resource/resourcetype/) method on a `Resource` object. diff --git a/content/en/quick-reference/glossary/resource.md b/content/en/quick-reference/glossary/resource.md index bd3a9d10d..0864bc43d 100644 --- a/content/en/quick-reference/glossary/resource.md +++ b/content/en/quick-reference/glossary/resource.md @@ -4,4 +4,4 @@ title: resource A _resource_ is 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). + Hugo supports three types of resources: [_global resources_](g), [_page resources_](g), and [_remote resources_](g). diff --git a/content/en/quick-reference/glossary/scratch-pad.md b/content/en/quick-reference/glossary/scratch-pad.md index f94d4fd5b..4792ce12e 100644 --- a/content/en/quick-reference/glossary/scratch-pad.md +++ b/content/en/quick-reference/glossary/scratch-pad.md @@ -2,7 +2,4 @@ title: scratch pad --- -Conceptually, a _scratch pad_ is 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/ +Conceptually, a _scratch pad_ is 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`](/methods/page/store/) method, or create a locally scoped scratch pad using the [`newScratch`](/functions/collections/newscratch/) function. diff --git a/content/en/quick-reference/glossary/shortcode.md b/content/en/quick-reference/glossary/shortcode.md index bfc2f6c51..a6503ea63 100644 --- a/content/en/quick-reference/glossary/shortcode.md +++ b/content/en/quick-reference/glossary/shortcode.md @@ -3,4 +3,4 @@ title: shortcode reference: /content-management/shortcodes --- -A _shortcode_ is a [_template_](g) invoked within markup, accepting any number of [_arguments_](g). They can be used with any [content format](g) to insert elements such as videos, images, and social media embeds into your content. +A _shortcode_ is a [_template_](g) invoked within markup, accepting any number of [_arguments_](g). They can be used with any [_content format_](g) to insert elements such as videos, images, and social media embeds into your content. diff --git a/content/en/quick-reference/glossary/template-action.md b/content/en/quick-reference/glossary/template-action.md index d9a6c635c..e40c228fe 100644 --- a/content/en/quick-reference/glossary/template-action.md +++ b/content/en/quick-reference/glossary/template-action.md @@ -3,4 +3,4 @@ title: template action reference: https://pkg.go.dev/text/template#hdr-Actions --- -A data evaluation or control structure within a [_template_](g), delimited by "{{" and "}}". +A data evaluation or control structure within a [_template_](g), delimited by `{{` and `}}`. diff --git a/content/en/quick-reference/methods.md b/content/en/quick-reference/methods.md index 5b4797f3a..f8cf6b8c9 100644 --- a/content/en/quick-reference/methods.md +++ b/content/en/quick-reference/methods.md @@ -1,14 +1,8 @@ --- title: Methods description: A quick reference guide to Hugo's methods, grouped by object. -categories: [quick reference] +categories: [] keywords: [] -menu: - docs: - parent: quick-reference - weight: 50 -weight: 50 -toc: true --- -{{% quick-reference section="methods" %}} +{{< quick-reference section="methods" >}} diff --git a/content/en/quick-reference/page-collections.md b/content/en/quick-reference/page-collections.md index d7c081910..43b7178b3 100644 --- a/content/en/quick-reference/page-collections.md +++ b/content/en/quick-reference/page-collections.md @@ -1,27 +1,21 @@ --- title: Page collections description: A quick reference guide to Hugo's page collections. -categories: [quick reference] +categories: [] keywords: [] -menu: - docs: - parent: quick-reference - weight: 60 -weight: 60 -toc: true --- ## Page 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. >}} +{{< list-pages-in-section path=/methods/page filter=methods_page_page_collections filterType=include titlePrefix=PAGE. >}} ## Site Use these `Site` methods when rendering lists on any page. -{{< list-pages-in-section path=/methods/site filter=methods_site_page_collections filterType=include omitElementIDs=true titlePrefix=SITE. >}} +{{< list-pages-in-section path=/methods/site filter=methods_site_page_collections filterType=include titlePrefix=SITE. >}} ## Filter @@ -31,25 +25,14 @@ Use the [`where`] function to filter page collections. ## Sort -By default, Hugo sorts page collections by: +{{% glossary-term "default sort order" %}} -1. [Weight] -1. [Date] in descending order -1. [LinkTitle] falling back to [Title] -1. [Filename] if the page is backed by a file +Use these methods to sort page collections by different criteria. -[Date]: /methods/page/date/ -[Weight]: /methods/page/weight/ -[LinkTitle]: /methods/page/linktitle/ -[Title]: /methods/page/title/ -[Filename]: /methods/page/file/#filename - -Use these methods to sort page collections. - -{{< list-pages-in-section path=/methods/pages filter=methods_pages_sort filterType=include titlePrefix=. omitElementIDs=true titlePrefix=PAGES. >}} +{{< list-pages-in-section path=/methods/pages filter=methods_pages_sort filterType=include titlePrefix=. titlePrefix=PAGES. >}} ## Group Use these methods to group page collections. -{{< list-pages-in-section path=/methods/pages filter=methods_pages_group filterType=include titlePrefix=. omitElementIDs=true titlePrefix=PAGES. >}} +{{< list-pages-in-section path=/methods/pages filter=methods_pages_group filterType=include titlePrefix=. titlePrefix=PAGES. >}} diff --git a/content/en/quick-reference/syntax-highlighting-styles.md b/content/en/quick-reference/syntax-highlighting-styles.md new file mode 100644 index 000000000..68a03c8df --- /dev/null +++ b/content/en/quick-reference/syntax-highlighting-styles.md @@ -0,0 +1,35 @@ +--- +title: Syntax highlighting styles +description: Highlight code examples using one of these styles. +categories: [] +keywords: [] +--- + +## Overview + +Hugo provides several methods to add syntax highlighting to code examples: + +- Use the [`transform.Highlight`] function within your templates +- Use the [`highlight`] shortcode with any [content format](g) +- Use fenced code blocks with the Markdown content format + +Regardless of method, use any of the syntax highlighting styles below. + +Set the default syntax highlighting style in your site configuration: + +{{< code-toggle file=hugo >}} +[markup.highlight] +style = 'monokai' +{{< /code-toggle >}} + +See [configure Markup](/configuration/markup/#highlight). + +[`transform.Highlight`]: /functions/transform/highlight/ +[`highlight`]: /shortcodes/highlight/ +[fenced code blocks]: /content-management/syntax-highlighting/#fenced-code-blocks + +## Styles + +This gallery demonstrates the application of each syntax highlighting style with code examples written in different programming languages. + +{{% syntax-highlighting-styles %}} diff --git a/content/en/render-hooks/_common/_index.md b/content/en/render-hooks/_common/_index.md deleted file mode 100644 index 4328d4d14..000000000 --- a/content/en/render-hooks/_common/_index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -cascade: - _build: - list: never - publishResources: false - render: never ---- - - diff --git a/content/en/render-hooks/_index.md b/content/en/render-hooks/_index.md index 668808f44..a5e6203ff 100644 --- a/content/en/render-hooks/_index.md +++ b/content/en/render-hooks/_index.md @@ -1,17 +1,8 @@ --- title: Render hooks - description: Create render hooks to override the rendering of Markdown to HTML. categories: [] keywords: [] -menu: - docs: - identifier: render-hooks-in-this-section - parent: render-hooks - weight: 10 weight: 10 -showSectionMenu: false aliases: [/templates/render-hooks/] --- - -Create render hooks to override the rendering of Markdown to HTML. diff --git a/content/en/render-hooks/blockquotes.md b/content/en/render-hooks/blockquotes.md index 25daf5865..7b099372e 100755 --- a/content/en/render-hooks/blockquotes.md +++ b/content/en/render-hooks/blockquotes.md @@ -2,14 +2,8 @@ title: Blockquote render hooks linkTitle: Blockquotes description: Create a blockquote render hook to override the rendering of Markdown blockquotes to HTML. -categories: [render hooks] +categories: [] keywords: [] -menu: - docs: - parent: render-hooks - weight: 30 -weight: 30 -toc: true --- {{< new-in 0.132.0 />}} @@ -18,58 +12,46 @@ toc: true Blockquote render hook templates receive the following [context](g): -###### AlertType +AlertType +: (`string`) Applicable when [`Type`](#type) is `alert`, this is the alert type converted to lowercase. See the [alerts](#alerts) section below. -(`string`) Applicable when [`Type`](#type) is `alert`, this is the alert type converted to lowercase. See the [alerts](#alerts) section below. +AlertTitle +: {{< new-in 0.134.0 />}} +: (`template.HTML`) Applicable when [`Type`](#type) is `alert`, this is the alert title. See the [alerts](#alerts) section below. -###### AlertTitle +AlertSign +: {{< new-in 0.134.0 />}} +: (`string`) Applicable when [`Type`](#type) is `alert`, this is the alert sign. Typically used to indicate whether an alert is graphically foldable, this is one of `+`, `-`, or an empty string. See the [alerts](#alerts) section below. -{{< new-in 0.134.0 />}} +Attributes +: (`map`) The [Markdown attributes], available if you configure your site as follows: -(`template.HTML`) Applicable when [`Type`](#type) is `alert`, this is the alert title. See the [alerts](#alerts) section below. + {{< code-toggle file=hugo >}} + [markup.goldmark.parser.attribute] + block = true + {{< /code-toggle >}} -###### AlertSign +Ordinal +: (`int`) The zero-based ordinal of the blockquote on the page. -{{< new-in 0.134.0 />}} +Page +: (`page`) A reference to the current page. -(`string`) Applicable when [`Type`](#type) is `alert`, this is the alert sign. Typically used to indicate whether an alert is graphically foldable, this is one of `+`, `-`, or an empty string. See the [alerts](#alerts) section below. +PageInner +: (`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). -###### Attributes +Position +: (`string`) The position of the blockquote within the page content. -(`map`) The [Markdown attributes], available if you configure your site as follows: +Text +: (`template.HTML`) The blockquote text, excluding the first line if [`Type`](#type) is `alert`. See the [alerts](#alerts) section below. + +Type +: (`string`) The blockquote type. Returns `alert` if the blockquote has an alert designator, else `regular`. See the [alerts](#alerts) section below. [Markdown attributes]: /content-management/markdown-attributes/ - -{{< code-toggle file=hugo >}} -[markup.goldmark.parser.attribute] -block = true -{{< /code-toggle >}} - -###### Ordinal - -(`int`) The zero-based ordinal of the blockquote on the page. - -###### Page - -(`page`) A reference to the current page. - -###### PageInner - -(`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). - [`RenderShortcodes`]: /methods/page/rendershortcodes -###### Position - -(`string`) The position of the blockquote within the page content. - -###### Text -(`template.HTML`) The blockquote text, excluding the first line if [`Type`](#type) is `alert`. See the [alerts](#alerts) section below. - -###### Type - -(`bool`) The blockquote type. Returns `alert` if the blockquote has an alert designator, else `regular`. See the [alerts](#alerts) section below. - ## Examples In its default configuration, Hugo renders Markdown blockquotes according to the [CommonMark specification]. To create a render hook that does the same thing: @@ -202,4 +184,4 @@ layouts/ └── render-blockquote-regular.html ``` -{{% include "/render-hooks/_common/pageinner.md" %}} +{{% include "/_common/render-hooks/pageinner.md" %}} diff --git a/content/en/render-hooks/code-blocks.md b/content/en/render-hooks/code-blocks.md index 9622c3883..8e46532a5 100755 --- a/content/en/render-hooks/code-blocks.md +++ b/content/en/render-hooks/code-blocks.md @@ -2,14 +2,8 @@ title: Code block render hooks linkTitle: Code blocks description: Create a code block render hook to override the rendering of Markdown code blocks to HTML. -categories: [render hooks] +categories: [] keywords: [] -menu: - docs: - parent: render-hooks - weight: 40 -weight: 40 -toc: true --- ## Markdown @@ -56,42 +50,33 @@ Although `style` is a global HTML attribute, when used in an info string it is a Code block render hook templates receive the following [context](g): -###### Attributes +Attributes +: (`map`) The generic attributes from the info string. -(`map`) The generic attributes from the info string. +Inner +: (`string`) The content between the leading and trailing code fences, excluding the info string. -###### Inner +Options +: (`map`) The highlighting options from the info string. -(`string`) The content between the leading and trailing code fences, excluding the info string. +Ordinal +: (`int`) The zero-based ordinal of the code block on the page. -###### Options +Page +: (`page`) A reference to the current page. -(`map`) The highlighting options from the info string. +PageInner +: {{< new-in 0.125.0 />}} +: (`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). -###### Ordinal +Position +: (`text.Position`) The position of the code block within the page content. -(`int`) The zero-based ordinal of the code block on the page. - -###### Page - -(`page`) A reference to the current page. - -###### PageInner - -{{< new-in 0.125.0 />}} - -(`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). +Type +: (`string`) The first word of the info string, typically the code language. [`RenderShortcodes`]: /methods/page/rendershortcodes -###### Position - -(`text.Position`) The position of the code block within the page content. - -###### Type - -(`string`) The first word of the info string, typically the code language. - ## Examples In its default configuration, Hugo renders fenced code blocks by passing the code sample through the Chroma syntax highlighter and wrapping the result. To create a render hook that does the same thing: @@ -147,4 +132,4 @@ Hugo includes an [embedded code block render hook] to render [GoAT diagrams]. [embedded code block render hook]: {{% eturl render-codeblock-goat %}} [GoAT diagrams]: /content-management/diagrams/#goat-diagrams-ascii -{{% include "/render-hooks/_common/pageinner.md" %}} +{{% include "/_common/render-hooks/pageinner.md" %}} diff --git a/content/en/render-hooks/headings.md b/content/en/render-hooks/headings.md index 7c9d6b6fe..f4ded9b70 100755 --- a/content/en/render-hooks/headings.md +++ b/content/en/render-hooks/headings.md @@ -2,59 +2,44 @@ title: Heading render hooks linkTitle: Headings description: Create a heading render hook to override the rendering of Markdown headings to HTML. -categories: [render hooks] +categories: [] keywords: [] -menu: - docs: - parent: render-hooks - weight: 50 -weight: 50 -toc: true --- ## Context Heading render hook templates receive the following [context](g): -###### Anchor +Anchor +: (`string`) The `id` attribute of the heading element. -(`string`) The `id` attribute of the heading element. +Attributes +: (`map`) The [Markdown attributes], available if you configure your site as follows: -###### Attributes + {{< code-toggle file=hugo >}} + [markup.goldmark.parser.attribute] + title = true + {{< /code-toggle >}} -(`map`) The [Markdown attributes], available if you configure your site as follows: +Level +: (`int`) The heading level, 1 through 6. + +Page +: (`page`) A reference to the current page. + +PageInner +: {{< new-in 0.125.0 />}} +: (`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). + +PlainText +: (`string`) The heading text as plain text. + +Text +: (`template.HTML`) The heading text. [Markdown attributes]: /content-management/markdown-attributes/ - -{{< code-toggle file=hugo >}} -[markup.goldmark.parser.attribute] -title = true -{{< /code-toggle >}} - -###### Level - -(`int`) The heading level, 1 through 6. - -###### Page - -(`page`) A reference to the current page. - -###### PageInner - -{{< new-in 0.125.0 />}} - -(`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). - [`RenderShortcodes`]: /methods/page/rendershortcodes -###### PlainText - -(`string`) The heading text as plain text. - -###### Text - -(`template.HTML`) The heading text. - ## Examples In its default configuration, Hugo renders Markdown headings according to the [CommonMark specification] with the addition of automatic `id` attributes. To create a render hook that does the same thing: @@ -76,4 +61,4 @@ To add an anchor link to the right of each heading: {{< /code >}} -{{% include "/render-hooks/_common/pageinner.md" %}} +{{% include "/_common/render-hooks/pageinner.md" %}} diff --git a/content/en/render-hooks/images.md b/content/en/render-hooks/images.md index e0e5ce99b..c443c38c1 100755 --- a/content/en/render-hooks/images.md +++ b/content/en/render-hooks/images.md @@ -2,14 +2,8 @@ title: Image render hooks linkTitle: Images description: Create an image render to hook override the rendering of Markdown images to HTML. -categories: [render hooks] +categories: [] keywords: [] -menu: - docs: - parent: render-hooks - weight: 60 -weight: 60 -toc: true --- ## Markdown @@ -28,55 +22,44 @@ These components are passed into the render hook [context](g) as shown below. Image render hook templates receive the following context: -###### Attributes +Attributes +: (`map`) The [Markdown attributes], available if you configure your site as follows: -(`map`) The [Markdown attributes], available if you configure your site as follows: + {{< code-toggle file=hugo >}} + [markup.goldmark.parser] + wrapStandAloneImageWithinParagraph = false + [markup.goldmark.parser.attribute] + block = true + {{< /code-toggle >}} + +Destination +: (`string`) The image destination. + +IsBlock +: (`bool`) Reports whether a standalone image is not wrapped within a paragraph element. + +Ordinal +: (`int`) The zero-based ordinal of the image on the page. + +Page +: (`page`) A reference to the current page. + +PageInner +: {{< new-in 0.125.0 />}} +: (`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). + +PlainText +: (`string`) The image description as plain text. + +Text +: (`template.HTML`) The image description. + +Title +: (`string`) The image title. [Markdown attributes]: /content-management/markdown-attributes/ - -{{< code-toggle file=hugo >}} -[markup.goldmark.parser] -wrapStandAloneImageWithinParagraph = false -[markup.goldmark.parser.attribute] -block = true -{{< /code-toggle >}} - -###### Destination - -(`string`) The image destination. - -###### IsBlock - -(`bool`) Returns true if a standalone image is not wrapped within a paragraph element. - -###### Ordinal - -(`int`) The zero-based ordinal of the image on the page. - -###### Page - -(`page`) A reference to the current page. - -###### PageInner - -{{< new-in 0.125.0 />}} - -(`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). - [`RenderShortcodes`]: /methods/page/rendershortcodes -###### PlainText - -(`string`) The image description as plain text. - -###### Text - -(`template.HTML`) The image description. - -###### Title - -(`string`) The image title. - ## Examples {{< note >}} @@ -138,7 +121,7 @@ A custom render hook, even when provided by a theme or module, will override the {{< note >}} The embedded image render hook is automatically enabled for multilingual single-host sites if [duplication of shared page resources] is disabled. This is the default configuration for multilingual single-host sites. -[duplication of shared page resources]: /getting-started/configuration-markup/#duplicateresourcefiles +[duplication of shared page resources]: /configuration/markup/#duplicateresourcefiles {{< /note >}} 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. @@ -157,4 +140,4 @@ target = 'assets' Note that the embedded image render hook does not perform image processing. Its sole purpose is to resolve Markdown image destinations. -{{% include "/render-hooks/_common/pageinner.md" %}} +{{% include "/_common/render-hooks/pageinner.md" %}} diff --git a/content/en/render-hooks/introduction.md b/content/en/render-hooks/introduction.md index f332043c5..4325294e3 100755 --- a/content/en/render-hooks/introduction.md +++ b/content/en/render-hooks/introduction.md @@ -1,14 +1,9 @@ --- title: Introduction description: An introduction to Hugo's render hooks. -categories: [render hooks] +categories: [] keywords: [] -menu: - docs: - identifier: render-hooks-introduction - parent: render-hooks - weight: 20 -weight: 20 +weight: 10 --- When rendering Markdown to HTML, render hooks override the conversion. Each render hook is a template, with one template for each supported element type: @@ -37,7 +32,7 @@ For example, consider this Markdown: ![kitten](kitten.jpg) ``` -Without link or image render hooks, this example above is rendered to: +Without link or image render hooks, the example above is rendered to: ```html

        Hugo

        diff --git a/content/en/render-hooks/links.md b/content/en/render-hooks/links.md index 4c86557ea..cd7e043df 100755 --- a/content/en/render-hooks/links.md +++ b/content/en/render-hooks/links.md @@ -2,14 +2,8 @@ title: Link render hooks linkTitle: Links description: Create a link render hook to override the rendering of Markdown links to HTML. -categories: [render hooks] +categories: [] keywords: [] -menu: - docs: - parent: render-hooks - weight: 70 -weight: 70 -toc: true --- ## Markdown @@ -28,34 +22,27 @@ These components are passed into the render hook [context](g) as shown below. Link render hook templates receive the following context: -###### Destination +Destination +: (`string`) The link destination. -(`string`) The link destination. +Page +: (`page`) A reference to the current page. -###### Page +PageInner +: {{< new-in 0.125.0 />}} +: (`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). -(`page`) A reference to the current page. +PlainText +: (`string`) The link description as plain text. -###### PageInner +Text +: (`template.HTML`) The link description. -{{< new-in 0.125.0 />}} - -(`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). +Title +: (`string`) The link title. [`RenderShortcodes`]: /methods/page/rendershortcodes -###### PlainText - -(`string`) The link description as plain text. - -###### Text - -(`template.HTML`) The link description. - -###### Title - -(`string`) The link title. - ## Examples {{< note >}} @@ -106,7 +93,7 @@ A custom render hook, even when provided by a theme or module, will override the {{< note >}} The embedded link render hook is automatically enabled for multilingual single-host sites if [duplication of shared page resources] is disabled. This is the default configuration for multilingual single-host sites. -[duplication of shared page resources]: /getting-started/configuration-markup/#duplicateresourcefiles +[duplication of shared page resources]: /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](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. @@ -123,4 +110,4 @@ source = 'static' target = 'assets' {{< /code-toggle >}} -{{% include "/render-hooks/_common/pageinner.md" %}} +{{% include "/_common/render-hooks/pageinner.md" %}} diff --git a/content/en/render-hooks/passthrough.md b/content/en/render-hooks/passthrough.md index 798225061..bfbf4d5fb 100755 --- a/content/en/render-hooks/passthrough.md +++ b/content/en/render-hooks/passthrough.md @@ -1,25 +1,19 @@ --- title: Passthrough render hooks linkTitle: Passthrough -description: Create a passthrough render hook to override the rendering of text snippets captured by the Goldmark passthrough extension. -categories: [render hooks] +description: Create a passthrough render hook to override the rendering of text snippets captured by the Goldmark Passthrough extension. +categories: [] keywords: [] -menu: - docs: - parent: render-hooks - weight: 80 -weight: 80 -toc: true --- {{< new-in 0.132.0 />}} ## Overview -Hugo uses [Goldmark] to render Markdown to HTML. Goldmark supports custom extensions to extend its core functionality. The Goldmark [passthrough extension] captures and preserves raw Markdown within delimited snippets of text, including the delimiters themselves. These are known as _passthrough elements_. +Hugo uses [Goldmark] to render Markdown to HTML. Goldmark supports custom extensions to extend its core functionality. The [Passthrough] extension captures and preserves raw Markdown within delimited snippets of text, including the delimiters themselves. These are known as _passthrough elements_. [Goldmark]: https://github.com/yuin/goldmark -[passthrough extension]: /getting-started/configuration-markup/#passthrough +[Passthrough]: /configuration/markup/#passthrough Depending on your choice of delimiters, Hugo will classify a passthrough element as either _block_ or _inline_. Consider this contrived example: @@ -33,7 +27,7 @@ passthrough element with opening and closing block delimiters. This is an \(inline\) passthrough element with opening and closing inline delimiters. {{< /code >}} -Update your site configuration to enable the passthrough extension and define opening and closing delimiters for each passthrough element type, either `block` or `inline`. For example: +Update your site configuration to enable the Passthrough extension and define opening and closing delimiters for each passthrough element type, either `block` or `inline`. For example: {{< code-toggle file=hugo >}} [markup.goldmark.extensions.passthrough] @@ -45,7 +39,7 @@ 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 the LaTeX markup language. +The 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/ @@ -55,44 +49,37 @@ To enable custom rendering of passthrough elements, create a passthrough render Passthrough render hook templates receive the following [context](g): -###### Attributes +Attributes +: (`map`) The [Markdown attributes], available if you configure your site as follows: -(`map`) The [Markdown attributes], available if you configure your site as follows: + {{< code-toggle file=hugo >}} + [markup.goldmark.parser.attribute] + block = true + {{< /code-toggle >}} + + Hugo populates the `Attributes` map for _block_ passthrough elements. Markdown attributes are not applicable to _inline_ elements. + +Inner +: (`string`) The inner content of the passthrough element, excluding the delimiters. + +Ordinal +: (`int`) The zero-based ordinal of the passthrough element on the page. + +Page +: (`page`) A reference to the current page. + +PageInner +: (`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). + +Position +: (`string`) The position of the passthrough element within the page content. + +Type +: (`string`) The passthrough element type, either `block` or `inline`. [Markdown attributes]: /content-management/markdown-attributes/ - -{{< code-toggle file=hugo >}} -[markup.goldmark.parser.attribute] -block = true -{{< /code-toggle >}} - -Hugo populates the `Attributes` map for _block_ passthrough elements. Markdown attributes are not applicable to _inline_ elements. - -###### Inner -(`string`) The inner content of the passthrough element, excluding the delimiters. - -###### Ordinal - -(`int`) The zero-based ordinal of the passthrough element on the page. - -###### Page - -(`page`) A reference to the current page. - -###### PageInner - -(`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). - [`RenderShortcodes`]: /methods/page/rendershortcodes -###### Position - -(`string`) The position of the passthrough element within the page content. - -###### Type - -(`string`) The passthrough element type, either `block` or `inline`. - ## Example Instead of client-side JavaScript rendering of mathematical markup using MathJax or KaTeX, create a passthrough render hook which calls the [`transform.ToMath`] function. @@ -134,4 +121,4 @@ layouts/ └── render-passthrough-inline.html ``` -{{% include "/render-hooks/_common/pageinner.md" %}} +{{% include "/_common/render-hooks/pageinner.md" %}} diff --git a/content/en/render-hooks/tables.md b/content/en/render-hooks/tables.md index d131664fc..eeda80692 100755 --- a/content/en/render-hooks/tables.md +++ b/content/en/render-hooks/tables.md @@ -2,14 +2,8 @@ title: Table render hooks linkTitle: Tables description: Create a table render hook to override the rendering of Markdown tables to HTML. -categories: [render hooks] +categories: [] keywords: [] -menu: - docs: - parent: render-hooks - weight: 90 -weight: 90 -toc: true --- {{< new-in 0.134.0 />}} @@ -18,50 +12,44 @@ toc: true Table render hook templates receive the following [context](g): -###### Attributes +Attributes +: (`map`) The [Markdown attributes], available if you configure your site as follows: -(`map`) The [Markdown attributes], available if you configure your site as follows: + {{< code-toggle file=hugo >}} + [markup.goldmark.parser.attribute] + block = true + {{< /code-toggle >}} + +Ordinal +: (`int`) The zero-based ordinal of the table on the page. + +Page +: (`page`) A reference to the current page. + +PageInner +: (`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). + +Position +: (`string`) The position of the table within the page content. + +THead +: (`slice`) A slice of table header rows, where each element is a slice of table cells. + +TBody +: (`slice`) A slice of table body rows, where each element is a slice of table cells. [Markdown attributes]: /content-management/markdown-attributes/ - -{{< code-toggle file=hugo >}} -[markup.goldmark.parser.attribute] -block = true -{{< /code-toggle >}} - -###### Ordinal - -(`int`) The zero-based ordinal of the table on the page. - -###### Page - -(`page`) A reference to the current page. - -###### PageInner - -(`page`) A reference to a page nested via the [`RenderShortcodes`] method. [See details](#pageinner-details). - [`RenderShortcodes`]: /methods/page/rendershortcodes -###### Position - -(`string`) The position of the table within the page content. - -###### THead -(`slice`) A slice of table header rows, where each element is a slice of table cells. - -###### TBody -(`slice`) A slice of table body rows, where each element is a slice of table cells. - ## Table cells Each table cell within the slice of slices returned by the `THead` and `TBody` methods has the following fields: -###### Alignment -(`string`) The alignment of the text within the table cell, one of `left`, `center`, or `right`. +Alignment +: (`string`) The alignment of the text within the table cell, one of `left`, `center`, or `right`. -###### Text -(`template.HTML`) The text within the table cell. +Text +: (`template.HTML`) The text within the table cell. ## Example @@ -109,4 +97,4 @@ In its default configuration, Hugo renders Markdown tables according to the [Git {{< /code >}} -{{% include "/render-hooks/_common/pageinner.md" %}} +{{% include "/_common/render-hooks/pageinner.md" %}} diff --git a/content/en/shortcodes/_index.md b/content/en/shortcodes/_index.md index 2d9a8fdd6..826ee5796 100644 --- a/content/en/shortcodes/_index.md +++ b/content/en/shortcodes/_index.md @@ -1,16 +1,7 @@ --- title: Shortcodes - 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 index c87765a6b..e3bb621ca 100755 --- a/content/en/shortcodes/comment.md +++ b/content/en/shortcodes/comment.md @@ -1,14 +1,8 @@ --- title: Comment description: Include hidden comments in your content with the comment shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - identifier: shortcodes-comment - parent: shortcodes - weight: -weight: expiryDate: 2025-01-22 # deprecated 2025-02-01 in v0.143.0 and immediately removed from the documentation --- diff --git a/content/en/shortcodes/details.md b/content/en/shortcodes/details.md index 029429e2d..82c950349 100755 --- a/content/en/shortcodes/details.md +++ b/content/en/shortcodes/details.md @@ -1,14 +1,8 @@ --- title: Details description: Insert an HTML details element into your content using the details shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - parent: shortcodes - weight: -weight: -toc: true --- {{< new-in 0.140.0 />}} @@ -44,7 +38,7 @@ Which looks like this in your browser: This is a **bold** word. {{< /details >}} -## Parameters +## Arguments summary : (`string`) The content of the child `summary` element rendered from Markdown to HTML. Default is `Details`. diff --git a/content/en/shortcodes/figure.md b/content/en/shortcodes/figure.md index 69aafe894..8e77ab4f4 100755 --- a/content/en/shortcodes/figure.md +++ b/content/en/shortcodes/figure.md @@ -1,14 +1,8 @@ --- title: Figure description: Insert an HTML figure element into your content using the figure shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - parent: shortcodes - weight: -weight: -toc: true --- {{< note >}} @@ -57,7 +51,7 @@ Which looks like this in your browser: class="ma0 w-75" >}} -## Parameters +## Arguments src : (`string`) The `src` attribute of the `img` element. Typically this is a [page resource](g) or a [global resource](g). diff --git a/content/en/shortcodes/gist.md b/content/en/shortcodes/gist.md index 8a247be8d..bd8367691 100755 --- a/content/en/shortcodes/gist.md +++ b/content/en/shortcodes/gist.md @@ -1,13 +1,8 @@ --- title: Gist description: Embed a GitHub Gist in your content using the gist shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - parent: shortcodes - weight: -weight: expiryDate: 2027-02-01 # deprecated 2025-02-01 in v0.143.0 --- @@ -15,7 +10,7 @@ expiryDate: 2027-02-01 # deprecated 2025-02-01 in v0.143.0 The `gist` shortcode was deprecated in version 0.143.0 and will be removed in a future release. To continue embedding GitHub Gists in your content, you'll need to create a custom shortcode: 1. Create a new file: Create a file named `gist.html` within the `layouts/shortcodes` directory. -2. Copy the source code: Paste the [original source code] of the gist shortcode into the newly created `gist.html` file. +1. Copy the source code: Paste the [original source code] of the gist shortcode into the newly created `gist.html` file. This will allow you to maintain the functionality of embedding GitHub Gists in your content after the deprecation of the original shortcode. diff --git a/content/en/shortcodes/highlight.md b/content/en/shortcodes/highlight.md index b6ffe547f..74d8e7d65 100755 --- a/content/en/shortcodes/highlight.md +++ b/content/en/shortcodes/highlight.md @@ -1,14 +1,8 @@ --- title: Highlight description: Insert syntax-highlighted code into your content using the highlight shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - parent: shortcodes - weight: -weight: -toc: true --- {{< note >}} @@ -25,10 +19,10 @@ The primary use case for the `highlight` shortcode in Markdown is to apply synta [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]. +The `highlight` shortcode calls the [`transform.Highlight`] function which uses the [Chroma] syntax highlighter, supporting over 200 languages with more than 40 [highlighting styles]. [chroma]: https://github.com/alecthomas/chroma -[available styles]: https://xyproto.github.io/splash/docs/ +[highlighting styles]: /quick-reference/syntax-highlighting-styles/ [`transform.Highlight`]: /functions/transform/highlight/ ## Arguments @@ -50,13 +44,13 @@ LANG 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 +[site configuration]: /configuration/markup/#highlight +[supported languages]: /content-management/syntax-highlighting/#languages ## Example ```text -{{}} +{{}} package main import "fmt" @@ -97,7 +91,7 @@ Given the verbosity of the example above, if you need to frequently highlight in {{< code file=layouts/shortcodes/hl.html >}} {{ $code := .Inner | strings.TrimSpace }} -{{ $lang := or (.Get 0) "go" }} +{{ $lang := or (.Get 0) "go" }} {{ $opts := dict "hl_inline" true "noClasses" true }} {{ transform.Highlight $code $lang $opts }} {{< /code >}} @@ -114,4 +108,4 @@ This is some {{< hl >}}fmt.Println("inline"){{< /hl >}} code. Pass the options when calling the shortcode. You can set their default values in your [site configuration]. -{{% include "functions/_common/highlighting-options" %}} +{{% include "_common/syntax-highlighting-options.md" %}} diff --git a/content/en/shortcodes/instagram.md b/content/en/shortcodes/instagram.md index ffe739966..da7c912d6 100755 --- a/content/en/shortcodes/instagram.md +++ b/content/en/shortcodes/instagram.md @@ -1,14 +1,8 @@ --- title: Instagram description: Embed an Instagram post in your content using the instagram shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - parent: shortcodes - weight: -weight: -toc: true --- {{< note >}} diff --git a/content/en/shortcodes/param.md b/content/en/shortcodes/param.md index b7bd31e47..77b8f7711 100755 --- a/content/en/shortcodes/param.md +++ b/content/en/shortcodes/param.md @@ -1,13 +1,8 @@ --- title: Param description: Insert a parameter from front matter or site configuration into your content using the param shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - parent: shortcodes - weight: -weight: --- {{< note >}} @@ -18,7 +13,7 @@ To override Hugo's embedded `param` shortcode, copy the [source code] to a file 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 >}} +{{< code file=example.md >}} --- title: Example date: 2025-01-15T23:29:46-08:00 diff --git a/content/en/shortcodes/qr.md b/content/en/shortcodes/qr.md index 2a82b919f..036798a4b 100755 --- a/content/en/shortcodes/qr.md +++ b/content/en/shortcodes/qr.md @@ -1,14 +1,8 @@ --- title: QR description: Insert a QR code into your content using the qr shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - parent: shortcodes - weight: -weight: -toc: true --- {{< new-in 0.141.0 />}} @@ -84,7 +78,7 @@ EMAIL;TYPE=WORK:jsmith@example.org END:VCARD {{< /qr >}} -## Parameters +## Arguments text : (`string`) The text to encode, falling back to the text between the opening and closing shortcode tags. @@ -98,7 +92,7 @@ scale targetDir : (`string`) The subdirectory within the [`publishDir`] where Hugo will place the generated image. -[`publishDir`]: /getting-started/configuration/#publishdir +[`publishDir`]: /configuration/all/#publishdir alt : (`string`) The `alt` attribute of the `img` element. @@ -109,5 +103,8 @@ class id : (`string`) The `id` attribute of the `img` element. +loading +: (`string`) The `loading` attribute of the `img` element, either `eager` or `lazy`. + title : (`string`) The `title` attribute of the `img` element. diff --git a/content/en/shortcodes/ref.md b/content/en/shortcodes/ref.md index e5d7117c8..de915a5ce 100755 --- a/content/en/shortcodes/ref.md +++ b/content/en/shortcodes/ref.md @@ -1,13 +1,8 @@ --- title: Ref description: Insert a permalink to the given page reference using the ref shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - parent: shortcodes - weight: -weight: --- {{< note >}} @@ -23,28 +18,51 @@ When working with the Markdown [content format], this shortcode has become large [link render hooks]: /render-hooks/images/#default {{< /note >}} -The `ref` shortcode returns the permalink of the given page reference. +## Usage -Example usage: +The `ref` shortcode accepts either a single positional argument (the path) or one or more named arguments, as listed below. -```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" */%}}) -``` +## Arguments -Rendered: +{{% include "_common/ref-and-relref-options.md" %}} -```html -Post 1 -Post 1 -Post 1 -Post 1 -``` +## Examples + +The `ref` shortcode typically provides the destination for a Markdown link. {{< note >}} Always use [Markdown notation] notation when calling this shortcode. [Markdown notation]: /content-management/shortcodes/#notation {{< /note >}} + +The following examples show the rendered output for a page on the English version of the site: + +```md +[Link A]({{%/* ref "/books/book-1" */%}}) + +[Link B]({{%/* ref path="/books/book-1" */%}}) + +[Link C]({{%/* ref path="/books/book-1" lang="de" */%}}) + +[Link D]({{%/* ref path="/books/book-1" lang="de" outputFormat="json" */%}}) +``` + +Rendered: + +```html +Link A + +Link B + +Link C + +Link D +``` + + + + +## Error handling + +{{% include "_common/ref-and-relref-error-handling.md" %}} diff --git a/content/en/shortcodes/relref.md b/content/en/shortcodes/relref.md index 603427cb1..3895e91e4 100755 --- a/content/en/shortcodes/relref.md +++ b/content/en/shortcodes/relref.md @@ -1,13 +1,8 @@ --- title: Relref description: Insert a relative permalink to the given page reference using the relref shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - parent: shortcodes - weight: -weight: --- {{< note >}} @@ -23,28 +18,48 @@ When working with the Markdown [content format], this shortcode has become large [link render hooks]: /render-hooks/links/ {{< /note >}} -The `relref` shortcode returns the relative permalink of the given page reference. +## Usage -Example usage: +The `relref` shortcode accepts either a single positional argument (the path) or one or more named arguments, as listed below. -```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" */%}}) -``` +## Arguments -Rendered: +{{% include "_common/ref-and-relref-options.md" %}} -```html -Post 1 -Post 1 -Post 1 -Post 1 -``` +## Examples + +The `relref` shortcode typically provides the destination for a Markdown link. {{< note >}} Always use [Markdown notation] notation when calling this shortcode. [Markdown notation]: /content-management/shortcodes/#notation {{< /note >}} + +The following examples show the rendered output for a page on the English version of the site: + +```md +[Link A]({{%/* ref "/books/book-1" */%}}) + +[Link B]({{%/* ref path="/books/book-1" */%}}) + +[Link C]({{%/* ref path="/books/book-1" lang="de" */%}}) + +[Link D]({{%/* ref path="/books/book-1" lang="de" outputFormat="json" */%}}) +``` + +Rendered: + +```html +Link A + +Link B + +Link C + +Link D +``` + +## Error handling + +{{% include "_common/ref-and-relref-error-handling.md" %}} diff --git a/content/en/shortcodes/vimeo.md b/content/en/shortcodes/vimeo.md index 2d852471a..1156da91e 100755 --- a/content/en/shortcodes/vimeo.md +++ b/content/en/shortcodes/vimeo.md @@ -1,14 +1,8 @@ --- title: Vimeo description: Embed a Vimeo video in your content using the vimeo shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - parent: shortcodes - weight: -weight: -toc: true --- {{< note >}} @@ -35,7 +29,7 @@ Hugo renders this to: {{< vimeo 55073825 >}} -## Parameters +## Arguments class : (`string`) The `class` attribute of the wrapping `div` element. Adding one or more CSS classes disables inline styling. diff --git a/content/en/shortcodes/x.md b/content/en/shortcodes/x.md index c2f7a58fe..30759cc59 100755 --- a/content/en/shortcodes/x.md +++ b/content/en/shortcodes/x.md @@ -1,14 +1,8 @@ --- title: X description: Embed an X post in your content using the x shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - parent: shortcodes - weight: -weight: -toc: true --- {{< new-in 0.141.0 />}} diff --git a/content/en/shortcodes/youtube.md b/content/en/shortcodes/youtube.md index 1c356c732..3e552d43c 100755 --- a/content/en/shortcodes/youtube.md +++ b/content/en/shortcodes/youtube.md @@ -1,14 +1,8 @@ --- title: YouTube description: Embed a YouTube video in your content using the youtube shortcode. -categories: [shortcodes] +categories: [] keywords: [] -menu: - docs: - parent: shortcodes - weight: -weight: -toc: true --- {{< note >}} @@ -27,7 +21,7 @@ https://www.youtube.com/watch?v=0RKpf3rK57I Include this in your Markdown: -```text +```texts {{}} ``` @@ -35,7 +29,7 @@ Hugo renders this to: {{< youtube 0RKpf3rK57I >}} -## Parameters +## Arguments id : (`string`) The video `id`. Optional if the `id` is provided as a positional argument as shown in the example above. @@ -65,7 +59,7 @@ loading 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`. +: (`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 />}} diff --git a/content/en/showcase/1password-support/bio.md b/content/en/showcase/1password-support/bio.md index 3e15adc9f..32d299bd4 100644 --- a/content/en/showcase/1password-support/bio.md +++ b/content/en/showcase/1password-support/bio.md @@ -1,4 +1,3 @@ - **1Password** is a password manager that keeps you safe online. It protects your secure information behind the one password only you know. The [1Password Support](https://support.1password.com/) website was built from scratch with **Hugo** and enhanced with **React** and **Elasticsearch** to give us the best of both worlds: The simplicity and performance of a static site, with the richness of a hosted web app. diff --git a/content/en/showcase/1password-support/index.md b/content/en/showcase/1password-support/index.md index c0a66ce45..54a30f849 100644 --- a/content/en/showcase/1password-support/index.md +++ b/content/en/showcase/1password-support/index.md @@ -1,12 +1,10 @@ --- - title: 1Password Support date: 2018-02-22 -description: "Showcase: \"Compiles 400 pages in five languages in the blink of an eye.\"" +description: 'Showcase: "Compiles 400 pages in five languages in the blink of an eye."' siteURL: https://support.1password.com/ byline: "[Mitch Cohen](https://github.com/mitchchn), Documentation Team Lead" aliases: [/showcase/1password/] - --- At 1Password, we used to go through a different documentation platform every month: blog engines, ebooks, wikis, site generators written in Ruby and JavaScript. Each was inadequate in its own special way. Then we found **Hugo**. We made one last switch, and we're glad we did. @@ -31,9 +29,9 @@ Finding a tool that will make your customers, writers, designers, _and_ DevOps t ### Tech specs -* [1Password Support](https://support.1password.com) uses Hugo with a custom theme. It shares styles and some template code with [1Password.com](https://1password.com), which we also moved to Hugo in 2016. -* Code and articles live in a private GitHub repository, which is deployed to a static content server using Git hooks. -* Writers build and preview the site on their computers and contribute content using pull requests. -* We use Hugo's [multilingual support](/content-management/multilingual/) to build the site in English, Spanish, French, Italian, German, and Russian. With the help of Hugo, 1Password Support became our very first site in multiple languages. -* Our [contact form](https://support.1password.com/contact) is a single-page React app. We were able to integrate it with Hugo seamlessly thanks to its support for static files. -* The one part of the support site which is not static is our search engine, which we developed with Elasticsearch and host on AWS. +- [1Password Support](https://support.1password.com) uses Hugo with a custom theme. It shares styles and some template code with [1Password.com](https://1password.com), which we also moved to Hugo in 2016. +- Code and articles live in a private GitHub repository, which is deployed to a static content server using Git hooks. +- Writers build and preview the site on their computers and contribute content using pull requests. +- We use Hugo's [multilingual support](/content-management/multilingual/) to build the site in English, Spanish, French, Italian, German, and Russian. With the help of Hugo, 1Password Support became our very first site in multiple languages. +- Our [contact form](https://support.1password.com/contact) is a single-page React app. We were able to integrate it with Hugo seamlessly thanks to its support for static files. +- The one part of the support site which is not static is our search engine, which we developed with Elasticsearch and host on AWS. diff --git a/content/en/showcase/_index.md b/content/en/showcase/_index.md index cec1936ea..e618e8104 100644 --- a/content/en/showcase/_index.md +++ b/content/en/showcase/_index.md @@ -1,4 +1,7 @@ --- title: Showcases -draft: true +cascade: + build: + render: never + list: never --- diff --git a/content/en/myshowcase/bio.md b/content/en/showcase/_template/bio.md similarity index 51% rename from content/en/myshowcase/bio.md rename to content/en/showcase/_template/bio.md index 6b8f7e1a9..5ea389617 100644 --- a/content/en/myshowcase/bio.md +++ b/content/en/showcase/_template/bio.md @@ -1,7 +1,6 @@ - Add some **general info** about Myshowcase here. The site is built by: -* [Person 1](https://example.org) -* [Person 1](https://example.org) +- [Person 1](https://example.org) +- [Person 1](https://example.org) diff --git a/archetypes/showcase/featured.png b/content/en/showcase/_template/featured.png similarity index 100% rename from archetypes/showcase/featured.png rename to content/en/showcase/_template/featured.png diff --git a/content/en/myshowcase/index.md b/content/en/showcase/_template/index.md similarity index 90% rename from content/en/myshowcase/index.md rename to content/en/showcase/_template/index.md index abb4ad6b2..3103903e1 100644 --- a/content/en/myshowcase/index.md +++ b/content/en/showcase/_template/index.md @@ -1,21 +1,15 @@ --- - title: Myshowcase -date: 2021-01-14 +date: draft: true - -description: "A short description of this page." - +description: A short description of this page. # The URL to the site on the internet. siteURL: https://gohugo.io/ - # Link to the site's Hugo source code if public and you can/want to share. # Remove or leave blank if not needed/wanted. siteSource: https://github.com/gohugoio/hugoDocs - # Add credit to the article author. Leave blank or remove if not needed/wanted. -byline: "[bep](https://github.com/bep), Hugo Lead" - +byline: '[bep](https://github.com/bep), Hugo Lead' --- To complete this showcase: diff --git a/content/en/showcase/alora-labs/index.md b/content/en/showcase/alora-labs/index.md index 559169319..5e676bad3 100644 --- a/content/en/showcase/alora-labs/index.md +++ b/content/en/showcase/alora-labs/index.md @@ -1,7 +1,7 @@ --- title: Alora Labs date: 2021-05-27 -description: "Showcase: \"Making performant websites accessible for everyone.\"" +description: 'Showcase: "Making performant websites accessible for everyone."' siteURL: https://aloralabs.com/ siteSource: https://github.com/aloralabs/homepage aliases: [/showcase/aloralabs/] diff --git a/content/en/showcase/ampio-help/bio.md b/content/en/showcase/ampio-help/bio.md index c7dd9894a..a08b26be7 100644 --- a/content/en/showcase/ampio-help/bio.md +++ b/content/en/showcase/ampio-help/bio.md @@ -1,11 +1,10 @@ - __We are Ampio.__ We design and manufacture a building automation system that provides control, comfort, safety and reliability. Visit [our page](http://ampio.com/) to learn more about our solution! __Ampio Knowledge Base__ is a service built and maintained with Hugo. It is a self-service support platform for our customers and certified installers. It also contains a complete portfolio of our modules---building blocks of the Ampio building automation system. The site is built by: -* [@mgetka](https://github.com/mgetka), developer -* [@SteynAnna](https://github.com/SteynAnna), maintainer +- [@mgetka](https://github.com/mgetka), developer +- [@SteynAnna](https://github.com/SteynAnna), maintainer and other members of the Ampio team responsible for content creation. diff --git a/content/en/showcase/ampio-help/index.md b/content/en/showcase/ampio-help/index.md index 2daafbbe1..137244722 100644 --- a/content/en/showcase/ampio-help/index.md +++ b/content/en/showcase/ampio-help/index.md @@ -1,7 +1,6 @@ --- title: Ampio Knowledge Base date: 2022-10-30 - description: "Knowledge base for the Ampio building automation system." siteURL: https://help.ampio.com/ --- @@ -39,7 +38,7 @@ Hugo was our first choice of SSG. The multilingualism support was the primary fe The rich functionalities of WordPress WYSIWYG editors soon turned out to be a curse. It became burdensome to maintain formatting consistency across documents prepared by multiple contributors. When we considered Markdown, we knew that it would give us a lot less flexibility. In our case, it proved to be a blessing in disguise---the constraints imposed by the notation ensured that each document was prepared in the same way. And in the cases where Markdown was not enough, Hugo shortcodes gave us all that we needed to get the results we anticipated. -In terms of PDF generation, we utilized [custom output formats](/templates/output-formats/) to produce intermediary document representations, which are consumed by our custom tool transforming them to TeX documents, which are finally used to produce PDF files. +In terms of PDF generation, we utilized [custom output formats](/configuration/output-formats/) to produce intermediary document representations, which are consumed by our custom tool transforming them to TeX documents, which are finally used to produce PDF files. Custom output formats were also used to create search indexes. The search functionality is built on the brilliant [TNTSearch](https://github.com/teamtnt/tntsearch) library. The search queries and results are handled by PHP snippets embedded into static documents handled by Hugo. @@ -66,7 +65,7 @@ Total in 1096 ms Very quickly it became apparent that our initial concerns about the adaptation of the workflow among contributors were grossly exaggerated. Markdown is fairly straightforward and did not cause any trouble for the contributors. -We recommended that our colleagues use Visual Studio Code as a tool for content creation. The project’s repository tracks project-scoped configuration of the editor, which includes a set of _tasks_ allowing to run a live server from the GUI level. This is very useful for those who are easily frightened when faced with the mighty terminal. +We recommended that our colleagues use Visual Studio Code as a tool for content creation. The project's repository tracks project-scoped configuration of the editor, which includes a set of _tasks_ allowing to run a live server from the GUI level. This is very useful for those who are easily frightened when faced with the mighty terminal. The basic skills of the Git workflow were also easily acquired. At the end of the day, builds and deployments are fully managed by CI/CD processes, so the administration of the service drills down to reviewing and accepting merge requests in the Git frontend. As a side effect, we receive a full and clear history of contributions, which is well appreciated by our quality assurance auditors. diff --git a/content/en/showcase/bypasscensorship/bio.md b/content/en/showcase/bypasscensorship/bio.md index 0a847df1e..a6c98f9ba 100644 --- a/content/en/showcase/bypasscensorship/bio.md +++ b/content/en/showcase/bypasscensorship/bio.md @@ -2,5 +2,5 @@ Bypass Censorship find and promote tools that provide Internet access to everyon The site is built by: -* [Leyla Avsar](https://www.leylaavsar.com/) (designer) -* [Fredrik Jonsson](https://xdeb.net/) (dev) +- [Leyla Avsar](https://www.leylaavsar.com/) (designer) +- [Fredrik Jonsson](https://xdeb.net/) (dev) diff --git a/content/en/showcase/bypasscensorship/index.md b/content/en/showcase/bypasscensorship/index.md index 8cbda9aa6..bd1a072c0 100644 --- a/content/en/showcase/bypasscensorship/index.md +++ b/content/en/showcase/bypasscensorship/index.md @@ -1,10 +1,9 @@ --- title: Bypass Censorship date: 2019-06-16 -description: "Showcase: Bypass Censorship find and promote tools that provide Internet access to everyone." +description: 'Showcase: "Bypass Censorship find and promote tools that provide Internet access to everyone."' siteURL: https://www.bypasscensorship.org/ byline: "[Fredrik Jonsson](https://xdeb.net/), Web developer & Linux sysadmin" - --- The British Broadcasting Corporation (BBC) (UK), Deutsche Welle (DW) (Germany), France Médias Monde (FMM) (France), the U.S. Agency for Global Media (USAGM) (US) and the Open Technology Fund (OTF) (US) co-sponsor the Bypass Censorship website. diff --git a/content/en/showcase/digitalgov/bio.md b/content/en/showcase/digitalgov/bio.md index db3ffafaf..70bb990b9 100644 --- a/content/en/showcase/digitalgov/bio.md +++ b/content/en/showcase/digitalgov/bio.md @@ -1,2 +1 @@ - **Digital.gov** helps people in the U.S. government deliver better, more accessible digital services through publishing essential guidance, resources, tools, and online events that make it easier for people to design, build, and deliver essential services for the public. diff --git a/content/en/showcase/digitalgov/index.md b/content/en/showcase/digitalgov/index.md index 3db2c608f..7f0584712 100644 --- a/content/en/showcase/digitalgov/index.md +++ b/content/en/showcase/digitalgov/index.md @@ -1,7 +1,7 @@ --- title: Digital.gov date: 2020-05-01 -description: "Showcase: \"Guidance on building better digital services in government.\"" +description: 'Showcase: "Guidance on building better digital services in government."' siteURL: https://digital.gov/ siteSource: https://github.com/gsa/digitalgov.gov --- @@ -14,15 +14,15 @@ Digital.gov is built using the [U.S. Web Design System](https://designsystem.dig - **Start with real user needs** — We used human-centered design methods to inform our product decisions (like qualitative user research), and gathered feedback from real users. We also continually test our assumptions with small experiments. - **Earn trust** —We recognize that trust has to be earned every time. We are including all [required links and content](https://digital.gov/resources/required-web-content-and-links/) on our site, clearly identifying as a government site, building with modern best practices, and using HTTPS. -- **Embrace accessibility** — [Accessibility](https://digital.gov/resources/intro-accessibility/) affects everybody, and we built it into every decision. We’re continually working to conform to Section 508 requirements, use user experience best practices, and support a wide range of devices. -- **Promote continuity** — We started from shared solutions like USWDS and [Federalist](https://federalist.18f.gov/). We designed our site to clearly identify as a government site by including USWDS’s .gov banner, common colors and patterns, and built with modern best practices. +- **Embrace accessibility** — [Accessibility](https://digital.gov/resources/intro-accessibility/) affects everybody, and we built it into every decision. We're continually working to conform to Section 508 requirements, use user experience best practices, and support a wide range of devices. +- **Promote continuity** — We started from shared solutions like USWDS and [Federalist](https://federalist.18f.gov/). We designed our site to clearly identify as a government site by including USWDS's .gov banner, common colors and patterns, and built with modern best practices. - **Listen** — We actively collect user feedback and web metrics. We use the [Digital Analytics Program](https://digital.gov/services/dap/) (DAP) and analyze the data to discover actionable insights. We make small, incremental changes to continuously improve our website by listening to readers and learning from what we hear. _More on the [USWDS maturity model »](https://designsystem.digital.gov/maturity-model/)_ ## Open tools -We didn’t start from scratch. We built and designed the Digital.gov using many of the open-source tools and services that we develop for government here in the [Technology Transformation Services](https://www.gsa.gov/tts/) (TTS). +We didn't start from scratch. We built and designed the Digital.gov using many of the open-source tools and services that we develop for government here in the [Technology Transformation Services](https://www.gsa.gov/tts/) (TTS). Using services that make it possible to design, build, and iterate quickly are essential to modern web design and development, which is why [Federalist](https://federalist.18f.gov/) and the [U.S. Web Design System](https://designsystem.digital.gov/) are such a great combination. diff --git a/content/en/showcase/fireship/bio.md b/content/en/showcase/fireship/bio.md index faf739bfa..2a5639aa7 100644 --- a/content/en/showcase/fireship/bio.md +++ b/content/en/showcase/fireship/bio.md @@ -1,6 +1,5 @@ - **Fireship.io** is an ecosystem of detailed and practical resources for developers who want to build and ship high-quality apps. The site is built by: -* [Jeff Delaney](https://fireship.io/contributors/jeff-delaney/) +- [Jeff Delaney](https://fireship.io/contributors/jeff-delaney/) diff --git a/content/en/showcase/fireship/index.md b/content/en/showcase/fireship/index.md index a229e4f6a..454ee87d7 100644 --- a/content/en/showcase/fireship/index.md +++ b/content/en/showcase/fireship/index.md @@ -1,7 +1,7 @@ --- title: fireship.io date: 2019-02-02 -description: "Showcase: \"Hugo helps us create complex technical content that integrates engaging web components\"" +description: 'Showcase: "Hugo helps us create complex technical content that integrates engaging web components."' siteURL: https://fireship.io siteSource: https://github.com/fireship-io/fireship.io byline: "[Jeff Delaney](https://github.com/codediodeio), Fireship.io Creator" diff --git a/content/en/showcase/forestry/bio.md b/content/en/showcase/forestry/bio.md index 0b8f28743..23951a1c6 100644 --- a/content/en/showcase/forestry/bio.md +++ b/content/en/showcase/forestry/bio.md @@ -1,4 +1,3 @@ - Forestry.io is a Git-backed CMS (content management system) for websites and web products built using static site generators such as Hugo. Forestry bridges the gap between developers and their teams, by making development fun and easy, while providing powerful content management for their teams. diff --git a/content/en/showcase/forestry/index.md b/content/en/showcase/forestry/index.md index fabcb7cd3..5b8872316 100644 --- a/content/en/showcase/forestry/index.md +++ b/content/en/showcase/forestry/index.md @@ -1,7 +1,7 @@ --- title: Forestry.io date: 2018-03-16 -description: "Showcase: \"Seeing Hugo in action is a whole different world of awesome.\"" +description: 'Showcase: "Seeing Hugo in action is a whole different world of awesome."' siteURL: https://forestry.io/ siteSource: https://github.com/forestryio/forestry.io --- @@ -10,7 +10,7 @@ It was clear from the get-go that we had to go with a static site generator. Sta ### Why Hugo? -In our early research we looked at Ionic’s [site](https://github.com/ionic-team/ionic) to get some inspiration. They used Jekyll to build their website. While Jekyll is a great generator, the build times for larger sites can be painfully slow. With more than 150 pages plus many custom configurations and add-ons, our website doesn’t fall into the low-volume category anymore. Our developers want a smooth experience when working on the website and our content editors need the ability to preview content quickly. In short, we need our builds to be lightning fast. +In our early research we looked at Ionic's [site](https://github.com/ionic-team/ionic) to get some inspiration. They used Jekyll to build their website. While Jekyll is a great generator, the build times for larger sites can be painfully slow. With more than 150 pages plus many custom configurations and add-ons, our website doesn't fall into the low-volume category anymore. Our developers want a smooth experience when working on the website and our content editors need the ability to preview content quickly. In short, we need our builds to be lightning fast. We knew Hugo was fast but we did [some additional benchmarking](https://forestry.io/blog/hugo-vs-jekyll-benchmark/) before making our decision. Seeing Hugo in action is a whole different world of awesome. Hugo takes less than one second to build our 150-page site! Take a look: @@ -35,14 +35,14 @@ Lastly, we want to take the opportunity to give some love to other amazing tools ### What tools did we use? -* Our Norwegian designer Nichlas is in love with [**Sketch**](https://www.sketchapp.com/). From what we hear it’s a designer’s dream come true. -* Some say our main graphic is [mesmerizing](https://x.com/hmncllctv/status/968907474664284160). Nichlas created it using [**3DS Max**](https://www.autodesk.com/products/3ds-max/overview). -* [**Hugo**](https://gohugo.io/) -- of course. -* Chris can’t think of modern web development without [**Gulp**](https://gulpjs.com/) & [**Webpack**](https://webpack.js.org/). We used them to add additional build steps such as Browsersync, CSS, JS and SVG optimization. -* Speaking about adding steps to our build, our lives would be much harder without [**CircleCI**](https://circleci.com/) for continuous deployment and automated testing purposes. -* We can’t stop raving about [**Algolia**](https://www.algolia.com/). Chris loves it and even wrote a tutorial on [how to implement Algolia](https://forestry.io/blog/search-with-algolia-in-hugo/) into static sites using Hugo’s [Custom Outputs](/templates/output-formats/). -* [**Cloudinary**](https://cloudinary.com/) is probably one of the easiest ways to get responsive images into your website. -* We might be a little biased on this one - We think [**Forestry.io**](https://forestry.io/) is a great way to add a content management system with a clean UI on top of your site without interrupting your experience as a developer. -* For hosting purposes we use the almighty [**AWS**](https://aws.amazon.com/). -* [**Formspree.io**](https://formspree.io/) is managing our support and enterprise requests. -* We also use browser cookies and JS to customize our user’s experience and give it a more dynamic feel. +- Our Norwegian designer Nichlas is in love with [**Sketch**](https://www.sketchapp.com/). From what we hear it's a designer's dream come true. +- Some say our main graphic is [mesmerizing](https://x.com/hmncllctv/status/968907474664284160). Nichlas created it using [**3DS Max**](https://www.autodesk.com/products/3ds-max/overview). +- [**Hugo**](https://gohugo.io/) -- of course. +- Chris can't think of modern web development without [**Gulp**](https://gulpjs.com/) & [**Webpack**](https://webpack.js.org/). We used them to add additional build steps such as Browsersync, CSS, JS and SVG optimization. +- Speaking about adding steps to our build, our lives would be much harder without [**CircleCI**](https://circleci.com/) for continuous deployment and automated testing purposes. +- We can't stop raving about [**Algolia**](https://www.algolia.com/). Chris loves it and even wrote a tutorial on [how to implement Algolia](https://forestry.io/blog/search-with-algolia-in-hugo/) into static sites using Hugo's [custom output formats](/configuration/output-formats/). +- [**Cloudinary**](https://cloudinary.com/) is probably one of the easiest ways to get responsive images into your website. +- We might be a little biased on this one - We think [**Forestry.io**](https://forestry.io/) is a great way to add a content management system with a clean UI on top of your site without interrupting your experience as a developer. +- For hosting purposes we use the almighty [**AWS**](https://aws.amazon.com/). +- [**Formspree.io**](https://formspree.io/) is managing our support and enterprise requests. +- We also use browser cookies and JS to customize our user's experience and give it a more dynamic feel. diff --git a/content/en/showcase/godot-tutorials/index.md b/content/en/showcase/godot-tutorials/index.md index 3b71fd8bc..fe4f9337e 100644 --- a/content/en/showcase/godot-tutorials/index.md +++ b/content/en/showcase/godot-tutorials/index.md @@ -1,16 +1,9 @@ --- - title: Godot Tutorials date: 2021-01-07 - description: "Teaching game development skills with love." - -# The URL to the site on the internet. siteURL: https://godottutorials.com - -# Add credit to the article author. Leave blank or remove if not needed/wanted. byline: "[Godot Tutorials](https://godottutorials.com), Web Developer & Game Programmer" - --- [Godot Tutorials](https://godottutorials.com) started as a way to teach beginners game programming and game development. diff --git a/content/en/showcase/hapticmedia/index.md b/content/en/showcase/hapticmedia/index.md index 7ca2b6cef..52c3337bf 100644 --- a/content/en/showcase/hapticmedia/index.md +++ b/content/en/showcase/hapticmedia/index.md @@ -1,7 +1,7 @@ --- title: Hapticmedia Blog date: 2019-10-01 -description: "Showcase: \"A simple, but powerful, multilingual blog.\"" +description: 'Showcase: "A simple, but powerful, multilingual blog."' siteURL: https://hapticmedia.fr/blog/en/ byline: "[Cyril Bonnet](https://github.com/monsieurnebo), Web Developer" --- diff --git a/content/en/showcase/hartwell-insurance/bio.md b/content/en/showcase/hartwell-insurance/bio.md index 7fab74292..4cded7beb 100644 --- a/content/en/showcase/hartwell-insurance/bio.md +++ b/content/en/showcase/hartwell-insurance/bio.md @@ -1,4 +1,3 @@ - Hartwell Insurance is an insurance company set up solely to service the Broker community. By combining **Hugo**, **Service Worker** and **Netlify**, we were able to achieve incredible global site performance. diff --git a/content/en/showcase/hartwell-insurance/index.md b/content/en/showcase/hartwell-insurance/index.md index 24b4e3a9f..07ee6182c 100644 --- a/content/en/showcase/hartwell-insurance/index.md +++ b/content/en/showcase/hartwell-insurance/index.md @@ -1,26 +1,20 @@ --- - title: Hartwell Insurance - date: 2018-02-09 - -description: "Showcase: \"Hugo + Netlify + PWA makes for a rapid website.\"" - +description: 'Showcase: "Hugo + Netlify + PWA makes for a rapid website."' siteURL: https://www.hartwell-insurance.com/ - byline: "[Trys Mudford](http://www.trysmudford.com), Lead Developer, Tomango" - --- -We’ve just launched a shiny new website for [Hartwell Insurance](https://www.hartwell-insurance.com/) – I’m really proud of it. It was tackled in a different way to most previous Tomango site builds, using some fancy new tools and some vintage web standards. +We've just launched a shiny new website for [Hartwell Insurance](https://www.hartwell-insurance.com/). I'm really proud of it. It was tackled in a different way to most previous Tomango site builds, using some fancy new tools and some vintage web standards. -It’s a multi-page, single-page (!) website written in Hugo, a static site generator built with performance as a first-class feature. _I’ve outlined a load of benefits to Hugo & static sites [here](https://why-static.netlify.com/), in case you’re interested._ +It's a multi-page, single-page (!) website written in Hugo, a static site generator built with performance as a first-class feature. _I've outlined a load of benefits to Hugo & static sites [here](https://why-static.netlify.com/), in case you're interested._ -> **In essence, a static site generator pre-renders the whole site into HTML files and serves them like it’s 1995.** +> **In essence, a static site generator pre-renders the whole site into HTML files and serves them like it's 1995.** -There’s no Apache or Node backend that does compilation at runtime, it’s all done at the build step. This means the server; Netlify in this case, only has to do one thing – serve files. Unsurprisingly, serving simple files is VERY quick. +There's no Apache or Node backend that does compilation at runtime, it's all done at the build step. This means the server; Netlify in this case, only has to do one thing: serve files. Unsurprisingly, serving simple files is VERY quick. -The starter point was the [Victor Hugo](https://github.com/netlify/victor-hugo) repository that Netlify have created. It let me dive in with Hugo, PostCSS, Browsersync and ES6 without setting up any tooling myself – always a win! +The starter point was the [Victor Hugo](https://github.com/netlify/victor-hugo) repository that Netlify have created. It let me dive in with Hugo, PostCSS, Browsersync and ES6 without setting up any tooling myself---always a win! I then took all the content from the design file and moved it into Markdown, putting shortcodes in where necessary. This site did need a number of custom shortcodes for the presentational elements like the expanding circles and full width backgrounds. But mostly it was just clean, semantic HTML with some CSS and JS enhancement thrown in. @@ -32,17 +26,17 @@ For the ripple effects on the section headings, I used JS to prepend a ` On the Hartwell Profitmaker section, I toyed with the idea of using Vue.js for the calculator, but after giving it some thought, I decided to code in Vanilla. The result, all of the site JS comes in at 3.2KB! -The plan was to host with Netlify and therefore get access to Netlify Forms. It meant spending 0 minutes on getting a backend set up – I could focus fully on the frontend. +The plan was to host with Netlify and therefore get access to Netlify Forms. It meant spending 0 minutes on getting a backend set up so I could focus fully on the frontend. -Cache invalidation isn’t normally something I spend all that much time thinking about when building a site. But as this site was going to be a Progressive Web App, invalidating files would be important to ensure the site didn’t appear broken when we made changes. As I was using Victor-Hugo, I wasn’t really sure how to best tackle this and sadly spent far too many hours wrangling with Webpack and Gulp files to try and get hashed file names working nicely. +Cache invalidation isn't normally something I spend all that much time thinking about when building a site. But as this site was going to be a Progressive Web App, invalidating files would be important to ensure the site didn't appear broken when we made changes. As I was using Victor-Hugo, I wasn't really sure how to best tackle this and sadly spent far too many hours wrangling with Webpack and Gulp files to try and get hashed file names working nicely. Then; while I was waiting for a haircut, I read a [Netlify blog post](https://www.netlify.com/blog/2017/02/23/better-living-through-caching/) on how they do cache invalidation with HTTP2 and it promptly blew my mind. -When you request an asset, they send an ETag in the headers which is a hash of the file. There’s also a header to tell the browser not to trust it’s own cache (which sounds a little bit bonkers). +When you request an asset, they send an ETag in the headers which is a hash of the file. There's also a header to tell the browser not to trust it's own cache (which sounds a little bit bonkers). So when you request the page, it opens a persistent HTTP2 connection up (so no new connections for file requests). When it gets to requesting that asset, the browser sends the ETag back to Netlify and they either return nothing if the ETag matches, or the new file with the new ETag. No `app.klfjlkdsfjdslkfjdslkfdsj.js` or `app.js?v=20180112`. Just a clean `app.js` with instant cache invalidation. Amazing. -Finally, the [Service Worker](https://www.hartwell-insurance.com/sw.js) could be added. This turned out to be straightforward as the Netlify cache invalidation system solved most of the pain points. I went for a network-first, cache-fallback setup for both assets and HTML. This does mean flaky speeds are reliant on the page connection time, but given we’re on HTTP2, I’m hoping the persistent connection and tiny ETag size will keep it quick. For online connections, every request is up to date and instantly live after any update. Offline connections fall back to every assets’ last cached state. It seems to work really nicely, and there’s no need for an update prompt if assets have changed. +Finally, the [Service Worker](https://www.hartwell-insurance.com/sw.js) could be added. This turned out to be straightforward as the Netlify cache invalidation system solved most of the pain points. I went for a network-first, cache-fallback setup for both assets and HTML. This does mean flaky speeds are reliant on the page connection time, but given we're on HTTP2, I'm hoping the persistent connection and tiny ETag size will keep it quick. For online connections, every request is up to date and instantly live after any update. Offline connections fall back to every assets' last cached state. It seems to work really nicely, and there's no need for an update prompt if assets have changed. --- @@ -52,17 +46,17 @@ The WebPageTest results are looking good. The speed index is 456, 10x smaller th ![WebPageTest results](hartwell-webpagetest.png) -[TestMySite.io](https://testmysite.io/5a7e1bb2df99531a23c9ad2f/hartwell-insurance.com) is return ~2ms time to first byte from the CDN edge nodes. Lighthouse audits are also very promising. There’s still some improvement to be gained lazy-loading the images and inlining the CSS. I’m less excited about the [second suggestion](http://www.trysmudford.com/css-in-2017/), but I’ll certainly look at some lazy-loading, especially as I’m already using `IntersectionObserver` for some animations. +[TestMySite.io](https://testmysite.io/5a7e1bb2df99531a23c9ad2f/hartwell-insurance.com) is return ~2ms time to first byte from the CDN edge nodes. Lighthouse audits are also very promising. There's still some improvement to be gained lazy-loading the images and inlining the CSS. I'm less excited about the [second suggestion](http://www.trysmudford.com/css-in-2017/), but I'll certainly look at some lazy-loading, especially as I'm already using `IntersectionObserver` for some animations. ![Lighthouse results](hartwell-lighthouse.png) -The most encouraging result is how quick the site is around the world. Most Tomango clients (and their customers) are pretty local and almost exclusively UK-based. We have a dedicated server in Surrey that serves our market pretty well. It did take me by surprise just how much slower a connection from the USA, Australia and Japan to our server was. They’re waiting ~500ms just for the first byte, let alone downloading each asset. +The most encouraging result is how quick the site is around the world. Most Tomango clients (and their customers) are pretty local and almost exclusively UK-based. We have a dedicated server in Surrey that serves our market pretty well. It did take me by surprise just how much slower a connection from the USA, Australia and Japan to our server was. They're waiting ~500ms just for the first byte, let alone downloading each asset. -[Hartwell Insurance](https://www.hartwell-insurance.com/) are a US company so by putting them on our server, we’d be instantly hampering their local response times by literally seconds. This was one of the main reasons for going with Netlify. They provide global CDN hosting that’s quick from anywhere in the world. +[Hartwell Insurance](https://www.hartwell-insurance.com/) are a US company so by putting them on our server, we'd be instantly hampering their local response times by literally seconds. This was one of the main reasons for going with Netlify. They provide global CDN hosting that's quick from anywhere in the world. --- -This project was such a blast to develop, it’s a real pleasure to put new technologies to good use in production, and to see real performance and usability benefits from them. Even using classic web methods of serving directories 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. --- diff --git a/content/en/showcase/keycdn/index.md b/content/en/showcase/keycdn/index.md index 6308b34c4..c6972325f 100644 --- a/content/en/showcase/keycdn/index.md +++ b/content/en/showcase/keycdn/index.md @@ -1,10 +1,8 @@ --- - title: KeyCDN date: 2020-04-10 -description: "Showcase: \"Hugo has become an integral part of our stack.\"" +description: 'Showcase: "Hugo has become an integral part of our stack."' siteURL: https://www.keycdn.com - --- At KeyCDN one of our primary focuses is on performance. With speed being ingrained in our DNA we knew from the start that we must use a fast static website generator that could meet our requirements. When evaluating the right solution, Hugo met our requirements and we looked no further as it was the fastest and most flexible. @@ -13,18 +11,18 @@ At KeyCDN one of our primary focuses is on performance. With speed being ingrain Before our migration to Hugo our website was powered by a PHP-based website that had about 50 pages and a WordPress website that had over 500 posts between our blog and knowledge base. This became harder to maintain as time continued. We felt like we were losing the speed and flexibility that we require. To overcome this we knew we needed to convert our website to be static. This would allow our website to be faster and more secure as it could be delivered by all of our edge locations. -It wasn’t an easy task at the beginning, however, after evaluating Hugo and benchmarking it we knew we had found the ideal solution. Hugo was by far the fastest setup and offered an intuitive way to build our entire website exactly as needed. The Go-based templates, shortcodes, and configuration options made it easy to build a complex website. +It wasn't an easy task at the beginning, however, after evaluating Hugo and benchmarking it we knew we had found the ideal solution. Hugo was by far the fastest setup and offered an intuitive way to build our entire website exactly as needed. The Go-based templates, shortcodes, and configuration options made it easy to build a complex website. -In the fall of 2018 we started the migration and within a couple short months we had built a custom static website with Hugo and migrated all content from our old systems. The simplicity and vast amount of functionality that Hugo offers made this process fast and left our entire team, including all of our writers and developers, happy with the migration. Since migrating to Hugo we haven’t looked back. Hugo has become an integral part of our stack. We’re grateful to all those who have contributed to make Hugo what it is today. +In the fall of 2018 we started the migration and within a couple short months we had built a custom static website with Hugo and migrated all content from our old systems. The simplicity and vast amount of functionality that Hugo offers made this process fast and left our entire team, including all of our writers and developers, happy with the migration. Since migrating to Hugo we haven't looked back. Hugo has become an integral part of our stack. We're grateful to all those who have contributed to make Hugo what it is today. ## Technical overview Below is an overview of what we used with Hugo to build our website: -* [KeyCDN](https://www.keycdn.com) uses a custom theme and is our primary hub for all style sheets and JavaScript. Our other websites, like [KeyCDN Tools](https://tools.keycdn.com), only import the required style sheets and JavaScript. -* We use [Gulp](https://gulpjs.com) in our build process for many tasks, such as combining, versioning, and compressing our style sheets as well as our JavaScript. -* Our search is powered by a custom solution that we’ve built. It allows our pages, blog, and knowledge base to be searched. It uses [Axios](https://github.com/axios/axios) to send a `POST` request containing the search query. An index file in JSON generated by Hugo is searched and the results are then returned. -* Our commenting system is also powered by a custom solution that we’ve built. It uses Axios to send a `GET` request containing the slug to pull the comment thread and a `POST` request containing the name, email address, and comment when submitting a comment. -* Our contact form is a simple HTML form, which uses Axios as well. -* Our writers use shortcodes to enhance the capability of Markdown. -* Our entire website is delivered through KeyCDN using a Pull Zone, which means all of our edge locations are delivering our website. +- [KeyCDN](https://www.keycdn.com) uses a custom theme and is our primary hub for all style sheets and JavaScript. Our other websites, like [KeyCDN Tools](https://tools.keycdn.com), only import the required style sheets and JavaScript. +- We use [Gulp](https://gulpjs.com) in our build process for many tasks, such as combining, versioning, and compressing our style sheets as well as our JavaScript. +- Our search is powered by a custom solution that we've built. It allows our pages, blog, and knowledge base to be searched. It uses [Axios](https://github.com/axios/axios) to send a `POST` request containing the search query. An index file in JSON generated by Hugo is searched and the results are then returned. +- Our commenting system is also powered by a custom solution that we've built. It uses Axios to send a `GET` request containing the slug to pull the comment thread and a `POST` request containing the name, email address, and comment when submitting a comment. +- Our contact form is a simple HTML form, which uses Axios as well. +- Our writers use shortcodes to enhance the capability of Markdown. +- Our entire website is delivered through KeyCDN using a Pull Zone, which means all of our edge locations are delivering our website. diff --git a/content/en/showcase/letsencrypt/bio.md b/content/en/showcase/letsencrypt/bio.md index 92551dc47..62c547980 100644 --- a/content/en/showcase/letsencrypt/bio.md +++ b/content/en/showcase/letsencrypt/bio.md @@ -1,3 +1 @@ - - Let's Encrypt is a free, automated, and open certificate authority (CA), run for the public's benefit. It is a service provided by the [Internet Security Research Group (ISRG)](https://www.abetterinternet.org/). diff --git a/content/en/showcase/letsencrypt/index.md b/content/en/showcase/letsencrypt/index.md index e2f8e168f..8696cb7ad 100644 --- a/content/en/showcase/letsencrypt/index.md +++ b/content/en/showcase/letsencrypt/index.md @@ -1,13 +1,13 @@ --- -title: Let’s Encrypt +title: Let's Encrypt date: 2018-03-13 -description: "Showcase: Lessons learned from taking letsencrypt.org to Hugo." +description: 'Showcase: "Lessons learned from taking letsencrypt.org to Hugo."' siteURL: https://letsencrypt.org/ siteSource: https://github.com/letsencrypt/website byline: "[bep](https://github.com/bep), Hugo Lead" --- -The **Let’s Encrypt website** has a common set of elements: A landing page and some other static info-pages, a document section, a blog, and a documentation section. Having it moved to Hugo was mostly motivated by a _simpler administration and Hugo's [multilingual support](/content-management/multilingual/)_. They already serve HTTPS to more than 60 million domains, and having the documentation available in more languages will increase that reach.[^1] +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] {{< x user="letsencrypt" id="971755920639307777" >}} @@ -15,6 +15,4 @@ I helped them port the site from Jekyll to Hugo. There are usually very few surp That site is bookmarked in many browsers, so preserving the URLs was a must. Hugo's URL handling is very flexible, but there was one challenge. The website has a mix of standard and what we in Hugo call _ugly URLs_ (`https://letsencrypt.org/2017/12/07/looking-forward-to-2018.html`). In Hugo this is handled automatically, and you can turn it on globally or per language. But before Hugo `0.33` you could not configure it for parts of your site. You could set it manually for the relevant pages in front matter -- which is how it was done in Jekyll -- but that would be hard to manage, especially when you start to introduce translations. So, in Hugo 0.33 I added support for _ugly URLs_ per section and also `url` set in front matter for list pages (`https://letsencrypt.org/blog/`). -The lessons learned from this also lead to [disableLanguages](/content-management/multilingual/#disable-a-language) in Hugo `0.34` (a way to turn off languages during translation). And I also registered [this issue](https://github.com/gohugoio/hugo/issues/4463). Once fixed it will make it easier to handle partially translated sites. - [^1]: The work on getting the content translated is in progress. diff --git a/content/en/showcase/linode/bio.md b/content/en/showcase/linode/bio.md index 42fa92229..52c7204c1 100644 --- a/content/en/showcase/linode/bio.md +++ b/content/en/showcase/linode/bio.md @@ -1,4 +1,3 @@ - **Linode** is a cloud hosting provider that offers high performance SSD Linux servers for your infrastructure needs. **Hugo** offers the documentation team incredible performance as we scale and continue providing quality Linux tutorials. diff --git a/content/en/showcase/linode/index.md b/content/en/showcase/linode/index.md index 5a341be8a..f91c99d50 100644 --- a/content/en/showcase/linode/index.md +++ b/content/en/showcase/linode/index.md @@ -1,7 +1,7 @@ --- title: Linode Docs date: 2018-02-12 -description: "Showcase: \"Hugo allows us to build thousands of pages in seconds.\"" +description: 'Showcase: "Hugo allows us to build thousands of pages in seconds."' siteURL: https://linode.com/docs/ siteSource: https://github.com/linode/docs --- @@ -12,4 +12,4 @@ As our library grew into thousands of guides, we needed a fast static site gener Hugo solved a lot of our growing pains with features like shortcodes, customizable URLs, LiveReload, and more. We have already brought our site build time down from minutes to just a few seconds, and we are excited to see what future developments in Hugo will bring. -Thank you to all the [Hugo contributors](https://github.com/gohugoio/hugo/graphs/contributors) and especially [@bep](https://github.com/bep) for helping us with the adoption of Hugo. +Thank you to all the [Hugo contributors](https://github.com/gohugoio/hugo/graphs/contributors) and especially [@bep](https://github.com/bep) for helping us with the adoption of Hugo. diff --git a/content/en/showcase/overmindstudios/bio.md b/content/en/showcase/overmindstudios/bio.md index b2f92f08c..080de69a0 100644 --- a/content/en/showcase/overmindstudios/bio.md +++ b/content/en/showcase/overmindstudios/bio.md @@ -1,6 +1,5 @@ - **Overmind Studios** is a visual effects studio headquartered in Southern Germany. The site is built by: -* [Tobias Kummer](https://www.overmind-studios.de/about/) +- [Tobias Kummer](https://www.overmind-studios.de/about/) diff --git a/content/en/showcase/overmindstudios/index.md b/content/en/showcase/overmindstudios/index.md index 3208b2b72..00b09c5be 100644 --- a/content/en/showcase/overmindstudios/index.md +++ b/content/en/showcase/overmindstudios/index.md @@ -4,6 +4,7 @@ description: "A fresh start to make things easier in the future." siteURL: https://www.overmind-studios.de/ byline: "[tobkum](https://github.com/tobkum), Co-Founder Overmind Studios" --- + After many years of running our site on WordPress, we decided to switch to Hugo. WordPress is a great CMS for many people, but it has some downsides, especially for those who need a fast, secure, and customizable site. Plugins can become outdated, customization can be difficult, and bloat can slow down page loading times. diff --git a/content/en/showcase/pharmaseal/index.md b/content/en/showcase/pharmaseal/index.md index d324833c9..3a8da2377 100644 --- a/content/en/showcase/pharmaseal/index.md +++ b/content/en/showcase/pharmaseal/index.md @@ -1,19 +1,9 @@ --- - title: PHARMASEAL date: 2019-04-29 - description: "Pharmaseal website developed using Hugo, Forestry, hosted and deployed by Netlify." - -# The URL to the site on the internet. siteURL: https://pharmaseal.co/ - -# Link to the site's Hugo source code if public and you can/want to share. -# Remove or leave blank if not needed/wanted. - -# Add credit to the article author. Leave blank or remove if not needed/wanted. byline: "[Roboto Studio](https://roboto.studio), Jonathan Alford" - --- We wanted to shake the status quo with PHARMASEAL, opting for a fast and scalable website built with Hugo instead of slower monolithic systems the competitors were using. diff --git a/content/en/showcase/quiply-employee-communications-app/index.md b/content/en/showcase/quiply-employee-communications-app/index.md index e1e426ed2..2c8854a8d 100644 --- a/content/en/showcase/quiply-employee-communications-app/index.md +++ b/content/en/showcase/quiply-employee-communications-app/index.md @@ -1,23 +1,9 @@ --- - -# A suitable title for this article. title: Quiply Employee Communications App - -# Set this to the current date. date: 2018-02-13 - -description: "\"It became immediately clear that we'd use Hugo going forward as it compiles super-fast, is intuitive to use and offers all the features we need.\"" - -# The URL to the site on the internet. +description: '"It became immediately clear that we would use Hugo going forward as it compiles super-fast, is intuitive to use, and offers all the features we need."' siteURL: https://www.quiply.com - -# Link to the site's Hugo source code if public and you can/want to share. -# Remove or leave blank if not needed/wanted. -# siteSource: https://github.com/gohugoio/hugoDocs - -# Add credit to the article author. Leave blank or remove if not needed/wanted. byline: "[Sebastian Schirmer](mailto:sebastian.schirmer@quiply.com), Quiply Co-Founder" - --- With the launch of our Employee Communications app Quiply we created a very simple and static one-page website to showcase our product. diff --git a/content/en/showcase/template/bio.md b/content/en/showcase/template/bio.md deleted file mode 100644 index de9287898..000000000 --- a/content/en/showcase/template/bio.md +++ /dev/null @@ -1,7 +0,0 @@ - -Add some **general info** about the site here. - -The site is built by: - -* [Person 1](https://example.org) -* [Person 1](https://example.org) diff --git a/content/en/showcase/template/featured-template.png b/content/en/showcase/template/featured-template.png deleted file mode 100644 index 4f390132eb13d9640019d30f13aa1cb882e5c5eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 41270 zcmdpd^+S`<_x}_HX%#7vPy|$((WxR`BGM(&5~ByBR0O02q*GE_Y7E9e>F#EXjuD&G z28{U5_b2{>&rjdyr#<(%_ndprdEIl*J?AXqwYCa1#eE6@06?v#`sxh;a1#jtT*urZ zA-05EJ`Mr^u4y>FHS#jj(v-Faxd>R){9vO;h32C`0+B!I@LOg8sAlh%OAx_p(HjfnKDP(=6i3D71y{tHVU7TG# zrG4cd{fDkJ@%O)G!ABhb>Eh)i_vpnxh8#v(uQ?P!9=04}0^f)f;zFWg z!h9SeLc$V)LSlkK;`~Cw(n6BbBElU1{XCMV;E?sOv6FuDO8LK;5#Qts z!C(O}Pypm%FDNV}B_${%A}AulPwc_(>F4TY<;(Bt$@!1Of6;hl>uK%b=;q}Ja^?6( z)9O9Q+e_}zBf)=61pk{0ae0FOyFTK}|4PW#l_(Yu;`;d&Uo{YAcfL&61n&%spmw?Kl2WS9*1n^q(tr7+EBML?~iu;_T4|#VQb+4X(6={mU{zQcId;itd z)wQ3I*Pe+2LVlmmlJ+tN0;m~pF>(NI-T_eDqhRI$(A)=*-@ZZ5j^5t6e)j>%9cBOt z71_N90KhH4T@Ip(^~?WK+@d6*xkt+M2ylyu@i8ADvg-~T57h%Mz^7JnI>tu=;+tD& zvg82_1`D{s^F&nkO7s(;D1wsa4j{CH^{H^%UH_!ibo|K)fSFOUIpOf|C_6Lx>Q%(W z<)zqjmFsamHw%^s1cIRSi%aCSTe5FoYU&O#24@xgloWYJrs*WBq(OO$frXu2=(Tf7 z_K&NB>m+RAjMX96=(vCWEX>W#zRtui@{}_!$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zs!~whJ9oNpLbb1WaMqB4yW4Qhyg>-$%I0I@S*-T<9w*bU~oX@DH&}eX4Nwre$1EK zg*_+fJpATMhxeK}vNQUu8eljGLslJT&z}*0ZLkOw#qeuh3^BqnHRUIJl4TMFgQM@qcPoAb?j`GlZ$ZOs~`G@GZ%qEsNIk#G4ro z=(LCmN~-jvn`)v-5CTb92J^YEz*z1H&S(u^n@|<6Qcs20d+~$JLMidh`DPqAOm~ diff --git a/content/en/showcase/template/index.md b/content/en/showcase/template/index.md deleted file mode 100644 index abfb0803c..000000000 --- a/content/en/showcase/template/index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Hugo Showcase Template -date: 2018-02-07 -description: "A short description of this page." -siteURL: https://gohugo.io/ -siteSource: https://github.com/gohugoio/hugoDocs -byline: "[bep](https://github.com/bep), Hugo Lead" ---- -Have a **notable Hugo site[^1]**? We would love to feature it in this **Showcase Section** - -Please: - -1. Fork https://github.com/gohugoio/hugoDocs. -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. diff --git a/content/en/showcase/tomango/bio.md b/content/en/showcase/tomango/bio.md index 052bd93cd..c90e48163 100644 --- a/content/en/showcase/tomango/bio.md +++ b/content/en/showcase/tomango/bio.md @@ -1,4 +1,3 @@ - We help ambitious businesses grow by getting more of the customers they want. Our new site runs quickly, anywhere in the world, regardless of internet connectivity. diff --git a/content/en/showcase/tomango/index.md b/content/en/showcase/tomango/index.md index 6dc1a5c1f..d07abf92a 100644 --- a/content/en/showcase/tomango/index.md +++ b/content/en/showcase/tomango/index.md @@ -1,17 +1,10 @@ --- - title: Tomango - date: 2018-05-04 - -description: "Showcase: \"Tomango site relaunch: Building our JAMstack site\"" - +description: 'Showcase: "Tomango site relaunch: Building our JAMstack site"' siteURL: https://www.tomango.co.uk - siteSource: https://github.com/trys/tomango-2018 - byline: "[Trys Mudford](https://www.trysmudford.com), Lead Developer, Tomango" - --- Hugo is our static site generator (SSG) of choice. It's **really quick**. After using it on a number of [client projects](/showcase/hartwell-insurance/), it became clear that our new site _had_ to be built with Hugo. diff --git a/content/en/templates/404.md b/content/en/templates/404.md index ae18428fb..7162378c4 100644 --- a/content/en/templates/404.md +++ b/content/en/templates/404.md @@ -2,13 +2,9 @@ title: Custom 404 page linkTitle: 404 templates description: Create a template to render a 404 error page. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 160 -weight: 160 +weight: 190 --- 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: diff --git a/content/en/templates/_common/_index.md b/content/en/templates/_common/_index.md deleted file mode 100644 index 4328d4d14..000000000 --- a/content/en/templates/_common/_index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -cascade: - _build: - list: never - publishResources: false - render: never ---- - - diff --git a/content/en/templates/_index.md b/content/en/templates/_index.md index d205c9218..ea293e8e1 100644 --- a/content/en/templates/_index.md +++ b/content/en/templates/_index.md @@ -1,16 +1,8 @@ --- title: Templates - description: Create templates to render your content, resources, and data. categories: [] keywords: [] -menu: - docs: - identifier: templates-in-this-section - parent: templates - weight: 10 weight: 10 aliases: [/templates/overview/,/templates/content] --- - -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. diff --git a/content/en/templates/base.md b/content/en/templates/base.md index b7e73378c..b4550fcd4 100644 --- a/content/en/templates/base.md +++ b/content/en/templates/base.md @@ -1,14 +1,9 @@ --- title: Base templates description: The base and block construct allows you to define the outer shell of your master templates (i.e., the chrome of the page). -categories: [templates,fundamentals] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 50 -weight: 50 -toc: true +weight: 40 aliases: [/templates/blocks/,/templates/base-templates-and-blocks/] --- diff --git a/content/en/templates/content-view.md b/content/en/templates/content-view.md index 7b995ece5..07b2589a4 100644 --- a/content/en/templates/content-view.md +++ b/content/en/templates/content-view.md @@ -1,21 +1,16 @@ --- title: Content view templates description: Hugo can render alternative views of your content, useful in list and summary views. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 120 -weight: 120 -toc: true +weight: 110 aliases: [/templates/views/] --- The following are common use cases for content views: -* You want content of every type to be shown on the home page but only with limited [summary views][summaries]. -* You only want a bulleted list of your content in a [taxonomy template]. Views make this very straightforward by delegating the rendering of each different type of content to the content itself. +- You want content of every type to be shown on the home page but only with limited [summary views][summaries]. +- You only want a bulleted list of your content in a [taxonomy template]. Views make this very straightforward by delegating the rendering of each different type of content to the content itself. ## Create a content view @@ -46,7 +41,7 @@ The following is the lookup order for content views ordered by specificity. ## Example: content view inside a list -### `list.html` +### list.html In this example, `.Render` is passed into the template to call the [render function][render]. `.Render` is a special function that instructs content to render itself with the view template provided as the first argument. In this case, the template is going to render the `summary.html` view that follows: @@ -61,7 +56,7 @@ In this example, `.Render` is passed into the template to call the [render funct {{< /code >}} -### `summary.html` +### summary.html Hugo passes the `Page` object to the following `summary.html` view template. @@ -78,7 +73,7 @@ Hugo passes the `Page` object to the following `summary.html` view template. {{< /code >}} -### `li.html` +### li.html Continuing on the previous example, we can change our render function to use a smaller `li.html` view by changing the argument in the call to the `.Render` function (i.e., `{{ .Render "li" }}`). diff --git a/content/en/templates/embedded.md b/content/en/templates/embedded.md index 059448cb4..c17fb2930 100644 --- a/content/en/templates/embedded.md +++ b/content/en/templates/embedded.md @@ -1,14 +1,9 @@ --- title: Embedded templates description: Hugo provides embedded templates for common use cases. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 200 -weight: 200 -toc: true +weight: 170 aliases: [/templates/internal] --- @@ -225,14 +220,14 @@ images = ["post-cover.png"] {{}} If [page bundles](/content-management/page-bundles/) are used and the `images` array is empty or undefined, images with file names matching `*feature*`, `*cover*`, or `*thumbnail*` are used for image metadata. -If no image resources with those names are found, the images defined in the [site config](/getting-started/configuration/) are used instead. +If no image resources with those names are found, the images defined in the [site config](/configuration/) are used instead. If no images are found at all, then an image-less Twitter `summary` card is used instead of `summary_large_image`. Hugo uses the page title and description for the card's title and description fields. The page summary is used if no description is given. Set the value of `twitter:site` in your site configuration: -{{< code-toggle file="hugo" copy=false >}} +{{< code-toggle file="hugo" >}} [params.social] twitter = "GoHugoIO" {{}} diff --git a/content/en/templates/home.md b/content/en/templates/home.md index 22f71420c..e50c21d73 100644 --- a/content/en/templates/home.md +++ b/content/en/templates/home.md @@ -1,20 +1,15 @@ --- title: Home page templates description: The home page of a website is often formatted differently than the other pages. For this reason, Hugo makes it easy for you to define your new site's home page as a unique template. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 60 -weight: 60 -toc: true +weight: 50 aliases: [/layout/homepage/,/templates/homepage-template/,/templates/homepage/] --- ## Introduction -A home page template is used to render your site's home page, and is the only template required for a single-page website. For example, the home page template below inherits the site's shell from the base template and renders the home page content, such as a list of other pages. +A home page template is used to render your site's home page, and is the only template required for a single-page website. For example, the home page template below inherits the site's shell from the base template and renders the home page content, such as a list of other pages. {{< code file=layouts/_default/home.html >}} {{ define "main" }} @@ -25,7 +20,7 @@ A home page template is used to render your site's home page, and is the only te {{ end }} {{< /code >}} -{{% include "templates/_common/filter-sort-group.md" %}} +{{% include "/_common/filter-sort-group.md" %}} ## Lookup order diff --git a/content/en/templates/introduction.md b/content/en/templates/introduction.md index 2635ebc59..c6e49f18b 100644 --- a/content/en/templates/introduction.md +++ b/content/en/templates/introduction.md @@ -1,19 +1,15 @@ --- title: Introduction to templating linkTitle: Introduction -description: Create templates to render your content, resources, and data. -categories: [templates,fundamentals] +description: An introduction to Hugo's templating syntax. +categories: [] keywords: [] -menu: - docs: - identifier: templates-introduction - parent: templates - weight: 20 -weight: 20 -toc: true +weight: 10 --- -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. +{{% glossary-term template %}} + +Templates use [variables], [functions], and [methods] to transform your content, resources, and data into a published page. [functions]: /functions/ [methods]: /methods/ @@ -38,9 +34,7 @@ For example, this HTML template initializes the `$v1` and `$v2` variables, then

        The product of {{ $v1 }} and {{ $v2 }} is {{ mul $v1 $v2 }}.

        ``` -While HTML templates are the most common, you can create templates for any [output format] including CSV, JSON, RSS, and plain text. - -[output format]: /templates/output-formats/ +While HTML templates are the most common, you can create templates for any [output format](g) including CSV, JSON, RSS, and plain text. ## Context diff --git a/content/en/templates/lookup-order.md b/content/en/templates/lookup-order.md index 926cbd84d..19635bbd9 100644 --- a/content/en/templates/lookup-order.md +++ b/content/en/templates/lookup-order.md @@ -2,14 +2,9 @@ title: Template lookup order linkTitle: Lookup order description: Hugo uses the rules below to select a template for a given page, starting from the most specific. -categories: [templates,fundamentals] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 40 -weight: 40 -toc: true +weight: 20 --- ## Lookup rules @@ -23,7 +18,7 @@ Layout : Can be set in front matter. Output Format -: See [Custom Output Formats](/templates/output-formats). An output format has both a `name` (e.g. `rss`, `amp`, `html`) and a `suffix` (e.g. `xml`, `html`). We prefer matches with both (e.g. `index.amp.html`), but look for less specific templates. +: See [configure output formats](/configuration/output-formats/). An output format has both a `name` (e.g. `rss`, `amp`, `html`) and a `suffix` (e.g. `xml`, `html`). We prefer matches with both (e.g. `index.amp.html`), but look for less specific templates. Note that if the output format's Media Type has more than one suffix defined, only the first is considered. diff --git a/content/en/templates/menu.md b/content/en/templates/menu.md index bd0bc5569..b6ec3f9bd 100644 --- a/content/en/templates/menu.md +++ b/content/en/templates/menu.md @@ -1,15 +1,9 @@ --- -title: Menus +title: Menu templates description: Create templates to render one or more menus. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - identifier: templates-menu - parent: templates - weight: 180 -weight: 180 -toc: true +weight: 150 aliases: [/templates/menus/,/templates/menu-templates/] --- @@ -127,7 +121,7 @@ Hugo provides two methods to localize your menu entries. See [multilingual]. [in front matter]: /content-management/menus/#define-in-front-matter [in site configuration]: /content-management/menus/#define-in-site-configuration [localize the menu entries]: /content-management/multilingual/#menus -[menu entry defined in front matter]: /content-management/menus/#example-front-matter -[menu entry defined in site configuration]: /content-management/menus/#example-site-configuration +[menu entry defined in front matter]: /content-management/menus/#example +[menu entry defined in site configuration]: /configuration/menus [menu methods]: /methods/menu/ [multilingual]: /content-management/multilingual/#menus diff --git a/content/en/templates/output-formats.md b/content/en/templates/output-formats.md deleted file mode 100644 index 8d0d200ed..000000000 --- a/content/en/templates/output-formats.md +++ /dev/null @@ -1,241 +0,0 @@ ---- -title: Custom output formats -description: Hugo can output content in multiple formats, including calendar events, e-book formats, Google AMP, and JSON search indexes, or any custom text format. -categories: [templates,fundamentals] -keywords: [] -menu: - docs: - parent: templates - weight: 210 -weight: 210 -toc: true -aliases: [/templates/outputs/,/extras/output-formats/,/content-management/custom-outputs/] ---- - -This page describes how to properly configure your site with the media types and output formats, as well as where to create your templates for your custom outputs. - -## Media types - -A [media type] (formerly known as a MIME type) is a two-part identifier for file formats and format contents transmitted on the internet. - -This is the full set of built-in media types in Hugo: - -{{< datatable "config" "mediaTypes" "_key" "suffixes" >}} - -Notes: - -- It is possible to add custom media types or change the defaults; e.g., if you want to change the suffix for `text/html` to `asp`. -- `Suffixes` are the values that will be used for URLs and file names for that media type in Hugo. -- The `Type` is the identifier that must be used when defining new/custom `Output Formats` (see below). -- The full set of media types will be registered in Hugo's built-in development server to make sure they are recognized by the browser. - -To add or modify a media type, define it in a `mediaTypes` section in your [site configuration], either for all sites or for a given language. - -{{< code-toggle file=hugo >}} -[mediaTypes] - [mediaTypes."text/enriched"] - suffixes = ["enr"] - [mediaTypes."text/html"] - suffixes = ["asp"] -{{}} - -The above example adds one new media type, `text/enriched`, and changes the suffix for the built-in `text/html` media type. - -These media types are configured for your output formats. If you want to redefine one of Hugo's default output formats, you also need to redefine the media type. So, if you want to change the suffix of the `HTML` output format from `html` (default) to `htm`: - -{{< code-toggle file=hugo >}} -[mediaTypes] - [mediaTypes."text/html"] - suffixes = ["htm"] - -[outputFormats] - [outputFormats.html] - mediaType = "text/html" -{{}} - -{{< note >}} -For the above to work, you also need to add an `outputs` definition in your site configuration. -{{< /note >}} - -## Output format definitions - -Given a media type and some additional configuration, you get an **Output Format**. - -This is the full set of Hugo's built-in output formats: - -{{< datatable "config" "outputFormats" "_key" "baseName" "isHTML" "isPlainText" "mediaType" "noUgly" "path" "permalinkable" "protocol" "rel" >}} - -- A page can be output in as many output formats as you want, and you can have an infinite amount of output formats defined as long as they resolve to a unique path on the file system. In the above table, the best example of this is `amp` vs. `html`. `amp` has the value `amp` for `path` so it doesn't overwrite the `html` version; e.g. we can now have both `/index.html` and `/amp/index.html`. - -- The `mediaType` must match a defined media type. -- You can define new output formats or redefine built-in output formats; e.g., if you want to put `amp` pages in a different path. - -To add or modify an output format, define it in an `outputFormats` section in your site's [configuration file](/getting-started/configuration/), either for all sites or for a given language. - -{{< code-toggle file=hugo >}} -[outputFormats.MyEnrichedFormat] -mediaType = "text/enriched" -baseName = "myindex" -isPlainText = true -protocol = "bep://" -{{}} - -The above example is fictional, but if used for the home page on a site with `baseURL` `https://example.org`, it will produce a plain text home page with the URL `bep://example.org/myindex.enr`. - -### Configure output formats - -Use these parameters when configuring an output format: - -baseName -: (`string`) The base name of the published file. Default is `index`. - -isHTML -: (`bool`) Whether to classify the output format as HTML. Hugo uses this value to determine when to create alias redirects, when to inject the LiveReload script, etc. Default is `false`. - -isPlainText -: (`bool`) Whether to parse templates for this output format with Go's [text/template] package instead of the [html/template] package. Default is `false`. - -[html/template]: https://pkg.go.dev/html/template -[text/template]: https://pkg.go.dev/text/template - -mediaType -: (`string`) The [media type] of the published file. This must match a defined media type, either [built-in](#media-types) or custom. - -[media type]: https://en.wikipedia.org/wiki/Media_type - -notAlternative -: (`bool`) Whether to exclude this output format from the values returned by the [`AlternativeOutputFormats`] method on a `Page` object. Default is `false`. - -[`AlternativeOutputFormats`]: /methods/page/alternativeoutputformats/ - -noUgly -: (`bool`) Whether to disable ugly URLs for this output format when `uglyURLs` is `true` in your site configuration. Default is `false`. - -path -: (`string`) The path to the directory containing the published files, relative to the root of the publish directory. - -permalinkable -: (`bool`) If `true`, the [`Permalink`] and [`RelPermalink`] methods on a `Page` object return the rendering output format rather than main output format ([see below](#link-to-output-formats)). Enabled by default for the `html` and `amp` output formats. Default is `false`. - -[`Permalink`]: /methods/page/permalink/ -[`RelPermalink`]: /methods/page/relpermalink/ - -protocol -: (`string`) The protocol (scheme) of the URL for this output format. For example, `https://` or `webcal://`. Default is the scheme of the `baseURL` parameter in your site configuration, typically `https://`. - -rel -: (`string`) If provided, you can assign this value to `rel` attributes in `link` elements when iterating over output formats in your templates. Default is `alternate`. - -root -: (`bool`) Whether to publish files to the root of the publish directory. Default is `false`. - -ugly -: (`bool`) Whether to enable uglyURLs for this output format when `uglyURLs` is `false` in your site configuration. Default is `false`. - -weight -: (`int`) When set to a non-zero value, Hugo uses the `weight` as the first criteria when sorting output formats, falling back to the name of the output format. Lighter items float to the top, while heavier items sink to the bottom. Hugo renders output formats sequentially based on the sort order. - -## Output formats for pages - -A `Page` in Hugo can be rendered to multiple _output formats_ on the file -system. - -### Default output formats - -Every `Page` has a [`Kind`] attribute, and the default Output -Formats are set based on that. - -{{< code-toggle config=outputs />}} - -### Customizing output formats - -This can be changed by defining an `outputs` list of output formats in either -the `Page` front matter or in the site configuration (either for all sites or -per language). - -Example from site configuration file: - -{{< code-toggle file=hugo >}} -[outputs] - home = ["html", "amp", "rss"] - page = ["html"] -{{}} - -Note that in the examples above, the output formats for `section`, -`taxonomy` and `term` will stay at their default value `['html','rss']`. - -- The `outputs` definition is per page [`Kind`]. -- The names (e.g. `html`, `amp`) must match the `name` of a defined output format, and can be overridden per page in front matter. - -The following is an example of front matter in a content file that defines output formats for the rendered `Page`: - -{{< code-toggle file=content/example.md fm=true >}} -title: Example -outputs: -- html -- amp -- json -{{< /code-toggle >}} - -## List output formats - -Each `Page` object has both an [`OutputFormats`] method (all formats, including the current) and an [`AlternativeOutputFormats`] method, the latter of which is useful for creating a `link rel` list in your site's ``: - -[`OutputFormats`]: /methods/page/outputformats -[`AlternativeOutputFormats`]: /methods/page/alternativeoutputformats - -```go-html-template -{{ range .AlternativeOutputFormats -}} - -{{ end }} -``` - -## Link to output formats - -The [`Permalink`] and [`RelPermalink`] methods on a `Page` object return the first output format defined for that page (usually `HTML` if nothing else is defined). This is regardless of the template from which they are called. - -[`Permalink`]: /methods/page/permalink -[`RelPermalink`]: /methods/page/relpermalink - -From `single.json.json`: - -```go-html-template -{{ .RelPermalink }} → /that-page/ -{{ with .OutputFormats.Get "json" }} - {{ .RelPermalink }} → /that-page/index.json -{{ end }} -``` - -In order for them to return the output format of the current template file instead, the given output format should have its `permalinkable` setting set to true. - -This is the same template file as above with the `json` output format's `permalinkable` parameter set to `true`: - -```go-html-template -{{ .RelPermalink }} → /that-page/index.json -{{ with .OutputFormats.Get "html" }} - {{ .RelPermalink }} → /that-page/ -{{ end }} -``` - -## Template lookup order - -Each output format requires a template conforming to the [template lookup order]. - -For the highest specificity in the template lookup order, include the page kind, output format, and suffix in the file name: - -[template lookup order]: /templates/lookup-order/ - -```text -[page kind].[output format].[suffix] -``` - -For example, for section pages: - -Output format|Template path -:--|:-- -`html`|`layouts/_default/section.html.html` -`json`|`layouts/_default/section.json.json` -`rss`|`layouts/_default/section.rss.xml` - -[site configuration]: /getting-started/configuration/ -[`kind`]: /methods/page/kind/ diff --git a/content/en/templates/pagination.md b/content/en/templates/pagination.md index 9b1fdcd5e..fe93ef42a 100644 --- a/content/en/templates/pagination.md +++ b/content/en/templates/pagination.md @@ -1,14 +1,9 @@ --- title: Pagination description: Split a list page into two or more subsets. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 190 -weight: 190 -toc: true +weight: 160 aliases: [/extras/pagination,/doc/pagination/] --- @@ -40,43 +35,7 @@ paginator ## Configuration -Control pagination behavior in your site configuration. These are the default settings: - -{{< code-toggle file=hugo config=pagination />}} - -disableAliases -: (`bool`) Whether to disable alias generation for the first pager. Default is `false`. - -pagerSize -: (`int`) The number of pages per pager. Default is `10`. - -path -: (`string`) The segment of each pager URL indicating that the target page is a pager. Default is `page`. - -With multilingual sites you can define the pagination behavior for each language: - -{{< code-toggle file=hugo >}} -[languages.en] -contentDir = 'content/en' -languageCode = 'en-US' -languageDirection = 'ltr' -languageName = 'English' -weight = 1 -[languages.en.pagination] -disableAliases = true -pagerSize = 10 -path = 'page' -[languages.de] -contentDir = 'content/de' -languageCode = 'de-DE' -languageDirection = 'ltr' -languageName = 'Deutsch' -weight = 2 -[languages.de.pagination] -disableAliases = true -pagerSize = 20 -path = 'blatt' -{{< /code-toggle >}} +See [configure pagination](/configuration/pagination). ## Methods diff --git a/content/en/templates/partial.md b/content/en/templates/partial.md index acf36d76c..f3322b4d2 100644 --- a/content/en/templates/partial.md +++ b/content/en/templates/partial.md @@ -1,14 +1,9 @@ --- title: Partial templates description: Partials are smaller, context-aware components in your list and page templates that can be used economically to keep your templating DRY. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 110 -weight: 110 -toc: true +weight: 100 aliases: [/templates/partials/,/layout/chrome/] --- diff --git a/content/en/templates/robots.md b/content/en/templates/robots.md index 7e50459e6..7909334e2 100644 --- a/content/en/templates/robots.md +++ b/content/en/templates/robots.md @@ -2,13 +2,9 @@ title: robots.txt template linkTitle: robots.txt templates description: Hugo can generate a customized robots.txt in the same way as any other template. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 170 -weight: 170 +weight: 180 aliases: [/extras/robots-txt/] --- @@ -57,4 +53,4 @@ Remember that Hugo copies everything in the [`static` directory][static] to the [static]: /getting-started/directory-structure/ {{< /note >}} -[site configuration]: /getting-started/configuration/ +[site configuration]: /configuration/ diff --git a/content/en/templates/rss.md b/content/en/templates/rss.md index da7244a94..17ed35581 100644 --- a/content/en/templates/rss.md +++ b/content/en/templates/rss.md @@ -1,14 +1,9 @@ --- title: RSS templates description: Use the embedded RSS template, or create your own. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 150 -weight: 150 -toc: true +weight: 140 --- ## Configuration diff --git a/content/en/templates/section.md b/content/en/templates/section.md index 339fe6389..8f4f5ae3b 100644 --- a/content/en/templates/section.md +++ b/content/en/templates/section.md @@ -1,14 +1,9 @@ --- title: Section templates description: Create a section template to list its members. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 80 -weight: 80 -toc: true +weight: 70 aliases: [/templates/sections/,/templates/section-templates/] --- diff --git a/content/en/templates/shortcode.md b/content/en/templates/shortcode.md index 84037423d..0c65c4932 100644 --- a/content/en/templates/shortcode.md +++ b/content/en/templates/shortcode.md @@ -1,15 +1,10 @@ --- title: Shortcode templates -description: Create custom shortcodes to simplify and standardize content creation. -categories: [templates] +description: Create custom shortcodes to simplify and standardize content creation. +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 130 -weight: 130 +weight: 120 aliases: [/templates/shortcode-templates/] -toc: true --- {{< note >}} @@ -97,7 +92,7 @@ Create a shortcode to insert the current year: Then call the shortcode from within your markup: -{{< code file=content/example.md >}} +{{< code file=content/example.md lang=text >}} This is {{}}, and look at how far we've come. {{< /code >}} @@ -129,7 +124,7 @@ Create a shortcode to capture an image as a page resource, resize it to the give Then call the shortcode from within your markup: -{{< code file=content/example/index.md >}} +{{< code file=content/example/index.md lang=text >}} {{}} {{< /code >}} @@ -190,13 +185,13 @@ Shortcode arguments can be [named or positional]. We used named arguments previo [named or positional]: /content-management/shortcodes/#arguments -{{< code file=content/example/index.md >}} +{{< code file=content/example/index.md lang=text >}} {{}} {{< /code >}} Here's how to call it with positional arguments: -{{< code file=content/example/index.md >}} +{{< code file=content/example/index.md lang=text >}} {{}} {{< /code >}} @@ -235,7 +230,7 @@ Use the [`Params`] method to access the arguments as a collection. When using named arguments, the `Params` method returns a map: -{{< code file=content/example/index.md >}} +{{< code file=content/example/index.md lang=text >}} {{}} {{< /code >}} @@ -247,7 +242,7 @@ When using named arguments, the `Params` method returns a map: When using positional arguments, the `Params` method returns a slice: -{{< code file=content/example/index.md >}} +{{< code file=content/example/index.md lang=text >}} {{}} {{< /code >}} @@ -263,11 +258,11 @@ Combine the `Params` method with the [`collections.IsSet`] function to determine ### Inner content -Extract the content enclosed within shortcode tags using the [`Inner`] method. This example demonstrates how to pass both content and a title to a shortcode. The shortcode then generates a `div` element containing an `h2` element (displaying the title) and the provided content. +Extract the content enclosed within shortcode tags using the [`Inner`] method. This example demonstrates how to pass both content and a title to a shortcode. The shortcode then generates a `div` element containing an `h2` element (displaying the title) and the provided content. [`Inner`]: /methods/shortcode/inner/ -{{< code file=content/example.md >}} +{{< code file=content/example.md lang=text >}} {{}} This is a **bold** word, and this is an _emphasized_ word. {{}} @@ -313,7 +308,7 @@ You also have an `img` shortcode with a single named `src` argument that you wan You can then call your shortcode in your content as follows: -{{< code file=content/example.md >}} +{{< code file=content/example.md lang=text >}} {{}} {{}} {{}} @@ -326,15 +321,15 @@ This will output the following HTML. Note how the first two `img` shortcodes inh ```html ``` ### Other examples -For guidance, consider examining Hugo's embedded shortcodes. The source code, available on [GitHub], can provide a useful model. +For guidance, consider examining Hugo's embedded shortcodes. The source code, available on [GitHub], can provide a useful model. [GitHub]: https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates/shortcodes @@ -342,7 +337,7 @@ For guidance, consider examining Hugo's embedded shortcodes. The source code, a The [`HasShortcode`] method allows you to check if a specific shortcode has been called on a page. For example, consider a custom audio shortcode: -{{< code file=content/example.md >}} +{{< code file=content/example.md lang=text >}} {{}} {{< /code >}} diff --git a/content/en/templates/single.md b/content/en/templates/single.md index f6292ca03..983b0522a 100644 --- a/content/en/templates/single.md +++ b/content/en/templates/single.md @@ -1,14 +1,9 @@ --- title: Single templates description: Create a single template to render a single page. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 70 -weight: 70 -toc: true +weight: 60 aliases: [/layout/content/,/templates/single-page-templates/] --- diff --git a/content/en/templates/sitemap.md b/content/en/templates/sitemap.md index b21372040..f7af32323 100644 --- a/content/en/templates/sitemap.md +++ b/content/en/templates/sitemap.md @@ -1,14 +1,9 @@ --- title: Sitemap templates description: Hugo provides built-in sitemap templates. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 140 -weight: 140 -toc: true +weight: 130 aliases: [/layout/sitemap/,/templates/sitemap-template/] --- @@ -28,21 +23,7 @@ With a multilingual project, Hugo generates: ## Configuration -These are the default sitemap configuration values. They apply to all pages unless overridden in front matter. - -{{< code-toggle config=sitemap />}} - -changefreq -: (`string`) How frequently a page is likely to change. Valid values are `always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly`, and `never`. With the default value of `""` Hugo will omit this field from the sitemap. See [details](https://www.sitemaps.org/protocol.html#changefreqdef). - -disable {{< new-in 0.125.0 />}} -: (`bool`) Whether to disable page inclusion. Default is `false`. Set to `true` in front matter to exclude the page. - -filename -: (`string`) The name of the generated file. Default is `sitemap.xml`. - -priority -: (`float`) The priority of a page relative to any other page on the site. Valid values range from 0.0 to 1.0. With the default value of `-1` Hugo will omit this field from the sitemap. See [details](https://www.sitemaps.org/protocol.html#priority). +See [configure sitemap](/configuration/sitemap). ## Override default values @@ -78,5 +59,5 @@ You may disable sitemap generation in your site configuration: disableKinds = ['sitemap'] {{}} -[`publishDir`]: /getting-started/configuration#publishdir +[`publishDir`]: /configuration/all/#publishdir [sitemap protocol]: https://www.sitemaps.org/protocol.html diff --git a/content/en/templates/taxonomy.md b/content/en/templates/taxonomy.md index f9f28ee57..80d54a49d 100644 --- a/content/en/templates/taxonomy.md +++ b/content/en/templates/taxonomy.md @@ -1,14 +1,9 @@ --- title: Taxonomy templates description: Create a taxonomy template to render a list of terms. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 90 -weight: 90 -toc: true +weight: 80 aliases: [/taxonomies/displaying/,/templates/terms/,/indexes/displaying/,/taxonomies/templates/,/indexes/ordering/, /templates/taxonomies/, /templates/taxonomy-templates/] --- diff --git a/content/en/templates/term.md b/content/en/templates/term.md index 07b8ef29a..d6e11b0f7 100644 --- a/content/en/templates/term.md +++ b/content/en/templates/term.md @@ -1,14 +1,9 @@ --- title: Term templates description: Create a term template to render a list of pages associated with the current term. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 100 -weight: 100 -toc: true +weight: 90 --- 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. diff --git a/content/en/templates/types/index.md b/content/en/templates/types.md similarity index 91% rename from content/en/templates/types/index.md rename to content/en/templates/types.md index edcff0701..8dd47aca1 100644 --- a/content/en/templates/types/index.md +++ b/content/en/templates/types.md @@ -1,20 +1,12 @@ --- title: Template types -linkTitle: Template types description: Create templates of different types to render your content, resources, and data. -categories: [templates] +categories: [] keywords: [] -menu: - docs: - parent: templates - weight: 30 weight: 30 -toc: true aliases: ['/templates/lists/'] --- -[![structural diagram of a website](site-hierarchy.svg)](site-hierarchy.svg) - ## Structure Create templates in the `layouts` directory in the root of your project. @@ -86,7 +78,7 @@ Learn more about [base templates](/templates/base/). ## Home -A home page template is used to render your site's home page, and is the only template required for a single-page website. For example, the home page template below inherits the site's shell from the base template and renders the home page content, such as a list of other pages. +A home page template is used to render your site's home page, and is the only template required for a single-page website. For example, the home page template below inherits the site's shell from the base template and renders the home page content, such as a list of other pages. {{< code file=layouts/_default/home.html >}} {{ define "main" }} @@ -97,7 +89,7 @@ A home page template is used to render your site's home page, and is the only te {{ end }} {{< /code >}} -{{% include "templates/_common/filter-sort-group.md" %}} +{{% include "/_common/filter-sort-group.md" %}} Learn more about [home page templates](/templates/home/). @@ -132,7 +124,7 @@ For example, the section template below inherits the site's shell from the base {{ end }} {{< /code >}} -{{% include "templates/_common/filter-sort-group.md" %}} +{{% include "/_common/filter-sort-group.md" %}} Learn more about [section templates](/templates/section/). @@ -152,7 +144,7 @@ For example, the taxonomy template below inherits the site's shell from the base {{ end }} {{< /code >}} -{{% include "templates/_common/filter-sort-group.md" %}} +{{% include "/_common/filter-sort-group.md" %}} Learn more about [taxonomy templates](/templates/taxonomy/). @@ -172,7 +164,7 @@ For example, the term template below inherits the site's shell from the base tem {{ end }} {{< /code >}} -{{% include "templates/_common/filter-sort-group.md" %}} +{{% include "/_common/filter-sort-group.md" %}} Learn more about [term templates](/templates/term/). @@ -258,7 +250,7 @@ For example, the shortcode template below renders an audio element from a [globa Then call the shortcode from within markup: -{{< code file=content/example.md >}} +{{< code file=content/example.md lang=text >}} {{}} {{< /code >}} diff --git a/content/en/templates/types/site-hierarchy.svg b/content/en/templates/types/site-hierarchy.svg deleted file mode 100644 index 3c744871b..000000000 --- a/content/en/templates/types/site-hierarchy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/content/en/tools/_index.md b/content/en/tools/_index.md index a4df23800..3acc287ae 100644 --- a/content/en/tools/_index.md +++ b/content/en/tools/_index.md @@ -1,20 +1,7 @@ --- title: Developer tools - description: Third-party tools to help you create and manage sites. categories: [] keywords: [] -menu: - docs: - identifier: developer-tools-in-this-section - parent: developer-tools - weight: 10 weight: 10 --- - -One of Hugo's greatest strengths is its passionate---and always evolving---developer community. With the exception of the `highlight` shortcode mentioned in [Syntax Highlighting][syntax], the tools and other projects featured in this section are offerings from both commercial services and open-source projects, many of which are developed by Hugo developers just like you. - -[See the popularity of Hugo compared with other static site generators.][staticgen] - -[staticgen]: https://staticgen.com -[syntax]: /content-management/syntax-highlighting/ diff --git a/content/en/tools/editors.md b/content/en/tools/editors.md index b2e2cc47b..c375fcba8 100644 --- a/content/en/tools/editors.md +++ b/content/en/tools/editors.md @@ -1,15 +1,9 @@ --- title: Editor plugins -linkTitle: Editor plugins description: The Hugo community uses a wide range of tools and has developed plugins for some of the most popular text editors to help automate parts of your workflow. -categories: [developer tools] -keywords: [editor,plugin] -menu: - docs: - parent: developer-tools - weight: 20 -weight: 20 -toc: true +categories: [] +keywords: [] +weight: 10 --- ## Visual Studio Code diff --git a/content/en/tools/front-ends.md b/content/en/tools/front-ends.md index 217f96e2c..0c52a4687 100644 --- a/content/en/tools/front-ends.md +++ b/content/en/tools/front-ends.md @@ -2,14 +2,9 @@ title: Front-end interfaces linkTitle: Front-ends description: Do you prefer a graphical user interface over a text editor? Give these front-ends a try. -categories: [developer tools] -keywords: [frontend, gui] -menu: - docs: - parent: developer-tools - weight: 30 -weight: 30 -toc: true +categories: [] +keywords: [] +weight: 20 aliases: [/tools/frontends/] --- diff --git a/content/en/tools/migrations.md b/content/en/tools/migrations.md index 0fc78153f..103e28b9e 100644 --- a/content/en/tools/migrations.md +++ b/content/en/tools/migrations.md @@ -2,14 +2,9 @@ title: Migrate to Hugo linkTitle: Migrations description: A list of community-developed tools for migrating from your existing static site generator or content management system to Hugo. -categories: [developer tools] -keywords: [migrations,jekyll,wordpress,drupal,ghost,contentful] -menu: - docs: - parent: developer-tools - weight: 50 -weight: 50 -toc: true +categories: [] +keywords: [] +weight: 40 aliases: [/developer-tools/migrations/, /developer-tools/migrated/] --- @@ -49,7 +44,7 @@ Alternatively, you can use the [Jekyll import command](/commands/hugo_import_jek : A small utility written in Java that exports the entire WordPress site from the database and resource (e.g., images) files stored locally or remotely. Therefore, migration from the backup files is possible. Supports merging multiple WordPress sites into a single Hugo site. [wp2hugo](https://github.com/ashishb/wp2hugo) -: A Go-based CLI tool to migrate WordPress website to Hugo while preserving original URLs, GUIDs (for feeds), image URLs, code highlights, table of contents, YouTube embeds, Google Maps embeds, and original WordPress navigation categories. +: A Go-based CLI tool to migrate WordPress website to Hugo while preserving original URLs, GUIDs (for feeds), image URLs, code highlights, table of contents, YouTube embeds, Google Maps embeds, and original WordPress navigation categories. ## Medium @@ -68,7 +63,7 @@ Alternatively, you can use the [Jekyll import command](/commands/hugo_import_jek : Export all your Tumblr content to Hugo Markdown files with preserved original formatting. [Tumblr to Hugo](https://github.com/jipiboily/tumblr-to-hugo) -: A migration tool that converts each of your Tumblr posts to a content file with a proper title and path. It also generates a CSV file to help you set up URL redirects. +: A migration tool that converts each of your Tumblr posts to a content file with a proper title and path. It also generates a CSV file to help you set up URL redirects. ## Drupal diff --git a/content/en/tools/other.md b/content/en/tools/other.md index 8edfc4258..489d78506 100644 --- a/content/en/tools/other.md +++ b/content/en/tools/other.md @@ -2,13 +2,9 @@ title: Other community projects linkTitle: Other projects description: Some interesting projects developed by the Hugo community that don't quite fit into our other developer tool categories. -categories: [developer tools] -keywords: [frontend,gui] -menu: - docs: - parent: developer-tools - weight: 60 -weight: 60 +categories: [] +keywords: [] +weight: 50 --- And for all the other community projects around Hugo: diff --git a/content/en/tools/search.md b/content/en/tools/search.md index 152774304..76719b4e2 100644 --- a/content/en/tools/search.md +++ b/content/en/tools/search.md @@ -2,14 +2,9 @@ title: Search tools linkTitle: Search description: See some of the open-source and commercial search options for your newly created Hugo website. -categories: [developer tools] -keywords: [search] -menu: - docs: - parent: developer-tools - weight: 40 -weight: 40 -toc: true +categories: [] +keywords: [] +weight: 30 --- A static website with a dynamic search function? Yes, Hugo provides an alternative to embeddable scripts from Google or other search engines for static websites. Hugo allows you to provide your visitors with a custom search function by indexing your content files directly. diff --git a/content/en/troubleshooting/_index.md b/content/en/troubleshooting/_index.md index a113fa9cf..fd51b4fc8 100644 --- a/content/en/troubleshooting/_index.md +++ b/content/en/troubleshooting/_index.md @@ -1,16 +1,8 @@ --- title: Troubleshooting - description: Use these techniques when troubleshooting your site. categories: [] keywords: [] -menu: - docs: - identifier: troubleshooting-in-this-section - parent: troubleshooting - weight: 10 weight: 10 aliases: [/templates/template-debugging/] --- - -Use these techniques when troubleshooting your site. diff --git a/content/en/troubleshooting/audit/index.md b/content/en/troubleshooting/audit/index.md index e0de0d5df..40deb6615 100644 --- a/content/en/troubleshooting/audit/index.md +++ b/content/en/troubleshooting/audit/index.md @@ -2,13 +2,8 @@ title: Site audit linkTitle: Audit description: Run this audit before deploying your production site. -categories: [troubleshooting] +categories: [] keywords: [] -menu: - docs: - parent: troubleshooting - weight: 20 -weight: 20 --- There are several conditions that can produce errors in your published site which are not detected during the build. Run this audit before your final build. diff --git a/content/en/troubleshooting/deprecation.md b/content/en/troubleshooting/deprecation.md index 5dd9f3fa6..f2e5259a6 100644 --- a/content/en/troubleshooting/deprecation.md +++ b/content/en/troubleshooting/deprecation.md @@ -1,13 +1,8 @@ --- title: Deprecation description: The Hugo project follows a formal and consistent process to deprecate functions, methods, and configuration settings. -categories: [troubleshooting] +categories: [] keywords: [] -menu: - docs: - parent: troubleshooting - weight: 50 -weight: 50 --- When a project _deprecates_ something, they are telling its users: diff --git a/content/en/troubleshooting/faq.md b/content/en/troubleshooting/faq.md index 97706fa2f..9336a735b 100644 --- a/content/en/troubleshooting/faq.md +++ b/content/en/troubleshooting/faq.md @@ -2,123 +2,102 @@ title: Frequently asked questions linkTitle: FAQs description: These questions are frequently asked by new users. -categories: [troubleshooting] -keywords: [faq] -menu: - docs: - parent: troubleshooting - weight: 70 -weight: 70 +categories: [] +keywords: [] --- -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. +Hugo's [forum] is an active community of users and developers who answer questions, share knowledge, and provide examples. A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help] before asking your first question. These are just a few of the questions most frequently asked by new users. -###### An error message indicates that a feature is not available. Why? {#feature-not-available} +An error message indicates that a feature is not available. Why? +: + {{% include "/_common/installation/01-editions.md" %}} -{{% include "installation/_common/01-editions.md" %}} + When you attempt to use a feature that is not available in the edition that you installed, Hugo throws this error: -When you attempt to use a feature that is not available in the edition that you installed, Hugo throws this error: + ```go-html-template + this feature is not available in this edition of Hugo + ``` -```go-html-template -this feature is not available in this edition of Hugo -``` + To resolve, install a different edition based on the feature table above. See the [installation] section for details. -To resolve, install a different edition based on the feature table above. See the [installation] section for details. - -###### Why do I see "Page Not Found" when visiting the home page? - -In the `content/_index.md` file: +Why do I see "Page Not Found" when visiting the home page? +: In the `content/_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? -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`. + 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 is a given page not published? +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`. -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 [details](/content-management/page-bundles/). -###### Why can't I see any of a page's descendants? +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](g). A directory with an `_index.md` file is a [branch bundle](g). See [details](/content-management/page-bundles/). -You may have an `index.md` file instead of an `_index.md` file. See [details](/content-management/page-bundles/). +Why is my partial template not rendered as expected? +: You may have neglected to pass the required [context](g) when calling the partial. For example: -###### What is the difference between an `index.md` file and an `_index.md` file? + ```go-html-template + {{/* incorrect */}} + {{ partial "_internal/pagination.html" }} -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 [details](/content-management/page-bundles/). + {{/* correct */}} + {{ partial "_internal/pagination.html" . }} + ``` -###### Why is my partial template not rendered as expected? +In a template, what's the difference between `:=` and `=` when assigning values to variables? +: Use `:=` to initialize a variable, and use `=` to assign a value to a variable that has been previously initialized. See [details](https://pkg.go.dev/text/template#hdr-Variables). -You may have neglected to pass the required [context](g) when calling the partial. For example: +When I paginate a list page, why is the page collection not filtered as specified? +: You are probably invoking the [`Paginate`] or [`Paginator`] method more than once on the same page. See [details](/templates/pagination/). -```go-html-template -{{/* incorrect */}} -{{ partial "_internal/pagination.html" }} +Why are there two ways to call a shortcode? +: Use the `{{%/* shortcode */%}}` notation if the shortcode template, or the content between the opening and closing shortcode tags, contains Markdown. Otherwise use the\ +`{{}}` notation. See [details](/content-management/shortcodes/#notation). -{{/* correct */}} -{{ partial "_internal/pagination.html" . }} -``` +Can I use environment variables to control configuration? +: Yes. See [details](/configuration/introduction/#environment-variables). -###### In a template, what's the difference between `:=` and `=` when assigning values to variables? +Why am I seeing inconsistent output from one build to the next? +: The most common causes are page collisions (publishing two pages to the same path) and the effects of concurrency. Use the `--printPathWarnings` command line flag to check for page collisions, and create a topic on the [forum] if you suspect concurrency problems. -Use `:=` to initialize a variable, and use `=` to assign a value to a variable that has been previously initialized. See [details](https://pkg.go.dev/text/template#hdr-Variables). +Why isn't Hugo's development server detecting file changes? +: In its default configuration, Hugo's file watcher may not be able detect file changes when: -###### When I paginate a list page, why is the page collection not filtered as specified? + - Running Hugo within Windows Subsystem for Linux (WSL/WSL2) with project files on a Windows partition + - Running Hugo locally with project files on a removable drive + - Running Hugo locally with project files on a storage server accessed via the NFS, SMB, or CIFS protocols -You are probably invoking the [`Paginate`] or [`Paginator`] method more than once on the same page. See [details](/templates/pagination/). + In these cases, instead of monitoring native file system events, use the `--poll` command line flag. For example, to poll the project files every 700 milliseconds, use `--poll 700ms`. -###### Why are there two ways to call a shortcode? +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](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. -Use the `{{%/* shortcode */%}}` notation if the shortcode template, or the content between the opening and closing shortcode tags, contains Markdown. Otherwise use the\ -`{{}}` notation. See [details](/content-management/shortcodes/). + 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: -###### Can I use environment variables to control configuration? + ```go-html-template + {{ $noop := .Content }} + {{ .Store.Get "mykey" }} + ``` -Yes. See [details](/getting-started/configuration/#configure-with-environment-variables). + You can trigger content rendering with other methods as well. See next FAQ. -###### Why am I seeing inconsistent output from one build to the next? - -The most common causes are page collisions (publishing two pages to the same path) and the effects of concurrency. Use the `--printPathWarnings` command line flag to check for page collisions, and create a topic on the [forum] if you suspect concurrency problems. - -###### Why isn't Hugo's development server detecting file changes? - -In its default configuration, Hugo's file watcher may not be able detect file changes when: - -- Running Hugo within Windows Subsystem for Linux (WSL/WSL2) with project files on a Windows partition -- Running Hugo locally with project files on a removable drive -- Running Hugo locally with project files on a storage server accessed via the NFS, SMB, or CIFS protocols - -In these cases, instead of monitoring native file system events, use the `--poll` command line flag. For example, to poll the project files every 700 milliseconds, use `--poll 700ms`. - -###### 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](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. - -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 }} -{{ .Store.Get "mykey" }} -``` - -You can trigger content rendering with other methods as well. See next FAQ. - -[`Scratch`]: /methods/page/scratch -[`Store`]: /methods/page/store - -###### Which page methods trigger content rendering? - -The following methods on a `Page` object trigger content rendering: `Content`, `ContentWithoutSummary`, `FuzzyWordCount`, `Len`, `Plain`, `PlainWords`, `ReadingTime`, `Summary`, `Truncated`, and `WordCount`. +2025-02-18T22:07:09-08:00Which page methods trigger content rendering? +: The following methods on a `Page` object trigger content rendering: `Content`, `ContentWithoutSummary`, `FuzzyWordCount`, `Len`, `Plain`, `PlainWords`, `ReadingTime`, `Summary`, `Truncated`, and `WordCount`. {{< note >}} For other questions please visit the [forum]. A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help] before asking your first question. @@ -132,3 +111,5 @@ For other questions please visit the [forum]. A quick search of over 20,000 topi [forum]: https://discourse.gohugo.io [installation]: /installation/ [requesting help]: https://discourse.gohugo.io/t/requesting-help/9132 +[`Scratch`]: /methods/page/scratch +[`Store`]: /methods/page/store diff --git a/content/en/troubleshooting/inspection.md b/content/en/troubleshooting/inspection.md index e9fc8ed0f..dc662243a 100644 --- a/content/en/troubleshooting/inspection.md +++ b/content/en/troubleshooting/inspection.md @@ -2,13 +2,8 @@ title: Data inspection linkTitle: Inspection description: Use template functions to inspect values and data structures. -categories: [troubleshooting] +categories: [] keywords: [] -menu: - docs: - parent: troubleshooting - weight: 40 -weight: 40 --- Use the [`debug.Dump`] function to inspect a data structure: diff --git a/content/en/troubleshooting/logging.md b/content/en/troubleshooting/logging.md index 1cb9a8ebd..d6e8affeb 100644 --- a/content/en/troubleshooting/logging.md +++ b/content/en/troubleshooting/logging.md @@ -1,14 +1,8 @@ --- title: Logging description: Enable logging to inspect events while building your site. -categories: [troubleshooting] +categories: [] keywords: [] -menu: - docs: - parent: troubleshooting - weight: 30 -weight: 30 -toc: true --- ## Command line diff --git a/content/en/troubleshooting/performance.md b/content/en/troubleshooting/performance.md index 230c9ca06..1889cd7d1 100644 --- a/content/en/troubleshooting/performance.md +++ b/content/en/troubleshooting/performance.md @@ -1,14 +1,8 @@ --- title: Performance description: Tools and suggestions for evaluating and improving performance. -categories: [troubleshooting] +categories: [] keywords: [] -menu: - docs: - parent: troubleshooting - weight: 60 -weight: 60 -toc: true aliases: [/troubleshooting/build-performance/] --- diff --git a/hugo.toml b/hugo.toml index a625cb301..b177e5765 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,7 +1,6 @@ baseURL = "https://gohugo.io/" defaultContentLanguage = "en" enableEmoji = true -ignoreLogs = ["error-missing-instagram-accesstoken"] pluralizeListTitles = false timeZone = "Europe/Oslo" title = "Hugo" @@ -9,130 +8,6 @@ title = "Hugo" # We do redirects via Netlify's _redirects file, generated by Hugo (see "outputs" below). disableAliases = true -[cascade] - [cascade.params] - hide_in_this_section = true - show_publish_date = true - [cascade.target] - path = '{/news/**}' - kind = 'page' - - -[frontmatter] - date = ['date'] - expiryDate = ['expirydate'] - lastmod = [':git', 'lastmod', 'publishdate', 'date'] - publishDate = ['publishdate', 'date'] - -[caches.images] - dir = ":cacheDir/images" - maxAge = "1440h" -[caches.getresource] - dir = ':cacheDir/:project' - maxAge = "1h" - -[pagination] - pagerSize = 100 - -[services.googleAnalytics] - ID = 'G-MBZGKNMDWC' - -[outputs] - home = ["html", "rss", "redir", "headers"] - section = ["html"] - page = ["html"] - taxonomy = ["html"] - term = ["html"] - -[params] - description = "The world’s fastest framework for building websites" - ghrepo = "https://github.com/gohugoio/hugoDocs/" - - [params.render_hooks.link] - errorLevel = 'warning' # ignore (default), warning, or error (fails the build) - -[languages] - [languages.en] - languageName = "English" - languageCode = "en-US" - weight = 1 - -[security] - enableInlineShortcodes = false - [security.funcs] - getenv = ['^HUGO_', '^REPOSITORY_URL$', '^BRANCH$'] - [security.http] - methods = ['(?i)GET|POST'] - urls = ['.*'] - -[outputFormats] - [outputFormats.redir] - mediatype = "text/netlify" - baseName = "_redirects" - isPlainText = true - [outputFormats.headers] - mediatype = "text/netlify" - baseName = "_headers" - isPlainText = true - notAlternative = true - -[markup] - - [markup.goldmark.extensions] - definitionList = true - footnote = true - linkify = true - strikethrough = true - table = true - taskList = true - typographer = true - - [markup.goldmark.extensions.passthrough] - enable = true - - [markup.goldmark.extensions.passthrough.delimiters] - block = [['\[', '\]'], ['$$', '$$']] - inline = [['\(', '\)']] - - [markup.goldmark.parser] - autoHeadingID = true - autoDefinitionTermID = true - autoIDType = "github" - - [markup.goldmark.parser.attribute] - block = true - title = true - - [markup.goldmark.renderer] - hardWraps = false - unsafe = false - xhtml = false - - [markup.highlight] - style = 'solarized-dark' - lineNumbersInTable = true - noClasses = false - wrapperClass = 'highlight not-prose' - -[mediaTypes] - [mediaTypes."text/netlify"] - delimiter = "" - -[module] - [module.hugoVersion] - min = "0.141.0" - [[module.mounts]] - source = "assets" - target = "assets" - [[module.mounts]] - lang = 'en' - source = 'content/en' - target = 'content' - [[module.mounts]] - source = "hugo_stats.json" - target = "assets/notwatching/hugo_stats.json" - disableWatch = true - [build] [build.buildStats] disableIDs = true @@ -144,55 +19,141 @@ disableAliases = true source = "(postcss|tailwind)\\.config\\.js" target = "css" +[caches] + [caches.images] + dir = ":cacheDir/images" + maxAge = "1440h" + [caches.getresource] + dir = ':cacheDir/:project' + maxAge = "1h" + +[cascade] + [cascade.params] + hide_in_this_section = true + show_publish_date = true + [cascade.target] + kind = 'page' + path = '{/news/**}' + +[frontmatter] + date = ['date'] # do not add publishdate; it will affect page sorting + expiryDate = ['expirydate'] + lastmod = [':git', 'lastmod', 'publishdate', 'date'] + publishDate = ['publishdate', 'date'] + +[languages] + [languages.en] + languageCode = "en-US" + languageName = "English" + weight = 1 + +[markup] + [markup.goldmark] + [markup.goldmark.extensions] + [markup.goldmark.extensions.typographer] + disable = false + [markup.goldmark.extensions.passthrough] + enable = true + [markup.goldmark.extensions.passthrough.delimiters] + block = [['\[', '\]'], ['$$', '$$']] + inline = [['\(', '\)']] + [markup.goldmark.parser] + autoDefinitionTermID = true + [markup.goldmark.parser.attribute] + block = true + [markup.highlight] + noClasses = false + style = 'solarized-dark' + wrapperClass = 'highlight not-prose' + +[mediaTypes] + [mediaTypes."text/netlify"] + delimiter = "" + +[module] + [module.hugoVersion] + min = "0.144.0" + [[module.mounts]] + source = "assets" + target = "assets" + [[module.mounts]] + lang = 'en' + source = 'content/en' + target = 'content' + [[module.mounts]] + disableWatch = true + source = "hugo_stats.json" + target = "assets/notwatching/hugo_stats.json" + +[outputFormats] + [outputFormats.redir] + baseName = "_redirects" + isPlainText = true + mediatype = "text/netlify" + [outputFormats.headers] + baseName = "_headers" + isPlainText = true + mediatype = "text/netlify" + notAlternative = true + +[outputs] + home = ["html", "rss", "redir", "headers"] + page = ["html"] + section = ["html"] + taxonomy = ["html"] + term = ["html"] + +[params] + description = "The world’s fastest framework for building websites" + ghrepo = "https://github.com/gohugoio/hugoDocs/" + [params.render_hooks.link] + errorLevel = 'warning' # ignore (default), warning, or error (fails the build) + +[security] + [security.funcs] + getenv = ['^HUGO_', '^REPOSITORY_URL$', '^BRANCH$'] + [server] [[server.headers]] for = "/*" - [server.headers.values] X-Frame-Options = "DENY" X-XSS-Protection = "1; mode=block" X-Content-Type-Options = "nosniff" Referrer-Policy = "no-referrer" - [[server.headers]] for = "/**.{css,js}" -[minify] - [minify.tdewolff] - [minify.tdewolff.html] - keepSpecialComments = true - keepWhitespace = false +[services] + [services.googleAnalytics] + ID = 'G-MBZGKNMDWC' ######## GLOBAL ITEMS TO BE SHARED WITH THE HUGO SITES ######## [menus] [[menus.global]] - name = 'News' - weight = 1 identifier = 'news' + name = 'News' pageRef = '/news/' - + weight = 1 [[menus.global]] - name = 'Docs' - weight = 5 identifier = 'docs' + name = 'Docs' url = '/documentation/' - + weight = 5 [[menus.global]] - name = 'Themes' - weight = 10 identifier = 'themes' + name = 'Themes' url = 'https://themes.gohugo.io/' - + weight = 10 [[menus.global]] - name = 'Community' - weight = 150 identifier = 'community' + name = 'Community' post = 'external' url = 'https://discourse.gohugo.io/' - + weight = 150 [[menus.global]] - name = 'GitHub' - weight = 200 identifier = 'github' + name = 'GitHub' post = 'external' url = 'https://github.com/gohugoio/hugo' + weight = 200 diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html deleted file mode 100644 index eb3a38f8e..000000000 --- a/layouts/_default/_markup/render-heading.html +++ /dev/null @@ -1 +0,0 @@ -{{ .Text | safeHTML }} diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index c38d4dd75..fd94fdba4 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -76,7 +76,7 @@ either of these shortcodes in conjunction with this render hook. @context {string} Title The link title. @returns {template.html} -*/}} +*/ -}} {{/* prettier-ignore-end */ -}} {{- /* Initialize. */}} {{- $renderHookName := "link" }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index d34a95049..b049b6da9 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -34,11 +34,11 @@ {{ .LinkTitle }} - {{ with .Params.action.signatures }} + {{ with .Params.functions_and_methods.signatures }} {{/* Set in functions and methods pages. */}} {{ with $signature := index . 0 }} - {{ if $.Params.action.returnType }} - {{ $signature = printf "%s ⟼ %s" $signature $.context.Params.action.returnType }} + {{ if $.Params.functions_and_methods.returnType }} + {{ $signature = printf "%s ⟼ %s" $signature $.context.Params.functions_and_methods.returnType }} {{ end }}
        @@ -55,6 +55,9 @@ {{ (or .Params.description .Summary) | plainify | safeHTML }} {{ end }}

        + {{ if and hugo.IsDevelopment site.Params.debug.display_page_metadata }} + {{ partial "helpers/debug/list-item-metadata.html" . }} + {{ end }} {{ end }}
        diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 57d5313f7..2e9e4f379 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -48,7 +48,7 @@ {{ end }} {{ $t.Stop }} - {{ if .Params.action.signatures }} + {{ if .Params.functions_and_methods.signatures }}
        {{- partial "docs/functions-signatures.html" . -}} {{- partial "docs/functions-return-type.html" . -}} diff --git a/layouts/index.redir b/layouts/index.redir index 2dfd2bc0f..bb72f96e5 100644 --- a/layouts/index.redir +++ b/layouts/index.redir @@ -1,6 +1,6 @@ # Netlify redirects. See https://www.netlify.com/docs/redirects/ -{{ range $p := .Site.Pages -}} +{{ range $p := .Site.Pages -}} {{ range .Aliases }} -{{ . | printf "%-35s" }} {{ $p.RelPermalink -}} +{{ . | printf "%-35s" }} {{ $p.RelPermalink -}} {{ end -}} {{- end -}} diff --git a/layouts/partials/docs/functions-aliases.html b/layouts/partials/docs/functions-aliases.html index dc562307a..b3a5a7607 100644 --- a/layouts/partials/docs/functions-aliases.html +++ b/layouts/partials/docs/functions-aliases.html @@ -1,4 +1,4 @@ -{{- with .Params.action.aliases }} +{{- with .Params.functions_and_methods.aliases }} {{- $label := "Alias" }} {{- if gt (len .) 1 }} {{- $label = "Aliases" }} diff --git a/layouts/partials/docs/functions-return-type.html b/layouts/partials/docs/functions-return-type.html index 13c8c96f4..75c97f8d9 100644 --- a/layouts/partials/docs/functions-return-type.html +++ b/layouts/partials/docs/functions-return-type.html @@ -1,4 +1,4 @@ -{{- with .Params.action.returnType }} +{{- with .Params.functions_and_methods.returnType }}

        Returns

        {{- . -}} diff --git a/layouts/partials/docs/functions-signatures.html b/layouts/partials/docs/functions-signatures.html index 35d950265..6fb61df8e 100644 --- a/layouts/partials/docs/functions-signatures.html +++ b/layouts/partials/docs/functions-signatures.html @@ -1,4 +1,4 @@ -{{- with .Params.action.signatures }} +{{- with .Params.functions_and_methods.signatures }}

        Syntax

        {{- range . }} {{- $signature := . }} diff --git a/layouts/partials/helpers/debug/list-item-metadata.html b/layouts/partials/helpers/debug/list-item-metadata.html new file mode 100644 index 000000000..d027484b5 --- /dev/null +++ b/layouts/partials/helpers/debug/list-item-metadata.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + +
        weight: + {{ .Weight }} +
        keywords: + {{ delimit (or .Keywords "") ", " }} +
        categories: + {{ delimit (or .Params.categories "") ", " }} +
        diff --git a/layouts/partials/layouts/home/opensource.html b/layouts/partials/layouts/home/opensource.html index 9c6bfc7aa..153c0f4ff 100644 --- a/layouts/partials/layouts/home/opensource.html +++ b/layouts/partials/layouts/home/opensource.html @@ -32,9 +32,10 @@ Popular.
        - As of writing this, Hugo has - {{ $githubInfo.stargazers_count }} - stars on GitHub. Join the crowd and hit the + Hugo has + {{ $githubInfo.stargazers_count | lang.FormatNumber 0 }} + stars on GitHub as of {{ now.Format "January 2, 2006" }}. + Join the crowd and hit the {{ .Title | safeHTML }} diff --git a/layouts/shortcodes/chroma-lexers.html b/layouts/shortcodes/chroma-lexers.html index 2e10c3dee..fd7130501 100644 --- a/layouts/shortcodes/chroma-lexers.html +++ b/layouts/shortcodes/chroma-lexers.html @@ -1,6 +1,28 @@ -
        - {{ range .Site.Data.docs.chroma.lexers }} -
        {{ .Name }}
        -
        {{ with .Aliases }}{{ delimit . ", " }}{{ end }}
        - {{ end }} -
        +{{/* prettier-ignore-start */ -}} +{{- /* +Renders an HTML template of Chroma lexers and their aliases. + +@example {{< chroma-lexers >}} +*/ -}} +{{/* prettier-ignore-end */ -}} +
        + + + + + + + {{- range site.Data.docs.chroma.lexers }} + + + + + {{- end }} + +
        LanguageIdentifiers
        {{ .Name }} + {{- range $k, $_ := .Aliases }} + {{- if $k }},{{ end }} + {{ . }} + {{- end }} +
        +
        diff --git a/layouts/shortcodes/code-toggle.html b/layouts/shortcodes/code-toggle.html index 97448691e..6e6185b5a 100644 --- a/layouts/shortcodes/code-toggle.html +++ b/layouts/shortcodes/code-toggle.html @@ -1,19 +1,26 @@ +{{/* prettier-ignore-start */ -}} {{- /* - Renders syntax-highlighted configuration data in JSON, TOML, and YAML formats. +Renders syntax-highlighted configuration data in JSON, TOML, and YAML formats. - @param {string} [config] The section of site.Data.docs.config to render. - @param {bool} [copy=false] If true, display a copy to clipboard button. - @param {string} [file] The file name to display above the rendered code. - @param {bool} [fm=false] If true, render the code as front matter. - @param {bool} [skipHeader=false] If false, omit top level key(s) when rendering a section of site.Data.docs.config. +@param {string} [config] The section of site.Data.docs.config to render. +@param {bool} [copy=false] If true, display a copy to clipboard button. +@param {string} [dataKey] The section of site.Data.docs to render. +@param {string} [file] The file name to display above the rendered code. +@param {bool} [fm=false] If true, render the code as front matter. +@param {bool} [skipHeader=false] If false, omit top level key(s) when rendering a section of site.Data.docs.config. - @returns {template.HTML} -*/}} +@example {{< code-toggle file=hugo config=build />}} +@example {{< code-toggle file=content/example.md fm="true" }} + title='Example' + draft='false + {{< /code-toggle }} +*/ -}} +{{/* prettier-ignore-end */ -}} {{- /* Initialize. */}} {{- $config := "" }} -{{- $dataKey := "" }} {{- $copy := false }} +{{- $dataKey := "" }} {{- $file := "" }} {{- $fm := false }} {{- $skipHeader := false }} @@ -60,22 +67,26 @@ {{- else }} {{- $code = $.Inner }} {{- end }} -
        - - - + + +
        + {{- if $copy }} + + + + {{- end }} - {{ if $code }} - {{ range $i, $lang := $langs }} + {{- if $code }} + {{- range $i, $lang := $langs }}
        - {{ end }} - {{ end }} + {{- end }} + {{- end }}
        diff --git a/layouts/shortcodes/datatable.html b/layouts/shortcodes/datatable.html index b06f47ee9..f135d841c 100644 --- a/layouts/shortcodes/datatable.html +++ b/layouts/shortcodes/datatable.html @@ -11,7 +11,7 @@ {{ range $fields }} {{ $s := . }} {{ if eq $s "_key" }} - {{ $s = "Type" }} + {{ $s = "type" }} {{ end }} {{ $s }} {{ end }} diff --git a/layouts/shortcodes/deprecated-in.html b/layouts/shortcodes/deprecated-in.html index 0058921b1..ce2ba389e 100644 --- a/layouts/shortcodes/deprecated-in.html +++ b/layouts/shortcodes/deprecated-in.html @@ -1,22 +1,18 @@ {{/* prettier-ignore-start */ -}} {{- /* - Renders a callout indicating the version in which a feature was deprecated. +Renders a callout indicating the version in which a feature was deprecated. - Include descriptive text between the opening and closing tags, or omit the - descriptive text and call the shortcode with a self-closing tag. +Include descriptive text between the opening and closing tags, or omit the +descriptive text and call the shortcode with a self-closing tag. - @param {string} 0 The semantic version string, with or without a leading v. - @returns {template.HTML} +@param {string} 0 The semantic version string, with or without a leading v. - @examples +@example {{< deprecated-in 0.144.0 />}} - {{< deprecated-in 0.144.0 />}} - - {{< deprecated-in 0.144.0 >}} - Some descriptive text here. - {{< /new-in >}} - -*/}} +@example {{< deprecated-in 0.144.0 >}} + Some descriptive text here. + {{< /deprecated-in >}} +*/ -}} {{/* prettier-ignore-end */ -}} {{- with $version := .Get 0 | strings.TrimLeft "vV" }} {{- $href := printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }} diff --git a/layouts/shortcodes/eturl.html b/layouts/shortcodes/eturl.html index 0a7161a36..a0237dbe0 100644 --- a/layouts/shortcodes/eturl.html +++ b/layouts/shortcodes/eturl.html @@ -7,31 +7,20 @@ embedded_templates.toml file in the data directory. @param {string} filename The embedded template's file name, excluding extension. -@returns template.HTML - @example {{% et robots.txt %}} @example {{% et filename=robots.txt %}} -*/}} +*/ -}} {{/* prettier-ignore-end */ -}} -{{- /* Get parameters. */}} -{{- $filename := "" -}} -{{- if .IsNamedParams -}} - {{- $filename = .Get "filename" -}} -{{- else -}} - {{- $filename = .Get 0 -}} -{{- end -}} - -{{- /* Render. */}} -{{- with $filename -}} - {{- with site.Data.embedded_template_urls -}} - {{- with index . $filename -}} - {{- urls.JoinPath site.Data.embedded_template_urls.base_url . -}} - {{- else -}} - {{- errorf "The %q shortcode was unable to find a URL for the embedded template named %q. Check the name. See %s" $.Name $filename $.Position -}} - {{- end -}} - {{- else -}} - {{- errorf "The %q shortcode was unable to find the embedded_template_urls data file in the site's data directory. See %s" $.Name $.Position -}} - {{- end -}} -{{- else -}} - {{- errorf "The %q shortcodes requires a named or positional parameter, the file name of the embedded template, excluding its extension. See %s" .Name .Position -}} +{{- with $filename := or (.Get "filename") (.Get 0) }} + {{- with site.Data.embedded_template_urls }} + {{- with index . $filename }} + {{- urls.JoinPath site.Data.embedded_template_urls.base_url . }} + {{- else }} + {{- errorf "The %q shortcode was unable to find a URL for the embedded template named %q. Check the name. See %s" $.Name $filename $.Position }} + {{- end }} + {{- else }} + {{- errorf "The %q shortcode was unable to find the embedded_template_urls data file in the site's data directory. See %s" $.Name $.Position }} + {{- end }} +{{- else }} + {{- errorf "The %q shortcodes requires a named or positional parameter, the file name of the embedded template, excluding its extension. See %s" .Name .Position }} {{- end -}} diff --git a/layouts/shortcodes/glossary-term.html b/layouts/shortcodes/glossary-term.html index 2af74b99d..2a45dc8cb 100644 --- a/layouts/shortcodes/glossary-term.html +++ b/layouts/shortcodes/glossary-term.html @@ -1,20 +1,15 @@ -{{/* prettier-ignore-start */ -}} {{- /* 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" %}} -*/}} -{{/* prettier-ignore-end */ -}} +*/ -}} {{- with .Get 0 }} {{- $path := printf "/quick-reference/glossary/%s" (urlize .) }} {{- with site.GetPage $path }} - {{/* prettier-ignore-start */ -}} -{{ .RenderShortcodes }} {{/* Do not indent. Do not remove non-breaking space. */}} - {{/* prettier-ignore-end */ -}} +{{ .RenderShortcodes }}{{/* Do not indent. */}} {{- else }} {{- errorf "The glossary term (%s) shortcode was unable to find %s: see %s" $.Name $path $.Position }} {{- end }} diff --git a/layouts/shortcodes/glossary.html b/layouts/shortcodes/glossary.html index 951ee6935..7331d5c9f 100644 --- a/layouts/shortcodes/glossary.html +++ b/layouts/shortcodes/glossary.html @@ -1,58 +1,54 @@ -{{/* prettier-ignore-start */ -}} {{- /* 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. +Markdown headings (level 6) which means they are members of .Fragments. This +allows the link render hook to verify links to glossary terms. Yes, the terms themselves are pages, but we don't want to link to the pages, at -least not right now. Instead, we want to link to the fragments rendered by this +least not right now. Instead, we want to link to the ids rendered by this shortcode. -@returns {template.HTML} - @example {{% glossary %}} -*/}} +*/ -}} {{- $path := "/quick-reference/glossary" }} {{- with site.GetPage $path }} - {{- /* Build and render alphabetical index. */}} - {{- $m := dict }} - {{- range $p := .Pages.ByTitle }} - {{- $k := substr .Title 0 1 | strings.ToUpper }} - {{- if index $m $k }} - {{- continue }} - {{- end }} - {{- $anchor := path.BaseName .Path | anchorize }} - {{- $m = merge $m (dict $k $anchor) }} + {{- /* Build and render alphabetical index. */}} + {{- $m := dict }} + {{- range $p := .Pages.ByTitle }} + {{- $k := substr .Title 0 1 | strings.ToUpper }} + {{- if index $m $k }} + {{- continue }} {{- end }} - {{- range $k, $v := $m }} + {{- $anchor := path.BaseName .Path | anchorize }} + {{- $m = merge $m (dict $k $anchor) }} + {{- end }} + {{- range $k, $v := $m }} [{{ $k }}](#{{ $v }}) {{/* Do not indent. */}} - {{- end }} + {{- end }} - {{- /* Render glossary terms. */}} - {{- range $p := .Pages.ByTitle }} -###### {{ .Title }}{{/* Do not indent. */}} -{{ .RenderShortcodes }}{{/* Do not indent. */}} - {{- with .Params.reference }} - {{- $destination := "" }} - {{- with $u := urls.Parse . }} - {{- if $u.IsAbs }} - {{- $destination = $u.String }} + {{/* Render glossary terms. */}} + {{- range $p := .Pages.ByTitle }} +{{ .Title }}{{/* Do not indent. */}} +: {{ .RawContent | strings.TrimSpace | safeHTML }}{{/* Do not indent. */}} + {{ with .Params.reference }} + {{- $destination := "" }} + {{- with $u := urls.Parse . }} + {{- if $u.IsAbs }} + {{- $destination = $u.String }} + {{- else }} + {{- with site.GetPage $u.Path }} + {{- $destination = .RelPermalink }} {{- else }} - {{- with site.GetPage $u.Path -}} - {{- $destination = .RelPermalink }} - {{- else }} - {{- errorf "The %q shortcode was unable to find the reference link %s: see %s" $.Name . $p.String }} - {{- end }} + {{- errorf "The %q shortcode was unable to find the reference link %s: see %s" $.Name . $p.String }} {{- end }} - {{- end -}} - See [details]({{ $destination }}).{{/* Do not indent. */}} + {{- end }} {{- end }} +: See [details]({{ $destination }}).{{/* Do not indent. */}} {{- end }} + {{ end }} {{- else }} {{- errorf "The %q shortcode was unable to get %s: see %s" .Name $path .Position}} {{- end }} -{{/* prettier-ignore-end */ -}} diff --git a/layouts/shortcodes/hl.html b/layouts/shortcodes/hl.html index 24b48d456..3fafcb5e8 100644 --- a/layouts/shortcodes/hl.html +++ b/layouts/shortcodes/hl.html @@ -1,10 +1,13 @@ +{{/* prettier-ignore-start */ -}} {{- /* - Returns syntax-highlighted code from the given text. +Returns syntax-highlighted code from the given text. - This is useful as a terse way to highlight inline code snippets. Calling the - highlight shortcode for inline snippets is verbose. -*/}} +This is useful as a terse way to highlight inline code snippets. Calling the +highlight shortcode for inline snippets is verbose. +@example This is {{< hl python >}}inline{{< /hl >}} code. +*/ -}} +{{/* prettier-ignore-end */ -}} {{- $code := .Inner | strings.TrimSpace }} {{- $lang := or (.Get 0) "go" }} {{- $opts := dict "hl_inline" true "noClasses" true }} diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html index 4979a4738..375a4d472 100644 --- a/layouts/shortcodes/img.html +++ b/layouts/shortcodes/img.html @@ -2,89 +2,83 @@ {{- /* Renders the given image using the given filter, if any. +When using the text filter, provide the arguments in this order: + +0. The text +1. The horizontal offset, in pixels, relative to the left of the image (default 20) +2. The vertical offset, in pixels, relative to the top of the image (default 20) +3. The font size in pixels (default 64) +4. The line height (default 1.2) +5. The font color (default #ffffff) + +When using the padding filter, provide all arguments in this order: + +0. Padding top +1. Padding right +2. Padding bottom +3. Padding right +4. Canvas color + @param {string} src The path to the image which must be a remote, page, or global resource. @param {string} [filter] The filter to apply to the image (case-insensitive). @param {string} [filterArgs] A comma-delimited list of arguments to pass to the filter. @param {bool} [example=false] If true, renders a before/after example. @param {int} [exampleWidth=384] Image width, in pixels, when rendering a before/after example. -@returns {template.HTML} +@example {{< img src="zion-national-park.jpg" >}} +@example {{< img src="zion-national-park.jpg" alt="Zion National Park" >}} -@examples +@example {{< img + src="zion-national-park.jpg" + alt="Zion National Park" + filter="grayscale" + >}} - {{< img src="zion-national-park.jpg" >}} +@example {{< img + src="zion-national-park.jpg" + alt="Zion National Park" + filter="process" + filterArgs="resize 400x webp" + >}} - {{< img src="zion-national-park.jpg" alt="Zion National Park" >}} +@example {{< img + src="zion-national-park.jpg" + alt="Zion National Park" + filter="colorize" + filterArgs="180,50,20" + >}} - {{< img - src="zion-national-park.jpg" - alt="Zion National Park" - filter="grayscale" - >}} +@example {{< img + src="zion-national-park.jpg" + alt="Zion National Park" + filter="grayscale" + example=true + >}} - {{< img - src="zion-national-park.jpg" - alt="Zion National Park" - filter="process" - filterArgs="resize 400x webp" - >}} +@example {{< img + src="zion-national-park.jpg" + alt="Zion National Park" + filter="grayscale" + example=true + exampleWidth=400 + >}} - {{< img - src="zion-national-park.jpg" - alt="Zion National Park" - filter="colorize" - filterArgs="180,50,20" - >}} +@example {{< img + src="images/examples/zion-national-park.jpg" + alt="Zion National Park" + filter="Text" + filterArgs="Zion National Park,25,250,56" + example=true + >}} - {{< img - src="zion-national-park.jpg" - alt="Zion National Park" - filter="grayscale" - example=true - >}} - - {{< img - src="zion-national-park.jpg" - alt="Zion National Park" - filter="grayscale" - example=true - exampleWidth=400 - >}} - - When using the text filter, provide the arguments in this order: - - 0. The text - 1. The horizontal offset, in pixels, relative to the left of the image (default 20) - 2. The vertical offset, in pixels, relative to the top of the image (default 20) - 3. The font size in pixels (default 64) - 4. The line height (default 1.2) - 5. The font color (default #ffffff) - - {{< img - src="images/examples/zion-national-park.jpg" - alt="Zion National Park" - filter="Text" - filterArgs="Zion National Park,25,250,56" - example=true - >}} - - When using the padding filter, provide all arguments in this order: - - 0. Padding top - 1. Padding right - 2. Padding bottom - 3. Padding right - 4. Canvas color - - {{< img - src="images/examples/zion-national-park.jpg" - alt="Zion National Park" - filter="Padding" - filterArgs="20,50,20,50,#0705" - example=true - >}} - -*/}} +@example {{< img + src="images/examples/zion-national-park.jpg" + alt="Zion National Park" + filter="Padding" + filterArgs="20,50,20,50,#0705" + example=true + >}} +*/ -}} {{/* prettier-ignore-end */ -}} {{- /* Initialize. */}} {{- $alt := "" }} @@ -329,27 +323,20 @@ 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 }} +{{- $class := "border-1 border-gray-300 dark:border-gray-500" }} {{- if $example }}

        Original

        {{ $alt }}

        Processed

        {{ $alt }} {{- else -}} {{ $alt }} {{- end }} diff --git a/layouts/shortcodes/imgproc.html b/layouts/shortcodes/imgproc.html index b0b035019..fee48525a 100644 --- a/layouts/shortcodes/imgproc.html +++ b/layouts/shortcodes/imgproc.html @@ -1,15 +1,14 @@ +{{/* prettier-ignore-start */ -}} {{- /* - Renders the given image using the given process specification. +Renders the given image using the given process specification. - @param {string} path The path to the image, either a page resource or a global resource. - @param {string} spec The image processing specification. - @param {string} alt The alt attribute of the img element. +@param {string} path The path to the image, either a page resource or a global resource. +@param {string} spec The image processing specification. +@param {string} alt The alt attribute of the img element. - @returns template.HTML - - @example {{< imgproc path="sunset.jpg" spec="resize 300x" alt="A sunset" / ->}} -*/}} +@example {{< imgproc path="sunset.jpg" spec="resize 300x" alt="A sunset" >}} +*/ -}} +{{/* prettier-ignore-end */ -}} {{- with $.Get "path" }} {{- with $i := or ($.Page.Resources.Get .) (resources.Get .) }} {{- with $spec := $.Get "spec" }} diff --git a/layouts/shortcodes/include.html b/layouts/shortcodes/include.html index e6a705a2a..81b0c1d8f 100644 --- a/layouts/shortcodes/include.html +++ b/layouts/shortcodes/include.html @@ -5,17 +5,15 @@ Renders the page using the RenderShortcode method on the Page object. You must call this shortcode using the {{% %}} notation. @param {string} (positional parameter 0) The path to the page, relative to the content directory. -@returns template.HTML @example {{% include "functions/_common/glob-patterns" %}} -*/}} +*/ -}} {{/* prettier-ignore-end */ -}} {{- with .Get 0 }} {{- with or ($.Page.GetPage .) (site.GetPage .) }} {{- .RenderShortcodes }} {{- else }} - {{/* TODO1 make error */}} - {{- warnf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position }} + {{- errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position }} {{- end }} {{- else }} {{- errorf "The %q shortcode requires a positional parameter indicating the path of the file to include. See %s" .Name .Position }} diff --git a/layouts/shortcodes/list-pages-in-section.html b/layouts/shortcodes/list-pages-in-section.html index 3bfd4eb9d..abc5bc2ed 100644 --- a/layouts/shortcodes/list-pages-in-section.html +++ b/layouts/shortcodes/list-pages-in-section.html @@ -21,23 +21,21 @@ omitElementIDs to true for the subset. @param {string} path The path to the section. @param {string} [filter=""] The name of filter list. @param {string} [filterType=""] The type of filter, either include or exclude. -@param {string} [omitElementIDs=false] Whether to omit dt element ids. +@param {string} [omitElementIDs=true] Whether to omit dt element ids. @param {string} [titlePrefix=""] The string to prepend to the link title. -@returns template.HTML - @example {{< list-pages-in-section path=/methods/resources >}} @example {{< list-pages-in-section path=/functions/images filter=some_filter filterType=exclude >}} @example {{< list-pages-in-section path=/functions/images filter=some_filter filterType=exclude titlePrefix=foo >}} @example {{< list-pages-in-section path=/functions/images filter=some_filter filterType=exclude titlePrefix=foo omitElementIDs=true >}} -*/}} +*/ -}} {{/* prettier-ignore-end */ -}} {{- /* Initialize. */}} {{- $filter := or "" (.Get "filter" | lower) }} {{- $filterType := or (.Get "filterType") "none" | lower }} {{- $filteredPages := slice }} {{- $titlePrefix := or (.Get "titlePrefix") "" }} -{{- $omitElementIDs := false }} +{{- $omitElementIDs := true }} {{- /* Get boolean parameters. */}} {{- if in (slice "false" false 0) (.Get "omitElementIDs") }} diff --git a/layouts/shortcodes/module-mounts-note.html b/layouts/shortcodes/module-mounts-note.html index cbfad79f6..ba89abcbf 100644 --- a/layouts/shortcodes/module-mounts-note.html +++ b/layouts/shortcodes/module-mounts-note.html @@ -1,3 +1,2 @@ -Also see [Module Mounts -Config](/hugo-modules/configuration/#module-configuration-mounts) for an -alternative way to configure this directory. +For a more flexible approach to configuring this directory, consult the section +on [module mounts](/configuration/module/#mounts). diff --git a/layouts/shortcodes/new-in.html b/layouts/shortcodes/new-in.html index 781f08b90..955d0a710 100644 --- a/layouts/shortcodes/new-in.html +++ b/layouts/shortcodes/new-in.html @@ -1,28 +1,25 @@ {{/* prettier-ignore-start */ -}} {{- /* - Renders a callout or badge indicating the version in which a feature was added. +Renders a callout or badge indicating the version in which a feature was added. - To render a callout, include descriptive text between the opening and closing - tags. To render a badge,omit the descriptive text and call the shortcode with - a self-closing tag. +To render a callout, include descriptive text between the opening and closing +tags. To render a badge,omit the descriptive text and call the shortcode with a +self-closing tag. - When comparing the current version to the specified version, the "new in" - button will be hidden if any of the following conditions is true: +When comparing the current version to the specified version, the "new in" +button will be hidden if any of the following conditions is true: - - The major version difference exceeds the majorVersionDiffThreshold - - The minor version difference exceeds the minorVersionDiffThreshold +- The major version difference exceeds the majorVersionDiffThreshold +- The minor version difference exceeds the minorVersionDiffThreshold - @param {string} 0 The semantic version string, with or without a leading v. - @returns {template.HTML} +@param {string} 0 The semantic version string, with or without a leading v. - @examples +@example {{< new-in 0.100.0 />}} - {{< new-in 0.100.0 />}} - - {{< new-in 0.100.0 >}} - Some descriptive text here. - {{< /new-in >}} -*/}} +@example {{{< new-in 0.100.0 >}} + Some descriptive text here. + {{< /new-in >}} +*/ -}} {{/* prettier-ignore-end */ -}} {{- $majorVersionDiffThreshold := 0 }} {{- $minorVersionDiffThreshold := 30 }} diff --git a/layouts/shortcodes/note.html b/layouts/shortcodes/note.html index 2bbfc987e..7a40e1b8b 100644 --- a/layouts/shortcodes/note.html +++ b/layouts/shortcodes/note.html @@ -1,15 +1,11 @@ {{/* prettier-ignore-start */ -}} {{- /* - Renders a callout. +Renders a callout. - @returns {template.HTML} - - @examples - - {{< note >}} - Some descriptive text here. - {{< /note >}} -*/}} +@example {{< note >}} + Some descriptive text here. + {{< /note >}} +*/ -}} {{/* prettier-ignore-end */ -}} {{- $text := .Inner | strings.TrimSpace | .Page.RenderString (dict "display" "block") }} {{- partial "layouts/blocks/alert.html" (dict diff --git a/layouts/shortcodes/per-lang-config-keys.html b/layouts/shortcodes/per-lang-config-keys.html new file mode 100644 index 000000000..f6090d555 --- /dev/null +++ b/layouts/shortcodes/per-lang-config-keys.html @@ -0,0 +1,71 @@ +{{/* prettier-ignore-start */ -}} +{{- /* +Renders a responsive grid of the configuration keys that can be defined +separately for each language. +*/ -}} +{{/* prettier-ignore-end */ -}} +{{- $siteConfigKeys := slice + (dict "baseURL" "/configuration/all/#baseurl") + (dict "buildDrafts" "/configuration/all/#builddrafts") + (dict "buildExpired" "/configuration/all/#buildexpired") + (dict "buildFuture" "/configuration/all/#buildfuture") + (dict "canonifyURLs" "/configuration/all/#canonifyurls") + (dict "capitalizeListTitles" "/configuration/all/#capitalizelisttitles") + (dict "contentDir" "/configuration/all/#contentdir") + (dict "copyright" "/configuration/all/#copyright") + (dict "disableAliases" "/configuration/all/#disablealiases") + (dict "disableHugoGeneratorInject" "/configuration/all/#disableHugogeneratorinject") + (dict "disableKinds" "/configuration/all/#disableKinds") + (dict "disableLiveReload" "/configuration/all/#disablelivereload") + (dict "disablePathToLower" "/configuration/all/#disablepathtolower") + (dict "enableEmoji " "/configuration/all/#enableemoji") + (dict "frontmatter" "/configuration/front-matter/") + (dict "hasCJKLanguage" "/configuration/all/#hascjklanguage") + (dict "languageCode" "/configuration/all/#languagecode") + (dict "mainSections" "/configuration/all/#mainsections") + (dict "markup" "/configuration/markup/") + (dict "mediaTypes" "/configuration/media-types/") + (dict "menus" "/configuration/menus/") + (dict "outputFormats" "/configuration/output-formats") + (dict "outputs" "/configuration/outputs/") + (dict "page" "/configuration/page/") + (dict "pagination" "/configuration/pagination/") + (dict "params" "/configuration/params/") + (dict "permalinks" "/configuration/permalinks/") + (dict "pluralizeListTitles" "/configuration/all/#pluralizelisttitles") + (dict "privacy" "/configuration/privacy/") + (dict "refLinksErrorLevel" "/configuration/all/#reflinkserrorlevel") + (dict "refLinksNotFoundURL" "/configuration/all/#reflinksnotfoundurl") + (dict "related" "/configuration/related-content/") + (dict "relativeURLs" "/configuration/all/#relativeurls") + (dict "removePathAccents" "/configuration/all/#removepathaccents") + (dict "renderSegments" "/configuration/all/#rendersegments") + (dict "sectionPagesMenu" "/configuration/all/#sectionpagesmenu") + (dict "security" "/configuration/security/") + (dict "services" "/configuration/services/") + (dict "sitemap" "/configuration/sitemap/") + (dict "staticDir" "/configuration/all/#staticdir") + (dict "summaryLength" "/configuration/all/#summarylength") + (dict "taxonomies" "/configuration/taxonomies/") + (dict "timeZone" "/configuration/all/#timezone") + (dict "title" "/configuration/all/#title") + (dict "titleCaseStyle" "/configuration/all/#titlecasestyle") +}} + +{{- $a := len $siteConfigKeys }} +{{- $b := math.Ceil (div $a 2.) }} +{{- $c := math.Ceil (div $a 3.) }} + + +
        + {{- range $siteConfigKeys }} + {{ range $k, $v := . }} + {{ $u := urls.Parse $v }} + {{ if not (site.GetPage $u.Path) }} + {{ errorf "The %q shorcode was unable to find %s. See %s." $.Name $u.Path $.Position }} + {{ end }} + {{ $k }} + {{ end }} + {{- end }} +
        diff --git a/layouts/shortcodes/quick-reference.html b/layouts/shortcodes/quick-reference.html index b9f4fdc18..174a732d8 100644 --- a/layouts/shortcodes/quick-reference.html +++ b/layouts/shortcodes/quick-reference.html @@ -1,13 +1,13 @@ {{/* prettier-ignore-start */ -}} -{{/* -Renders the child sections of the given top-level section, listing each child's immediate descendants. +{{- /* +Renders the child sections of the given top-level section, listing each child's +immediate descendants. @param {string} section The top-level section to render. -@returns template.HTML - -@example {{% quick-reference section="functions" %}} -*/}} +@example {{< quick-reference section="functions" >}} +*/ -}} +{{/* prettier-ignore-end */ -}} {{ $section := "" }} {{ with .Get "section" }} {{ $section = . }} @@ -15,27 +15,28 @@ Renders the child sections of the given top-level section, listing each child's {{ errorf "The %q shortcodes requires a 'section' parameter. See %s" .Name .Position }} {{ end }} -{{/* Do not change the markdown indentation, and do not remove blank lines. */}} {{ with site.GetPage $section }} {{ range .Sections }} - -## {{ .LinkTitle }} -{{ .RawContent }} - - {{ range .Pages }} - {{ $aliases := "" }} - {{ if eq .Section "functions" }} - {{ with .Params.action.aliases }} - {{ $aliases = delimit . " or " }} +

        {{ .LinkTitle }}

        + {{ .Content }} + {{ with .Pages }} +
        + {{ range . }} + {{ $aliases := "" }} + {{ if eq .Section "functions" }} + {{ with .Params.functions_and_methods.aliases }} + {{ $aliases = delimit . " or " }} + {{ end }} + {{ end }} +
        + {{ .LinkTitle }} + {{ with $aliases }}({{ . }}){{ end }} +
        +
        {{ .Description }}
        {{ end }} - {{ end }} - -[{{ .LinkTitle }}]({{ .RelPermalink }}) {{ with $aliases }}({{ . }}){{ end }} -: {{ .Description }} - +
        {{ end }} {{ end }} {{ else }} {{ errorf "The %q shortcodes was unable to find the %q section. See %s" .Name $section .Position }} {{ end }} -{{/* prettier-ignore-end */ -}} diff --git a/layouts/shortcodes/root-configuration-keys.html b/layouts/shortcodes/root-configuration-keys.html new file mode 100644 index 000000000..8d51ee639 --- /dev/null +++ b/layouts/shortcodes/root-configuration-keys.html @@ -0,0 +1,25 @@ +{{/* prettier-ignore-start */ -}} +{{/* +Renders a comma-separated list of links to the root key configuration pages. + +@example {{< root-configuration-keys >}} +*/ -}} +{{/* prettier-ignore-end */ -}} +{{- $keys := slice }} +{{- range $k, $_ := site.Data.docs.config }} + {{- if or (reflect.IsMap .) (reflect.IsSlice .) }} + {{- $keys = $keys | append $k }} + {{- end }} +{{- end }} +{{- $keys = $keys | append "uglyURLs" }} +{{- $keys = $keys | complement (slice "author" "ignoreFiles" "staticDir") }} +{{- $keys = apply $keys "strings.ToLower" "." | sort }} + +{{- $links := slice }} +{{- range $key := $keys }} + {{- with site.GetPage (printf "/configuration/%s" .) }} + {{- $links = $links | append (printf "%s" .RelPermalink $key) }} + {{- end }} +{{- end }} + +{{- delimit $links ", " ", and " | safeHTML -}} diff --git a/layouts/shortcodes/syntax-highlighting-styles.html b/layouts/shortcodes/syntax-highlighting-styles.html new file mode 100644 index 000000000..55552f70b --- /dev/null +++ b/layouts/shortcodes/syntax-highlighting-styles.html @@ -0,0 +1,70 @@ +{{- /* +Renders a gallery a Chroma syntax highlighting styles. + +@example {{% syntax-highlighting-styles %}} +*/ -}} +{{- $examples := slice }} + +{{- /* Example: css */}} +{{- $example := dict "lang" "css" "code" ` +body { + font-size: 16px; /* comment */ +} +`}} +{{- $examples = $examples | append $example }} + +{{- /* Example: html */}} +{{- $example = dict "lang" "html" "code" ` +Example +`}} +{{- $examples = $examples | append $example }} + +{{- /* Example: go-html-template */}} +{{- $example = dict "lang" "go-html-template" "code" ` +{{ with $.Page.Params.content }} + {{ . | $.Page.RenderString }} {{/* comment */}} +{{ end }} +`}} +{{- $examples = $examples | append $example }} + +{{- /* Example: javascript */}} +{{- $example = dict "lang" "javascript" "code" ` +if ([1,"one",2,"two"].includes(value)){ + console.log("Number is either 1 or 2."); // comment +} +`}} +{{- $examples := $examples | append $example }} + +{{- /* Example: markdown */}} +{{- $example = dict "lang" "markdown" "code" ` +{{< figure src="kitten.jpg" >}} +[example](https://example.org "An example") +`}} +{{- $examples := $examples | append $example }} + +{{- /* Example: toml */}} +{{- $example = dict "lang" "toml" "code" ` +[params] +bool = true # comment +string = 'foo' +`}} +{{- $examples := $examples | append $example }} + +{{- /* Render */}} +{{- with site.Data.docs.chroma.styles }} + {{- range $style := . }} + +### {{ $style }} {class="!mt-7 !mb-1"}{{/* Do not indent. */}} + + {{- range $examples }} + +{{ .lang }}{{/* Do not indent. */}} +{class="text-sm !mt-5 !mb-1"}{{/* Do not indent. */}} + +```{{ .lang }} {class="!my-0" noClasses=true style="{{ $style }}"}{{/* Do not indent. */}} +{{- .code | safeHTML -}}{{/* Do not indent. */}} +```{{/* Do not indent. */}} + + {{- end }} + {{- end }} +{{- end }}