From f96384a3b596f9bc0a3a035970b09b2c601f0ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 22 May 2023 16:43:12 +0200 Subject: [PATCH] Squashed 'docs/' changes from 6e32d0591..39af43ef1 39af43ef1 Update postprocess.md 3ec192d08 Update multilingual.md 7fc7bf862 Add a note about some changes in 0.112.0 742510ae8 Fix ordinal abbrev example fe557031a Correct spelling for 'GitHub' and 'GitLab' (#2082) 84a059b9a Fix typo in hosting-on-azure.md (#2080) 3383786fe Add i18n to list of directories affected by ignoreFiles 5bfb95234 Update 404.md (#2076) 87545a4fd Update hosting-on-cloudflare-pages.md (#2078) aa5952c28 Add default module mount to example (#2075) ced5292c8 Align permalinks examples (#2073) 77b5009fd Fix typo c79319a6a Clarify description of baseURL e93a9807b Fix typo in frontmatter description (#2071) 05fe9163a Remove erroneous statement aa59ef383 docs: Remove note about hugo server not using 404 (#2068) 4a387a6b8 Clarify findRESubmatch (#2065) 47a9181b5 Clarify findRE, replaceRE, and findRESubmatch (#2064) e5eedbb5e Update theme 5d392c3d4 Clarify pageRef menu property (#2059) a557b0ebf Fix typos on Configure Hugo page (#2058) 17ef283e6 Clarify module.replacements wording (#2052) 5db4aa421 Fixing broken links (#2057) 9afa0c2fa Fix broken links (#2055) 49b981b1f Correct repo URL for migration tool (contentful.com) (#2056) 969c24c16 Remove duplicate content 0b91e7676 Revert "Delete duplicate content" 3229e79f2 Delete duplicate content ec4eddb98 Fix typo 6509159d5 Describe snap package strict confinement (#2050) 1589bcdb7 Remove hugo.Generator admonition (#2048) 7e553d11b Add example 48bec0335 Replace blockquotes with admonitions where appropriate (#2043) 98226fe61 Remove orphaned param fron admonition calls (#2042) 2a37a1d21 Clarify cast functions (#2041) 03fd1d404 Fix typo 1898013ef Fix typos 944e27430 Replace output shortcode calls 0c66fb055 Add example of shortcode calls within sample code f25a79c69 Replace tip and warning shortcode calls 3afac22fc Refactor code shortcode ad65d2931 Clarify seq function 59f8a1f48 Clarify title function 47535dc87 Cleanup hasPrefix hasSuffix 7bee3e4c1 Cleanup action delimiters cc96070f0 Correct functions archetype ffe5d39b9 Remove duplicate shortcodes 075c9f3fe Remove old todos bc3ec033c Front matter cleanup (#2039) 928b94505 Add code fence types (#2038) 856fa293c Document .File.Filename (#2037) 0988c4a42 Update output-formats.md (#2036) 289da5658 Change findRe to findRE 1e50f0583 Update theme f90fb1bf5 Improve type formatting (#2032) 7785fa7d9 Use code-toggle shortcode where appropriate f11cabf37 Add space after and before action delimiters ac333c795 Replace erroneous use of nocopy shortcode param 064896c06 Use bool param when calling code-toggle fb33bf59b Update code-toggle shortcode 6ddeab4f8 Add missing go-html-template code fence type (#2030) 1bba4cefb Fix links (#2029) 77f4d6c32 Link destination cleanup (#2028) fc0ecc027 Improve breadcrumb example (#2026) 6148be2de Update the breadcrumb navigation example (#2025) 6ebb37b1b Clarify sort function (#2024) 31269bad9 Add Winget installation method (#1988) d6c5f940e Resource methods: add signatures, minor improvements (#2017) d2e594cbc Modify inner variable shortcode-template explanation (#1985) a54927a7f Update GitHub Pages starter workflow (#2023) 2964c2d44 Remove orphaned static files (#2022) 97e5567cc Complete documentation on '.Scratch' and '.Store' (#2016) fa7b2e299 Fix typo bdce77c57 Remove literal from example menu template c0f23b216 Correct and improve menu documentation (#2010) 464368fd9 Document .Page.Store (#2011) a3d7c4a3a Improve urls.Parse function (#2012) d2cec3776 Clarify postcss config option (#2013) eb3003fef Fixed typo (#2007) 90c82d7ea Clarify mermaid markdown example (#2004) 1b11dcd5c docs(Diagrams): Update mermaid import mechanism (#1967) 4aceb6855 Fingerprinting, asset management: minor improvements (#2003) bcbc519bb resources.GetRemote: minor improvement (#2002) d54185bef Clarify markdownify behavior (#1999) afb582a80 Clarify usage of slug in front matter (#1998) f71985315 Update hasSuffix.md 29ad622a3 netlify: Hugo 0.111.3 adf223ecc Merge branch 'tempv0.111.3' 06858c646 docs: Improve examples of variadic math functions 8b656994e tpl/math: Allow multi numbers in add, sub, mul, div, min and max 2a38c4046 tpl: Add hasSuffix alias 4e0b98d54 switch transfers to workers 11651ac0f customize parallel transfer count 142f5da81 Update GitHub hosting instructions (#1991) ad7901d2f netlify: Hugo 0.111.2 0651a76e0 add headings to distinguish render hook context params d96d75be4 netlify: Hugo 0.111.1 226cb9e3a Add a paragraph about the new page template function 4c0157a49 Add .Fragments docs 6c78c0679 netlify: Bump to Hugo 0.111.0 7b11c24cf Merge branch 'feat/related-fragments' 615d18ef8 Add Related fragments config a36449b0c cods: Regen docs helper 0272fa45f Merge commit '336622d5e7afd9334cd2de7150d4f16bdf7c24f9' c5a962b93 related: Add config option cardinalityThreshold f91677377 docs: Another fix related docs example 17aa939ea docs: Fix related docs example 12c449150 Merge commit 'cf591b7c0c598d34896709db6d28598da37e3ff6' cb998b3d6 Add page fragments support to Related git-subtree-dir: docs git-subtree-split: 39af43ef11c23b8eaea7e17b59ff065a169305ac --- .../images/sponsors/your-company-dark.svg | 2 +- .../assets/images/sponsors/your-company.svg | 2 +- .../gohugoio/gohugoioTheme/data/sponsors.toml | 27 +- .../partials/home-page-sections/sponsors.html | 19 +- _vendor/modules.txt | 2 +- archetypes/functions.md | 13 +- content/en/about/_index.md | 7 +- content/en/about/benefits.md | 9 +- content/en/about/features.md | 8 +- content/en/about/hugo-and-gdpr.md | 10 +- content/en/about/license.md | 10 +- content/en/about/security-model/index.md | 4 +- content/en/about/what-is-hugo.md | 8 +- content/en/commands/hugo_deploy.md | 1 + content/en/content-management/_index.md | 1 - content/en/content-management/archetypes.md | 1 - .../en/content-management/build-options.md | 38 +- content/en/content-management/comments.md | 3 +- content/en/content-management/diagrams.md | 7 +- content/en/content-management/formats.md | 4 +- content/en/content-management/front-matter.md | 60 ++- .../image-processing/index.md | 15 +- content/en/content-management/menus.md | 282 +++++++---- content/en/content-management/multilingual.md | 194 +++++--- .../content-management/organization/index.md | 82 +--- content/en/content-management/page-bundles.md | 9 +- .../en/content-management/page-resources.md | 16 +- content/en/content-management/related.md | 100 +++- content/en/content-management/sections.md | 27 +- content/en/content-management/shortcodes.md | 230 ++++----- content/en/content-management/static-files.md | 2 +- content/en/content-management/summaries.md | 6 +- .../content-management/syntax-highlighting.md | 3 +- content/en/content-management/taxonomies.md | 30 +- content/en/content-management/toc.md | 15 +- content/en/content-management/types.md | 1 - content/en/content-management/urls.md | 451 ++++++++++-------- content/en/contribute/_index.md | 10 +- content/en/contribute/development.md | 23 +- content/en/contribute/documentation.md | 365 ++++---------- content/en/contribute/themes.md | 7 +- content/en/documentation.md | 9 +- content/en/functions/GetPage.md | 9 +- content/en/functions/RenderString.md | 7 +- content/en/functions/_index.md | 9 +- content/en/functions/adddate.md | 9 +- content/en/functions/after.md | 45 +- content/en/functions/anchorize.md | 5 +- content/en/functions/append.md | 6 +- content/en/functions/apply.md | 83 ++-- content/en/functions/base64.md | 34 +- content/en/functions/chomp.md | 12 +- content/en/functions/complement.md | 3 +- content/en/functions/cond.md | 14 +- content/en/functions/countrunes.md | 10 +- content/en/functions/countwords.md | 10 +- content/en/functions/crypto.FNV32a.md | 3 +- content/en/functions/dateformat.md | 8 +- content/en/functions/default.md | 44 +- content/en/functions/delimit.md | 63 +-- content/en/functions/dict.md | 10 +- content/en/functions/duration.md | 3 +- content/en/functions/echoparam.md | 12 +- content/en/functions/emojify.md | 8 +- content/en/functions/eq.md | 12 +- content/en/functions/errorf.md | 14 +- content/en/functions/fileExists.md | 14 +- content/en/functions/findRe.md | 41 +- content/en/functions/findresubmatch.md | 102 ++++ content/en/functions/first.md | 10 +- content/en/functions/float.md | 46 +- content/en/functions/format.md | 13 +- content/en/functions/ge.md | 12 +- content/en/functions/get.md | 10 +- content/en/functions/getenv.md | 10 +- content/en/functions/group.md | 4 +- content/en/functions/gt.md | 12 +- content/en/functions/hasPrefix.md | 21 - content/en/functions/hasmenucurrent.md | 11 +- content/en/functions/highlight.md | 15 +- content/en/functions/hmac.md | 10 +- content/en/functions/htmlEscape.md | 12 +- content/en/functions/htmlUnescape.md | 12 +- content/en/functions/hugo.md | 18 +- content/en/functions/humanize.md | 20 +- content/en/functions/i18n.md | 16 +- content/en/functions/images/index.md | 9 +- content/en/functions/in.md | 14 +- content/en/functions/index-function.md | 24 +- content/en/functions/int.md | 63 +-- content/en/functions/intersect.md | 12 +- content/en/functions/ismenucurrent.md | 11 +- content/en/functions/isset.md | 18 +- content/en/functions/jsonify.md | 12 +- content/en/functions/lang.Merge.md | 9 +- content/en/functions/lang.md | 5 +- content/en/functions/last.md | 15 +- content/en/functions/le.md | 12 +- content/en/functions/len.md | 71 +-- content/en/functions/lower.md | 10 +- content/en/functions/lt.md | 12 +- content/en/functions/markdownify.md | 29 +- content/en/functions/math.md | 51 +- content/en/functions/md5.md | 12 +- content/en/functions/merge.md | 8 +- content/en/functions/ne.md | 12 +- content/en/functions/now.md | 16 +- content/en/functions/os.Stat.md | 11 +- content/en/functions/param.md | 11 +- content/en/functions/partialCached.md | 17 +- content/en/functions/path.Base.md | 10 +- content/en/functions/path.BaseName.md | 4 +- content/en/functions/path.Clean.md | 9 +- content/en/functions/path.Dir.md | 10 +- content/en/functions/path.Ext.md | 10 +- content/en/functions/path.Join.md | 10 +- content/en/functions/path.Split.md | 10 +- content/en/functions/plainify.md | 12 +- content/en/functions/pluralize.md | 12 +- content/en/functions/print.md | 11 +- content/en/functions/printf.md | 13 +- content/en/functions/println.md | 11 +- content/en/functions/querify.md | 10 +- content/en/functions/range.md | 11 +- content/en/functions/readdir.md | 10 +- content/en/functions/readfile.md | 13 +- content/en/functions/ref.md | 10 +- content/en/functions/reflect.IsMap.md | 10 +- content/en/functions/reflect.IsSlice.md | 10 +- content/en/functions/relref.md | 10 +- content/en/functions/render.md | 13 +- content/en/functions/replace.md | 9 +- content/en/functions/replacere.md | 21 +- content/en/functions/safeCSS.md | 11 +- content/en/functions/safeHTML.md | 11 +- content/en/functions/safeHTMLAttr.md | 1 - content/en/functions/safeJS.md | 11 +- content/en/functions/safeURL.md | 35 +- content/en/functions/scratch.md | 9 +- content/en/functions/seq.md | 48 +- content/en/functions/sha.md | 13 +- content/en/functions/shuffle.md | 31 +- content/en/functions/singularize.md | 10 +- content/en/functions/site.md | 13 +- content/en/functions/slice.md | 12 +- content/en/functions/slicestr.md | 14 +- content/en/functions/sort.md | 149 ++++-- content/en/functions/split.md | 11 +- content/en/functions/store.md | 105 ++++ content/en/functions/string.md | 51 +- content/en/functions/strings.Contains.md | 3 +- content/en/functions/strings.ContainsAny.md | 3 +- content/en/functions/strings.Count.md | 9 +- content/en/functions/strings.FirstUpper.md | 4 +- content/en/functions/strings.HasPrefix.md | 16 + content/en/functions/strings.HasSuffix.md | 20 +- content/en/functions/strings.Repeat.md | 11 +- content/en/functions/strings.RuneCount.md | 11 +- content/en/functions/strings.TrimLeft.md | 9 +- content/en/functions/strings.TrimPrefix.md | 9 +- content/en/functions/strings.TrimRight.md | 9 +- content/en/functions/strings.TrimSuffix.md | 9 +- content/en/functions/substr.md | 12 +- content/en/functions/symdiff.md | 7 +- content/en/functions/templates.Exists.md | 12 +- content/en/functions/time.ParseDuration.md | 4 +- content/en/functions/time.md | 20 +- content/en/functions/title.md | 35 +- content/en/functions/transform.Unmarshal.md | 11 +- content/en/functions/trim.md | 17 +- content/en/functions/truncate.md | 11 +- content/en/functions/union.md | 14 +- content/en/functions/uniq.md | 5 +- content/en/functions/unix.md | 3 +- content/en/functions/upper.md | 11 +- content/en/functions/urlize.md | 57 +-- content/en/functions/urlquery.md | 10 +- content/en/functions/urls.Parse.md | 35 +- content/en/functions/where.md | 25 +- content/en/functions/with.md | 17 +- content/en/getting-started/_index.md | 7 +- .../getting-started/configuration-markup.md | 2 - content/en/getting-started/configuration.md | 43 +- .../en/getting-started/directory-structure.md | 10 +- .../external-learning-resources/index.md | 9 +- content/en/getting-started/quick-start.md | 1 - content/en/getting-started/usage.md | 4 +- content/en/hosting-and-deployment/_index.md | 10 +- .../deployment-with-rclone.md | 10 +- .../deployment-with-rsync.md | 11 +- .../hosting-on-21yunbox.md | 9 +- .../hosting-on-aws-amplify.md | 8 +- .../hosting-on-azure-static-web-apps.md | 9 +- .../hosting-on-azure.md | 11 +- .../hosting-on-cloudflare-pages.md | 8 +- .../hosting-on-firebase.md | 14 +- .../hosting-on-github.md | 118 ----- .../hosting-on-github/gh-pages-1.png | Bin 0 -> 3677 bytes .../hosting-on-github/gh-pages-2.png | Bin 0 -> 4014 bytes .../hosting-on-github/gh-pages-3.png | Bin 0 -> 6390 bytes .../hosting-on-github/gh-pages-4.png | Bin 0 -> 6258 bytes .../hosting-on-github/gh-pages-5.png | Bin 0 -> 4793 bytes .../hosting-on-github/index.md | 180 +++++++ .../hosting-on-gitlab.md | 10 +- .../hosting-on-keycdn.md | 8 +- .../hosting-on-netlify.md | 19 +- .../hosting-on-render.md | 13 +- .../en/hosting-and-deployment/hugo-deploy.md | 10 +- content/en/hugo-modules/_index.md | 6 +- content/en/hugo-modules/configuration.md | 26 +- content/en/hugo-modules/theme-components.md | 6 +- content/en/hugo-modules/use-modules.md | 7 +- content/en/hugo-pipes/_index.md | 7 +- content/en/hugo-pipes/babel.md | 8 +- content/en/hugo-pipes/bundling.md | 16 +- content/en/hugo-pipes/fingerprint.md | 19 +- content/en/hugo-pipes/introduction.md | 25 +- content/en/hugo-pipes/js.md | 13 +- content/en/hugo-pipes/minification.md | 15 +- content/en/hugo-pipes/postcss.md | 122 +++-- content/en/hugo-pipes/postprocess.md | 12 +- content/en/hugo-pipes/resource-from-string.md | 14 +- .../en/hugo-pipes/resource-from-template.md | 14 +- .../{scss-sass.md => transform-to-css.md} | 17 +- content/en/installation/_index.md | 1 - content/en/installation/bsd.md | 1 - content/en/installation/linux.md | 10 +- content/en/installation/macos.md | 1 - content/en/installation/windows.md | 11 +- content/en/maintenance/_index.md | 4 - content/en/news/0.11-relnotes/index.md | 12 +- content/en/news/0.12-relnotes/index.md | 10 +- content/en/news/0.14-relnotes/index.md | 2 +- content/en/news/0.17-relnotes/index.md | 2 - content/en/news/0.18-relnotes/index.md | 2 - content/en/news/0.19-relnotes/index.md | 2 - content/en/news/0.20-relnotes/index.md | 64 ++- content/en/news/0.20.1-relnotes/index.md | 10 +- content/en/news/0.20.2-relnotes/index.md | 6 +- content/en/news/0.20.3-relnotes/index.md | 4 +- content/en/news/0.20.4-relnotes/index.md | 4 +- content/en/news/0.20.5-relnotes/index.md | 4 +- content/en/news/0.20.6-relnotes/index.md | 4 +- content/en/news/0.20.7-relnotes/index.md | 4 +- content/en/news/0.21-relnotes/index.md | 4 +- content/en/news/0.22-relnotes/index.md | 4 +- content/en/news/0.22.1-relnotes/index.md | 4 +- content/en/news/0.23-relnotes/index.md | 4 +- content/en/news/0.24-relnotes/index.md | 4 +- content/en/news/0.24.1-relnotes/index.md | 4 +- content/en/news/0.25-relnotes/index.md | 4 +- content/en/news/0.25.1-relnotes/index.md | 5 +- content/en/news/0.59.0-relnotes/index.md | 9 +- content/en/news/0.63.0-relnotes/index.md | 7 - content/en/news/0.80.0-relnotes/index.md | 2 +- content/en/news/0.81.0-relnotes/index.md | 2 +- .../index.md | 3 +- content/en/readfiles/dateformatting.md | 4 +- content/en/templates/404.md | 31 +- content/en/templates/_index.md | 10 +- content/en/templates/base.md | 19 +- content/en/templates/data-templates.md | 21 +- content/en/templates/files.md | 13 +- content/en/templates/homepage.md | 47 +- content/en/templates/internal.md | 16 +- content/en/templates/introduction.md | 80 ++-- .../en/templates/{lists.md => lists/index.md} | 53 +- .../en/templates/lists}/site-hierarchy.svg | 0 content/en/templates/lookup-order.md | 9 +- content/en/templates/menu-templates.md | 249 ++++------ content/en/templates/output-formats.md | 32 +- content/en/templates/pagination.md | 13 +- content/en/templates/partials.md | 24 +- content/en/templates/render-hooks.md | 12 +- content/en/templates/robots.md | 10 +- content/en/templates/rss.md | 10 +- content/en/templates/section-templates.md | 11 +- content/en/templates/shortcode-templates.md | 54 +-- content/en/templates/single-page-templates.md | 68 ++- content/en/templates/sitemap-template.md | 7 +- content/en/templates/taxonomy-templates.md | 36 +- content/en/templates/template-debugging.md | 7 +- content/en/templates/views.md | 23 +- content/en/tools/_index.md | 8 +- content/en/tools/editors.md | 8 +- content/en/tools/frontends.md | 9 +- content/en/tools/migrations.md | 9 +- content/en/tools/other.md | 7 +- content/en/tools/search.md | 10 +- content/en/tools/starter-kits.md | 13 +- content/en/troubleshooting/_index.md | 11 +- .../en/troubleshooting/build-performance.md | 15 +- content/en/troubleshooting/faq.md | 3 +- content/en/variables/_index.md | 10 +- content/en/variables/files.md | 118 +++-- content/en/variables/git.md | 11 +- content/en/variables/menus.md | 169 +++---- content/en/variables/page.md | 158 +++--- content/en/variables/pages.md | 11 +- content/en/variables/shortcodes.md | 18 +- content/en/variables/site.md | 16 +- content/en/variables/sitemap.md | 8 +- content/en/variables/taxonomy.md | 6 +- data/docs.json | 29 +- go.mod | 2 +- go.sum | 4 + hugo.toml | 12 +- layouts/shortcodes/code-toggle.html | 131 +++-- layouts/shortcodes/code.html | 61 ++- layouts/shortcodes/content-tree.html | 14 - layouts/shortcodes/directoryindex.html | 13 - layouts/shortcodes/docfile.html | 11 - layouts/shortcodes/exfile.html | 12 - layouts/shortcodes/exfm.html | 13 - layouts/shortcodes/gh.html | 9 - layouts/shortcodes/ghrepo.html | 1 - layouts/shortcodes/nohighlight.html | 1 - layouts/shortcodes/note.html | 9 - layouts/shortcodes/output.html | 8 - layouts/shortcodes/tip.html | 9 - layouts/shortcodes/warning.html | 9 - layouts/shortcodes/yt.html | 11 - netlify.toml | 8 +- .../deployment-with-nanobox/hugo-server.png | Bin 74234 -> 0 bytes .../hugo-with-nanobox.png | Bin 5613 -> 0 bytes .../nanobox-deploy-dry-run.png | Bin 37494 -> 0 bytes .../deployment-with-nanobox/nanobox-run.png | Bin 69079 -> 0 bytes .../adding-a-github-pages-step.png | Bin 41068 -> 0 bytes .../adding-the-project-to-github.png | Bin 50615 -> 0 bytes .../and-we-ve-got-an-app.png | Bin 32517 -> 0 bytes .../configure-the-deploy-step.png | Bin 68953 -> 0 bytes .../creating-a-basic-hugo-site.png | Bin 27450 -> 0 bytes .../deployment-with-wercker/public-or-not.png | Bin 11394 -> 0 bytes .../using-hugo-build.png | Bin 11670 -> 0 bytes .../wercker-access.png | Bin 57084 -> 0 bytes .../wercker-account-settings.png | Bin 6725 -> 0 bytes .../wercker-add-app.png | Bin 43674 -> 0 bytes .../wercker-git-connections.png | Bin 25260 -> 0 bytes .../wercker-search.png | Bin 28724 -> 0 bytes .../wercker-select-owner.png | Bin 18047 -> 0 bytes .../wercker-select-repository.png | Bin 28485 -> 0 bytes .../wercker-sign-up-page.png | Bin 15601 -> 0 bytes .../wercker-sign-up.png | Bin 124423 -> 0 bytes .../deployment-with-wercker/werckeryml.png | Bin 45528 -> 0 bytes 344 files changed, 3229 insertions(+), 4302 deletions(-) create mode 100644 content/en/functions/findresubmatch.md delete mode 100644 content/en/functions/hasPrefix.md create mode 100644 content/en/functions/store.md create mode 100644 content/en/functions/strings.HasPrefix.md delete mode 100644 content/en/hosting-and-deployment/hosting-on-github.md create mode 100644 content/en/hosting-and-deployment/hosting-on-github/gh-pages-1.png create mode 100644 content/en/hosting-and-deployment/hosting-on-github/gh-pages-2.png create mode 100644 content/en/hosting-and-deployment/hosting-on-github/gh-pages-3.png create mode 100644 content/en/hosting-and-deployment/hosting-on-github/gh-pages-4.png create mode 100644 content/en/hosting-and-deployment/hosting-on-github/gh-pages-5.png create mode 100644 content/en/hosting-and-deployment/hosting-on-github/index.md rename content/en/hugo-pipes/{scss-sass.md => transform-to-css.md} (85%) mode change 100755 => 100644 rename content/en/templates/{lists.md => lists/index.md} (93%) rename {static/images => content/en/templates/lists}/site-hierarchy.svg (100%) delete mode 100644 layouts/shortcodes/content-tree.html delete mode 100644 layouts/shortcodes/directoryindex.html delete mode 100644 layouts/shortcodes/docfile.html delete mode 100644 layouts/shortcodes/exfile.html delete mode 100644 layouts/shortcodes/exfm.html delete mode 100644 layouts/shortcodes/gh.html delete mode 100644 layouts/shortcodes/ghrepo.html delete mode 100644 layouts/shortcodes/nohighlight.html delete mode 100644 layouts/shortcodes/note.html delete mode 100644 layouts/shortcodes/output.html delete mode 100644 layouts/shortcodes/tip.html delete mode 100644 layouts/shortcodes/warning.html delete mode 100644 layouts/shortcodes/yt.html delete mode 100644 static/images/hosting-and-deployment/deployment-with-nanobox/hugo-server.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-nanobox/hugo-with-nanobox.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-nanobox/nanobox-deploy-dry-run.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-nanobox/nanobox-run.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/adding-a-github-pages-step.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/adding-the-project-to-github.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/and-we-ve-got-an-app.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/configure-the-deploy-step.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/creating-a-basic-hugo-site.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/public-or-not.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/using-hugo-build.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/wercker-access.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/wercker-account-settings.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/wercker-add-app.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/wercker-git-connections.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/wercker-search.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/wercker-select-owner.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/wercker-select-repository.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/wercker-sign-up-page.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/wercker-sign-up.png delete mode 100644 static/images/hosting-and-deployment/deployment-with-wercker/werckeryml.png diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company-dark.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company-dark.svg index 1793cb644..58fd601f5 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company-dark.svg +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company-dark.svg @@ -1,4 +1,4 @@ - + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company.svg index 6f3082b54..3b85ece5c 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company.svg +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company.svg @@ -1,4 +1,4 @@ - + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml index c31178c92..71167bfd4 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml +++ b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml @@ -5,20 +5,17 @@ utm_campaign = "hugosponsor" [[banners]] - name = "ButterCMS" - link = "https://buttercms.com/hugo-cms/" - logo = "images/sponsors/butter-light.svg" - utm_campaign = "sponsorship" - bgcolor = "#131A3E" + name = "Your Company?" + link = "https://bep.is/en/hugo-sponsor-2023-01/" + logo = "/images/sponsors/your-company.svg" + utm_campaign = "hugosponsor" + show_on_hover = true + bgcolor = "#004887" [[banners]] - name = "Gravity Kit" - link = "https://www.gravitykit.com/" - logo = "images/sponsors/graitykit-dark.svg" - query_params = "ref=532&campaign=hugo&" - utm_campaign = "hugosponsor" - bgcolor = "#e0ecf3" - - #hugohome - #hugofooter - #hugogithub + name = "Your Company?" + link = "https://bep.is/en/hugo-sponsor-2023-01/" + logo = "/images/sponsors/your-company.svg" + utm_campaign = "hugosponsor" + show_on_hover = true + bgcolor = "#004887" diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html index b2915e109..32bc44f6a 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html @@ -5,6 +5,14 @@ {{ $isFooter := (eq $gtag "footer") }} {{ $utmSource := cond $isFooter "hugofooter" "hugohome" }} {{ with .cx.Site.Data.sponsors }} +
@@ -22,11 +30,18 @@ + class="w-100 grow pa3{{ if .show_on_hover }} + show-on-hover + {{ end }}" + style=""> {{ $logo.Content | safeHTML }} {{ else }} - + {{ $logo.Content | safeHTML }} {{ end }} diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 9e5b08998..5c4b53271 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1 +1 @@ -# github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f +# github.com/gohugoio/gohugoioTheme v0.0.0-20230418063032-99f9185b8e11 diff --git a/archetypes/functions.md b/archetypes/functions.md index c2bb3113e..891458daa 100644 --- a/archetypes/functions.md +++ b/archetypes/functions.md @@ -1,12 +1,11 @@ --- -linktitle: "" +title: {{ replace .Name "-" " " | title }} description: "" -categories: [functions] -tags: [] -ns: "" signature: [] -hugoversion: "" -aliases: [] +categories: [functions] +keywords: [] +menu: + docs: + parent: functions relatedfuncs: [] -toc: false --- diff --git a/content/en/about/_index.md b/content/en/about/_index.md index 8ed441b61..91260a4a6 100644 --- a/content/en/about/_index.md +++ b/content/en/about/_index.md @@ -2,19 +2,14 @@ title: About Hugo linktitle: Overview description: Hugo's features, roadmap, license, and motivation. -date: 2017-02-01 -publishdate: 2017-02-01 -lastmod: 2017-02-01 categories: [] keywords: [] menu: docs: - parent: "about" + parent: about weight: 1 weight: 1 -draft: false aliases: [/about-hugo/,/docs/] -toc: false --- Hugo is not your average static site generator. diff --git a/content/en/about/benefits.md b/content/en/about/benefits.md index 925da1732..91c243413 100644 --- a/content/en/about/benefits.md +++ b/content/en/about/benefits.md @@ -2,19 +2,12 @@ title: The Benefits of Static Site Generators linktitle: The Benefits of Static description: Improved performance, security and ease of use are just a few of the reasons static site generators are so appealing. -date: 2017-02-01 -publishdate: 2017-02-01 -lastmod: 2017-02-01 keywords: [ssg,static,performance,security] menu: docs: - parent: "about" + parent: about weight: 30 weight: 30 -sections_weight: 30 -draft: false -aliases: [] -toc: false --- The purpose of website generators is to render content into HTML files. Most are "dynamic site generators." That means the HTTP server---i.e., the program that sends files to the browser to be viewed---runs the generator to create a new HTML file every time an end user requests a page. diff --git a/content/en/about/features.md b/content/en/about/features.md index fc3d5a030..6fac68cdd 100644 --- a/content/en/about/features.md +++ b/content/en/about/features.md @@ -1,17 +1,11 @@ --- title: Hugo Features -linktitle: Hugo Features description: Hugo boasts blistering speed, robust content management, and a powerful templating language making it a great fit for all kinds of static websites. -date: 2017-02-01 -publishdate: 2017-02-01 -lastmod: 2017-02-01 menu: docs: - parent: "about" + parent: about weight: 20 weight: 20 -sections_weight: 20 -draft: false toc: true --- diff --git a/content/en/about/hugo-and-gdpr.md b/content/en/about/hugo-and-gdpr.md index 2d4fba872..3e0a160c7 100644 --- a/content/en/about/hugo-and-gdpr.md +++ b/content/en/about/hugo-and-gdpr.md @@ -2,16 +2,13 @@ title: Hugo and the General Data Protection Regulation (GDPR) linktitle: Hugo and GDPR description: About how to configure your Hugo site to meet the new regulations. -date: 2018-05-25 layout: single keywords: ["GDPR", "Privacy", "Data Protection"] menu: docs: - parent: "about" + parent: about weight: 5 weight: 5 -sections_weight: 5 -draft: false aliases: [/privacy/,/gdpr/] toc: true --- @@ -57,7 +54,6 @@ disable = false privacyEnhanced = false {{< /code-toggle >}} - ## Disable All Services An example Privacy Config that disables all the relevant services in Hugo. With this configuration, the other settings will not matter. @@ -91,9 +87,9 @@ respectDoNotTrack useSessionStorage : Enabling this will disable the use of Cookies and use Session Storage to Store the GA Client ID. -{{% warning %}} +{{% note %}} `useSessionStorage` is not supported when using Google Analytics v4 (gtag.js). -{{% /warning %}} +{{% /note %}} ### Instagram diff --git a/content/en/about/license.md b/content/en/about/license.md index ae74b6047..267ec95a0 100644 --- a/content/en/about/license.md +++ b/content/en/about/license.md @@ -2,24 +2,20 @@ title: Apache License linktitle: License description: Hugo v0.15 and later are released under the Apache 2.0 license. -date: 2016-02-01 -publishdate: 2016-02-01 -lastmod: 2016-03-02 categories: ["about hugo"] keywords: ["License","apache"] menu: docs: - parent: "about" + parent: about weight: 60 weight: 60 -sections_weight: 60 aliases: [/meta/license] toc: true --- {{% note %}} Hugo v0.15 and later are released under the Apache 2.0 license. -Earlier versions of Hugo were released under the [Simple Public License](https://opensource.org/licenses/Simple-2.0). +Earlier versions of Hugo were released under the [Simple Public License](https://opensource.org/license/simpl-2-0-html/). {{% /note %}} _Version 2.0, January 2004_
@@ -148,7 +144,7 @@ _END OF TERMS AND CONDITIONS_ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets `[]` replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same “printed page” as the copyright notice for easier identification within third-party archives. -{{< code file="apache-notice.txt" download="apache-notice.txt" >}} +{{< code file="apache-notice.txt" >}} Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/content/en/about/security-model/index.md b/content/en/about/security-model/index.md index d4dacd9bf..a909a4236 100644 --- a/content/en/about/security-model/index.md +++ b/content/en/about/security-model/index.md @@ -1,15 +1,13 @@ --- title: Hugo's Security Model description: A summary of Hugo's security model. -date: 2019-10-01 layout: single keywords: ["Security", "Privacy"] menu: docs: - parent: "about" + parent: about weight: 4 weight: 5 -sections_weight: 5 aliases: [/security/] toc: true --- diff --git a/content/en/about/what-is-hugo.md b/content/en/about/what-is-hugo.md index d61f821cd..3097de50e 100644 --- a/content/en/about/what-is-hugo.md +++ b/content/en/about/what-is-hugo.md @@ -1,18 +1,12 @@ --- title: What is Hugo -linktitle: What is Hugo description: Hugo is a fast and modern static site generator written in Go, and designed to make website creation fun again. -date: 2017-02-01 -publishdate: 2017-02-01 -lastmod: 2017-02-01 layout: single menu: docs: - parent: "about" + parent: about weight: 10 weight: 10 -sections_weight: 10 -draft: false aliases: [/overview/introduction/,/about/why-i-built-hugo/] toc: true --- diff --git a/content/en/commands/hugo_deploy.md b/content/en/commands/hugo_deploy.md index 4e1d468b7..7b14c30ef 100644 --- a/content/en/commands/hugo_deploy.md +++ b/content/en/commands/hugo_deploy.md @@ -31,6 +31,7 @@ hugo deploy [flags] --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --invalidateCDN invalidate the CDN cache listed in the deployment target (default true) --maxDeletes int maximum # of files to delete, or -1 to disable (default 256) + --workers int number of workers to transfer files. (default 10) -s, --source string filesystem path to read files relative from --target string target deployment from deployments section in config file; defaults to the first one --themesDir string filesystem path to themes directory diff --git a/content/en/content-management/_index.md b/content/en/content-management/_index.md index 7cb6357c6..e87749d3a 100644 --- a/content/en/content-management/_index.md +++ b/content/en/content-management/_index.md @@ -8,7 +8,6 @@ menu: weight: 10 keywords: [source, organization] categories: [content management] -toc: false weight: 10 aliases: [/content/,/content/organization] --- diff --git a/content/en/content-management/archetypes.md b/content/en/content-management/archetypes.md index 1d2ba3179..f2bc6a441 100644 --- a/content/en/content-management/archetypes.md +++ b/content/en/content-management/archetypes.md @@ -1,6 +1,5 @@ --- title: Archetypes -linkTitle: Archetypes description: Archetypes are templates used when creating new content. keywords: [archetypes,generators,metadata,front matter] categories: [content management] diff --git a/content/en/content-management/build-options.md b/content/en/content-management/build-options.md index f798754f1..4798f9b2b 100644 --- a/content/en/content-management/build-options.md +++ b/content/en/content-management/build-options.md @@ -56,43 +56,39 @@ If true, the page will be treated as part of the project's collections and, when #### publishResources -If set to true the [Bundle's Resources]({{< relref "content-management/page-bundles" >}}) will be published. +If set to true the [Bundle's Resources](/content-management/page-bundles) will be published. Setting this to false will still publish Resources on demand (when a resource's `.Permalink` or `.RelPermalink` is invoked from the templates) but will skip the others. {{% note %}} -Any page, regardless of their build options, will always be available using the [`.GetPage`]({{< relref "functions/GetPage" >}}) methods. +Any page, regardless of their build options, will always be available using the [`.GetPage`](/functions/getpage) methods. {{% /note %}} ------- - ### Illustrative use cases #### Not publishing a page Project needs a "Who We Are" content file for Front Matter and body to be used by the homepage but nowhere else. -```yaml -# content/who-we-are.md` +{{< code-toggle file="content/who-we-are.md" fm=true copy=false >}} title: Who we are _build: list: false render: false -``` +{{< /code-toggle >}} -```go-html-template -{{/* layouts/index.html */}} +{{< code file="layouts/index.html" copy=false >}}
-{{ with site.GetPage "who-we-are" }} - {{ .Content }} -{{ end }} + {{ with site.GetPage "who-we-are" }} + {{ .Content }} + {{ end }}
-``` +{{< /code >}} #### Listing pages without publishing them Website needs to showcase a few of the hundred "testimonials" available as content files without publishing any of them. -To avoid setting the build options on every testimonials, one can use [`cascade`]({{< relref "/content-management/front-matter#front-matter-cascade" >}}) on the testimonial section's content file. +To avoid setting the build options on every testimonials, one can use [`cascade`](/content-management/front-matter#front-matter-cascade) on the testimonial section's content file. {{< code-toggle >}} title: Testimonials @@ -104,12 +100,12 @@ cascade: list: true # default {{< /code-toggle >}} -```go-html-template -{{/* layouts/_defaults/testimonials.html */}} +{{< code file="layouts/_defaults/testimonials.html" copy=false >}}
-{{ range first 5 .Pages }} -
- {{ .Content }} -
-{{ end }} + {{ range first 5 .Pages }} +
+ {{ .Content }} +
+ {{ end }}
+{{< /code >}} diff --git a/content/en/content-management/comments.md b/content/en/content-management/comments.md index e49711e7c..0543f47a7 100644 --- a/content/en/content-management/comments.md +++ b/content/en/content-management/comments.md @@ -1,6 +1,5 @@ --- title: Comments -linkTitle: 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. keywords: [sections,content,organization] categories: [project organization, fundamentals] @@ -25,7 +24,7 @@ Hugo comes with all the code you need to load Disqus into your templates. Before Disqus comments require you set a single value in your [site's configuration file][configuration] like so: -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} disqusShortname = "yourDisqusShortname" {{}} diff --git a/content/en/content-management/diagrams.md b/content/en/content-management/diagrams.md index c95548249..e664dd501 100644 --- a/content/en/content-management/diagrams.md +++ b/content/en/content-management/diagrams.md @@ -1,6 +1,5 @@ --- title: Diagrams -LinkTitle: Diagrams description: Use fenced code blocks and markdown render hooks to display diagrams. categories: [content management] keywords: [diagrams,drawing] @@ -58,8 +57,8 @@ And then include this snippet at the bottom of the content template (**Note**: b ```go-html-template {{ if .Page.Store.Get "hasMermaid" }} - - {{ end }} @@ -67,6 +66,7 @@ And then include this snippet at the bottom of the content template (**Note**: b With that you can use the `mermaid` language in Markdown code blocks: +```` ```mermaid sequenceDiagram participant Alice @@ -80,6 +80,7 @@ sequenceDiagram John->>Bob: How about you? Bob-->>John: Jolly good! ``` +```` ## Goat Ascii Diagram Examples diff --git a/content/en/content-management/formats.md b/content/en/content-management/formats.md index a98898821..ba988c29b 100644 --- a/content/en/content-management/formats.md +++ b/content/en/content-management/formats.md @@ -46,9 +46,9 @@ Hugo passes reasonable default arguments to these external helpers by default: - `rst2html`: `--leave-comments --initial-header-level=2` - `pandoc`: `--mathjax` -{{% warning "Performance of External Helpers" %}} +{{% note %}} Because additional formats are external commands, generation performance will rely heavily on the performance of the external tool you are using. As this feature is still in its infancy, feedback is welcome. -{{% /warning %}} +{{% /note %}} ### External Helper AsciiDoc diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md index bf530518f..78d3323dd 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -1,8 +1,6 @@ --- title: Front Matter -linkTitle: Front Matter description: Hugo allows you to add front matter in yaml, toml, or json to your content files. -lastmod: 2017-02-24 categories: [content management] keywords: ["front matter", "yaml", "toml", "json", "metadata", "archetypes"] menu: @@ -56,87 +54,87 @@ slug = "spf13-vim-3-0-release-and-new-website" There are a few predefined variables that Hugo is aware of. See [Page Variables][pagevars] for how to call many of these predefined variables in your templates. aliases -: an array of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure . See [Aliases][aliases] for details. +: An array of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure . See [Aliases][aliases] for details. audio -: an array of paths to audio files related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:audio`. +: An array of paths to audio files related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:audio`. cascade -: a map of Front Matter keys whose values are passed down to the page's descendants unless overwritten by self or a closer ancestor's cascade. See [Front Matter Cascade](#front-matter-cascade) for details. +: A map of front matter keys whose values are passed down to the page's descendants unless overwritten by self or a closer ancestor's cascade. See [Front Matter Cascade](#front-matter-cascade) for details. date -: the datetime assigned to this page. This is usually fetched from the `date` field in front matter, but this behavior is configurable. +: The datetime assigned to this page. This is usually fetched from the `date` field in front matter, but this behavior is configurable. description -: the description for the content. +: The description for the content. draft -: if `true`, the content will not be rendered unless the `--buildDrafts` flag is passed to the `hugo` command. +: If `true`, the content will not be rendered unless the `--buildDrafts` flag is passed to the `hugo` command. expiryDate -: the datetime at which the content should no longer be published by Hugo; expired content will not be rendered unless the `--buildExpired` flag is passed to the `hugo` command. +: The datetime at which the content should no longer be published by Hugo; expired content will not be rendered unless the `--buildExpired` flag is passed to the `hugo` command. headless -: if `true`, sets a leaf bundle to be [headless][headless-bundle]. +: If `true`, sets a leaf bundle to be [headless][headless-bundle]. images -: an array of paths to images related to the page; used by [internal templates](/templates/internal) such as `_internal/twitter_cards.html`. +: An array of paths to images related to the page; used by [internal templates](/templates/internal) such as `_internal/twitter_cards.html`. isCJKLanguage -: if `true`, Hugo will explicitly treat the content as a CJK language; both `.Summary` and `.WordCount` work properly in CJK languages. +: If `true`, Hugo will explicitly treat the content as a CJK language; both `.Summary` and `.WordCount` work properly in CJK languages. keywords -: the meta keywords for the content. +: The meta keywords for the content. layout -: the layout Hugo should select from the [lookup order][lookup] when rendering the content. If a `type` is not specified in the front matter, Hugo will look for the layout of the same name in the layout directory that corresponds with a content's section. See [Content Types][content type]. +: The layout Hugo should select from the [lookup order][lookup] when rendering the content. If a `type` is not specified in the front matter, Hugo will look for the layout of the same name in the layout directory that corresponds with a content's section. See [Content Types][content type]. lastmod -: the datetime at which the content was last modified. +: The datetime at which the content was last modified. linkTitle -: used for creating links to content; if set, Hugo defaults to using the `linktitle` before the `title`. Hugo can also [order lists of content by `linktitle`][bylinktitle]. +: Used for creating links to content; if set, Hugo defaults to using the `linktitle` before the `title`. Hugo can also [order lists of content by `linktitle`][bylinktitle]. markup : **experimental**; specify `"rst"` for reStructuredText (requires`rst2html`) or `"md"` (default) for Markdown. outputs -: allows you to specify output formats specific to the content. See [output formats][outputs]. +: Allows you to specify output formats specific to the content. See [output formats][outputs]. publishDate -: if in the future, content will not be rendered unless the `--buildFuture` flag is passed to `hugo`. +: If in the future, content will not be rendered unless the `--buildFuture` flag is passed to `hugo`. resources -: used for configuring page bundle resources. See [Page Resources][page-resources]. +: Used for configuring page bundle resources. See [Page Resources][page-resources]. series -: an array of series this page belongs to, as a subset of the `series` [taxonomy](/content-management/taxonomies/); used by the `opengraph` [internal template](/templates/internal) to populate `og:see_also`. +: An array of series this page belongs to, as a subset of the `series` [taxonomy](/content-management/taxonomies/); used by the `opengraph` [internal template](/templates/internal) to populate `og:see_also`. slug -: appears as the tail of the output URL. A value specified in front matter will override the segment of the URL based on the filename. +: Overrides the last segment of the URL path. Not applicable to section pages. See [URL Management](/content-management/urls/#slug) for details. summary -: text used when providing a summary of the article in the `.Summary` page variable; details available in the [content-summaries](/content-management/summaries/) section. +: Text used when providing a summary of the article in the `.Summary` page variable; details available in the [content-summaries](/content-management/summaries/) section. title -: the title for the content. +: The title for the content. type -: the type of the content; this value will be automatically derived from the directory (i.e., the [section]) if not specified in front matter. +: The type of the content; this value will be automatically derived from the directory (i.e., the [section]) if not specified in front matter. url -: the full path to the content from the web root. It makes no assumptions about the path of the content file. See [URL Management](/content-management/urls/#set-url-in-front-matter). +: Overrides the entire URL path. Applicable to regular pages and section pages. See [URL Management](/content-management/urls/#url) for details. videos -: an array of paths to videos related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:video`. +: An array of paths to videos related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:video`. weight : used for [ordering your content in lists][ordering]. Lower weight gets higher precedence. So content with lower weight will come first. If set, weights should be non-zero, as 0 is interpreted as an *unset* weight. \ -: field name of the *plural* form of the index. See `tags` and `categories` in the above front matter examples. *Note that the plural form of user-defined taxonomies cannot be the same as any of the predefined front matter variables.* +: Field name of the *plural* form of the index. See `tags` and `categories` in the above front matter examples. *Note that the plural form of user-defined taxonomies cannot be the same as any of the predefined front matter variables.* -{{% note "Hugo's Default URL Destinations" %}} +{{% note %}} If neither `slug` nor `url` is present and [permalinks are not configured otherwise in your site `config` file](/content-management/urls/#permalinks), Hugo will use the filename of your content to create the output URL. See [Content Organization](/content-management/organization) for an explanation of paths in Hugo and [URL Management](/content-management/urls/) for ways to customize Hugo's default behaviors. {{% /note %}} @@ -146,7 +144,7 @@ You can add fields to your front matter arbitrarily to meet your needs. These us The following fields can be accessed via `.Params.include_toc` and `.Params.show_comments`, respectively. The [Variables] section provides more information on using Hugo's page- and site-level variables in your templates. -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} include_toc: true show_comments: false {{}} @@ -159,7 +157,7 @@ Any node or section can pass down to descendants a set of Front Matter values as The `cascade` block can be a slice with a optional `_target` keyword, allowing for multiple `cascade` values targeting different page sets. -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} title ="Blog" [[cascade]] background = "yosemite.jpg" @@ -193,7 +191,7 @@ Any of the above can be omitted. In `content/blog/_index.md` -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} title: Blog cascade: banner: images/typewriter.jpg diff --git a/content/en/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md index 3f71b4244..0043f97b0 100644 --- a/content/en/content-management/image-processing/index.md +++ b/content/en/content-management/image-processing/index.md @@ -1,6 +1,5 @@ --- title: Image Processing -linkTitle: Image Processing description: Resize, crop, rotate, filter, and convert images. categories: [content management] keywords: [resources, images] @@ -457,15 +456,15 @@ If you change image processing methods or options, or if you rename or remove im hugo --gc ``` -[`anchor`]: {{< relref "content-management/image-processing#anchor" >}} -[`lang.FormatNumber`]: {{< relref "functions/lang#langformatnumber" >}} -[Exif]: -[filters]: {{< relref "functions/images" >}} +[time.Format]: /functions/dateformat +[`anchor`]: /content-management/image-processing#anchor +[mounted]: /hugo-modules/configuration#module-config-mounts +[page bundle]: /content-management/page-bundles +[`lang.FormatNumber`]: /functions/lang +[filters]: /functions/images [github.com/disintegration/imaging]: -[mounted]: {{< relref "hugo-modules/configuration#module-config-mounts">}} -[page bundle]: {{< relref "content-management/page-bundles" >}} [Smartcrop]: -[time.Format]: {{< relref "functions/dateformat" >}} +[Exif]: [`Colors`]: #colors [`Crop`]: #crop [`Exif`]: #exif diff --git a/content/en/content-management/menus.md b/content/en/content-management/menus.md index b9fab2ca4..369938aba 100644 --- a/content/en/content-management/menus.md +++ b/content/en/content-management/menus.md @@ -1,7 +1,6 @@ --- title: Menus -linkTitle: Menus -description: Hugo has a simple yet powerful menu system. +description: Create menus by defining entries, localizing each entry, and rendering the resulting data structure. categories: [content management] keywords: [menus] menu: @@ -13,117 +12,214 @@ weight: 190 aliases: [/extras/menus/] --- -{{% note "Lazy Blogger"%}} -If all you want is a simple menu for your sections, see the ["Section Menu for Lazy Bloggers" in Menu Templates](/templates/menu-templates/#section-menu-for-lazy-bloggers). -{{% /note %}} +## Overview -You can do this: +To create a menu for your site: -* Place content in one or many menus -* Handle nested menus with unlimited depth -* Create menu entries without being attached to any content -* Distinguish active element (and active branch) +1. Define the menu entries +2. [Localize] each entry +3. Render the menu with a [template] -## What is a Menu in Hugo? +Create multiple menus, either flat or nested. For example, create a main menu for the header, and a separate menu for the footer. -A **menu** is a named array of menu entries accessible by name via the [`.Site.Menus` site variable][sitevars]. For example, you can access your site's `main` menu via `.Site.Menus.main`. +There are three ways to define menu entries: -{{% note "Menus on Multilingual Sites" %}} -If you make use of the [multilingual feature](/content-management/multilingual/), you can define language-independent menus. -{{% /note %}} - -See the [Menu Entry Properties][me-props] for all the variables and functions related to a menu entry. - -## Add content to menus - -Hugo allows you to add content to a menu via the content's [front matter](/content-management/front-matter/). - -### Simple - -If all you need to do is add an entry to a menu, the simple form works well. - -#### A Single Menu - -{{< code-toggle >}} -menu: "main" -{{< /code-toggle >}} - -#### Multiple Menus - -{{< code-toggle >}} -menu: ["main", "footer"] -{{< /code-toggle >}} - -#### Advanced - -{{< code-toggle >}} -menu: - docs: - parent: 'extras' - weight: 20 -{{< /code-toggle >}} - -## Add Non-content Entries to a Menu - -You can also add entries to menus that aren’t attached to a piece of content. This takes place in your Hugo project's [`config` file][config] (see [Menu Entry Properties][me-props] for full details of available variables). - -Here’s an example snippet pulled from a configuration file: - -{{< code-toggle file="config" >}} -[[menu.main]] - name = "about hugo" - pre = "" - weight = -110 - identifier = "about" - url = "/about/" -[[menu.main]] - name = "getting started" - pre = "" - post = "New!" - weight = -100 - url = "/getting-started/" -{{< /code-toggle >}} +1. Automatically +1. In front matter +1. In site configuration {{% note %}} -The URLs must be relative to the context root. If the `baseURL` is `https://example.com/mysite/`, then the URLs in the menu must not include the context root `mysite`. Using an absolute URL will override the baseURL. If the value used for `URL` in the above example is `https://subdomain.example.com/`, the output will be `https://subdomain.example.com`. +Although you can use these methods in combination when defining a menu, the menu will be easier to conceptualize and maintain if you use one method throughout the site. {{% /note %}} -## Nesting +## Define automatically -All nesting of content is done via the `parent` field. +To automatically define menu entries for each top-level section of your site, enable the section pages menu in your site configuration. -The parent of an entry should be the identifier of another entry. The identifier should be unique (within a menu). +{{< code-toggle file="config" copy=false >}} +sectionPagesMenu = "main" +{{< /code-toggle >}} -The following order is used to determine an Identifier: +This creates a menu structure that you can access with `site.Menus.main` in your templates. See [menu templates] for details. -`.Name > .LinkTitle > .Title` +## Define in front matter -This means that `.Title` will be used unless `.LinkTitle` is present, etc. In practice, `.Name` and `.Identifier` are only used to structure relationships and therefore never displayed. +To add a page to the "main" menu: -In this example, the top level of the menu is defined in your [site `config` file][config]. All content entries are attached to one of these entries via the `.Parent` field. +{{< code-toggle file="content/about.md" copy=false fm=true >}} +title = 'About' +menu = 'main' +{{< /code-toggle >}} -## Params +Access the entry with `site.Menus.main` in your templates. See [menu templates] for details. -You can also add user-defined content to menu items via the `params` field. +To add a page to the "main" and "footer" menus: -A common use case is to define a custom param to add a css class to a specific menu item. +{{< code-toggle file="content/contact.md" copy=false fm=true >}} +title = 'Contact' +menu = ['main','footer'] +{{< /code-toggle >}} -{{< code-toggle file="config" >}} +Access the entry with `site.Menus.main` and `site.Menus.footer` in your templates. See [menu templates] for details. + +### Properties {#properties-front-matter} + +Use these properties when defining menu entries in front matter: + +identifier +: (`string`) Required when two or more menu entries have the same `name`, or when localizing the `name` using translation tables. Must start with a letter, followed by letters, digits, or underscores. + +name +: (`string`) The text to display when rendering the menu entry. + +params +: (`map`) User-defined properties for the menu entry. + +parent +: (`string`) The `identifier` of the parent menu entry. If `identifier` is not defined, use `name`. Required for child entries in a nested menu. + +post +: (`string`) The HTML to append when rendering the menu entry. + +pre +: (`string`) The HTML to prepend when rendering the menu entry. + +title +: (`string`) The HTML `title` attribute of the rendered menu entry. + +weight +: (`int`) A non-zero integer indicating the entry's position relative the root of the menu, or to its parent for a child entry. Lighter entries float to the top, while heavier entries sink to the bottom. + +### Example {#example-front-matter} + +This front matter menu entry demonstrates some of the available properties: + +{{< code-toggle file="content/products/software.md" copy=false fm=true >}} +title = 'Software' +[menu.main] +parent = 'Products' +weight = 20 +pre = '' +[menu.main.params] +class = 'center' +{{< /code-toggle >}} + +Access the entry with `site.Menus.main` in your templates. See [menu templates] for details. + + +## Define in site configuration + +To define entries for the "main" menu: + +{{< code-toggle file="config" copy=false >}} [[menu.main]] - name = "about hugo" - pre = "" - weight = -110 - identifier = "about" - url = "/about/" - [menu.main.params] - class = "highlight-menu-item" -{{}} +name = 'Home' +pageRef = '/' +weight = 10 -## Render Menus +[[menu.main]] +name = 'Products' +pageRef = '/products' +weight = 20 -See [Menu Templates](/templates/menu-templates/) for information on how to render your site menus within your templates. +[[menu.main]] +name = 'Services' +pageRef = '/services' +weight = 30 +{{< /code-toggle >}} -[config]: /getting-started/configuration/ -[multilingual]: /content-management/multilingual/ -[sitevars]: /variables/ -[me-props]: /variables/menus/ +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="config" copy=false >}} +[[menu.footer]] +name = 'Terms' +pageRef = '/terms' +weight = 10 + +[[menu.footer]] +name = 'Privacy' +pageRef = '/privacy' +weight = 20 +{{< /code-toggle >}} + +This creates a menu structure that you can access with `site.Menus.footer` in your templates. See [menu templates] for details. + +### Properties {#properties-site-configuration} + +{{% note %}} +The [properties available to entries defined in front matter] are also available to entries defined in site configuration. + +[properties available to entries defined in front matter]: /content-management/menus/#properties-front-matter +{{% /note %}} + +Each menu entry defined in site configuration requires two or more properties: + +- Specify `name` and `pageRef` for internal links +- Specify `name` and `url` for external links + +pageRef +: (`string`) The file path of the target page, relative to the `content` directory. Omit language code and file extension. Required for *internal* links. + +Kind|pageRef +:--|:-- +home|`/` +page|`/books/book-1` +section|`/books` +taxonomy|`/tags` +term|`/tags/foo` + +url +: (`string`) Required for *external* links. + +### Example {#example-site-configuration} + +This nested menu demonstrates some of the available properties: + +{{< code-toggle file="config" copy=false >}} +[[menu.main]] +name = 'Products' +pageRef = '/products' +weight = 10 + +[[menu.main]] +name = 'Hardware' +pageRef = '/products/hardware' +parent = 'Products' +weight = 1 + +[[menu.main]] +name = 'Software' +pageRef = '/products/software' +parent = 'Products' +weight = 2 + +[[menu.main]] +name = 'Services' +pageRef = '/services' +weight = 20 + +[[menu.main]] +name = 'Hugo' +pre = '' +url = 'https://gohugo.io/' +weight = 30 +[menu.main.params] +rel = 'external' +{{< /code-toggle >}} + +This creates a menu structure that you can access with `site.Menus.main` in your templates. See [menu templates] for details. + +## Localize + +Hugo provides two methods to localize your menu entries. See [multilingual]. + +## Render + +See [menu templates]. + +[localize]: /content-management/multilingual/#menus +[menu templates]: /templates/menu-templates/ +[multilingual]: /content-management/multilingual/#menus +[template]: /templates/menu-templates/ diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md index 5eb5506d9..f1f25086a 100644 --- a/content/en/content-management/multilingual.md +++ b/content/en/content-management/multilingual.md @@ -15,7 +15,7 @@ aliases: [/content/multilingual/,/tutorials/create-a-multilingual-site/] You should define the available languages in a `languages` section in your site configuration. -> Also See [Hugo Multilingual Part 1: Content translation] +Also See [Hugo Multilingual Part 1: Content translation]. ## Configure Languages @@ -69,6 +69,35 @@ Only the obvious non-global options can be overridden per language. Examples of **Please note:** use lowercase language codes, even when using regional languages (ie. use pt-pt instead of pt-PT). Currently Hugo language internals lowercase language codes, which can cause conflicts with settings like `defaultContentLanguage` which are not lowercased. Please track the evolution of this issue in [Hugo repository issue tracker](https://github.com/gohugoio/hugo/issues/7344) +### Changes in Hugo 0.112.0 + +{{< new-in "0.112.0" >}} + +In version `0.112.0` of Hugo we did a major we consolidated all configuration options, but also improved how the languages and their params gets merged with the main configuration. But while testing this on Hugo sites out there, we got some error reports. + +1. `site.Language.Params` is deprecated. Use `site.Params` directly. +1. The `params` sections on site and language is the only place to put custom user parameters, and `site.Params` will only contain these user defined parameters (see example below). + +```toml +title = "My blog" +languageCode = "en-us" + +[languages] +[languages.sv] +title = "Min blogg" +languageCode = "sv" +[languages.en.params] +color = "blue" +``` + +In the example above, all the settings exept the `color` below `params` maps to predefined configuration options in Hguo for the site and its language, and should be accessed via the documented accessors: + +``` +{{ site.Title }} +{{ site.LanguageCode }} +{{ site.Params.color }} +``` + ### Disable a Language You can disable one or more languages. This can be useful when working on a new translation. @@ -97,7 +126,9 @@ From **Hugo 0.31** we support multiple languages in a multihost configuration. S This means that you can now configure a `baseURL` per `language`: -> If a `baseURL` is set on the `language` level, then all languages must have one and they must all be different. +{{% note %}} +If a `baseURL` is set on the `language` level, then all languages must have one and they must all be different. +{{% /note %}} Example: @@ -155,9 +186,9 @@ Their language is __assigned__ according to the language code added as a __suffi By having the same **path and base filename**, the content pieces are __linked__ together as translated pages. -{{< note >}} +{{% note %}} If a file has no language code, it will be assigned the default language. -{{}} +{{% /note %}} ### Translation by content directory @@ -209,16 +240,22 @@ By setting the `translationKey` front matter param to `about` in all three pages Because paths and filenames are used to handle linking, all translated pages will share the same URL (apart from the language subdirectory). -To localize the URLs, the [`slug`]({{< ref "/content-management/organization/index.md#slug" >}}) or [`url`]({{< ref "/content-management/organization/index.md#url" >}}) front matter param can be set in any of the non-default language file. +To localize URLs: -For example, a French translation (`content/about.fr.md`) can have its own localized slug. +- For a regular page, set either [`slug`] or [`url`] in front matter +- For a section page, set [`url`] in front matter -{{< code-toggle >}} -Title: A Propos +[`slug`]: /content-management/urls/#slug +[`url`]: /content-management/urls/#url + +For example, a French translation can have its own localized slug. + +{{< code-toggle file="content/about.fr.md" fm=true copy=false >}} +title: A Propos slug: "a-propos" {{< /code-toggle >}} -At render, Hugo will build both `/about/` and `/fr/a-propos/` while maintaining their translation linking. +At render, Hugo will build both `/about/` and `/fr/a-propos/` without affecting the translation link. ### Page Bundles @@ -338,7 +375,7 @@ The function will read `.Count` from `.ReadingTime` and evaluate whether the num {{< code-toggle file="i18n/en-US" >}} [readingTime] one = "One minute to read" -other = "{{.Count}} minutes to read" +other = "{{ .Count }} minutes to read" {{< /code-toggle >}} Assuming `.ReadingTime.Count` in the context has value is 525600. The result will be: @@ -462,76 +499,91 @@ See [lang.FormatPercent] for details. ## Menus -You can define your menus for each language independently. Creating multilingual menus works just like [creating regular menus][menus], except they're defined in language-specific blocks in the configuration file: +Localization of menu entries depends on the how you define them: -{{< code-toggle file="config" >}} -defaultContentLanguage = "en" +- When you define menu entries [automatically] using the section pages menu, you must use translation tables to localize each entry. +- When you define menu entries [in front matter], they are already localized based on the front matter itself. If the front matter values are insufficient, use translation tables to localize each entry. +- When you define menu entries [in site configuration], you can (a) use translation tables, or (b) create language-specific menu entries under each language key. -[languages.en] -weight = 0 -languageName = "English" +### Use translation tables -[[languages.en.menu.main]] -url = "/" -name = "Home" -weight = 0 - -[languages.de] -weight = 10 -languageName = "Deutsch" - -[[languages.de.menu.main]] -url = "/" -name = "Startseite" -weight = 0 -{{< /code-toggle >}} - -The rendering of the main navigation works as usual. `.Site.Menus` will just contain the menu in the current language. Note that `absLangURL` below will link to the correct locale of your website. Without it, menu entries in all languages would link to the English version, since it's the default content language that resides in the root directory. +When rendering the text that appears in menu each entry, the [example menu template] does this: ```go-html-template -
    - {{- $currentPage := . -}} - {{ range .Site.Menus.main -}} -
  • - {{ .Name }} -
  • - {{- end }} -
+{{ or (T .Identifier) .Name | safeHTML }} ``` -### Dynamically localizing menus with i18n +It queries the translation table for the current language using the menu entry's `identifier` and returns the translated string. If the translation table does not exist, or if the `identifier` key is not present in the translation table, it falls back to `name`. -While customizing menus per language is useful, your config file can become hard to maintain if you have a lot of languages +The `identifier` depends on how you define menu entries: -If your menus are the same in all languages (ie. if the only thing that changes is the translated name) you can use the `.Identifier` as a translation key for the menu name: +- If you define the menu entry [automatically] using the section pages menu, the `identifier` is the page's `.Section`. +- If you define the menu entry [in site configuration] or [in front matter], set the `identifier` property to the desired value. -{{< code-toggle file="config" >}} +For example, if you define menu entries in site configuration: + +{{< code-toggle file="config" copy=false >}} [[menu.main]] -name = "About me" -url = "about" + identifier = 'products' + name = 'Products' + pageRef = '/products' + weight = 10 +[[menu.main]] + identifier = 'services' + name = 'Services' + pageRef = '/services' + weight = 20 +{{< / code-toggle >}} + +Create corresponding entries in the translation tables: + +{{< code-toggle file="i18n/de" copy=false >}} +products = 'Produkte' +services = 'Leistungen' +{{< / code-toggle >}} + +[example menu template]: /templates/menu-templates/#example +[automatically]: /content-management/menus/#define-automatically +[in front matter]: /content-management/menus/#define-in-front-matter +[in site configuration]: /content-management/menus/#define-in-site-configuration + +### Create language-specific menu entries + +For example: + +{{< code-toggle file="config" copy=false >}} +[languages.de] +languageCode = 'de-DE' +languageName = 'Deutsch' weight = 1 -identifier = "about" + +[[languages.de.menu.main]] +name = 'Produkte' +pageRef = '/products' +weight = 10 + +[[languages.de.menu.main]] +name = 'Leistungen' +pageRef = '/services' +weight = 20 + +[languages.en] +languageCode = 'en-US' +languageName = 'English' +weight = 2 + +[[languages.en.menu.main]] +name = 'Products' +pageRef = '/products' +weight = 10 + +[[languages.en.menu.main]] +name = 'Services' +pageRef = '/services' +weight = 20 {{< /code-toggle >}} -You now need to specify the translations for the menu keys in the i18n files: - -{{< code file="i18n/pt.toml" >}} -[about] -other="Sobre mim" -{{< /code >}} - -And do the appropriate changes in the menu code to use the `i18n` tag with the `.Identifier` as a key. You will also note that here we are using a `default` to fall back to `.Name`, in case the `.Identifier` key is also not present in the language specified in the `defaultContentLanguage` configuration. - -{{< code file="layouts/partials/menu.html" >}} - -{{< /code >}} +For a simple menu with two languages, these menu entries are easy to create and maintain. For a larger menu, or with more than two languages, using translation tables as described above is preferable. ## Missing Translations @@ -586,11 +638,11 @@ hugo new content/de/post/test.md [homepage]: /templates/homepage/ [Hugo Multilingual Part 1: Content translation]: https://regisphilibert.com/blog/2018/08/hugo-multilingual-part-1-managing-content-translation/ [i18func]: /functions/i18n/ -[lang.FormatAccounting]: /functions/lang/#langformataccounting -[lang.FormatCurrency]: /functions/lang/#langformatcurrency -[lang.FormatNumber]: /functions/lang/#langformatnumber -[lang.FormatNumberCustom]: /functions/lang/#langformatnumbercustom -[lang.FormatPercent]: /functions/lang/#langformatpercent +[lang.FormatAccounting]: /functions/lang +[lang.FormatCurrency]: /functions/lang +[lang.FormatNumber]: /functions/lang +[lang.FormatNumberCustom]: /functions/lang +[lang.FormatPercent]: /functions/lang [lang.Merge]: /functions/lang.merge/ [menus]: /content-management/menus/ [OS environment]: /getting-started/configuration/#configure-with-environment-variables diff --git a/content/en/content-management/organization/index.md b/content/en/content-management/organization/index.md index 94c0cfd5a..efa355ddc 100644 --- a/content/en/content-management/organization/index.md +++ b/content/en/content-management/organization/index.md @@ -17,7 +17,7 @@ aliases: [/content/sections/] Hugo `0.32` announced page-relative images and other resources packaged into `Page Bundles`. -These terms are connected, and you also need to read about [Page Resources]({{< relref "/content-management/page-resources" >}}) and [Image Processing]({{< relref "/content-management/image-processing" >}}) to get the full picture. +These terms are connected, and you also need to read about [Page Resources](/content-management/page-resources) and [Image Processing](/content-management/image-processing) to get the full picture. {{< imgproc 1-featured Resize "300x" >}} The illustration shows three bundles. Note that the home page bundle cannot contain other content pages, although other files (images etc.) are allowed. @@ -131,10 +131,7 @@ A default content type is determined by the section in which a content item is s ### `slug` -A content's `slug` is either `name.extension` or `name/`. The value for `slug` is determined by - -* the name of the content file (e.g., `lollapalooza.md`) OR -* front matter overrides +The `slug` is the last segment of the URL path, defined by the file name and optionally overridden by a `slug` value in front matter. See [URL Management](/content-management/urls/#slug) for details. ### `path` @@ -145,78 +142,7 @@ A content's `path` is determined by the section's path to the file. The file `pa ### `url` -The `url` is the relative URL for the piece of content. The `url` - -* is based on the content item's location within the directory structure OR -* is defined in front matter, in which case it *overrides all the above* - -## Override Destination Paths via Front Matter - -Hugo assumes that your content is organized with a purpose. The same structure that you use to organize your source content is used to organize the rendered site. As displayed above, the organization of the source content will be mirrored at the destination. - -There are times when you may need more fine-grained control over the content organization. In such cases, the front matter field can be used to determine the destination of a specific piece of content. - -The following items are defined in a specific order for a reason: items explained lower down in the list override higher items. Note that not all items can be defined in front matter. - -### `filename` - -`filename` is not a front matter field. It is the actual file name, minus the extension. This will be the name of the file in the destination (e.g., `content/posts/my-post.md` becomes `example.com/posts/my-post/`). - -### `slug` - -When defined in the front matter, the `slug` can take the place of the filename in the destination. - -{{< code file="content/posts/old-post.md" >}} ---- -title: A new post with the filename old-post.md -slug: "new-post" ---- -{{< /code >}} - -This will render to the following destination according to Hugo's default behavior: - -```txt -example.com/posts/new-post/ -``` - -### `section` - -`section` is determined by a content item's location on disk and *cannot* be specified in the front matter. See [sections] for more information. - -### `type` - -A content item's `type` is also determined by its location on disk but, unlike `section`, it *can* be specified in the front matter. See [types]. This can come in especially handy when you want a piece of content to render using a different layout. In the following example, you can create a layout at `layouts/new/mylayout.html` that Hugo will use to render this piece of content, even in the midst of many other posts. - -{{< code file="content/posts/my-post.md" >}} ---- -title: My Post -type: new -layout: mylayout ---- -{{< /code >}} - - - - - -### `url` - -A complete URL can be provided. This will override all the above as it pertains to the end destination. This must be the path from the baseURL (starting with a `/`). `url` will be used exactly as it is defined in the front matter, and will ignore the `--uglyURLs` setting in your site configuration: - -{{< code file="content/posts/old-url.md" >}} ---- -title: Old URL -url: /blog/new-url/ ---- -{{< /code >}} - -Assuming your `baseURL` is [configured][config] to `https://example.com`, the addition of `url` to the front matter will make `old-url.md` render to the following destination: - -```txt -https://example.com/blog/new-url/ -``` - -You can see more information on how to control output paths in [URL Management][urls]. +The `url` is the entire URL path, defined by the file path and optionally overridden by a `url` value in front matter. See [URL Management](/content-management/urls/#slug) for details. [config]: /getting-started/configuration/ [formats]: /content-management/formats/ @@ -225,7 +151,7 @@ You can see more information on how to control output paths in [URL Management][ [homepage template]: /templates/homepage/ [homepage]: /templates/homepage/ [lists]: /templates/lists/ -[pretty]: /content-management/urls/#pretty-urls +[pretty]: /content-management/urls/#appearance [section templates]: /templates/section-templates/ [sections]: /content-management/sections/ [singles]: /templates/single-page-templates/ diff --git a/content/en/content-management/page-bundles.md b/content/en/content-management/page-bundles.md index 28ab004c5..2a5147c21 100644 --- a/content/en/content-management/page-bundles.md +++ b/content/en/content-management/page-bundles.md @@ -1,14 +1,11 @@ --- title: Page Bundles -linkTitle: Page Bundles description: Content organization using Page Bundles -linkTitle: Page Bundles keywords: [page, bundle, leaf, branch] categories: [content management] menu : docs: - identifier: "page-bundles" - parent: "content-management" + parent: content-management weight: 30 toc: true weight: 30 @@ -132,9 +129,9 @@ Explanation of the above example: A leaf bundle can be made headless by adding below in the Front Matter (in the `index.md`): -```toml +{{< code-toggle file="content/headless/index.md" fm=true copy=false >}} headless = true -``` +{{< /code-toggle >}} There are many use cases of such headless page bundles: diff --git a/content/en/content-management/page-resources.md b/content/en/content-management/page-resources.md index 16c9fc0ab..4bbd159be 100644 --- a/content/en/content-management/page-resources.md +++ b/content/en/content-management/page-resources.md @@ -1,6 +1,5 @@ --- title: Page Resources -linkTitle: Page Resources description: Page resources -- images, other pages, documents, etc. -- have page-relative URLs and their own metadata. categories: [content management] keywords: [bundle,content,resources] @@ -11,8 +10,7 @@ menu: toc: true weight: 80 --- -Page resources are only accessible from [page bundles]({{< relref -"/content-management/page-bundles" >}}), those directories with `index.md` or +Page resources are only accessible from [page bundles](/content-management/page-bundles), those directories with `index.md` or `_index.md` files at their root. Page resources are only available to the page with which they are bundled. @@ -128,9 +126,9 @@ Resources of type `page` get `Title` etc. from their own front matter. name : Sets the value returned in `Name`. -{{% warning %}} +{{% note %}} The methods `Match`, `Get` and `GetMatch` use `Name` to match the resources. -{{%/ warning %}} +{{% /note %}} title : Sets the value returned in `Title` @@ -140,7 +138,7 @@ params ### Resources metadata example -{{< code-toggle copy="false">}} +{{< code-toggle copy=false >}} title: Application date : 2018-01-25 resources : @@ -174,9 +172,9 @@ From the example above: - All `PDF` files will get a new `Name`. The `name` parameter contains a special placeholder [`:counter`](#the-counter-placeholder-in-name-and-title), so the `Name` will be `pdf-file-1`, `pdf-file-2`, `pdf-file-3`. - Every docx in the bundle will receive the `word` icon. -{{% warning %}} +{{% note %}} The __order matters__ --- Only the **first set** values of the `title`, `name` and `params`-**keys** will be used. Consecutive parameters will be set only for the ones not already set. In the above example, `.Params.icon` is first set to `"photo"` in `src = "documents/photo_specs.pdf"`. So that would not get overridden to `"pdf"` by the later set `src = "**.pdf"` rule. -{{%/ warning %}} +{{% /note %}} ### The `:counter` placeholder in `name` and `title` @@ -186,7 +184,7 @@ The counter starts at 1 the first time they are used in either `name` or `title` For example, if a bundle has the resources `photo_specs.pdf`, `other_specs.pdf`, `guide.pdf` and `checklist.pdf`, and the front matter has specified the `resources` as: -{{< code-toggle copy="false">}} +{{< code-toggle copy=false >}} [[resources]] src = "*specs.pdf" title = "Specification #:counter" diff --git a/content/en/content-management/related.md b/content/en/content-management/related.md index 2d2077c81..823e3035c 100644 --- a/content/en/content-management/related.md +++ b/content/en/content-management/related.md @@ -1,6 +1,5 @@ --- title: Related Content -linkTitle: Related Content description: List related content in "See Also" sections. categories: [content management] keywords: [content] @@ -31,40 +30,81 @@ To list up to 5 related pages (which share the same _date_ or _keyword_ paramete {{ end }} {{< /code >}} -### Methods +The `Related` method takes one argument which may be a `Page` or a options map. The options map have these options: -Here is the list of "Related" methods available on a page collection such `.RegularPages`. +indices +: The indices to search in. -#### .Related PAGE +document +: The document to search for related content for. -Returns a collection of pages related the given one. +namedSlices +: The keywords to search for. + +fragments +: Fragments holds a a list of special keywords that is used for indices configured as type "fragments". This will match the fragment identifiers of the documents. + +A fictional example using all of the above options: ```go-html-template -{{ $related := site.RegularPages.Related . }} -``` - -#### .RelatedIndices PAGE INDICE1 [INDICE2 ...] - -Returns a collection of pages related to a given one restricted to a list of indices. - -```go-html-template -{{ $related := site.RegularPages.RelatedIndices . "tags" "date" }} -``` - -#### .RelatedTo KEYVALS [KEYVALS2 ...] - -Returns a collection of pages related together by a set of indices and their match. - -In order to build those set and pass them as argument, one must use the `keyVals` function where the first argument would be the `indice` and the consecutive ones its potential `matches`. - -```go-html-template -{{ $related := site.RegularPages.RelatedTo ( keyVals "tags" "hugo" "rocks") ( keyVals "date" .Date ) }} +{{ $page := . }} +{{ $opts := + "indices" (slice "tags" "keywords") + "document" $page + "namedSlices" (slice (keyVals "tags" "hugo" "rocks") (keyVals "date" $page.Date)) + "fragments" (slice "heading-1" "heading-2") +}} ``` {{% note %}} -Read [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. +We improved and simplified this feature in Hugo 0.111.0. Before this we had 3 different methods: `Related`, `RelatedTo` and `RelatedIndicies`. Now we have only one method: `Related`. The old methods are still available but deprecated. Also see [this blog article](https://regisphilibert.com/blog/2018/04/hugo-optmized-relashionships-with-related-content/) for a great explanation of more advanced usage of this feature. {{% /note %}} +## Index Content Headings in Related Content + +{{< new-in "0.111.0" >}} + +Hugo can index the headings in your content and use this to find related content. You can enable this by adding a index of type `fragments` to your `related` configuration: + +{{< code-toggle file="config" copy=false >}} +[related] +threshold = 20 +includeNewer = true +toLower = false +[[related.indices]] +name = "fragmentrefs" +type = "fragments" +applyFilter = false +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 := . }} +
  • + {{ .Title }} + {{ 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. @@ -109,9 +149,19 @@ toLower name : The index name. This value maps directly to a page param. Hugo supports string values (`author` in the example) and lists (`tags`, `keywords` etc.) and time and date objects. +type +: {{< new-in "0.111.0" >}}. One of `basic`(default) or `fragments`. + +applyFilter +: {{< new-in "0.111.0" >}}. Apply a `type` specific filter to the result of a search. This is currently only used for the `fragments` type. + weight : 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 (default 0) +: {{< new-in "0.111.0" >}}. A percentage (0-100) used to remove common keywords from the index. As an example, setting this to 50 will remove all keywords that are used in more than 50% of the documents in the index. + pattern : 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. diff --git a/content/en/content-management/sections.md b/content/en/content-management/sections.md index b68a5bdb9..10c87e6cb 100644 --- a/content/en/content-management/sections.md +++ b/content/en/content-management/sections.md @@ -2,9 +2,6 @@ title: Content Sections linkTitle: Sections description: Hugo generates a **section tree** that matches your content. -date: 2017-02-01 -publishdate: 2017-02-01 -lastmod: 2017-02-01 categories: [content management] keywords: [lists,sections,content types,organization] menu: @@ -62,17 +59,19 @@ If you need a specific template for a sub-section, you need to adjust either the With the available [section variables and methods](#section-page-variables-and-methods) you can build powerful navigation. One common example would be a partial to show Breadcrumb navigation: -{{< code file="layouts/partials/breadcrumb.html" download="breadcrumb.html" >}} - +{{< code file="layouts/partials/breadcrumb.html" >}} + {{< /code >}} ## Section Page Variables and Methods diff --git a/content/en/content-management/shortcodes.md b/content/en/content-management/shortcodes.md index 634444684..f91adc227 100644 --- a/content/en/content-management/shortcodes.md +++ b/content/en/content-management/shortcodes.md @@ -1,6 +1,5 @@ --- title: Shortcodes -linkTitle: Shortcodes description: Shortcodes are simple snippets inside your content files calling built-in or custom templates. categories: [content management] keywords: [markdown,content,shortcodes] @@ -126,130 +125,129 @@ attrlink #### Example `figure` Input {{< code file="figure-input-example.md" >}} -{{}} +{{An elephant at sunset" */>}} {{< /code >}} #### Example `figure` Output -{{< output file="figure-output-example.html" >}} +```html
- -
-

Steve Francia

-
+ +
An elephant at sunset
-{{< /output >}} +``` ### `gist` -Bloggers often want to include GitHub gists when writing posts. Let's suppose we want to use the [gist at the following url][examplegist]: +To display a GitHub [gist] with this URL: -```txt -https://gist.github.com/spf13/7896402 +[gist]: https://docs.github.com/en/get-started/writing-on-github/editing-and-sharing-content-with-gists + +```text +https://gist.github.com/user/50a7482715eac222e230d1e64dd9a89b ``` -We can embed the gist in our content via username and gist ID pulled from the URL: +Include this in your markdown: -```go-html-template -{{}} +```text +{{}} ``` -#### Example `gist` Input +This will display all files in the gist alphabetically by file name. -If the gist contains several files and you want to quote just one of them, you can pass the filename (quoted) as an optional third argument: +{{< gist jmooring 50a7482715eac222e230d1e64dd9a89b >}} -{{< code file="gist-input.md" >}} -{{}} -{{< /code >}} +To display a specific file within the gist: -#### Example `gist` Output +```text +{{}} +``` -{{< output file="gist-output.html" >}} -{{< gist spf13 7896402 >}} -{{< /output >}} +Rendered: -#### Example `gist` Display - -To demonstrate the remarkable efficiency of Hugo's shortcode feature, we have embedded the `spf13` `gist` example in this page. The following simulates the experience for visitors to your website. Naturally, the final display will depend on your stylesheets and surrounding markup. - -{{< gist spf13 7896402 >}} +{{< gist jmooring 50a7482715eac222e230d1e64dd9a89b 1-template.html >}} ### `highlight` -This shortcode will convert the source code provided into syntax-highlighted HTML. Read more on [highlighting](/content-management/syntax-highlighting/). `highlight` takes exactly one required `language` parameter and requires a closing shortcode. +To display a highlighted code sample: -#### Example `highlight` Input - -{{< code file="content/tutorials/learn-html.md" >}} -{{}} -
-
-

{{ .Title }}

- {{ range .Pages }} - {{ .Render "summary"}} - {{ end }} -
-
+```text +{{}} +{{ range .Pages }} +

{{ .LinkTitle }}

+{{ end }} {{}} -{{< /code >}} +``` -#### Example `highlight` Output +Rendered: -The `highlight` shortcode example above would produce the following HTML when the site is rendered: +{{< highlight go-html-template >}} +{{ range .Pages }} +

{{ .LinkTitle }}

+{{ end }} +{{< /highlight >}} -{{< output file="tutorials/learn-html/index.html" >}} -<section id="main"> - <div> - <h1 id="title">{{ .Title }}</h1> - {{ range .Pages }} - {{ .Render "summary"}} - {{ end }} - </div> -</section> -{{< /output >}} +To specify one or more [highlighting options], include a quotation-encapsulated, comma-separated list: -{{% note "More on Syntax Highlighting" %}} -To see even more options for adding syntax-highlighted code blocks to your website, see [Syntax Highlighting in Developer Tools](/tools/syntax-highlighting/). -{{% /note %}} +[highlighting options]: /functions/highlight/ + +```text +{{}} +{{ range .Pages }} +

{{ .LinkTitle }}

+{{ end }} +{{}} +``` + +Rendered: + +{{< highlight go-html-template "lineNos=inline, lineNoStart=42" >}} +{{ range .Pages }} +

{{ .LinkTitle }}

+{{ end }} +{{< /highlight >}} ### `instagram` -If you'd like to embed a photo from [Instagram], you only need the photo's ID. You can discern an Instagram photo ID from the URL: +The `instagram` shortcode uses Facebook's **oEmbed Read** feature. The Facebook [developer documentation] states: -```txt +- This permission or feature requires successful completion of the App Review process before your app can access live data. [Learn More] +- This permission or feature is only available with business verification. You may also need to sign additional contracts before your app can access data. [Learn More Here] + +[developer documentation]: https://developers.facebook.com/docs/features-reference/oembed-read +[Learn More]: https://developers.facebook.com/docs/app-review +[Learn More Here]: https://developers.facebook.com/docs/development/release/business-verification + +You must obtain an Access Token to use the `instagram` shortcode. + +If your site configuration is private: + +{{< code-toggle file=config copy=false >}} +[services.instagram] +accessToken = 'xxx' +{{< /code-toggle >}} + +If your site configuration is _not_ private, set the Access Token with an environment variable: + +```text +HUGO_SERVICES_INSTAGRAM_ACCESSTOKEN=xxx hugo --gc --minify +``` + +{{% note %}} +If you are using a Client Access Token, you must combine the Access Token with your App ID using a pipe symbol (`APPID|ACCESSTOKEN`). +{{% /note %}} + +To display an Instagram post with this URL: + +```text https://www.instagram.com/p/BWNjjyYFxVx/ ``` -#### Example `instagram` Input +Include this in your markdown: -{{< code file="instagram-input.md" >}} +```text {{}} -{{< /code >}} - -You also have the option to hide the caption: - -{{< code file="instagram-input-hide-caption.md" >}} -{{}} -{{< /code >}} - -#### Example `instagram` Output - -By adding the preceding `hidecaption` example, the following HTML will be added to your rendered website's markup: - -{{< output file="instagram-hide-caption-output.html" >}} -{{< instagram BWNjjyYFxVx hidecaption >}} -{{< /output >}} - -#### Example `instagram` Display - -Using the preceding `instagram` with `hidecaption` example above, the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your style sheets and surrounding markup. - -{{< instagram BWNjjyYFxVx hidecaption >}} - - -{{% note %}} -The `instagram`-shortcode refers an endpoint of Instagram's API, that's deprecated since October 24th, 2020. Thus, no images can be fetched from this API endpoint, resulting in an error when the `instagram`-shortcode is used. For more information please have a look at GitHub issue [#7879](https://github.com/gohugoio/hugo/issues/7879). -{{% /note %}} +``` ### `param` @@ -275,7 +273,7 @@ These shortcodes will look up the pages by their relative path (e.g., `blog/post `ref` and `relref` also make it possible to make fragmentary links that work for the header links generated by Hugo. -{{% note "More on Cross References" %}} +{{% note %}} Read a more extensive description of `ref` and `relref` in the [cross references](/content-management/cross-references/) documentation. {{% /note %}} @@ -299,71 +297,47 @@ Assuming that standard Hugo pretty URLs are turned on. ### `tweet` -You want to include a single tweet into your blog post? Everything you need is the URL of the tweet: +To display a Twitter post with this URL: ```txt https://twitter.com/SanDiegoZoo/status/1453110110599868418 ``` -#### Example `tweet` Input +Include this in your markdown: -Pass the tweet's user (case-insensitive) and ID from the URL as parameters to the `tweet` shortcode. - -{{< code file="example-tweet-input.md" >}} +```text {{}} -{{< /code >}} +``` -#### Example `tweet` Output - -Using the preceding `tweet` example, the following HTML will be added to your rendered website's markup: - -{{< output file="example-tweet-output.html" >}} -{{< tweet user="SanDiegoZoo" id="1453110110599868418" >}} -{{< /output >}} - -#### Example `tweet` Display - -Using the preceding `tweet` example, the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup. +Rendered: {{< tweet user="SanDiegoZoo" id="1453110110599868418" >}} ### `vimeo` -Adding a video from [Vimeo] is equivalent to the [YouTube Input shortcode]. +To display a Vimeo video with this URL: -```txt -https://vimeo.com/channels/staffpicks/146022717 +```text +https://vimeo.com/channels/staffpicks/55073825 ``` -#### Example `vimeo` Input +Include this in your markdown: -Extract the ID from the video's URL and pass it to the `vimeo` shortcode: +```text +{{}} +``` -{{< code file="example-vimeo-input.md" >}} -{{}} -{{< /code >}} +Rendered: -#### Example `vimeo` Output +{{< vimeo 55073825 >}} -Using the preceding `vimeo` example, the following HTML will be added to your rendered website's markup: - -{{< output file="example-vimeo-output.html" >}} -{{< vimeo 146022717 >}} -{{< /output >}} - -{{% tip %}} +{{% note %}} If you want to further customize the visual styling of the YouTube or Vimeo output, add a `class` named parameter when calling the shortcode. The new `class` will be added to the `
` that wraps the `
@@ -297,7 +291,7 @@ The template for the `highlight` shortcode uses the following code, which is alr The rendered output of the HTML example code block will be as follows: -{{< code file="syntax-highlighted.html" copy="false" >}} +{{< code file="syntax-highlighted.html" copy=false >}}
<html>
     <body> This HTML </body>
 </html>
@@ -321,9 +315,9 @@ You also have an `img` shortcode with a single named `src` parameter that you wa
 {{< code file="layouts/shortcodes/img.html" >}}
 {{- $src := .Get "src" -}}
 {{- with .Parent -}}
-  
+  
 {{- else -}}
-  
+  
 {{- end -}}
 {{< /code >}}
 
diff --git a/content/en/templates/single-page-templates.md b/content/en/templates/single-page-templates.md
index 925f97b03..559f2fb17 100644
--- a/content/en/templates/single-page-templates.md
+++ b/content/en/templates/single-page-templates.md
@@ -1,19 +1,13 @@
 ---
 title: Single Page Templates
-linktitle:
 description: The primary view of content in Hugo is the single view. Hugo will render every Markdown file provided with a corresponding single template.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-04-06
 categories: [templates]
 keywords: [page, templates]
 menu:
   docs:
-    parent: "templates"
+    parent: templates
     weight: 60
 weight: 60
-sections_weight: 60
-draft: false
 aliases: [/layout/content/]
 toc: true
 ---
@@ -30,46 +24,46 @@ Content pages are of the type `page` and will therefore have all the [page varia
 
 This single page template makes use of Hugo [base templates], the [`.Format` function] for dates, the [`.WordCount` page variable][pagevars], and ranges through the single content's specific [taxonomies][pagetaxonomy]. [`with`] is also used to check whether the taxonomies are set in the front matter.
 
-{{< code file="layouts/posts/single.html" download="single.html" >}}
+{{< code file="layouts/posts/single.html" >}}
 {{ define "main" }}
 
 

{{ .Title }}

-
- {{ .Content }} -
+
+ {{ .Content }} +
{{ end }} {{< /code >}} diff --git a/content/en/templates/sitemap-template.md b/content/en/templates/sitemap-template.md index 9fc817020..d0738a362 100644 --- a/content/en/templates/sitemap-template.md +++ b/content/en/templates/sitemap-template.md @@ -1,16 +1,13 @@ --- title: Sitemap Templates description: Hugo provides built-in sitemap templates. -date: 2017-02-01 categories: [templates] keywords: [sitemap, xml, templates] menu: docs: - parent: "templates" + parent: templates weight: 160 weight: 160 -sections_weight: 160 -draft: false aliases: [/layout/sitemap/,/templates/sitemap/] toc: true --- @@ -79,7 +76,7 @@ You may disable sitemap generation in your site configuration: disableKinds = ['sitemap'] {{}} -[`publishDir`]: {{< relref "getting-started/configuration#publishdir" >}} +[`publishDir`]: /getting-started/configuration#publishdir [change frequency]: [priority]: [sitemap protocol]: diff --git a/content/en/templates/taxonomy-templates.md b/content/en/templates/taxonomy-templates.md index e9fc80525..e343df471 100644 --- a/content/en/templates/taxonomy-templates.md +++ b/content/en/templates/taxonomy-templates.md @@ -1,19 +1,13 @@ --- title: Taxonomy Templates -# linktitle: description: Taxonomy templating includes taxonomy list pages, taxonomy terms pages, and using taxonomies in your single page templates. -date: 2017-02-01 -publishdate: 2017-02-01 -lastmod: 2017-02-01 categories: [templates] keywords: [taxonomies,metadata,front matter,terms,templates] menu: docs: - parent: "templates" + parent: templates weight: 50 weight: 50 -sections_weight: 50 -draft: false aliases: [/taxonomies/displaying/,/templates/terms/,/indexes/displaying/,/taxonomies/templates/,/indexes/ordering/, /templates/taxonomies/, /templates/taxonomy/] toc: true --- @@ -150,16 +144,14 @@ Weights of zero are thus treated specially: if two pages have unequal weights, a Content can be assigned weight for each taxonomy that it's assigned to. -```txt -+++ + +{{< code-toggle file="content/example.md" fm=true copy=false >}} tags = [ "a", "b", "c" ] tags_weight = 22 categories = ["d"] -title = "foo" +title = "Example" categories_weight = 44 -+++ -Front Matter with weighted tags and categories -``` +{{< /code-toggle >}} The convention is `taxonomyname_weight`. @@ -177,16 +169,16 @@ There are two different templates that the use of taxonomies will require you to Both templates are covered in detail in the templates section. -A [list template](/templates/list/) is any template that will be used to render multiple pieces of content in a single html page. This template will be used to generate all the automatically created taxonomy pages. +A [list template](/templates/lists/) is any template that will be used to render multiple pieces of content in a single html page. This template will be used to generate all the automatically created taxonomy pages. -A [taxonomy terms template](/templates/terms/) is a template used to +A [taxonomy template](/templates/taxonomy-templates/) is a template used to generate the list of terms for a given template. There are four common ways you can display the data in your taxonomies in addition to the automatic taxonomy pages created by hugo -using the [list templates](/templates/list/): +using the [list templates](/templates/lists/): 1. For a given piece of content, you can list the terms attached 2. For a given piece of content, you can list other content with the same @@ -258,7 +250,7 @@ This would be very useful in a sidebar as “featured content”. You could even
  • {{ $key }}
  • {{ end }} @@ -288,7 +280,7 @@ The following example displays all terms in a site's tags taxonomy: This example will list all taxonomies and their terms, as well as all the content assigned to each of the terms. -{{< code file="layouts/partials/all-taxonomies.html" download="all-taxonomies.html" download="all-taxonomies.html" >}} +{{< code file="layouts/partials/all-taxonomies.html" >}}