summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-04-08 13:32:01 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-04-08 13:32:01 +0200
commit5b5dcb8d5a4669e1768951b452cfd53c6b25825c (patch)
treec364895dfba48457afd2b83ceaae2e085fae0428 /docs
parentffe3eb9195e0f3184df9fc416d5f6ee12fdba91b (diff)
parentec920363cdeb687c8bcac9c242767d366fb058cb (diff)
Diffstat (limited to 'docs')
-rw-r--r--docs/.cspell.json66
-rw-r--r--docs/content/en/content-management/formats.md2
-rw-r--r--docs/content/en/functions/cond.md1
-rw-r--r--docs/content/en/functions/default.md1
-rw-r--r--docs/content/en/functions/uniq.md1
-rw-r--r--docs/content/en/getting-started/configuration.md21
-rw-r--r--docs/content/en/hosting-and-deployment/deployment-with-rclone.md57
-rw-r--r--docs/content/en/hosting-and-deployment/hosting-on-keycdn.md4
-rw-r--r--docs/content/en/hosting-and-deployment/hosting-on-render.md2
-rw-r--r--docs/content/en/hugo-modules/configuration.md4
-rw-r--r--docs/content/en/hugo-modules/use-modules.md2
-rw-r--r--docs/content/en/showcase/hapticmedia/index.md3
-rw-r--r--docs/content/en/templates/404.md2
-rw-r--r--docs/content/en/templates/ordering-and-grouping.md4
-rw-r--r--docs/content/en/templates/partials.md2
-rw-r--r--docs/content/en/templates/render-hooks.md2
-rw-r--r--docs/content/en/templates/sitemap-template.md123
-rw-r--r--docs/content/en/tools/migrations.md4
-rw-r--r--docs/layouts/maintenance/list.html2
-rw-r--r--docs/netlify.toml8
20 files changed, 196 insertions, 115 deletions
diff --git a/docs/.cspell.json b/docs/.cspell.json
index 2cac73c02..84631ce67 100644
--- a/docs/.cspell.json
+++ b/docs/.cspell.json
@@ -6,6 +6,8 @@
"aabba",
"aabbaa",
"aabbaabb",
+ "aabbaabbab",
+ "abbaa",
"abourget",
"absurl",
"adoc",
@@ -18,7 +20,11 @@
"attrlink",
"azblob",
"baseof",
+ "bbaa",
+ "bcde",
+ "bcdef",
"beevelop",
+ "Bergevin",
"bibtex",
"Bjørn",
"blackfriday",
@@ -31,6 +37,7 @@
"canonify",
"Catmull",
"Catwoman",
+ "changefreq",
"Cheatsheet",
"choco",
"chromastyles",
@@ -42,12 +49,15 @@
"Coen",
"Commento",
"Cond",
+ "contentdir",
"Contentful",
+ "Copr",
"copyrighthtml",
"corejs",
"countrunes",
"countwords",
"crossreferences",
+ "daftaupe",
"datatable",
"DATOCMS",
"debugconfig",
@@ -60,6 +70,8 @@
"dokuwiki",
"dpkg",
"DRING",
+ "Eiqc",
+ "Eliott",
"Emojify",
"Enwrite",
"eopkg",
@@ -68,6 +80,7 @@
"erroridf",
"Evernote",
"exitwp",
+ "expirydate",
"Feminella",
"firstpost",
"Formspree",
@@ -95,7 +108,9 @@
"Grayscale",
"Gruber",
"gtag",
+ "gvfs",
"hidecaption",
+ "hmac",
"Hokus",
"hola",
"hügó",
@@ -121,6 +136,7 @@
"Isset",
"Isso",
"Jaco",
+ "JIRN",
"johnpatitucci",
"Joomla",
"JRBR",
@@ -142,10 +158,13 @@
"mathjax",
"mdhender",
"mdshortcode",
+ "MENUENTRY",
"mercredi",
+ "Milli",
"Mittwoch",
"mkdir",
"mmark",
+ "modh",
"monokai",
"Morling",
"mspowerpoint",
@@ -155,17 +174,20 @@
"mydeployment",
"myindex",
"mylayout",
+ "mylogin",
"mypage",
"mypartials",
"mypost",
"mysite",
"myspa",
"mystyle",
+ "mytextpartial",
"mytheme",
"NDJSON",
"needsexample",
"Netravali",
"newparam",
+ "Nichlas",
"Nikhil",
"Njjy",
"nlist",
@@ -176,6 +198,7 @@
"NOSQL",
"notoc",
"novembre",
+ "numfmt",
"NUMWORKERMULTIPLIER",
"Obhu",
"octohug",
@@ -191,18 +214,25 @@
"PCRE",
"peaceiris",
"Pedersen",
+ "Pekka",
"permalinkable",
"plainify",
"POSIX",
"postprocess",
+ "Poupin",
+ "prerender",
"println",
"publishdate",
"Pygments",
+ "qref",
"querify",
"QVOMC",
+ "Racic",
+ "Rclone",
"rdwatters",
"readfile",
"rebinded",
+ "recommendedby",
"REDIR",
"reftext",
"relatedfuncs",
@@ -210,16 +240,21 @@
"relurl",
"remarkjs",
"rgba",
+ "Riku",
"rlimit",
"roboto",
"rssxml",
"rwxrwxrwx",
+ "RYUGV",
"safehtml",
"safejs",
"Samsa",
+ "schemaorg",
"Shekhar",
"Shortcode",
"Shortcodes",
+ "signup",
+ "Silvola",
"Sindre",
"sitemapindex",
"sitemapxml",
@@ -231,24 +266,33 @@
"struct",
"structs",
"subdir",
+ "svgs",
+ "symdiff",
"Talkyard",
"taxo",
+ "taxonomyname",
"tbody",
"tdewolff",
"testshortcodes",
"thead",
"Thinkful",
+ "Tknx",
"TLDR",
"TMPDIR",
+ "TOCSS",
+ "todos",
"tojson",
+ "Tomango",
+ "topologix",
"Torikian",
"totoml",
"toyaml",
"twitteruser",
"Unmarshal",
- "Unmarshal",
"urlize",
"urlset",
+ "utimestamp",
+ "vendored",
"vimrc",
"wanghc",
"Wappalyzer",
@@ -258,19 +302,35 @@
"wibble",
"wordcount",
"workson",
+ "wpxr",
+ "Xbaabbab",
"xvzf",
"yoyoyo",
"Zgotmpl",
- "zzbbaabb"
+ "zzbbaabb",
+ "مدونتي"
],
"language": "en,en-GB,en-US,de,fr",
+ "allowCompoundWords": true,
"files": [
"**/*.md"
],
+ "ignoreRegExpList": [
+ "<!-- prettier-ignore -->\\n(`{3,})\\w*\\n[\\s\\S]+?\\1",
+ "\\[(\\*{2})?@\\w+?\\1\\]",
+ "\\[`\\w+`\\]",
+ "ve{2,}r{2,}y",
+ "ve+r+y+long\\w*",
+ "\\/.*?\\/",
+ "\\_\\w+",
+ "\\#\\w+"
+ ],
"ignorePaths": [
".cspell.json",
"**/node_modules/**",
- "*.min.*"
+ "*.min.*",
+ "**/news/*",
+ "**/showcase/*"
],
"useGitignore": true
}
diff --git a/docs/content/en/content-management/formats.md b/docs/content/en/content-management/formats.md
index 3c3edfdd4..0b25c3171 100644
--- a/docs/content/en/content-management/formats.md
+++ b/docs/content/en/content-management/formats.md
@@ -33,7 +33,7 @@ The current list of content formats in Hugo:
|MMark|mmark|Mmark is deprecated and will be removed in a future release.|
|Emacs Org-Mode|org|See [go-org](https://github.com/niklasfasching/go-org).|
|AsciiDoc|asciidocext, adoc, ad|Needs [Asciidoctor][ascii] installed.|
-|RST|rst|Needs [RST](https://docutils.sourceforge.net/rst.html) installed.|
+|RST|rst|Needs [RST](https://docutils.sourceforge.io/rst.html) installed.|
|Pandoc|pandoc, pdc|Needs [Pandoc](https://www.pandoc.org/) installed.|
|HTML|html, htm|To be treated as a content file, with layout, shortcodes etc., it must have front matter. If not, it will be copied as-is.|
diff --git a/docs/content/en/functions/cond.md b/docs/content/en/functions/cond.md
index a5e534426..30b853251 100644
--- a/docs/content/en/functions/cond.md
+++ b/docs/content/en/functions/cond.md
@@ -11,7 +11,6 @@ hugoversion: 0.27
relatedfuncs: [default]
toc: false
draft: false
-needsexamples: false
---
`cond` returns *VAR1* if *CONTROL* is true, or *VAR2* if it is not.
diff --git a/docs/content/en/functions/default.md b/docs/content/en/functions/default.md
index eee00b200..c4cc166a7 100644
--- a/docs/content/en/functions/default.md
+++ b/docs/content/en/functions/default.md
@@ -18,7 +18,6 @@ relatedfuncs: []
deprecated: false
draft: false
aliases: []
-needsexamples: false
---
`default` checks whether a given value is set and returns a default value if it is not. *Set* in this context means different things depending on the data type:
diff --git a/docs/content/en/functions/uniq.md b/docs/content/en/functions/uniq.md
index 0a720f88f..eec55e5c3 100644
--- a/docs/content/en/functions/uniq.md
+++ b/docs/content/en/functions/uniq.md
@@ -16,7 +16,6 @@ hugoversion:
relatedfuncs: []
deprecated: false
aliases: []
-needsexamples: false
---
```
diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md
index aed0ea100..d377487c5 100644
--- a/docs/content/en/getting-started/configuration.md
+++ b/docs/content/en/getting-started/configuration.md
@@ -46,7 +46,7 @@ In addition to using a single site config file, one can use the `configDir` dire
- Each file represents a configuration root object, such as `params.toml` for `[Params]`, `menu(s).toml` for `[Menu]`, `languages.toml` for `[Languages]` etc...
- Each file's content must be top-level, for example:
-
+
{{< code-toggle file="config" >}}
[Params]
foo = "bar"
@@ -220,7 +220,7 @@ Disable automatic live reloading of browser window.
: Do not convert the url/path to lowercase.
-### enableEmoji
+### enableEmoji
**Default value:** false
@@ -254,18 +254,6 @@ Enable generation of `robots.txt` file.
See [Front matter Configuration](#configure-front-matter).
-### footnoteAnchorPrefix
-
-**Default value:** ""
-
-Prefix for footnote anchors.
-
-### footnoteReturnLinkContents
-
-**Default value:** ""
-
-Text to display for footnote return links.
-
### googleAnalytics
**Default value:** ""
@@ -279,6 +267,7 @@ Google Analytics tracking ID.
If true, auto-detect Chinese/Japanese/Korean Languages in the content. This will make `.Summary` and `.WordCount` behave correctly for CJK languages.
### imaging
+
See [Image Processing Config](/content-management/image-processing/#image-processing-config).
### languageCode
@@ -288,6 +277,7 @@ See [Image Processing Config](/content-management/image-processing/#image-proces
A language tag as defined by [RFC 5646](https://datatracker.ietf.org/doc/html/rfc5646). The internal [RSS template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml) populates its `<language>` element with this value. The value is not used elsewhere.
### languages
+
See [Configure Languages](/content-management/multilingual/#configure-languages).
### disableLanguages
@@ -330,7 +320,7 @@ Don't sync modification time of files.
### outputFormats
See [Configure Output Formats](#configure-additional-output-formats).
-### paginate
+### paginate
**Default value:** 10
@@ -568,7 +558,6 @@ The following is a typical example of a configuration file. The values nested un
{{< code-toggle file="config">}}
baseURL: "https://yoursite.example.com/"
title: "My Hugo Site"
-footnoteReturnLinkContents: "↩"
permalinks:
posts: /:year/:month/:title/
params:
diff --git a/docs/content/en/hosting-and-deployment/deployment-with-rclone.md b/docs/content/en/hosting-and-deployment/deployment-with-rclone.md
new file mode 100644
index 000000000..e9feb765a
--- /dev/null
+++ b/docs/content/en/hosting-and-deployment/deployment-with-rclone.md
@@ -0,0 +1,57 @@
+---
+title: Deployment with Rclone
+linktitle: Deployment with Rclone
+description: If you have access to your web host with SFTP/FTP/SSH/HTTP(DAV), you can use rclone to incrementally deploy your entire Hugo website.
+date: 2021-08-09
+publishdate: 2021-08-09
+lastmod: 2021-08-09
+categories: [hosting and deployment]
+keywords: [rclone,sftp,deployment]
+authors: [Daniel F. Dickinson]
+menu:
+ docs:
+ parent: "hosting-and-deployment"
+ weight: 80
+weight: 80
+sections_weight: 80
+draft: false
+aliases: [/tutorials/deployment-with-rclone/]
+toc: true
+notesforauthors:
+---
+
+## Assumptions
+
+* A web host running a web server. This could be a shared hosting environment or a VPS.
+* Access to your web host with any of the [protocols supported by rclone](https://rclone.org/#providers), such as SFTP.
+* A functional static website built with Hugo
+* Deploying from an [Rclone](https://rclone.org) compatible operating system
+* You have [installed Rclone](https://rclone.org/install/).
+
+**NB**: You can remove ``--interactive`` in the commands below once you are comfortable with rclone, if you wish. Also, ``--gc`` and ``--minify`` are optional in the ``hugo`` commands below.
+
+## Getting Started
+
+The spoiler is that you can even deploy your entire website from any compatible OS with no configuration. Using SFTP for example:
+
+```
+hugo --gc --minify
+rclone sync --interactive --sftp-host sftp.example.com --sftp-user www-data --sftp-ask-password public/ :sftp:www/
+```
+
+## Configure Rclone for Even Easier Usage
+
+The easiest way is simply to run ``rclone config``.
+
+The [Rclone docs](https://rclone.org/docs/) provide [an example of configuring Rclone to use SFTP](https://rclone.org/sftp/).
+
+For the next commands, we will assume you configured a remote you named ``hugo-www``
+
+The above 'spoiler' commands could become:
+
+```
+hugo --gc --minify
+rclone sync --interactive public/ hugo-www:www/
+```
+
+After you issue the above commands (and respond to any prompts), check your website and you will see that it is deployed.
diff --git a/docs/content/en/hosting-and-deployment/hosting-on-keycdn.md b/docs/content/en/hosting-and-deployment/hosting-on-keycdn.md
index 8d9cb0e63..bec8b36e4 100644
--- a/docs/content/en/hosting-and-deployment/hosting-on-keycdn.md
+++ b/docs/content/en/hosting-and-deployment/hosting-on-keycdn.md
@@ -83,11 +83,11 @@ The Zone ID and API key are used to purge your zone – it’s not strictly need
Now it’s time to push the newly created repository to GitLab:
```
-git remote add origin git@gitlab.com:youruser/ciexample.git
+git remote add origin git@gitlab.com:youruser/ci-example.git
git push -u origin master
```
-You can watch the progress and CI job output in your Gitlab project under “Pipelines”.
+You can watch the progress and CI job output in your Gitlab project under “Pipelines”.
After verifying your CI job ran without issues, first check that your GitLab page shows up under `https://youruser.gitlab.io/reponame/` (it might look broken depending on your browser settings as all links point to your KeyCDN zone – don’t worry about that) and then by heading to whatever Zone alias / Zone URL you defined.
diff --git a/docs/content/en/hosting-and-deployment/hosting-on-render.md b/docs/content/en/hosting-and-deployment/hosting-on-render.md
index 7a77742e2..73b20bcb2 100644
--- a/docs/content/en/hosting-and-deployment/hosting-on-render.md
+++ b/docs/content/en/hosting-and-deployment/hosting-on-render.md
@@ -4,7 +4,6 @@ linktitle: Host on Render
description: Host your Hugo site for free with Render's global CDN, fully-managed SSL and auto deploys from GitHub.
date: 2019-06-06
publishdate: 2019-06-06
-lastmod: 2020-01-01
categories: [hosting and deployment]
keywords: [hosting,deployment]
authors: [Anurag Goel]
@@ -88,5 +87,4 @@ Render automatically downloads all Git submodules defined in your Git repo on ev
Chat with Render developers at https://render.com/chat or email `support@render.com` if you need help.
-
[Quick Start]: /getting-started/quick-start/
diff --git a/docs/content/en/hugo-modules/configuration.md b/docs/content/en/hugo-modules/configuration.md
index c66d93a6d..70de492ab 100644
--- a/docs/content/en/hugo-modules/configuration.md
+++ b/docs/content/en/hugo-modules/configuration.md
@@ -43,10 +43,10 @@ private
: Comma separated glob list matching paths that should be treated as private.
workspace {{< new-in "0.83.0" >}}
-The workspace file to use. This enables Go workspace mode. Note that this can also be set via OS env, e.g. `export HUGO_MODULE_WORKSPACE=/my/hugo.work` This only works with Go 1.18+.
+: The workspace file to use. This enables Go workspace mode. Note that this can also be set via OS env, e.g. `export HUGO_MODULE_WORKSPACE=/my/hugo.work` This only works with Go 1.18+.
replacements {{< new-in "0.77.0" >}}
-: A comma separated (or a slice) list of module path to directory replacement mapping, e.g. `github.com/bep/myprettytheme -> ../..,github.com/bep/shortcodes -> /some/path`. This is mostly useful for temporary locally development of a module, and then it makes sense to set it as an OS environment variable, e.g: `env HUGO_MODULE_REPLACEMENTS="github.com/bep/myprettytheme -> ../.."`. Any relative path is relate to [themesDir](https://gohugo.io/getting-started/configuration/#all-configuration-settings), and absolute paths are allowed.
+: A comma separated (or a slice) list of module path to directory replacement mapping, e.g. `github.com/bep/my-theme -> ../..,github.com/bep/shortcodes -> /some/path`. This is mostly useful for temporary locally development of a module, and then it makes sense to set it as an OS environment variable, e.g: `env HUGO_MODULE_REPLACEMENTS="github.com/bep/my-theme -> ../.."`. Any relative path is relate to [themesDir](https://gohugo.io/getting-started/configuration/#all-configuration-settings), and absolute paths are allowed.
Note that the above terms maps directly to their counterparts in Go Modules. Some of these setting may be natural to set as OS environment variables. To set the proxy server to use, as an example:
diff --git a/docs/content/en/hugo-modules/use-modules.md b/docs/content/en/hugo-modules/use-modules.md
index e0d73957a..038e0bf89 100644
--- a/docs/content/en/hugo-modules/use-modules.md
+++ b/docs/content/en/hugo-modules/use-modules.md
@@ -136,7 +136,7 @@ Also see the [CLI Doc](/commands/hugo_mod_clean/).
Run `hugo mod clean` to delete the entire modules cache.
-Note that you can also configure the `modules` cache with a `maxAge`, see [File Caches](/hugo-modules/configuration/#configure-file-caches).
+Note that you can also configure the `modules` cache with a `maxAge`, see [File Caches](/getting-started/configuration/#configure-file-caches).
diff --git a/docs/content/en/showcase/hapticmedia/index.md b/docs/content/en/showcase/hapticmedia/index.md
index b32879b69..85ec17a8b 100644
--- a/docs/content/en/showcase/hapticmedia/index.md
+++ b/docs/content/en/showcase/hapticmedia/index.md
@@ -18,7 +18,7 @@ Hugo addresses all these needs, coupled with [Forestry.io](https://forestry.io/)
- The **multilingual** content support, especially simple to setup.
- The **multiple environments** support (develop, staging, test, production, ...).
- Although a hard start with the Go language, the power of the **Hugo's templating**.
-- The **partial layouts**, including the `internals` (e.g. social metas).
+- The **partial layouts**, including the `internals` (e.g. social meta tags).
- The **build time**, unbeatable ⚡️⚡️⚡️.
@@ -30,4 +30,3 @@ Hugo addresses all these needs, coupled with [Forestry.io](https://forestry.io/)
- **[Forestry.io](https://forestry.io)** for the content management.
**All of these tools allow our editor to manage the blog's content without having to worry about its technical aspect, which is managed by the developers.**
-
diff --git a/docs/content/en/templates/404.md b/docs/content/en/templates/404.md
index 1b82e9ebf..a2d06cf81 100644
--- a/docs/content/en/templates/404.md
+++ b/docs/content/en/templates/404.md
@@ -51,7 +51,7 @@ Your 404.html file can be set to load automatically when a visitor enters a mist
* Nginx. You might specify `error_page 404 /404.html;` in your `nginx.conf` file. [Details here](https://nginx.org/en/docs/http/ngx_http_core_module.html#error_page).
* Amazon AWS S3. When setting a bucket up for static web serving, you can specify the error file from within the S3 GUI.
* Amazon CloudFront. You can specify the page in the Error Pages section in the CloudFront Console. [Details here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
-* Caddy Server. Using `errors { 404 /404.html }`. [Details here](https://caddyserver.com/docs/errors)
+* Caddy Server. Use the `handle_errors` directive to specify error pages for one or more status codes. [Details here](https://caddyserver.com/docs/caddyfile/directives/handle_errors)
* Netlify. Add `/* /404.html 404` to `content/_redirects`. [Details Here](https://www.netlify.com/docs/redirects/#custom-404)
* Azure Static website. You can specify the `Error document path` in the Static website configuration page of the Azure portal. [More details are available in the Static website documentation](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website).
diff --git a/docs/content/en/templates/ordering-and-grouping.md b/docs/content/en/templates/ordering-and-grouping.md
index a4f238fdf..f1634c7d8 100644
--- a/docs/content/en/templates/ordering-and-grouping.md
+++ b/docs/content/en/templates/ordering-and-grouping.md
@@ -1,5 +1,5 @@
---
-title: Ordere and Grouping Hugo Lists
+title: Ordering and Grouping Hugo Lists
linktitle: List Ordering and Grouping
description: You can group or order your content in both your templating and content front matter.
date: 2017-02-01
@@ -19,7 +19,7 @@ toc: true
notes: This was originally going to be a separate page on the new docs site but it now makes more sense to keep everything within the templates/lists page. - rdwatters, 2017-03-12.
---
-In Hugo, A list template is any template that will be used to render multiple pieces of content in a single HTML page.
+In Hugo, a list template is any template that will be used to render multiple pieces of content in a single HTML page.
## Example List Templates
diff --git a/docs/content/en/templates/partials.md b/docs/content/en/templates/partials.md
index 2d1e9edf2..56a676d7e 100644
--- a/docs/content/en/templates/partials.md
+++ b/docs/content/en/templates/partials.md
@@ -78,7 +78,7 @@ This means the partial will *only* be able to access those variables. The partia
## Returning a value from a Partial
-In addition to outputting markup, partials can be used to return a value of any type. In order to return a value, a partial must include a lone `return` statement.
+In addition to outputting markup, partials can be used to return a value of any type. In order to return a value, a partial must include a lone `return` statement _at the end of the partial_.
### Example GetFeatured
diff --git a/docs/content/en/templates/render-hooks.md b/docs/content/en/templates/render-hooks.md
index 57c2efa06..8f1a55c2f 100644
--- a/docs/content/en/templates/render-hooks.md
+++ b/docs/content/en/templates/render-hooks.md
@@ -25,7 +25,7 @@ The hook kinds currently supported are:
* `image`
* `link`
* `heading` {{< new-in "0.71.0" >}}
-* `codeblock`{{< new-in "0.83.0" >}}
+* `codeblock`{{< new-in "0.93.0" >}}
You can define [Output-Format-](/templates/output-formats) and [language-](/content-management/multilingual/)specific templates if needed. Your `layouts` folder may look like this:
diff --git a/docs/content/en/templates/sitemap-template.md b/docs/content/en/templates/sitemap-template.md
index dee28fc3b..9fc817020 100644
--- a/docs/content/en/templates/sitemap-template.md
+++ b/docs/content/en/templates/sitemap-template.md
@@ -1,10 +1,7 @@
---
-title: Sitemap Template
-# linktitle: Sitemap
-description: Hugo ships with a built-in template file observing the v0.9 of the Sitemap Protocol, but you can override this template if needed.
+title: Sitemap Templates
+description: Hugo provides built-in sitemap templates.
date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [templates]
keywords: [sitemap, xml, templates]
menu:
@@ -15,92 +12,76 @@ weight: 160
sections_weight: 160
draft: false
aliases: [/layout/sitemap/,/templates/sitemap/]
-toc: false
+toc: true
---
-A single Sitemap template is used to generate the `sitemap.xml` file.
-Hugo automatically comes with this template file. *No work is needed on
-the users' part unless they want to customize `sitemap.xml`.*
+## Overview
-A sitemap is a `Page` and therefore has all the [page variables][pagevars] available to use in this template along with Sitemap-specific ones:
+Hugo's built-in sitemap templates conform to v0.9 of the [sitemap protocol].
-`.Sitemap.ChangeFreq`
-: The page change frequency
+With a monolingual project, Hugo generates a sitemap.xml file in the root of the [`publishDir`] using the built-in [sitemap.xml] template.
-`.Sitemap.Priority`
-: The priority of the page
+With a multilingual project, Hugo generates:
-`.Sitemap.Filename`
-: The sitemap filename
+- A sitemap.xml file in the root of each site (language) using the built-in [sitemap.xml] template
+- A sitemap.xml file in the root of the [`publishDir`] using the built-in [sitemapindex.xml] template
-If provided, Hugo will use `/layouts/sitemap.xml` instead of the internal `sitemap.xml` template that ships with Hugo.
+## Configuration
-## Sitemap Templates
+Set the default values for [change frequency] and [priority], and the name of the generated file, in your site configuration.
-Hugo has built-on Sitemap templates, but you can provide your own if needed, in either `layouts/sitemap.xml` or `layouts/_default/sitemap.xml`.
+{{< code-toggle file="config" >}}
+[sitemap]
+ changefreq = 'monthly'
+ filename = 'sitemap.xml'
+ priority = 0.5
+{{</ code-toggle >}}
-For multilingual sites, we also create a Sitemap index. You can provide a custom layout for that in either `layouts/sitemapindex.xml` or `layouts/_default/sitemapindex.xml`.
+changefreq
+: How frequently a page