--- /dev/null
- /*
- Link: <{{ "dist/app.bundle.js" | relURL }}>; rel=preload; as=script
- Link: <{{ "dist/main.css" | relURL }}>; rel=preload; as=style
+/*
+ X-Frame-Options: DENY
+ X-XSS-Protection: 1; mode=block
+ X-Content-Type-Options: nosniff
+ Referrer-Policy: origin-when-cross-origin
--- /dev/null
- # github.com/gohugoio/gohugoioTheme v0.0.0-20230418063032-99f9185b8e11
++# github.com/gohugoio/gohugoioTheme v0.0.0-20230527124826-78bc315d7b8a
--- /dev/null
- Below are all privacy settings and their default value. These settings need to be put in your site config (e.g. `config.toml`).
+---
+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.
+layout: single
+keywords: ["GDPR", "Privacy", "Data Protection"]
+menu:
+ docs:
+ parent: about
+ weight: 5
+weight: 5
+aliases: [/privacy/,/gdpr/]
+toc: true
+---
+
+ General Data Protection Regulation ([GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation)) is a regulation in EU law on data protection and privacy for all individuals within the European Union and the European Economic Area. It became enforceable on 25 May 2018.
+
+ **Hugo is a static site generator. By using Hugo you are already standing on very solid ground. Static HTML files on disk are much easier to reason about compared to server and database driven web sites.**
+
+ But even static websites can integrate with external services, so from version `0.41`, Hugo provides a **Privacy Config** that covers the relevant built-in templates.
+
+ Note that:
+
+ * These settings have their defaults setting set to _off_, i.e. how it worked before Hugo `0.41`. You must do your own evaluation of your site and apply the appropriate settings.
+ * These settings work with the [internal templates](/templates/internal/). Some theme may contain custom templates for embedding services like Google Analytics. In that case these options have no effect.
+ * We will continue this work and improve this further in future Hugo versions.
+
+## All Privacy Settings
+
- {{< code-toggle file="config">}}
++Below are all privacy settings and their default value. These settings need to be put in your site config (e.g. `hugo.toml`).
+
- {{< code-toggle file="config">}}
++{{< code-toggle file="hugo" >}}
+[privacy]
+[privacy.disqus]
+disable = false
+[privacy.googleAnalytics]
+disable = false
+respectDoNotTrack = false
+anonymizeIP = false
+useSessionStorage = false
+[privacy.instagram]
+disable = false
+simple = false
+[privacy.twitter]
+disable = false
+enableDNT = false
+simple = false
+[privacy.vimeo]
+disable = false
+enableDNT = false
+simple = false
+[privacy.youtube]
+disable = false
+privacyEnhanced = false
+{{< /code-toggle >}}
+
+## Disable All Services
+
+An example Privacy Config that disables all the relevant services in Hugo. With this configuration, the other settings will not matter.
+
- {{< code-toggle file="config">}}
++ {{< code-toggle file="hugo" >}}
+[privacy]
+[privacy.disqus]
+disable = true
+[privacy.googleAnalytics]
+disable = true
+[privacy.instagram]
+disable = true
+[privacy.twitter]
+disable = true
+[privacy.vimeo]
+disable = true
+[privacy.youtube]
+disable = true
+{{< /code-toggle >}}
+
+## The Privacy Settings Explained
+
+### GoogleAnalytics
+
+anonymizeIP
+: Enabling this will make it so the users' IP addresses are anonymized within Google Analytics.
+
+respectDoNotTrack
+: Enabling this will make the GA templates respect the "Do Not Track" HTTP header.
+
+useSessionStorage
+: Enabling this will disable the use of Cookies and use Session Storage to Store the GA Client ID.
+
+{{% note %}}
+`useSessionStorage` is not supported when using Google Analytics v4 (gtag.js).
+{{% /note %}}
+
+### Instagram
+
+simple
+: If simple mode is enabled, a static and no-JS version of the Instagram image card will be built. Note that this only supports image cards and the image itself will be fetched from Instagram's servers.
+
+**Note:** If you use the _simple mode_ for Instagram and a site styled with Bootstrap 4, you may want to disable the inline styles provided by Hugo:
+
- {{< code-toggle file="config">}}
++ {{< code-toggle file="hugo" >}}
+[services]
+[services.instagram]
+disableInlineCSS = true
+{{< /code-toggle >}}
+
+### Twitter
+
+enableDNT
+: Enabling this for the twitter/tweet shortcode, the tweet and its embedded page on your site are not used for purposes that include personalized suggestions and personalized ads.
+
+simple
+: If simple mode is enabled, a static and no-JS version of a tweet will be built.
+
+**Note:** If you use the _simple mode_ for Twitter, you may want to disable the inline styles provided by Hugo:
+
++ {{< code-toggle file="hugo" >}}
+[services]
+[services.twitter]
+disableInlineCSS = true
+{{< /code-toggle >}}
+
+### YouTube
+
+privacyEnhanced
+: When you turn on privacy-enhanced mode, YouTube won’t store information about visitors on your website unless the user plays the embedded video.
+
+### Vimeo
+
+enableDNT
+: Enabling this for the vimeo shortcode, the Vimeo player will be blocked from tracking any session data, including all cookies and stats.
+
+simple
+: If simple mode is enabled, the video thumbnail is fetched from Vimeo's servers and it is overlayed with a play button. If the user clicks to play the video, it will open in a new tab directly on Vimeo's website.
--- /dev/null
+---
+title: "hugo"
+slug: hugo
+url: /commands/hugo/
+---
+## hugo
+
+hugo builds your site
+
+### Synopsis
+
+hugo is the main command, used to build your Hugo site.
+
+Hugo is a Fast and Flexible Static Site Generator
+built with love by spf13 and friends in Go.
+
+Complete documentation is available at https://gohugo.io/.
+
+```
+hugo [flags]
+```
+
+### Options
+
+```
+ -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
+ -D, --buildDrafts include content marked as draft
+ -E, --buildExpired include expired content
+ -F, --buildFuture include content with publishdate in the future
+ --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+ --cleanDestinationDir remove files from destination not found in static directories
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ -c, --contentDir string filesystem path to content directory
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ --disableKinds strings disable different kind of pages (home, RSS etc.)
+ --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages
+ -e, --environment string build environment
+ --forceSyncStatic copy all files when static is changed.
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --gc enable to run some cleanup tasks (remove unused cache files) after the build
+ -h, --help help for hugo
+ --ignoreCache ignores the cache directory
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ -l, --layoutDir string filesystem path to layout directory
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --minify minify any supported output format (HTML, XML etc.)
+ --noBuildLock don't create .hugo_build.lock file
+ --noChmod don't sync permission mode of files
+ --noTimes don't sync modification time of files
+ --panicOnWarning panic on first WARNING log
+ --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
+ --printI18nWarnings print missing translations
+ --printMemoryUsage print memory usage to screen at intervals
+ --printPathWarnings print warnings on duplicate target paths etc.
+ --printUnusedTemplates print warnings on unused templates.
+ --quiet build in quiet mode
+ --renderToMemory render to memory (only useful for benchmark testing)
+ -s, --source string filesystem path to read files relative from
+ --templateMetrics display metrics about template executions
+ --templateMetricsHints calculate some improvement hints when combined with --templateMetrics
+ -t, --theme strings themes to use (located in /themes/THEMENAME/)
+ --themesDir string filesystem path to themes directory
+ --trace file write trace to file (not useful in general)
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+ -w, --watch watch filesystem for changes and recreate as needed
+```
+
+### SEE ALSO
+
+* [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell
+* [hugo config](/commands/hugo_config/) - Print the site configuration
+* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
+* [hugo deploy](/commands/hugo_deploy/) - Deploy your site to a Cloud provider.
+* [hugo env](/commands/hugo_env/) - Print Hugo version and environment info
+* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
+* [hugo import](/commands/hugo_import/) - Import your site from others.
+* [hugo list](/commands/hugo_list/) - Listing out various types of content
+* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
+* [hugo new](/commands/hugo_new/) - Create new content for your site
+* [hugo server](/commands/hugo_server/) - A high performance webserver
+* [hugo version](/commands/hugo_version/) - Print Hugo version and environment info
+
--- /dev/null
+---
+title: "hugo completion"
+slug: hugo_completion
+url: /commands/hugo_completion/
+---
+## hugo completion
+
+Generate the autocompletion script for the specified shell
+
+### Synopsis
+
+Generate the autocompletion script for hugo for the specified shell.
+See each sub-command's help for details on how to use the generated script.
+
+
+### Options
+
+```
+ -h, --help help for completion
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo](/commands/hugo/) - hugo builds your site
+* [hugo completion bash](/commands/hugo_completion_bash/) - Generate the autocompletion script for bash
+* [hugo completion fish](/commands/hugo_completion_fish/) - Generate the autocompletion script for fish
+* [hugo completion powershell](/commands/hugo_completion_powershell/) - Generate the autocompletion script for powershell
+* [hugo completion zsh](/commands/hugo_completion_zsh/) - Generate the autocompletion script for zsh
+
--- /dev/null
+---
+title: "hugo completion bash"
+slug: hugo_completion_bash
+url: /commands/hugo_completion_bash/
+---
+## hugo completion bash
+
+Generate the autocompletion script for bash
+
+### Synopsis
+
+Generate the autocompletion script for the bash shell.
+
+This script depends on the 'bash-completion' package.
+If it is not installed already, you can install it via your OS's package manager.
+
+To load completions in your current shell session:
+
+ source <(hugo completion bash)
+
+To load completions for every new session, execute once:
+
+#### Linux:
+
+ hugo completion bash > /etc/bash_completion.d/hugo
+
+#### macOS:
+
+ hugo completion bash > $(brew --prefix)/etc/bash_completion.d/hugo
+
+You will need to start a new shell for this setup to take effect.
+
+
+```
+hugo completion bash
+```
+
+### Options
+
+```
+ -h, --help help for bash
+ --no-descriptions disable completion descriptions
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell
+
--- /dev/null
+---
+title: "hugo completion fish"
+slug: hugo_completion_fish
+url: /commands/hugo_completion_fish/
+---
+## hugo completion fish
+
+Generate the autocompletion script for fish
+
+### Synopsis
+
+Generate the autocompletion script for the fish shell.
+
+To load completions in your current shell session:
+
+ hugo completion fish | source
+
+To load completions for every new session, execute once:
+
+ hugo completion fish > ~/.config/fish/completions/hugo.fish
+
+You will need to start a new shell for this setup to take effect.
+
+
+```
+hugo completion fish [flags]
+```
+
+### Options
+
+```
+ -h, --help help for fish
+ --no-descriptions disable completion descriptions
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell
+
--- /dev/null
+---
+title: "hugo completion powershell"
+slug: hugo_completion_powershell
+url: /commands/hugo_completion_powershell/
+---
+## hugo completion powershell
+
+Generate the autocompletion script for powershell
+
+### Synopsis
+
+Generate the autocompletion script for powershell.
+
+To load completions in your current shell session:
+
+ hugo completion powershell | Out-String | Invoke-Expression
+
+To load completions for every new session, add the output of the above command
+to your powershell profile.
+
+
+```
+hugo completion powershell [flags]
+```
+
+### Options
+
+```
+ -h, --help help for powershell
+ --no-descriptions disable completion descriptions
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell
+
--- /dev/null
+---
+title: "hugo completion zsh"
+slug: hugo_completion_zsh
+url: /commands/hugo_completion_zsh/
+---
+## hugo completion zsh
+
+Generate the autocompletion script for zsh
+
+### Synopsis
+
+Generate the autocompletion script for the zsh shell.
+
+If shell completion is not already enabled in your environment you will need
+to enable it. You can execute the following once:
+
+ echo "autoload -U compinit; compinit" >> ~/.zshrc
+
+To load completions in your current shell session:
+
+ source <(hugo completion zsh)
+
+To load completions for every new session, execute once:
+
+#### Linux:
+
+ hugo completion zsh > "${fpath[1]}/_hugo"
+
+#### macOS:
+
+ hugo completion zsh > $(brew --prefix)/share/zsh/site-functions/_hugo
+
+You will need to start a new shell for this setup to take effect.
+
+
+```
+hugo completion zsh [flags]
+```
+
+### Options
+
+```
+ -h, --help help for zsh
+ --no-descriptions disable completion descriptions
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell
+
--- /dev/null
+---
+title: "hugo config mounts"
+slug: hugo_config_mounts
+url: /commands/hugo_config_mounts/
+---
+## hugo config mounts
+
+Print the configured file mounts
+
+```
+hugo config mounts [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for mounts
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo config](/commands/hugo_config/) - Print the site configuration
+
--- /dev/null
+---
+title: "hugo convert toJSON"
+slug: hugo_convert_toJSON
+url: /commands/hugo_convert_tojson/
+---
+## hugo convert toJSON
+
+Convert front matter to JSON
+
+### Synopsis
+
+toJSON converts all front matter in the content directory
+to use JSON for the front matter.
+
+```
+hugo convert toJSON [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for toJSON
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ -o, --output string filesystem path to write files to
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ --unsafe enable less safe operations, please backup first
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
+
--- /dev/null
+---
+title: "hugo convert toTOML"
+slug: hugo_convert_toTOML
+url: /commands/hugo_convert_totoml/
+---
+## hugo convert toTOML
+
+Convert front matter to TOML
+
+### Synopsis
+
+toTOML converts all front matter in the content directory
+to use TOML for the front matter.
+
+```
+hugo convert toTOML [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for toTOML
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ -o, --output string filesystem path to write files to
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ --unsafe enable less safe operations, please backup first
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
+
--- /dev/null
+---
+title: "hugo convert toYAML"
+slug: hugo_convert_toYAML
+url: /commands/hugo_convert_toyaml/
+---
+## hugo convert toYAML
+
+Convert front matter to YAML
+
+### Synopsis
+
+toYAML converts all front matter in the content directory
+to use YAML for the front matter.
+
+```
+hugo convert toYAML [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for toYAML
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ -o, --output string filesystem path to write files to
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ --unsafe enable less safe operations, please backup first
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
+
--- /dev/null
+---
+title: "hugo env"
+slug: hugo_env
+url: /commands/hugo_env/
+---
+## hugo env
+
+Print Hugo version and environment info
+
+### Synopsis
+
+Print Hugo version and environment info. This is useful in Hugo bug reports
+
+```
+hugo env [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for env
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo](/commands/hugo/) - hugo builds your site
+
--- /dev/null
+---
+title: "hugo gen"
+slug: hugo_gen
+url: /commands/hugo_gen/
+---
+## hugo gen
+
+A collection of several useful generators.
+
+```
+hugo gen [command] [flags]
+```
+
+### Options
+
+```
+ -h, --help help for gen
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo](/commands/hugo/) - hugo builds your site
+* [hugo gen chromastyles](/commands/hugo_gen_chromastyles/) - Generate CSS stylesheet for the Chroma code highlighter
+* [hugo gen doc](/commands/hugo_gen_doc/) - Generate Markdown documentation for the Hugo CLI.
+* [hugo gen man](/commands/hugo_gen_man/) - Generate man pages for the Hugo CLI
+
--- /dev/null
+---
+title: "hugo gen chromastyles"
+slug: hugo_gen_chromastyles
+url: /commands/hugo_gen_chromastyles/
+---
+## hugo gen chromastyles
+
+Generate CSS stylesheet for the Chroma code highlighter
+
+### Synopsis
+
+Generate CSS stylesheet for the Chroma code highlighter for a given style. This stylesheet is needed if markup.highlight.noClasses is disabled in config.
+
+See https://xyproto.github.io/splash/docs/all.html for a preview of the available styles
+
+```
+hugo gen chromastyles [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for chromastyles
+ --highlightStyle string style used for highlighting lines (see https://github.com/alecthomas/chroma) (default "bg:#ffffcc")
+ --linesStyle string style used for line numbers (see https://github.com/alecthomas/chroma)
+ --style string highlighter style (see https://xyproto.github.io/splash/docs/) (default "friendly")
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
+
--- /dev/null
+---
+title: "hugo gen doc"
+slug: hugo_gen_doc
+url: /commands/hugo_gen_doc/
+---
+## hugo gen doc
+
+Generate Markdown documentation for the Hugo CLI.
+
+### Synopsis
+
+Generate Markdown documentation for the Hugo CLI.
+ This command is, mostly, used to create up-to-date documentation
+ of Hugo's command-line interface for https://gohugo.io/.
+
+ It creates one Markdown file per command with front matter suitable
+ for rendering in Hugo.
+
+```
+hugo gen doc [flags] [args]
+```
+
+### Options
+
+```
+ --dir string the directory to write the doc. (default "/tmp/hugodoc/")
+ -h, --help help for doc
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
+
--- /dev/null
+---
+title: "hugo gen man"
+slug: hugo_gen_man
+url: /commands/hugo_gen_man/
+---
+## hugo gen man
+
+Generate man pages for the Hugo CLI
+
+### Synopsis
+
+This command automatically generates up-to-date man pages of Hugo's
+ command-line interface. By default, it creates the man page files
+ in the "man" directory under the current directory.
+
+```
+hugo gen man [flags] [args]
+```
+
+### Options
+
+```
+ --dir string the directory to write the man pages. (default "man/")
+ -h, --help help for man
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
+
--- /dev/null
+---
+title: "hugo import"
+slug: hugo_import
+url: /commands/hugo_import/
+---
+## hugo import
+
+Import your site from others.
+
+### Synopsis
+
+Import your site from other web site generators like Jekyll.
+
+Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_path`.
+
+```
+hugo import [command] [flags]
+```
+
+### Options
+
+```
+ -h, --help help for import
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo](/commands/hugo/) - hugo builds your site
+* [hugo import jekyll](/commands/hugo_import_jekyll/) - hugo import from Jekyll
+
--- /dev/null
+---
+title: "hugo import jekyll"
+slug: hugo_import_jekyll
+url: /commands/hugo_import_jekyll/
+---
+## hugo import jekyll
+
+hugo import from Jekyll
+
+### Synopsis
+
+hugo import from Jekyll.
+
+Import from Jekyll requires two paths, e.g. `hugo import jekyll jekyll_root_path target_path`.
+
+```
+hugo import jekyll [flags] [args]
+```
+
+### Options
+
+```
+ --force allow import into non-empty target directory
+ -h, --help help for jekyll
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo import](/commands/hugo_import/) - Import your site from others.
+
--- /dev/null
+---
+title: "hugo list all"
+slug: hugo_list_all
+url: /commands/hugo_list_all/
+---
+## hugo list all
+
+List all posts
+
+### Synopsis
+
+List all of the posts in your content directory, include drafts, future and expired pages.
+
+```
+hugo list all [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for all
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo list](/commands/hugo_list/) - Listing out various types of content
+
--- /dev/null
+---
+title: "hugo list drafts"
+slug: hugo_list_drafts
+url: /commands/hugo_list_drafts/
+---
+## hugo list drafts
+
+List all drafts
+
+### Synopsis
+
+List all of the drafts in your content directory.
+
+```
+hugo list drafts [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for drafts
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo list](/commands/hugo_list/) - Listing out various types of content
+
--- /dev/null
+---
+title: "hugo list expired"
+slug: hugo_list_expired
+url: /commands/hugo_list_expired/
+---
+## hugo list expired
+
+List all posts already expired
+
+### Synopsis
+
+List all of the posts in your content directory which has already expired.
+
+```
+hugo list expired [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for expired
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo list](/commands/hugo_list/) - Listing out various types of content
+
--- /dev/null
+---
+title: "hugo list future"
+slug: hugo_list_future
+url: /commands/hugo_list_future/
+---
+## hugo list future
+
+List all posts dated in the future
+
+### Synopsis
+
+List all of the posts in your content directory which will be posted in the future.
+
+```
+hugo list future [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for future
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo list](/commands/hugo_list/) - Listing out various types of content
+
--- /dev/null
+---
+title: "hugo mod clean"
+slug: hugo_mod_clean
+url: /commands/hugo_mod_clean/
+---
+## hugo mod clean
+
+Delete the Hugo Module cache for the current project.
+
+### Synopsis
+
+Delete the Hugo Module cache for the current project.
+
+```
+hugo mod clean [flags] [args]
+```
+
+### Options
+
+```
+ --all clean entire module cache
+ -h, --help help for clean
+ --pattern string pattern matching module paths to clean (all if not set), e.g. "**hugo*"
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
+
--- /dev/null
+---
+title: "hugo mod get"
+slug: hugo_mod_get
+url: /commands/hugo_mod_get/
+---
+## hugo mod get
+
+Resolves dependencies in your current Hugo Project.
+
+### Synopsis
+
+
+Resolves dependencies in your current Hugo Project.
+
+Some examples:
+
+Install the latest version possible for a given module:
+
+ hugo mod get github.com/gohugoio/testshortcodes
+
+Install a specific version:
+
+ hugo mod get github.com/gohugoio/testshortcodes@v0.3.0
+
+Install the latest versions of all module dependencies:
+
+ hugo mod get -u
+ hugo mod get -u ./... (recursive)
+
+Run "go help get" for more information. All flags available for "go get" is also relevant here.
+
+Note that Hugo will always start out by resolving the components defined in the site
+configuration, provided by a _vendor directory (if no --ignoreVendorPaths flag provided),
+Go Modules, or a folder inside the themes directory, in that order.
+
+See https://gohugo.io/hugo-modules/ for more information.
+
+
+
+```
+hugo mod get [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for get
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
+
--- /dev/null
+---
+title: "hugo mod graph"
+slug: hugo_mod_graph
+url: /commands/hugo_mod_graph/
+---
+## hugo mod graph
+
+Print a module dependency graph.
+
+### Synopsis
+
+Print a module dependency graph with information about module status (disabled, vendored).
+Note that for vendored modules, that is the version listed and not the one from go.mod.
+
+
+```
+hugo mod graph [flags] [args]
+```
+
+### Options
+
+```
+ --clean delete module cache for dependencies that fail verification
+ -h, --help help for graph
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
+
--- /dev/null
+---
+title: "hugo mod init"
+slug: hugo_mod_init
+url: /commands/hugo_mod_init/
+---
+## hugo mod init
+
+Initialize this project as a Hugo Module.
+
+### Synopsis
+
+Initialize this project as a Hugo Module.
+ It will try to guess the module path, but you may help by passing it as an argument, e.g:
+
+ hugo mod init github.com/gohugoio/testshortcodes
+
+ Note that Hugo Modules supports multi-module projects, so you can initialize a Hugo Module
+ inside a subfolder on GitHub, as one example.
+
+
+```
+hugo mod init [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for init
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
+
--- /dev/null
+---
+title: "hugo mod npm"
+slug: hugo_mod_npm
+url: /commands/hugo_mod_npm/
+---
+## hugo mod npm
+
+Various npm helpers.
+
+### Synopsis
+
+Various npm (Node package manager) helpers.
+
+```
+hugo mod npm [command] [flags]
+```
+
+### Options
+
+```
+ -h, --help help for npm
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
+* [hugo mod npm pack](/commands/hugo_mod_npm_pack/) - Experimental: Prepares and writes a composite package.json file for your project.
+
--- /dev/null
+---
+title: "hugo mod npm pack"
+slug: hugo_mod_npm_pack
+url: /commands/hugo_mod_npm_pack/
+---
+## hugo mod npm pack
+
+Experimental: Prepares and writes a composite package.json file for your project.
+
+### Synopsis
+
+Prepares and writes a composite package.json file for your project.
+
+On first run it creates a "package.hugo.json" in the project root if not already there. This file will be used as a template file
+with the base dependency set.
+
+This set will be merged with all "package.hugo.json" files found in the dependency tree, picking the version closest to the project.
+
+This command is marked as 'Experimental'. We think it's a great idea, so it's not likely to be
+removed from Hugo, but we need to test this out in "real life" to get a feel of it,
+so this may/will change in future versions of Hugo.
+
+
+```
+hugo mod npm pack [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for pack
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo mod npm](/commands/hugo_mod_npm/) - Various npm helpers.
+
--- /dev/null
+---
+title: "hugo mod tidy"
+slug: hugo_mod_tidy
+url: /commands/hugo_mod_tidy/
+---
+## hugo mod tidy
+
+Remove unused entries in go.mod and go.sum.
+
+```
+hugo mod tidy [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for tidy
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
+
--- /dev/null
+---
+title: "hugo mod vendor"
+slug: hugo_mod_vendor
+url: /commands/hugo_mod_vendor/
+---
+## hugo mod vendor
+
+Vendor all module dependencies into the _vendor directory.
+
+### Synopsis
+
+Vendor all module dependencies into the _vendor directory.
+ If a module is vendored, that is where Hugo will look for it's dependencies.
+
+
+```
+hugo mod vendor [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for vendor
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
+
--- /dev/null
+---
+title: "hugo mod verify"
+slug: hugo_mod_verify
+url: /commands/hugo_mod_verify/
+---
+## hugo mod verify
+
+Verify dependencies.
+
+### Synopsis
+
+Verify checks that the dependencies of the current module, which are stored in a local downloaded source cache, have not been modified since being downloaded.
+
+```
+hugo mod verify [flags] [args]
+```
+
+### Options
+
+```
+ --clean delete module cache for dependencies that fail verification
+ -h, --help help for verify
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
+
--- /dev/null
+---
+title: "hugo version"
+slug: hugo_version
+url: /commands/hugo_version/
+---
+## hugo version
+
+Print Hugo version and environment info
+
+### Synopsis
+
+Print Hugo version and environment info. This is useful in Hugo bug reports.
+
+```
+hugo version [flags] [args]
+```
+
+### Options
+
+```
+ -h, --help help for version
+```
+
+### Options inherited from parent commands
+
+```
+ --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
+ --config string config file (default is hugo.yaml|json|toml)
+ --configDir string config dir (default "config")
+ --debug debug output
+ -d, --destination string filesystem path to write files to
+ -e, --environment string build environment
++ --format string preferred file format (toml, yaml or json) (default "toml")
+ --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
+ --log enable Logging
+ --logFile string log File path (if set, logging enabled automatically)
+ --quiet build in quiet mode
+ -s, --source string filesystem path to read files relative from
+ --themesDir string filesystem path to themes directory
+ -v, --verbose verbose output
+ --verboseLog verbose logging
+```
+
+### SEE ALSO
+
+* [hugo](/commands/hugo/) - hugo builds your site
+
--- /dev/null
- The behavior can, since Hugo 0.45, be configured in `config.toml`:
+---
+title: Links and Cross References
+linkTitle: Links and Cross References
+description: Shortcodes for creating links to documents.
+categories: [content management]
+keywords: ["cross references","references", "anchors", "urls"]
+menu:
+ docs:
+ parent: content-management
+ weight: 170
+toc: true
+weight: 170
+aliases: [/extras/crossreferences/]
+---
+
+The `ref` and `relref` shortcodes display the absolute and relative permalinks to a document, respectively.
+
+## Use of `ref` and `relref`
+
+The `ref` and `relref` shortcodes require a single parameter: the path to a content document, with or without a file extension, with or without an anchor. Paths without a leading `/` are first resolved relative to the current page, then to the remainder of the site.
+
+```
+.
+└── content
+ ├── about
+ | ├── _index.md
+ | └── credits.md
+ ├── pages
+ | ├── document1.md
+ | └── document2.md // has anchor #anchor
+ ├── products
+ | └── index.md
+ └── blog
+ └── my-post.md
+```
+
+The pages can be referenced as follows:
+
+
+```text
+{{</* ref "document2" */>}} // <- From pages/document1.md, relative path
+{{</* ref "document2#anchor" */>}}
+{{</* ref "document2.md" */>}}
+{{</* ref "document2.md#anchor" */>}}
+{{</* ref "#anchor" */>}} // <- From pages/document2.md
+{{</* ref "/blog/my-post" */>}} // <- From anywhere, absolute path
+{{</* ref "/blog/my-post.md" */>}}
+{{</* relref "document" */>}}
+{{</* relref "document.md" */>}}
+{{</* relref "#anchor" */>}}
+{{</* relref "/blog/my-post.md" */>}}
+```
+
+index.md can be reference either by its path or by its containing folder without the ending `/`. \_index.md can be referenced only by its containing folder:
+
+```text
+{{</* ref "/about" */>}} // <- References /about/_index.md
+{{</* ref "/about/_index" */>}} // Raises REF_NOT_FOUND error
+{{</* ref "/about/credits.md" */>}} // <- References /about/credits.md
+
+{{</* ref "/products" */>}} // <- References /products/index.md
+{{</* ref "/products/index" */>}} // <- References /products/index.md
+```
+
+To generate a hyperlink using `ref` or `relref` in markdown:
+
+```text
+[About]({{</* ref "/about" */>}} "About Us")
+```
+
+Hugo emits an error or warning if a document cannot be uniquely resolved. The error behavior is configurable; see below.
+
+### Link to another language version
+
+To link to another language version of a document, use this syntax:
+
+```go-html-template
+{{</* relref path="document.md" lang="ja" */>}}
+```
+
+### Get another Output Format
+
+To link to another Output Format of a document, use this syntax:
+
+```go-html-template
+{{</* relref path="document.md" outputFormat="rss" */>}}
+```
+
+### Heading IDs
+
+When using Markdown document types, Hugo generates element IDs for every heading on a page. For example:
+
+```md
+## Reference
+```
+
+produces this HTML:
+
+```html
+<h2 id="reference">Reference</h2>
+```
+
+Get the permalink to a heading by appending the ID to the path when using the `ref` or `relref` shortcodes:
+
+```go-html-template
+{{</* ref "document.md#reference" */>}}
+{{</* relref "document.md#reference" */>}}
+```
+
+Generate a custom heading ID by including an attribute. For example:
+
+```md
+## Reference A {#foo}
+## Reference B {id="bar"}
+```
+
+produces this HTML:
+
+```html
+<h2 id="foo">Reference A</h2>
+<h2 id="bar">Reference B</h2>
+```
+
+Hugo will generate unique element IDs if the same heading appears more than once on a page. For example:
+
+```md
+## Reference
+## Reference
+## Reference
+```
+
+produces this HTML:
+
+```html
+<h2 id="reference">Reference</h2>
+<h2 id="reference-1">Reference</h2>
+<h2 id="reference-2">Reference</h2>
+```
+
+## Ref and RelRef Configuration
+
++The behavior can, since Hugo 0.45, be configured in `hugo.toml`:
+
+refLinksErrorLevel ("ERROR")
+: When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
+
+refLinksNotFoundURL
+: URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
+
+
+[lists]: /templates/lists/
+[output formats]: /templates/output-formats/
+[shortcode]: /content-management/shortcodes/
--- /dev/null
- 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.
+---
+title: Front Matter
+description: Hugo allows you to add front matter in yaml, toml, or json to your content files.
+categories: [content management]
+keywords: ["front matter", "yaml", "toml", "json", "metadata", "archetypes"]
+menu:
+ docs:
+ parent: content-management
+ weight: 60
+toc: true
+weight: 60
+aliases: [/content/front-matter/]
+---
+
+**Front matter** allows you to keep metadata attached to an instance of a [content type]---i.e., embedded inside a content file---and is one of the many features that gives Hugo its strength.
+
+{{< youtube Yh2xKRJGff4 >}}
+
+## Front Matter Formats
+
+Hugo supports four formats for front matter, each with their own identifying tokens.
+
+TOML
+: identified by opening and closing `+++`.
+
+YAML
+: identified by opening and closing `---`.
+
+JSON
+: a single JSON object surrounded by '`{`' and '`}`', followed by a new line.
+
+ORG
+: a group of Org mode keywords in the format '`#+KEY: VALUE`'. Any line that does not start with `#+` ends the front matter section.
+ Keyword values can be either strings (`#+KEY: VALUE`) or a whitespace separated list of strings (`#+KEY[]: VALUE_1 VALUE_2`).
+
+### Example
+
+{{< code-toggle >}}
+title = "spf13-vim 3.0 release and new website"
+description = "spf13-vim is a cross platform distribution of vim plugins and resources for Vim."
+tags = [ ".vimrc", "plugins", "spf13-vim", "vim" ]
+date = "2012-04-06"
+categories = [
+ "Development",
+ "VIM"
+]
+slug = "spf13-vim-3-0-release-and-new-website"
+{{< /code-toggle >}}
+
+## Front Matter Variables
+
+### Predefined
+
+There are a few predefined variables that Hugo is aware of. See [Page Variables][pagevars] for how to call many of these predefined variables in your templates.
+
+aliases
+: An array of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure . See [Aliases][aliases] for details.
+
+audio
+: An array of paths to audio files related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:audio`.
+
+cascade
+: A map of front matter keys whose values are passed down to the page's descendants unless overwritten by self or a closer ancestor's cascade. See [Front Matter Cascade](#front-matter-cascade) for details.
+
+date
+: The datetime assigned to this page. This is usually fetched from the `date` field in front matter, but this behavior is configurable.
+
+description
+: The description for the content.
+
+draft
+: If `true`, the content will not be rendered unless the `--buildDrafts` flag is passed to the `hugo` command.
+
+expiryDate
+: The datetime at which the content should no longer be published by Hugo; expired content will not be rendered unless the `--buildExpired` flag is passed to the `hugo` command.
+
+headless
+: If `true`, sets a leaf bundle to be [headless][headless-bundle].
+
+images
+: An array of paths to images related to the page; used by [internal templates](/templates/internal) such as `_internal/twitter_cards.html`.
+
+isCJKLanguage
+: If `true`, Hugo will explicitly treat the content as a CJK language; both `.Summary` and `.WordCount` work properly in CJK languages.
+
+keywords
+: The meta keywords for the content.
+
+layout
+: The layout Hugo should select from the [lookup order][lookup] when rendering the content. If a `type` is not specified in the front matter, Hugo will look for the layout of the same name in the layout directory that corresponds with a content's section. See [Content Types][content type].
+
+lastmod
+: The datetime at which the content was last modified.
+
+linkTitle
+: 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].
+
+publishDate
+: If in the future, content will not be rendered unless the `--buildFuture` flag is passed to `hugo`.
+
+resources
+: Used for configuring page bundle resources. See [Page Resources][page-resources].
+
+series
+: An array of series this page belongs to, as a subset of the `series` [taxonomy](/content-management/taxonomies/); used by the `opengraph` [internal template](/templates/internal) to populate `og:see_also`.
+
+slug
+: Overrides the last segment of the URL path. Not applicable to section pages. See [URL Management](/content-management/urls/#slug) for details.
+
+summary
+: Text used when providing a summary of the article in the `.Summary` page variable; details available in the [content-summaries](/content-management/summaries/) section.
+
+title
+: The title for the content.
+
+type
+: The type of the content; this value will be automatically derived from the directory (i.e., the [section]) if not specified in front matter.
+
+url
+: Overrides the entire URL path. Applicable to regular pages and section pages. See [URL Management](/content-management/urls/#url) for details.
+
+videos
+: An array of paths to videos related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:video`.
+
+weight
+: used for [ordering your content in lists][ordering]. Lower weight gets higher precedence. So content with lower weight will come first. If set, weights should be non-zero, as 0 is interpreted as an *unset* weight.
+
+\<taxonomies\>
+: Field name of the *plural* form of the index. See `tags` and `categories` in the above front matter examples. *Note that the plural form of user-defined taxonomies cannot be the same as any of the predefined front matter variables.*
+
+{{% note %}}
++If neither `slug` nor `url` is present and [permalinks are not configured otherwise in your site configuration file](/content-management/urls/#permalinks), Hugo will use the 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 %}}
+
+### User-Defined
+
+You can add fields to your front matter arbitrarily to meet your needs. These user-defined key-values are placed into a single `.Params` variable for use in your templates.
+
+The following fields can be accessed via `.Params.include_toc` and `.Params.show_comments`, respectively. The [Variables] section provides more information on using Hugo's page- and site-level variables in your templates.
+
+{{< code-toggle copy=false >}}
+include_toc: true
+show_comments: false
+{{</ code-toggle >}}
+
+## Front Matter Cascade
+
+Any node or section can pass down to descendants a set of Front Matter values as long as defined underneath the reserved `cascade` Front Matter key.
+
+### Target Specific Pages
+
+The `cascade` block can be a slice with a optional `_target` keyword, allowing for multiple `cascade` values targeting different page sets.
+
+{{< code-toggle copy=false >}}
+title ="Blog"
+[[cascade]]
+background = "yosemite.jpg"
+[cascade._target]
+path="/blog/**"
+lang="en"
+kind="page"
+[[cascade]]
+background = "goldenbridge.jpg"
+[cascade._target]
+kind="section"
+{{</ code-toggle >}}
+
+Keywords available for `_target`:
+
+path
+: A [Glob](https://github.com/gobwas/glob) pattern matching the content path below /content. Expects Unix-styled slashes. Note that this is the virtual path, so it starts at the mount root. The matching supports double-asterisks so you can match for patterns like `/blog/*/**` to match anything from the third level and down.
+
+kind
+: A Glob pattern matching the Page's Kind(s), e.g. "{home,section}".
+
+lang
+: A Glob pattern matching the Page's language, e.g. "{en,sv}".
+
+environment
+: A Glob pattern matching the build environment, e.g. "{production,development}"
+
+Any of the above can be omitted.
+
+### Example
+
+In `content/blog/_index.md`
+
+{{< code-toggle copy=false >}}
+title: Blog
+cascade:
+ banner: images/typewriter.jpg
+{{</ code-toggle >}}
+
+With the above example the Blog section page and its descendants will return `images/typewriter.jpg` when `.Params.banner` is invoked unless:
+
+- Said descendant has its own `banner` value set
+- Or a closer ancestor node has its own `cascade.banner` value set.
+
+## Order Content Through Front Matter
+
+You can assign content-specific `weight` in the front matter of your content. These values are especially useful for [ordering][ordering] in list views. You can use `weight` for ordering of content and the convention of [`<TAXONOMY>_weight`][taxweight] for ordering content within a taxonomy. See [Ordering and Grouping Hugo Lists][lists] to see how `weight` can be used to organize your content in list views.
+
+## Override Global Markdown Configuration
+
+It's possible to set some options for Markdown rendering in a content's front matter as an override to the [Rendering options set in your project configuration][config].
+
+## Front Matter Format Specs
+
+- [TOML Spec][toml]
+- [YAML Spec][yaml]
+- [JSON Spec][json]
+
+[variables]: /variables/
+[aliases]: /content-management/urls/#aliases
+[archetype]: /content-management/archetypes/
+[bylinktitle]: /templates/lists/#by-link-title
+[config]: /getting-started/configuration/ "Hugo documentation for site configuration"
+[content type]: /content-management/types/
+[contentorg]: /content-management/organization/
+[headless-bundle]: /content-management/page-bundles/#headless-bundle
+[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf "Specification for JSON, JavaScript Object Notation"
+[lists]: /templates/lists/#order-content "See how to order content in list pages; for example, templates that look to specific _index.md for content and front matter."
+[lookup]: /templates/lookup-order/ "Hugo traverses your templates in a specific order when rendering content to allow for DRYer templating."
+[ordering]: /templates/lists/ "Hugo provides multiple ways to sort and order your content in list templates"
+[outputs]: /templates/output-formats/ "With the release of v22, you can output your content to any text format using Hugo's familiar templating"
+[page-resources]: /content-management/page-resources/
+[pagevars]: /variables/page/
+[section]: /content-management/sections/
+[taxweight]: /content-management/taxonomies/
+[toml]: https://github.com/toml-lang/toml "Specification for TOML, Tom's Obvious Minimal Language"
+[urls]: /content-management/urls/
+[variables]: /variables/
+[yaml]: https://yaml.org/spec/ "Specification for YAML, YAML Ain't Markup Language"
--- /dev/null
- {{< code-toggle file="config" copy=true >}}
+---
+title: Image Processing
+description: Resize, crop, rotate, filter, and convert images.
+categories: [content management]
+keywords: [resources, images]
+menu:
+ docs:
+ parent: content-management
+ weight: 90
+toc: true
+weight: 90
+---
+## Image Resources
+
+To process an image, you must access the image as either a page resource or a global resource.
+
+### Page Resources
+
+A page resource is a file within a [page bundle]. A page bundle is a directory with an `index.md` or `_index.md` file at its root.
+
+```text
+content/
+└── posts/
+ └── post-1/ <-- page bundle
+ ├── index.md
+ └── sunset.jpg <-- page resource
+```
+
+### Global Resources
+
+A global resource is a file:
+
+- Within the `assets` directory, or
+- Within any directory [mounted] to the `assets` directory, or
+- Located on a remote server accessible via `http` or `https`
+
+```text
+assets/
+└── images/
+ └── sunset.jpg <-- global resource
+```
+
+To access a local image as a global resource:
+
+```go-html-template
+{{ $image := resources.Get "images/sunset.jpg" }}
+```
+
+To access a remote image as a global resource:
+
+```go-html-template
+{{ $image := resources.GetRemote "https://gohugo.io/img/hugo-logo.png" }}
+```
+
+## Image Rendering
+
+Once you have accessed an image as either a page resource or a global resource, render it in your templates using the `Permalink`, `RelPermalink`, `Width`, and `Height` properties.
+
+Example 1: Throws an error if the resource is not found.
+
+```go-html-template
+{{ $image := .Resources.GetMatch "sunset.jpg" }}
+<img src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}">
+```
+
+Example 2: Skips image rendering if the resource is not found.
+
+```go-html-template
+{{ $image := .Resources.GetMatch "sunset.jpg" }}
+{{ with $image }}
+ <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
+{{ end }}
+```
+
+Example 3: A more concise way to skip image rendering if the resource is not found.
+
+```go-html-template
+{{ with .Resources.GetMatch "sunset.jpg" }}
+ <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
+{{ end }}
+```
+
+## Image Processing Methods
+
+The `image` resource implements the [`Resize`], [`Fit`], [`Fill`], [`Crop`], [`Filter`], [`Colors`] and [`Exif`] methods.
+
+{{% note %}}
+Metadata (Exif, IPTC, XMP, etc.) is not preserved during image transformation. Use the [`Exif`] method with the _original_ image to extract Exif metadata from JPEG or TIFF images.
+{{% /note %}}
+
+### Resize
+
+Resize an image to the specified width and/or height.
+
+If you specify both width and height, the resulting image will be disproportionally scaled unless the original image has the same aspect ratio.
+
+```go-html-template
+{{/* Resize to a width of 600px and preserve aspect ratio */}}
+{{ $image := $image.Resize "600x" }}
+
+{{/* Resize to a height of 400px and preserve aspect ratio */}}
+{{ $image := $image.Resize "x400" }}
+
+{{/* Resize to a width of 600px and a height of 400px */}}
+{{ $image := $image.Resize "600x400" }}
+```
+
+### Fit
+
+Downscale an image to fit the given dimensions while maintaining aspect ratio. You must provide both width and height.
+
+```go-html-template
+{{ $image := $image.Fit "600x400" }}
+```
+
+### Fill
+
+Crop and resize an image to match the given dimensions. You must provide both width and height. Use the [`anchor`] option to change the crop box anchor point.
+
+```go-html-template
+{{ $image := $image.Fill "600x400" }}
+```
+
+### Crop
+
+Crop an image to match the given dimensions without resizing. You must provide both width and height. Use the [`anchor`] option to change the crop box anchor point.
+
+```go-html-template
+{{ $image := $image.Crop "600x400" }}
+```
+
+### Filter
+
+Apply one or more [filters] to an image.
+
+```go-html-template
+{{ $image := $image.Filter (images.GaussianBlur 6) (images.Pixelate 8) }}
+```
+
+Write this in a more functional style using pipes. Hugo applies the filters in the order given.
+
+```go-html-template
+{{ $image := $image | images.Filter (images.GaussianBlur 6) (images.Pixelate 8) }}
+```
+
+Sometimes it can be useful to create the filter chain once and then reuse it.
+
+```go-html-template
+{{ $filters := slice (images.GaussianBlur 6) (images.Pixelate 8) }}
+{{ $image1 := $image1.Filter $filters }}
+{{ $image2 := $image2.Filter $filters }}
+```
+
+### Colors
+
+{{< new-in "0.104.0" >}}
+
+`.Colors` returns a slice of hex strings with the dominant colors in the image using a simple histogram method.
+
+```go-html-template
+{{ $colors := $image.Colors }}
+```
+
+This method is fast, but if you also scale down your images, it would be good for performance to extract the colors from the scaled down image.
+
+
+### Exif
+
+Provides an [Exif] object containing image metadata.
+
+You may access Exif data in JPEG and TIFF images. To prevent errors when processing images without Exif data, wrap the access in a [`with`] statement.
+
+```go-html-template
+{{ with $image.Exif }}
+ Date: {{ .Date }}
+ Lat/Long: {{ .Lat }}/{{ .Long }}
+ Tags:
+ {{ range $k, $v := .Tags }}
+ TAG: {{ $k }}: {{ $v }}
+ {{ end }}
+{{ end }}
+```
+
+You may also access Exif fields individually, using the [`lang.FormatNumber`] function to format the fields as needed.
+
+```go-html-template
+{{ with $image.Exif }}
+ <ul>
+ {{ with .Date }}<li>Date: {{ .Format "January 02, 2006" }}</li>{{ end }}
+ {{ with .Tags.ApertureValue }}<li>Aperture: {{ lang.FormatNumber 2 . }}</li>{{ end }}
+ {{ with .Tags.BrightnessValue }}<li>Brightness: {{ lang.FormatNumber 2 . }}</li>{{ end }}
+ {{ with .Tags.ExposureTime }}<li>Exposure Time: {{ . }}</li>{{ end }}
+ {{ with .Tags.FNumber }}<li>F Number: {{ . }}</li>{{ end }}
+ {{ with .Tags.FocalLength }}<li>Focal Length: {{ . }}</li>{{ end }}
+ {{ with .Tags.ISOSpeedRatings }}<li>ISO Speed Ratings: {{ . }}</li>{{ end }}
+ {{ with .Tags.LensModel }}<li>Lens Model: {{ . }}</li>{{ end }}
+ </ul>
+{{ end }}
+```
+
+#### Exif Variables
+
+.Date
+: Image creation date/time. Format with the [time.Format] function.
+
+.Lat
+: GPS latitude in degrees.
+
+.Long
+: GPS longitude in degrees.
+
+.Tags
+: A collection of the available Exif tags for this image. You may include or exclude specific tags from this collection in the [site configuration](#exif-data).
+
+## Image Processing Options
+
+The [`Resize`], [`Fit`], [`Fill`], and [`Crop`] methods accept a space-separated, case-insensitive list of options. The order of the options within the list is irrelevant.
+
+### Dimensions
+
+With the [`Resize`] method you must specify width, height, or both. The [`Fit`], [`Fill`], and [`Crop`] methods require both width and height. All dimensions are in pixels.
+
+```go-html-template
+{{ $image := $image.Resize "600x" }}
+{{ $image := $image.Resize "x400" }}
+{{ $image := $image.Resize "600x400" }}
+{{ $image := $image.Fit "600x400" }}
+{{ $image := $image.Fill "600x400" }}
+{{ $image := $image.Crop "600x400" }}
+```
+
+### Rotation
+
+Rotates an image counter-clockwise by the given angle. Hugo performs rotation _before_ scaling. For example, if the original image is 600x400 and you wish to rotate the image 90 degrees counter-clockwise while scaling it by 50%:
+
+```go-html-template
+{{ $image = $image.Resize "200x r90" }}
+```
+
+In the example above, the width represents the desired width _after_ rotation.
+
+To rotate an image without scaling, use the dimensions of the original image:
+
+```go-html-template
+{{ with .Resources.GetMatch "sunset.jpg" }}
+ {{ with .Resize (printf "%dx%d r90" .Height .Width) }}
+ <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
+ {{ end }}
+{{ end }}
+```
+
+In the example above, on the second line, we have reversed width and height to reflect the desired dimensions _after_ rotation.
+
+### Anchor
+
+When using the [`Crop`] or [`Fill`] method, the _anchor_ determines the placement of the crop box. You may specify `TopLeft`, `Top`, `TopRight`, `Left`, `Center`,`Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`.
+
+The default value is `Smart`, which uses [Smartcrop] image analysis to determine the optimal placement of the crop box. You may override the default value in the [site configuration].
+
+For example, if you have a 400x200 image with a bird in the upper left quadrant, you can create a 200x100 thumbnail containing the bird:
+
+```go-html-template
+{{ $image.Crop "200x100 TopLeft" }}
+```
+
+If you apply [rotation](#rotation) when using the [`Crop`] or [`Fill`] method, specify the anchor relative to the rotated image.
+
+### Target Format
+
+By default, Hugo encodes the image in the source format. You may convert the image to another format by specifying `bmp`, `gif`, `jpeg`, `jpg`, `png`, `tif`, `tiff`, or `webp`.
+
+```go-html-template
+{{ $image.Resize "600x webp" }}
+```
+
+To convert an image without scaling, use the dimensions of the original image:
+
+```go-html-template
+{{ with .Resources.GetMatch "sunset.jpg" }}
+ {{ with .Resize (printf "%dx%d webp" .Width .Height) }}
+ <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
+ {{ end }}
+{{ end }}
+```
+
+### Quality
+
+Applicable to JPEG and WebP images, the `q` value determines the quality of the converted image. Higher values produce better quality images, while lower values produce smaller files. Set this value to a whole number between 1 and 100, inclusive.
+
+The default value is 75. You may override the default value in the [site configuration].
+
+```go-html-template
+{{ $image.Resize "600x webp q50" }}
+```
+
+### Hint
+
+<!-- Specifies a libwebp preset, not a libwebp image hint. -->
+
+Applicable to WebP images, this option corresponds to a set of predefined encoding parameters.
+
+Value|Example
+:--|:--
+`drawing`|Hand or line drawing with high-contrast details
+`icon`|Small colorful image
+`photo`|Outdoor photograph with natural lighting
+`picture`|Indoor photograph such as a portrait
+`text`|Image that is primarily text
+
+The default value is `photo`. You may override the default value in the [site configuration].
+
+```go-html-template
+{{ $image.Resize "600x webp picture" }}
+```
+
+### Background Color
+
+When converting an image from a format that supports transparency (e.g., PNG) to a format that does _not_ support transparency (e.g., JPEG), you may specify the background color of the resulting image.
+
+Use either a 3-digit or a 6-digit hexadecimal color code (e.g., `#00f` or `#0000ff`).
+
+The default value is `#ffffff` (white). You may override the default value in the [site configuration].
+
+```go-html-template
+{{ $image.Resize "600x jpg #b31280" }}
+```
+
+### Resampling Filter
+
+You may specify the resampling filter used when resizing an image. Commonly used resampling filters include:
+
+Filter|Description
+:--|:--
+`Box`|Simple and fast averaging filter appropriate for downscaling
+`Lanczos`|High-quality resampling filter for photographic images yielding sharp results
+`CatmullRom`|Sharp cubic filter that is faster than the Lanczos filter while providing similar results
+`MitchellNetravali`|Cubic filter that produces smoother results with less ringing artifacts than CatmullRom
+`Linear`|Bilinear resampling filter, produces smooth output, faster than cubic filters
+`NearestNeighbor`|Fastest resampling filter, no antialiasing
+
+The default value is `Box`. You may override the default value in the [site configuration].
+
+```go-html-template
+{{ $image.Resize "600x400 Lanczos" }}
+```
+
+See [github.com/disintegration/imaging] for the complete list of resampling filters. If you wish to improve image quality at the expense of performance, you may wish to experiment with the alternative filters.
+
+## Image Processing Examples
+
+_The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_
+
+{{< imgproc sunset Resize "300x" />}}
+
+{{< imgproc sunset Fill "90x120 left" />}}
+
+{{< imgproc sunset Fill "90x120 right" />}}
+
+{{< imgproc sunset Fit "90x90" />}}
+
+{{< imgproc sunset Crop "250x250 center" />}}
+
+{{< imgproc sunset Resize "300x q10" />}}
+
+This is the shortcode used to generate the examples above:
+
+{{< code file="layouts/shortcodes/imgproc.html" >}}
+{{< readfile file="layouts/shortcodes/imgproc.html" >}}
+{{< /code >}}
+
+Call the shortcode from your Markdown like this:
+
+```go-html-template
+{{</* imgproc sunset Resize "300x" /*/>}}
+```
+
+{{% note %}}
+Note the self-closing shortcode syntax above. You may call the `imgproc` shortcode with or without **inner content**.
+{{% /note %}}
+
+## Imaging Configuration
+
+### Processing Options
+
+Define an `imaging` section in your site configuration to set the default [image processing options](#image-processing-options).
+
- {{< code-toggle file="config" copy=true >}}
++{{< code-toggle file="hugo" copy=true >}}
+[imaging]
+resampleFilter = "Box"
+quality = 75
+hint = "photo"
+anchor = "Smart"
+bgColor = "#ffffff"
+{{< /code-toggle >}}
+
+anchor
+: See image processing options: [anchor](#anchor).
+
+bgColor
+: See image processing options: [background color](#background-color).
+
+hint
+: See image processing options: [hint](#hint).
+
+quality
+: See image processing options: [quality](#quality).
+
+resampleFilter
+: See image processing options: [resampling filter](#resampling-filter).
+
+### Exif Data
+
+Define an `imaging.exif` section in your site configuration to control the availability of Exif data.
+
++{{< code-toggle file="hugo" copy=true >}}
+[imaging.exif]
+includeFields = ""
+excludeFields = ""
+disableDate = false
+disableLatLong = false
+{{< /code-toggle >}}
+
+disableDate
+: Hugo extracts the image creation date/time into `.Date`. Set this to `true` to disable. Default is `false`.
+
+disableLatLong
+: Hugo extracts the GPS latitude and longitude into `.Lat` and `.Long`. Set this to `true` to disable. Default is `false`.
+
+excludeFields
+: Regular expression matching the Exif tags to exclude from the `.Tags` collection. Default is `""`.
+
+includeFields
+: Regular expression matching the Exif tags to include in the `.Tags` collection. Default is `""`. To include all available tags, set this value to `".*"`.
+
+{{% note %}}
+To improve performance and decrease cache size, if you set neither `excludeFields` nor `includeFields`, Hugo excludes the following tags: `ColorSpace`, `Contrast`, `Exif`, `Exposure[M|P|B]`, `Flash`, `GPS`, `JPEG`, `Metering`, `Resolution`, `Saturation`, `Sensing`, `Sharp`, and `WhiteBalance`.
+{{% /note %}}
+
+## Smart Cropping of Images
+
+By default, Hugo uses the [Smartcrop] library when cropping images with the `Crop` or`Fill` methods. You can set the anchor point manually, but in most cases the `Smart` option will make a good choice.
+
+Examples using the sunset image from above:
+
+{{< imgproc sunset Fill "200x200 smart" />}}
+
+{{< imgproc sunset Crop "200x200 smart" />}}
+
+## Image Processing Performance Consideration
+
+Hugo caches processed images in the `resources` directory. If you include this directory in source control, Hugo will not have to regenerate the images in a CI/CD workflow (e.g., GitHub Pages, GitLab Pages, Netlify, etc.). This results in faster builds.
+
+If you change image processing methods or options, or if you rename or remove images, the `resources` directory will contain unused images. To remove the unused images, perform garbage collection with:
+
+```bash
+hugo --gc
+```
+
+[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]: <https://github.com/disintegration/imaging#image-resizing>
+[Smartcrop]: <https://github.com/muesli/smartcrop#smartcrop>
+[Exif]: <https://en.wikipedia.org/wiki/Exif>
+[`Colors`]: #colors
+[`Crop`]: #crop
+[`Exif`]: #exif
+[`Fill`]: #fill
+[`Filter`]: #filter
+[`Fit`]: #fit
+[`Resize`]: #resize
+[site configuration]: #processing-options
+[`with`]: /functions/with/
--- /dev/null
- {{< code-toggle file="config" copy=false >}}
+---
+title: Menus
+description: Create menus by defining entries, localizing each entry, and rendering the resulting data structure.
+categories: [content management]
+keywords: [menus]
+menu:
+ docs:
+ parent: content-management
+ weight: 190
+toc: true
+weight: 190
+aliases: [/extras/menus/]
+---
+
+## Overview
+
+To create a menu for your site:
+
+1. Define the menu entries
+2. [Localize] each entry
+3. Render the menu with a [template]
+
+Create multiple menus, either flat or nested. For example, create a main menu for the header, and a separate menu for the footer.
+
+There are three ways to define menu entries:
+
+1. Automatically
+1. In front matter
+1. In site configuration
+
+{{% note %}}
+Although you can use these methods in combination when defining a menu, the menu will be easier to conceptualize and maintain if you use one method throughout the site.
+{{% /note %}}
+
+## Define automatically
+
+To automatically define menu entries for each top-level section of your site, enable the section pages menu in your site configuration.
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+sectionPagesMenu = "main"
+{{< /code-toggle >}}
+
+This creates a menu structure that you can access with `site.Menus.main` in your templates. See [menu templates] for details.
+
+## Define in front matter
+
+To add a page to the "main" menu:
+
+{{< code-toggle file="content/about.md" copy=false fm=true >}}
+title = 'About'
+menu = 'main'
+{{< /code-toggle >}}
+
+Access the entry with `site.Menus.main` in your templates. See [menu templates] for details.
+
+To add a page to the "main" and "footer" menus:
+
+{{< code-toggle file="content/contact.md" copy=false fm=true >}}
+title = 'Contact'
+menu = ['main','footer']
+{{< /code-toggle >}}
+
+Access the entry with `site.Menus.main` and `site.Menus.footer` in your templates. See [menu templates] for details.
+
+### Properties {#properties-front-matter}
+
+Use these properties when defining menu entries in front matter:
+
+identifier
+: (`string`) Required when two or more menu entries have the same `name`, or when localizing the `name` using translation tables. Must start with a letter, followed by letters, digits, or underscores.
+
+name
+: (`string`) The text to display when rendering the menu entry.
+
+params
+: (`map`) User-defined properties for the menu entry.
+
+parent
+: (`string`) The `identifier` of the parent menu entry. If `identifier` is not defined, use `name`. Required for child entries in a nested menu.
+
+post
+: (`string`) The HTML to append when rendering the menu entry.
+
+pre
+: (`string`) The HTML to prepend when rendering the menu entry.
+
+title
+: (`string`) The HTML `title` attribute of the rendered menu entry.
+
+weight
+: (`int`) A non-zero integer indicating the entry's position relative the root of the menu, or to its parent for a child entry. Lighter entries float to the top, while heavier entries sink to the bottom.
+
+### Example {#example-front-matter}
+
+This front matter menu entry demonstrates some of the available properties:
+
+{{< code-toggle file="content/products/software.md" copy=false fm=true >}}
+title = 'Software'
+[menu.main]
+parent = 'Products'
+weight = 20
+pre = '<i class="fa-solid fa-code"></i>'
+[menu.main.params]
+class = 'center'
+{{< /code-toggle >}}
+
+Access the entry with `site.Menus.main` in your templates. See [menu templates] for details.
+
+
+## Define in site configuration
+
+To define entries for the "main" menu:
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+[[menu.main]]
+name = 'Home'
+pageRef = '/'
+weight = 10
+
+[[menu.main]]
+name = 'Products'
+pageRef = '/products'
+weight = 20
+
+[[menu.main]]
+name = 'Services'
+pageRef = '/services'
+weight = 30
+{{< /code-toggle >}}
+
+This creates a menu structure that you can access with `site.Menus.main` in your templates. See [menu templates] for details.
+
+To define entries for the "footer" menu:
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" 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="hugo" 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 = '<i class="fa fa-heart"></i>'
+url = 'https://gohugo.io/'
+weight = 30
+[menu.main.params]
+rel = 'external'
+{{< /code-toggle >}}
+
+This creates a menu structure that you can access with `site.Menus.main` in your templates. See [menu templates] for details.
+
+## Localize
+
+Hugo provides two methods to localize your menu entries. See [multilingual].
+
+## Render
+
+See [menu templates].
+
+[localize]: /content-management/multilingual/#menus
+[menu templates]: /templates/menu-templates/
+[multilingual]: /content-management/multilingual/#menus
+[template]: /templates/menu-templates/
--- /dev/null
- {{< code-toggle file="config" >}}
+---
+title: Multilingual Mode
+linkTitle: Multilingual
+description: Hugo supports the creation of websites with multiple languages side by side.
+categories: [content management]
+keywords: [multilingual,i18n, internationalization]
+menu:
+ docs:
+ parent: content-management
+ weight: 230
+toc: true
+weight: 230
+aliases: [/content/multilingual/,/tutorials/create-a-multilingual-site/]
+---
+
+You should define the available languages in a `languages` section in your site configuration.
+
+Also See [Hugo Multilingual Part 1: Content translation].
+
+## Configure Languages
+
+The following is an example of a site configuration for a multilingual Hugo project:
+
- 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.
++{{< code-toggle file="hugo" >}}
+defaultContentLanguage = "en"
+copyright = "Everything is mine"
+
+[params]
+[params.navigation]
+help = "Help"
+
+[languages]
+[languages.en]
+title = "My blog"
+weight = 1
+[languages.en.params]
+linkedin = "https://linkedin.com/whoever"
+
+[languages.fr]
+title = "Mon blogue"
+weight = 2
+[languages.fr.params]
+linkedin = "https://linkedin.com/fr/whoever"
+[languages.fr.params.navigation]
+help = "Aide"
+
+[languages.ar]
+title = "مدونتي"
+weight = 2
+languagedirection = "rtl"
+
+[languages.pt-pt]
+title = "O meu blog"
+weight = 3
+{{< /code-toggle >}}
+
+Anything not defined in a `languages` block will fall back to the global value for that key (e.g., `copyright` for the English `en` language). This also works for `params`, as demonstrated with `help` above: You will get the value `Aide` in French and `Help` in all the languages without this parameter set.
+
+With the configuration above, all content, sitemap, RSS feeds, pagination,
+and taxonomy pages will be rendered below `/` in English (your default content language) and then below `/fr` in French.
+
+When working with front matter `Params` in [single page templates], omit the `params` in the key for the translation.
+
+`defaultContentLanguage` sets the project's default language. If not set, the default language will be `en`.
+
+If the default language needs to be rendered below its own language code (`/en`) like the others, set `defaultContentLanguageInSubdir: true`.
+
+Only the obvious non-global options can be overridden per language. Examples of global options are `baseURL`, `buildDrafts`, etc.
+
+**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" >}}
+
- 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).
++In Hugo `v0.112.0` we consolidated all configuration options, and improved how the languages and their parameters are merged with the main configuration. But while testing this on Hugo sites out there, we received some error reports and reverted some of the changes in favor of deprecation warnings:
+
+1. `site.Language.Params` is deprecated. Use `site.Params` directly.
- 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:
++1. Adding custom params to the top level language config is deprecated, add all of these below `[params]`, see `color` in the example below.
+
+```toml
+title = "My blog"
+languageCode = "en-us"
+
+[languages]
+[languages.sv]
+title = "Min blogg"
+languageCode = "sv"
+[languages.en.params]
+color = "blue"
+```
+
- {{< code-toggle file="config" >}}
++In the example above, all settings except `color` below `params` map to predefined configuration options in Hugo for the site and its language, and should be accessed via the documented accessors:
+
+```
+{{ 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.
+
- If you have already a list of disabled languages in `config.toml`, you can enable them in development like this:
++{{< code-toggle file="hugo" >}}
+disableLanguages = ["fr", "ja"]
+{{< /code-toggle >}}
+
+Note that you cannot disable the default content language.
+
+We kept this as a standalone setting to make it easier to set via [OS environment]:
+
+```bash
+HUGO_DISABLELANGUAGES="fr ja" hugo
+```
+
- {{< code-toggle file="config" >}}
++If you have already a list of disabled languages in `hugo.toml`, you can enable them in development like this:
+
+```bash
+HUGO_DISABLELANGUAGES=" " hugo server
+```
+
+### Configure Multilingual Multihost
+
+From **Hugo 0.31** we support multiple languages in a multihost configuration. See [this issue](https://github.com/gohugoio/hugo/issues/4027) for details.
+
+This means that you can now configure a `baseURL` per `language`:
+
+{{% note %}}
+If a `baseURL` is set on the `language` level, then all languages must have one and they must all be different.
+{{% /note %}}
+
+Example:
+
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+[languages]
+[languages.fr]
+baseURL = "https://example.fr"
+languageName = "Français"
+weight = 1
+title = "En Français"
+
+[languages.en]
+baseURL = "https://example.com"
+languageName = "English"
+weight = 2
+title = "In English"
+{{</ code-toggle >}}
+
+With the above, the two sites will be generated into `public` with their own root:
+
+```text
+public
+├── en
+└── fr
+```
+
+**All URLs (i.e `.Permalink` etc.) will be generated from that root. So the English home page above will have its `.Permalink` set to `https://example.com/`.**
+
+When you run `hugo server` we will start multiple HTTP servers. You will typically see something like this in the console:
+
+```text
+Web Server is available at 127.0.0.1:1313 (bind address 127.0.0.1)
+Web Server is available at 127.0.0.1:1314 (bind address 127.0.0.1)
+Press Ctrl+C to stop
+```
+
+Live reload and `--navigateToChanged` between the servers work as expected.
+
+
+## Translate Your Content
+
+There are two ways to manage your content translations. Both ensure each page is assigned a language and is linked to its counterpart translations.
+
+### Translation by filename
+
+Considering the following example:
+
+1. `/content/about.en.md`
+2. `/content/about.fr.md`
+
+The first file is assigned the English language and is linked to the second.
+The second file is assigned the French language and is linked to the first.
+
+Their language is __assigned__ according to the language code added as a __suffix to the filename__.
+
+By having the same **path and base filename**, the content pieces are __linked__ together as translated pages.
+
+{{% note %}}
+If a file has no language code, it will be assigned the default language.
+{{% /note %}}
+
+### Translation by content directory
+
+This system uses different content directories for each of the languages. Each language's content directory is set using the `contentDir` param.
+
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+languages:
+ en:
+ weight: 10
+ languageName: "English"
+ contentDir: "content/english"
+ fr:
+ weight: 20
+ languageName: "Français"
+ contentDir: "content/french"
+{{< /code-toggle >}}
+
+The value of `contentDir` can be any valid path -- even absolute path references. The only restriction is that the content directories cannot overlap.
+
+Considering the following example in conjunction with the configuration above:
+
+1. `/content/english/about.md`
+2. `/content/french/about.md`
+
+The first file is assigned the English language and is linked to the second.
+The second file is assigned the French language and is linked to the first.
+
+Their language is __assigned__ according to the content directory they are __placed__ in.
+
+By having the same **path and basename** (relative to their language content directory), the content pieces are __linked__ together as translated pages.
+
+### Bypassing default linking
+
+Any pages sharing the same `translationKey` set in front matter will be linked as translated pages regardless of basename or location.
+
+Considering the following example:
+
+1. `/content/about-us.en.md`
+2. `/content/om.nn.md`
+3. `/content/presentation/a-propos.fr.md`
+
+{{< code-toggle >}}
+translationKey: "about"
+{{< /code-toggle >}}
+
+By setting the `translationKey` front matter param to `about` in all three pages, they will be __linked__ as translated pages.
+
+### Localizing permalinks
+
+Because paths and filenames are used to handle linking, all translated pages will share the same URL (apart from the language subdirectory).
+
+To localize URLs:
+
+- For a regular page, set either [`slug`] or [`url`] in front matter
+- For a section page, set [`url`] in front matter
+
+[`slug`]: /content-management/urls/#slug
+[`url`]: /content-management/urls/#url
+
+For example, a French translation can have its own localized slug.
+
+{{< code-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/` without affecting the translation link.
+
+### Page Bundles
+
+To avoid the burden of having to duplicate files, each Page Bundle inherits the resources of its linked translated pages' bundles except for the content files (Markdown files, HTML files etc...).
+
+Therefore, from within a template, the page will have access to the files from all linked pages' bundles.
+
+If, across the linked bundles, two or more files share the same basename, only one will be included and chosen as follows:
+
+* File from current language bundle, if present.
+* First file found across bundles by order of language `Weight`.
+
+{{% note %}}
+Page Bundle resources follow the same language assignment logic as content files, both by filename (`image.jpg`, `image.fr.jpg`) and by directory (`english/about/header.jpg`, `french/about/header.jpg`).
+{{%/ note %}}
+
+## Reference the Translated Content
+
+To create a list of links to translated content, use a template similar to the following:
+
+{{< code file="layouts/partials/i18nlist.html" >}}
+{{ if .IsTranslated }}
+<h4>{{ i18n "translations" }}</h4>
+<ul>
+ {{ range .Translations }}
+ <li>
+ <a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a>
+ </li>
+ {{ end }}
+</ul>
+{{ end }}
+{{< /code >}}
+
+The above can be put in a `partial` (i.e., inside `layouts/partials/`) and included in any template, whether a [single content page][contenttemplate] or the [homepage]. It will not print anything if there are no translations for a given page.
+
+The above also uses the [`i18n` function][i18func] described in the next section.
+
+### List All Available Languages
+
+`.AllTranslations` on a `Page` can be used to list all translations, including the page itself. On the home page it can be used to build a language navigator:
+
+{{< code file="layouts/partials/allLanguages.html" >}}
+<ul>
+{{ range $.Site.Home.AllTranslations }}
+<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
+{{ end }}
+</ul>
+{{< /code >}}
+
+## Translation of Strings
+
+Hugo uses [go-i18n] to support string translations. [See the project's source repository][go-i18n-source] to find tools that will help you manage your translation workflows.
+
+Translations are collected from the `themes/<THEME>/i18n/` folder (built into the theme), as well as translations present in `i18n/` at the root of your project. In the `i18n`, the translations will be merged and take precedence over what is in the theme folder. Language files should be named according to [RFC 5646] with names such as `en-US.toml`, `fr.toml`, etc.
+
+Artificial languages with private use subtags as defined in [RFC 5646 § 2.2.7](https://datatracker.ietf.org/doc/html/rfc5646#section-2.2.7) are also supported. You may omit the `art-x-` prefix for brevity. For example:
+
+```text
+art-x-hugolang
+hugolang
+```
+
+Private use subtags must not exceed 8 alphanumeric characters.
+
+### Query basic translation
+
+From within your templates, use the `i18n` function like this:
+
+```go-html-template
+{{ i18n "home" }}
+```
+
+The function will search for the `"home"` id:
+
+{{< code-toggle file="i18n/en-US" >}}
+[home]
+other = "Home"
+{{< /code-toggle >}}
+
+The result will be
+
+```text
+Home
+```
+
+### Query a flexible translation with variables
+
+Often you will want to use the page variables in the translation strings. To do so, pass the `.` context when calling `i18n`:
+
+```go-html-template
+{{ i18n "wordCount" . }}
+```
+
+The function will pass the `.` context to the `"wordCount"` id:
+
+{{< code-toggle file="i18n/en-US" >}}
+[wordCount]
+other = "This article has {{ .WordCount }} words."
+{{< /code-toggle >}}
+
+Assume `.WordCount` in the context has value is 101. The result will be:
+
+```text
+This article has 101 words.
+```
+
+### Query a singular/plural translation
+
+In other to meet singular/plural requirement, you must pass a dictionary (map) with a numeric `.Count` property to the `i18n` function. The below example uses `.ReadingTime` variable which has a built-in `.Count` property.
+
+```go-html-template
+{{ i18n "readingTime" .ReadingTime }}
+```
+
+The function will read `.Count` from `.ReadingTime` and evaluate whether the number is singular (`one`) or plural (`other`). After that, it will pass to `readingTime` id in `i18n/en-US.toml` file:
+
+{{< code-toggle file="i18n/en-US" >}}
+[readingTime]
+one = "One minute to read"
+other = "{{ .Count }} minutes to read"
+{{< /code-toggle >}}
+
+Assuming `.ReadingTime.Count` in the context has value is 525600. The result will be:
+
+```text
+525600 minutes to read
+```
+
+If `.ReadingTime.Count` in the context has value is 1. The result is:
+
+```text
+One minute to read
+```
+
+In case you need to pass a custom data: (`(dict "Count" numeric_value_only)` is minimum requirement)
+
+```go-html-template
+{{ i18n "readingTime" (dict "Count" 25 "FirstArgument" true "SecondArgument" false "Etc" "so on, so far") }}
+```
+
+## Localization
+
+The following localization examples assume your site's primary language is English, with translations to French and German.
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" >}}
+defaultContentLanguage = 'en'
+
+[languages]
+[languages.en]
+contentDir = 'content/en'
+languageName = 'English'
+weight = 1
+[languages.fr]
+contentDir = 'content/fr'
+languageName = 'Français'
+weight = 2
+[languages.de]
+contentDir = 'content/de'
+languageName = 'Deutsch'
+weight = 3
+
+{{< /code-toggle >}}
+
+### Dates
+
+With this front matter:
+
+{{< code-toggle >}}
+date = 2021-11-03T12:34:56+01:00
+{{< /code-toggle >}}
+
+And this template code:
+
+```go-html-template
+{{ .Date | time.Format ":date_full" }}
+```
+
+The rendered page displays:
+
+Language|Value
+:--|:--
+English|Wednesday, November 3, 2021
+Français|mercredi 3 novembre 2021
+Deutsch|Mittwoch, 3. November 2021
+
+See [time.Format] for details.
+
+### Currency
+
+With this template code:
+
+```go-html-template
+{{ 512.5032 | lang.FormatCurrency 2 "USD" }}
+```
+
+The rendered page displays:
+
+Language|Value
+:--|:--
+English|$512.50
+Français|512,50 $US
+Deutsch|512,50 $
+
+See [lang.FormatCurrency] and [lang.FormatAccounting] for details.
+
+### Numbers
+
+With this template code:
+
+```go-html-template
+{{ 512.5032 | lang.FormatNumber 2 }}
+```
+
+The rendered page displays:
+
+Language|Value
+:--|:--
+English|512.50
+Français|512,50
+Deutsch|512,50
+
+See [lang.FormatNumber] and [lang.FormatNumberCustom] for details.
+
+### Percentages
+
+With this template code:
+
+```go-html-template
+{{ 512.5032 | lang.FormatPercent 2 }} ---> 512.50%
+```
+
+The rendered page displays:
+
+Language|Value
+:--|:--
+English|512.50%
+Français|512,50 %
+Deutsch|512,50 %
+
+See [lang.FormatPercent] for details.
+
+## Menus
+
+Localization of menu entries depends on the how you define them:
+
+- When you define menu entries [automatically] using the section pages menu, you must use translation tables to localize each entry.
+- When you define menu entries [in front matter], they are already localized based on the front matter itself. If the front matter values are insufficient, use translation tables to localize each entry.
+- 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.
+
+### Use translation tables
+
+When rendering the text that appears in menu each entry, the [example menu template] does this:
+
+```go-html-template
+{{ or (T .Identifier) .Name | safeHTML }}
+```
+
+It queries the translation table for the current language using the menu entry's `identifier` and returns the translated string. If the translation table does not exist, or if the `identifier` key is not present in the translation table, it falls back to `name`.
+
+The `identifier` depends on how you define menu entries:
+
+- If you define the menu entry [automatically] using the section pages menu, the `identifier` is the page's `.Section`.
+- If you define the menu entry [in site configuration] or [in front matter], set the `identifier` property to the desired value.
+
+For example, if you define menu entries in site configuration:
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+[[menu.main]]
+ identifier = 'products'
+ name = 'Products'
+ pageRef = '/products'
+ weight = 10
+[[menu.main]]
+ identifier = 'services'
+ name = 'Services'
+ pageRef = '/services'
+ weight = 20
+{{< / code-toggle >}}
+
+Create corresponding entries in the translation tables:
+
+{{< 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="hugo" copy=false >}}
+[languages.de]
+languageCode = 'de-DE'
+languageName = 'Deutsch'
+weight = 1
+
+[[languages.de.menu.main]]
+name = 'Produkte'
+pageRef = '/products'
+weight = 10
+
+[[languages.de.menu.main]]
+name = 'Leistungen'
+pageRef = '/services'
+weight = 20
+
+[languages.en]
+languageCode = 'en-US'
+languageName = 'English'
+weight = 2
+
+[[languages.en.menu.main]]
+name = 'Products'
+pageRef = '/products'
+weight = 10
+
+[[languages.en.menu.main]]
+name = 'Services'
+pageRef = '/services'
+weight = 20
+{{< /code-toggle >}}
+
+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
+
+If a string does not have a translation for the current language, Hugo will use the value from the default language. If no default value is set, an empty string will be shown.
+
+While translating a Hugo website, it can be handy to have a visual indicator of missing translations. The [`enableMissingTranslationPlaceholders` configuration option][config] will flag all untranslated strings with the placeholder `[i18n] identifier`, where `identifier` is the id of the missing translation.
+
+{{% note %}}
+Hugo will generate your website with these missing translation placeholders. It might not be suitable for production environments.
+{{% /note %}}
+
+For merging of content from other languages (i.e. missing content translations), see [lang.Merge].
+
+To track down missing translation strings, run Hugo with the `--printI18nWarnings` flag:
+
+```bash
+hugo --printI18nWarnings | grep i18n
+i18n|MISSING_TRANSLATION|en|wordCount
+```
+
+## Multilingual Themes support
+
+To support Multilingual mode in your themes, some considerations must be taken for the URLs in the templates. If there is more than one language, URLs must meet the following criteria:
+
+* Come from the built-in `.Permalink` or `.RelPermalink`
+* Be constructed with the [`relLangURL` template function][rellangurl] or the [`absLangURL` template function][abslangurl] **OR** be prefixed with `{{ .LanguagePrefix }}`
+
+If there is more than one language defined, the `LanguagePrefix` variable will equal `/en` (or whatever your `CurrentLanguage` is). If not enabled, it will be an empty string (and is therefore harmless for single-language Hugo websites).
+
+
+## Generate multilingual content with `hugo new`
+
+If you organize content with translations in the same directory:
+
+```text
+hugo new post/test.en.md
+hugo new post/test.de.md
+```
+
+If you organize content with translations in different directories:
+
+```text
+hugo new content/en/post/test.md
+hugo new content/de/post/test.md
+```
+
+[abslangurl]: /functions/abslangurl
+[config]: /getting-started/configuration/
+[contenttemplate]: /templates/single-page-templates/
+[go-i18n-source]: https://github.com/nicksnyder/go-i18n
+[go-i18n]: https://github.com/nicksnyder/go-i18n
+[homepage]: /templates/homepage/
+[Hugo Multilingual Part 1: Content translation]: https://regisphilibert.com/blog/2018/08/hugo-multilingual-part-1-managing-content-translation/
+[i18func]: /functions/i18n/
+[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
+[rellangurl]: /functions/rellangurl
+[RFC 5646]: https://tools.ietf.org/html/rfc5646
+[single page templates]: /templates/single-page-templates/
+[time.Format]: /functions/dateformat
--- /dev/null
- : The subtype of the resource's MIME type. For example, a file of MIME type `application/pdf` has for SubType `pdf`. Note that this is not the same as the file extension - PowerPoint files have a subtype of `vnd.mspowerpoint`.
+---
+title: Page Resources
+description: Page resources -- images, other pages, documents, etc. -- have page-relative URLs and their own metadata.
+categories: [content management]
+keywords: [bundle,content,resources]
+menu:
+ docs:
+ parent: content-management
+ weight: 80
+toc: true
+weight: 80
+---
+Page resources are only accessible from [page bundles](/content-management/page-bundles), those directories with `index.md` or
+`_index.md` files at their root. Page resources are only available to the
+page with which they are bundled.
+
+In this example, `first-post` is a page bundle with access to 10 page resources including audio, data, documents, images, and video. Although `second-post` is also a page bundle, it has no page resources and is unable to directly access the page resources associated with `first-post`.
+
+```text
+content
+└── post
+ ├── first-post
+ │ ├── images
+ │ │ ├── a.jpg
+ │ │ ├── b.jpg
+ │ │ └── c.jpg
+ │ ├── index.md (root of page bundle)
+ │ ├── latest.html
+ │ ├── manual.json
+ │ ├── notice.md
+ │ ├── office.mp3
+ │ ├── pocket.mp4
+ │ ├── rating.pdf
+ │ └── safety.txt
+ └── second-post
+ └── index.md (root of page bundle)
+```
+
+## Properties
+
+ResourceType
+: The main type of the resource's [Media Type](/templates/output-formats/#media-types). For example, a file of MIME type `image/jpeg` has the ResourceType `image`. A `Page` will have `ResourceType` with value `page`.
+
+Name
+: Default value is the filename (relative to the owning page). Can be set in front matter.
+
+Title
+: Default value is the same as `.Name`. Can be set in front matter.
+
+Permalink
+: The absolute URL to the resource. Resources of type `page` will have no value.
+
+RelPermalink
+: The relative URL to the resource. Resources of type `page` will have no value.
+
+Content
+: The content of the resource itself. For most resources, this returns a string
+with the contents of the file. Use this to create inline resources.
+
+```go-html-template
+{{ with .Resources.GetMatch "script.js" }}
+ <script>{{ .Content | safeJS }}</script>
+{{ end }}
+
+{{ with .Resources.GetMatch "style.css" }}
+ <style>{{ .Content | safeCSS }}</style>
+{{ end }}
+
+{{ with .Resources.GetMatch "img.png" }}
+ <img src="data:{{ .MediaType }};base64,{{ .Content | base64Encode }}">
+{{ end }}
+```
+
+MediaType
+: The MIME type of the resource, such as `image/jpeg`.
+
+MediaType.MainType
+: The main type of the resource's MIME type. For example, a file of MIME type `application/pdf` has for MainType `application`.
+
+MediaType.SubType
++: The subtype of the resource's MIME type. For example, a file of MIME type `application/pdf` has for SubType `pdf`. Note that this is not the same as the file extension. For example, Microsoft PowerPoint files (`.ppt`) have a subtype of `vnd.ms-powerpoint`.
+
+MediaType.Suffixes
+: A slice of possible suffixes for the resource's MIME type.
+
+## Methods
+
+ByType
+: Returns the page resources of the given type.
+
+```go-html-template
+{{ .Resources.ByType "image" }}
+```
+Match
+: Returns all the page resources (as a slice) whose `Name` matches the given Glob pattern ([examples](https://github.com/gobwas/glob/blob/master/readme.md)). The matching is case-insensitive.
+
+```go-html-template
+{{ .Resources.Match "images/*" }}
+```
+
+GetMatch
+: Same as `Match` but will return the first match.
+
+### Pattern Matching
+
+```go
+// Using Match/GetMatch to find this images/sunset.jpg ?
+.Resources.Match "images/sun*" ✅
+.Resources.Match "**/sunset.jpg" ✅
+.Resources.Match "images/*.jpg" ✅
+.Resources.Match "**.jpg" ✅
+.Resources.Match "*" 🚫
+.Resources.Match "sunset.jpg" 🚫
+.Resources.Match "*sunset.jpg" 🚫
+
+```
+
+## Page Resources Metadata
+
+The page resources' metadata is managed from the corresponding page's front matter with an array/table parameter named `resources`. You can batch assign values using [wildcards](https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).
+
+{{% note %}}
+Resources of type `page` get `Title` etc. from their own front matter.
+{{% /note %}}
+
+name
+: Sets the value returned in `Name`.
+
+{{% note %}}
+The methods `Match`, `Get` and `GetMatch` use `Name` to match the resources.
+{{% /note %}}
+
+title
+: Sets the value returned in `Title`
+
+params
+: A map of custom key/values.
+
+### Resources metadata example
+
+{{< code-toggle copy=false >}}
+title: Application
+date : 2018-01-25
+resources :
+- src : "images/sunset.jpg"
+ name : "header"
+- src : "documents/photo_specs.pdf"
+ title : "Photo Specifications"
+ params:
+ icon : "photo"
+- src : "documents/guide.pdf"
+ title : "Instruction Guide"
+- src : "documents/checklist.pdf"
+ title : "Document Checklist"
+- src : "documents/payment.docx"
+ title : "Proof of Payment"
+- src : "**.pdf"
+ name : "pdf-file-:counter"
+ params :
+ icon : "pdf"
+- src : "**.docx"
+ params :
+ icon : "word"
+{{</ code-toggle >}}
+
+From the example above:
+
+- `sunset.jpg` will receive a new `Name` and can now be found with `.GetMatch "header"`.
+- `documents/photo_specs.pdf` will get the `photo` icon.
+- `documents/checklist.pdf`, `documents/guide.pdf` and `documents/payment.docx` will get `Title` as set by `title`.
+- Every `PDF` in the bundle except `documents/photo_specs.pdf` will get the `pdf` icon.
+- All `PDF` files will get a new `Name`. The `name` parameter contains a special placeholder [`:counter`](#the-counter-placeholder-in-name-and-title), so the `Name` will be `pdf-file-1`, `pdf-file-2`, `pdf-file-3`.
+- Every docx in the bundle will receive the `word` icon.
+
+{{% note %}}
+The __order matters__ --- Only the **first set** values of the `title`, `name` and `params`-**keys** will be used. Consecutive parameters will be set only for the ones not already set. In the above example, `.Params.icon` is first set to `"photo"` in `src = "documents/photo_specs.pdf"`. So that would not get overridden to `"pdf"` by the later set `src = "**.pdf"` rule.
+{{% /note %}}
+
+### The `:counter` placeholder in `name` and `title`
+
+The `:counter` is a special placeholder recognized in `name` and `title` parameters `resources`.
+
+The counter starts at 1 the first time they are used in either `name` or `title`.
+
+For example, if a bundle has the resources `photo_specs.pdf`, `other_specs.pdf`, `guide.pdf` and `checklist.pdf`, and the front matter has specified the `resources` as:
+
+{{< code-toggle copy=false >}}
+[[resources]]
+ src = "*specs.pdf"
+ title = "Specification #:counter"
+[[resources]]
+ src = "**.pdf"
+ name = "pdf-file-:counter"
+{{</ code-toggle >}}
+
+the `Name` and `Title` will be assigned to the resource files as follows:
+
+| Resource file | `Name` | `Title` |
+|-------------------|-------------------|-----------------------|
+| checklist.pdf | `"pdf-file-1.pdf` | `"checklist.pdf"` |
+| guide.pdf | `"pdf-file-2.pdf` | `"guide.pdf"` |
+| other\_specs.pdf | `"pdf-file-3.pdf` | `"Specification #1"` |
+| photo\_specs.pdf | `"pdf-file-4.pdf` | `"Specification #2"` |
--- /dev/null
- {{< code-toggle file="config" copy=false >}}
+---
+title: Related Content
+description: List related content in "See Also" sections.
+categories: [content management]
+keywords: [content]
+menu:
+ docs:
+ parent: content-management
+ weight: 110
+toc: true
+weight: 110
+aliases: [/content/related/,/related/]
+---
+
+Hugo uses a set of factors to identify a page's related content based on Front Matter parameters. This can be tuned to the desired set of indices and parameters or left to Hugo's default [Related Content configuration](#configure-related-content).
+
+## List Related Content
+
+To list up to 5 related pages (which share the same _date_ or _keyword_ parameters) is as simple as including something similar to this partial in your single page template:
+
+{{< code file="layouts/partials/related.html" >}}
+{{ $related := .Site.RegularPages.Related . | first 5 }}
+{{ with $related }}
+<h3>See Also</h3>
+<ul>
+ {{ range . }}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{ end }}
+</ul>
+{{ end }}
+{{< /code >}}
+
+The `Related` method takes one argument which may be a `Page` or a options map. The options map have these options:
+
+indices
+: The indices to search in.
+
+document
+: The document to search for related content for.
+
+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
+{{ $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 %}}
+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" >}}
++{{< code-toggle file="hugo" 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 }}
+ <h2>See Also</h2>
+ <ul>
+ {{ range $i, $p := . }}
+ <li>
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a>
+ {{ with .HeadingsFiltered }}
+ <ul>
+ {{ range . }}
+ {{ $link := printf "%s#%s" $p.RelPermalink .ID | safeURL }}
+ <li>
+ <a href="{{ $link }}">{{ .Title }}</a>
+ </li>
+ {{ end }}
+ </ul>
+ {{ end }}
+ </li>
+ {{ end }}
+ </ul>
+{{ end }}
+```
+
+## Configure Related Content
+
+Hugo provides a sensible default configuration of Related Content, but you can fine-tune this in your configuration, on the global or language level if needed.
+
+### Default configuration
+
+Without any `related` configuration set on the project, Hugo's Related Content methods will use the following.
+
++{{< code-toggle file="hugo" >}}
+related:
+ threshold: 80
+ includeNewer: false
+ toLower: false
+ indices:
+ - name: keywords
+ weight: 100
+ - name: date
+ weight: 10
+{{< /code-toggle >}}
+
+Note that if you have configured `tags` as a taxonomy, `tags` will also be added to the default configuration above with the weight of `80`.
+
+Custom configuration should be set using the same syntax.
+
+{{% note %}}
+If you add a `related` config section, you need to add a complete configuration. It is not possible to just set, say, `includeNewer` and use the rest from the Hugo defaults.
+{{% /note %}}
+
+### Top Level Config Options
+
+threshold
+: A value between 0-100. Lower value will give more, but maybe not so relevant, matches.
+
+includeNewer
+: Set to true to include **pages newer than the current page** in the related content listing. This will mean that the output for older posts may change as new related content gets added.
+
+toLower
+: Set to true to lower case keywords in both the indexes and the queries. This may give more accurate results at a slight performance penalty. Note that this can also be set per index.
+
+### Config Options per Index
+
+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.
+
+toLower
+: See above.
+
+## Performance Considerations
+
+**Fast is Hugo's middle name** and we would not have released this feature had it not been blistering fast.
+
+This feature has been in the back log and requested by many for a long time. The development got this recent kick start from this Twitter thread:
+
+{{< tweet user="scott_lowe" id="898398437527363585" >}}
+
+Scott S. Lowe removed the "Related Content" section built using the `intersect` template function on tags, and the build time dropped from 30 seconds to less than 2 seconds on his 1700 content page sized blog.
+
+He should now be able to add an improved version of that "Related Content" section without giving up the fast live-reloads. But it's worth noting that:
+
+* If you don't use any of the `Related` methods, you will not use the Relate Content feature, and performance will be the same as before.
+* Calling `.RegularPages.Related` etc. will create one inverted index, also sometimes named posting list, that will be reused for any lookups in that same page collection. Doing that in addition to, as an example, calling `.Pages.Related` will work as expected, but will create one additional inverted index. This should still be very fast, but worth having in mind, especially for bigger sites.
+
+{{% note %}}
+We currently do not index **Page content**. We thought we would release something that will make most people happy before we start solving [Sherlock's last case](https://github.com/joearms/sherlock).
+{{% /note %}}
--- /dev/null
- {{< code-toggle file=config copy=false >}}
+---
+title: Shortcodes
+description: Shortcodes are simple snippets inside your content files calling built-in or custom templates.
+categories: [content management]
+keywords: [markdown,content,shortcodes]
+menu:
+ docs:
+ parent: content-management
+ weight: 100
+toc: true
+weight: 100
+aliases: [/extras/shortcodes/]
+testparam: "Hugo Rocks!"
+---
+
+## What a Shortcode is
+
+Hugo loves Markdown because of its simple content format, but there are times when Markdown falls short. Often, content authors are forced to add raw HTML (e.g., video `<iframe>`'s) to Markdown content. We think this contradicts the beautiful simplicity of Markdown's syntax.
+
+Hugo created **shortcodes** to circumvent these limitations.
+
+A shortcode is a simple snippet inside a content file that Hugo will render using a predefined template. Note that shortcodes will not work in template files. If you need the type of drop-in functionality that shortcodes provide but in a template, you most likely want a [partial template][partials] instead.
+
+In addition to cleaner Markdown, shortcodes can be updated any time to reflect new classes, techniques, or standards. At the point of site generation, Hugo shortcodes will easily merge in your changes. You avoid a possibly complicated search and replace operation.
+
+## Use Shortcodes
+
+{{< youtube 2xkNJL4gJ9E >}}
+
+In your content files, a shortcode can be called by calling `{{%/* shortcodename parameters */%}}`. Shortcode parameters are space delimited, and parameters with internal spaces can be quoted.
+
+The first word in the shortcode declaration is always the name of the shortcode. Parameters follow the name. Depending upon how the shortcode is defined, the parameters may be named, positional, or both, although you can't mix parameter types in a single call. The format for named parameters models that of HTML with the format `name="value"`.
+
+Some shortcodes use or require closing shortcodes. Again like HTML, the opening and closing shortcodes match (name only) with the closing declaration, which is prepended with a slash.
+
+Here are two examples of paired shortcodes:
+
+```go-html-template
+{{%/* mdshortcode */%}}Stuff to `process` in the *center*.{{%/* /mdshortcode */%}}
+```
+
+```go-html-template
+{{</* highlight go */>}} A bunch of code here {{</* /highlight */>}}
+```
+
+The examples above use two different delimiters, the difference being the `%` character in the first and the `<>` characters in the second.
+
+### Shortcodes with raw string parameters
+
+You can pass multiple lines as parameters to a shortcode by using raw string literals:
+
+```go-html-template
+{{</* myshortcode `This is some <b>HTML</b>,
+and a new line with a "quoted string".` */>}}
+```
+
+### Shortcodes with Markdown
+
+In Hugo `0.55` we changed how the `%` delimiter works. Shortcodes using the `%` as the outer-most delimiter will now be fully rendered when sent to the content renderer. They can be part of the generated table of contents, footnotes, etc.
+
+If you want the old behavior, you can put the following line in the start of your shortcode template:
+
+```go-html-template
+{{ $_hugo_config := `{ "version": 1 }` }}
+```
+
+### Shortcodes Without Markdown
+
+The `<` character indicates that the shortcode's inner content does *not* need further rendering. Often shortcodes without Markdown include internal HTML:
+
+```go-html-template
+{{</* myshortcode */>}}<p>Hello <strong>World!</strong></p>{{</* /myshortcode */>}}
+```
+
+### Nested Shortcodes
+
+You can call shortcodes within other shortcodes by creating your own templates that leverage the `.Parent` variable. `.Parent` allows you to check the context in which the shortcode is being called. See [Shortcode templates][sctemps].
+
+## Use Hugo's Built-in Shortcodes
+
+Hugo ships with a set of predefined shortcodes that represent very common usage. These shortcodes are provided for author convenience and to keep your Markdown content clean.
+
+### `figure`
+
+`figure` is an extension of the image syntax in Markdown, which does not provide a shorthand for the more semantic [HTML5 `<figure>` element][figureelement].
+
+The `figure` shortcode can use the following named parameters:
+
+src
+: URL of the image to be displayed.
+
+link
+: If the image needs to be hyperlinked, URL of the destination.
+
+target
+: Optional `target` attribute for the URL if `link` parameter is set.
+
+rel
+: Optional `rel` attribute for the URL if `link` parameter is set.
+
+alt
+: Alternate text for the image if the image cannot be displayed.
+
+title
+: Image title.
+
+caption
+: Image caption. Markdown within the value of `caption` will be rendered.
+
+class
+: `class` attribute of the HTML `figure` tag.
+
+height
+: `height` attribute of the image.
+
+width
+: `width` attribute of the image.
+
+loading
+: `loading` attribute of the image.
+
+attr
+: Image attribution text. Markdown within the value of `attr` will be rendered.
+
+attrlink
+: If the attribution text needs to be hyperlinked, URL of the destination.
+
+#### Example `figure` Input
+
+{{< code file="figure-input-example.md" >}}
+{{</* figure src="elephant.jpg" title=">An elephant at sunset" */>}}
+{{< /code >}}
+
+#### Example `figure` Output
+
+```html
+<figure>
+ <img src="elephant.jpg">
+ <figcaption>An elephant at sunset</figcaption>
+</figure>
+```
+
+### `gist`
+
+To display a GitHub [gist] with this URL:
+
+[gist]: https://docs.github.com/en/get-started/writing-on-github/editing-and-sharing-content-with-gists
+
+```text
+https://gist.github.com/user/50a7482715eac222e230d1e64dd9a89b
+```
+
+Include this in your markdown:
+
+```text
+{{</* gist user 50a7482715eac222e230d1e64dd9a89b */>}}
+```
+
+This will display all files in the gist alphabetically by file name.
+
+{{< gist jmooring 50a7482715eac222e230d1e64dd9a89b >}}
+
+To display a specific file within the gist:
+
+```text
+{{</* gist user 50a7482715eac222e230d1e64dd9a89b 1-template.html */>}}
+```
+
+Rendered:
+
+{{< gist jmooring 50a7482715eac222e230d1e64dd9a89b 1-template.html >}}
+
+### `highlight`
+
+To display a highlighted code sample:
+
+```text
+{{</* highlight go-html-template */>}}
+{{ range .Pages }}
+ <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
+{{ end }}
+{{</* /highlight */>}}
+```
+
+Rendered:
+
+{{< highlight go-html-template >}}
+{{ range .Pages }}
+ <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
+{{ end }}
+{{< /highlight >}}
+
+To specify one or more [highlighting options], include a quotation-encapsulated, comma-separated list:
+
+[highlighting options]: /functions/highlight/
+
+```text
+{{</* highlight go-html-template "lineNos=inline, lineNoStart=42" */>}}
+{{ range .Pages }}
+ <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
+{{ end }}
+{{</* /highlight */>}}
+```
+
+Rendered:
+
+{{< highlight go-html-template "lineNos=inline, lineNoStart=42" >}}
+{{ range .Pages }}
+ <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
+{{ end }}
+{{< /highlight >}}
+
+### `instagram`
+
+The `instagram` shortcode uses Facebook's **oEmbed Read** feature. The Facebook [developer documentation] states:
+
+- This permission or feature requires successful completion of the App Review process before your app can access live data. [Learn More]
+- This permission or feature is only available with business verification. You may also need to sign additional contracts before your app can access data. [Learn More Here]
+
+[developer documentation]: https://developers.facebook.com/docs/features-reference/oembed-read
+[Learn More]: https://developers.facebook.com/docs/app-review
+[Learn More Here]: https://developers.facebook.com/docs/development/release/business-verification
+
+You must obtain an Access Token to use the `instagram` shortcode.
+
+If your site configuration is private:
+
++{{< code-toggle file="hugo" 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/
+```
+
+Include this in your markdown:
+
+```text
+{{</* instagram BWNjjyYFxVx */>}}
+```
+
+### `param`
+
+Gets a value from the current `Page's` params set in front matter, with a fallback to the site param value. It will log an `ERROR` if the param with the given key could not be found in either.
+
+```bash
+{{</* param testparam */>}}
+```
+
+Since `testparam` is a param defined in front matter of this page with the value `Hugo Rocks!`, the above will print:
+
+{{< param testparam >}}
+
+To access deeply nested params, use "dot syntax", e.g:
+
+```bash
+{{</* param "my.nested.param" */>}}
+```
+
+### `ref` and `relref`
+
+These shortcodes will look up the pages by their relative path (e.g., `blog/post.md`) or their logical name (`post.md`) and return the permalink (`ref`) or relative permalink (`relref`) for the found page.
+
+`ref` and `relref` also make it possible to make fragmentary links that work for the header links generated by Hugo.
+
+{{% note %}}
+Read a more extensive description of `ref` and `relref` in the [cross references](/content-management/cross-references/) documentation.
+{{% /note %}}
+
+`ref` and `relref` take exactly one required parameter of _reference_, quoted and in position `0`.
+
+#### Example `ref` and `relref` Input
+
+```go-html-template
+[Neat]({{</* ref "blog/neat.md" */>}})
+[Who]({{</* relref "about.md#who" */>}})
+```
+
+#### Example `ref` and `relref` Output
+
+Assuming that standard Hugo pretty URLs are turned on.
+
+```html
+<a href="https://example.com/blog/neat">Neat</a>
+<a href="/about/#who">Who</a>
+```
+
+### `tweet`
+
+To display a Twitter post with this URL:
+
+```txt
+https://twitter.com/SanDiegoZoo/status/1453110110599868418
+```
+
+Include this in your markdown:
+
+```text
+{{</* tweet user="SanDiegoZoo" id="1453110110599868418" */>}}
+```
+
+Rendered:
+
+{{< tweet user="SanDiegoZoo" id="1453110110599868418" >}}
+
+### `vimeo`
+
+To display a Vimeo video with this URL:
+
+```text
+https://vimeo.com/channels/staffpicks/55073825
+```
+
+Include this in your markdown:
+
+```text
+{{</* vimeo 55073825 */>}}
+```
+
+Rendered:
+
+{{< vimeo 55073825 >}}
+
+{{% note %}}
+If you want to further customize the visual styling of the YouTube or Vimeo output, add a `class` named parameter when calling the shortcode. The new `class` will be added to the `<div>` that wraps the `<iframe>` *and* will remove the inline styles. Note that you will need to call the `id` as a named parameter as well. You can also give the vimeo video a descriptive title with `title`.
+
+```go
+{{</* vimeo id="146022717" class="my-vimeo-wrapper-class" title="My vimeo video" */>}}
+```
+{{% /note %}}
+
+### `youtube`
+
+The `youtube` shortcode embeds a responsive video player for [YouTube videos]. Only the ID of the video is required, e.g.:
+
+```txt
+https://www.youtube.com/watch?v=w7Ft2ymGmfc
+```
+
+#### Example `youtube` Input
+
+Copy the YouTube video ID that follows `v=` in the video's URL and pass it to the `youtube` shortcode:
+
+{{< code file="example-youtube-input.md" >}}
+{{</* youtube w7Ft2ymGmfc */>}}
+{{< /code >}}
+
+Furthermore, you can automatically start playback of the embedded video by setting the `autoplay` parameter to `true`. Remember that you can't mix named and unnamed parameters, so you'll need to assign the yet unnamed video ID to the parameter `id`:
+
+
+{{< code file="example-youtube-input-with-autoplay.md" >}}
+{{</* youtube id="w7Ft2ymGmfc" autoplay="true" */>}}
+{{< /code >}}
+
+For [accessibility reasons](https://dequeuniversity.com/tips/provide-iframe-titles), it's best to provide a title for your YouTube video. You can do this using the shortcode by providing a `title` parameter. If no title is provided, a default of "YouTube Video" will be used.
+
+{{< code file="example-youtube-input-with-title.md" >}}
+{{</* youtube id="w7Ft2ymGmfc" title="A New Hugo Site in Under Two Minutes" */>}}
+{{< /code >}}
+
+#### Example `youtube` Output
+
+Using the preceding `youtube` example, the following HTML will be added to your rendered website's markup:
+
+{{< code file="example-youtube-output.html" >}}
+{{< youtube id="w7Ft2ymGmfc" autoplay="true" >}}
+{{< /code >}}
+
+#### Example `youtube` Display
+
+Using the preceding `youtube` example (without `autoplay="true"`), the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your style sheets and surrounding markup. The video is also include in the [Quick Start of the Hugo documentation][quickstart].
+
+{{< youtube w7Ft2ymGmfc >}}
+
+## Privacy Config
+
+To learn how to configure your Hugo site to meet the new EU privacy regulation, see [Hugo and the GDPR].
+
+## Create Custom Shortcodes
+
+To learn more about creating custom shortcodes, see the [shortcode template documentation].
+
+[`figure` shortcode]: #figure
+[contentmanagementsection]: /content-management/formats/
+[examplegist]: https://gist.github.com/spf13/7896402
+[figureelement]: https://html5doctor.com/the-figure-figcaption-elements/ "An article from HTML5 doctor discussing the fig and figcaption elements."
+[Hugo and the GDPR]: /about/hugo-and-gdpr/
+[Instagram]: https://www.instagram.com/
+[pagevariables]: /variables/page/
+[partials]: /templates/partials/
+[quickstart]: /getting-started/quick-start/
+[sctemps]: /templates/shortcode-templates/
+[scvars]: /variables/shortcodes/
+[shortcode template documentation]: /templates/shortcode-templates/
+[templatessection]: /templates/
+[Vimeo]: https://vimeo.com/
+[YouTube Videos]: https://www.youtube.com/
+[YouTube Input shortcode]: #youtube
--- /dev/null
- {{< code-toggle copy=false file="config" >}}
+---
+title: Static Files
+linkTitle: Static Files
+description: Files that get served **statically** (as-is, no modification) on the site root.
+categories: [content management]
+keywords: [source, directories]
+menu:
+ docs:
+ parent: content-management
+ weight: 200
+toc: true
+weight: 200
+aliases: [/static-files]
+---
+
+By default, the `static/` directory in the site project is used for
+all **static files** (e.g. stylesheets, JavaScript, images). The static files are served on the site root path (eg. if you have the file `static/image.png` you can access it using `http://{server-url}/image.png`, to include it in a document you can use ` )`.
+
+Hugo can be configured to look into a different directory, or even
+**multiple directories** for such static files by configuring the
+`staticDir` parameter in the [site config]. All the files in all the
+static directories will form a union filesystem.
+
+This union filesystem will be served from your site root. So a file
+`<SITE PROJECT>/static/me.png` will be accessible as
+`<MY_BASEURL>/me.png`.
+
+Here's an example of setting `staticDir` and `staticDir2` for a
+multi-language site:
+
++{{< code-toggle copy=false file="hugo" >}}
+staticDir = ["static1", "static2"]
+
+[languages]
+[languages.en]
+staticDir2 = "static_en"
+baseURL = "https://example.com"
+languageName = "English"
+weight = 2
+title = "In English"
+[languages.no]
+staticDir = ["staticDir_override", "static_no"]
+baseURL = "https://example.no"
+languageName = "Norsk"
+weight = 1
+title = "På norsk"
+{{</ code-toggle >}}
+
+In the above, with no theme used:
+
+- The English site will get its static files as a union of "static1",
+ "static2" and "static_en". On file duplicates, the right-most
+ version will win.
+- The Norwegian site will get its static files as a union of
+ "staticDir_override" and "static_no".
+
+Note 1
+: The **2** (can be a number between 0 and 10) in `staticDir2` is
+ added to tell Hugo that you want to **add** this directory to the
+ global set of static directories defined using `staticDir`. Using
+ `staticDir` on the language level would replace the global value (as
+ can be seen in the Norwegian site case).
+
+Note 2
+: The example above is a [multihost setup]. In a regular setup, all
+ the static directories will be available to all sites.
+
+[site config]: /getting-started/configuration/#all-configuration-settings
+[multihost setup]: /content-management/multilingual/#configure-multilingual-multihost
--- /dev/null
- {{< code-toggle file="config" copy=false >}}
+---
+title: Taxonomies
+description: Hugo includes support for user-defined taxonomies.
+keywords: [taxonomies,metadata,front matter,terms]
+categories: [content management]
+menu:
+ docs:
+ parent: content-management
+ weight: 150
+toc: true
+weight: 150
+aliases: [/taxonomies/overview/,/taxonomies/usage/,/indexes/overview/,/doc/indexes/,/extras/indexes]
+---
+
+## What is a Taxonomy?
+
+Hugo includes support for user-defined groupings of content called **taxonomies**. Taxonomies are classifications of logical relationships between content.
+
+### Definitions
+
+Taxonomy
+: a categorization that can be used to classify content
+
+Term
+: a key within the taxonomy
+
+Value
+: a piece of content assigned to a term
+
+
+## Example Taxonomy: Movie Website
+
+Let's assume you are making a website about movies. You may want to include the following taxonomies:
+
+* Actors
+* Directors
+* Studios
+* Genre
+* Year
+* Awards
+
+Then, in each of the movies, you would specify terms for each of these taxonomies (i.e., in the [front matter] of each of your movie content files). From these terms, Hugo would automatically create pages for each Actor, Director, Studio, Genre, Year, and Award, with each listing all of the Movies that matched that specific Actor, Director, Studio, Genre, Year, and Award.
+
+### Movie Taxonomy Organization
+
+To continue with the example of a movie site, the following demonstrates content relationships from the perspective of the taxonomy:
+
+```txt
+Actor <- Taxonomy
+ Bruce Willis <- Term
+ The Sixth Sense <- Value
+ Unbreakable <- Value
+ Moonrise Kingdom <- Value
+ Samuel L. Jackson <- Term
+ Unbreakable <- Value
+ The Avengers <- Value
+ xXx <- Value
+```
+
+From the perspective of the content, the relationships would appear differently, although the data and labels used are the same:
+
+```txt
+Unbreakable <- Value
+ Actors <- Taxonomy
+ Bruce Willis <- Term
+ Samuel L. Jackson <- Term
+ Director <- Taxonomy
+ M. Night Shyamalan <- Term
+ ...
+Moonrise Kingdom <- Value
+ Actors <- Taxonomy
+ Bruce Willis <- Term
+ Bill Murray <- Term
+ Director <- Taxonomy
+ Wes Anderson <- Term
+ ...
+```
+
+## Hugo Taxonomy Defaults {#default-taxonomies}
+
+Hugo natively supports taxonomies.
+
+Without adding a single line to your [site config][config] file, Hugo will automatically create taxonomies for `tags` and `categories`. That would be the same as manually [configuring your taxonomies](#configure-taxonomies) as below:
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+[taxonomies]
+ tag = "tags"
+ category = "categories"
+{{</ code-toggle >}}
+
+If you do not want Hugo to create any taxonomies, set `disableKinds` in your [site config][config] to the following:
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+disableKinds = ["taxonomy","term"]
+{{</ code-toggle >}}
+
+{{% page-kinds %}}
+
+### Default Destinations
+
+When taxonomies are used---and [taxonomy templates] are provided---Hugo will automatically create both a page listing all the taxonomy's terms and individual pages with lists of content associated with each term. For example, a `categories` taxonomy declared in your configuration and used in your content front matter will create the following pages:
+
+* A single page at `example.com/categories/` that lists all the [terms within the taxonomy]
+* [Individual taxonomy list pages][taxonomy templates] (e.g., `/categories/development/`) for each of the terms that shows a listing of all pages marked as part of that taxonomy within any content file's [front matter]
+
+## Configure Taxonomies
+
+Custom taxonomies other than the [defaults](#default-taxonomies) must be defined in your [site config][config] before they can be used throughout the site. You need to provide both the plural and singular labels for each taxonomy. For example, `singular key = "plural value"` for TOML and `singular key: "plural value"` for YAML.
+
+### Example: Adding a custom taxonomy named "series"
+
+{{% note %}}
+While adding custom taxonomies, you need to put in the default taxonomies too, _if you want to keep them_.
+{{% /note %}}
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+[taxonomies]
+ tag = "tags"
+ category = "categories"
+ series = "series"
+{{</ code-toggle >}}
+
+### Example: Removing default taxonomies
+
+If you want to have just the default `tags` taxonomy, and remove the `categories` taxonomy for your site, you can do so by modifying the `taxonomies` value in your [site config][config].
+
++{{< code-toggle file="hugo" copy=false >}}
+[taxonomies]
+ tag = "tags"
+{{</ code-toggle >}}
+
+If you want to disable all taxonomies altogether, see the use of `disableKinds` in [Hugo Taxonomy Defaults](#default-taxonomies).
+
+{{% note %}}
+You can add content and front matter to your taxonomy list and taxonomy terms pages. See [Content Organization](/content-management/organization/) for more information on how to add an `_index.md` for this purpose.
+
+Much like regular pages, taxonomy list [permalinks](/content-management/urls/) are configurable, but taxonomy term page permalinks are not.
+{{% /note %}}
+
+{{% note %}}
+The configuration option `preserveTaxonomyNames` was removed in Hugo 0.55.
+
+You can now use `.Page.Title` on the relevant taxonomy node to get the original value.
+{{% /note %}}
+
+## Add Taxonomies to Content
+
+Once a taxonomy is defined at the site level, any piece of content can be assigned to it, regardless of [content type] or [content section].
+
+Assigning content to a taxonomy is done in the [front matter]. Simply create a variable with the *plural* name of the taxonomy and assign all terms you want to apply to the instance of the content type.
+
+{{% note %}}
+If you would like the ability to quickly generate content files with preconfigured taxonomies or terms, read the docs on [Hugo archetypes](/content-management/archetypes/).
+{{% /note %}}
+
+### Example: Front Matter with Taxonomies
+
+{{< code-toggle file="content/example.md" fm=true copy=false >}}
+title = "Hugo: A fast and flexible static site generator"
+tags = [ "Development", "Go", "fast", "Blogging" ]
+categories = [ "Development" ]
+series = [ "Go Web Dev" ]
+slug = "hugo"
+project_url = "https://github.com/gohugoio/hugo"
+{{</ code-toggle >}}
+
+## Order Taxonomies
+
+A content file can assign weight for each of its associate taxonomies. Taxonomic weight can be used for sorting or ordering content in [taxonomy list templates] and is declared in a content file's [front matter]. The convention for declaring taxonomic weight is `taxonomyname_weight`.
+
+The following show a piece of content that has a weight of 22, which can be used for ordering purposes when rendering the pages assigned to the "a", "b" and "c" values of the `tags` taxonomy. It has also been assigned the weight of 44 when rendering the "d" category page.
+
+### Example: Taxonomic `weight`
+
+{{< code-toggle copy=false >}}
+title = "foo"
+tags = [ "a", "b", "c" ]
+tags_weight = 22
+categories = ["d"]
+categories_weight = 44
+{{</ code-toggle >}}
+
+By using taxonomic weight, the same piece of content can appear in different positions in different taxonomies.
+
+{{% note %}}
+Currently taxonomies only support the [default `weight => date` ordering of list content](/templates/lists/#default-weight--date--linktitle--filepath). For more information, see the documentation on [taxonomy templates](/templates/taxonomy-templates/).
+{{% /note %}}
+
+## Add custom metadata to a Taxonomy or Term
+
+If you need to add custom metadata to your taxonomy terms, you will need to create a page for that term at `/content/<TAXONOMY>/<TERM>/_index.md` and add your metadata in its front matter. Continuing with our 'Actors' example, let's say you want to add a Wikipedia page link to each actor. Your terms pages would be something like this:
+
+{{< code-toggle file="content/actors/bruce-willis/_index.md" fm=true copy=false >}}
+title: "Bruce Willis"
+wikipedia: "https://en.wikipedia.org/wiki/Bruce_Willis"
+{{< /code-toggle >}}
+
+[`urlize` template function]: /functions/urlize/
+[content section]: /content-management/sections/
+[content type]: /content-management/types/
+[documentation on archetypes]: /content-management/archetypes/
+[front matter]: /content-management/front-matter/
+[taxonomy list templates]: /templates/taxonomy-templates/#taxonomy-list-templates
+[taxonomy templates]: /templates/taxonomy-templates/
+[terms within the taxonomy]: /templates/taxonomy-templates/#taxonomy-terms-templates "See how to order terms associated with a taxonomy"
+[config]: /getting-started/configuration/
--- /dev/null
- {{< code-toggle file="config" copy=false >}}
+---
+title: URL Management
+description: Control the structure and appearance of URLs through front matter entries and settings in your site configuration.
+categories: [content management]
+keywords: [aliases,redirects,permalinks,urls]
+menu:
+ docs:
+ parent: content-management
+ weight: 180
+toc: true
+weight: 180
+aliases: [/extras/permalinks/,/extras/aliases/,/extras/urls/,/doc/redirects/,/doc/alias/,/doc/aliases/]
+---
+
+## Overview
+
+By default, when Hugo renders a page, the resulting URL matches the file path within the `content` directory. For example:
+
+```text
+content/posts/post-1.md → https://example.org/posts/post-1/
+```
+
+You can change the structure and appearance of URLs with front matter values and site configuration options.
+
+## Front matter
+
+### `slug`
+
+Set the `slug` in front matter to override the last segment of the path. The `slug` value does not affect section pages.
+
+{{< code-toggle file="content/posts/post-1.md" copy=false fm=true >}}
+title = 'My First Post'
+slug = 'my-first-post'
+{{< /code-toggle >}}
+
+The resulting URL will be:
+
+```text
+https://example.org/posts/my-first-post/
+```
+
+### `url`
+
+Set the `url` in front matter to override the entire path. Use this with either regular pages or section pages.
+
+With this front matter:
+
+{{< code-toggle file="content/posts/post-1.md" copy=false fm=true >}}
+title = 'My First Article'
+url = '/articles/my-first-article'
+{{< /code-toggle >}}
+
+The resulting URL will be:
+
+```text
+https://example.org/articles/my-first-article/
+```
+
+If you include a file extension:
+
+{{< code-toggle file="content/posts/post-1.md" copy=false fm=true >}}
+title = 'My First Article'
+url = '/articles/my-first-article.html'
+{{< /code-toggle >}}
+
+The resulting URL will be:
+
+```text
+https://example.org/articles/my-first-article.html
+```
+
+In a monolingual site, a `url` value with or without a leading slash is relative to the `baseURL`.
+
+In a multilingual site:
+
+- A `url` value with a leading slash is relative to the `baseURL`.
+- A `url` value without a leading slash is relative to the `baseURL` plus the language prefix.
+
+Site type|Front matter `url`|Resulting URL
+:--|:--|:--
+monolingual|`/about`|`https://example.org/about/`
+monolingual|`about`|`https://example.org/about/`
+multilingual|`/about`|`https://example.org/about/`
+multilingual|`about`|`https://example.org/de/about/`
+
+If you set both `slug` and `url` in front matter, the `url` value takes precedence.
+
+## Site configuration
+
+### Permalinks
+
+In your site configuration, set a URL pattern for regular pages within a top-level section. This is recursive, affecting descendant regular pages.
+
+{{% note %}}
+The `permalinks` defined in your site configuration do not apply to section pages. To adjust the URL for section pages, set `url` in front matter.
+{{% /note %}}
+
+#### Examples {#permalinks-examples}
+
+With this content structure:
+
+```text
+content/
+├── posts/
+│ ├── _index.md
+│ ├── post-1.md
+│ └── post-2.md
+└── _index.md
+```
+
+Create a date-based hierarchy, recursively, for regular pages within the `posts` section:
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+[permalinks]
+ posts = '/posts/:year/:month/:title/'
+{{< /code-toggle >}}
+
+The structure of the published site will be:
+
+```text
+public/
+├── posts/
+│ ├── 2023/
+│ │ └── 03/
+│ │ ├── post-1/
+│ │ │ └── index.html
+│ │ └── post-2/
+│ │ └── index.html
+│ └── index.html
+├── favicon.ico
+└── index.html
+```
+
+To create a date-based hierarchy for regular pages in the content root:
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+[permalinks]
+ '/' = '/:year/:month/:title/'
+{{< /code-toggle >}}
+
+{{% note %}}
+A URL pattern defined for the content root is not recursive.
+{{% /note %}}
+
+Use the same approach with taxonomies. For example, to omit the taxonomy segment of the URL:
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+[permalinks]
+ 'tags' = '/:title/'
+{{< /code-toggle >}}
+
+Front matter `url` values take precedence over URL patterns defined in `permalinks`.
+
+#### Tokens
+
+Use these tokens when defining the URL pattern. The `date` field in front matter determines the value of time-related tokens.
+
+`:year`
+: the 4-digit year
+
+`:month`
+: the 2-digit month
+
+`:monthname`
+: the name of the month
+
+`:day`
+: the 2-digit day
+
+`:weekday`
+: the 1-digit day of the week (Sunday = 0)
+
+`:weekdayname`
+: the name of the day of the week
+
+`:yearday`
+: the 1- to 3-digit day of the year
+
+`:section`
+: the content's section
+
+`:sections`
+: the content's sections hierarchy. You can use a selection of the sections using _slice syntax_: `:sections[1:]` includes all but the first, `:sections[:last]` includes all but the last, `:sections[last]` includes only the last, `:sections[1:2]` includes section 2 and 3. Note that this slice access will not throw any out-of-bounds errors, so you don't have to be exact.
+
+`:title`
+: the content's title
+
+`:slug`
+: the content's slug (or title if no slug is provided in the front matter)
+
+`:slugorfilename`
+: the content's slug (or filename if no slug is provided in the front matter)
+
+`:filename`
+: the content's filename (without extension)
+
+For time-related values, you can also use the layout string components defined in Go's [time package]. For example:
+
+[time package]: https://pkg.go.dev/time#pkg-constants
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+permalinks:
+ posts: /:06/:1/:2/:title/
+{{< /code-toggle >}}
+
+### Appearance
+
+The appearance of a URL is either ugly or pretty.
+
+Type|Path|URL
+:--|:--|:--
+ugly|content/about.md|`https://example.org/about.html`
+pretty|content/about.md|`https://example.org/about/`
+
+By default, Hugo produces pretty URLs. To generate ugly URLs, change your site configuration:
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+uglyURLs = true
+{{< /code-toggle >}}
+
+### Post-processing
+
+Hugo provides two mutually exclusive configuration options to alter URLs _after_ it renders a page.
+
+#### Canonical URLs
+
+{{% note %}}
+This is a legacy configuration option, superseded by template functions and markdown render hooks, and will likely be [removed in a future release].
+
+[removed in a future release]: https://github.com/gohugoio/hugo/issues/4733
+{{% /note %}}
+
+If enabled, Hugo performs a search and replace _after_ it renders the page. It searches for site-relative URLs (those with a leading slash) associated with `action`, `href`, `src`, `srcset`, and `url` attributes. It then prepends the `baseURL` to create absolute URLs.
+
+```text
+<a href="/about"> → <a href="https://example.org/about/">
+<img src="/a.gif"> → <img src="https://example.org/a.gif">
+```
+
+This is an imperfect, brute force approach that can affect content as well as HTML attributes. As noted above, this is a legacy configuration option that will likely be removed in a future release.
+
+To enable:
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+canonifyURLs = true
+{{< /code-toggle >}}
+
+#### Relative URLs
+
+{{% note %}}
+Do not enable this option unless you are creating a serverless site, navigable via the file system.
+{{% /note %}}
+
+If enabled, Hugo performs a search and replace _after_ it renders the page. It searches for site-relative URLs (those with a leading slash) associated with `action`, `href`, `src`, `srcset`, and `url` attributes. It then transforms the URL to be relative to the current page.
+
+For example, when rendering `content/posts/post-1`:
+
+```text
+<a href="/about"> → <a href="../../about">
+<img src="/a.gif"> → <img src="../../a.gif">
+```
+
+This is an imperfect, brute force approach that can affect content as well as HTML attributes. As noted above, do not enable this option unless you are creating a serverless site.
+
+To enable:
+
++{{< code-toggle file="hugo" copy=false >}}
+relativeURLs = true
+{{< /code-toggle >}}
+
+## Aliases
+
+Create redirects from old URLs to new URLs with aliases:
+
+- An alias with a leading slash is relative to the `baseURL`
+- An alias without a leading slash is relative to the current directory
+
+### Examples {#alias-examples}
+
+Change the file name of an existing page, and create an alias from the previous URL to the new URL:
+
+{{< code-toggle file="content/posts/new-file-name.md" copy=false >}}
+aliases = ['/posts/previous-file-name']
+{{< /code-toggle >}}
+
+Each of these directory-relative aliases is equivalent to the site-relative alias above:
+
+- `previous-file-name`
+- `./previous-file-name`
+- `../posts/previous-file-name`
+
+You can create more than one alias to the current page:
+
+{{< code-toggle file="content/posts/new-file-name.md" copy=false >}}
+aliases = ['previous-file-name','original-file-name']
+{{< /code-toggle >}}
+
+In a multilingual site, use a directory-relative alias, or include the language prefix with a site-relative alias:
+
+{{< code-toggle file="content/posts/new-file-name.de.md" copy=false >}}
+aliases = ['/de/posts/previous-file-name']
+{{< /code-toggle >}}
+
+### How Aliases Work
+
+Using the first example above, Hugo generates the following site structure:
+
+```text
+public/
+├── posts/
+│ ├── new-file-name/
+│ │ └── index.html
+│ ├── previous-file-name/
+│ │ └── index.html
+│ └── index.html
+└── index.html
+```
+
+The alias from the previous URL to the new URL is a client-side redirect:
+
+{{< code file="posts/previous-file-name/index.html" copy=false >}}
+<!DOCTYPE html>
+<html lang="en-us">
+ <head>
+ <title>https://example.org/posts/new-file-name/</title>
+ <link rel="canonical" href="https://example.org/posts/new-file-name/">
+ <meta name="robots" content="noindex">
+ <meta charset="utf-8">
+ <meta http-equiv="refresh" content="0; url=https://example.org/posts/new-file-name/">
+ </head>
+</html>
+{{< /code >}}
+
+Collectively, the elements in the `head` section:
+
+- Tell search engines that the new URL is canonical
+- Tell search engines not to index the previous URL
+- Tell the browser to redirect to the new URL
+
+Hugo renders alias files before rendering pages. A new page with the previous file name will overwrite the alias, as expected.
+
+### Customize
+
+Create a new template (`layouts/alias.html`) to customize the content of the alias files. The template receives the following context:
+
+`Permalink`
+: the link to the page being aliased
+
+`Page`
+: the Page data for the page being aliased
--- /dev/null
- {{</* code-toggle file="config" */>}}
+---
+title: Contribute to the Hugo Docs
+linktitle: Documentation
+description: Documentation is an integral part of any open source project. The Hugo documentation is as much a work in progress as the source it attempts to cover.
+categories: [contribute]
+keywords: [docs,documentation,community, contribute]
+menu:
+ docs:
+ parent: contribute
+ weight: 20
+toc: true
+weight: 20
+aliases: [/contribute/docs/]
+---
+
+## GitHub workflow
+
+Step 1
+: Fork the [documentation repository].
+
+Step 2
+: Clone your fork.
+
+Step 3
+: Create a new branch with a descriptive name.
+
+```bash
+git checkout -b fix/typos-site-variables
+```
+
+Step 4
+: Make changes.
+
+Step 5
+: Commit your changes with a descriptive commit message, typically 50 characters or less. Included the "Closes" keyword if your change addresses one or more open [issues].
+
+```bash
+git commit -m "Fix typos on site variables page
+
+Closes #1234
+Closes #5678"
+```
+
+Step 5
+: Push the new branch to your fork of the documentation repository.
+
+Step 6
+: Visit the [documentation repository] and create a pull request (PR).
+
+[documentation repository]: https://github.com/gohugoio/hugoDocs/
+[issues]: https://github.com/gohugoio/hugoDocs/issues
+
+Step 7
+: A project maintainer will review your PR, and may request changes. You may delete your branch after the maintainer merges your PR.
+
+## Including sample code
+
+{{% note %}}
+Use this syntax to include shortcodes calls within your code samples:
+
+`{{</*/* foo */*/>}}`\
+`{{%/*/* foo */*/%}}`
+{{% /note %}}
+
+### Fenced code blocks
+
+Include the language when using a fenced code block.
+
+````text
+```go-html-template
+{{ if eq $foo "bar" }}
+ {{ print "foo is bar" }}
+{{ end }}
+```
+````
+
+Rendered:
+
+```go-html-template
+{{ if eq $foo "bar" }}
+ {{ print "foo is bar" }}
+{{ end }}
+```
+
+### The code shortcode
+
+Use the `code` shortcode to include the file name and a copy-to-clipboard button. This shortcode accepts these optional parameters:
+
+copy
+: (`bool`) If `true`, displays a copy-to-clipboard button. Default is `true`.
+
+file
+: (`string`) The file name to display. If you do not provide a `lang` parameter, the file extension determines the code language.
+
+lang
+: (`string`) The code language. Default is `text`.
+
+````text
+{{</* code file="layouts/_default_/single.html" */>}}
+{{ if eq $foo "bar" }}
+ {{ print "foo is bar" }}
+{{ end }}
+{{</* /code */>}}
+
+````
+
+Rendered:
+
+{{< code file="layouts/_default_/single.html" >}}
+{{ if eq $foo "bar" }}
+ {{ print "foo is bar" }}
+{{ end }}
+{{< /code >}}
+
+### The code-toggle shortcode
+
+Use the `code-toggle` shortcode to display examples of site configuration, front matter, or data files. This shortcode accepts these optional parameters:
+
+copy
+: (`bool`) If `true`, displays a copy-to-clipboard button. Default is `true`.
+
+file
+: (`string`) The file name to display. Omit the file extension for site configuration and data file examples.
+
+fm
+: (`bool`) If `true`, displays the code as front matter. Default is `false`.
+
+#### Site configuration example
+
+```text
- {{< code-toggle file="config" >}}
++{{</* code-toggle file="hugo" */>}}
+baseURL = 'https://example.org'
+languageCode = 'en-US'
+title = "Example Site"
+{{</* /code-toggle */>}}
+```
+
+Rendered:
+
++{{< code-toggle file="hugo" >}}
+baseURL = 'https://example.org'
+languageCode = 'en-US'
+title = "Example Site"
+{{< /code-toggle >}}
+
+#### Front matter example
+
+```text
+{{</* code-toggle file="content/about.md" fm=true */>}}
+title = "About"
+date = 2023-04-02T12:47:24-07:00
+draft = false
+{{</* /code-toggle */>}}
+```
+
+Rendered:
+
+{{< code-toggle file="content/about.md" fm=true >}}
+title = "About"
+date = 2023-04-02T12:47:24-07:00
+draft = false
+{{< /code-toggle >}}
+
+## Admonitions
+
+Use the `note` shortcode to draw attention to content. Use the `{{%/* */%}}` notation when calling this shortcode.
+
+```text
+{{%/* note */%}}
+This is **bold** text.
+{{%/* /note */%}}
+```
+
+{{% note %}}
+This is **bold** text.
+{{% /note %}}
--- /dev/null
- hugo.Generator
- : `<meta>` tag for the version of Hugo that generated the site. `hugo.Generator` outputs a *complete* HTML tag; e.g. `<meta name="generator" content="Hugo 0.63.2">`
+---
+title: hugo
+description: The `hugo` function provides easy access to Hugo-related data.
+keywords: []
+categories: [functions]
+menu:
+ docs:
+ parent: functions
+toc:
+signature: ["hugo"]
+relatedfuncs: []
+---
+
+`hugo` returns an instance that contains the following functions:
+
- hugo.Version
- : the current version of the Hugo binary you are using e.g. `0.99.1`
++`hugo.BuildDate`
++: (`string`) The compile date of the current Hugo binary formatted per [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) (e.g., `2023-05-23T08:14:20Z`).
+
- hugo.GoVersion
- : returns the version of Go that the Hugo binary was built with. {{< new-in "0.101.0" >}}
++`hugo.CommitHash`
++: (`string`) The Git commit hash of the Hugo binary (e.g., `0a95d6704a8ac8d41cc5ca8fffaad8c5c7a3754a`).
+
- hugo.Environment
- : the current running environment as defined through the `--environment` cli tag
++`hugo.Deps`
++: (`[]*hugo.Dependency`) See [hugo.Deps](#hugodeps).
+
- hugo.CommitHash
- : the git commit hash of the current Hugo binary e.g. `0e8bed9ccffba0df554728b46c5bbf6d78ae5247`
++`hugo.Environment`
++: (`string`) The current running environment as defined through the `--environment` CLI flag (e.g., `development`, `production`).
+
- hugo.BuildDate
- : the compile date of the current Hugo binary formatted with RFC 3339 e.g. `2002-10-02T10:00:00-05:00`
++`hugo.Generator`
++: (`template.HTML`) Renders an HTML `meta` element identifying the software that generated the site (e.g., `<meta name="generator" content="Hugo 0.112.0">`).
+
- hugo.IsExtended
- : whether this is the extended Hugo binary.
++`hugo.GoVersion`
++: (`string`) The Go version used to compile the Hugo binary (e.g., `go1.20.4`). {{< new-in "0.101.0" >}}
+
- hugo.IsProduction
- : returns true if `hugo.Environment` is set to the production environment
++`hugo.IsExtended`
++: (`bool`) Returns `true` if the Hugo binary is the extended version.
+
- hugo.Deps
- : See [hugo.Deps](#hugodeps)
++`hugo.IsProduction`
++: (`bool`) Returns `true` if `hugo.Environment` is set to the production environment.
+
- Path (string)
- : Returns the path to this module. This will either be the module path, e.g. "github.com/gohugoio/myshortcodes", or the path below your /theme folder, e.g. "mytheme".
++`hugo.Version`
++: (`hugo.VersionString`) The current version of the Hugo binary (e.g., `0.112.1`).
++
++`hugo.WorkingDir`
++: (`string`) The project working directory (e.g., `/home/user/projects/my-hugo-site`). {{< new-in "0.112.0" >}}
+
+## hugo.Deps
+
+{{< new-in "0.92.0" >}}
+
+`hugo.Deps` returns a list of dependencies for a project (either Hugo Modules or local theme components).
+
+Each dependency contains:
+
- Version (string)
- : The module version.
++Owner
++: (`*hugo.Dependency`) In the dependency tree, this is the first module that defines this module as a dependency (e.g., `github.com/gohugoio/hugo-mod-bootstrap-scss/v5`).
+
- Vendor (bool)
- : Whether this dependency is vendored.
++Path
++: (`string`) The module path or the path below your `themes` directory (e.g., `github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2`).
+
- Time (time.Time)
- : Time version was created.
++Replace
++: (`*hugo.Dependency`) Replaced by this dependency.
+
- Owner
- : In the dependency tree, this is the first module that defines this module as a dependency.
++Time
++: (`time.Time`) The time that the version was created (e.g., `2022-02-13 15:11:28 +0000 UTC`).
+
- Replace (*Dependency)
- : Replaced by this dependency.
++Vendor
++: (`bool`) Returns `true` if the dependency is vendored.
+
- <h2>Dependencies</h2>
++Version
++: (`string`) The module version (e.g., `v2.21100.20000`).
+
+An example table listing the dependencies:
+
+```html
++<h2>Dependencies</h2>
+<table class="table table-dark">
+ <thead>
+ <tr>
+ <th scope="col">#</th>
+ <th scope="col">Owner</th>
+ <th scope="col">Path</th>
+ <th scope="col">Version</th>
+ <th scope="col">Time</th>
+ <th scope="col">Vendor</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{ range $index, $element := hugo.Deps }}
+ <tr>
+ <th scope="row">{{ add $index 1 }}</th>
+ <td>{{ with $element.Owner }}{{ .Path }}{{ end }}</td>
+ <td>
+ {{ $element.Path }}
+ {{ with $element.Replace }}
+ => {{ .Path }}
+ {{ end }}
+ </td>
+ <td>{{ $element.Version }}</td>
+ <td>{{ with $element.Time }}{{ . }}{{ end }}</td>
+ <td>{{ $element.Vendor }}</td>
+ </tr>
+ {{ end }}
+ </tbody>
+</table>
+```
--- /dev/null
- {{< code-toggle file="config" copy=false >}}
+---
+title: .Param
+description: Returns a page parameter, falling back to a site parameter if present.
+signature: ['.Param KEY']
+categories: [functions]
+keywords: ['front matter', 'params']
+menu:
+ docs:
+ parent: functions
+---
+
+The `.Param` method on `.Page` looks for the given `KEY` in page parameters, and returns the corresponding value. If it cannot find the `KEY` in page parameters, it looks for the `KEY` in site parameters. If it cannot find the `KEY` in either location, the `.Param` method returns `nil`.
+
+Site and theme developers commonly set parameters at the site level, allowing content authors to override those parameters at the page level.
+
+For example, to show a table of contents on every page, but allow authors to hide the table of contents as needed:
+
+**Configuration**
+
++{{< code-toggle file="hugo" copy=false >}}
+[params]
+display_toc = true
+{{< /code-toggle >}}
+
+**Content**
+
+{{< code-toggle file="content/example.md" fm=true copy=false >}}
+title = 'Example'
+date = 2023-01-01
+draft = false
+display_toc = false
+{{< /code-toggle >}}
+
+**Template**
+
+{{< code file="layouts/_default/single.html" copy=false >}}
+{{ if .Param "display_toc" }}
+ {{ .TableOfContents }}
+{{ end }}
+{{< /code >}}
+
+The `.Param` method returns the value associated with the given `KEY`, regardless of whether the value is truthy or falsy. If you need to ignore falsy values, use this construct instead:
+
+{{< code file="layouts/_default/single.html" copy=false >}}
+{{ or .Params.foo site.Params.foo }}
+{{< /code >}}
--- /dev/null
- Given a site-wide [`config.toml`][config] with the following `copyright` value:
+---
+title: safeHTML
+description: Declares a provided string as a "safe" HTML document to avoid escaping by Go templates.
+categories: [functions]
+menu:
+ docs:
+ parent: functions
+keywords: [strings]
+signature: ["safeHTML INPUT"]
+relatedfuncs: []
+---
+
+It should not be used for HTML from a third-party, or HTML with unclosed tags or comments.
+
- {{< code-toggle file="config" >}}
++Given a site-wide [`hugo.toml`][config] with the following `copyright` value:
+
++{{< code-toggle file="hugo" >}}
+copyright = "© 2015 Jane Doe. <a href=\"https://creativecommons.org/licenses/by/4.0/\">Some rights reserved</a>."
+{{< /code-toggle >}}
+
+`{{ .Site.Copyright | safeHTML }}` in a template would then output:
+
+```html
+© 2015 Jane Doe. <a href="https://creativecommons.org/licenses/by/4.0/">Some rights reserved</a>.
+```
+
+However, without the `safeHTML` function, html/template assumes `.Site.Copyright` to be unsafe and therefore escapes all HTML tags and renders the whole string as plain text:
+
+```html
+<p>© 2015 Jane Doe. <a href="https://creativecommons.org/licenses by/4.0/">Some rights reserved</a>.</p>
+```
+
+[config]: /getting-started/configuration/
--- /dev/null
- {{< code-toggle file="config" >}}
+---
+title: safeHTMLAttr
+description: Declares the provided string as a safe HTML attribute.
+categories: [functions]
+menu:
+ docs:
+ parent: functions
+keywords: [strings]
+signature: ["safeHTMLAttr INPUT"]
+relatedfuncs: []
+---
+
+Given a site configuration that contains this menu entry:
+
++{{< code-toggle file="hugo" >}}
+[[menu.main]]
+ name = "IRC"
+ url = "irc://irc.freenode.net/#golang"
+{{< /code-toggle >}}
+
+Attempting to use the `url` value directly in an attribute:
+
+```go-html-template
+{{ range site.Menus.main }}
+ <a href="{{ .URL }}">{{ .Name }}</a>
+{{ end }}
+```
+
+Will produce:
+
+```html
+<a href="#ZgotmplZ">IRC</a>
+```
+
+`ZgotmplZ` is a special value, inserted by Go's [template/html] package, that indicates that unsafe content reached a CSS or URL context.
+
+To override the safety check, use the `safeHTMLAttr` function:
+
+```go-html-template
+{{ range site.Menus.main }}
+ <a {{ printf "href=%q" .URL | safeHTMLAttr }}>{{ .Name }}</a>
+{{ end }}
+```
+
+[template/html]: https://pkg.go.dev/html/template
--- /dev/null
- The following examples use a [site `config.toml`][configuration] with the following [menu entry][menus]:
+---
+title: safeURL
+description: Declares the provided string as a safe URL or URL substring.
+keywords: [strings,urls]
+categories: [functions]
+menu:
+ docs:
+ parent: functions
+signature: ["safeURL INPUT"]
+relatedfuncs: []
+---
+
+`safeURL` declares the provided string as a "safe" URL or URL substring (see [RFC 3986]). A URL like `javascript:checkThatFormNotEditedBeforeLeavingPage()` from a trusted source should go in the page, but by default dynamic `javascript:` URLs are filtered out since they are a frequently exploited injection vector.
+
+Without `safeURL`, only the URI schemes `http:`, `https:` and `mailto:` are considered safe by Go templates. If any other URI schemes (e.g., `irc:` and `javascript:`) are detected, the whole URL will be replaced with `#ZgotmplZ`. This is to "defang" any potential attack in the URL by rendering it useless.
+
- {{< code-toggle file="config" copy=false >}}
++The following examples use a [site `hugo.toml`][configuration] with the following [menu entry][menus]:
+
++{{< code-toggle file="hugo" copy=false >}}
+[[menu.main]]
+name = "IRC: #golang at freenode"
+url = "irc://irc.freenode.net/#golang"
+{{< /code-toggle >}}
+
+The following is an example of a sidebar partial that may be used in conjunction with the preceding front matter example:
+
+{{< code file="layouts/partials/bad-url-sidebar-menu.html" copy=false >}}
+<!-- This unordered list may be part of a sidebar menu -->
+<ul>
+ {{ range .Site.Menus.main }}
+ <li><a href="{{ .URL }}">{{ .Name }}</a></li>
+ {{ end }}
+</ul>
+{{< /code >}}
+
+This partial would produce the following HTML output:
+
+```html
+<!-- This unordered list may be part of a sidebar menu -->
+<ul>
+ <li><a href="#ZgotmplZ">IRC: #golang at freenode</a></li>
+</ul>
+```
+
+The odd output can be remedied by adding ` | safeURL` to our `.URL` page variable:
+
+{{< code file="layouts/partials/correct-url-sidebar-menu.html" copy=false >}}
+<!-- This unordered list may be part of a sidebar menu -->
+<ul>
+ <li><a href="{{ .URL | safeURL }}">{{ .Name }}</a></li>
+</ul>
+{{< /code >}}
+
+With the `.URL` page variable piped through `safeURL`, we get the desired output:
+
+```html
+<ul class="sidebar-menu">
+ <li><a href="irc://irc.freenode.net/#golang">IRC: #golang at freenode</a></li>
+</ul>
+```
+
+[configuration]: /getting-started/configuration/
+[menus]: /content-management/menus/
+[RFC 3986]: https://tools.ietf.org/html/rfc3986
--- /dev/null
- {{< code-toggle file="config" copy=false >}}
+---
+title: sort
+description: Sorts slices, maps, and page collections.
+categories: [functions]
+signature: ["sort COLLECTION [KEY] [ORDER]"]
+menu:
+ docs:
+ parent: functions
+keywords: [ordering,sorting,lists]
+toc: true
+---
+
+The `KEY` is optional when sorting slices in ascending order, otherwise it is required. When sorting slices, use the literal `value` in place of the `KEY`. See examples below.
+
+The `ORDER` may be either `asc` (ascending) or `desc` (descending). The default sort order is ascending.
+
+## Sort a slice
+
+The examples below assume this site configuration:
+
- {{< code-toggle file="config" copy=false >}}
++{{< code-toggle file="hugo" copy=false >}}
+[params]
+grades = ['b','a','c']
+{{< /code-toggle >}}
+
+### Ascending order {#slice-ascending-order}
+
+Sort slice elements in ascending order using either of these constructs:
+
+{{< code file="layouts/_default/single.html" copy=false >}}
+{{ sort site.Params.grades }} → [a b c]
+{{ sort site.Params.grades "value" "asc" }} → [a b c]
+{{< /code >}}
+
+In the examples above, `value` is the `KEY` representing the value of the slice element.
+
+### Descending order {#slice-descending-order}
+
+Sort slice elements in descending order:
+
+{{< code file="layouts/_default/single.html" copy=false >}}
+{{ sort site.Params.grades "value" "desc" }} → [c b a]
+{{< /code >}}
+
+In the example above, `value` is the `KEY` representing the value of the slice element.
+
+## Sort a map
+
+The examples below assume this site configuration:
+
++{{< code-toggle file="hugo" copy=false >}}
+[params.authors.a]
+firstName = "Marius"
+lastName = "Pontmercy"
+[params.authors.b]
+firstName = "Victor"
+lastName = "Hugo"
+[params.authors.c]
+firstName = "Jean"
+lastName = "Valjean"
+{{< /code-toggle >}}
+
+{{% note %}}
+When sorting maps, the `KEY` argument must be lowercase.
+{{% /note %}}
+
+### Ascending order {#map-ascending-order}
+
+Sort map objects in ascending order using either of these constructs:
+
+{{< code file="layouts/_default/single.html" copy=false >}}
+{{ range sort site.Params.authors "firstname" }}
+ {{ .firstName }}
+{{ end }}
+
+{{ range sort site.Params.authors "firstname" "asc" }}
+ {{ .firstName }}
+{{ end }}
+{{< /code >}}
+
+These produce:
+
+```text
+Jean Marius Victor
+```
+
+### Descending order {#map-descending-order}
+
+Sort map objects in descending order:
+
+{{< code file="layouts/_default/single.html" copy=false >}}
+{{ range sort site.Params.authors "firstname" "desc" }}
+ {{ .firstName }}
+{{ end }}
+{{< /code >}}
+
+This produces:
+
+```text
+Victor Marius Jean
+```
+
+## Sort a page collection
+
+Although you can use the `sort` function to sort a page collection, Hugo provides [built-in methods for sorting page collections] by:
+
+- weight
+- linktitle
+- title
+- front matter parameter
+- date
+- expiration date
+- last modified date
+- publish date
+- length
+
+In this contrived example, sort the site's regular pages by `.Type` in descending order:
+
+{{< code file="layouts/_default/home.html" copy=false >}}
+{{ range sort site.RegularPages "Type" "desc" }}
+ <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
+{{ end }}
+{{< /code >}}
+
+
+[built-in methods for sorting page collections]: /templates/lists/#order-content
--- /dev/null
- {{< code-toggle file="config" >}}
+---
+title: where
+description: Filters an array to only the elements containing a matching value for a given field.
+categories: [functions]
+menu:
+ docs:
+ parent: functions
+keywords: [filtering]
+signature: ["where COLLECTION KEY [OPERATOR] MATCH"]
+relatedfuncs: [intersect,first,after,last]
+toc: true
+---
+
+`where` filters an array to only the elements containing a matching
+value for a given field.
+
+It works in a similar manner to the [`where` keyword in
+SQL][wherekeyword].
+
+```go-html-template
+{{ range where .Pages "Section" "foo" }}
+ {{ .Content }}
+{{ end }}
+```
+
+It can be used by dot-chaining the second argument to refer to a nested element of a value.
+
+{{< code-toggle file="content/example.md" fm=true copy=false >}}
+title: Example
+series: golang
+{{< /code-toggle >}}
+
+```go-html-template
+{{ range where .Site.Pages "Params.series" "golang" }}
+ {{ .Content }}
+{{ end }}
+```
+
+It can also be used with the logical operators `!=`, `>=`, `in`, etc. Without an operator, `where` compares a given field with a matching value equivalent to `=`.
+
+```go-html-template
+{{ range where .Pages "Section" "!=" "foo" }}
+ {{ .Content }}
+{{ end }}
+```
+
+The following logical operators are available with `where`:
+
+`=`, `==`, `eq`
+: `true` if a given field value equals a matching value
+
+`!=`, `<>`, `ne`
+: `true` if a given field value doesn't equal a matching value
+
+`>=`, `ge`
+: `true` if a given field value is greater than or equal to a matching value
+
+`>`, `gt`
+: `true` if a given field value is greater than a matching value
+
+`<=`, `le`
+: `true` if a given field value is lesser than or equal to a matching value
+
+`<`, `lt`
+: `true` if a given field value is lesser than a matching value
+
+`in`
+: `true` if a given field value is included in a matching value; a matching value must be an array or a slice
+
+`not in`
+: `true` if a given field value isn't included in a matching value; a matching value must be an array or a slice
+
+`intersect`
+: `true` if a given field value that is a slice/array of strings or integers contains elements in common with the matching value; it follows the same rules as the [`intersect` function][intersect].
+
+## Use `where` with `Booleans`
+When using booleans you should not put quotation marks.
+```go-html-template
+{{ range where .Pages "Draft" true }}
+ <p>{{ .Title }}</p>
+{{ end }}
+```
+
+
+## Use `where` with `intersect`
+
+```go-html-template
+{{ range where .Site.Pages "Params.tags" "intersect" .Params.tags }}
+ {{ if ne .Permalink $.Permalink }}
+ {{ .Render "summary" }}
+ {{ end }}
+{{ end }}
+```
+
+You can also put the returned value of the `where` clauses into a variable:
+
+{{< code file="where-intersect-variables.html" >}}
+{{ $v1 := where .Site.Pages "Params.a" "v1" }}
+{{ $v2 := where .Site.Pages "Params.b" "v2" }}
+{{ $filtered := $v1 | intersect $v2 }}
+{{ range $filtered }}
+{{ end }}
+{{< /code >}}
+
+## Use `where` with `first`
+
+Using `first` and `where` together can be very
+powerful. Below snippet gets a list of posts only from [**main
+sections**](#mainsections), sorts it using the [default
+ordering](/templates/lists/) for lists (i.e., `weight => date`), and
+then ranges through only the first 5 posts in that list:
+
+{{< code file="first-and-where-together.html" >}}
+{{ range first 5 (where site.RegularPages "Type" "in" site.Params.mainSections) }}
+ {{ .Content }}
+{{ end }}
+{{< /code >}}
+
+## Nest `where` Clauses
+
+You can also nest `where` clauses to drill down on lists of content by more than one parameter. The following first grabs all pages in the "blog" section and then ranges through the result of the first `where` clause and finds all pages that are *not* featured:
+
+```go-html-template
+{{ range where (where .Pages "Section" "blog" ) "Params.featured" "!=" true }}
+```
+
+## Unset Fields
+
+Filtering only works for set fields. To check whether a field is set or exists, you can use the operand `nil`.
+
+This can be useful to filter a small amount of pages from a large pool. Instead of setting a field on all pages, you can set that field on required pages only.
+
+Only the following operators are available for `nil`
+
+* `=`, `==`, `eq`: True if the given field is not set.
+* `!=`, `<>`, `ne`: True if the given field is set.
+
+```go-html-template
+{{ range where .Pages "Params.specialpost" "!=" nil }}
+ {{ .Content }}
+{{ end }}
+```
+
+## Portable `where` filters -- `site.Params.mainSections` {#mainsections}
+
+**This is especially important for themes.**
+
+To list the most relevant pages on the front page or similar, you
+should use the `site.Params.mainSections` list instead of comparing
+section names to hard-coded values like `"posts"` or `"post"`.
+
+```go-html-template
+{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
+```
+
+If the user has not set this config parameter in their site config, it
+will default to the *section with the most pages*.
+
+The user can override the default:
+
++{{< code-toggle file="hugo" >}}
+[params]
+ mainSections = ["blog", "docs"]
+{{< /code-toggle >}}
+
+[intersect]: /functions/intersect/
+[wherekeyword]: https://www.techonthenet.com/sql/where.php
--- /dev/null
- Hugo uses the `config.toml`, `config.yaml`, or `config.json` (if found in the
- site root) as the default site config file.
+---
+title: Configure Hugo
+linktitle: Configuration
+description: How to configure your Hugo site.
+categories: [getting started,fundamentals]
+keywords: [configuration,toml,yaml,json]
+menu:
+ docs:
+ parent: getting-started
+ weight: 60
+weight: 60
+aliases: [/overview/source-directory/,/overview/configuration/]
+toc: true
+---
+
+## Configuration File
+
- {{< code-toggle file="config" >}}
++Hugo uses the `hugo.toml`, `hugo.yaml`, or `hugo.json` (if found in the
++site root) as the default site configuration file.
+
+The user can choose to override that default with one or more site config files
+using the command-line `--config` switch.
+
+Examples:
+
+```txt
+hugo --config debugconfig.toml
+hugo --config a.toml,b.toml,c.toml
+```
+
+{{% note %}}
+Multiple site config files can be specified as a comma-separated string to the `--config` switch.
+{{% /note %}}
+
+## hugo.toml vs config.toml
+
+In Hugo 0.110.0 we changed the default config base filename to `hugo`, e.g. `hugo.toml`. We will still look for `config.toml` etc., but we recommend you eventually rename it (but you need to wait if you want to support older Hugo versions). The main reason we're doing this is to make it easier for code editors and build tools to identify this as a Hugo configuration file and project.
+
+{{< new-in "0.110.0" >}}
+
+## Configuration Directory
+
+In addition to using a single site config file, one can use the `configDir` directory (default to `config/`) to maintain easier organization and environment specific settings.
+
+- Each file represents a configuration root object, such as `params.toml` for `[Params]`, `menu(s).toml` for `[Menu]`, `languages.toml` for `[Languages]` etc...
+- Each file's content must be top-level, for example:
+
- │ │ ├── config.toml
++{{< code-toggle file="hugo" >}}
+[Params]
+ foo = "bar"
+{{< /code-toggle >}}
+
+{{< code-toggle file="params" >}}
+foo = "bar"
+{{< /code-toggle >}}
+
+- Each directory holds a group of files containing settings unique to an environment.
+- Files can be localized to become language specific.
+
+
+```txt
+├── config
+│ ├── _default
- │ │ ├── config.toml
++│ │ ├── hugo.toml
+│ │ ├── languages.toml
+│ │ ├── menus.en.toml
+│ │ ├── menus.zh.toml
+│ │ └── params.toml
+│ ├── production
- │ ├── config.toml
++│ │ ├── hugo.toml
+│ │ └── params.toml
+│ └── staging
- Let's take an example to understand this better. Let's say you are using Google Analytics for your website. This requires you to specify `googleAnalytics = "G-XXXXXXXX"` in `config.toml`. Now consider the following scenario:
++│ ├── hugo.toml
+│ └── params.toml
+```
+
+Considering the structure above, when running `hugo --environment staging`, Hugo will use every setting from `config/_default` and merge `staging`'s on top of those.
+
- This is how you need to configure your `config.toml` files considering the above scenario:
- 1. In `_default/config.toml` you don't need to mention `googleAnalytics` parameter at all. This ensures that no Google Analytics code is loaded in your development server i.e. when you run `hugo server`. This works since, by default Hugo sets `Environment=development` when you run `hugo server` which uses the config files from `_default` folder
- 2. In `production/config.toml` you just need to have one line:
++Let's take an example to understand this better. Let's say you are using Google Analytics for your website. This requires you to specify `googleAnalytics = "G-XXXXXXXX"` in `hugo.toml`. Now consider the following scenario:
+- You don't want the Analytics code to be loaded in development i.e. in your `localhost`
+- You want to use separate googleAnalytics IDs for your production & staging environments (say):
+ - `G-PPPPPPPP` for production
+ - `G-SSSSSSSS` for staging
+
- You don't need to mention all other parameters like `title`, `baseURL`, `theme` etc. again in this config file. You need to mention only those parameters which are different or new for the production environment. This is due to the fact that Hugo is going to __merge__ this on top of `_default/config.toml`. Now when you run `hugo` (build command), by default hugo sets `Environment=production`, so the `G-PPPPPPPP` analytics code will be there in your production website
- 3. Similarly in `staging/config.toml` you just need to have one line:
++This is how you need to configure your `hugo.toml` files considering the above scenario:
++1. In `_default/hugo.toml` you don't need to mention `googleAnalytics` parameter at all. This ensures that no Google Analytics code is loaded in your development server i.e. when you run `hugo server`. This works since, by default Hugo sets `Environment=development` when you run `hugo server` which uses the config files from `_default` folder
++2. In `production/hugo.toml` you just need to have one line:
+
+ ```googleAnalytics = "G-PPPPPPPP"```
+
- : See [Related Content](/content-management/related/#configure-related-content).
++ You don't need to mention all other parameters like `title`, `baseURL`, `theme` etc. again in this config file. You need to mention only those parameters which are different or new for the production environment. This is due to the fact that Hugo is going to __merge__ this on top of `_default/hugo.toml`. Now when you run `hugo` (build command), by default hugo sets `Environment=production`, so the `G-PPPPPPPP` analytics code will be there in your production website
++3. Similarly in `staging/hugo.toml` you just need to have one line:
+
+ ```googleAnalytics = "G-SSSSSSSS"```
+
+ Now you need to tell Hugo that you are using the staging environment. So your build command should be `hugo --environment staging` which will load the `G-SSSSSSSS` analytics code in your staging website
+
+{{% note %}}
+Default environments are __development__ with `hugo server` and __production__ with `hugo`.
+{{%/ note %}}
+
+## Merge Configuration from Themes
+
+The configuration value for `_merge` can be one of:
+
+none
+: No merge.
+
+shallow
+: Only add values for new keys.
+
+deep
+: Add values for new keys, merge existing.
+
+Note that you don't need to be so verbose as in the default setup below; a `_merge` value higher up will be inherited if not set.
+
+{{< code-toggle config="mergeStrategy" skipHeader=true />}}
+
+## All Configuration Settings
+
+The following is the full list of Hugo-defined variables. Users may choose to override those values in their site
+config file(s).
+
+### archetypeDir
+
+**Default value:** "archetypes"
+
+The directory where Hugo finds archetype files (content templates). {{% module-mounts-note %}}
+
+### assetDir
+
+**Default value:** "assets"
+
+The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/). {{% module-mounts-note %}}
+
+### baseURL
+
+The absolute URL (protocol, host, path, and trailing slash) of your published site (e.g., `https://www.example.org/docs/`).
+
+### build
+
+See [Configure Build](#configure-build)
+
+### buildDrafts (false)
+
+**Default value:** false
+
+Include drafts when building.
+
+### buildExpired
+
+**Default value:** false
+
+Include content already expired.
+
+### buildFuture
+
+**Default value:** false
+
+Include content with publishdate in the future.
+
+### caches
+
+See [Configure File Caches](#configure-file-caches)
+
+### cascade
+
+Pass down default configuration values (front matter) to pages in the content tree. The options in site config is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
+
+### canonifyURLs
+
+**Default value:** false
+
+Enable to turn relative URLs into absolute.
+
+### cleanDestinationDir
+
+**Default value:** false
+
+When building, removes files from destination not found in static directories.
+
+### contentDir
+
+**Default value:** "content"
+
+The directory from where Hugo reads content files. {{% module-mounts-note %}}
+
+### copyright
+
+**Default value:** ""
+
+Copyright notice for your site, typically displayed in the footer.
+
+### dataDir
+
+**Default value:** "data"
+
+The directory from where Hugo reads data files. {{% module-mounts-note %}}
+
+### defaultContentLanguage
+
+**Default value:** "en"
+
+Content without language indicator will default to this language.
+
+### defaultContentLanguageInSubdir
+
+**Default value:** false
+
+Render the default content language in subdir, e.g. `content/en/`. The site root `/` will then redirect to `/en/`.
+
+### disableAliases
+
+**Default value:** false
+
+Will disable generation of alias redirects. Note that even if `disableAliases` is set, the aliases themselves are preserved on the page. The motivation with this is to be able to generate 301 redirects in an `.htaccess`, a Netlify `_redirects` file or similar using a custom output format.
+
+### disableHugoGeneratorInject
+
+**Default value:** false
+
+Hugo will, by default, inject a generator meta tag in the HTML head on the _home page only_. You can turn it off, but we would really appreciate if you don't, as this is a good way to watch Hugo's popularity on the rise.
+
+### disableKinds
+
+**Default value:** []
+
+Enable disabling of all pages of the specified *Kinds*. Allowed values in this list: `"page"`, `"home"`, `"section"`, `"taxonomy"`, `"term"`, `"RSS"`, `"sitemap"`, `"robotsTXT"`, `"404"`.
+
+### disableLiveReload
+
+**Default value:** false
+
+Disable automatic live reloading of browser window.
+
+### disablePathToLower
+
+**Default value:** false
+
+Do not convert the url/path to lowercase.
+
+### enableEmoji
+
+**Default value:** false
+
+Enable Emoji emoticons support for page content; see the [Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet/).
+
+### enableGitInfo
+
+**Default value:** false
+
+Enable `.GitInfo` object for each page (if the Hugo site is versioned by Git). This will then update the `Lastmod` parameter for each page using the last git commit date for that content file.
+
+### enableInlineShortcodes
+
+**Default value:** false
+
+Enable inline shortcode support. See [Inline Shortcodes](/templates/shortcode-templates/#inline-shortcodes).
+
+### enableMissingTranslationPlaceholders
+
+**Default value:** false
+
+Show a placeholder instead of the default value or an empty string if a translation is missing.
+
+### enableRobotsTXT
+
+**Default value:** false
+
+Enable generation of `robots.txt` file.
+
+### frontmatter
+
+See [Front matter Configuration](#configure-front-matter).
+
+### googleAnalytics
+
+**Default value:** ""
+
+Google Analytics tracking ID.
+
+### hasCJKLanguage
+
+**Default value:** false
+
+If true, auto-detect Chinese/Japanese/Korean Languages in the content. This will make `.Summary` and `.WordCount` behave correctly for CJK languages.
+
+### imaging
+
+See [Image Processing Config](/content-management/image-processing/#imaging-configuration).
+
+### languageCode
+
+**Default value:** ""
+
+A language tag as defined by [RFC 5646](https://datatracker.ietf.org/doc/html/rfc5646). This value is used to populate:
+
+- The `<language>` element in the internal [RSS template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml)
+- The `lang` attribute of the `<html>` element in the internal [alias template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/alias.html)
+
+### languages
+
+See [Configure Languages](/content-management/multilingual/#configure-languages).
+
+### disableLanguages
+
+See [Disable a Language](/content-management/multilingual/#disable-a-language)
+
+### markup
+
+See [Configure Markup](/getting-started/configuration-markup).
+
+### mediaTypes
+
+See [Configure Media Types](/templates/output-formats/#media-types).
+
+### menus
+
+See [Menus](/content-management/menus/#define-in-site-configuration).
+
+### minify
+
+See [Configure Minify](#configure-minify)
+
+### module
+
+Module config see [Module Config](/hugo-modules/configuration/).
+
+### newContentEditor
+
+**Default value:** ""
+
+The editor to use when creating new content.
+
+### noChmod
+
+**Default value:** false
+
+Don't sync permission mode of files.
+
+### noTimes
+
+**Default value:** false
+
+Don't sync modification time of files.
+
+### outputFormats
+
+See [Configure Output Formats](#configure-additional-output-formats).
+
+### paginate
+
+**Default value:** 10
+
+Default number of elements per page in [pagination](/templates/pagination/).
+
+### paginatePath
+
+**Default value:** "page"
+
+The path element used during pagination (`https://example.com/page/2`).
+
+### permalinks
+
+See [Content Management](/content-management/urls/#permalinks).
+
+### pluralizeListTitles
+
+**Default value:** true
+
+Pluralize titles in lists.
+
+### publishDir
+
+**Default value:** "public"
+
+The directory to where Hugo will write the final static site (the HTML files etc.).
+
+### related
+
- {{< code-toggle file="config">}}
++See [Related Content](/content-management/related/#configure-related-content).
+
+### relativeURLs
+
+**Default value:** false
+
+Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs.
+
+### refLinksErrorLevel
+
+**Default value:** "ERROR"
+
+When using `ref` or `relref` to resolve page links and a link cannot be resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
+
+### refLinksNotFoundURL
+
+URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
+
+### removePathAccents
+
+**Default value:** false
+
+Removes [non-spacing marks](https://www.compart.com/en/unicode/category/Mn) from [composite characters](https://en.wikipedia.org/wiki/Precomposed_character) in content paths.
+
+```text
+content/post/hügó.md --> https://example.org/post/hugo/
+```
+
+### rssLimit
+
+**Default value:** -1 (unlimited)
+
+Maximum number of items in the RSS feed.
+
+### sectionPagesMenu
+
+See [Menus](/content-management/menus/#define-in-site-configuration).
+
+### security
+
+See [Security Policy](/about/security-model/#security-policy)
+
+### sitemap
+
+Default [sitemap configuration](/templates/sitemap-template/#configuration).
+
+### summaryLength
+
+**Default value:** 70
+
+The length of text in words to show in a [`.Summary`](/content-management/summaries/#automatic-summary-splitting).
+
+### taxonomies
+
+See [Configure Taxonomies](/content-management/taxonomies#configure-taxonomies).
+
+### theme
+
+: See [Module Config](/hugo-modules/configuration/#module-config-imports) for how to import a theme.
+
+### themesDir
+
+**Default value:** "themes"
+
+The directory where Hugo reads the themes from.
+
+### timeout
+
+**Default value:** "30s"
+
+Timeout for generating page contents, specified as a [duration](https://pkg.go.dev/time#Duration) or in milliseconds. *Note:* this is used to bail out of recursive content generation. You might need to raise this limit if your pages are slow to generate (e.g., because they require large image processing or depend on remote contents).
+
+### timeZone
+
+The time zone (or location), e.g. `Europe/Oslo`, used to parse front matter dates without such information and in the [`time` function](/functions/time/). The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
+
+### title
+
+Site title.
+
+### titleCaseStyle
+
+**Default value:** "AP"
+
+See [Configure Title Case](#configure-title-case)
+
+### uglyURLs
+
+**Default value:** false
+
+When enabled, creates URL of the form `/filename.html` instead of `/filename/`.
+
+### watch
+
+**Default value:** false
+
+Watch filesystem for changes and recreate as needed.
+
+{{% note %}}
+If you are developing your site on a \*nix machine, here is a handy shortcut for finding a configuration option from the command line:
+```txt
+cd ~/sites/yourhugosite
+hugo config | grep emoji
+```
+
+which shows output like
+
+```txt
+enableemoji: true
+```
+{{% /note %}}
+
+## Configure Build
+
+The `build` configuration section contains global build-related configuration options.
+
- {{< code-toggle file="config">}}
++{{< code-toggle file="hugo" >}}
+[build]
+useResourceCacheWhen="fallback"
+writeStats = false
+noJSConfigInAssets = false
+{{< /code-toggle >}}
+
+
+useResourceCacheWhen
+: When to use the cached resources in `/resources/_gen` for PostCSS and ToCSS. Valid values are `never`, `always` and `fallback`. The last value means that the cache will be tried if PostCSS/extended version is not available.
+
+writeStats
+: When enabled, a file named `hugo_stats.json` will be written to your project root with some aggregated data about the build, e.g. list of HTML entities published to be used to do [CSS pruning](/hugo-pipes/postprocess/#css-purging-with-postcss). If you're only using this for the production build, you should consider placing it below [config/production](/getting-started/configuration/#configuration-directory). It's also worth mentioning that, due to the nature of the partial server builds, new HTML entities will be added when you add or change them while the server is running, but the old values will not be removed until you restart the server or run a regular `hugo` build.
+
+**Note** that the prime use case for this is purging of unused CSS; it is built for speed and there may be false positives (e.g., detection of HTML elements that are not HTML elements).
+
+noJSConfigInAssets
+: Turn off writing a `jsconfig.json` into your `/assets` folder with mapping of imports from running [js.Build](https://gohugo.io/hugo-pipes/js). This file is intended to help with intellisense/navigation inside code editors such as [VS Code](https://code.visualstudio.com/). Note that if you do not use `js.Build`, no file will be written.
+
+## Configure Server
+
+This is only relevant when running `hugo server`, and it allows to set HTTP headers during development, which allows you to test out your Content Security Policy and similar. The configuration format matches [Netlify's](https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file) with slightly more powerful [Glob matching](https://github.com/gobwas/glob):
+
+
- 1. `./config.toml`
- 2. `./config.yaml`
- 3. `./config.json`
++{{< code-toggle file="hugo" >}}
+[server]
+[[server.headers]]
+for = "/**"
+
+[server.headers.values]
+X-Frame-Options = "DENY"
+X-XSS-Protection = "1; mode=block"
+X-Content-Type-Options = "nosniff"
+Referrer-Policy = "strict-origin-when-cross-origin"
+Content-Security-Policy = "script-src localhost:1313"
+{{< /code-toggle >}}
+
+Since this is "development only", it may make sense to put it below the `development` environment:
+
+
+{{< code-toggle file="config/development/server">}}
+[[headers]]
+for = "/**"
+
+[headers.values]
+X-Frame-Options = "DENY"
+X-XSS-Protection = "1; mode=block"
+X-Content-Type-Options = "nosniff"
+Referrer-Policy = "strict-origin-when-cross-origin"
+Content-Security-Policy = "script-src localhost:1313"
+{{< /code-toggle >}}
+
+You can also specify simple redirects rules for the server. The syntax is again similar to Netlify's.
+
+Note that a `status` code of 200 will trigger a [URL rewrite](https://docs.netlify.com/routing/redirects/rewrites-proxies/), which is what you want in SPA situations, e.g:
+
+{{< code-toggle file="config/development/server">}}
+[[redirects]]
+from = "/myspa/**"
+to = "/myspa/"
+status = 200
+force = false
+{{< /code-toggle >}}
+
+Setting `force=true` will make a redirect even if there is existing content in the path. Note that before Hugo 0.76 `force` was the default behavior, but this is inline with how Netlify does it.
+
+## 404 Server Error Page {#_404-server-error-page}
+
+{{< new-in "0.103.0" >}}
+
+Hugo will, by default, render all 404 errors when running `hugo server` with the `404.html` template. Note that if you have already added one or more redirects to your [Server Config](#configure-server), you need to add the 404 redirect explicitly, e.g:
+
+{{< code-toggle file="config/development/server" copy=false >}}
+[[redirects]]
+from = "/**"
+to = "/404.html"
+status = 404
+{{< /code-toggle >}}
+
+## Configure Title Case
+
+Set `titleCaseStyle` to specify the title style used by the [title](/functions/title/) template function and the automatic section titles in Hugo.
+
+By default, Hugo adheres to the capitalization rules in the [Associated Press (AP) Stylebook]. Set `titleCaseStyle` to `chicago` if you would prefer to follow the [Chicago Manual of Style], or set if to `go` to use Go's convention of capitalizing every word.
+
+[Associated Press (AP) Stylebook]: https://www.apstylebook.com/
+[Chicago Manual of Style]: https://www.chicagomanualofstyle.org/home.html
+[site configuration]: /getting-started/configuration/#configure-title-case
+
+## Configuration Environment Variables
+
+HUGO_NUMWORKERMULTIPLIER
+: Can be set to increase or reduce the number of workers used in parallel processing in Hugo. If not set, the number of logical CPUs will be used.
+
+## Configuration Lookup Order
+
+Similar to the template [lookup order], Hugo has a default set of rules for searching for a configuration file in the root of your website's source directory as a default behavior:
+
- In your `config` file, you can direct Hugo as to how you want your website rendered, control your website's menus, and arbitrarily define site-wide parameters specific to your project.
++1. `./hugo.toml`
++2. `./hugo.yaml`
++3. `./hugo.json`
+
- {{< code-toggle file="config">}}
++In your configuration file, you can direct Hugo as to how you want your website rendered, control your website's menus, and arbitrarily define site-wide parameters specific to your project.
+
+
+## Example Configuration
+
+The following is a typical example of a configuration file. The values nested under `params:` will populate the [`.Site.Params`] variable for use in [templates]:
+
- {{< code-toggle copy=false >}}
++{{< code-toggle file="hugo" >}}
+baseURL: "https://yoursite.example.com/"
+title: "My Hugo Site"
+permalinks:
+ posts: /:year/:month/:title/
+params:
+ Subtitle: "Hugo is Absurdly Fast!"
+ AuthorName: "Jon Doe"
+ GitHubUser: "spf13"
+ ListOfFoo:
+ - "foo1"
+ - "foo2"
+ SidebarRecentLimit: 5
+{{< /code-toggle >}}
+
+## Configure with Environment Variables
+
+In addition to the 3 config options already mentioned, configuration key-values can be defined through operating system environment variables.
+
+For example, the following command will effectively set a website's title on Unix-like systems:
+
+```txt
+$ env HUGO_TITLE="Some Title" hugo
+```
+
+This is really useful if you use a service such as Netlify to deploy your site. Look at the Hugo docs [Netlify configuration file](https://github.com/gohugoio/hugoDocs/blob/master/netlify.toml) for an example.
+
+{{% note %}}
+Names must be prefixed with `HUGO_` and the configuration key must be set in uppercase when setting operating system environment variables.
+
+To set config params, prefix the name with `HUGO_PARAMS_`
+{{% /note %}}
+
+If you are using snake_cased variable names, the above will not work. Hugo determines the delimiter to use by the first character after `HUGO`. This allows you to define environment variables on the form `HUGOxPARAMSxAPI_KEY=abcdefgh`, using any [allowed](https://stackoverflow.com/questions/2821043/allowed-characters-in-linux-environment-variable-names#:~:text=So%20names%20may%20contain%20any,not%20begin%20with%20a%20digit.) delimiter.
+
+{{< todo >}}
+Test and document setting params via JSON env var.
+{{< /todo >}}
+
+## Ignore Content and Data Files when Rendering
+
+**Note:** This works, but we recommend you use the newer and more powerful [includeFiles and excludeFiles](https://gohugo.io/hugo-modules/configuration/#module-config-mounts) mount options.
+
+To exclude specific files from the `content`, `data`, and `i18n` directories when rendering your site, set `ignoreFiles` to one or more regular expressions to match against the absolute file path.
+
+To ignore files ending with `.foo` or `.boo`:
+
- {{< code-toggle copy=false >}}
++{{< code-toggle copy=false file="hugo" >}}
+ignoreFiles = ['\.foo$', '\.boo$']
+{{< /code-toggle >}}
+
+To ignore a file using the absolute file path:
+
- Dates are important in Hugo, and you can configure how Hugo assigns dates to your content pages. You do this by adding a `frontmatter` section to your `config.toml`.
++{{< code-toggle copy=false file="hugo" >}}
+ignoreFiles = ['^/home/user/project/content/test\.md$']
+{{< /code-toggle >}}
+
+## Configure Front Matter
+
+### Configure Dates
+
- {{< code-toggle file="config" >}}
++Dates are important in Hugo, and you can configure how Hugo assigns dates to your content pages. You do this by adding a `frontmatter` section to your `hugo.toml`.
+
+The default configuration is:
+
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+[frontmatter]
+date = ["date", "publishDate", "lastmod"]
+lastmod = [":git", "lastmod", "date", "publishDate"]
+publishDate = ["publishDate", "date"]
+expiryDate = ["expiryDate"]
+{{< /code-toggle >}}
+
+If you, as an example, have a non-standard date parameter in some of your content, you can override the setting for `date`:
+
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+[frontmatter]
+date = ["myDate", ":default"]
+{{< /code-toggle >}}
+
+The `:default` is a shortcut to the default settings. The above will set `.Date` to the date value in `myDate` if present, if not we will look in `date`,`publishDate`, `lastmod` and pick the first valid date.
+
+In the list to the right, values starting with ":" are date handlers with a special meaning (see below). The others are just names of date parameters (case insensitive) in your front matter configuration. Also note that Hugo have some built-in aliases to the above: `lastmod` => `modified`, `publishDate` => `pubdate`, `published` and `expiryDate` => `unpublishdate`. With that, as an example, using `pubDate` as a date in front matter, will, by default, be assigned to `.PublishDate`.
+
+The special date handlers are:
+
+
+`:fileModTime`
+: Fetches the date from the content file's last modification timestamp.
+
+An example:
+
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+[frontmatter]
+lastmod = ["lastmod", ":fileModTime", ":default"]
+{{< /code-toggle >}}
+
+
+The above will try first to extract the value for `.Lastmod` starting with the `lastmod` front matter parameter, then the content file's modification timestamp. The last, `:default` should not be needed here, but Hugo will finally look for a valid date in `:git`, `date` and then `publishDate`.
+
+
+`:filename`
+: Fetches the date from the content file's filename. For example, `2018-02-22-mypage.md` will extract the date `2018-02-22`. Also, if `slug` is not set, `mypage` will be used as the value for `.Slug`.
+
+An example:
+
- {{< code-toggle >}}
++{{< code-toggle file="hugo" >}}
+[frontmatter]
+date = [":filename", ":default"]
+{{< /code-toggle >}}
+
+The above will try first to extract the value for `.Date` from the filename, then it will look in front matter parameters `date`, `publishDate` and lastly `lastmod`.
+
+
+`:git`
+: This is the Git author date for the last revision of this content file. This will only be set if `--enableGitInfo` is set or `enableGitInfo = true` is set in site config.
+
+## Configure Additional Output Formats
+
+Hugo v0.20 introduced the ability to render your content to multiple output formats (e.g., to JSON, AMP html, or CSV). See [Output Formats] for information on how to add these values to your Hugo project's configuration file.
+
+## Configure Minify
+
+Default configuration:
+
+{{< code-toggle config="minify" />}}
+
+## Configure File Caches
+
+Since Hugo 0.52 you can configure more than just the `cacheDir`. This is the default configuration:
+
- You can override any of these cache settings in your own `config.toml`.
++{{< code-toggle file="hugo" >}}
+[caches]
+[caches.getjson]
+dir = ":cacheDir/:project"
+maxAge = -1
+[caches.getcsv]
+dir = ":cacheDir/:project"
+maxAge = -1
+[caches.getresource]
+dir = ":cacheDir/:project"
+maxAge = -1
+[caches.images]
+dir = ":resourceDir/_gen"
+maxAge = -1
+[caches.assets]
+dir = ":resourceDir/_gen"
+maxAge = -1
+[caches.modules]
+dir = ":cacheDir/modules"
+maxAge = -1
+{{< /code-toggle >}}
+
++You can override any of these cache settings in your own `hugo.toml`.
+
+### The keywords explained
+
+`:cacheDir`
+: This is the value of the `cacheDir` config option if set (can also be set via OS env variable `HUGO_CACHEDIR`). It will fall back to `/opt/build/cache/hugo_cache/` on Netlify, or a `hugo_cache` directory below the OS temp dir for the others. This means that if you run your builds on Netlify, all caches configured with `:cacheDir` will be saved and restored on the next build. For other CI vendors, please read their documentation. For an CircleCI example, see [this configuration](https://github.com/bep/hugo-sass-test/blob/6c3960a8f4b90e8938228688bc49bdcdd6b2d99e/.circleci/config.yml).
+
+`:project`
+: The base directory name of the current Hugo project. This means that, in its default setting, every project will have separated file caches, which means that when you do `hugo --gc` you will not touch files related to other Hugo projects running on the same PC.
+
+`:resourceDir`
+: This is the value of the `resourceDir` config option.
+
+maxAge
+: This is the duration before a cache entry will be evicted, -1 means forever and 0 effectively turns that particular cache off. Uses Go's `time.Duration`, so valid values are `"10s"` (10 seconds), `"10m"` (10 minutes) and `"10h"` (10 hours).
+
+dir
+: The absolute path to where the files for this cache will be stored. Allowed starting placeholders are `:cacheDir` and `:resourceDir` (see above).
+
+## Configuration Format Specs
+
+- [TOML Spec][toml]
+- [YAML Spec][yaml]
+- [JSON Spec][json]
+
+[`.Site.Params`]: /variables/site/
+[directory structure]: /getting-started/directory-structure
+[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf "Specification for JSON, JavaScript Object Notation"
+[lookup order]: /templates/lookup-order/
+[Output Formats]: /templates/output-formats/
+[templates]: /templates/
+[toml]: https://github.com/toml-lang/toml
+[yaml]: https://yaml.org/spec/
+[static-files]: /content-management/static-files/
--- /dev/null
- └── config.toml
+---
+title: Directory Structure
+description: Hugo's CLI scaffolds a project directory structure and then takes that single directory and uses it as the input to create a complete website.
+categories: [getting started,fundamentals]
+keywords: [source, organization, directories]
+menu:
+ docs:
+ parent: getting-started
+ weight: 50
+weight: 50
+aliases: [/overview/source-directory/]
+toc: true
+---
+
+## New Site Scaffolding
+
+{{< youtube sB0HLHjgQ7E >}}
+
+Running `hugo new site example` from the command line creates a directory structure with the following elements:
+
+```txt
+example/
+├── archetypes/
+│ └── default.md
+├── assets/
+├── content/
+├── data/
+├── layouts/
+├── public/
+├── static/
+├── themes/
- Projects with minimal settings and no need for environment awareness can use a single `config.toml` file at its root.
++└── hugo.toml
+```
+
+## Directory Structure Explained
+
+The following is a high-level overview of each of the directories with links to each of their respective sections within the Hugo docs.
+
+[`archetypes`](/content-management/archetypes/)
+: You can create new content files in Hugo using the `hugo new` command.
+By default, Hugo will create new content files with at least `date`, `title` (inferred from the filename), and `draft = true`. This saves time and promotes consistency for sites using multiple content types. You can create your own [archetypes] with custom preconfigured front matter fields as well.
+
+[`assets`]
+: Stores all the files which need be processed by [Hugo Pipes](/hugo-pipes/). Only the files whose `.Permalink` or `.RelPermalink` are used will be published to the `public` directory.
+
+[`config`](/getting-started/configuration/)
+: Hugo ships with a large number of [configuration directives].
+The [config directory](/getting-started/configuration/#configuration-directory) is where those directives are stored as JSON, YAML, or TOML files. Every root setting object can stand as its own file and structured by environments.
++Projects with minimal settings and no need for environment awareness can use a single `hugo.toml` file at its root.
+
+Many sites may need little to no configuration, but Hugo ships with a large number of [configuration directives] for more granular directions on how you want Hugo to build your website. Note: config directory is not created by default.
+
+[`content`]
+: All content for your website will live inside this directory. Each top-level folder in Hugo is considered a [content section]. For example, if your site has three main sections---`blog`, `articles`, and `tutorials`---you will have three directories at `content/blog`, `content/articles`, and `content/tutorials`. Hugo uses sections to assign default [content types].
+
+[`data`](/templates/data-templates/)
+: This directory is used to store configuration files that can be
+used by Hugo when generating your website. You can write these files in YAML, JSON, or TOML format. In addition to the files you add to this folder, you can also create [data templates] that pull from dynamic content.
+
+[`layouts`]
+: Stores templates in the form of `.html` files that specify how views of your content will be rendered into a static website. Templates include [list pages][lists], your [homepage], [taxonomy templates], [partials], [single page templates][singles], and more.
+
+[`static`]
+: Stores all the static content: images, CSS, JavaScript, etc. When Hugo builds your site, all assets inside your static directory are copied over as-is. A good example of using the `static` folder is for [verifying site ownership on Google Search Console][searchconsole], where you want Hugo to copy over a complete HTML file without modifying its content.
+
+{{% note %}}
+From **Hugo 0.31** you can have multiple static directories.
+{{% /note %}}
+
+[`resources`]
+: Caches some files to speed up generation. Can be also used by template authors to distribute built Sass files, so you don't have to have the preprocessor installed. Note: resources directory is not created by default.
+
+[archetypes]: /content-management/archetypes/
+[`assets`]: /hugo-pipes/introduction#asset-directory
+[configuration directives]: /getting-started/configuration/#all-configuration-settings
+[`content`]: /content-management/organization/
+[content section]: /content-management/sections/
+[content types]: /content-management/types/
+[data templates]: /templates/data-templates/
+[homepage]: /templates/homepage/
+[`layouts`]: /templates/
+[`static`]: /content-management/static-files/
+[`resources`]: /getting-started/configuration/#configure-file-caches
+[lists]: /templates/lists/
+[pagevars]: /variables/page/
+[partials]: /templates/partials/
+[searchconsole]: https://support.google.com/webmasters/answer/9008080#zippy=%2Chtml-file-upload
+[singles]: /templates/single-page-templates/
+[starters]: /tools/starter-kits/
+[taxonomies]: /content-management/taxonomies/
+[taxonomy templates]: /templates/taxonomy-templates/
+[types]: /content-management/types/
--- /dev/null
- 1. [Install Hugo] (the extended edition)
+---
+title: Quick Start
+description: Learn to create a Hugo site in minutes.
+categories: [getting started]
+keywords: [quick start,usage]
+menu:
+ docs:
+ parent: getting-started
+ weight: 10
+weight: 10
+toc: true
+aliases: [/quickstart/,/overview/quickstart/]
+---
+
+In this tutorial you will:
+
+1. Create a site
+2. Add content
+3. Configure the site
+4. Publish the site
+
+## Prerequisites
+
+Before you begin this tutorial you must:
+
- echo "theme = 'ananke'" >> config.toml
++1. [Install Hugo] (extended edition, v0.112.0 or later)
+1. [Install Git]
+
+You must also be comfortable working from the command line.
+
+## Create a site
+
+### Commands
+
+{{% note %}}
+**If you are a Windows user:**
+
+- Do not use the Command Prompt
+- Do not use Windows PowerShell
+- Run these commands from [PowerShell] or a Linux terminal such as WSL or Git Bash
+
+PowerShell and Windows PowerShell are different applications.
+
+[PowerShell]: https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows
+{{% /note %}}
+
+Run these commands to create a Hugo site with the [Ananke] theme. The next section provides an explanation of each command.
+
+```text
+hugo new site quickstart
+cd quickstart
+git init
+git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke themes/ananke
- echo "theme = 'ananke'" >> config.toml
++echo "theme = 'ananke'" >> hugo.toml
+hugo server
+```
+
+View your site at the URL displayed in your terminal. Press `Ctrl + C` to stop Hugo's development server.
+
+### Explanation of commands
+
+Create the [directory structure] for your project in the `quickstart` directory.
+
+```text
+hugo new site quickstart
+```
+
+Change the current directory to the root of your project.
+
+```text
+cd quickstart
+```
+
+Initialize an empty Git repository in the current directory.
+
+```text
+git init
+```
+
+Clone the [Ananke] theme into the `themes` directory, adding it to your project as a [Git submodule].
+
+```text
+git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke themes/ananke
+```
+
+Append a line to the site configuration file, indicating the current theme.
+
+```text
- With your editor, open the [site configuration] file (`config.toml`) in the root of your project.
++echo "theme = 'ananke'" >> hugo.toml
+```
+
+Start Hugo's development server to view the site.
+
+```text
+hugo server
+```
+
+Press `Ctrl + C` to stop Hugo's development server.
+
+## Add content
+
+Add a new page to your site.
+
+```text
+hugo new posts/my-first-post.md
+```
+
+Hugo created the file in the `content/posts` directory. Open the file with your editor.
+
+```text
+---
+title: "My First Post"
+date: 2022-11-20T09:03:20-08:00
+draft: true
+---
+```
+
+Notice the `draft` value in the [front matter] is `true`. By default, Hugo does not publish draft content when you build the site. Learn more about [draft, future, and expired content].
+
+Add some [markdown] to the body of the post, but do not change the `draft` value.
+
+[markdown]: https://commonmark.org/help/
+
+```text
+---
+title: "My First Post"
+date: 2022-11-20T09:03:20-08:00
+draft: true
+---
+## Introduction
+
+This is **bold** text, and this is *emphasized* text.
+
+Visit the [Hugo](https://gohugo.io) website!
+```
+
+Save the file, then start Hugo’s development server to view the site. You can run either of the following commands to include draft content.
+
+```text
+hugo server --buildDrafts
+hugo server -D
+```
+
+View your site at the URL displayed in your terminal. Keep the development server running as you continue to add and change content.
+
+{{% note %}}
+Hugo's rendering engine conforms to the CommonMark [specification] for markdown. The CommonMark organization provides a useful [live testing tool] powered by the reference implementation.
+
+[live testing tool]: https://spec.commonmark.org/dingus/
+[specification]: https://spec.commonmark.org/
+{{% /note %}}
+
+## Configure the site
+
++With your editor, open the [site configuration] file (`hugo.toml`) in the root of your project.
+
+```text
+baseURL = 'http://example.org/'
+languageCode = 'en-us'
+title = 'My New Hugo Site'
+theme = 'ananke'
+```
+
+Make the following changes:
+
+1. Set the `baseURL` for your production site. This value must begin with the protocol and end with a slash, as shown above.
+
+2. Set the `languageCode` to your language and region.
+
+3. Set the `title` for your production site.
+
+Start Hugo's development server to see your changes, remembering to include draft content.
+
+```text
+hugo server -D
+```
+
+{{% note %}}
+Most theme authors provide configuration guidelines and options. Make sure to visit your theme's repository or documentation site for details.
+
+[The New Dynamic], authors of the Ananke theme, provide [documentation] for configuration and usage. They also provide a [demonstration site].
+
+[demonstration site]: https://gohugo-ananke-theme-demo.netlify.app/
+[documentation]: https://github.com/theNewDynamic/gohugo-theme-ananke#readme
+[The New Dynamic]: https://www.thenewdynamic.com/
+{{% /note %}}
+
+## Publish the site
+
+In this step you will _publish_ your site, but you will not _deploy_ it.
+
+When you _publish_ your site, Hugo creates the entire static site in the `public` directory in the root of your project. This includes the HTML files, and assets such as images, CSS files, and JavaScript files.
+
+When you publish your site, you typically do _not_ want to include [draft, future, or expired content]. The command is simple.
+
+```text
+hugo
+```
+
+To learn how to _deploy_ your site, see the [hosting and deployment] section.
+
+## Ask for help
+
+Hugo's [forum] is an active community of users and developers who answer questions, share knowledge, and provide examples. A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help] before asking your first question.
+
+## Other resources
+
+For other resources to help you learn Hugo, including books and video tutorials, see the [external learning resources](/getting-started/external-learning-resources/) page.
+
+[Ananke]: https://github.com/theNewDynamic/gohugo-theme-ananke
+[directory structure]: /getting-started/directory-structure
+[draft, future, and expired content]: /getting-started/usage/#draft-future-and-expired-content
+[draft, future, or expired content]: /getting-started/usage/#draft-future-and-expired-content
+[external learning resources]:/getting-started/external-learning-resources/
+[forum]: https://discourse.gohugo.io/
+[forum]: https://discourse.gohugo.io/
+[front matter]: /content-management/front-matter
+[Git submodule]: https://git-scm.com/book/en/v2/Git-Tools-Submodules
+[hosting and deployment]: /hosting-and-deployment/
+[Install Git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
+[Install Hugo]: /installation/
+[Requesting Help]: https://discourse.gohugo.io/t/requesting-help/9132
+[Requesting Help]: https://discourse.gohugo.io/t/requesting-help/9132
+[site configuration]: /getting-started/configuration/
--- /dev/null
- {{< code-toggle file="config">}}
+---
+title: Configure Modules
+description: This page describes the configuration options for a module.
+categories: [hugo modules]
+keywords: [themes, source, organization, directories]
+menu:
+ docs:
+ parent: modules
+ weight: 10
+weight: 10
+toc: true
+---
+
+## Module Config: Top level
+
- {{< code-toggle file="config">}}
++{{< code-toggle file="hugo" >}}
+[module]
+noVendor = ""
+proxy = "direct"
+noProxy = "none"
+private = "*.*"
+replacements = ""
+workspace = "off"
+{{< /code-toggle >}}
+
+noVendor
+: A optional Glob pattern matching module paths to skip when vendoring, e.g. "github.com/**"
+
+vendorClosest
+: When enabled, we will pick the vendored module closest to the module using it. The default behavior is to pick the first. Note that there can still be only one dependency of a given module path, so once it is in use it cannot be redefined.
+
+proxy
+: Defines the proxy server to use to download remote modules. Default is `direct`, which means "git clone" and similar.
+
+noProxy
+: Comma separated glob list matching paths that should not use the proxy configured above.
+
+private
+: Comma separated glob list matching paths that should be treated as private.
+
+workspace
+: The workspace file to use. This enables Go workspace mode. Note that this can also be set via OS env, e.g. `export HUGO_MODULE_WORKSPACE=/my/hugo.work` This only works with Go 1.18+. In Hugo `v0.109.0` we changed the default to `off` and we now resolve any relative work filenames relative to the working directory.
+
+replacements
+: A comma-separated list of mappings from module paths to directories, e.g. `github.com/bep/my-theme -> ../..,github.com/bep/shortcodes -> /some/path`. This is mostly useful for temporary local development of a module, in which case you might want to save it as an environment variable, e.g: `env HUGO_MODULE_REPLACEMENTS="github.com/bep/my-theme -> ../.."`. Relative paths are relative to [themesDir](https://gohugo.io/getting-started/configuration/#all-configuration-settings). Absolute paths are allowed.
+
+Note that the above terms maps directly to their counterparts in Go Modules. Some of these setting may be natural to set as OS environment variables. To set the proxy server to use, as an example:
+
+```txt
+env HUGO_MODULE_PROXY=https://proxy.example.org hugo
+```
+
+{{< gomodules-info >}}
+
+## Module Config: hugoVersion
+
+If your module requires a particular version of Hugo to work, you can indicate that in the `module` section and the user will be warned if using a too old/new version.
+
- {{< code-toggle file="config">}}
++{{< code-toggle file="hugo" >}}
+[module]
+[module.hugoVersion]
+ min = ""
+ max = ""
+ extended = false
+
+{{< /code-toggle >}}
+
+Any of the above can be omitted.
+
+min
+: The minimum Hugo version supported, e.g. `0.55.0`
+
+max
+: The maximum Hugo version supported, e.g. `0.55.0`
+
+extended
+: Whether the extended version of Hugo is required.
+
+## Module Config: imports
+
- : If enabled, any module configuration file, e.g. `config.toml`, will not be loaded. Note that this will also stop the loading of any transitive module dependencies.
++{{< code-toggle file="hugo" >}}
+[module]
+[[module.imports]]
+ path = "github.com/gohugoio/hugoTestModules1_linux/modh1_2_1v"
+ ignoreConfig = false
+ ignoreImports = false
+ disable = false
+[[module.imports]]
+ path = "my-shortcodes"
+{{< /code-toggle >}}
+
+path
+: Can be either a valid Go Module module path, e.g. `github.com/gohugoio/myShortcodes`, or the directory name for the module as stored in your themes folder.
+
+ignoreConfig
- {{< code-toggle file="config">}}
++: If enabled, any module configuration file, e.g. `hugo.toml`, will not be loaded. Note that this will also stop the loading of any transitive module dependencies.
+
+ignoreImports
+: If enabled, module imports will not be followed.
+
+disable
+: Set to `true` to disable the module while keeping any version info in the `go.*` files.
+
+noMounts
+: Do not mount any folder in this import.
+
+noVendor
+: Never vendor this import (only allowed in main project).
+
+{{< gomodules-info >}}
+
+## Module Config: mounts
+
+{{% note %}}
+When the `mounts` config was introduced in Hugo 0.56.0, we were careful to preserve the existing `contentDir`, `staticDir`, and similar configuration to make sure all existing sites just continued to work. But you should not have both: if you add a `mounts` section you should remove the old `contentDir`, `staticDir`, etc. settings.
+{{% /note %}}
+
+{{% note %}}
+When you add a mount, the default mount for the concerned target root is ignored: be sure to explicitly add it.
+{{% /note %}}
+
+**Default mounts**
- {{< code-toggle file="config">}}
++{{< code-toggle file="hugo" >}}
+[module]
+[[module.mounts]]
+ source="content"
+ target="content"
+[[module.mounts]]
+ source="static"
+ target="static"
+[[module.mounts]]
+ source="layouts"
+ target="layouts"
+[[module.mounts]]
+ source="data"
+ target="data"
+[[module.mounts]]
+ source="assets"
+ target="assets"
+[[module.mounts]]
+ source="i18n"
+ target="i18n"
+[[module.mounts]]
+ source="archetypes"
+ target="archetypes"
+{{< /code-toggle >}}
+
+source
+: The source directory of the mount. For the main project, this can be either project-relative or absolute and even a symbolic link. For other modules it must be project-relative.
+
+target
+: Where it should be mounted into Hugo's virtual filesystem. It must start with one of Hugo's component folders: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, or `archetypes`. E.g. `content/blog`.
+
+lang
+: The language code, e.g. "en". Only relevant for `content` mounts, and `static` mounts when in multihost mode.
+
+includeFiles (string or slice)
+: One or more [glob](https://github.com/gobwas/glob) patterns matching files or directories to include. If `excludeFiles` is not set, the files matching `includeFiles` will be the files mounted.
+
+The glob patterns are matched to the filenames starting from the `source` root, they should have Unix styled slashes even on Windows, `/` matches the mount root and `**` can be used as a super-asterisk to match recursively down all directories, e.g `/posts/**.jpg`.
+
+The search is case-insensitive.
+
+excludeFiles (string or slice)
+: One or more glob patterns matching files to exclude.
+
+**Example**
++{{< code-toggle file="hugo" >}}
+[module]
+[[module.mounts]]
+ source="content"
+ target="content"
+ excludeFiles="docs/*"
+[[module.mounts]]
+ source="node_modules"
+ target="assets"
+[[module.mounts]]
+ source="assets"
+ target="assets"
+{{< /code-toggle >}}
--- /dev/null
- {{< code-toggle file="config">}}
+---
+title: Theme Components
+description: Hugo provides advanced theming support with Theme Components.
+categories: [hugo modules]
+keywords: [themes, theme, source, organization, directories]
+menu:
+ docs:
+ parent: modules
+ weight: 50
+weight: 50
+aliases: [/themes/customize/,/themes/customizing/]
+toc: true
+---
+
+{{% note %}}
+This section contain information that may be outdated and is in the process of being rewritten.
+{{% /note %}}
+Since Hugo `0.42` a project can configure a theme as a composite of as many theme components you need:
+
- You can even nest this, and have the theme component itself include theme components in its own `config.toml` (theme inheritance).[^1]
++{{< code-toggle file="hugo" >}}
+theme = ["my-shortcodes", "base-theme", "hyde"]
+{{< /code-toggle >}}
+
- The theme definition example above in `config.toml` creates a theme with 3 theme components with precedence from left to right.
++You can even nest this, and have the theme component itself include theme components in its own `hugo.toml` (theme inheritance).[^1]
+
- Also note that a component that is part of a theme can have its own configuration file, e.g. `config.toml`. There are currently some restrictions to what a theme component can configure:
++The theme definition example above in `hugo.toml` creates a theme with 3 theme components with precedence from left to right.
+
+For any given file, data entry, etc., Hugo will look first in the project and then in `my-shortcodes`, `base-theme`, and lastly `hyde`.
+
+Hugo uses two different algorithms to merge the filesystems, depending on the file type:
+
+* For `i18n` and `data` files, Hugo merges deeply using the translation ID and data key inside the files.
+* For `static`, `layouts` (templates), and `archetypes` files, these are merged on file level. So the left-most file will be chosen.
+
+The name used in the `theme` definition above must match a folder in `/your-site/themes`, e.g. `/your-site/themes/my-shortcodes`. There are plans to improve on this and get a URL scheme so this can be resolved automatically.
+
++Also note that a component that is part of a theme can have its own configuration file, e.g. `hugo.toml`. There are currently some restrictions to what a theme component can configure:
+
+* `params` (global and per language)
+* `menu` (global and per language)
+* `outputformats` and `mediatypes`
+
+The same rules apply here: The left-most param/menu etc. with the same ID will win. There are some hidden and experimental namespace support in the above, which we will work to improve in the future, but theme authors are encouraged to create their own namespaces to avoid naming conflicts.
+
+[^1]: For themes hosted on the [Hugo Themes Showcase](https://themes.gohugo.io/) components need to be added as git submodules that point to the directory `exampleSite/themes`
--- /dev/null
- {{< code-toggle file="config" >}}
+---
+title: Use Hugo Modules
+description: How to use Hugo Modules to build and manage your site.
+categories: [hugo modules]
+keywords: [install, themes, source, organization, directories,usage,modules]
+menu:
+ docs:
+ parent: modules
+ weight: 20
+weight: 20
+aliases: [/themes/usage/,/themes/installing/,/installing-and-using-themes/]
+toc: true
+---
+
+## Prerequisite
+
+{{< gomodules-info >}}
+
+## Initialize a New Module
+
+Use `hugo mod init` to initialize a new Hugo Module. If it fails to guess the module path, you must provide it as an argument, e.g.:
+
+```bash
+hugo mod init github.com/gohugoio/myShortcodes
+```
+
+Also see the [CLI Doc](/commands/hugo_mod_init/).
+
+## Use a Module for a Theme
+
+The easiest way to use a Module for a theme is to import it in the config.
+
+1. Initialize the hugo module system: `hugo mod init github.com/<your_user>/<your_project>`
+2. Import the theme:
+
++{{< code-toggle file="hugo" >}}
+[module]
+ [[module.imports]]
+ path = "github.com/spf13/hyde"
+{{< /code-toggle >}}
+
+## Update Modules
+
+Modules will be downloaded and added when you add them as imports to your configuration, see [Module Imports](/hugo-modules/configuration/#module-config-imports).
+
+To update or manage versions, you can use `hugo mod get`.
+
+Some examples:
+
+### Update All Modules
+
+```bash
+hugo mod get -u
+```
+
+### Update All Modules Recursively
+
+```bash
+hugo mod get -u ./...
+```
+
+### Update One Module
+
+```bash
+hugo mod get -u github.com/gohugoio/myShortcodes
+```
+
+### Get a Specific Version
+
+```bash
+hugo mod get github.com/gohugoio/myShortcodes@v1.0.7
+```
+
+Also see the [CLI Doc](/commands/hugo_mod_get/).
+
+## Make and test changes in a module
+
+One way to do local development of a module imported in a project is to add a replace directive to a local directory with the source in `go.mod`:
+
+```bash
+replace github.com/bep/hugotestmods/mypartials => /Users/bep/hugotestmods/mypartials
+```
+
+If you have the `hugo server` running, the configuration will be reloaded and `/Users/bep/hugotestmods/mypartials` put on the watch list.
+
+Instead of modifying the `go.mod` files, you can also use the modules config [`replacements`](https://gohugo.io/hugo-modules/configuration/#module-config-top-level) option.
+
+## Print Dependency Graph
+
+Use `hugo mod graph` from the relevant module directory and it will print the dependency graph, including vendoring, module replacement or disabled status.
+
+E.g.:
+
+```txt
+hugo mod graph
+
+github.com/bep/my-modular-site github.com/bep/hugotestmods/mymounts@v1.2.0
+github.com/bep/my-modular-site github.com/bep/hugotestmods/mypartials@v1.0.7
+github.com/bep/hugotestmods/mypartials@v1.0.7 github.com/bep/hugotestmods/myassets@v1.0.4
+github.com/bep/hugotestmods/mypartials@v1.0.7 github.com/bep/hugotestmods/myv2@v1.0.0
+DISABLED github.com/bep/my-modular-site github.com/spf13/hyde@v0.0.0-20190427180251-e36f5799b396
+github.com/bep/my-modular-site github.com/bep/hugo-fresh@v1.0.1
+github.com/bep/my-modular-site in-themesdir
+
+```
+
+Also see the [CLI Doc](/commands/hugo_mod_graph/).
+
+## Vendor Your Modules
+
+`hugo mod vendor` will write all the module dependencies to a `_vendor` folder, which will then be used for all subsequent builds.
+
+Note that:
+
+* You can run `hugo mod vendor` on any level in the module tree.
+* Vendoring will not store modules stored in your `themes` folder.
+* Most commands accept a `--ignoreVendorPaths` flag, which will then not use the vendored modules in `_vendor` for the module paths matching the [Glob](https://github.com/gobwas/glob) pattern given.
+
+Also see the [CLI Doc](/commands/hugo_mod_vendor/).
+
+## Tidy go.mod, go.sum
+
+Run `hugo mod tidy` to remove unused entries in `go.mod` and `go.sum`.
+
+Also see the [CLI Doc](/commands/hugo_mod_clean/).
+
+## Clean Module Cache
+
+Run `hugo mod clean` to delete the entire modules cache.
+
+Note that you can also configure the `modules` cache with a `maxAge`, see [File Caches](/getting-started/configuration/#configure-file-caches).
+
+Also see the [CLI Doc](/commands/hugo_mod_clean/).
+
+## Module Workspaces
+
+{{< new-in "0.109.0" >}}
+
+Workspace support was added in [Go 1.18](https://go.dev/blog/get-familiar-with-workspaces) and Hugo got solid support for it in the `v0.109.0` version.
+
+A common use case for a workspace is to simplify local development of a site with its theme modules.
+
+A workspace can be configured in a `*.work` file and activated with the [module.workspace](/hugo-modules/configuration/) setting, which for this use is commonly controlled via the `HUGO_MODULE_WORKSPACE` OS environment variable.
+
+See the [hugo.work](https://github.com/gohugoio/hugo/blob/master/hugo.work) file in the Hugo Docs repo for an example:
+
+```
+go 1.19
+
+use .
+use ../gohugoioTheme
+```
+
+Using the `use` directive, list all the modules you want to work on, pointing to its relative location. As in the example above, it's recommended to always include the main project (the ".") in the list.
+
+With that you can start the Hugo server with that workspace enabled:
+
+```
+HUGO_MODULE_WORKSPACE=hugo.work hugo server --ignoreVendorPaths "**"
+```
+
+The `--ignoreVendorPaths` flag is added above to ignore any of the vendored dependencies inside `_vendor`. If you don't use vendoring, you don't need that flag. But now the server is set up watching the files and directories in the workspace and you can see your local edits reloaded.
--- /dev/null
- {{ $resized := $image.Resize "400x400" | resources.Copy "images/mynewname.jpg" }}
- <img src="{{ $resized.RelPermalink }}">
+---
+title: Hugo Pipes Introduction
+linkTitle: Hugo Pipes
+description: Hugo Pipes is Hugo's asset processing set of functions.
+categories: [asset management]
+keywords: []
+menu:
+ docs:
+ parent: pipes
+ weight: 20
+weight: 01
+toc: true
+aliases: [/assets/]
+---
+
+## Find Resources in /assets
+
+This is about the global Resources mounted inside `/assets`. For the `.Page` scoped Resources, see [Page Resources](/content-management/page-resources/).
+
+Note that you can mount any directory into Hugo's virtual `assets` folder using the [Mount Configuration](/hugo-modules/configuration/#module-config-mounts).
+
+| Function | Description |
+| ------------- | ------------- |
+| `resources.Get` | Get locates the filename given in Hugo's assets filesystem and creates a `Resource` object that can be used for further transformations. See [Get Resource with resources.Get and resources.GetRemote](#get-resource-with-resourcesget-and-resourcesgetremote). |
+| `resources.GetRemote` | Same as `Get`, but it accepts remote URLs. See [Get Resource with resources.Get and resources.GetRemote](#get-resource-with-resourcesget-and-resourcesgetremote).|
+| `resources.GetMatch` | `GetMatch` finds the first Resource matching the given pattern, or nil if none found. See Match for a more complete explanation about the rules used. |
+| `resources.Match` | `Match` gets all resources matching the given base path prefix, e.g "*.png" will match all png files. The "*" does not match path delimiters (/), so if you organize your resources in sub-folders, you need to be explicit about it, e.g.: "images/*.png". To match any PNG image anywhere in the bundle you can do "\*\*.png", and to match all PNG images below the images folder, use "images/\*\*.jpg". The matching is case insensitive. Match matches by using the files name with path relative to the file system root with Unix style slashes (/) and no leading slash, e.g. "images/logo.png". See https://github.com/gobwas/glob for the full rules set.|
+
+See the [GoDoc Page](https://pkg.go.dev/github.com/gohugoio/hugo@v0.93.1/tpl/resources) for the `resources` package for an up to date overview of all template functions in this namespace.
+
+## Get Resource with resources.Get and resources.GetRemote
+
+In order to process an asset with Hugo Pipes, it must be retrieved as a `Resource` using `resources.Get` or `resources.GetRemote`.
+
+With `resources.Get`, the first argument is a local path relative to the `assets` directory/directories:
+
+```go-html-template
+{{ $local := resources.Get "sass/main.scss" }}
+```
+
+With `resources.GetRemote`, the first argument is a remote URL:
+
+```go-html-template
+{{ $remote := resources.GetRemote "https://www.example.com/styles.scss" }}
+```
+
+`resources.Get` and `resources.GetRemote` return `nil` if the resource is not found.
+
+{{< new-in "0.110.0" >}} You can get information about the HTTP Response using `.Data` in the returned `Resource`. This is especially useful for HEAD request without any body. The Data object contains:
+
+StatusCode
+: The HTTP status code, e.g. 200
+Status
+: The HTTP status text, e.g. "200 OK"
+TransferEncoding
+: The transfer encoding, e.g. "chunked"
+ContentLength
+: The content length, e.g. 1234
+ContentType
+: The content type, e.g. "text/html"
+
+### Caching
+
+By default, Hugo calculates a cache key based on the `URL` and the `options` (e.g. headers) given.
+
+{{< new-in "0.97.0" >}} You can override this by setting a `key` in the options map. This can be used to get more fine grained control over how often a remote resource is fetched, e.g.:
+
+
+```go-html-template
+{{ $cacheKey := print $url (now.Format "2006-01-02") }}
+{{ $resource := resource.GetRemote $url (dict "key" $cacheKey) }}
+```
+
+### Error Handling
+
+The return value from `resources.GetRemote` includes an `.Err` method that will return an error if the call failed. If you want to just log any error as a `WARNING` you can use a construct similar to the one below.
+
+```go-html-template
+{{ with resources.GetRemote "https://gohugo.io/images/gohugoio-card-1.png" }}
+ {{ with .Err }}
+ {{ warnf "%s" . }}
+ {{ else }}
+ <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+ {{ end }}
+{{ end }}
+```
+
+Note that if you do not handle `.Err` yourself, Hugo will fail the build the first time you start using the `Resource` object.
+
+### Remote Options
+
+When fetching a remote `Resource`, `resources.GetRemote` takes an optional options map as the second argument, e.g.:
+
+```go-html-template
+{{ $resource := resources.GetRemote "https://example.org/api" (dict "headers" (dict "Authorization" "Bearer abcd")) }}
+```
+
+If you need multiple values for the same header key, use a slice:
+
+```go-html-template
+{{ $resource := resources.GetRemote "https://example.org/api" (dict "headers" (dict "X-List" (slice "a" "b" "c"))) }}
+```
+
+You can also change the request method and set the request body:
+
+```go-html-template
+{{ $postResponse := resources.GetRemote "https://example.org/api" (dict
+ "method" "post"
+ "body" `{"complete": true}`
+ "headers" (dict
+ "Content-Type" "application/json"
+ )
+)}}
+```
+
+### Caching of Remote Resources
+
+Remote resources fetched with `resources.GetRemote` will be cached on disk. See [Configure File Caches](/getting-started/configuration/#configure-file-caches) for details.
+
+## Copy a Resource
+
+{{< new-in "0.100.0" >}}
+
+`resources.Copy` allows you to copy almost any Hugo `Resource` (the one exception is the `Page`), possibly most useful for renaming things:
+
+```go-html-template
++{{ with resources.Get "img/a.jpg" }}
++ {{ with .Resize "300x" }}
++ {{ with resources.Copy "img/a-new.jpg" . }}
++ <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
++ {{ end }}
++ {{ end }}
++{{ end }}
+```
+
++{{% note %}}
++The target path must be different than the source path, as shown in the example above. See GitHub issue [#10412](https://github.com/gohugoio/hugo/issues/10412).
++{{% /note %}}
++
+## Asset directory
+
+Asset files must be stored in the asset directory. This is `/assets` by default, but can be configured via the configuration file's `assetDir` key.
+
+### Asset Publishing
+
+Hugo publishes assets to the `publishDir` (typically `public`) when you invoke `.Permalink`, `.RelPermalink`, or `.Publish`. You can use `.Content` to inline the asset.
+
+## Go Pipes
+
+For improved readability, the Hugo Pipes examples of this documentation will be written using [Go Pipes](/templates/introduction/#pipes):
+
+```go-html-template
+{{ $style := resources.Get "sass/main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
+<link rel="stylesheet" href="{{ $style.Permalink }}">
+```
+
+## Method aliases
+
+Each Hugo Pipes `resources` transformation method uses a __camelCased__ alias (`toCSS` for `resources.ToCSS`).
+Non-transformation methods deprived of such aliases are `resources.Get`, `resources.FromString`, `resources.ExecuteAsTemplate` and `resources.Concat`.
+
+The example above can therefore also be written as follows:
+
+```go-html-template
+{{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint }}
+<link rel="stylesheet" href="{{ $style.Permalink }}">
+```
+
+## Caching
+
+Hugo Pipes invocations are cached based on the entire *pipe chain*.
+
+An example of a pipe chain is:
+
+```go-html-template
+{{ $mainJs := resources.Get "js/main.js" | js.Build "main.js" | minify | fingerprint }}
+```
+
+The pipe chain is only invoked the first time it is encountered in a site build, and results are otherwise loaded from cache. As such, Hugo Pipes can be used in templates which are executed thousands or millions of times without negatively impacting the build performance.
--- /dev/null
- {{< code-toggle file="config" >}}
+---
+title: PostProcess
+description: Allows delaying of resource transformations to after the build.
+categories: [asset management]
+keywords: []
+menu:
+ docs:
+ parent: pipes
+ weight: 39
+weight: 39
+signature: ["resources.PostProcess RESOURCE"]
+---
+
+## Usage
+
+Marking a resource with `resources.PostProcess` delays any transformations to after the build, typically because one or more of the steps in the transformation chain depends on the result of the build (e.g. files in `public`).
+
+A prime use case for this is [CSS purging with PostCSS](#css-purging-with-postcss).
+
+There are currently two limitations to this:
+
+1. This only works in `*.html` templates (i.e. templates that produces HTML files).
+2. You cannot manipulate the values returned from the resource's methods. E.g. the `upper` in this example will not work as expected:
+
+ ```go-html-template
+ {{ $css := resources.Get "css/main.css" }}
+ {{ $css = $css | resources.PostCSS | minify | fingerprint | resources.PostProcess }}
+ {{ $css.RelPermalink | upper }}
+ ```
+
+## CSS purging with PostCSS
+
+{{% note %}}
+There are several ways to set up CSS purging with PostCSS in Hugo. If you have a simple project, you should consider going the simpler route and drop the use of `resources.PostProcess` and just extract keywords from the templates. See the [Tailwind documentation](https://tailwindcss.com/docs/controlling-file-size/#app) for some examples.
+{{% /note %}}
+
+The below configuration will write a `hugo_stats.json` file to the project root as part of the build. If you're only using this for the production build, you should consider placing it below [config/production](/getting-started/configuration/#configuration-directory).
+
++{{< code-toggle file="hugo" >}}
+[build]
+ writeStats = true
+{{< /code-toggle >}}
+
+`postcss.config.js`
+
+```js
+const purgecss = require('@fullhuman/postcss-purgecss')({
+ content: [ './hugo_stats.json' ],
+ defaultExtractor: (content) => {
+ let els = JSON.parse(content).htmlElements;
+ return els.tags.concat(els.classes, els.ids);
+ }
+});
+
+module.exports = {
+ plugins: [
+ ...(process.env.HUGO_ENVIRONMENT === 'production' ? [ purgecss ] : [])
+ ]
+ };
+```
+
+Note that in the example above, the "CSS purge step" will only be applied to the production build. This means that you need to do something like this in your head template to build and include your CSS:
+
+```go-html-template
+{{ $css := resources.Get "css/main.css" }}
+{{ $css = $css | resources.PostCSS }}
+{{ if hugo.IsProduction }}
+{{ $css = $css | minify | fingerprint | resources.PostProcess }}
+{{ end }}
+<link href="{{ $css.RelPermalink }}" rel="stylesheet" />
+```
+
+
+## Hugo Environment variables available in PostCSS
+
+These are the environment variables Hugo passes down to PostCSS (and Babel), which allows you do do `process.env.HUGO_ENVIRONMENT === 'production' ? [autoprefixer] : []` and similar:
+
+PWD
+: The absolute path to the project working directory.
+HUGO_ENVIRONMENT (and the alias HUGO_ENV)
+: The value e.g. set with `hugo -e production` (defaults to `production` for `hugo` and `development` for `hugo server`).
+
+HUGO_PUBLISHDIR
+: {{< new-in "0.109.0" >}} The absolute path to the publish directory (the `public` directory). Note that the value will always point to a directory on disk even when running `hugo server` in memory mode. If you write to this folder from PostCSS when running the server, you could run the server with one of these flags:
+
+```
+hugo server --renderToDisk
+hugo server --renderStaticToDisk
+```
+
+Also, Hugo will add environment variables for all files mounted below `assets/_jsconfig`. A default mount will be set up with files in the project root matching this regexp: `(babel|postcss|tailwind)\.config\.js`.
+
+These will get environment variables named on the form `HUGO_FILE_:filename:` where `:filename:` is all upper case with periods replaced with underscore. This allows you to do this and similar:
+
+```js
+let tailwindConfig = process.env.HUGO_FILE_TAILWIND_CONFIG_JS || './tailwind.config.js';
+```
--- /dev/null
- {{< code-toggle file="config" >}}
+---
+title: Internal Templates
+description: Hugo ships with a group of boilerplate templates that cover the most common use cases for static websites.
+categories: [templates]
+keywords: [internal, analytics,]
+menu:
+ docs:
+ parent: templates
+ weight: 168
+weight: 168
+toc: true
+---
+<!-- reference: https://discourse.gohugo.io/t/lookup-order-for-partials/5705/6
+code: https://github.com/gohugoio/hugo/blob/e445c35d6a0c7f5fc2f90f31226cd1d46e048bbc/tpl/template_embedded.go#L147 -->
+
+{{% note %}}
+While the following internal templates are called similar to partials, they do *not* observe the partial template lookup order.
+{{% /note %}}
+
+## Google Analytics
+
+Hugo ships with internal templates supporting Google Analytics, both [Google Analytics 4][GA4] (GA4) and Universal Analytics.
+
+**Note:** Universal Analytics are deprecated. For details, see [Universal Analytics will be going away].
+
+[GA4]: https://support.google.com/analytics/answer/10089681
+[Universal Analytics will be going away]: https://support.google.com/analytics/answer/11583528
+
+### Configure Google Analytics
+
+Provide your tracking ID in your configuration file:
+
+**Google Analytics 4 (gtag.js)**
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+googleAnalytics = "G-MEASUREMENT_ID"
+{{</ code-toggle >}}
+
+**Google Universal Analytics (analytics.js)**
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+googleAnalytics = "UA-PROPERTY_ID"
+{{</ code-toggle >}}
+
+### Use the Google Analytics Template
+
+You can then include the Google Analytics internal template:
+
+```go-html-template
+{{ template "_internal/google_analytics_async.html" . }}
+```
+
+**Note:** The async template is _not_ suitable for Google Analytics 4.
+
+```go-html-template
+{{ template "_internal/google_analytics.html" . }}
+```
+
+If you want to create your own template, you can access the configured ID with `{{ site.Config.Services.GoogleAnalytics.ID }}`.
+
+## Disqus
+
+Hugo also ships with an internal template for [Disqus comments][disqus], a popular commenting system for both static and dynamic websites. In order to effectively use Disqus, you will need to secure a Disqus "shortname" by [signing up for the free service][disqussignup].
+
+### Configure Disqus
+
+To use Hugo's Disqus template, you first need to set a single configuration value:
+
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+disqusShortname = "your-disqus-shortname"
+{{</ code-toggle >}}
+
+You also have the option to set the following in the front matter for a given piece of content:
+
+* `disqus_identifier`
+* `disqus_title`
+* `disqus_url`
+
+### Use the Disqus Template
+
+To add Disqus, include the following line in templates where you want your comments to appear:
+
+```go-html-template
+{{ template "_internal/disqus.html" . }}
+```
+
+A `.Site.DisqusShortname` variable is also exposed from the config.
+
+### Conditional Loading of Disqus Comments
+
+Users have noticed that enabling Disqus comments when running the Hugo web server on `localhost` (i.e. via `hugo server`) causes the creation of unwanted discussions on the associated Disqus account.
+
+You can create the following `layouts/partials/disqus.html`:
+
+{{< code file="layouts/partials/disqus.html" >}}
+<div id="disqus_thread"></div>
+<script type="text/javascript">
+
+(function() {
+ // Don't ever inject Disqus on localhost--it creates unwanted
+ // discussions from 'localhost:1313' on your Disqus account...
+ if (window.location.hostname == "localhost")
+ return;
+
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ var disqus_shortname = '{{ .Site.DisqusShortname }}';
+ dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+})();
+</script>
+<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+{{< /code >}}
+
+The `if` statement skips the initialization of the Disqus comment injection when you are running on `localhost`.
+
+You can then render your custom Disqus partial template as follows:
+
+```go-html-template
+{{ partial "disqus.html" . }}
+```
+
+## Open Graph
+
+An internal template for the [Open Graph protocol](https://ogp.me/), metadata that enables a page to become a rich object in a social graph.
+This format is used for Facebook and some other sites.
+
+### Configure Open Graph
+
+Hugo's Open Graph template is configured using a mix of configuration variables and [front-matter](/content-management/front-matter/) on individual pages.
+
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+[params]
+ title = "My cool site"
+ images = ["site-feature-image.jpg"]
+ description = "Text about my cool site"
+[taxonomies]
+ series = "series"
+{{</ code-toggle >}}
+
+{{< code-toggle file="content/blog/my-post" >}}
+title = "Post title"
+description = "Text about this post"
+date = "2006-01-02"
+images = ["post-cover.png"]
+audio = []
+videos = []
+series = []
+tags = []
+{{</ code-toggle >}}
+
+Hugo uses the page title and description for the title and description metadata.
+The first 6 URLs from the `images` array are used for image metadata.
+If [page bundles](/content-management/page-bundles/) are used and the `images` array is empty or undefined, images with filenames matching `*feature*` or `*cover*,*thumbnail*` are used for image metadata.
+
+Various optional metadata can also be set:
+
+- Date, published date, and last modified data are used to set the published time metadata if specified.
+- `audio` and `videos` are URL arrays like `images` for the audio and video metadata tags, respectively.
+- The first 6 `tags` on the page are used for the tags metadata.
+- The `series` taxonomy is used to specify related "see also" pages by placing them in the same series.
+
+If using YouTube this will produce a og:video tag like `<meta property="og:video" content="url">`. Use the `https://youtu.be/<id>` format with YouTube videos (example: `https://youtu.be/qtIqKaDlqXo`).
+
+### Use the Open Graph Template
+
+To add Open Graph metadata, include the following line between the `<head>` tags in your templates:
+
+```go-html-template
+{{ template "_internal/opengraph.html" . }}
+```
+
+## Twitter Cards
+
+An internal template for [Twitter Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards),
+metadata used to attach rich media to Tweets linking to your site.
+
+### Configure Twitter Cards
+
+Hugo's Twitter Card template is configured using a mix of configuration variables and [front-matter](/content-management/front-matter/) on individual pages.
+
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+[params]
+ images = ["site-feature-image.jpg"]
+ description = "Text about my cool site"
+{{</ code-toggle >}}
+
+{{< code-toggle file="content/blog/my-post" >}}
+title = "Post title"
+description = "Text about this post"
+images = ["post-cover.png"]
+{{</ code-toggle >}}
+
+If `images` aren't specified in the page front-matter, then hugo searches for [image page resources](/content-management/image-processing/) with `feature`, `cover`, or `thumbnail` in their name.
+If no image resources with those names are found, the images defined in the [site config](/getting-started/configuration/) are used instead.
+If no images are found at all, then an image-less Twitter `summary` card is used instead of `summary_large_image`.
+
+Hugo uses the page title and description for the card's title and description fields. The page summary is used if no description is given.
+
+The `.Site.Social.twitter` variable is exposed from the config as the value for `twitter:site`.
+
++{{< code-toggle file="hugo" >}}
+[social]
+ twitter = "GoHugoIO"
+{{</ code-toggle >}}
+
+NOTE: The `@` will be added for you
+
+```html
+<meta name="twitter:site" content="@GoHugoIO"/>
+```
+
+### Use the Twitter Cards Template
+
+To add Twitter card metadata, include the following line immediately after the `<head>` element in your templates:
+
+```go-html-template
+{{ template "_internal/twitter_cards.html" . }}
+```
+
+## The Internal Templates
+
+The code for these templates is located [here](https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates).
+
+* `_internal/disqus.html`
+* `_internal/google_analytics.html`
+* `_internal/google_analytics_async.html`
+* `_internal/opengraph.html`
+* `_internal/pagination.html`
+* `_internal/schema.html`
+* `_internal/twitter_cards.html`
+
+[disqus]: https://disqus.com
+[disqussignup]: https://disqus.com/profile/signup/
--- /dev/null
- {{< code-toggle file="config" >}}
+---
+title: Introduction to Hugo Templating
+linktitle: Templating
+description: Hugo uses Go's `html/template` and `text/template` libraries as the basis for the templating.
+categories: [templates,fundamentals]
+keywords: [go]
+menu:
+ docs:
+ parent: templates
+ weight: 10
+weight: 10
+aliases: [/layouts/introduction/,/layout/introduction/, /templates/go-templates/]
+toc: true
+---
+
+{{% note %}}
+The following is only a primer on Go Templates. For an in-depth look into Go Templates, check the official [Go docs](https://golang.org/pkg/text/template/).
+{{% /note %}}
+
+Go Templates provide an extremely simple template language that adheres to the belief that only the most basic of logic belongs in the template or view layer.
+
+## Basic Syntax
+
+Go Templates are HTML files with the addition of [variables][variables] and [functions][functions]. Go Template variables and functions are accessible within `{{ }}`.
+
+### Access a Predefined Variable
+
+A _predefined variable_ could be a variable already existing in the
+current scope (like the `.Title` example in the [Variables](#variables) section below) or a custom variable (like the
+`$address` example in that same section).
+
+
+```go-html-template
+{{ .Title }}
+{{ $address }}
+```
+
+Parameters for functions are separated using spaces. The general syntax is:
+
+```go-html-template
+{{ FUNCTION ARG1 ARG2 .. }}
+```
+
+The following example calls the `add` function with inputs of `1` and `2`:
+
+```go-html-template
+{{ add 1 2 }}
+```
+
+#### Methods and Fields are Accessed via dot Notation
+
+Accessing the Page Parameter `bar` defined in a piece of content's [front matter].
+
+```go-html-template
+{{ .Params.bar }}
+```
+
+#### Parentheses Can be Used to Group Items Together
+
+```go-html-template
+{{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }}
+```
+
+#### A Single Statement Can be Split over Multiple Lines
+
+```go-html-template
+{{ if or
+ (isset .Params "alt")
+ (isset .Params "caption")
+}}
+```
+
+#### Raw String Literals Can Include Newlines
+
+```go-html-template
+{{ $msg := `Line one.
+Line two.` }}
+```
+
+## Variables {#variables}
+
+Each Go Template gets a data object. In Hugo, each template is passed
+a `Page`. In the below example, `.Title` is one of the elements
+accessible in that [`Page` variable][pagevars].
+
+With the `Page` being the default scope of a template, the `Title`
+element in current scope (`.` -- "the **dot**") is accessible simply
+by the dot-prefix (`.Title`):
+
+```go-html-template
+<title>{{ .Title }}</title>
+```
+
+Values can also be stored in custom variables and referenced later:
+
+{{% note %}}
+The custom variables need to be prefixed with `$`.
+{{% /note %}}
+
+```go-html-template
+{{ $address := "123 Main St." }}
+{{ $address }}
+```
+
+Variables can be re-defined using the `=` operator. The example below
+prints "Var is Hugo Home" on the home page, and "Var is Hugo Page" on
+all other pages:
+
+```go-html-template
+{{ $var := "Hugo Page" }}
+{{ if .IsHome }}
+ {{ $var = "Hugo Home" }}
+{{ end }}
+Var is {{ $var }}
+```
+
+## Functions
+
+Go Templates only ship with a few basic functions but also provide a mechanism for applications to extend the original set.
+
+[Hugo template functions][functions] provide additional functionality specific to building websites. Functions are called by using their name followed by the required parameters separated by spaces. Template functions cannot be added without recompiling Hugo.
+
+### Example 1: Adding Numbers
+
+```go-html-template
+{{ add 1 2 }}
+<!-- prints 3 -->
+```
+
+### Example 2: Comparing Numbers
+
+```go-html-template
+{{ lt 1 2 }}
+<!-- prints true (i.e., since 1 is less than 2) -->
+```
+
+Note that both examples make use of Go Template's [math][math] functions.
+
+{{% note %}}
+There are more boolean operators than those listed in the Hugo docs in the [Go Template documentation](https://golang.org/pkg/text/template/#hdr-Functions).
+{{% /note %}}
+
+## Includes
+
+When including another template, you will need to pass it the data that it would
+need to access.
+
+{{% note %}}
+To pass along the current context, please remember to include a trailing **dot**.
+{{% /note %}}
+
+The templates location will always be starting at the `layouts/` directory
+within Hugo.
+
+### Partial
+
+The [`partial`][partials] function is used to include _partial_ templates using
+the syntax `{{ partial "<PATH>/<PARTIAL>.<EXTENSION>" . }}`.
+
+Example of including a `layouts/partials/header.html` partial:
+
+```go-html-template
+{{ partial "header.html" . }}
+```
+
+### Template
+
+The `template` function was used to include _partial_ templates
+in much older Hugo versions. Now it's useful only for calling
+[_internal_ templates][internal templates]. The syntax is `{{ template
+"_internal/<TEMPLATE>.<EXTENSION>" . }}`.
+
+{{% note %}}
+The available **internal** templates can be found
+[here](https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates).
+{{% /note %}}
+
+Example of including the internal `opengraph.html` template:
+
+```go-html-template
+{{ template "_internal/opengraph.html" . }}
+```
+
+## Logic
+
+Go Templates provide the most basic iteration and conditional logic.
+
+### Iteration
+
+The Go Templates make heavy use of `range` to iterate over a _map_,
+_array_, or _slice_. The following are different examples of how to
+use `range`.
+
+#### Example 1: Using Context (`.`)
+
+```go-html-template
+{{ range $array }}
+ {{ . }} <!-- The . represents an element in $array -->
+{{ end }}
+```
+
+#### Example 2: Declaring a variable name for an array element's value
+
+```go-html-template
+{{ range $elem_val := $array }}
+ {{ $elem_val }}
+{{ end }}
+```
+
+#### Example 3: Declaring variable names for an array element's index _and_ value
+
+For an array or slice, the first declared variable will map to each
+element's index.
+
+```go-html-template
+{{ range $elem_index, $elem_val := $array }}
+ {{ $elem_index }} -- {{ $elem_val }}
+{{ end }}
+```
+
+#### Example 4: Declaring variable names for a map element's key _and_ value
+
+For a map, the first declared variable will map to each map element's
+key.
+
+```go-html-template
+{{ range $elem_key, $elem_val := $map }}
+ {{ $elem_key }} -- {{ $elem_val }}
+{{ end }}
+```
+
+#### Example 5: Conditional on empty _map_, _array_, or _slice_
+
+If the _map_, _array_, or _slice_ passed into the range is zero-length then the else statement is evaluated.
+
+```go-html-template
+{{ range $array }}
+ {{ . }}
+{{ else }}
+ <!-- This is only evaluated if $array is empty -->
+{{ end }}
+```
+
+### Conditionals
+
+`if`, `else`, `with`, `or`, `and` and `not` provide the framework for handling conditional logic in Go Templates. Like `range`, `if` and `with` statements are closed with an `{{ end }}`.
+
+Go Templates treat the following values as **false**:
+
+- `false` (boolean)
+- 0 (integer)
+- any zero-length array, slice, map, or string
+
+#### Example 1: `with`
+
+It is common to write "if something exists, do this" kind of
+statements using `with`.
+
+{{% note %}}
+`with` rebinds the context `.` within its scope (just like in `range`).
+{{% /note %}}
+
+It skips the block if the variable is absent, or if it evaluates to
+"false" as explained above.
+
+```go-html-template
+{{ with .Params.title }}
+ <h4>{{ . }}</h4>
+{{ end }}
+```
+
+#### Example 2: `with` .. `else`
+
+Below snippet uses the "description" front-matter parameter's value if
+set, else uses the default `.Summary` [Page variable][pagevars]:
+
+
+```go-html-template
+{{ with .Param "description" }}
+ {{ . }}
+{{ else }}
+ {{ .Summary }}
+{{ end }}
+```
+
+See the [`.Param` function][param].
+
+#### Example 3: `if`
+
+An alternative (and a more verbose) way of writing `with` is using
+`if`. Here, the `.` does not get rebound.
+
+Below example is "Example 1" rewritten using `if`:
+
+```go-html-template
+{{ if isset .Params "title" }}
+ <h4>{{ index .Params "title" }}</h4>
+{{ end }}
+```
+
+#### Example 4: `if` .. `else`
+
+Below example is "Example 2" rewritten using `if` .. `else`, and using
+[`isset` function][isset] + `.Params` variable (different from the
+[`.Param` **function**][param]) instead:
+
+```go-html-template
+{{ if (isset .Params "description") }}
+ {{ index .Params "description" }}
+{{ else }}
+ {{ .Summary }}
+{{ end }}
+```
+
+#### Example 5: `if` .. `else if` .. `else`
+
+Unlike `with`, `if` can contain `else if` clauses too.
+
+```go-html-template
+{{ if (isset .Params "description") }}
+ {{ index .Params "description" }}
+{{ else if (isset .Params "summary") }}
+ {{ index .Params "summary" }}
+{{ else }}
+ {{ .Summary }}
+{{ end }}
+```
+
+#### Example 6: `and` & `or`
+
+```go-html-template
+{{ if (and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")) }}
+```
+
+## Pipes
+
+One of the most powerful components of Go Templates is the ability to stack actions one after another. This is done by using pipes. Borrowed from Unix pipes, the concept is simple: each pipeline's output becomes the input of the following pipe.
+
+Because of the very simple syntax of Go Templates, the pipe is essential to being able to chain together function calls. One limitation of the pipes is that they can only work with a single value and that value becomes the last parameter of the next pipeline.
+
+A few simple examples should help convey how to use the pipe.
+
+### Example 1: `shuffle`
+
+The following two examples are functionally the same:
+
+```go-html-template
+{{ shuffle (seq 1 5) }}
+```
+
+
+```go-html-template
+{{ (seq 1 5) | shuffle }}
+```
+
+### Example 2: `index`
+
+The following accesses the page parameter called "disqus_url" and escapes the HTML. This example also uses the [`index` function](/functions/index-function/), which is built into Go Templates:
+
+```go-html-template
+{{ index .Params "disqus_url" | html }}
+```
+
+### Example 3: `or` with `isset`
+
+```go-html-template
+{{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr") }}
+Stuff Here
+{{ end }}
+```
+
+Could be rewritten as
+
+```go-html-template
+{{ if isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" }}
+Stuff Here
+{{ end }}
+```
+
+## Context (aka "the dot") {#the-dot}
+
+The most easily overlooked concept to understand about Go Templates is
+that `{{ . }}` always refers to the **current context**.
+
+- In the top level of your template, this will be the data set made
+ available to it.
+- Inside an iteration, however, it will have the value of the
+ current item in the loop; i.e., `{{ . }}` will no longer refer to
+ the data available to the entire page.
+
+If you need to access page-level data (e.g., page params set in front
+matter) from within the loop, you will likely want to do one of the
+following:
+
+### 1. Define a Variable Independent of Context
+
+The following shows how to define a variable independent of the context.
+
+{{< code file="tags-range-with-page-variable.html" >}}
+{{ $title := .Site.Title }}
+<ul>
+{{ range .Params.tags }}
+ <li>
+ <a href="/tags/{{ . | urlize }}">{{ . }}</a>
+ - {{ $title }}
+ </li>
+{{ end }}
+</ul>
+{{< /code >}}
+
+{{% note %}}
+Notice how once we have entered the loop (i.e. `range`), the value of `{{ . }}` has changed. We have defined a variable outside the loop (`{{ $title }}`) that we've assigned a value so that we have access to the value from within the loop as well.
+{{% /note %}}
+
+### 2. Use `$.` to Access the Global Context
+
+`$` has special significance in your templates. `$` is set to the starting value of `.` ("the dot") by default. This is a [documented feature of Go text/template][dotdoc]. This means you have access to the global context from anywhere. Here is an equivalent example of the preceding code block but now using `$` to grab `.Site.Title` from the global context:
+
+{{< code file="range-through-tags-w-global.html" >}}
+<ul>
+{{ range .Params.tags }}
+ <li>
+ <a href="/tags/{{ . | urlize }}">{{ . }}</a>
+ - {{ $.Site.Title }}
+ </li>
+{{ end }}
+</ul>
+{{< /code >}}
+
+{{% warning "Don't Redefine the Dot" %}}
+The built-in magic of `$` would cease to work if someone were to mischievously redefine the special character; e.g. `{{ $ := .Site }}`. *Don't do it.* You may, of course, recover from this mischief by using `{{ $ := . }}` in a global context to reset `$` to its default value.
+{{% /note %}}
+
+## Whitespace
+
+Go 1.6 includes the ability to trim the whitespace from either side of a Go tag by including a hyphen (`-`) and space immediately beside the corresponding `{{` or `}}` delimiter.
+
+For instance, the following Go Template will include the newlines and horizontal tab in its HTML output:
+
+```go-html-template
+<div>
+ {{ .Title }}
+</div>
+```
+
+Which will output:
+
+```html
+<div>
+ Hello, World!
+</div>
+```
+
+Leveraging the `-` in the following example will remove the extra white space surrounding the `.Title` variable and remove the newline:
+
+```go-html-template
+<div>
+ {{- .Title -}}
+</div>
+```
+
+Which then outputs:
+
+```html
+<div>Hello, World!</div>
+```
+
+Go considers the following characters _whitespace_:
+
+* <kbd>space</kbd>
+* horizontal <kbd>tab</kbd>
+* carriage <kbd>return</kbd>
+* newline
+
+## Comments
+
+In order to keep your templates organized and share information throughout your team, you may want to add comments to your templates. There are two ways to do that with Hugo.
+
+### Go Templates comments
+
+Go Templates support `{{/*` and `*/}}` to open and close a comment block. Nothing within that block will be rendered.
+
+For example:
+
+```go-html-template
+Bonsoir, {{/* {{ add 0 + 2 }} */}}Eliott.
+```
+
+Will render `Bonsoir, Eliott.`, and not care about the syntax error (`add 0 + 2`) in the comment block.
+
+### HTML comments
+
+You can add html comments by piping a string HTML code comment to `safeHTML`.
+
+For example:
+
+```go-html-template
+{{ "<!-- This is an HTML comment -->" | safeHTML }}
+```
+
+If you need variables to construct such HTML comments, just pipe `printf` to `safeHTML`.
+
+For example:
+
+```go-html-template
+{{ printf "<!-- Our website is named: %s -->" .Site.Title | safeHTML }}
+```
+
+#### HTML comments containing Go Templates
+
+HTML comments are by default stripped, but their content is still evaluated. That means that although the HTML comment will never render any content to the final HTML pages, code contained within the comment may fail the build process.
+
+{{% note %}}
+Do **not** try to comment out Go Template code using HTML comments.
+{{% /note %}}
+
+```go-html-template
+<!-- {{ $author := "Emma Goldman" }} was a great woman. -->
+{{ $author }}
+```
+
+The templating engine will strip the content within the HTML comment, but will first evaluate any Go Template code if present within. So the above example will render `Emma Goldman`, as the `$author` variable got evaluated in the HTML comment. But the build would have failed if that code in the HTML comment had an error.
+
+## Hugo Parameters
+
+Hugo provides the option of passing values to your template layer through your [site configuration][config] (i.e. for site-wide values) or through the metadata of each specific piece of content (i.e. the [front matter]). You can define any values of any type and use them however you want in your templates, as long as the values are supported by the [front matter format](/content-management/front-matter#front-matter-formats).
+
+## Use Content (`Page`) Parameters
+
+You can provide variables to be used by templates in individual content's [front matter].
+
+An example of this is used in the Hugo docs. Most of the pages benefit from having the table of contents provided, but sometimes the table of contents doesn't make a lot of sense. We've defined a `notoc` variable in our front matter that will prevent a table of contents from rendering when specifically set to `true`.
+
+Here is the example front matter:
+
+{{< code-toggle file="content/example.md" fm=true copy=false >}}
+title: Example
+notoc: true
+{{< /code-toggle >}}
+
+Here is an example of corresponding code that could be used inside a `toc.html` [partial template][partials]:
+
+{{< code file="layouts/partials/toc.html" >}}
+{{ if not .Params.notoc }}
+<aside>
+ <header>
+ <a href="#{{ .Title | urlize }}">
+ <h3>{{ .Title }}</h3>
+ </a>
+ </header>
+ {{ .TableOfContents }}
+</aside>
+<a href="#" id="toc-toggle"></a>
+{{ end }}
+{{< /code >}}
+
+We want the *default* behavior to be for pages to include a TOC unless otherwise specified. This template checks to make sure that the `notoc:` field in this page's front matter is not `true`.
+
+## Use Site Configuration Parameters
+
+You can arbitrarily define as many site-level parameters as you want in your [site's configuration file][config]. These parameters are globally available in your templates.
+
+For instance, you might declare the following:
+
++{{< code-toggle file="hugo" >}}
+params:
+ copyrighthtml: "Copyright © 2017 John Doe. All Rights Reserved."
+ twitteruser: "spf13"
+ sidebarrecentlimit: 5
+{{< /code >}}
+
+Within a footer layout, you might then declare a `<footer>` that is only rendered if the `copyrighthtml` parameter is provided. If it *is* provided, you will then need to declare the string is safe to use via the [`safeHTML` function][safehtml] so that the HTML entity is not escaped again. This would let you easily update just your top-level config file each January 1st, instead of hunting through your templates.
+
+```go-html-template
+{{ if .Site.Params.copyrighthtml }}
+ <footer>
+ <div class="text-center">{{ .Site.Params.CopyrightHTML | safeHTML }}</div>
+ </footer>
+{{ end }}
+```
+
+An alternative way of writing the "`if`" and then referencing the same value is to use [`with`][with] instead. `with` rebinds the context (`.`) within its scope and skips the block if the variable is absent:
+
+{{< code file="layouts/partials/twitter.html" >}}
+{{ with .Site.Params.twitteruser }}
+ <div>
+ <a href="https://twitter.com/{{ . }}" rel="author">
+ <img src="/images/twitter.png" width="48" height="48" title="Twitter: {{ . }}" alt="Twitter"></a>
+ </div>
+{{ end }}
+{{< /code >}}
+
+Finally, you can pull "magic constants" out of your layouts as well. The following uses the [`first`][first] function, as well as the [`.RelPermalink`][relpermalink] page variable and the [`.Site.Pages`][sitevars] site variable.
+
+```go-html-template
+<nav>
+ <h1>Recent Posts</h1>
+ <ul>
+ {{- range first .Site.Params.SidebarRecentLimit .Site.Pages -}}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{- end -}}
+ </ul>
+</nav>
+```
+
+## Example: Show Future Events
+
+Given the following content structure and [front matter]:
+
+```text
+content/
+└── events/
+ ├── event-1.md
+ ├── event-2.md
+ └── event-3.md
+```
+
+{{< code-toggle file="content/events/event-1.md" copy=false >}}
+title = 'Event 1'
+date = 2021-12-06T10:37:16-08:00
+draft = false
+start_date = 2021-12-05T09:00:00-08:00
+end_date = 2021-12-05T11:00:00-08:00
+{{< /code-toggle >}}
+
+This [partial template][partials] renders future events:
+
+{{< code file="layouts/partials/future-events.html" >}}
+<h2>Future Events</h2>
+<ul>
+ {{ range where site.RegularPages "Type" "events" }}
+ {{ if gt (.Params.start_date | time.AsTime) now }}
+ {{ $startDate := .Params.start_date | time.Format ":date_medium" }}
+ <li>
+ <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> - {{ $startDate }}
+ </li>
+ {{ end }}
+ {{ end }}
+</ul>
+{{< /code >}}
+
+If you restrict front matter to the TOML format, and omit quotation marks surrounding date fields, you can perform date comparisons without casting.
+
+{{< code file="layouts/partials/future-events.html" >}}
+<h2>Future Events</h2>
+<ul>
+ {{ range where (where site.RegularPages "Type" "events") "Params.start_date" "gt" now }}
+ {{ $startDate := .Params.start_date | time.Format ":date_medium" }}
+ <li>
+ <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> - {{ $startDate }}
+ </li>
+ {{ end }}
+</ul>
+{{< /code >}}
+
+[dotdoc]: https://golang.org/pkg/text/template/#hdr-Variables
+[config]: /getting-started/configuration
+[first]: /functions/first
+[front matter]: /content-management/front-matter
+[functions]: /functions
+[internal templates]: /templates/internal
+[isset]: /functions/isset
+[math]: /functions/math
+[pagevars]: /variables/page
+[param]: /functions/param
+[partials]: /templates/partials
+[relpermalink]: /variables/page#page-variables
+[safehtml]: /functions/safehtml
+[sitevars]: /variables/site
+[variables]: /variables
+[with]: /functions/with
--- /dev/null
- {{< code-toggle file="config" >}}
+---
+title: Custom Output Formats
+description: Hugo can output content in multiple formats, including calendar events, e-book formats, Google AMP, and JSON search indexes, or any custom text format.
+categories: [templates]
+keywords: ["amp", "outputs", "rss"]
+menu:
+ docs:
+ parent: templates
+ weight: 18
+weight: 18
+aliases: [/templates/outputs/,/extras/output-formats/,/content-management/custom-outputs/]
+toc: true
+---
+
+This page describes how to properly configure your site with the media types and output formats, as well as where to create your templates for your custom outputs.
+
+## Media Types
+
+A [media type] (also known as _MIME type_ and _content type_) is a two-part identifier for file formats and format contents transmitted on the internet.
+
+This is the full set of built-in media types in Hugo:
+
+{{< datatable "media" "types" "type" "suffixes" >}}
+
+**Note:**
+
+- It is possible to add custom media types or change the defaults; e.g., if you want to change the suffix for `text/html` to `asp`.
+- `Suffixes` are the values that will be used for URLs and filenames for that media type in Hugo.
+- The `Type` is the identifier that must be used when defining new/custom `Output Formats` (see below).
+- The full set of media types will be registered in Hugo's built-in development server to make sure they are recognized by the browser.
+
+To add or modify a media type, define it in a `mediaTypes` section in your [site configuration][config], either for all sites or for a given language.
+
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+[mediaTypes]
+ [mediaTypes."text/enriched"]
+ suffixes = ["enr"]
+ [mediaTypes."text/html"]
+ suffixes = ["asp"]
+{{</ code-toggle >}}
+
+The above example adds one new media type, `text/enriched`, and changes the suffix for the built-in `text/html` media type.
+
+**Note:** these media types are configured for **your output formats**. If you want to redefine one of Hugo's default output formats (e.g. `HTML`), you also need to redefine the media type. So, if you want to change the suffix of the `HTML` output format from `html` (default) to `htm`:
+
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+[mediaTypes]
+ [mediaTypes."text/html"]
+ suffixes = ["htm"]
+
+# Redefine HTML to update its media type.
+[outputFormats]
+ [outputFormats.HTML]
+ mediaType = "text/html"
+{{</ code-toggle >}}
+
+**Note** that for the above to work, you also need to add an `outputs` definition in your site config.
+
+## Output Format Definitions
+
+Given a media type and some additional configuration, you get an **Output Format**.
+
+This is the full set of Hugo's built-in output formats:
+
+{{< datatable "output" "formats" "name" "mediaType" "path" "baseName" "rel" "protocol" "isPlainText" "isHTML" "noUgly" "permalinkable" >}}
+
+- A page can be output in as many output formats as you want, and you can have an infinite amount of output formats defined **as long as they resolve to a unique path on the file system**. In the above table, the best example of this is `AMP` vs. `HTML`. `AMP` has the value `amp` for `Path` so it doesn't overwrite the `HTML` version; e.g. we can now have both `/index.html` and `/amp/index.html`.
+- The `MediaType` must match the `Type` of an already defined media type.
+- You can define new output formats or redefine built-in output formats; e.g., if you want to put `AMP` pages in a different path.
+
+To add or modify an output format, define it in an `outputFormats` section in your site's [configuration file](/getting-started/configuration/), either for all sites or for a given language.
+
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+[outputFormats.MyEnrichedFormat]
+mediaType = "text/enriched"
+baseName = "myindex"
+isPlainText = true
+protocol = "bep://"
+{{</ code-toggle >}}
+
+The above example is fictional, but if used for the homepage on a site with `baseURL` `https://example.org`, it will produce a plain text homepage with the URL `bep://example.org/myindex.enr`.
+
+### Configure Output Formats
+
+The following is the full list of configuration options for output formats and their default values:
+
+`name`
+: the output format identifier. This is used to define what output format(s) you want for your pages.
+
+`mediaType`
+: this must match the `Type` of a defined media type.
+
+`path`
+: sub path to save the output files.
+
+`baseName`
+: the base filename for the list filenames (homepage, etc.). **Default:** `index`.
+
+`rel`
+: can be used to create `rel` values in `link` tags. **Default:** `alternate`.
+
+`protocol`
+: will replace the "http://" or "https://" in your `baseURL` for this output format.
+
+`isPlainText`
+: use Go's plain text templates parser for the templates. **Default:** `false`.
+
+`isHTML`
+: used in situations only relevant for `HTML`-type formats; e.g., page aliases. **Default:** `false`.
+
+`noUgly`
+: used to turn off ugly URLs If `uglyURLs` is set to `true` in your site. **Default:** `false`.
+
+`notAlternative`
+: enable if it doesn't make sense to include this format in an `AlternativeOutputFormats` format listing on `Page` (e.g., with `CSS`). Note that we use the term _alternative_ and not _alternate_ here, as it does not necessarily replace the other format. **Default:** `false`.
+
+`permalinkable`
+: make `.Permalink` and `.RelPermalink` return the rendering Output Format rather than main ([see below](#link-to-output-formats)). This is enabled by default for `HTML` and `AMP`. **Default:** `false`.
+
+`weight`
+: Setting this to a non-zero value will be used as the first sort criteria.
+
+## Output Formats for Pages
+
+A `Page` in Hugo can be rendered to multiple _output formats_ on the file
+system.
+
+### Default Output Formats
+
+Every `Page` has a [`Kind`][page_kinds] attribute, and the default Output
+Formats are set based on that.
+
+| Kind | Default Output Formats |
+| ---------- | ---------------------- |
+| `page` | HTML |
+| `home` | HTML, RSS |
+| `section` | HTML, RSS |
+| `taxonomy` | HTML, RSS |
+| `term` | HTML, RSS |
+
+### Customizing Output Formats
+
+This can be changed by defining an `outputs` list of output formats in either
+the `Page` front matter or in the site configuration (either for all sites or
+per language).
+
+Example from site config file:
+
++{{< code-toggle file="hugo" >}}
+[outputs]
+ home = ["HTML", "AMP", "RSS"]
+ page = ["HTML"]
+{{</ code-toggle >}}
+
+Note that in the above examples, the _output formats_ for `section`,
+`taxonomy` and `term` will stay at their default value `["HTML", "RSS"]`.
+
+{{% page-kinds %}}
+
+* The `outputs` definition is per [`Page` `Kind`][page_kinds] (`page`, `home`, `section`, `taxonomy`, or `term`).
+* The names (e.g. `HTML`, `AMP`) used must match the `Name` of a defined *Output Format*.
+ * These names are case insensitive.
+* These can be overridden per `Page` in the front matter of content files.
+
+The following is an example of front matter in a content file that defines output formats for the rendered `Page`:
+
+{{< code-toggle file="content/example.md" fm=true copy=false >}}
+title: Example
+outputs:
+- html
+- amp
+- json
+{{< /code-toggle >}}
+
+## List Output formats
+
+Each `Page` has both an `.OutputFormats` (all formats, including the current) and an `.AlternativeOutputFormats` variable, the latter of which is useful for creating a `link rel` list in your site's `<head>`:
+
+```go-html-template
+{{ range .AlternativeOutputFormats -}}
+<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
+{{ end -}}
+```
+
+## Link to Output Formats
+
+`.Permalink` and `.RelPermalink` on `Page` will return the first output format defined for that page (usually `HTML` if nothing else is defined). This is regardless of the template file they are being called from.
+
+__from `single.json.json`:__
+```go-html-template
+{{ .RelPermalink }} > /that-page/
+{{ with .OutputFormats.Get "json" -}}
+{{ .RelPermalink }} > /that-page/index.json
+{{- end }}
+```
+
+In order for them to return the output format of the current template file instead, the given output format should have its `permalinkable` setting set to true.
+
+**Same template file as above with json output format's `permalinkable` set to true:**
+
+```go-html-template
+{{ .RelPermalink }} > /that-page/index.json
+{{ with .OutputFormats.Get "html" -}}
+{{ .RelPermalink }} > /that-page/
+{{- end }}
+```
+
+From content files, you can use the [`ref` or `relref` shortcodes](/content-management/shortcodes/#ref-and-relref):
+
+```go-html-template
+[Neat]({{</* ref "blog/neat.md" "amp" */>}})
+[Who]({{</* relref "about.md#who" "amp" */>}})
+```
+
+## Templates for Your Output Formats
+
+A new output format needs a corresponding template in order to render anything useful.
+
+{{% note %}}
+The key distinction for Hugo versions 0.20 and newer is that Hugo looks at an output format's `Name` and MediaType's `Suffixes` when choosing the template used to render a given `Page`.
+{{% /note %}}
+
+The following table shows examples of different output formats, the suffix used, and Hugo's respective template [lookup order]. All the examples in the table can:
+
+* Use a [base template][base].
+* Include [partial templates][partials]
+
+{{< datatable "output" "layouts" "Example" "OutputFormat" "Suffix" "Template Lookup Order" >}}
+
+Hugo will now also detect the media type and output format of partials, if possible, and use that information to decide if the partial should be parsed as a plain text template or not.
+
+Hugo will look for the name given, so you can name it whatever you want. But if you want it treated as plain text, you should use the file suffix and, if needed, the name of the Output Format. The pattern is as follows:
+
+```go-html-template
+[partial name].[OutputFormat].[suffix]
+```
+
+The partial below is a plain text template (Output Format is `CSV`, and since this is the only output format with the suffix `csv`, we don't need to include the Output Format's `Name`):
+
+```go-html-template
+{{ partial "mytextpartial.csv" . }}
+```
+
+[base]: /templates/base/
+[config]: /getting-started/configuration/
+[lookup order]: /templates/lookup-order/
+[media type]: https://en.wikipedia.org/wiki/Media_type
+[partials]: /templates/partials/
+[page_kinds]: /templates/section-templates/#page-kinds
--- /dev/null
- {{< code-toggle file="config">}}
+---
+title: Robots.txt File
+linktitle: Robots.txt
+description: Hugo can generate a customized robots.txt in the same way as any other template.
+categories: [templates]
+keywords: [robots,search engines]
+menu:
+ docs:
+ parent: templates
+ weight: 165
+weight: 165
+aliases: [/extras/robots-txt/]
+---
+
+To generate a robots.txt file from a template, change the [site configuration][config]:
+
++{{< code-toggle file="hugo" >}}
+enableRobotsTXT = true
+{{< /code-toggle >}}
+
+By default, Hugo generates robots.txt using an [internal template][internal].
+
+```text
+User-agent: *
+```
+
+Search engines that honor the Robots Exclusion Protocol will interpret this as permission to crawl everything on the site.
+
+## Robots.txt Template Lookup Order
+
+You may overwrite the internal template with a custom template. Hugo selects the template using this lookup order:
+
+1. `/layouts/robots.txt`
+2. `/themes/<THEME>/layouts/robots.txt`
+
+## Robots.txt Template Example
+
+{{< code file="layouts/robots.txt" >}}
+User-agent: *
+{{ range .Pages }}
+Disallow: {{ .RelPermalink }}
+{{ end }}
+{{< /code >}}
+
+This template creates a robots.txt file with a `Disallow` directive for each page on the site. Search engines that honor the Robots Exclusion Protocol will not crawl any page on the site.
+
+{{% note %}}
+To create a robots.txt file without using a template:
+
+1. Set `enableRobotsTXT` to `false` in the [site configuration][config].
+2. Create a robots.txt file in the `static` directory.
+
+Remember that Hugo copies everything in the [static directory][static] to the root of `publishDir` (typically `public`) when you build your site.
+
+[config]: /getting-started/configuration/
+[static]: /getting-started/directory-structure/
+{{% /note %}}
+
+[config]: /getting-started/configuration/
+[internal]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/robots.txt
--- /dev/null
- By default, Hugo will create an unlimited number of RSS entries. You can limit the number of articles included in the built-in RSS templates by assigning a numeric value to `rssLimit:` field in your project's [`config` file][config].
+---
+title: RSS Templates
+description: Hugo ships with its own RSS 2.0 template that requires almost no configuration, or you can create your own RSS templates.
+keywords: [rss, xml, templates]
+categories: [templates]
+menu:
+ docs:
+ parent: templates
+ weight: 150
+weight: 150
+toc: true
+---
+
+## RSS Template Lookup Order
+
+See [Template Lookup Order](/templates/lookup-order/) for the complete reference.
+
+{{% note %}}
+Hugo ships with its own [RSS 2.0 template](#the-embedded-rssxml). The embedded template will be sufficient for most use cases.
+{{% /note %}}
+
+RSS pages are of the type `Page` and have all the [page variables](/variables/page/) available to use in the templates.
+
+### Section RSS
+
+A [section’s][section] RSS will be rendered at `/<SECTION>/index.xml` (e.g., [https://spf13.com/project/index.xml](https://spf13.com/project/index.xml)).
+
+Hugo provides the ability for you to define any RSS type you wish and can have different RSS files for each section and taxonomy.
+
+## Lookup Order for RSS Templates
+
+The table below shows the RSS template lookup order for the different page kinds. The first listing shows the lookup order when running with a theme (`demoTheme`).
+
+{{< datatable-filtered "output" "layouts" "OutputFormat == RSS" "Example" "OutputFormat" "Suffix" "Template Lookup Order" >}}
+
+## Configure RSS
+
- {{< code-toggle file="config" >}}
++By default, Hugo will create an unlimited number of RSS entries. You can limit the number of articles included in the built-in RSS templates by assigning a numeric value to `rssLimit:` field in your project's configuration file.
+
+The following values will also be included in the RSS output if specified:
+
++{{< code-toggle file="hugo" >}}
+languageCode = "en-us"
+copyright = "This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License."
+
+[author]
+ name = "My Name Here"
+{{< /code-toggle >}}
+
+## The Embedded rss.xml
+
+This is the default RSS template that ships with Hugo:
+
+<https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml>
+
+## Reference your RSS Feed in `<head>`
+
+In your `header.html` template, you can specify your RSS feed in your `<head></head>` tag using Hugo's [Output Formats][Output Formats] like this:
+
+```go-html-template
+{{ range .AlternativeOutputFormats -}}
+ {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+{{ end -}}
+```
+
+If you only want the RSS link, you can query the formats:
+
+```go-html-template
+{{ with .OutputFormats.Get "rss" -}}
+ {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+{{ end -}}
+```
+
+Either of the two snippets above will generate the below `link` tag on the site homepage for RSS output:
+
+```html
+<link rel="alternate" type="application/rss+xml" href="https://example.com/index.xml" title="Site Title">
+```
+
+_We are assuming `BaseURL` to be `https://example.com/` and `$.Site.Title` to be `"Site Title"` in this example._
+
+[config]: /getting-started/configuration/
+[embedded]: #the-embedded-rss-xml
+[RSS 2.0]: https://cyber.harvard.edu/rss/rss.html "RSS 2.0 Specification"
+[section]: /content-management/sections/
+[Output Formats]: /templates/output-formats/#link-to-output-formats
--- /dev/null
- {{< code-toggle file="config">}}
+---
+title: Create Your Own Shortcodes
+linktitle: Shortcode Templates
+description: You can extend Hugo's built-in shortcodes by creating your own using the same templating syntax as that for single and list pages.
+categories: [templates]
+keywords: [shortcodes,templates]
+menu:
+ docs:
+ parent: templates
+ weight: 100
+weight: 100
+toc: true
+---
+
+Shortcodes are a means to consolidate templating into small, reusable snippets that you can embed directly inside your content. In this sense, you can think of shortcodes as the intermediary between [page and list templates][templates] and [basic content files].
+
+{{% note %}}
+Hugo also ships with built-in shortcodes for common use cases. (See [Content Management: Shortcodes](/content-management/shortcodes/).)
+{{% /note %}}
+
+## Create Custom Shortcodes
+
+Hugo's built-in shortcodes cover many common, but not all, use cases. Luckily, Hugo provides the ability to easily create custom shortcodes to meet your website's needs.
+
+{{< youtube Eu4zSaKOY4A >}}
+
+### File Location
+
+To create a shortcode, place an HTML template in the `layouts/shortcodes` directory of your [source organization]. Consider the file name carefully since the shortcode name will mirror that of the file but without the `.html` extension. For example, `layouts/shortcodes/myshortcode.html` will be called with either `{{</* myshortcode /*/>}}` or `{{%/* myshortcode /*/%}}`.
+
+You can organize your shortcodes in subfolders, e.g. in `layouts/shortcodes/boxes`. These shortcodes would then be accessible with their relative path, e.g:
+
+```go-html-template
+{{</* boxes/square */>}}
+```
+
+Note the forward slash.
+
+### Shortcode Template Lookup Order
+
+Shortcode templates have a simple [lookup order]:
+
+1. `/layouts/shortcodes/<SHORTCODE>.html`
+2. `/themes/<THEME>/layouts/shortcodes/<SHORTCODE>.html`
+
+### Positional vs Named Parameters
+
+You can create shortcodes using the following types of parameters:
+
+* Positional parameters
+* Named parameters
+* Positional *or* named parameters (i.e, "flexible")
+
+In shortcodes with positional parameters, the order of the parameters is important. If a shortcode has a single required value (e.g., the `youtube` shortcode below), positional parameters work very well and require less typing from content authors.
+
+For more complex layouts with multiple or optional parameters, named parameters work best. While less terse, named parameters require less memorization from a content author and can be added in a shortcode declaration in any order.
+
+Allowing both types of parameters (i.e., a "flexible" shortcode) is useful for complex layouts where you want to set default values that can be easily overridden by users.
+
+### Access Parameters
+
+All shortcode parameters can be accessed via the `.Get` method. Whether you pass a key (i.e., string) or a number to the `.Get` method depends on whether you are accessing a named or positional parameter, respectively.
+
+To access a parameter by name, use the `.Get` method followed by the named parameter as a quoted string:
+
+```go-html-template
+{{ .Get "class" }}
+```
+
+To access a parameter by position, use the `.Get` followed by a numeric position, keeping in mind that positional parameters are zero-indexed:
+
+```go-html-template
+{{ .Get 0 }}
+```
+
+For the second position, you would just use:
+
+```go-html-template
+{{ .Get 1 }}
+```
+
+`with` is great when the output depends on a parameter being set:
+
+```go-html-template
+{{ with .Get "class" }} class="{{ . }}"{{ end }}
+```
+
+`.Get` can also be used to check if a parameter has been provided. This is
+most helpful when the condition depends on either of the values, or both:
+
+```go-html-template
+{{ if or (.Get "title") (.Get "alt") }} alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "title" }}{{ end }}"{{ end }}
+```
+
+#### `.Inner`
+
+If a closing shortcode is used, the `.Inner` variable will be populated with the content between the opening and closing shortcodes. If a closing shortcode is required, you can check the length of `.Inner` as an indicator of its existence.
+
+A shortcode with content declared via the `.Inner` variable can also be declared without the content and without the closing tag by using the self-closing syntax:
+
+```go-html-template
+{{</* innershortcode /*/>}}
+```
+
+{{% note %}}
+Any shortcode that refers to `.Inner` must be closed or self-closed.
+
+{{% /note %}}
+
+#### `.Params`
+
+The `.Params` variable in shortcodes contains the list parameters passed to shortcode for more complicated use cases. You can also access higher-scoped parameters with the following logic:
+
+`$.Params`
+: these are the parameters passed directly into the shortcode declaration (e.g., a YouTube video ID)
+
+`$.Page.Params`
+: refers to the page's params; the "page" in this case refers to the content file in which the shortcode is declared (e.g., a `shortcode_color` field in a content's front matter could be accessed via `$.Page.Params.shortcode_color`).
+
+`$.Page.Site.Params`
+: refers to global variables as defined in your [site's configuration file][config].
+
+#### `.IsNamedParams`
+
+The `.IsNamedParams` variable checks whether the shortcode declaration uses named parameters and returns a boolean value.
+
+For example, you could create an `image` shortcode that can take either a `src` named parameter or the first positional parameter, depending on the preference of the content's author. Let's assume the `image` shortcode is called as follows:
+
+```go-html-template
+{{</* image src="images/my-image.jpg" */>}}
+```
+
+You could then include the following as part of your shortcode templating:
+
+```go-html-template
+{{ if .IsNamedParams }}
+<img src="{{ .Get "src" }}" alt="">
+{{ else }}
+<img src="{{ .Get 0 }}" alt="">
+{{ end }}
+```
+
+See the [example Vimeo shortcode][vimeoexample] below for `.IsNamedParams` in action.
+
+{{% note %}}
+While you can create shortcode templates that accept both positional and named parameters, you *cannot* declare shortcodes in content with a mix of parameter types. Therefore, a shortcode declared like `{{</* image src="images/my-image.jpg" "This is my alt text" */>}}` will return an error.
+{{% /note %}}
+
+You can also use the variable `.Page` to access all the normal [page variables][pagevars].
+
+A shortcodes can also be nested. In a nested shortcode, you can access the parent shortcode context with [`.Parent` variable][shortcodesvars]. This can be very useful for inheritance of common shortcode parameters from the root.
+
+### Checking for Existence
+
+You can check if a specific shortcode is used on a page by calling `.HasShortcode` in that page template, providing the name of the shortcode. This is sometimes useful when you want to include specific scripts or styles in the header that are only used by that shortcode.
+
+## Custom Shortcode Examples
+
+The following are examples of the different types of shortcodes you can create via shortcode template files in `/layouts/shortcodes`.
+
+### Single-word Example: `year`
+
+Let's assume you would like to keep mentions of your copyright year current in your content files without having to continually review your Markdown. Your goal is to be able to call the shortcode as follows:
+
+```go-html-template
+{{</* year */>}}
+```
+
+{{< code file="/layouts/shortcodes/year.html" >}}
+{{ now.Format "2006" }}
+{{< /code >}}
+
+### Single Positional Example: `youtube`
+
+Embedded videos are a common addition to Markdown content that can quickly become unsightly. The following is the code used by [Hugo's built-in YouTube shortcode][youtubeshortcode]:
+
+```go-html-template
+{{</* youtube 09jf3ow9jfw */>}}
+```
+
+Would load the template at `/layouts/shortcodes/youtube.html`:
+
+{{< code file="/layouts/shortcodes/youtube.html" >}}
+<div class="embed video-player">
+<iframe class="youtube-player" type="text/html" width="640" height="385" src="https://www.youtube.com/embed/{{ index .Params 0 }}" allowfullscreen frameborder="0">
+</iframe>
+</div>
+{{< /code >}}
+
+{{< code file="youtube-embed.html" copy=false >}}
+<div class="embed video-player">
+ <iframe class="youtube-player" type="text/html"
+ width="640" height="385"
+ src="https://www.youtube.com/embed/09jf3ow9jfw"
+ allowfullscreen frameborder="0">
+ </iframe>
+</div>
+{{< /code >}}
+
+### Single Named Example: `image`
+
+Let's say you want to create your own `img` shortcode rather than use Hugo's built-in [`figure` shortcode][figure]. Your goal is to be able to call the shortcode as follows in your content files:
+
+{{< code file="content-image.md" >}}
+{{</* img src="/media/spf13.jpg" title="Steve Francia" */>}}
+{{< /code >}}
+
+You have created the shortcode at `/layouts/shortcodes/img.html`, which loads the following shortcode template:
+
+{{< code file="/layouts/shortcodes/img.html" >}}
+<!-- image -->
+<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}>
+ {{ with .Get "link" }}<a href="{{ . }}">{{ end }}
+ <img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" }}{{ end }}"{{ end }} />
+ {{ if .Get "link" }}</a>{{ end }}
+ {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr") }}
+ <figcaption>{{ if isset .Params "title" }}
+ <h4>{{ .Get "title" }}</h4>{{ end }}
+ {{ if or (.Get "caption") (.Get "attr") }}<p>
+ {{ .Get "caption" }}
+ {{ with .Get "attrlink" }}<a href="{{ . }}"> {{ end }}
+ {{ .Get "attr" }}
+ {{ if .Get "attrlink" }}</a> {{ end }}
+ </p> {{ end }}
+ </figcaption>
+ {{ end }}
+</figure>
+<!-- image -->
+{{< /code >}}
+
+Would be rendered as:
+
+{{< code file="img-output.html" copy=false >}}
+<figure>
+ <img src="/media/spf13.jpg" />
+ <figcaption>
+ <h4>Steve Francia</h4>
+ </figcaption>
+</figure>
+{{< /code >}}
+
+### Single Flexible Example: `vimeo`
+
+```go-html-template
+{{</* vimeo 49718712 */>}}
+{{</* vimeo id="49718712" class="flex-video" */>}}
+```
+
+Would load the template found at `/layouts/shortcodes/vimeo.html`:
+
+{{< code file="/layouts/shortcodes/vimeo.html" >}}
+{{ if .IsNamedParams }}
+ <div class="{{ if .Get "class" }}{{ .Get "class" }}{{ else }}vimeo-container{{ end }}">
+ <iframe src="https://player.vimeo.com/video/{{ .Get "id" }}" allowfullscreen></iframe>
+ </div>
+{{ else }}
+ <div class="{{ if len .Params | eq 2 }}{{ .Get 1 }}{{ else }}vimeo-container{{ end }}">
+ <iframe src="https://player.vimeo.com/video/{{ .Get 0 }}" allowfullscreen></iframe>
+ </div>
+{{ end }}
+{{< /code >}}
+
+Would be rendered as:
+
+{{< code file="vimeo-iframes.html" copy=false >}}
+<div class="vimeo-container">
+ <iframe src="https://player.vimeo.com/video/49718712" allowfullscreen></iframe>
+</div>
+<div class="flex-video">
+ <iframe src="https://player.vimeo.com/video/49718712" allowfullscreen></iframe>
+</div>
+{{< /code >}}
+
+### Paired Example: `highlight`
+
+The following is taken from `highlight`, which is a [built-in shortcode] that ships with Hugo.
+
+{{< code file="highlight-example.md" >}}
+{{</* highlight html */>}}
+ <html>
+ <body> This HTML </body>
+ </html>
+{{</* /highlight */>}}
+{{< /code >}}
+
+The template for the `highlight` shortcode uses the following code, which is already included in Hugo:
+
+```go-html-template
+{{ .Get 0 | highlight .Inner }}
+```
+
+The rendered output of the HTML example code block will be as follows:
+
+{{< code file="syntax-highlighted.html" copy=false >}}
+<div class="highlight" style="background: #272822"><pre style="line-height: 125%"><span style="color: #f92672"><html></span>
+ <span style="color: #f92672"><body></span> This HTML <span style="color: #f92672"></body></span>
+<span style="color: #f92672"></html></span>
+</pre></div>
+{{< /code >}}
+
+### Nested Shortcode: Image Gallery
+
+Hugo's [`.Parent` shortcode variable][parent] provides access to the parent shortcode context when the shortcode in question is called within the context of a *parent* shortcode. This provides an inheritance model for common shortcode parameters.
+
+The following example is contrived but demonstrates the concept. Assume you have a `gallery` shortcode that expects one named `class` parameter:
+
+{{< code file="layouts/shortcodes/gallery.html" >}}
+<div class="{{ .Get "class" }}">
+ {{ .Inner }}
+</div>
+{{< /code >}}
+
+You also have an `img` shortcode with a single named `src` parameter that you want to call inside of `gallery` and other shortcodes, so that the parent defines the context of each `img`:
+
+{{< code file="layouts/shortcodes/img.html" >}}
+{{- $src := .Get "src" -}}
+{{- with .Parent -}}
+ <img src="{{ $src }}" class="{{ .Get "class" }}-image">
+{{- else -}}
+ <img src="{{ $src }}">
+{{- end -}}
+{{< /code >}}
+
+You can then call your shortcode in your content as follows:
+
+```go-html-template
+{{</* gallery class="content-gallery" */>}}
+ {{</* img src="/images/one.jpg" */>}}
+ {{</* img src="/images/two.jpg" */>}}
+{{</* /gallery */>}}
+{{</* img src="/images/three.jpg" */>}}
+```
+
+This will output the following HTML. Note how the first two `img` shortcodes inherit the `class` value of `content-gallery` set with the call to the parent `gallery`, whereas the third `img` only uses `src`:
+
+```html
+<div class="content-gallery">
+ <img src="/images/one.jpg" class="content-gallery-image">
+ <img src="/images/two.jpg" class="content-gallery-image">
+</div>
+<img src="/images/three.jpg">
+```
+
+## Error Handling in Shortcodes
+
+Use the [errorf](/functions/errorf) template func and [.Position](/variables/shortcodes/) variable to get useful error messages in shortcodes:
+
+```bash
+{{ with .Get "name" }}
+{{ else }}
+{{ errorf "missing value for param 'name': %s" .Position }}
+{{ end }}
+```
+
+When the above fails, you will see an `ERROR` log similar to the below:
+
+```bash
+ERROR 2018/11/07 10:05:55 missing value for param name: "/Users/bep/dev/go/gohugoio/hugo/docs/content/en/variables/shortcodes.md:32:1"
+```
+
+## More Shortcode Examples
+
+More shortcode examples can be found in the [shortcodes directory for spf13.com][spfscs] and the [shortcodes directory for the Hugo docs][docsshortcodes].
+
+## Inline Shortcodes
+
+You can also implement your shortcodes inline -- e.g. where you use them in the content file. This can be useful for scripting that you only need in one place.
+
+This feature is disabled by default, but can be enabled in your site config:
+
++{{< code-toggle file="hugo" >}}
+enableInlineShortcodes = true
+{{< /code-toggle >}}
+
+It is disabled by default for security reasons. The security model used by Hugo's template handling assumes that template authors are trusted, but that the content files are not, so the templates are injection-safe from malformed input data. But in most situations you have full control over the content, too, and then `enableInlineShortcodes = true` would be considered safe. But it's something to be aware of: It allows ad-hoc [Go Text templates](https://golang.org/pkg/text/template/) to be executed from the content files.
+
+And once enabled, you can do this in your content files:
+
+ ```go-text-template
+ {{</* time.inline */>}}{{ now }}{{</* /time.inline */>}}
+ ```
+
+The above will print the current date and time.
+
+ Note that an inline shortcode's inner content is parsed and executed as a Go text template with the same context as a regular shortcode template.
+
+This means that the current page can be accessed via `.Page.Title` etc. This also means that there are no concept of "nested inline shortcodes".
+
+The same inline shortcode can be reused later in the same content file, with different params if needed, using the self-closing syntax:
+
+ ```go-text-template
+{{</* time.inline /*/>}}
+```
+
+[basic content files]: /content-management/formats/ "See how Hugo leverages markdown--and other supported formats--to create content for your website."
+[built-in shortcode]: /content-management/shortcodes/
+[config]: /getting-started/configuration/ "Learn more about Hugo's built-in configuration variables as well as how to us your site's configuration file to include global key-values that can be used throughout your rendered website."
+[Content Management: Shortcodes]: /content-management/shortcodes/#using-hugo-s-built-in-shortcodes "Check this section if you are not familiar with the definition of what a shortcode is or if you are unfamiliar with how to use Hugo's built-in shortcodes in your content files."
+[source organization]: /getting-started/directory-structure/#directory-structure-explained "Learn how Hugo scaffolds new sites and what it expects to find in each of your directories."
+[docsshortcodes]: https://github.com/gohugoio/hugo/tree/master/docs/layouts/shortcodes "See the shortcode source directory for the documentation site you're currently reading."
+[figure]: /content-management/shortcodes/#figure
+[hugosc]: /content-management/shortcodes/#using-hugo-s-built-in-shortcodes
+[lookup order]: /templates/lookup-order/ "See the order in which Hugo traverses your template files to decide where and how to render your content at build time"
+[pagevars]: /variables/page/ "See which variables you can leverage in your templating for page vs list templates."
+[parent]: /variables/shortcodes/
+[shortcodesvars]: /variables/shortcodes/ "Certain variables are specific to shortcodes, although most .Page variables can be accessed within your shortcode template."
+[spfscs]: https://github.com/spf13/spf13.com/tree/master/layouts/shortcodes "See more examples of shortcodes by visiting the shortcode directory of the source for spf13.com, the blog of Hugo's creator, Steve Francia."
+[templates]: /templates/ "The templates section of the Hugo docs."
+[vimeoexample]: #single-flexible-example-vimeo
+[youtubeshortcode]: /content-management/shortcodes/#youtube "See how to use Hugo's built-in YouTube shortcode."
--- /dev/null
- {{< code-toggle file="config" >}}
+---
+title: Sitemap Templates
+description: Hugo provides built-in sitemap templates.
+categories: [templates]
+keywords: [sitemap, xml, templates]
+menu:
+ docs:
+ parent: templates
+ weight: 160
+weight: 160
+aliases: [/layout/sitemap/,/templates/sitemap/]
+toc: true
+---
+
+## Overview
+
+Hugo's built-in sitemap templates conform to v0.9 of the [sitemap protocol].
+
+With a monolingual project, Hugo generates a sitemap.xml file in the root of the [`publishDir`] using the built-in [sitemap.xml] template.
+
+With a multilingual project, Hugo generates:
+
+- A sitemap.xml file in the root of each site (language) using the built-in [sitemap.xml] template
+- A sitemap.xml file in the root of the [`publishDir`] using the built-in [sitemapindex.xml] template
+
+## Configuration
+
+Set the default values for [change frequency] and [priority], and the name of the generated file, in your site configuration.
+
- {{< code-toggle file="config" >}}
++{{< code-toggle file="hugo" >}}
+[sitemap]
+ changefreq = 'monthly'
+ filename = 'sitemap.xml'
+ priority = 0.5
+{{</ code-toggle >}}
+
+changefreq
+: How frequently a page is likely to change. Valid values are `always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly`, and `never`. Default is `""` (change frequency omitted from rendered sitemap).
+
+filename
+: The name of the generated file. Default is `sitemap.xml`.
+
+priority
+: The priority of a page relative to any other page on the site. Valid values range from 0.0 to 1.0. Default is `-1` (priority omitted from rendered sitemap).
+
+## Override Default Values
+
+Override the default values for a given page in front matter.
+
+{{< code-toggle file="news.md" fm=true >}}
+title = 'News'
+[sitemap]
+ changefreq = 'weekly'
+ priority = 0.8
+{{</ code-toggle >}}
+
+## Override Built-in Templates
+
+To override the built-in sitemap.xml template, create a new file in either of these locations:
+
+- layouts/sitemap.xml
+- layouts/_default/sitemap.xml
+
+When ranging through the page collection, access the _change frequency_ and _priority_ with `.Sitemap.ChangeFreq` and `.Sitemap.Priority` respectively.
+
+To override the built-in sitemapindex.xml template, create a new file in either of these locations:
+
+- layouts/sitemapindex.xml
+- layouts/_default/sitemapindex.xml
+
+## Disable Sitemap Generation
+
+You may disable sitemap generation in your site configuration:
+
++{{< code-toggle file="hugo" >}}
+disableKinds = ['sitemap']
+{{</ code-toggle >}}
+
+[`publishDir`]: /getting-started/configuration#publishdir
+[change frequency]: <https://www.sitemaps.org/protocol.html#changefreqdef>
+[priority]: <https://www.sitemaps.org/protocol.html#priority>
+[sitemap protocol]: <https://www.sitemaps.org/protocol.html>
+[sitemap.xml]: <https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/sitemap.xml>
+[sitemapindex.xml]: <https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/sitemapindex.xml>
--- /dev/null
- : a language object that points to the language's definition in the site `config`. `.Language.Lang` gives you the language code.
+---
+title: Page Variables
+description: Page-level variables are defined in a content file's front matter, derived from the content's file location, or extracted from the content body itself.
+categories: [variables and params]
+keywords: [pages]
+menu:
+ docs:
+ parent: variables
+ weight: 20
+weight: 20
+toc: true
+---
+
+The following is a list of page-level variables. Many of these will be defined in the front matter, derived from file location, or extracted from the content itself.
+
+## Page Variables
+
+.AlternativeOutputFormats
+: contains all alternative formats for a given page; this variable is especially useful `link rel` list in your site's `<head>`. (See [Output Formats](/templates/output-formats/).)
+
+.Aliases
+: aliases of this page
+
+.Ancestors
+: get the ancestors of each page, simplify [breadcrumb navigation](/content-management/sections#example-breadcrumb-navigation) implementation complexity
+
+.BundleType
+: the [bundle] type: `leaf`, `branch`, or an empty string if the page is not a bundle.
+
+.Content
+: the content itself, defined below the front matter.
+
+.Data
+: the data specific to this type of page.
+
+.Date
+: the date associated with the page; `.Date` pulls from the `date` field in a content's front matter. See also `.ExpiryDate`, `.PublishDate`, and `.Lastmod`.
+
+.Description
+: the description for the page.
+
+.Draft
+: a boolean, `true` if the content is marked as a draft in the front matter.
+
+.ExpiryDate
+: the date on which the content is scheduled to expire; `.ExpiryDate` pulls from the `expirydate` field in a content's front matter. See also `.PublishDate`, `.Date`, and `.Lastmod`.
+
+.File
+: filesystem-related data for this content file. See also [File Variables].
+
+.Fragments
+: Fragments returns the fragments for this page. See [Page Fragments](#page-fragments).
+
+.FuzzyWordCount
+: the approximate number of words in the content.
+
+.IsHome
+: `true` in the context of the [homepage](/templates/homepage/).
+
+.IsNode
+: always `false` for regular content pages.
+
+.IsPage
+: always `true` for regular content pages.
+
+.IsSection
+: `true` if [`.Kind`](/templates/section-templates/#page-kinds) is `section`.
+
+.IsTranslated
+: `true` if there are translations to display.
+
+.Keywords
+: the meta keywords for the content.
+
+.Kind
+: the page's *kind*. Possible return values are `page`, `home`, `section`, `taxonomy`, or `term`. Note that there are also `RSS`, `sitemap`, `robotsTXT`, and `404` kinds, but these are only available during the rendering of each of these respective page's kind and therefore *not* available in any of the `Pages` collections.
+
+.Language
- The `.Param` method provides a way to resolve a single value according to it's definition in a page parameter (i.e. in the content's front matter) or a site parameter (i.e., in your `config`).
++: a language object that points to the language's definition in the site configuration. `.Language.Lang` gives you the language code.
+
+.Lastmod
+: the date the content was last modified. `.Lastmod` pulls from the `lastmod` field in a content's front matter.
+
+ - If `lastmod` is not set, and `.GitInfo` feature is disabled, the front matter `date` field will be used.
+ - If `lastmod` is not set, and `.GitInfo` feature is enabled, `.GitInfo.AuthorDate` will be used instead.
+
+See also `.ExpiryDate`, `.Date`, `.PublishDate`, and [`.GitInfo`][gitinfo].
+
+.LinkTitle
+: access when creating links to the content. If set, Hugo will use the `linktitle` from the front matter before `title`.
+
+.Next
+: Points up to the next [regular page](/variables/site/#site-pages) (sorted by Hugo's [default sort](/templates/lists#default-weight--date--linktitle--filepath)). Example: `{{ with .Next }}{{ .Permalink }}{{ end }}`. Calling `.Next` from the first page returns `nil`.
+
+.NextInSection
+: Points up to the next [regular page](/variables/site/#site-pages) below the same top level section (e.g. in `/blog`)). Pages are sorted by Hugo's [default sort](/templates/lists#default-weight--date--linktitle--filepath). Example: `{{ with .NextInSection }}{{ .Permalink }}{{ end }}`. Calling `.NextInSection` from the first page returns `nil`.
+
+.OutputFormats
+: contains all formats, including the current format, for a given page. Can be combined the with [`.Get` function](/functions/get/) to grab a specific format. (See [Output Formats](/templates/output-formats/).)
+
+.Pages
+: a collection of associated pages. This value will be `nil` within
+ the context of regular content pages. See [`.Pages`](#pages).
+
+.Permalink
+: the Permanent link for this page; see [Permalinks](/content-management/urls/)
+
+.Plain
+: the Page content stripped of HTML tags and presented as a string. You may need to pipe the result through the [`htmlUnescape`](/functions/htmlunescape/) function when rendering this value with the HTML [output format](/templates/output-formats#output-format-definitions).
+
+.PlainWords
+: the slice of strings that results from splitting .Plain into words, as defined in Go's [strings.Fields](https://pkg.go.dev/strings#Fields).
+
+.Prev
+: Points down to the previous [regular page](/variables/site/#site-pages) (sorted by Hugo's [default sort](/templates/lists#default-weight--date--linktitle--filepath)). Example: `{{ if .Prev }}{{ .Prev.Permalink }}{{ end }}`. Calling `.Prev` from the last page returns `nil`.
+
+.PrevInSection
+: Points down to the previous [regular page](/variables/site/#site-pages) below the same top level section (e.g. `/blog`). Pages are sorted by Hugo's [default sort](/templates/lists#default-weight--date--linktitle--filepath). Example: `{{ if .PrevInSection }}{{ .PrevInSection.Permalink }}{{ end }}`. Calling `.PrevInSection` from the last page returns `nil`.
+
+.PublishDate
+: the date on which the content was or will be published; `.Publishdate` pulls from the `publishdate` field in a content's front matter. See also `.ExpiryDate`, `.Date`, and `.Lastmod`.
+
+.RawContent
+: raw markdown content without the front matter. Useful with [remarkjs.com](
+https://remarkjs.com)
+
+.ReadingTime
+: the estimated time, in minutes, it takes to read the content.
+
+.Resources
+: resources such as images and CSS that are associated with this page
+
+.Ref
+: returns the permalink for a given reference (e.g., `.Ref "sample.md"`). `.Ref` does *not* handle in-page fragments correctly. See [Cross References](/content-management/cross-references/).
+
+.RelPermalink
+: the relative permanent link for this page.
+
+.RelRef
+: returns the relative permalink for a given reference (e.g., `RelRef
+"sample.md"`). `.RelRef` does *not* handle in-page fragments correctly. See [Cross References](/content-management/cross-references/).
+
+.Site
+: see [Site Variables](/variables/site/).
+
+.Sites
+: returns all sites (languages). A typical use case would be to link back to the main language: `<a href="{{ .Sites.First.Home.RelPermalink }}">...</a>`.
+
+.Sites.First
+: returns the site for the first language. If this is not a multilingual setup, it will return itself.
+
+.Summary
+: a generated summary of the content for easily showing a snippet in a summary view. The breakpoint can be set manually by inserting <code><!--more--></code> at the appropriate place in the content page, or the summary can be written independent of the page text. See [Content Summaries](/content-management/summaries/) for more details.
+
+.TableOfContents
+: the rendered [table of contents](/content-management/toc/) for the page.
+
+.Title
+: the title for this page.
+
+.Translations
+: a list of translated versions of the current page. See [Multilingual Mode](/content-management/multilingual/) for more information.
+
+.TranslationKey
+: the key used to map language translations of the current page. See [Multilingual Mode](/content-management/multilingual/) for more information.
+
+.Truncated
+: a boolean, `true` if the `.Summary` is truncated. Useful for showing a "Read more..." link only when necessary. See [Summaries](/content-management/summaries/) for more information.
+
+.Type
+: the [content type](/content-management/types/) of the content (e.g., `posts`).
+
+.Weight
+: assigned weight (in the front matter) to this content, used in sorting.
+
+.WordCount
+: the number of words in the content.
+
+## Writable Page-scoped Variables
+
+[.Scratch][scratch]
+: returns a Scratch to store and manipulate data. In contrast to the [`.Store`][store] method, this scratch is reset on server rebuilds.
+
+[.Store][store]
+: returns a Scratch to store and manipulate data. In contrast to the [`.Scratch`][scratch] method, this scratch is not reset on server rebuilds.
+
+## Section Variables and Methods
+
+Also see [Sections](/content-management/sections/).
+
+{{< readfile file="/content/en/readfiles/sectionvars.md" markdown="true" >}}
+
+## The `.Pages` Variable {#pages}
+
+`.Pages` is an alias to `.Data.Pages`. It is conventional to use the
+aliased form `.Pages`.
+
+### `.Pages` compared to `.Site.Pages`
+
+{{< getcontent path="readfiles/pages-vs-site-pages.md" >}}
+
+## Page Fragments
+
+{{< new-in "0.111.0" >}}
+
+The `.Fragments` method returns a list of fragments for the current page.
+
+.Headings
+: A recursive list of headings for the current page. Can be used to generate a table of contents.
+
+{{< todo >}}add .Headings toc example{{< /todo >}}
+
+.Identifiers
+: A sorted list of identifiers for the current page. Can be used to check if a page contains a specific identifier or if a page contains duplicate identifiers:
+
+```go-html-template
+{{ if .Fragments.Identifiers.Contains "my-identifier" }}
+ <p>Page contains identifier "my-identifier"</p>
+{{ end }}
+
+{{ if gt (.Fragments.Identifiers.Count "my-identifier") 1 }}
+ <p>Page contains duplicate "my-identifier" fragments</p>
+{{ end }}
+```
+
+.HeadingsMap
+: Holds a map of headings for the current page. Can be used to start the table of contents from a specific heading.
+
+Also see the [Go Doc](https://pkg.go.dev/github.com/gohugoio/hugo@v0.111.0/markup/tableofcontents#Fragments) for the return type.
+
+### Fragments in hooks and shortcodes
+
+`.Fragments` are safe to call from render hooks, even on the page you're on (`.Page.Fragments`). For shortcodes we recommend that all `.Fragments` usage is nested inside the `{{</**/>}}` shortcode delimiter (`{{%/**/%}}` takes part in the ToC creation so it's easy to end up in a situation where you bite yourself in the tail).
+
+
+## The global page function
+
+{{< new-in "0.111.1" >}}
+
+Hugo almost always passes a `Page` as the data context into the top level template (e.g. `single.html`) (the one exception is the multihost sitemap template). This means that you can access the current page with the `.` variable in the template.
+
+But when you're deeply nested inside `.Render`, partial etc., accessing that `Page` object isn't always practical or possible.
+
+For this reason, Hugo provides a global `page` function that you can use to access the current page from anywhere in any template.
+
+```go-html-template
+{{ page.Title }}
+```
+
+There are one caveat with this, and this isn't new, but it's worth mentioning here: There are situations in Hugo where you may see a cached value, e.g. when using `partialCached` or in a shortcode.
+
+## Page-level Params
+
+Any other value defined in the front matter in a content file, including taxonomies, will be made available as part of the `.Params` variable.
+
+{{< code-toggle file="content/example.md" fm=true copy=false >}}
+title: Example
+categories: [one]
+tags: [two,three,four]
+{{< /code-toggle >}}
+
+With the above front matter, the `tags` and `categories` taxonomies are accessible via the following:
+
+* `.Params.tags`
+* `.Params.categories`
+
+The `.Params` variable is particularly useful for the introduction of user-defined front matter fields in content files. For example, a Hugo website on book reviews could have the following front matter:
+
+{{< code-toggle file="content/example.md" fm=true copy=false >}}
+title: Example
+affiliatelink: "http://www.my-book-link.here"
+recommendedby: "My Mother"
+{{< /code-toggle >}}
+
+These fields would then be accessible to via `.Params.affiliatelink` and `.Params.recommendedby`.
+
+```go-html-template
+<h3><a href="{{ .Params.affiliatelink }}">Buy this book</a></h3>
+<p>It was recommended by {{ .Params.recommendedby }}.</p>
+```
+
+This template would render as follows:
+
+```html
+<h3><a href="http://www.my-book-link.here">Buy this book</a></h3>
+<p>It was recommended by my Mother.</p>
+```
+
+{{% note %}}
+See [Archetypes](/content-management/archetypes/) for consistency of `Params` across pieces of content.
+{{% /note %}}
+
+### The `.Param` Method
+
+In Hugo, you can declare params in individual pages and globally for your entire website. A common use case is to have a general value for the site param and a more specific value for some of the pages (i.e., a header image):
+
+```go-html-template
+{{ $.Param "header_image" }}
+```
+
++The `.Param` method provides a way to resolve a single value according to it's definition in a page parameter (i.e. in the content's front matter) or a site parameter (i.e., in your site configuration).
+
+### Access Nested Fields in Front Matter
+
+When front matter contains nested fields like the following:
+
+{{< code-toggle file="content/example.md" fm=true copy=false >}}
+title: Example
+author:
+ given_name: John
+ family_name: Feminella
+ display_name: John Feminella
+{{< /code-toggle >}}
+
+`.Param` can access these fields by concatenating the field names together with a dot:
+
+```go-html-template
+{{ $.Param "author.display_name" }}
+```
+
+[gitinfo]: /variables/git/
+[File Variables]: /variables/files/
+[bundle]: /content-management/page-bundles
+[scratch]: /functions/scratch
+[store]: /functions/store
--- /dev/null
- {{< code-toggle file="config" >}}
+---
+title: Site Variables
+description: Many, but not all, site-wide variables are defined in your site's configuration. However, Hugo provides a number of built-in variables for convenient access to global values in your templates.
+categories: [variables and params]
+keywords: [global,site]
+menu:
+ docs:
+ parent: variables
+ weight: 10
+weight: 10
+aliases: [/variables/site-variables/]
+toc: true
+---
+
+The following is a list of site-level (aka "global") variables. Many of these variables are defined in your site's [configuration file][config], whereas others are built into Hugo's core for convenient usage in your templates.
+
+## Get the Site object from a partial
+
+All the methods below, e.g. `.Site.RegularPages` can also be reached via the global [`site`](/functions/site/) function, e.g. `site.RegularPages`, which can be handy in partials where the `Page` object isn't easily available.
+
+## Site Variables List
+
+.Site.AllPages
+: array of all pages, regardless of their translation.
+
+.Site.BaseURL
+: the base URL for the site as defined in the site configuration.
+
+.Site.BuildDrafts
+: a boolean (default: `false`) to indicate whether to build drafts as defined in the site configuration.
+
+.Site.Copyright
+: a string representing the copyright of your website as defined in the site configuration.
+
+.Site.Data
+: custom data, see [Data Templates](/templates/data-templates/).
+
+.Site.DisqusShortname
+: a string representing the shortname of the Disqus shortcode as defined in the site configuration.
+
+.Site.GoogleAnalytics
+: a string representing your tracking code for Google Analytics as defined in the site configuration.
+
+.Site.Home
+: reference to the homepage's [page object](https://gohugo.io/variables/page/)
+
+.Site.IsMultiLingual
+: whether there are more than one language in this site. See [Multilingual](/content-management/multilingual/) for more information.
+
+.Site.IsServer
+: a boolean to indicate if the site is being served with Hugo's built-in server. See [`hugo server`](/commands/hugo_server/) for more information.
+
+.Site.Language.Lang
+: the language code of the current locale (e.g., `en`).
+
+.Site.Language.LanguageName
+: the full language name (e.g. `English`).
+
+.Site.Language.Weight
+: the weight that defines the order in the `.Site.Languages` list.
+
+.Site.Language
+: indicates the language currently being used to render the website. This object's attributes are set in site configurations' language definition.
+
+.Site.LanguageCode
+: a string representing the language tag as defined in the site configuration.
+
+.Site.LanguagePrefix
+: this can be used to prefix URLs to point to the correct language. It will even work when only one defined language. See also the functions [absLangURL](/functions/abslangurl/) and [relLangURL](/functions/rellangurl).
+
+.Site.Languages
+: an ordered list (ordered by defined weight) of languages.
+
+.Site.LastChange
+: a string representing the date/time of the most recent change to your site. This string is based on the [`date` variable in the front matter](/content-management/front-matter) of your content pages.
+
+.Site.Menus
+: all the menus in the site.
+
+.Site.Pages
+: array of all content ordered by Date with the newest first. This array contains only the pages in the current language. See [`.Site.Pages`](#site-pages).
+
+.Site.RegularPages
+: a shortcut to the *regular* page collection. `.Site.RegularPages` is equivalent to `where .Site.Pages "Kind" "page"`. See [`.Site.Pages`](#site-pages).
+
+.Site.Sections
+: top-level directories of the site.
+
+.Site.Taxonomies
+: the [taxonomies](/content-management/taxonomies/) for the entire site. Also see section [Access taxonomy data from any template](/variables/taxonomy/#access-taxonomy-data-from-any-template).
+
+.Site.Title
+: a string representing the title of the site.
+
+## The `.Site.Params` Variable
+
+`.Site.Params` is a container holding the values from the `params` section of your site configuration.
+
+### Example: `.Site.Params`
+
+The following `config.[yaml|toml|json]` defines a site-wide param for `description`:
+
++{{< code-toggle file="hugo" >}}
+baseURL = "https://yoursite.example.com/"
+
+[params]
+ description = "Tesla's Awesome Hugo Site"
+ author = "Nikola Tesla"
+{{</ code-toggle >}}
+
+You can use `.Site.Params` in a [partial template](/templates/partials/) to call the default site description:
+
+{{< code file="layouts/partials/head.html" >}}
+<meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" />
+{{< /code >}}
+
+## The `.Site.Pages` Variable {#site-pages}
+
+### `.Site.Pages` compared to `.Pages`
+
+{{< getcontent path="readfiles/pages-vs-site-pages.md" >}}
+
+[config]: /getting-started/configuration/
--- /dev/null
- require github.com/gohugoio/gohugoioTheme v0.0.0-20230418063032-99f9185b8e11 // indirect
+module github.com/gohugoio/hugoDocs
+
+go 1.16
+
++require github.com/gohugoio/gohugoioTheme v0.0.0-20230527124826-78bc315d7b8a // indirect
--- /dev/null
+github.com/gohugoio/gohugoioTheme v0.0.0-20190808163145-07b3c0f73b02/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20191014144142-1f3a01deed7b h1:PWNjl46fvtz54PKO0BdiXOF6/4L/uCP0F3gtcCxGrJs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20191014144142-1f3a01deed7b/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d h1:D3DcaYkuJbotdWNNAQpQl37txX4HQ6R5uMHoxVmTw0w=
+github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200123151337-9475fd449324 h1:UZwHDYtGY0uOKIvcm2LWd+xfFxD3X5L222LIJdI5RE4=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200123151337-9475fd449324/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200123204146-589b4c309025 h1:ScYFARz+bHX1rEr1donVknhRdxGY/cwqK1hHvWEfrlc=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200123204146-589b4c309025/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200123205007-5d6620a0db26 h1:acXfduibbWxji9tW0WkLHbjcXFsnd5uIwXe0WfwOazg=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200123205007-5d6620a0db26/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200128164921-1d0bc5482051 h1:cS14MnUGS6xwWYfPNshimm8HdMCZiYBxWkCD0VnvgVw=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200128164921-1d0bc5482051/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200327225449-368f4cbef8d7 h1:cZ+ahAjSetbFv3aDJ9ipDbKyqaVlmkbSZ5cULgBTh+w=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200327225449-368f4cbef8d7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200327231942-7f80b3d02bfa h1:kG+O/wT9UXomzp5eQiUuFVZ0l7YylAW6EVPLyjMxi/c=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200327231942-7f80b3d02bfa/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200328100657-2bfd5f8c6aee h1:PJZhCwnuVLyafDWNPSHk9iJvk6gEIvPRnycy7Pq3peA=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200328100657-2bfd5f8c6aee/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200518164958-62cbad03c40f h1:Ge3JACszSUyJW2Az9cJzWdo4PUqdijJA1RxoQSVMBSI=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200518164958-62cbad03c40f/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200518165806-0095b7b902a7 h1:Sy0hlWyZmFtdSY0Cobvw1ZYm3G1aR5+4DuFNRbMkh48=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200518165806-0095b7b902a7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f h1:BWJyycs4HD7tUbaU8RIGeMay84bIBWRVVLE3yajPas4=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3 h1:ShqzOFeeg54FPSuS6q8HSeTVgj2xNZRe/YS0jNbi21g=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210409065807-6383d8cbaf65 h1:EJzierSWKqwsrUXU6MaFe0J97c0e5pzl5dBNRRrV2Nc=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210409065807-6383d8cbaf65/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210409071416-c88da48134b7 h1:uRCgPslaBgLYy4ANXBoPbBQVM8aNiHoxIZTKUXpkuUA=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210409071416-c88da48134b7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20211211125852-b85e21c1f3d6 h1:lAgdWrn8VEg0PrNCPX4DflCg2msDKpSYV6E8RTNV3N0=
+github.com/gohugoio/gohugoioTheme v0.0.0-20211211125852-b85e21c1f3d6/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20220228085601-7cfbda06d135 h1:6hVzfE9YhSsZP5t6jWjvVp7MoPm7Y5fEhH/ls4ahhKk=
+github.com/gohugoio/gohugoioTheme v0.0.0-20220228085601-7cfbda06d135/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20220905093719-cb8b64046950 h1:Ovlh3nuy/aNptYZHmIra2MP+ZUEqiihY0HxvhdaMqGg=
+github.com/gohugoio/gohugoioTheme v0.0.0-20220905093719-cb8b64046950/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20220912070954-88dcaf003b4d h1:UYJL6RmEepprvlgHvDnFCWtPOvjmqzFCQ90cRDRBO7U=
+github.com/gohugoio/gohugoioTheme v0.0.0-20220912070954-88dcaf003b4d/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20220914071648-0ef1c51685bf h1:A8Ksnvp8reNt2Ap0mUK7gFkJkCjt9R60yopGsezcOBA=
+github.com/gohugoio/gohugoioTheme v0.0.0-20220914071648-0ef1c51685bf/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20221116211530-5ae8dcdd68d6 h1:eG53kL1LkQuKmrDdzbvvx6d60qM07zp2Wjo/tYxkDOY=
+github.com/gohugoio/gohugoioTheme v0.0.0-20221116211530-5ae8dcdd68d6/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20221118083537-967e29e21382 h1:e30rl1dxWkYOcgdl0omeOK0HBzgDLI/b9MfYHrINjzU=
+github.com/gohugoio/gohugoioTheme v0.0.0-20221118083537-967e29e21382/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20221124154621-1451a01f406b h1:TRrIisSY7ckt9FVHOOQtmKG4jsnORCYn72UMvMu+IQ0=
+github.com/gohugoio/gohugoioTheme v0.0.0-20221124154621-1451a01f406b/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20221206093948-1408550ab675 h1:wjpYa1cTELeceWndBDV7IG2vRxRWICBBO79HObOfTtk=
+github.com/gohugoio/gohugoioTheme v0.0.0-20221206093948-1408550ab675/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20221217122332-1c1752ad8f14 h1:K6tPFpi7W0zb89QIf+lNdgdTXfDFemU6NKk46MlX9lQ=
+github.com/gohugoio/gohugoioTheme v0.0.0-20221217122332-1c1752ad8f14/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20221220160735-8ffa1ef883b6 h1:yEoQecRBoLGfc7yTybMD3Mhm03bTScZFYPvwe0p75vA=
+github.com/gohugoio/gohugoioTheme v0.0.0-20221220160735-8ffa1ef883b6/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
+github.com/gohugoio/gohugoioTheme v0.0.0-20230109120406-12694c4a9456 h1:RSLItaapVjWkqSdQhumAmJkodFDbWMGNZmkVW/AFx0c=
+github.com/gohugoio/gohugoioTheme v0.0.0-20230109120406-12694c4a9456/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
+github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b h1:i/iaEOOuR1mKRR0qUOET587ooVhG8c2tllpA5HsrWNU=
+github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
+github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232 h1:bEojKgKInbsLkID5Arh95vP4+0xydtn/+ayT6I8vkiU=
+github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
+github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f h1:8wI3zOTWQG15aKkbAZQaoGnUQff46hO95opQndBHRE4=
+github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
+github.com/gohugoio/gohugoioTheme v0.0.0-20230330081257-7a8c9614432c h1:TyHgmowfiMyxKrqTdRxm/yWIFeN7XRh7Hm6/dOG6yDA=
+github.com/gohugoio/gohugoioTheme v0.0.0-20230330081257-7a8c9614432c/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
+github.com/gohugoio/gohugoioTheme v0.0.0-20230418063032-99f9185b8e11 h1:mDcricMewd66x8QjKqNun7Div7iYVLtl8s1dVs9VnB8=
+github.com/gohugoio/gohugoioTheme v0.0.0-20230418063032-99f9185b8e11/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
++github.com/gohugoio/gohugoioTheme v0.0.0-20230527124826-78bc315d7b8a h1:ruyA3QZ4Ym0fBLhTW2eoUSvHUaj2xWqaPHIbaI+tbZo=
++github.com/gohugoio/gohugoioTheme v0.0.0-20230527124826-78bc315d7b8a/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
--- /dev/null
- {{- $file = $file | default "config" }}
+{{- /*
+Renders syntax-highlighted configuration data in JSON, TOML, and YAML formats.
+
+@param {string} [config] The section of site.Data.docs.config to render.
+@param {bool} [copy=true] If true, display a copy to clipboard button.
+@param {string} [file] The file name to display above the rendered code.
+@param {bool} [fm=false] If true, render the code as front matter.
+@param {bool} [skipHeader=false] If false, omit top level key(s) when rendering a section of site.Data.docs.config.
+
+@returns {template.HTML}
+*/}}
+
+{{- /* Initialize. */}}
+{{- $config := "" }}
+{{- $copy := true }}
+{{- $file := "" }}
+{{- $fm := false }}
+{{- $skipHeader := false }}
+
+{{- /* Get parameters. */}}
+{{- $config = .Get "config" }}
+{{- $file = .Get "file" }}
+{{- if in (slice "false" false 0) (.Get "copy") }}
+ {{- $copy = false }}
+{{- else if in (slice "true" true 1) (.Get "copy")}}
+ {{- $copy = true }}
+{{- end }}
+{{- if in (slice "false" false 0) (.Get "fm") }}
+ {{- $fm = false }}
+{{- else if in (slice "true" true 1) (.Get "fm")}}
+ {{- $fm = true }}
+{{- end }}
+{{- if in (slice "false" false 0) (.Get "skipHeader") }}
+ {{- $skipHeader = false }}
+{{- else if in (slice "true" true 1) (.Get "skipHeader")}}
+ {{- $skipHeader = true }}
+{{- end }}
+
+{{- /* Define constants. */}}
+{{- $delimiters := dict "toml" "+++" "yaml" "---" }}
+{{- $langs := slice "yaml" "toml" "json" }}
+{{- $placeHolder := "#-hugo-placeholder-#" }}
+
+{{- /* Render. */}}
+{{- $code := "" }}
+{{- with $config }}
++ {{- $file = $file | default "hugo" }}
+ {{- $sections := (split . ".") }}
+ {{- $configSection := index $.Site.Data.docs.config $sections }}
+ {{- $code = dict $sections $configSection }}
+ {{- if $skipHeader }}
+ {{- $code = $configSection }}
+ {{- end }}
+{{- else }}
+ {{- $code = $.Inner }}
+{{- end }}
+<div class="code relative" {{ with $file }}id="{{ . | urlize }}"{{ end }}>
+ <div class="code-nav flex flex-nowrap items-stretch">
+ {{- with $file }}
+ <div class="san-serif f6 dib lh-solid pl2 pv2 mr2">
+ {{ . }}{{ if not $fm }}.{{ end }}
+ </div>
+ {{- end }}
+ {{- range $langs }}
+ <button data-toggle-tab="{{ . }}" class="tab-button {{ cond (eq . "yaml") "active" "" }} ba san-serif f6 dib lh-solid ph2 pv2">
+ {{ . }}
+ </button>
+
+ {{- end }}
+ </div>
+ <div class="tab-content">
+ {{- range $langs }}
+ <div data-pane="{{ . }}" class="code-copy-content nt3 tab-pane {{ cond (eq . "yaml") "active" "" }}">
+ {{- $hCode := $code | transform.Remarshal . }}
+ {{- if and $fm (in (slice "toml" "yaml") .) }}
+ {{- $hCode = printf "%s\n%s\n%s" $placeHolder $hCode $placeHolder }}
+ {{- end }}
+ {{- $hCode = $hCode | replaceRE `\n+` "\n" }}
+ {{ highlight $hCode . "" | replaceRE $placeHolder (index $delimiters .) | safeHTML }}
+ </div>
+ {{- if $copy }}
+ <button class="needs-js copy copy-toggle bg-accent-color-dark f6 absolute top-0 right-0 lh-solid hover-bg-primary-color-dark bn white ph3 pv2" title="Copy this code to your clipboard." data-clipboard-action="copy" aria-label="copy button"></button>
+ {{- /* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}}
+ {{- end }}
+ {{- end }}
+ </div>
+</div>
--- /dev/null
- {{ errorf "Missing version in new-in shortcode "}}
+{{ $version := .Get 0 }}
+{{ if not $version }}
- <button class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 ml2 px-4 border border-gray-400 rounded shadow">
- <a href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}" target="_blank">New in v{{$version}}</a>
++ {{ errorf "Missing version in new-in shortcode " }}
+{{ end }}
+{{ $version = $version | strings.TrimPrefix "v" }}
++<button
++ class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 ml2 px-4 border border-gray-400 rounded shadow">
++ <a
++ href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}"
++ target="_blank"
++ >New in v{{ $version }}</a
++ >
+</button>
--- /dev/null
- HUGO_VERSION = "0.111.3"
+[build]
+publish = "public"
+command = "hugo --gc --minify"
+
+[context.production.environment]
- HUGO_VERSION = "0.111.3"
++HUGO_VERSION = "0.112.3"
+HUGO_ENV = "production"
+HUGO_ENABLEGITINFO = "true"
+
+[context.split1]
+command = "hugo --gc --minify --enableGitInfo"
+
+[context.split1.environment]
- HUGO_VERSION = "0.111.3"
++HUGO_VERSION = "0.112.3"
+HUGO_ENV = "production"
+
+[context.deploy-preview]
+command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
+
+[context.deploy-preview.environment]
- HUGO_VERSION = "0.111.3"
++HUGO_VERSION = "0.112.3"
+
+[context.branch-deploy]
+command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
+
+[context.branch-deploy.environment]
++HUGO_VERSION = "0.112.3"
+
+[context.next.environment]
+HUGO_ENABLEGITINFO = "true"
+
+[[redirects]]
+from = "/npmjs/*"
+to = "/npmjs/"
+status = 200