# Table of Contents - [Hugo Documentation](#hugo-documentation) - [About Hugo](#about-hugo) - [Command line interface](#command-line-interface) - [New template system in Hugo v0.146.0](#new-template-system-in-hugo-v0-146-0) - [Configuration](#configuration) - [Content management](#content-management) - [Developer tools](#developer-tools) - [Contribute to the Hugo project](#contribute-to-the-hugo-project) - [Functions](#functions) - [Getting started](#getting-started) - [Editor plugins](#editor-plugins) - [Host and deploy](#host-and-deploy) - [Hugo Modules](#hugo-modules) - [Hugo Pipes](#hugo-pipes) - [Installation](#installation) - [Introduction](#introduction) - [Introduction](#introduction) - [News](#news) - [Quick reference guides](#quick-reference-guides) - [Render hooks](#render-hooks) - [Introduction](#introduction) - [Quick start](#quick-start) - [Methods](#methods) - [macOS](#macos) - [Shortcodes](#shortcodes) - [Hugo Pipes](#hugo-pipes) - [Troubleshooting](#troubleshooting) - [Introduction](#introduction) - [Front-end interfaces](#front-end-interfaces) - [Use Hugo Modules](#use-hugo-modules) - [Search tools](#search-tools) - [Theme components](#theme-components) - [Templates](#templates) - [Basic usage](#basic-usage) - [License](#license) - [External learning resources](#external-learning-resources) - [Security model](#security-model) - [Other community projects](#other-community-projects) - [Directory structure](#directory-structure) - [Migrate to Hugo](#migrate-to-hugo) - [Template lookup order](#template-lookup-order) - [Linux](#linux) - [BSD](#bsd) - [Windows](#windows) - [Sitemap templates](#sitemap-templates) - [Abs](#abs) - [Custom 404 page](#custom-404-page) - [RSS templates](#rss-templates) - [Site audit](#site-audit) - [Features](#features) - [Menu templates](#menu-templates) - [robots.txt template](#robots-txt-template) - [Categories](#categories) - [Alphabetical](#alphabetical) - [Partial decorators](#partial-decorators) - [Minify](#minify) - [Template types](#template-types) - [Introduction to templating](#introduction-to-templating) - [Cast functions](#cast-functions) - [ByName](#byname) - [cast.ToInt](#cast-toint) - [cast.ToFloat](#cast-tofloat) - [cast.ToString](#cast-tostring) - [Blockquote render hooks](#blockquote-render-hooks) - [Embedded partial templates](#embedded-partial-templates) - [ByCount](#bycount) - [ByWeight](#byweight) - [and](#and) - [break](#break) - [block](#block) - [Add](#add) - [Code block render hooks](#code-block-render-hooks) - [After](#after) - [AddDate](#adddate) - [AllPages](#allpages) - [All settings](#all-settings) - [Children](#children) - [Compare functions](#compare-functions) - [Before](#before) - [compare.Conditional](#compare-conditional) - [Shortcode templates](#shortcode-templates) - [Pagination](#pagination) - [compare.Default](#compare-default) - [compare.Gt](#compare-gt) - [compare.Eq](#compare-eq) - [compare.Ge](#compare-ge) - [compare.Lt](#compare-lt) - [compare.Le](#compare-le) - [Crypto functions](#crypto-functions) - [Archetypes](#archetypes) - [ByExpiryDate](#byexpirydate) - [ByDate](#bydate) - [ByLastmod](#bylastmod) - [compare.Ne](#compare-ne) - [crypto.MD5](#crypto-md5) - [crypto.HMAC](#crypto-hmac) - [crypto.SHA1](#crypto-sha1) - [CSS functions](#css-functions) - [Debug functions](#debug-functions) - [BuildDrafts](#builddrafts) - [ByLength](#bylength) - [ByLinkTitle](#bylinktitle) - [crypto.FNV32a](#crypto-fnv32a) - [crypto.SHA256](#crypto-sha256) - [debug.Dump](#debug-dump) - [debug.Timer](#debug-timer) - [Diagram functions](#diagram-functions) - [ByPublishDate](#bypublishdate) - [ByParam](#byparam) - [Concat](#concat) - [css.Quoted](#css-quoted) - [debug.VisualizeSpaces](#debug-visualizespaces) - [ByTitle](#bytitle) - [ByWeight](#byweight) - [Count](#count) - [css.Unquoted](#css-unquoted) - [css.PostCSS](#css-postcss) - [BaseURL](#baseurl) - [ByLanguage](#bylanguage) - [css.TailwindCSS](#css-tailwindcss) - [Development](#development) - [diagrams.Goat](#diagrams-goat) - [Deprecation](#deprecation) - [Encoding functions](#encoding-functions) - [Build options](#build-options) - [encoding.Base64Encode](#encoding-base64encode) - [encoding.Base64Decode](#encoding-base64decode) - [encoding.Jsonify](#encoding-jsonify) - [Configure build](#configure-build) - [Collections functions](#collections-functions) - [continue](#continue) - [css.Sass](#css-sass) - [Global functions](#global-functions) - [Duration methods](#duration-methods) - [collections.Apply](#collections-apply) - [collections.Append](#collections-append) - [Documentation](#documentation) - [collections.Delimit](#collections-delimit) - [collections.After](#collections-after) - [collections.Complement](#collections-complement) - [collections.Dictionary](#collections-dictionary) - [collections.First](#collections-first) - [Deploy with rclone](#deploy-with-rclone) - [Details shortcode](#details-shortcode) - [Fmt functions](#fmt-functions) - [Hash functions](#hash-functions) - [collections.In](#collections-in) - [fmt.Errorf](#fmt-errorf) - [hash.FNV32a](#hash-fnv32a) - [collections.Reverse](#collections-reverse) - [collections.Intersect](#collections-intersect) - [collections.Index](#collections-index) - [collections.Slice](#collections-slice) - [Deploy with rsync](#deploy-with-rsync) - [fmt.Erroridf](#fmt-erroridf) - [fmt.Printf](#fmt-printf) - [fmt.Print](#fmt-print) - [fmt.Println](#fmt-println) - [hash.XxHash](#hash-xxhash) - [Configure file caches](#configure-file-caches) - [collections.D](#collections-d) - [collections.Group](#collections-group) - [collections.IsSet](#collections-isset) - [collections.Merge](#collections-merge) - [collections.Seq](#collections-seq) - [collections.Last](#collections-last) - [collections.SymDiff](#collections-symdiff) - [collections.Querify](#collections-querify) - [Content](#content) - [Fingerprint](#fingerprint) - [fmt.Warnf](#fmt-warnf) - [fmt.Warnidf](#fmt-warnidf) - [Glob patterns](#glob-patterns) - [Comments](#comments) - [Configure cascade](#configure-cascade) - [collections.Shuffle](#collections-shuffle) - [collections.Uniq](#collections-uniq) - [collections.KeyVals](#collections-keyvals) - [collections.Union](#collections-union) - [Figure shortcode](#figure-shortcode) - [Deploy with hugo](#deploy-with-hugo) - [Content formats](#content-formats) - [define](#define) - [Get](#get) - [collections.Sort](#collections-sort) - [Colors](#colors) - [Frequently asked questions](#frequently-asked-questions) - [collections.NewScratch](#collections-newscratch) - [Copyright](#copyright) - [Crop](#crop) - [else](#else) - [end](#end) - [Data](#data) - [First](#first) - [Config](#config) - [Data sources](#data-sources) - [Day](#day) - [Get](#get) - [Content adapters](#content-adapters) - [collections.Where](#collections-where) - [Data](#data) - [Exif](#exif) - [Err](#err) - [Go template functions, operators, and statements](#go-template-functions-operators-and-statements) - [Configure content types](#configure-content-types) - [HasChildren](#haschildren) - [Dimension](#dimension) - [Equal](#equal) - [Fill](#fill) - [Fit](#fit) - [GroupBy](#groupby) - [GroupByParam](#groupbyparam) - [GroupByDate](#groupbydate) - [GroupByLastmod](#groupbylastmod) - [GroupByExpiryDate](#groupbyexpirydate) - [GroupByPublishDate](#groupbypublishdate) - [GroupByParamDate](#groupbyparamdate) - [Configure deployment](#configure-deployment) - [Format](#format) - [GetPage](#getpage) - [Configure front matter](#configure-front-matter) - [Diagrams](#diagrams) - [Emojis](#emojis) - [Filter](#filter) - [Glossary](#glossary) - [AllTranslations](#alltranslations) - [AlternativeOutputFormats](#alternativeoutputformats) - [Ancestors](#ancestors) - [Aliases](#aliases) - [Front matter](#front-matter) - [BundleType](#bundletype) - [CodeOwners](#codeowners) - [Content](#content) - [ContentWithoutSummary](#contentwithoutsummary) - [CurrentSection](#currentsection) - [Date](#date) - [Data](#data) - [Description](#description) - [Draft](#draft) - [Eq](#eq) - [ExpiryDate](#expirydate) - [FirstSection](#firstsection) - [File](#file) - [FuzzyWordCount](#fuzzywordcount) - [Fragments](#fragments) - [GetTerms](#getterms) - [GetPage](#getpage) - [GitInfo](#gitinfo) - [HasMenuCurrent](#hasmenucurrent) - [Functions](#functions) --- # Hugo Documentation Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/documentation/](https://gohugo.io/images/qr/qr_4e96090b8a154eda.png) [### About\ \ Learn about Hugo and its features, privacy protections, and security model.](https://gohugo.io/about/) [### CLI\ \ Use the command line interface (CLI) to manage your project.](https://gohugo.io/commands/) [### Configuration\ \ Configure your site.](https://gohugo.io/configuration/) [### Content management\ \ Hugo makes managing large static sites easy with support for archetypes, content types, menus, cross references, summaries, and more.](https://gohugo.io/content-management/) [### Contribute\ \ Contribute to development, documentation, and themes.](https://gohugo.io/contribute/) [### Developer tools\ \ Third-party tools to help you create and manage sites.](https://gohugo.io/tools/) [### Functions\ \ Use these functions within your templates and archetypes.](https://gohugo.io/functions/) [### Getting started\ \ How to get started with Hugo.](https://gohugo.io/getting-started/) [### Host and deploy\ \ Services and tools to host and deploy your site.](https://gohugo.io/host-and-deploy/) [### Hugo Modules\ \ Use Hugo Modules to manage the content, presentation, and behavior of your site.](https://gohugo.io/hugo-modules/) [### Hugo Pipes\ \ Use asset pipelines to transform and optimize images, stylesheets, and JavaScript.](https://gohugo.io/hugo-pipes/) [### Installation\ \ Install Hugo on macOS, Linux, Windows, BSD, and on any machine that can run the Go compiler tool chain.](https://gohugo.io/installation/) [### Methods\ \ Use these methods within your templates.](https://gohugo.io/methods/) [### News\ \ Stay up-to-date with the latest news and announcements.](https://gohugo.io/news/) [### Quick reference\ \ Use these quick reference guides for quick access to key information.](https://gohugo.io/quick-reference/) [### Render hooks\ \ Create render hook templates to override the rendering of Markdown to HTML.](https://gohugo.io/render-hooks/) [### Shortcodes\ \ Insert elements such as videos, images, and social media embeds into your content using Hugo's embedded shortcodes.](https://gohugo.io/shortcodes/) [### Templates\ \ Create templates to render your content, resources, and data.](https://gohugo.io/templates/) [### Troubleshooting\ \ Use these techniques when troubleshooting your site.](https://gohugo.io/troubleshooting/) --- # About Hugo Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/about/](https://gohugo.io/images/qr/qr_abaf0aa194781691.png) [### Introduction\ \ Hugo is a static site generator written in Go, optimized for speed and designed for flexibility.](https://gohugo.io/about/introduction/) [### Features\ \ Hugo's rich and powerful feature set provides the framework and tools to create static sites that build in seconds, often less.](https://gohugo.io/about/features/) [### Security\ \ A summary of Hugo's security model.](https://gohugo.io/about/security/) [### License\ \ Hugo is released under the Apache 2.0 license.](https://gohugo.io/about/license/) --- # Command line interface Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/commands/](https://gohugo.io/images/qr/qr_f0f85c91a92a5cf8.png) [### hugo\ \ Build your project.](https://gohugo.io/commands/hugo/) [### hugo build\ \ Build your project.](https://gohugo.io/commands/hugo_build/) [### hugo completion\ \ Generate the autocompletion script for the specified shell.](https://gohugo.io/commands/hugo_completion/) [### hugo completion bash\ \ Generate the autocompletion script for bash.](https://gohugo.io/commands/hugo_completion_bash/) [### hugo completion fish\ \ Generate the autocompletion script for fish.](https://gohugo.io/commands/hugo_completion_fish/) [### hugo completion powershell\ \ Generate the autocompletion script for powershell.](https://gohugo.io/commands/hugo_completion_powershell/) [### hugo completion zsh\ \ Generate the autocompletion script for zsh.](https://gohugo.io/commands/hugo_completion_zsh/) [### hugo config\ \ Display project configuration.](https://gohugo.io/commands/hugo_config/) [### hugo config mounts\ \ Print the configured file mounts.](https://gohugo.io/commands/hugo_config_mounts/) [### hugo convert\ \ Convert front matter to another format.](https://gohugo.io/commands/hugo_convert/) [### hugo convert toJSON\ \ Convert front matter to JSON.](https://gohugo.io/commands/hugo_convert_tojson/) [### hugo convert toTOML\ \ Convert front matter to TOML.](https://gohugo.io/commands/hugo_convert_totoml/) [### hugo convert toYAML\ \ Convert front matter to YAML.](https://gohugo.io/commands/hugo_convert_toyaml/) [### hugo deploy\ \ Deploy your project to a cloud provider.](https://gohugo.io/commands/hugo_deploy/) [### hugo env\ \ Display version and environment info.](https://gohugo.io/commands/hugo_env/) [### hugo gen\ \ Generate documentation and syntax highlighting styles.](https://gohugo.io/commands/hugo_gen/) [### hugo gen chromastyles\ \ Generate CSS stylesheet for the Chroma code highlighter.](https://gohugo.io/commands/hugo_gen_chromastyles/) [### hugo gen doc\ \ Generate Markdown documentation for the Hugo CLI.](https://gohugo.io/commands/hugo_gen_doc/) [### hugo gen man\ \ Generate man pages for the Hugo CLI.](https://gohugo.io/commands/hugo_gen_man/) [### hugo import\ \ Import a project from another system.](https://gohugo.io/commands/hugo_import/) [### hugo import jekyll\ \ hugo import from Jekyll.](https://gohugo.io/commands/hugo_import_jekyll/) [### hugo list\ \ List content.](https://gohugo.io/commands/hugo_list/) [### hugo list all\ \ List all content.](https://gohugo.io/commands/hugo_list_all/) [### hugo list drafts\ \ List draft content.](https://gohugo.io/commands/hugo_list_drafts/) [### hugo list expired\ \ List expired content.](https://gohugo.io/commands/hugo_list_expired/) [### hugo list future\ \ List future content.](https://gohugo.io/commands/hugo_list_future/) [### hugo list published\ \ List published content.](https://gohugo.io/commands/hugo_list_published/) [### hugo mod\ \ Manage modules.](https://gohugo.io/commands/hugo_mod/) [### hugo mod clean\ \ Delete the Hugo Module cache for the current project.](https://gohugo.io/commands/hugo_mod_clean/) [### hugo mod get\ \ Resolves dependencies in your current Hugo project.](https://gohugo.io/commands/hugo_mod_get/) [### hugo mod graph\ \ Print a module dependency graph.](https://gohugo.io/commands/hugo_mod_graph/) [### hugo mod init\ \ Initialize this project as a Hugo Module.](https://gohugo.io/commands/hugo_mod_init/) [### hugo mod npm\ \ Various npm helpers.](https://gohugo.io/commands/hugo_mod_npm/) [### hugo mod npm pack\ \ Experimental: Prepares and writes a composite package.json file for your project.](https://gohugo.io/commands/hugo_mod_npm_pack/) [### hugo mod tidy\ \ Remove unused entries in go.mod and go.sum.](https://gohugo.io/commands/hugo_mod_tidy/) [### hugo mod vendor\ \ Vendor all module dependencies into the \_vendor directory.](https://gohugo.io/commands/hugo_mod_vendor/) [### hugo mod verify\ \ Verify dependencies.](https://gohugo.io/commands/hugo_mod_verify/) [### hugo new\ \ Create new content.](https://gohugo.io/commands/hugo_new/) [### hugo new content\ \ Create new content.](https://gohugo.io/commands/hugo_new_content/) [### hugo new project\ \ Create a new project.](https://gohugo.io/commands/hugo_new_project/) [### hugo new theme\ \ Create a new theme.](https://gohugo.io/commands/hugo_new_theme/) [### hugo server\ \ Start the embedded web server.](https://gohugo.io/commands/hugo_server/) [### hugo server trust\ \ Install the local CA in the system trust store.](https://gohugo.io/commands/hugo_server_trust/) [### hugo version\ \ Display version.](https://gohugo.io/commands/hugo_version/) --- # New template system in Hugo v0.146.0 Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/new-templatesystem-overview/](https://gohugo.io/images/qr/qr_4c10093d993ca02.png) Overview of the new template system in Hugo v0.146.0. In [Hugo v0.146.0](https://github.com/gohugoio/hugo/releases/tag/v0.146.0) , we performed a full re-implementation of how Go templates are handled in Hugo. This includes structural changes to the `layouts` folder and a new, more powerful template lookup system. We have aimed to maintain as much backward compatibility as possible by mapping “old to new,” but some reported breakages have occurred. We’re working on a full overhaul of the documentation on this topic – until then, this is a one-pager with the most important changes. Changes to the `layouts` folder[](https://gohugo.io/templates/new-templatesystem-overview/#changes-to-the-layouts-folder) -------------------------------------------------------------------------------------------------------------------------- | Description | Action required | | --- | --- | | The `_default` folder is removed. | Move all files in `layouts/_default` up to the `layouts/` root. | | The `layouts/partials` folder is renamed to `layouts/_partials`. | Rename the folder. | | The `layouts/shortcodes` folder is renamed to `layouts/_shortcodes`. | Rename the folder. | | Any folder in `layouts` that does not start with `_` represents the root of a [Page path](https://gohugo.io/methods/page/path/)
. In [Hugo v0.146.0](https://github.com/gohugoio/hugo/releases/tag/v0.146.0)
, this can be nested as deeply as needed, and `_shortcodes` and `_markup` folders can be placed at any level in the tree. | No action required. | | The above also means that there’s no top-level `layouts/taxonomy` or `layouts/section` folders anymore, unless it represents a [Page path](https://gohugo.io/methods/page/path/)
. | Move them up to `layouts/` with one of the [Page kinds](https://gohugo.io/methods/page/kind/)
`section`, `taxonomy` or `term` as the base name, or place the layouts into the taxonomy [Page path](https://gohugo.io/methods/page/path/)
. | | A template named `taxonomy.html` used to be a candidate for both Page kind `term` and `taxonomy`, now it’s only considered for `taxonomy`. | Create both `taxonomy.html` and `term.html` or create a more general layout, e.g. `list.html`. | | For base templates (e.g., `baseof.html`), in previous Hugo versions, you could prepend one identifier (layout, type, or kind) with a hyphen in front of the baseof keyword. | Move that identifier after the first “dot,” e.g., rename`list-baseof.html` to `baseof.list.html`. | | We have added a new `all` “catch-all” layout. This means that if you have, e.g., `layouts/all.html` and that is the only template, that layout will be used for all HTML page rendering. | | | We have removed the concept of `_internal` Hugo templates.[1](https://gohugo.io/templates/new-templatesystem-overview/#fn:1) | Replace constructs similar to `{{ template "_internal/opengraph.html" . }}` with `{{ partial "opengraph.html" . }}`. | | The identifiers that can be used in a template filename are one of the [Page kinds](https://gohugo.io/methods/page/kind/)
(`home`, `page`, `section`, `taxonomy`, or `term`), one of the standard layouts (`list`, `single`, or `all`), a custom layout (as defined in the `layout` front matter field), a language (e.g., `en`), an output format (e.g., `html`, `rss`), and a suffix representing the media type. E.g., `all.en.html` and `home.rss.xml`. | | | The above means that there’s no such thing as an `index.html` template for the home page anymore. | Rename `index.html` to `home.html`. | Also, see the [Example folder structure](https://gohugo.io/templates/new-templatesystem-overview/#example-folder-structure) below for a more concrete example of the new layout system. Changes to template lookup order[](https://gohugo.io/templates/new-templatesystem-overview/#changes-to-template-lookup-order) ------------------------------------------------------------------------------------------------------------------------------ We have consolidated the template lookup so it works the same across all [template types](https://gohugo.io/templates/types/) . The previous setup was very hard to understand and had a massive number of variants. The new setup aims to feel natural with few surprises. The identifiers used in the template weighting, in order of importance, are: | Identifier | Description | | --- | --- | | Layout custom | The custom `layout` set in front matter. | | [Page kinds](https://gohugo.io/methods/page/kind/) | One of `home`, `section`, `taxonomy`, `term`, `page`. | | Layouts standard 1 | `list` or `single`. | | Output format | The output format (e.g., `html`, `rss`). | | Layouts standard 2 | `all`. | | Language | The language (e.g., `en`). | | Media type | The media type (e.g., `text/html`). | | [Page path](https://gohugo.io/methods/page/path/) | The page path (e.g., `/blog/mypost`). | | Type | `type` set in front matter.[2](https://gohugo.io/templates/new-templatesystem-overview/#fn:2) | For templates placed in a `layouts` folder partly or completely matching a [Page path](https://gohugo.io/methods/page/path/) , a closer match upwards will be considered _better_. In the [Example folder structure](https://gohugo.io/templates/new-templatesystem-overview/#example-folder-structure) below, this means that: * `layouts/docs/api/_markup/render-link.html` will be used to render links from the Page path `/docs/api` and below. * `layouts/docs/baseof.html` will be used as the base template for the Page path `/docs` and below. * `layouts/tags/term.html` will be used for all `term` rendering in the `tags` taxonomy, except for the `blue` term, which will use `layouts/tags/blue/list.html`. Example folder structure[](https://gohugo.io/templates/new-templatesystem-overview/#example-folder-structure) -------------------------------------------------------------------------------------------------------------- layouts ├── baseof.html ├── baseof.term.html ├── home.html ├── page.html ├── section.html ├── taxonomy.html ├── term.html ├── term.mylayout.en.rss.xml ├── _markup │ ├── render-codeblock-go.term.mylayout.no.rss.xml │ └── render-link.html ├── _partials │ └── mypartial.html ├── _shortcodes │ ├── myshortcode.html │ └── myshortcode.section.mylayout.en.rss.xml ├── docs │ ├── baseof.html │ ├── _shortcodes │ │ └── myshortcode.html │ └── api │ ├── mylayout.html │ ├── page.html │ └── _markup │ └── render-link.html └── tags ├── taxonomy.html ├── term.html └── blue └── list.html * * * 1. The old way of doing it made it very hard/impossible to, e.g., override `_internal/disqus.html` in a theme. Now you can just create a partial with the same name. [↩︎](https://gohugo.io/templates/new-templatesystem-overview/#fnref:1) 2. The `type` set in front matter will effectively replace the `section` folder in [Page path](https://gohugo.io/methods/page/path/) when doing lookups. [↩︎](https://gohugo.io/templates/new-templatesystem-overview/#fnref:2) * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/new-templatesystem-overview.md) --- # Configuration Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/configuration/](https://gohugo.io/images/qr/qr_7ad5342a052209f9.png) [### Introduction\ \ Configure your site using files, directories, and environment variables.](https://gohugo.io/configuration/introduction/) [### All settings\ \ The complete list of Hugo configuration settings.](https://gohugo.io/configuration/all/) [### Build\ \ Configure global build options.](https://gohugo.io/configuration/build/) [### Caches\ \ Configure file caches.](https://gohugo.io/configuration/caches/) [### Cascade\ \ Configure cascade.](https://gohugo.io/configuration/cascade/) [### Content types\ \ Configure content types.](https://gohugo.io/configuration/content-types/) [### Deployment\ \ Configure deployments to Amazon S3, Azure Blob Storage, or Google Cloud Storage.](https://gohugo.io/configuration/deployment/) [### Front matter\ \ Configure front matter.](https://gohugo.io/configuration/front-matter/) [### HTTP cache\ \ Configure the HTTP cache.](https://gohugo.io/configuration/http-cache/) [### Imaging\ \ Configure imaging.](https://gohugo.io/configuration/imaging/) [### Languages\ \ Configure the languages in your multilingual project.](https://gohugo.io/configuration/languages/) [### Markup\ \ Configure markup.](https://gohugo.io/configuration/markup/) [### Media types\ \ Configure media types.](https://gohugo.io/configuration/media-types/) [### Menus\ \ Centrally define menu entries for one or more menus.](https://gohugo.io/configuration/menus/) [### Minify\ \ Configure minify.](https://gohugo.io/configuration/minify/) [### Modules\ \ Configure modules.](https://gohugo.io/configuration/module/) [### Output formats\ \ Configure output formats.](https://gohugo.io/configuration/output-formats/) [### Outputs\ \ Configure which output formats to render for each page kind.](https://gohugo.io/configuration/outputs/) [### Page\ \ Configure page behavior.](https://gohugo.io/configuration/page/) [### Pagination\ \ Configure pagination.](https://gohugo.io/configuration/pagination/) [### Params\ \ Create custom site parameters.](https://gohugo.io/configuration/params/) [### Permalinks\ \ Configure permalinks.](https://gohugo.io/configuration/permalinks/) [### Privacy\ \ Configure your site to help comply with regional privacy regulations.](https://gohugo.io/configuration/privacy/) [### Related content\ \ Configure related content.](https://gohugo.io/configuration/related-content/) [### Roles\ \ Configure roles.](https://gohugo.io/configuration/roles/) [### Security\ \ Configure security.](https://gohugo.io/configuration/security/) [### Segments\ \ Configure your site for segmented rendering.](https://gohugo.io/configuration/segments/) [### Server\ \ Configure the development server.](https://gohugo.io/configuration/server/) [### Services\ \ Configure embedded templates.](https://gohugo.io/configuration/services/) [### Sitemap\ \ Configure the sitemap.](https://gohugo.io/configuration/sitemap/) [### Taxonomies\ \ Configure taxonomies.](https://gohugo.io/configuration/taxonomies/) [### Ugly URLs\ \ Configure ugly URLs.](https://gohugo.io/configuration/ugly-urls/) [### Versions\ \ Configure versions.](https://gohugo.io/configuration/versions/) --- # Content management Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/content-management/](https://gohugo.io/images/qr/qr_9a09cb226db55428.png) [### Archetypes\ \ An archetype is a template for new content.](https://gohugo.io/content-management/archetypes/) [### Build options\ \ Build options help define how Hugo must treat a given page when building the site.](https://gohugo.io/content-management/build-options/) [### Comments\ \ Hugo ships with an internal Disqus template, but this isn't the only commenting system that will work with your new Hugo website.](https://gohugo.io/content-management/comments/) [### Content adapters\ \ Create content adapters to dynamically add content when building your project.](https://gohugo.io/content-management/content-adapters/) [### Content formats\ \ Create your content using Markdown, HTML, Emacs Org Mode, AsciiDoc, Pandoc, or reStructuredText.](https://gohugo.io/content-management/formats/) [### Data sources\ \ Use local and remote data sources to augment or create content.](https://gohugo.io/content-management/data-sources/) [### Diagrams\ \ Use fenced code blocks and Markdown render hooks to include diagrams in your content.](https://gohugo.io/content-management/diagrams/) [### Front matter\ \ Use front matter to add metadata to your content.](https://gohugo.io/content-management/front-matter/) [### Image processing\ \ Transform images to change their size, shape, and appearance.](https://gohugo.io/content-management/image-processing/) [### Markdown attributes\ \ Use Markdown attributes to add HTML attributes when rendering Markdown to HTML.](https://gohugo.io/content-management/markdown-attributes/) [### Mathematics\ \ Include mathematical equations and expressions in Markdown using LaTeX markup.](https://gohugo.io/content-management/mathematics/) [### Menus\ \ Create menus by defining entries, localizing each entry, and rendering the resulting data structure.](https://gohugo.io/content-management/menus/) [### Multilingual\ \ Localize your project for each language and region, including translations, images, dates, currencies, numbers, percentages, and collation sequence. Hugo's multilingual framework supports single-host and multihost configurations.](https://gohugo.io/content-management/multilingual/) [### Organization\ \ Hugo assumes that the same structure that works to organize your source content is used to organize the rendered site.](https://gohugo.io/content-management/organization/) [### Page bundles\ \ Use page bundles to logically associate one or more resources with content.](https://gohugo.io/content-management/page-bundles/) [### Page resources\ \ Use page resources to logically associate assets with a page.](https://gohugo.io/content-management/page-resources/) [### Related content\ \ List related content in "See Also" sections.](https://gohugo.io/content-management/related-content/) [### Sections\ \ Organize content into sections.](https://gohugo.io/content-management/sections/) [### Shortcodes\ \ Use embedded, custom, or inline shortcodes to insert elements such as videos, images, and social media embeds into your content.](https://gohugo.io/content-management/shortcodes/) [### Summaries\ \ Create and render content summaries.](https://gohugo.io/content-management/summaries/) [### Syntax highlighting\ \ Add syntax highlighting to code examples.](https://gohugo.io/content-management/syntax-highlighting/) [### Taxonomies\ \ Hugo includes support for user-defined taxonomies.](https://gohugo.io/content-management/taxonomies/) [### URL management\ \ Control the structure and appearance of URLs through front matter entries and settings in your project configuration.](https://gohugo.io/content-management/urls/) --- # Developer tools Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/tools/](https://gohugo.io/images/qr/qr_cd723edd70e1ac73.png) [### Editor plugins\ \ The Hugo community uses a wide range of tools and has developed plugins for some of the most popular text editors to help automate parts of your workflow.](https://gohugo.io/tools/editors/) [### Front-ends\ \ Do you prefer a graphical user interface over a text editor? Give these front-ends a try.](https://gohugo.io/tools/front-ends/) [### Search\ \ See some of the open-source and commercial search options for your newly created Hugo website.](https://gohugo.io/tools/search/) [### Migrations\ \ A list of community-developed tools for migrating from your existing static site generator or content management system to Hugo.](https://gohugo.io/tools/migrations/) [### Other projects\ \ Some interesting projects developed by the Hugo community that don't quite fit into our other developer tool categories.](https://gohugo.io/tools/other/) --- # Contribute to the Hugo project Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/contribute/](https://gohugo.io/images/qr/qr_81ed28e6f71fa7cb.png) [### Development\ \ Contribute to the development of Hugo.](https://gohugo.io/contribute/development/) [### Documentation\ \ Help us to improve the documentation by identifying issues and suggesting changes.](https://gohugo.io/contribute/documentation/) [### Themes\ \ If you've built a Hugo theme and want to contribute back to the Hugo Community, please share it with us.](https://gohugo.io/contribute/themes/) --- # Functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/](https://gohugo.io/images/qr/qr_58797df1ba1f4895.png) [### cast\ \ Use these functions to cast a value from one data type to another.](https://gohugo.io/functions/cast/) [### collections\ \ Use these functions to manipulate and query maps, slices, and strings.](https://gohugo.io/functions/collections/) [### compare\ \ Use these functions to compare two or more values.](https://gohugo.io/functions/compare/) [### crypto\ \ Use these functions to create cryptographic hashes.](https://gohugo.io/functions/crypto/) [### css\ \ Use these functions to work with CSS and Sass files.](https://gohugo.io/functions/css/) [### debug\ \ Use these functions to debug your templates.](https://gohugo.io/functions/debug/) [### diagrams\ \ Use these functions to render diagrams.](https://gohugo.io/functions/diagrams/) [### encoding\ \ Use these functions to encode and decode data.](https://gohugo.io/functions/encoding/) [### fmt\ \ Use these functions to print strings within a template or to print messages to the terminal.](https://gohugo.io/functions/fmt/) [### global\ \ Use these global functions to access page and site data.](https://gohugo.io/functions/global/) [### go template\ \ These are the functions, operators, and statements provided by Go's text/template package.](https://gohugo.io/functions/go-template/) [### hash\ \ Use these functions to create non-cryptographic hashes.](https://gohugo.io/functions/hash/) [### hugo\ \ Use these functions to access information about the Hugo application and the current environment.](https://gohugo.io/functions/hugo/) [### images\ \ Use these functions to create an image filter, apply an image filter to an image, and to retrieve image information.](https://gohugo.io/functions/images/) [### inflect\ \ These functions provide word inflection features such as singularization and pluralization of English nouns.](https://gohugo.io/functions/inflect/) [### js\ \ Use these functions to work with JavaScript and TypeScript files.](https://gohugo.io/functions/js/) [### lang\ \ Use these functions to adapt your site to meet language and regional requirements.](https://gohugo.io/functions/lang/) [### math\ \ Use these functions to perform mathematical operations.](https://gohugo.io/functions/math/) [### openapi3\ \ Use these functions to work with OpenAPI 3 definitions.](https://gohugo.io/functions/openapi3/) [### os\ \ Use these functions to interact with the operating system.](https://gohugo.io/functions/os/) [### partials\ \ Use these functions to call partial templates.](https://gohugo.io/functions/partials/) [### path\ \ Use these functions to work with file paths.](https://gohugo.io/functions/path/) [### reflect\ \ Use these functions to determine a value's data type.](https://gohugo.io/functions/reflect/) [### resources\ \ Use these functions to work with resources.](https://gohugo.io/functions/resources/) [### safe\ \ Use these functions to declare a value as safe in the context of Go's html/template package.](https://gohugo.io/functions/safe/) [### strings\ \ Use these functions to work with strings.](https://gohugo.io/functions/strings/) [### templates\ \ Use these functions to query the template system.](https://gohugo.io/functions/templates/) [### time\ \ Use these functions to work with time values.](https://gohugo.io/functions/time/) [### transform\ \ Use these functions to transform values from one format to another.](https://gohugo.io/functions/transform/) [### urls\ \ Use these functions to work with URLs.](https://gohugo.io/functions/urls/) --- # Getting started Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/getting-started/](https://gohugo.io/images/qr/qr_b141c905cffe107d.png) [### Quick start\ \ Create your first Hugo project.](https://gohugo.io/getting-started/quick-start/) [### Basic usage\ \ Use the command-line interface (CLI) to perform basic tasks.](https://gohugo.io/getting-started/usage/) [### Directory structure\ \ An overview of Hugo's directory structure.](https://gohugo.io/getting-started/directory-structure/) [### External resources\ \ Use these third-party resources to learn Hugo.](https://gohugo.io/getting-started/external-learning-resources/) --- # Editor plugins Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/tools/editors/](https://gohugo.io/images/qr/qr_d4754ed017e60a45.png) The Hugo community uses a wide range of tools and has developed plugins for some of the most popular text editors to help automate parts of your workflow. Visual Studio Code[](https://gohugo.io/tools/editors/#visual-studio-code) -------------------------------------------------------------------------- [Front Matter](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter) [](https://gohugo.io/tools/editors/#front-matter) Once you go for a static site, you need to think about how you are going to manage your articles. Front matter is a tool that helps you maintain the metadata/front matter of your articles like: creation date, modified date, slug, tile, SEO check, and more. [Hugo Helper](https://marketplace.visualstudio.com/items?itemName=rusnasonov.vscode-hugo) [](https://gohugo.io/tools/editors/#hugo-helper) Hugo Helper is a plugin for Visual Studio Code that has some useful commands for Hugo. The source code can be found on its [GitHub repository](https://github.com/rusnasonov/vscode-hugo) . [Hugo Language and Syntax Support](https://marketplace.visualstudio.com/items?itemName=budparr.language-hugo-vscode) [](https://gohugo.io/tools/editors/#hugo-language-and-syntax-support) Hugo Language and Syntax Support is a Visual Studio Code plugin for Hugo syntax highlighting and snippets. The source code can be found on its [GitHub repository](https://github.com/budparr/language-hugo-vscode) . [Hugo Themer](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-hugo-themer) [](https://gohugo.io/tools/editors/#hugo-themer) Hugo Themer is an extension to help you while developing themes. It allows you to easily navigate through your theme files. [Hugofy](https://marketplace.visualstudio.com/items?itemName=akmittal.hugofy) [](https://gohugo.io/tools/editors/#hugofy) Hugofy is a plugin for Visual Studio Code to “make life easier” when developing with Hugo. The source code can be found on its [GitHub repository](https://github.com/akmittal/hugofy-vscode) . [Prettier Plugin for Go Templates](https://github.com/NiklasPor/prettier-plugin-go-template) [](https://gohugo.io/tools/editors/#prettier-plugin-for-go-templates) Format Hugo templates using this [Prettier](https://prettier.io/) plugin. See [installation instructions](https://discourse.gohugo.io/t/38403) . [Syntax Highlighting for Hugo Shortcodes](https://marketplace.visualstudio.com/items?itemName=kaellarkin.hugo-shortcode-syntax) [](https://gohugo.io/tools/editors/#syntax-highlighting-for-hugo-shortcodes) This extension adds some syntax highlighting for Shortcodes, making visual identification of individual pieces easier. JetBrains IDEs[](https://gohugo.io/tools/editors/#jetbrains-ides) ------------------------------------------------------------------ [Smart Hugo](https://smarthugo.dev/) [](https://gohugo.io/tools/editors/#smart-hugo) Plugin for IntelliJ IDEA, WebStorm, PhpStorm, and other JetBrains IDEs that adds Hugo template support including syntax highlighting, actions completion, code formatting, and optional advanced features. Emacs[](https://gohugo.io/tools/editors/#emacs) ------------------------------------------------ [emacs-easy-hugo](https://github.com/masasam/emacs-easy-hugo) [](https://gohugo.io/tools/editors/#emacs-easy-hugo) Emacs major mode for managing hugo blogs. Note that Hugo also supports [Org-mode](https://gohugo.io/content-management/formats/) . [ox-hugo.el](https://ox-hugo.scripter.co/) [](https://gohugo.io/tools/editors/#ox-hugoel) Native Org-mode exporter that exports to Blackfriday Markdown with Hugo front-matter. `ox-hugo` supports two common Org blogging flows — exporting multiple Org subtrees in a single file to multiple Hugo posts, and exporting a single Org file to a single Hugo post. It also leverages the Org tag and property inheritance features. See [Why ox-hugo?](https://ox-hugo.scripter.co/doc/why-ox-hugo/) for more. Sublime Text[](https://gohugo.io/tools/editors/#sublime-text) -------------------------------------------------------------- [Hugofy](https://github.com/akmittal/Hugofy) [](https://gohugo.io/tools/editors/#hugofy-1) Hugofy is a plugin for Sublime Text 3 to make life easier to use Hugo static site generator. [Hugo Snippets](https://packagecontrol.io/packages/Hugo%20Snippets) [](https://gohugo.io/tools/editors/#hugo-snippets) Hugo Snippets is a useful plugin for adding automatic snippets to Sublime Text 3. Vim[](https://gohugo.io/tools/editors/#vim) -------------------------------------------- [Vim Hugo Helper](https://github.com/robertbasic/vim-hugo-helper) [](https://gohugo.io/tools/editors/#vim-hugo-helper) A small Vim plugin that facilitates authoring pages and blog posts with Hugo. [vim-hugo](https://github.com/phelipetls/vim-hugo) [](https://gohugo.io/tools/editors/#vim-hugo) A Vim plugin with syntax highlighting for templates and a few other features. * * * Last updated: December 19, 2025 : [Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)](https://github.com/gohugoio/hugoDocs/commit/7e1a08e545030efcad0ac52c1cf9469244bc3f2b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/tools/editors.md) --- # Host and deploy Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/host-and-deploy/](https://gohugo.io/images/qr/qr_1adf0640b09e05e7.png) [### Deploy with hugo\ \ Deploy your site with the hugo CLI.](https://gohugo.io/host-and-deploy/deploy-with-hugo-deploy/) [### Deploy with rclone\ \ Deploy your site with the rclone CLI.](https://gohugo.io/host-and-deploy/deploy-with-rclone/) [### Deploy with rsync\ \ Deploy your site with the rsync CLI.](https://gohugo.io/host-and-deploy/deploy-with-rsync/) [### Host on AWS Amplify\ \ Host your site on AWS Amplify.](https://gohugo.io/host-and-deploy/host-on-aws-amplify/) [### Host on Azure Static Web Apps\ \ Host your site on Azure Static Web Apps.](https://gohugo.io/host-and-deploy/host-on-azure-static-web-apps/) [### Host on Cloudflare\ \ Host your site on Cloudflare.](https://gohugo.io/host-and-deploy/host-on-cloudflare/) [### Host on Firebase\ \ Host your site on Firebase.](https://gohugo.io/host-and-deploy/host-on-firebase/) [### Host on GitHub Pages\ \ Host your site on GitHub Pages.](https://gohugo.io/host-and-deploy/host-on-github-pages/) [### Host on GitLab Pages\ \ Host your site on GitLab Pages.](https://gohugo.io/host-and-deploy/host-on-gitlab-pages/) [### Host on Netlify\ \ Host your site on Netlify.](https://gohugo.io/host-and-deploy/host-on-netlify/) [### Host on Render\ \ Host your site on Render.](https://gohugo.io/host-and-deploy/host-on-render/) [### Host on SourceHut Pages\ \ Host your site on SourceHut Pages.](https://gohugo.io/host-and-deploy/host-on-sourcehut-pages/) [### Host on Vercel\ \ Host your site on Vercel.](https://gohugo.io/host-and-deploy/host-on-vercel/) --- # Hugo Modules Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/hugo-modules/](https://gohugo.io/images/qr/qr_2eb91408fab38157.png) [### Introduction\ \ A brief introduction to Hugo Modules.](https://gohugo.io/hugo-modules/introduction/) [### Use Hugo Modules\ \ Use modules to manage the content, layout, presentation, and behavior of your site.](https://gohugo.io/hugo-modules/use-modules/) [### Theme components\ \ Hugo provides advanced theming support with theme components.](https://gohugo.io/hugo-modules/theme-components/) --- # Hugo Pipes Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/hugo-pipes/](https://gohugo.io/images/qr/qr_ca26aa30bf9be24c.png) [### Introduction\ \ Hugo Pipes is Hugo's asset processing set of functions.](https://gohugo.io/hugo-pipes/introduction/) [### Asset minification\ \ Minify a given resource.](https://gohugo.io/hugo-pipes/minification/) [### Concatenating assets\ \ Bundle any number of assets into one resource.](https://gohugo.io/hugo-pipes/bundling/) [### Fingerprinting and SRI hashing\ \ Cryptographically hash the content of the given resource.](https://gohugo.io/hugo-pipes/fingerprint/) [### JavaScript building\ \ Bundle, transpile, tree shake, code split, and minify JavaScript resources.](https://gohugo.io/hugo-pipes/js/) [### PostCSS\ \ Process the given resource with PostCSS using any PostCSS plugin.](https://gohugo.io/hugo-pipes/postcss/) [### PostProcess\ \ Process the given resource after the build.](https://gohugo.io/hugo-pipes/postprocess/) [### Resource from string\ \ Create a resource from a string.](https://gohugo.io/hugo-pipes/resource-from-string/) [### Resource from template\ \ Create a resource from a Go template, parsed and executed with the given context.](https://gohugo.io/hugo-pipes/resource-from-template/) [### Transpile Sass to CSS\ \ Transpile Sass to CSS.](https://gohugo.io/hugo-pipes/transpile-sass-to-css/) --- # Installation Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/installation/](https://gohugo.io/images/qr/qr_308b8dbc6d1ba756.png) [### macOS\ \ Install Hugo on macOS.](https://gohugo.io/installation/macos/) [### Linux\ \ Install Hugo on Linux.](https://gohugo.io/installation/linux/) [### Windows\ \ Install Hugo on Windows.](https://gohugo.io/installation/windows/) [### BSD\ \ Install Hugo on BSD derivatives.](https://gohugo.io/installation/bsd/) --- # Introduction Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/about/introduction/](https://gohugo.io/images/qr/qr_fe86fa5ad4dad84e.png) Hugo is a static site generator written in Go, optimized for speed and designed for flexibility. Hugo is a [static site generator](https://en.wikipedia.org/wiki/Static_site_generator) written in [Go](https://go.dev/) , optimized for speed and designed for flexibility. With its advanced templating system and fast asset pipelines, Hugo renders a complete site in seconds, often less. Due to its flexible framework, multilingual support, and powerful taxonomy system, Hugo is widely used to create: * Corporate, government, nonprofit, education, news, event, and project sites * Documentation sites * Image portfolios * Landing pages * Business, professional, and personal blogs * Resumes and CVs Use Hugo’s embedded web server during development to instantly see changes to content, structure, behavior, and presentation. Then deploy the site to your host, or push changes to your Git provider for automated builds and deployment. And with [Hugo Modules](https://gohugo.io/hugo-modules/) , you can share content, assets, data, translations, themes, templates, and configuration with other projects via public or private Git repositories. Learn more about Hugo’s [features](https://gohugo.io/about/features/) , [privacy protections](https://gohugo.io/configuration/privacy/) , and [security model](https://gohugo.io/about/security/) . * * * Last updated: December 19, 2025 : [Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)](https://github.com/gohugoio/hugoDocs/commit/7e1a08e545030efcad0ac52c1cf9469244bc3f2b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/about/introduction.md) --- # Introduction Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/hugo-modules/introduction/](https://gohugo.io/images/qr/qr_88ee904712089fe4.png) A brief introduction to Hugo Modules. Hugo uses modules as its fundamental organizational units. A module can be a full Hugo project or a smaller, reusable piece providing one or more of Hugo’s seven component types: static files, content, layouts, data, assets, internationalization (i18n) resources, and archetypes. Modules are combinable in any arrangement, and external directories (including those from non-Hugo projects) can be mounted, effectively creating a single, unified file system. Some example projects: [https://github.com/bep/docuapi](https://github.com/bep/docuapi) A theme that has been ported to Hugo Modules while testing this feature. It is a good example of a non-Hugo-project mounted into Hugo’s directory structure. [https://github.com/bep/my-modular-site](https://github.com/bep/my-modular-site) A simple site used for testing. * * * Last updated: December 19, 2025 : [Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)](https://github.com/gohugoio/hugoDocs/commit/7e1a08e545030efcad0ac52c1cf9469244bc3f2b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/hugo-modules/introduction.md) --- # News Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/news/](https://gohugo.io/images/qr/qr_1d266573d0d85b60.png) [February 25, 2026\ \ ### Release v0.157.0](https://github.com/gohugoio/hugo/releases/tag/v0.157.0) [February 18, 2026\ \ ### Release v0.156.0](https://github.com/gohugoio/hugo/releases/tag/v0.156.0) [February 8, 2026\ \ ### Release v0.155.3](https://github.com/gohugoio/hugo/releases/tag/v0.155.3) [February 2, 2026\ \ ### Release v0.155.2](https://github.com/gohugoio/hugo/releases/tag/v0.155.2) [January 30, 2026\ \ ### Release v0.155.1](https://github.com/gohugoio/hugo/releases/tag/v0.155.1) [January 28, 2026\ \ ### Release v0.155.0](https://github.com/gohugoio/hugo/releases/tag/v0.155.0) [January 11, 2026\ \ ### Release v0.154.5](https://github.com/gohugoio/hugo/releases/tag/v0.154.5) [January 10, 2026\ \ ### Release v0.154.4](https://github.com/gohugoio/hugo/releases/tag/v0.154.4) [January 6, 2026\ \ ### Release v0.154.3](https://github.com/gohugoio/hugo/releases/tag/v0.154.3) [January 2, 2026\ \ ### Release v0.154.2](https://github.com/gohugoio/hugo/releases/tag/v0.154.2) [January 1, 2026\ \ ### Release v0.154.1](https://github.com/gohugoio/hugo/releases/tag/v0.154.1) [December 31, 2025\ \ ### Release v0.154.0](https://github.com/gohugoio/hugo/releases/tag/v0.154.0) [December 30, 2025\ \ ### Release v0.153.5](https://github.com/gohugoio/hugo/releases/tag/v0.153.5) [December 28, 2025\ \ ### Release v0.153.4](https://github.com/gohugoio/hugo/releases/tag/v0.153.4) [December 26, 2025\ \ ### Release v0.153.3](https://github.com/gohugoio/hugo/releases/tag/v0.153.3) [December 22, 2025\ \ ### Release v0.153.2](https://github.com/gohugoio/hugo/releases/tag/v0.153.2) [December 20, 2025\ \ ### Release v0.153.1](https://github.com/gohugoio/hugo/releases/tag/v0.153.1) [December 19, 2025\ \ ### Release v0.153.0](https://github.com/gohugoio/hugo/releases/tag/v0.153.0) [October 24, 2025\ \ ### Release v0.152.2](https://github.com/gohugoio/hugo/releases/tag/v0.152.2) [October 22, 2025\ \ ### Release v0.152.1](https://github.com/gohugoio/hugo/releases/tag/v0.152.1) [October 21, 2025\ \ ### Release v0.152.0](https://github.com/gohugoio/hugo/releases/tag/v0.152.0) [October 16, 2025\ \ ### Release v0.151.2](https://github.com/gohugoio/hugo/releases/tag/v0.151.2) [October 15, 2025\ \ ### Release v0.151.1](https://github.com/gohugoio/hugo/releases/tag/v0.151.1) [October 2, 2025\ \ ### Release v0.151.0](https://github.com/gohugoio/hugo/releases/tag/v0.151.0) --- # Quick reference guides Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/quick-reference/](https://gohugo.io/images/qr/qr_84ebd9a13a668f73.png) [### Emojis\ \ Include emoji shortcodes in your Markdown or templates.](https://gohugo.io/quick-reference/emojis/) [### Functions\ \ A quick reference guide to Hugo's functions, grouped by namespace. Aliases, if any, appear in parentheses to the right of the function name.](https://gohugo.io/quick-reference/functions/) [### Glob patterns\ \ A quick reference guide to glob pattern syntax and matching rules for wildcards, character sets, and delimiters, featuring illustrative examples.](https://gohugo.io/quick-reference/glob-patterns/) [### Glossary\ \ Terms commonly used throughout the documentation.](https://gohugo.io/quick-reference/glossary/) [### Methods\ \ A quick reference guide to Hugo's methods, grouped by object.](https://gohugo.io/quick-reference/methods/) [### Page collections\ \ A quick reference guide to Hugo's page collections.](https://gohugo.io/quick-reference/page-collections/) [### Syntax highlighting styles\ \ Highlight code examples using one of these styles.](https://gohugo.io/quick-reference/syntax-highlighting-styles/) --- # Render hooks Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/render-hooks/](https://gohugo.io/images/qr/qr_4e7dcf3c0dd42e4c.png) [### Introduction\ \ An introduction to Hugo's render hooks.](https://gohugo.io/render-hooks/introduction/) [### Blockquotes\ \ Create blockquote render hook templates to override the rendering of Markdown blockquotes to HTML.](https://gohugo.io/render-hooks/blockquotes/) [### Code blocks\ \ Create code block render hook templates to override the rendering of Markdown code blocks to HTML.](https://gohugo.io/render-hooks/code-blocks/) [### Headings\ \ Create heading render hook templates to override the rendering of Markdown headings to HTML.](https://gohugo.io/render-hooks/headings/) [### Images\ \ Create image render hook templates to override the rendering of Markdown images to HTML.](https://gohugo.io/render-hooks/images/) [### Links\ \ Create a link render hook to override the rendering of Markdown links to HTML.](https://gohugo.io/render-hooks/links/) [### Passthrough\ \ Create passthrough render hook templates to override the rendering of text snippets captured by the Goldmark Passthrough extension.](https://gohugo.io/render-hooks/passthrough/) [### Tables\ \ Create table render hook templates to override the rendering of Markdown tables to HTML.](https://gohugo.io/render-hooks/tables/) --- # Introduction Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/render-hooks/introduction/](https://gohugo.io/images/qr/qr_e7d649940df46451.png) An introduction to Hugo’s render hooks. When rendering Markdown to HTML, render hooks override the conversion. Each render hook is a template, with one template for each supported element type: * [Blockquotes](https://gohugo.io/render-hooks/blockquotes/) * [Code blocks](https://gohugo.io/render-hooks/code-blocks/) * [Headings](https://gohugo.io/render-hooks/headings/) * [Images](https://gohugo.io/render-hooks/images/) * [Links](https://gohugo.io/render-hooks/links/) * [Passthrough elements](https://gohugo.io/render-hooks/passthrough/) * [Tables](https://gohugo.io/render-hooks/tables/) Hugo supports multiple [content formats](https://gohugo.io/content-management/formats/) including Markdown, HTML, AsciiDoc, Emacs Org Mode, Pandoc, and reStructuredText. The render hook capability is limited to Markdown. You cannot create render hooks for the other content formats. For example, consider this Markdown: [Hugo](https://gohugo.io) ![kitten](kitten.jpg) Without link or image render hooks, the example above is rendered to:

Hugo

kitten

By creating link and image render hooks, you can alter the conversion from Markdown to HTML. For example:

Hugo

kitten

Each render hook is a template, with one template for each supported element type: layouts/ └── _markup/ ├── render-blockquote.html ├── render-codeblock.html ├── render-heading.html ├── render-image.html ├── render-link.html ├── render-passthrough.html └── render-table.html The template lookup order allows you to create different render hooks for each page [type](https://gohugo.io/quick-reference/glossary/#type) , [kind](https://gohugo.io/quick-reference/glossary/#kind) , language, and [output format](https://gohugo.io/quick-reference/glossary/#output-format) . For example: layouts/ ├── _markup/ │ ├── render-link.html │ └── render-link.rss.xml ├── books/ │ └── _markup/ │ ├── render-link.html │ └── render-link.rss.xml └── films/ └── _markup/ ├── render-link.html └── render-link.rss.xml The remaining pages in this section describe each type of render hook, including examples and the context received by each template. * * * Last updated: July 7, 2025 : [Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45' (079671b41)](https://github.com/gohugoio/hugoDocs/commit/079671b41b9395f2c2b48879f14d3f09d69a63dc) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/render-hooks/introduction.md) --- # Quick start Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/getting-started/quick-start/](https://gohugo.io/images/qr/qr_c8e55b47edb2407c.png) Create your first Hugo project. In this tutorial you will: 1. Create a project 2. Add content 3. Configure the project 4. Publish the project Prerequisites ------------- Before you begin this tutorial you must: 1. [Install Hugo](https://gohugo.io/installation/) (extended or extended/deploy edition, v0.156.0 or later) 2. [Install Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) You must also be comfortable working from the command line. Create a project ---------------- ### Commands **If you are a Windows user:** * Do not use the Command Prompt * Do not use Windows PowerShell * Run these commands from [PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows) or a Linux terminal such as WSL or Git > Bash PowerShell and Windows PowerShell [are different applications](https://learn.microsoft.com/en-us/powershell/scripting/whats-new/differences-from-windows-powershell?view=powershell-7.3) . Verify that you have installed Hugo v0.156.0 or later. hugo version Run these commands to create a Hugo project with the [Ananke](https://github.com/theNewDynamic/gohugo-theme-ananke) theme. The next section provides an explanation of each command. hugo new project quickstart cd quickstart git init git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke echo "theme = 'ananke'" >> hugo.toml hugo server View your project at the URL displayed in your terminal. Press `Ctrl + C` to stop Hugo’s development server. ### Explanation of commands Create the [project skeleton](https://gohugo.io/getting-started/directory-structure/#project-skeleton) for your project in the `quickstart` directory. hugo new project quickstart Change the current directory to the root of your project. cd quickstart Initialize an empty Git repository in the current directory. git init Clone the [Ananke](https://github.com/theNewDynamic/gohugo-theme-ananke) theme into the `themes` directory, adding it to your project as a [Git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules) . git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke Append a line to your project configuration file, indicating the current theme. echo "theme = 'ananke'" >> hugo.toml Start Hugo’s development server. hugo server Press `Ctrl + C` to stop Hugo’s development server. Add content ----------- Add a new page to your project. hugo new content content/posts/my-first-post.md Hugo created the file in the `content/posts` directory. Open the file with your editor. +++ title = 'My First Post' date = 2024-01-14T07:07:07+01:00 draft = true +++ Notice the `draft` value in the [front matter](https://gohugo.io/content-management/front-matter/) is `true`. By default, Hugo does not publish draft content when you build the project. Learn more about [draft, future, and expired content](https://gohugo.io/getting-started/usage/#draft-future-and-expired-content) . Add some [Markdown](https://daringfireball.net/projects/markdown) to the body of the post, but do not change the `draft` value. +++ title = 'My First Post' date = 2024-01-14T07:07:07+01: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. You can run either of the following commands to include draft content. hugo server --buildDrafts hugo server -D View your project at the URL displayed in your terminal. Keep the development server running as you continue to add and change content. When satisfied with your new content, set the front matter `draft` parameter to `false`. Hugo’s rendering engine conforms to the CommonMark [specification](https://spec.commonmark.org/) for Markdown. The CommonMark organization provides a useful [live testing tool](https://spec.commonmark.org/dingus/) powered by the reference implementation. Configure the project --------------------- With your editor, open your [project configuration](https://gohugo.io/configuration/) file (`hugo.toml`) in the root of your project. baseURL = 'https://example.org/' languageCode = 'en-us' title = 'My New Hugo Project' theme = 'ananke' Make the following changes: 1. Set the `baseURL` for your project. This value must begin with the protocol and end with a slash, as shown above. 2. Set the `languageCode` to your locale. 3. Set the `title` for your project. Start Hugo’s development server to see your changes, remembering to include draft content. hugo server -D Most theme authors provide configuration guidelines and options. Make sure to visit your theme’s repository or documentation site for details. [The New Dynamic](https://www.thenewdynamic.com/) , authors of the Ananke theme, provide [documentation](https://github.com/theNewDynamic/gohugo-theme-ananke#readme) for configuration and usage. They also provide a [demonstration site](https://gohugo-ananke-theme-demo.netlify.app/) . Publish the project ------------------- In this step you will _publish_ your project, but you will not _deploy_ it. When you publish your project, Hugo renders all build artifacts to the `public` directory in the root of your project. This includes the HTML files for every site, along with assets such as images, CSS, and JavaScript. The command is simple. hugo To learn how to _deploy_ your project, see the [host and deploy](https://gohugo.io/host-and-deploy/) section. Ask for help ------------ Hugo’s [forum](https://discourse.gohugo.io/) 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](https://discourse.gohugo.io/t/requesting-help/9132) 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](https://gohugo.io/getting-started/external-learning-resources/) page. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/getting-started/quick-start.md) --- # Methods Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/](https://gohugo.io/images/qr/qr_57f0f0143d5e623c.png) [### Duration\ \ Use these methods with a time.Duration value.](https://gohugo.io/methods/duration/) [### Menu\ \ Use these methods when ranging through menu entries.](https://gohugo.io/methods/menu/) [### Menu entry\ \ Use these methods in your menu templates.](https://gohugo.io/methods/menu-entry/) [### Output format\ \ Use these methods with an OutputFormat object.](https://gohugo.io/methods/output-format/) [### Page\ \ Use these methods with a Page object.](https://gohugo.io/methods/page/) [### Pager\ \ Use these methods with a Pager object when building navigation for a paginated list page.](https://gohugo.io/methods/pager/) [### Pages\ \ Use these methods with a collection of Page objects.](https://gohugo.io/methods/pages/) [### Resource\ \ Use these methods with a global, page, or remote Resource object.](https://gohugo.io/methods/resource/) [### Shortcode\ \ Use these methods in your shortcode templates.](https://gohugo.io/methods/shortcode/) [### Site\ \ Use these methods with a Site object.](https://gohugo.io/methods/site/) [### Taxonomy\ \ Use these methods with a Taxonomy object.](https://gohugo.io/methods/taxonomy/) [### Time\ \ Use these methods with a time.Time value.](https://gohugo.io/methods/time/) --- # macOS Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/installation/macos/](https://gohugo.io/images/qr/qr_8660d3c71a18ae34.png) Install Hugo on macOS. Editions -------- Hugo offers a standard edition with core features, plus extended and extended/deploy editions with more. Use the standard edition unless you need the features below. | Feature | extended edition | extended/deploy edition | | --- | --- | --- | | [Transpile Sass to CSS](https://gohugo.io/functions/css/sass/)
via embedded LibSass. Note that embedded LibSass was deprecated in v0.153.0 and will be removed in a future release. Use the [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass)
transpiler instead, which is compatible with any edition. | ✔️ | ✔️ | | Deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or an Azure Storage container. See [details](https://gohugo.io/host-and-deploy/deploy-with-hugo-deploy/)
. | ❌ | ✔️ | Prerequisites ------------- Although not required in all cases, [Git](https://git-scm.com/) , [Go](https://go.dev/) , and [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass) are commonly used when working with Hugo. Git is required to: * Build Hugo from source * Use the [Hugo Modules](https://gohugo.io/hugo-modules/) feature * Install a theme as a Git submodule * Access [commit information](https://gohugo.io/methods/page/gitinfo/) from a local Git repository * Host your site on [CI/CD](https://gohugo.io/quick-reference/glossary/#cicd) platforms such as [Cloudflare](https://gohugo.io/host-and-deploy/host-on-cloudflare/) , [GitHub Pages](https://gohugo.io/host-and-deploy/host-on-github-pages/) , [GitLab Pages](https://gohugo.io/host-and-deploy/host-on-gitlab-pages/) , [Netlify](https://gohugo.io/host-and-deploy/host-on-netlify/) , [Render](https://gohugo.io/host-and-deploy/host-on-render/) , or [Vercel](https://gohugo.io/host-and-deploy/host-on-vercel/) Go is required to: * Build Hugo from source * Use the Hugo Modules feature Dart Sass is required to transpile Sass to CSS when using the latest features of the Sass language. Please refer to the relevant documentation for installation instructions: * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) * [Go](https://go.dev/doc/install) * [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass) Prebuilt binaries ----------------- Prebuilt binaries are available for a variety of operating systems and architectures. Visit the [latest release](https://github.com/gohugoio/hugo/releases/latest) page, and scroll down to the Assets section. 1. Download the archive for the desired edition, operating system, and architecture 2. Extract the archive 3. Move the executable to the desired directory 4. Add this directory to the PATH environment variable 5. Verify that you have _execute_ permission on the file Please consult your operating system documentation if you need help setting file permissions or modifying your PATH environment variable. If you do not see a prebuilt binary for the desired edition, operating system, and architecture, install Hugo using one of the methods described below. Package managers ---------------- ### Homebrew [Homebrew](https://brew.sh/) is a free and open-source package manager for macOS and Linux. To install the extended/deploy edition of Hugo: brew install hugo ### MacPorts [MacPorts](https://www.macports.org/) is a free and open-source package manager for macOS. To install the extended edition of Hugo: sudo port install hugo Build from source ----------------- To build the extended or extended/deploy edition from source you must: 1. Install [Git](https://git-scm.com/) 2. Install [Go](https://go.dev/) version 1.24.0 or later 3. Install a C compiler, either [GCC](https://gcc.gnu.org/) or [Clang](https://clang.llvm.org/) 4. Update your `PATH` environment variable as described in the [Go documentation](https://go.dev/doc/code#Command) > The install directory is controlled by the `GOPATH` and `GOBIN` environment variables. If `GOBIN` is set, binaries are installed to that directory. If `GOPATH` is set, binaries are installed to the bin subdirectory of the first directory in the `GOPATH` list. Otherwise, binaries are installed to the bin subdirectory of the default `GOPATH` (`$HOME/go` or `%USERPROFILE%\go`). To build the standard edition: go install github.com/gohugoio/hugo@latest To build the extended edition: CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest To build the extended/deploy edition: CGO_ENABLED=1 go install -tags extended,withdeploy github.com/gohugoio/hugo@latest Comparison ---------- | | Prebuilt binaries | Package managers | Build from source | | --- | --- | --- | --- | | Easy to install? | ✔️ | ✔️ | ✔️ | | Easy to upgrade? | ✔️ | ✔️ | ✔️ | | Easy to downgrade? | ✔️ | ✔️ [1](https://gohugo.io/installation/macos/#fn:1) | ✔️ | | Automatic updates? | ❌ | ❌ [2](https://gohugo.io/installation/macos/#fn:2) | ❌ | | Latest version available? | ✔️ | ✔️ | ✔️ | * * * 1. Easy if a previous version is still installed. [↩︎](https://gohugo.io/installation/macos/#fnref:1) 2. Possible but requires advanced configuration. [↩︎](https://gohugo.io/installation/macos/#fnref:2) * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/installation/macos.md) --- # Shortcodes Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/shortcodes/](https://gohugo.io/images/qr/qr_94a1f759d11ecd44.png) [### Details\ \ Insert an HTML details element into your content using the details shortcode.](https://gohugo.io/shortcodes/details/) [### Figure\ \ Insert an HTML figure element into your content using the figure shortcode.](https://gohugo.io/shortcodes/figure/) [### Highlight\ \ Insert syntax-highlighted code into your content using the highlight shortcode.](https://gohugo.io/shortcodes/highlight/) [### Instagram\ \ Embed an Instagram post in your content using the instagram shortcode.](https://gohugo.io/shortcodes/instagram/) [### Param\ \ Insert a parameter from front matter or your project configuration into your content using the param shortcode.](https://gohugo.io/shortcodes/param/) [### QR\ \ Insert a QR code into your content using the qr shortcode.](https://gohugo.io/shortcodes/qr/) [### Ref\ \ Insert a permalink to the given page reference using the ref shortcode.](https://gohugo.io/shortcodes/ref/) [### Relref\ \ Insert a relative permalink to the given page reference using the relref shortcode.](https://gohugo.io/shortcodes/relref/) [### Vimeo\ \ Embed a Vimeo video in your content using the vimeo shortcode.](https://gohugo.io/shortcodes/vimeo/) [### X\ \ Embed an X post in your content using the x shortcode.](https://gohugo.io/shortcodes/x/) [### YouTube\ \ Embed a YouTube video in your content using the youtube shortcode.](https://gohugo.io/shortcodes/youtube/) --- # Hugo Pipes Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/hugo-pipes/introduction/](https://gohugo.io/images/qr/qr_557cddca6adf8025.png) Hugo Pipes is Hugo’s asset processing set of functions. Find resources in assets ------------------------ This is about global and remote resources. global resource A file within the `assets` directory, or within any directory [mounted](https://gohugo.io/configuration/module/#mounts) to the `assets` directory. remote resource A file on a remote server, accessible via HTTP or HTTPS. For `.Page` scoped resources, see the [page resources](https://gohugo.io/content-management/page-resources/) section. Get a resource -------------- In order to process an asset with Hugo Pipes, it must be retrieved as a resource. For global resources, use: * [`resources.ByType`](https://gohugo.io/functions/resources/bytype/) * [`resources.Get`](https://gohugo.io/functions/resources/get/) * [`resources.GetMatch`](https://gohugo.io/functions/resources/getmatch/) * [`resources.Match`](https://gohugo.io/functions/resources/match/) For remote resources, use: * [`resources.GetRemote`](https://gohugo.io/functions/resources/getremote/) See the [GoDoc Page](https://pkg.go.dev/github.com/gohugoio/hugo/tpl/resources) for the `resources` package for an up to date overview of all template functions in this namespace. Copy a resource --------------- See the [`resources.Copy`](https://gohugo.io/functions/resources/copy/) function. Asset directory --------------- Asset files must be stored in the asset directory. This is `assets` by default, but can be configured via the configuration file’s `assetDir` key. Asset 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](https://gohugo.io/templates/introduction/#pipes) : {{ $style := resources.Get "sass/main.scss" | css.Sass | resources.Minify | resources.Fingerprint }} Caching ------- Hugo Pipes invocations are cached based on the entire _pipe chain_. An example of a pipe chain is: {{ $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. * * * Last updated: August 23, 2025 : [Merge commit 'bfa74537929f409fca841540b971125b7678963a' (6c911d1e5)](https://github.com/gohugoio/hugoDocs/commit/6c911d1e52fb9c8065c079820327f4b0e37529d4) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/hugo-pipes/introduction.md) --- # Troubleshooting Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/troubleshooting/](https://gohugo.io/images/qr/qr_db5d4591e9f92300.png) [### Audit\ \ Run this audit before deploying your production site.](https://gohugo.io/troubleshooting/audit/) [### Deprecation\ \ The Hugo project follows a formal and consistent process to deprecate functions, methods, and configuration settings.](https://gohugo.io/troubleshooting/deprecation/) [### FAQs\ \ These questions are frequently asked by new users.](https://gohugo.io/troubleshooting/faq/) [### Inspection\ \ Use template functions to inspect values and data structures.](https://gohugo.io/troubleshooting/inspection/) [### Logging\ \ Enable logging to inspect events while building your project.](https://gohugo.io/troubleshooting/logging/) [### Performance\ \ Tools and suggestions for evaluating and improving performance.](https://gohugo.io/troubleshooting/performance/) --- # Introduction Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/configuration/introduction/](https://gohugo.io/images/qr/qr_50fda4314d29368e.png) Configure your site using files, directories, and environment variables. Sensible defaults ----------------- Hugo offers many configuration options, but its defaults are often sufficient. A new site requires only these settings: baseURL: https://example.org/ languageCode: en-us title: My New Hugo Site baseURL = 'https://example.org/' languageCode = 'en-us' title = 'My New Hugo Site' { "baseURL": "https://example.org/", "languageCode": "en-us", "title": "My New Hugo Site" } Only define settings that deviate from the defaults. A smaller configuration file is easier to read, understand, and debug. Keep your configuration concise. The best configuration file is a short configuration file. Configuration file ------------------ Create a project configuration file in the root of your project directory, naming it `hugo.toml`, `hugo.yaml`, or `hugo.json`, with that order of precedence. my-project/ └── hugo.toml For versions v0.109.0 and earlier, the project configuration file was named `config`. While you can still use this name, it’s recommended to switch to the newer naming convention, `hugo`. A simple example: baseURL: https://example.org/ languageCode: en-us params: contact: email: info@example.org phone: +1 202-555-1212 subtitle: The Best Widgets on Earth title: ABC Widgets, Inc. baseURL = 'https://example.org/' languageCode = 'en-us' title = 'ABC Widgets, Inc.' [params] subtitle = 'The Best Widgets on Earth' [params.contact] email = 'info@example.org' phone = '+1 202-555-1212' { "baseURL": "https://example.org/", "languageCode": "en-us", "params": { "contact": { "email": "info@example.org", "phone": "+1 202-555-1212" }, "subtitle": "The Best Widgets on Earth" }, "title": "ABC Widgets, Inc." } To use a different configuration file when building your project, use the `--config` flag: hugo build --config other.toml Combine two or more configuration files, with left-to-right precedence: hugo build --config a.toml,b.yaml,c.json See the specifications for each file format: [TOML](https://toml.io/en/latest) , [YAML](https://yaml.org/spec/) , and [JSON](https://datatracker.ietf.org/doc/html/rfc7159) . Configuration directory ----------------------- Instead of a single project configuration file, split your configuration by [environment](https://gohugo.io/quick-reference/glossary/#environment) , root configuration key, and language. For example: my-project/ └── config/ ├── _default/ │ ├── hugo.toml │ ├── menus.en.toml │ ├── menus.de.toml │ └── params.toml └── production/ └── params.toml The root configuration keys are [`HTTPCache`](https://gohugo.io/configuration/http-cache/) , [`build`](https://gohugo.io/configuration/build/) , [`caches`](https://gohugo.io/configuration/caches/) , [`contentTypes`](https://gohugo.io/configuration/content-types/) , [`deployment`](https://gohugo.io/configuration/deployment/) , [`frontmatter`](https://gohugo.io/configuration/front-matter/) , [`imaging`](https://gohugo.io/configuration/imaging/) , [`languages`](https://gohugo.io/configuration/languages/) , [`markup`](https://gohugo.io/configuration/markup/) , [`mediaTypes`](https://gohugo.io/configuration/media-types/) , [`menus`](https://gohugo.io/configuration/menus/) , [`minify`](https://gohugo.io/configuration/minify/) , [`module`](https://gohugo.io/configuration/module/) , [`outputFormats`](https://gohugo.io/configuration/output-formats/) , [`outputs`](https://gohugo.io/configuration/outputs/) , [`page`](https://gohugo.io/configuration/page/) , [`pagination`](https://gohugo.io/configuration/pagination/) , [`params`](https://gohugo.io/configuration/params/) , [`permalinks`](https://gohugo.io/configuration/permalinks/) , [`privacy`](https://gohugo.io/configuration/privacy/) , [`related`](https://gohugo.io/configuration/related-content/) , [`roles`](https://gohugo.io/configuration/roles/) , [`security`](https://gohugo.io/configuration/security/) , [`segments`](https://gohugo.io/configuration/segments/) , [`server`](https://gohugo.io/configuration/server/) , [`services`](https://gohugo.io/configuration/services/) , [`sitemap`](https://gohugo.io/configuration/sitemap/) , [`taxonomies`](https://gohugo.io/configuration/taxonomies/) , [`uglyURLs`](https://gohugo.io/configuration/ugly-urls/) , and [`versions`](https://gohugo.io/configuration/versions/) . You must define `cascade` tables in the root configuration file. You cannot define `cascade` tables in a dedicated file. See issue [#12899](https://github.com/gohugoio/hugo/issues/12899) for details. ### Omit the root key When splitting the configuration by root key, omit the root key in the component file. For example, these are equivalent: params: foo: bar [params] foo = 'bar' { "params": { "foo": "bar" } } foo: bar foo = 'bar' { "foo": "bar" } ### Recursive parsing Hugo parses the `config` directory recursively, allowing you to organize the files into subdirectories. For example: my-project/ └── config/ └── _default/ ├── navigation/ │ ├── menus.de.toml │ └── menus.en.toml └── hugo.toml ### Example my-project/ └── config/ ├── _default/ │ ├── hugo.toml │ ├── menus.en.toml │ ├── menus.de.toml │ └── params.toml ├── production/ │ ├── hugo.toml │ └── params.toml └── staging/ ├── hugo.toml └── params.toml Considering the structure above, when running `hugo build --environment staging`, Hugo will use every setting from `config/_default` and merge `staging`’s on top of those. Let’s take an example to understand this better. Let’s say you are using Google Analytics for your website. This requires you to specify a [Google tag ID](https://support.google.com/tagmanager/answer/12326985?hl=en) in your project configuration: services: googleAnalytics: ID: G-XXXXXXXXX [services] [services.googleAnalytics] ID = 'G-XXXXXXXXX' { "services": { "googleAnalytics": { "ID": "G-XXXXXXXXX" } } } Now consider the following scenario: 1. You don’t want to load the analytics code when running `hugo server`. 2. You want to use different Google tag IDs for your production and staging environments. For example: * `G-PPPPPPPPP` for production * `G-SSSSSSSSS` for staging To satisfy these requirements, configure your site as follows: 1. `config/_default/hugo.toml` * Exclude the `services.googleAnalytics` section. This will prevent loading of the analytics code when you run `hugo server`. * By default, Hugo sets its `environment` to `development` when running `hugo server`. In the absence of a `config/development` directory, Hugo uses the `config/_default` directory. 2. `config/production/hugo.toml` * Include this section only: services: googleAnalytics: ID: G-PPPPPPPPP [services] [services.googleAnalytics] ID = 'G-PPPPPPPPP' { "services": { "googleAnalytics": { "ID": "G-PPPPPPPPP" } } } * You do not need to include other parameters in this file. Include only those parameters that are specific to your production environment. Hugo will merge these parameters with the default configuration. * By default, Hugo sets its `environment` to `production` when running `hugo build`. The analytics code will use the `G-PPPPPPPPP` tag ID. 3. `config/staging/hugo.toml` * Include this section only: services: googleAnalytics: ID: G-SSSSSSSSS [services] [services.googleAnalytics] ID = 'G-SSSSSSSSS' { "services": { "googleAnalytics": { "ID": "G-SSSSSSSSS" } } } * You do not need to include other parameters in this file. Include only those parameters that are specific to your staging environment. Hugo will merge these parameters with the default configuration. * To build your staging site, run `hugo build --environment staging`. The analytics code will use the `G-SSSSSSSSS` tag ID. Merge configuration settings ---------------------------- Hugo merges configuration settings from themes and modules, prioritizing the project’s own settings. Given this simplified project structure with two themes: project/ ├── themes/ │ ├── theme-a/ │ │ └── hugo.toml │ └── theme-b/ │ └── hugo.toml └── hugo.toml and this project-level configuration: baseURL: https://example.org/ languageCode: en-us theme: - theme-a - theme-b title: My New Hugo Site baseURL = 'https://example.org/' languageCode = 'en-us' theme = ['theme-a', 'theme-b'] title = 'My New Hugo Site' { "baseURL": "https://example.org/", "languageCode": "en-us", "theme": [\ "theme-a",\ "theme-b"\ ], "title": "My New Hugo Site" } Hugo merges settings in this order: 1. Project configuration (`hugo.toml` in the project root) 2. `theme-a` configuration 3. `theme-b` configuration The `_merge` setting within each top-level configuration key controls _which_ settings are merged and _how_ they are merged. The value for `_merge` can be one of: none No merge. shallow Only add values for new keys. deep Add values for new keys, merge existing. Note that you don’t need to be so verbose as in the default setup below; a `_merge` value higher up will be inherited if not set. build: _merge: none caches: _merge: none cascade: _merge: none contenttypes: _merge: none deployment: _merge: none frontmatter: _merge: none httpcache: _merge: none imaging: _merge: none languages: _merge: none en: _merge: none menus: _merge: shallow params: _merge: deep markup: _merge: none mediatypes: _merge: shallow menus: _merge: shallow minify: _merge: none module: _merge: none outputformats: _merge: shallow outputs: _merge: none page: _merge: none pagination: _merge: none params: _merge: deep permalinks: _merge: none privacy: _merge: none related: _merge: none roles: _merge: none security: _merge: none segments: _merge: none server: _merge: none services: _merge: none sitemap: _merge: none taxonomies: _merge: none versions: _merge: none [build] _merge = 'none' [caches] _merge = 'none' [cascade] _merge = 'none' [contenttypes] _merge = 'none' [deployment] _merge = 'none' [frontmatter] _merge = 'none' [httpcache] _merge = 'none' [imaging] _merge = 'none' [languages] _merge = 'none' [languages.en] _merge = 'none' [languages.en.menus] _merge = 'shallow' [languages.en.params] _merge = 'deep' [markup] _merge = 'none' [mediatypes] _merge = 'shallow' [menus] _merge = 'shallow' [minify] _merge = 'none' [module] _merge = 'none' [outputformats] _merge = 'shallow' [outputs] _merge = 'none' [page] _merge = 'none' [pagination] _merge = 'none' [params] _merge = 'deep' [permalinks] _merge = 'none' [privacy] _merge = 'none' [related] _merge = 'none' [roles] _merge = 'none' [security] _merge = 'none' [segments] _merge = 'none' [server] _merge = 'none' [services] _merge = 'none' [sitemap] _merge = 'none' [taxonomies] _merge = 'none' [versions] _merge = 'none' { "build": { "_merge": "none" }, "caches": { "_merge": "none" }, "cascade": { "_merge": "none" }, "contenttypes": { "_merge": "none" }, "deployment": { "_merge": "none" }, "frontmatter": { "_merge": "none" }, "httpcache": { "_merge": "none" }, "imaging": { "_merge": "none" }, "languages": { "_merge": "none", "en": { "_merge": "none", "menus": { "_merge": "shallow" }, "params": { "_merge": "deep" } } }, "markup": { "_merge": "none" }, "mediatypes": { "_merge": "shallow" }, "menus": { "_merge": "shallow" }, "minify": { "_merge": "none" }, "module": { "_merge": "none" }, "outputformats": { "_merge": "shallow" }, "outputs": { "_merge": "none" }, "page": { "_merge": "none" }, "pagination": { "_merge": "none" }, "params": { "_merge": "deep" }, "permalinks": { "_merge": "none" }, "privacy": { "_merge": "none" }, "related": { "_merge": "none" }, "roles": { "_merge": "none" }, "security": { "_merge": "none" }, "segments": { "_merge": "none" }, "server": { "_merge": "none" }, "services": { "_merge": "none" }, "sitemap": { "_merge": "none" }, "taxonomies": { "_merge": "none" }, "versions": { "_merge": "none" } } Environment variables --------------------- You can also configure settings using operating system environment variables: export HUGO_BASEURL=https://example.org/ export HUGO_ENABLEGITINFO=true export HUGO_ENVIRONMENT=staging hugo The above sets the [`baseURL`](https://gohugo.io/configuration/all/#baseurl) , [`enableGitInfo`](https://gohugo.io/configuration/all/#enablegitinfo) , and [`environment`](https://gohugo.io/configuration/all/#environment) configuration options and then builds your site. An environment variable takes precedence over the values set in the configuration file. This means that if you set a configuration value with both an environment variable and in the configuration file, the value in the environment variable will be used. Environment variables simplify configuration for [CI/CD](https://gohugo.io/quick-reference/glossary/#cicd) platforms by allowing you to set values directly within their respective configuration and workflow files. Environment variable names must be prefixed with `HUGO_`. To set custom site parameters, prefix the name with `HUGO_PARAMS_`. For snake\_case variable names, the standard `HUGO_` prefix won’t work. Hugo infers the delimiter from the first character following `HUGO`. This allows for variations like `HUGOxPARAMSxAPI_KEY=abcdefgh` using any [permitted delimiter](https://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap08.html) . In addition to configuring standard settings, environment variables may be used to override default values for certain internal settings: DART\_SASS\_BINARY (`string`) The absolute path to the Dart Sass executable. By default, Hugo searches for the executable in each of the paths in the `PATH` environment variable. HUGO\_FILE\_LOG\_FORMAT (`string`) A format string for the file path, line number, and column number displayed when reporting errors, or when calling the `Position` method from a shortcode or Markdown render hook. Valid tokens are `:file`, `:line`, and `:col`. Default is `:file::line::col`. HUGO\_MEMORYLIMIT (`int`) The maximum amount of system memory, in gigabytes, that Hugo can use while rendering your site. Default is 25% of total system memory. Note that `HUGO_MEMORYLIMIT` is a “best effort” setting. Don’t expect Hugo to build a million pages with only 1 GB of memory. You can get more information about how this behaves during the build by running `hugo build --logLevel info` and look for the `dynacache` label. HUGO\_NUMWORKERMULTIPLIER (`int`) The number of workers used in parallel processing. Default is the number of logical CPUs. Current configuration --------------------- Display the complete project configuration with: hugo config Display a specific configuration setting with: hugo config | grep [key] Display the configured file mounts with: hugo config mounts * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/configuration/introduction.md) --- # Front-end interfaces Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/tools/front-ends/](https://gohugo.io/images/qr/qr_a1825a1b6c185f60.png) Do you prefer a graphical user interface over a text editor? Give these front-ends a try. Commercial ---------- [CloudCannon](https://cloudcannon.com/hugo-cms/) The intuitive Git-based CMS for your Hugo website. CloudCannon syncs changes from your Git repository and pushes content changes back, so your development and content teams are always in sync. Edit all of your content on the page with visual editing, build entire pages with reusable custom components and then publish confidently. [DatoCMS](https://www.datocms.com/) DatoCMS is a fully customizable administrative area for your static websites. Use your favorite website generator, let your clients publish new content independently, and the host the site anywhere you like. [PubCrank](https://www.pubcrank.com/) PubCrank is a static site editor which lets you define templates for different front matter layouts in your site. This gives writers an easy-to-use visual interface to create and edit content while maintaining the guardrails that the developer has created. PubCrank is free for local editing. [Sitepins](https://sitepins.com/) Sitepins is a Git-based CMS built for static site generators like Hugo. It offers a clean visual editor, media management, role-based permissions, shortcode support, and more. To get started, simply connect your GitHub repository, configure your content folders, and start visually editing your Hugo site with Sitepins. Open-source ----------- [Decap CMS](https://decapcms.org/) Decap CMS is an open-source, serverless solution for managing Git based content in static sites, and it works on any platform that can host static sites. A [Hugo/Decap CMS starter](https://github.com/decaporg/one-click-hugo-cms) is available to get new projects running quickly. [Quiqr Desktop](https://quiqr.org/) Quiqr Desktop is a open-source, cross-platform, offline desktop CMS for Hugo with built-in Git functionality for deploying static sites to any hosting server. [Sveltia CMS](https://github.com/sveltia/sveltia-cms/) Sveltia CMS is a drop-in replacement for Decap CMS which is built from the ground up with powerful and performant modern UI library Svelte. Sveltia CMS incorporates i18n into every corner of the product, while striving to radically improve UX, performance and productivity. * * * Last updated: August 23, 2025 : [Merge commit 'bfa74537929f409fca841540b971125b7678963a' (6c911d1e5)](https://github.com/gohugoio/hugoDocs/commit/6c911d1e52fb9c8065c079820327f4b0e37529d4) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/tools/front-ends.md) --- # Use Hugo Modules Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/hugo-modules/use-modules/](https://gohugo.io/images/qr/qr_50e86637dfbcf4a8.png) Use modules to manage the content, layout, presentation, and behavior of your site. To work with modules you must install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [Go](https://go.dev/doc/install) 1.18 or later. Introduction ------------ A _module_ is a packaged combination of [_components_](https://gohugo.io/quick-reference/glossary/#component) which may include [_archetypes_](https://gohugo.io/quick-reference/glossary/#archetype) , assets, content, data, templates, [_translation tables_](https://gohugo.io/quick-reference/glossary/#translation-table) , and static files. A module may be a [_theme_](https://gohugo.io/quick-reference/glossary/#theme) , a complete project, or a smaller collection of one or more components. * Modules can be imported in any combination or sequence. * Module imports are recursive; importing Module A can trigger the import of Module B, and so on. * Modules can provide configuration files and directories, subject to the constraints described in the [merge configuration settings](https://gohugo.io/configuration/introduction/#merge-configuration-settings) section of the documentation. * External directories, including those from non-Hugo projects, can be mounted to create a [unified file system](https://gohugo.io/quick-reference/glossary/#unified-file-system) . Import ------ To import a module, first initialize the project itself as a module. For example: hugo mod init github.com/user/project This will generate a [`go.mod`](https://go.dev/ref/mod#go-mod-file) file in the project root. The module name is a unique identifier rather than a hosting requirement. Using a name like `github.com/user/project` is a common convention but it does not mean you must use Git or host your code on GitHub. You can use any name you like if you do not plan to have others import your project as a module. For example, you could use a simple name such as `my-project` when you run the initialization command. Then define one or more imports in your project configuration. This contrived example imports three modules, each containing custom shortcodes: module: imports: - path: shortcodes-a - path: /home/user/shortcodes-b - path: github.com/user/shortcodes-c [module] [[module.imports]] path = 'shortcodes-a' [[module.imports]] path = '/home/user/shortcodes-b' [[module.imports]] path = 'github.com/user/shortcodes-c' { "module": { "imports": [\ {\ "path": "shortcodes-a"\ },\ {\ "path": "/home/user/shortcodes-b"\ },\ {\ "path": "github.com/user/shortcodes-c"\ }\ ] } } Import precedence is top-down. For example, if `shortcodes-a`, `shortcodes-b`, and `shortcodes-c` each define an `image` shortcode, the `image` shortcode from `shortcodes-a` will take effect. If multiple modules contain data files or [translation tables](https://gohugo.io/quick-reference/glossary/#translation-table) with identical paths, the data is deeply merged, following top-down precedence. When you build your project, Hugo will: 1. Download the modules 2. Cache them for future use 3. Generate a [`go.sum`](https://go.dev/ref/mod#go-sum-files) file in the project root See [configuring module imports](https://gohugo.io/configuration/module/#imports) for details and options. Update ------ When you import a module, Hugo creates `go.mod` and `go.sum` files in your project root, storing version and checksum data. Clearing the module cache and rebuilding will re-download the originally imported module version, as specified in the `go.mod` file, ensuring consistent builds. Modules can be updated to other versions as needed. To update a module to the latest version: hugo mod get -u github.com/user/shortcodes-c To update a module to a specific version: hugo mod get -u github.com/user/shortcodes-c@v0.42.0 To update all modules to the latest version: hugo mod get -u To recursively update all modules to the latest version: hugo mod get -u ./... Tidy ---- To remove unused entries from the `go.mod` and `go.sum` files: hugo mod tidy Cache ----- Hugo caches modules to avoid repeated downloads during site builds. By default, these are stored in the `modules` directory within the [`cacheDir`](https://gohugo.io/configuration/all/#cachedir) . To clean the module cache for the current project: hugo mod clean To clean the module cache for all projects: hugo mod clean --all For details on cache location and eviction, see [configuring file caches](https://gohugo.io/configuration/caches/) . Vendor ------ To _vendor_ (verb) in a software context is the process of including the source code of third-party dependencies directly within your own project’s repository, rather than downloading them on the fly from an external package manager. When you are asked to “vendor the dependencies into the project root,” you are being told to move those external libraries from a temporary cache into a dedicated folder that gets committed to your version control system. Vendoring a module provides the benefits described above and allows for local inspection of its [components](https://gohugo.io/quick-reference/glossary/#component) . hugo mod vendor This command creates a `_vendor` directory containing copies of all imported modules, used in subsequent builds. Note that: * The `hugo mod vendor` command can be run from any module tree level. * Modules within the `themes` directory are not vendored. * The `--ignoreVendorPaths` flag allows you to exclude vendored modules matching a [glob pattern](https://gohugo.io/quick-reference/glossary/#glob-pattern) from specific commands. Instead of modifying files directly within the `_vendor` directory, override them by creating a corresponding file with the same relative path in your project’s root. To remove the vendored modules, delete the `_vendor` directory. Replace ------- For local module development, use a `replace` directive in `go.mod` pointing to your local directory: replace github.com/user/module => /home/user/projects/module With `hugo serve`r running, this change will trigger a configuration reload and add the local directory to the watch list. Alternatively, configure replacements by setting the [`replacements`](https://gohugo.io/configuration/module/#replacements) parameter in your project configuration. Workspace --------- A _workspace_ is a collection of [_modules_](https://gohugo.io/quick-reference/glossary/#module) on disk. Workspaces simplify local development of sites with modules. Create a `.work` file to define a workspace, and activate it via the [`workspace`](https://gohugo.io/configuration/module/#workspace) configuration parameter or the `HUGO_MODULE_WORKSPACE` environment variable. A `.work` file example: go 1.24 use . use ../my-hugo-module Use the `use` directive to list module paths, including the main project (`.`). Start the Hugo server with the workspace enabled: HUGO_MODULE_WORKSPACE=hugo.work hugo server --ignoreVendorPaths "**" The `--ignoreVendorPaths` flag, used to ignore vendored dependencies (if applicable), enables live reloading of local edits within the workspace. Graph ----- To generate a [dependency graph](https://gohugo.io/quick-reference/glossary/#dependency-graph) , including vendoring, module replacement, and disabled module information, execute `hugo mod graph` within the target module directory. For example: $ 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 Mounts ------ Imported modules automatically mount their component directories to Hugo’s [unified file system](https://gohugo.io/quick-reference/glossary/#unified-file-system) . You can also manually mount any directory, including those from non-Hugo projects, to component directories. See [configuring module mounts](https://gohugo.io/configuration/module/#mounts) for details. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/hugo-modules/use-modules.md) --- # Search tools Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/tools/search/](https://gohugo.io/images/qr/qr_7bf63147ccbadd1b.png) See some of the open-source and commercial search options for your newly created Hugo website. A static website with a dynamic search function? Yes, Hugo provides an alternative to embeddable scripts from Google or other search engines for static websites. Hugo allows you to provide your visitors with a custom search function by indexing your content files directly. Open-source ----------- [Pagefind](https://github.com/cloudcannon/pagefind) A fully static search library that aims to perform well on large sites, while using as little of your users’ bandwidth as possible. [GitHub Gist for Hugo Workflow](https://gist.github.com/sebz/efddfc8fdcb6b480f567) This gist contains a simple workflow to create a search index for your static website. It uses a simple Grunt script to index all your content files and [lunr.js](https://lunrjs.com/) to serve the search results. [hugo-lunr](https://www.npmjs.com/package/hugo-lunr) A simple way to add site search to your static Hugo site using [lunr.js](https://lunrjs.com/) . Hugo-lunr will create an index file of any HTML and Markdown documents in your Hugo project. [hugo-lunr-zh](https://www.npmjs.com/package/hugo-lunr-zh) A bit like Hugo-lunr, but Hugo-lunr-zh can help you separate the Chinese keywords. [GitHub Gist for Fuse.js integration](https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae) This gist demonstrates how to leverage Hugo’s existing build time processing to generate a searchable JSON index used by [Fuse.js](https://fusejs.io/) on the client side. Although this gist uses Fuse.js for fuzzy matching, any client-side search tool capable of reading JSON indexes will work. Does not require npm, grunt, or other build-time tools except Hugo! [hugo-search-index](https://www.npmjs.com/package/hugo-search-index) A library containing Gulp tasks and a prebuilt browser script that implements search. Gulp generates a search index from project Markdown files. [hugofastsearch](https://gist.github.com/cmod/5410eae147e4318164258742dd053993) A usability and speed update to “GitHub Gist for Fuse.js integration” — global, keyboard-optimized search. [JS & Fuse.js tutorial](https://makewithhugo.com/add-search-to-a-hugo-site/) A simple client-side search solution, using FuseJS (does not require jQuery). [Hugo Lyra](https://github.com/paolomainardi/hugo-lyra) Hugo-Lyra is a JavaScript module to integrate [Lyra](https://github.com/LyraSearch/lyra) into a Hugo website. It contains the server-side part to generate the index and the client-side library (optional) to bootstrap the search engine easily. [INFINI Pizza for WebAssembly](https://github.com/infinilabs/pizza-docsearch) Pizza is a super-lightweight yet fully featured search engine written in Rust. You can quickly add offline search functionality to your Hugo website in just five minutes with only three lines of code. For a step-by-step guide on integrating it with Hugo, check out [this blog tutorial](https://dev.to/medcl/adding-search-functionality-to-a-hugo-static-site-based-on-infini-pizza-for-webassembly-4h5e) . Commercial ---------- [Algolia DocSearch](https://docsearch.algolia.com/) Algolia DocSearch is free for public technical documentation sites and easy to set up. For other use cases, [Algolia’s Search API](https://www.algolia.com/) makes it easy to deliver a great search experience in your apps and websites. Algolia Search provides hosted full-text, numerical, faceted, and geolocalized search. [Bonsai](https://www.bonsai.io/) Bonsai is a fully-managed hosted Elasticsearch service that is fast, reliable, and simple to set up. Easily ingest your docs from Hugo into Elasticsearch following [this guide from the docs](https://bonsai.io/docs/hugo) . [ExpertRec](https://www.expertrec.com/) ExpertRec is a hosted search-as-a-service solution that is fast and scalable. Set-up and integration is extremely easy and takes only a few minutes. The search settings can be modified without coding using a dashboard. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/tools/search.md) --- # Theme components Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/hugo-modules/theme-components/](https://gohugo.io/images/qr/qr_b046fbe5f17a2101.png) Hugo provides advanced theming support with theme components. A project can configure a theme as a composite of as many theme components as you need: theme: - my-shortcodes - base-theme - hyde theme = ['my-shortcodes', 'base-theme', 'hyde'] { "theme": [\ "my-shortcodes",\ "base-theme",\ "hyde"\ ] } You can even nest this, and have the theme component itself include theme components in its own `hugo.toml` (theme inheritance). 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 file systems, 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 directory in `/your-site/themes`, e.g. `/your-site/themes/my-shortcodes`. 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 parameter/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. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/hugo-modules/theme-components.md) --- # Templates Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/](https://gohugo.io/images/qr/qr_1fd8cbfd563313bd.png) [### New template system\ \ Overview of the new template system in Hugo v0.146.0.](https://gohugo.io/templates/new-templatesystem-overview/) [### Introduction\ \ An introduction to Hugo's templating syntax.](https://gohugo.io/templates/introduction/) [### Lookup order\ \ Hugo uses the rules below to select a template for a given page, starting from the most specific.](https://gohugo.io/templates/lookup-order/) [### Template types\ \ Create templates of different types to render your content, resources, and data.](https://gohugo.io/templates/types/) [### Shortcode templates\ \ Create custom shortcodes to simplify and standardize content creation.](https://gohugo.io/templates/shortcode/) [### Sitemap templates\ \ Hugo provides built-in sitemap templates.](https://gohugo.io/templates/sitemap/) [### RSS templates\ \ Use the embedded RSS template, or create your own.](https://gohugo.io/templates/rss/) [### Menu templates\ \ Create templates to render one or more menus.](https://gohugo.io/templates/menu/) [### Pagination\ \ Split a list page into two or more subsets.](https://gohugo.io/templates/pagination/) [### Partial decorators\ \ Use partial decorators to create reusable wrapper components that enclose and compose template content.](https://gohugo.io/templates/partial-decorators/) [### Embedded partial templates\ \ Hugo provides embedded partial templates for common use cases.](https://gohugo.io/templates/embedded/) [### robots.txt templates\ \ Hugo can generate a customized robots.txt in the same way as any other template.](https://gohugo.io/templates/robots/) [### 404 templates\ \ Create a template to render a 404 error page.](https://gohugo.io/templates/404/) --- # Basic usage Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/getting-started/usage/](https://gohugo.io/images/qr/qr_73e405f46ee22bdb.png) Use the command-line interface (CLI) to perform basic tasks. Test your installation ---------------------- After [installing](https://gohugo.io/installation/) Hugo, test your installation by running: hugo version You should see something like: hugo v0.155.3-8a858213b73907e823e2be2b5640a0ce4c04d295+extended linux/amd64 BuildDate=2026-02-08T16:40:42Z VendorInfo=gohugoio Display available commands -------------------------- To see a list of the available commands and flags: hugo help To get help with a subcommand, use the `--help` flag. For example: hugo server --help Build your project ------------------ To build your project, `cd` into your project directory and run: hugo build The [`hugo build`](https://gohugo.io/commands/hugo/) command builds your project, publishing the files to the `public` directory. To publish your project to a different directory, use the [`--destination`](https://gohugo.io/commands/hugo/#options) flag or set [`publishDir`](https://gohugo.io/configuration/all/#publishdir) in your project configuration. Hugo does not clear the `public` directory before building your project. Existing files are overwritten, but not deleted. This behavior is intentional to prevent the inadvertent removal of files that you may have added to the `public` directory after the build. Depending on your needs, you may wish to manually clear the contents of the `public` directory before every build. Draft, future, and expired content ---------------------------------- Hugo allows you to set `draft`, `date`, `publishDate`, and `expiryDate` in the [front matter](https://gohugo.io/content-management/front-matter/) of your content. By default, Hugo will not publish content when: * The `draft` value is `true` * The `date` is in the future * The `publishDate` is in the future * The `expiryDate` is in the past Hugo publishes descendants of draft, future, and expired [node](https://gohugo.io/quick-reference/glossary/#node) pages. To prevent publication of these descendants, use the [`cascade`](https://gohugo.io/content-management/front-matter/#cascade) front matter field to cascade [build options](https://gohugo.io/content-management/build-options/) to the descendant pages. You can override the default behavior when running `hugo build` or `hugo server` with command line flags: hugo build --buildDrafts # or -D hugo build --buildExpired # or -E hugo build --buildFuture # or -F Although you can also set these values in your project configuration, it can lead to unwanted results unless all content authors are aware of, and understand, the settings. As noted above, Hugo does not clear the `public` directory before building your project. Depending on the _current_ evaluation of the four conditions above, after the build your `public` directory may contain extraneous files from a previous build. A common practice is to manually clear the contents of the `public` directory before each build to remove draft, expired, and future content. Develop and test your site -------------------------- To view your site while developing layouts or creating content, `cd` into your project directory and run: hugo server The [`hugo server`](https://gohugo.io/commands/hugo_server/) command builds your site and serves your pages using a minimal HTTP server. When you run `hugo server` it will display the URL of your local site: Web Server is available at http://localhost:1313/ While the server is running, it watches your project directory for changes to assets, configuration, content, data, layouts, translations, and static files. When it detects a change, the server rebuilds your site and refreshes your browser using [LiveReload](https://github.com/livereload/livereload-js) . Most Hugo builds are so fast that you may not notice the change unless you are looking directly at your browser. ### LiveReload While the server is running, Hugo injects JavaScript into the generated HTML pages. The LiveReload script creates a connection from the browser to the server via web sockets. You do not need to install any software or browser plugins, nor is any configuration required. ### Automatic redirection When editing content, if you want your browser to automatically redirect to the page you last modified, run: hugo server --navigateToChanged Deploy your site ---------------- As noted above, Hugo does not clear the `public` directory before building your project. Manually clear the contents of the `public` directory before each build to remove draft, expired, and future content. When you are ready to deploy your site, run: hugo This builds your site, publishing the files to the `public` directory. The directory structure will look something like this: public/ ├── categories/ │ ├── index.html │ └── index.xml <-- RSS feed for this section ├── posts/ │ ├── my-first-post/ │ │ └── index.html │ ├── index.html │ └── index.xml <-- RSS feed for this section ├── tags/ │ ├── index.html │ └── index.xml <-- RSS feed for this section ├── index.html ├── index.xml <-- RSS feed for the site └── sitemap.xml In a simple hosting environment, where you typically `ftp`, `rsync`, or `scp` your files to the root of a virtual host, the contents of the `public` directory are all that you need. Most of our users deploy their sites to a [CI/CD](https://gohugo.io/quick-reference/glossary/#cicd) platform, where a push[1](https://gohugo.io/getting-started/usage/#fn:1) to their remote Git repository triggers a build and deployment. Learn more in the [host and deploy](https://gohugo.io/host-and-deploy/) section. * * * 1. The Git repository contains the entire project directory, typically excluding the `public` directory because the site is built _after_ the push. [↩︎](https://gohugo.io/getting-started/usage/#fnref:1) * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/getting-started/usage.md) --- # License Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/about/license/](https://gohugo.io/images/qr/qr_8f1b803add353157.png) Hugo is released under the Apache 2.0 license. Apache License -------------- _Version 2.0, January 2004_ _[http://www.apache.org/licenses/](http://www.apache.org/licenses/) _ ### Terms and Conditions for use, reproduction, and distribution #### 1\. Definitions “License” shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. “Licensor” shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. “Legal Entity” shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, “control” means **(i)** the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the outstanding shares, or **(iii)** beneficial ownership of such entity. “You” (or “Your”) shall mean an individual or Legal Entity exercising permissions granted by this License. “Source” form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. “Object” form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. “Work” shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). “Derivative Works” shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. “Contribution” shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, “submitted” means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as “Not a Contribution.” “Contributor” shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. #### 2\. Grant of Copyright License Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. #### 3\. Grant of Patent License Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. #### 4\. Redistribution You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: * **(a)** You must give any other recipients of the Work or Derivative Works a copy of this License; and * **(b)** You must cause any modified files to carry prominent notices stating that You changed the files; and * **(c)** You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and * **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. #### 5\. Submission of Contributions Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. #### 6\. Trademarks This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. #### 7\. Disclaimer of Warranty Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. #### 8\. Limitation of Liability In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. #### 9\. Accepting Warranty or Additional Liability While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/about/license.md) --- # External learning resources Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/getting-started/external-learning-resources/](https://gohugo.io/images/qr/qr_1d096c8a8928f613.png) Use these third-party resources to learn Hugo. Many of the resources on this page, including older books and videos, may contain out-of-date information. The Hugo software has undergone significant changes since these resources were created. These changes include the introduction of a new template system, the deprecation of various functions and settings, and the addition of new features like Markdown render hooks, content adapters, and support for mathematical markup. While some concepts may still be relevant, it’s recommended to consult the official Hugo documentation for the most current and accurate information. Books ----- ### Hugo in Action Hugo in Action is a step-by-step guide to using Hugo to create static websites. Working with a complete example website and source code samples, you’ll learn how to build and host a low-maintenance, high-performance site that will wow your users and stay stable without relying on a third-party server. [![Book cover: Hugo in Action](https://gohugo.io/getting-started/external-learning-resources/hugo-in-action_hu_328203e7fc119779.webp)](https://www.manning.com/books/hugo-in-action/) Author: Atishay Jain Publisher: [Manning Publications](https://www.manning.com/books/hugo-in-action/) Publication date: March 2022 Length: 488 pages ISBN: 9781617297007 ### Build Websites with Hugo In this book, you’ll use Hugo to build a personal portfolio site that you can use to showcase your skills and thoughts to the world. You’ll build the basic skeleton, develop a custom theme, and use content templates to generate new pages quickly. You’ll use internal and external data sources to embed content into your site and render some of your content in JSON and RSS. You’ll add a blog section with posts and integrate Disqus with your site, and then make your site searchable. [![Book cover: Build Websites with Hugo](https://gohugo.io/getting-started/external-learning-resources/build-websites-with-hugo_hu_48ede35d85060e6b.webp)](https://pragprog.com/titles/bhhugo/build-websites-with-hugo/) Author: Brian P. Hogan Publisher: [Pragmatic Bookshelf](https://pragprog.com/titles/bhhugo/build-websites-with-hugo/) Publication date: May 2020 Length: 154 pages ISBN: 9781680507263 Videos ------ ### Hugo Beginner Tutorial Series Welcome to this introduction to Hugo tutorial. This series aims to take you from a lion cub with basic web design knowledge to creating your first Hugo website. In this series, you’ll learn how to set up a Hugo site, the basics of using Hugo layouts, partials, and templating, set up a blog, and finally, use data files. By the end of this series, you’ll have the foundational knowledge to build your own Hugo sites. 1. [Getting set up in Hugo](https://cloudcannon.com/tutorials/hugo-beginner-tutorial/) 2. [Layouts in Hugo](https://cloudcannon.com/tutorials/hugo-beginner-tutorial/layouts-in-hugo/) 3. [Hugo Partials](https://cloudcannon.com/tutorials/hugo-beginner-tutorial/hugo-partials/) 4. [Hugo templating basics](https://cloudcannon.com/tutorials/hugo-beginner-tutorial/hugo-templating-basics/) 5. [Blogging in Hugo](https://cloudcannon.com/tutorials/hugo-beginner-tutorial/blogging-in-hugo/) 6. [Using Data in Hugo](https://cloudcannon.com/tutorials/hugo-beginner-tutorial/using-data-in-hugo/) Creator: Mike Neumegen Affiliation: [CloudCannon](https://cloudcannon.com/) Creation date: April 2022 ### Hugo Static Site Generator This course covers the basics of using the Hugo static site generator. Work your way through the articles, and we’ll teach you everything you need to know to create a professional and scalable website or blog! 1. [Introduction](https://www.giraffeacademy.com/static-site-generators/hugo/) 2. [Windows Installation](https://www.giraffeacademy.com/static-site-generators/hugo/installing-hugo-on-windows/) 3. [Mac Installation](https://www.giraffeacademy.com/static-site-generators/hugo/installing-hugo-on-mac/) 4. [Creating A New Site](https://www.giraffeacademy.com/static-site-generators/hugo/hugo-directory-structure/) 5. [Installing & Using Themes](https://www.giraffeacademy.com/static-site-generators/hugo/installing-using-themes/) 6. [Content Organization](https://www.giraffeacademy.com/static-site-generators/hugo/content-organization/) 7. [Front Matter](https://www.giraffeacademy.com/static-site-generators/hugo/front-matter/) 8. [Archetypes](https://www.giraffeacademy.com/static-site-generators/hugo/archetypes/) 9. [Shortcodes](https://www.giraffeacademy.com/static-site-generators/hugo/shortcodes/) 10. [Taxonomies](https://www.giraffeacademy.com/static-site-generators/hugo/taxonomies/) 11. [Template Basics](https://www.giraffeacademy.com/static-site-generators/hugo/introduction-to-templates/) 12. [List Page Templates](https://www.giraffeacademy.com/static-site-generators/hugo/list-page-templates/) 13. [Single Page Templates](https://www.giraffeacademy.com/static-site-generators/hugo/single-page-templates/) 14. [Home Page Templates](https://www.giraffeacademy.com/static-site-generators/hugo/home-page-templates/) 15. [Section Templates](https://www.giraffeacademy.com/static-site-generators/hugo/section-templates/) 16. [Block Templates](https://www.giraffeacademy.com/static-site-generators/hugo/block-templates/) 17. [Variables](https://www.giraffeacademy.com/static-site-generators/hugo/variables/) 18. [Functions](https://www.giraffeacademy.com/static-site-generators/hugo/functions/) 19. [Conditionals](https://www.giraffeacademy.com/static-site-generators/hugo/conditionals/) 20. [Data Templates](https://www.giraffeacademy.com/static-site-generators/hugo/data-templates/) 21. [Partial Templates](https://www.giraffeacademy.com/static-site-generators/hugo/partial-templates/) 22. [Shortcode Templates](https://www.giraffeacademy.com/static-site-generators/hugo/shortcode-templates/) 23. [Building & Hosting](https://www.giraffeacademy.com/static-site-generators/hugo/building-&-hosting/) Creator: Mike Dane Affiliation: [Giraffe Academy](https://www.giraffeacademy.com/) Creation date: September 2017 * * * Last updated: August 23, 2025 : [Merge commit 'bfa74537929f409fca841540b971125b7678963a' (6c911d1e5)](https://github.com/gohugoio/hugoDocs/commit/6c911d1e52fb9c8065c079820327f4b0e37529d4) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/getting-started/external-learning-resources/index.md) --- # Security model Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/about/security/](https://gohugo.io/images/qr/qr_6e69822c24edde9a.png) A summary of Hugo’s security model. Runtime security ---------------- Hugo generates static websites, meaning the final output runs directly in the browser and interacts with any integrated APIs. However, during development and site building, the `hugo` executable itself is the runtime environment. Securing a runtime is a complex task. Hugo addresses this through a robust sandboxing approach and a strict security policy with default protections. Key features include: * Virtual file system: Hugo employs a virtual file system, limiting file access. Only the main project, not external components, can access files or directories outside the project root. * Read-Only access: User-defined components have read-only access to the file system, preventing unintended modifications. * Controlled external binaries: While Hugo utilizes external binaries for features like Asciidoctor support, these are strictly predefined with specific flags and are disabled by default. The [security policy](https://gohugo.io/configuration/security/) details these limitations. * No arbitrary commands: To mitigate risks, Hugo intentionally avoids implementing general functions that would allow users to execute arbitrary operating system commands. This combination of sandboxing and strict defaults effectively minimizes potential security vulnerabilities during the Hugo build process. Dependency security ------------------- Hugo utilizes [Go Modules](https://go.dev/wiki/Modules#modules) to manage its dependencies, compiling as a static binary. Go Modules create a `go.sum` file, a critical security feature. This file acts as a database, storing the expected cryptographic checksums of all dependencies, including those required indirectly (transitive dependencies). [Hugo Modules](https://gohugo.io/hugo-modules/) , which extend Go Modules’ functionality, also produce a `go.sum` file. To ensure dependency integrity, commit this `go.sum` file to your version control. If Hugo detects a checksum mismatch during the build process, it will fail, indicating a possible attempt to [tamper with your project’s dependencies](https://julienrenaux.fr/2019/12/20/github-actions-security-risk/) . Web application security ------------------------ Hugo’s security philosophy is rooted in established security standards, primarily aligning with the threats defined by [OWASP](https://en.wikipedia.org/wiki/OWASP) . For HTML output, Hugo operates under a clear trust model. This model assumes that template and configuration authors, the developers, are trustworthy. However, the data supplied to these templates is inherently considered untrusted. This distinction is crucial for understanding how Hugo handles potential security risks. To prevent unintended escaping of data that developers know is safe, Hugo provides [`safe`](https://gohugo.io/functions/safe/) functions, such as [`safeHTML`](https://gohugo.io/functions/safe/html/) . These functions allow developers to explicitly mark data as trusted, bypassing the default escaping mechanisms. This is essential for scenarios where data is generated or sourced from reliable sources. However, an exception exists: enabling [inline shortcodes](https://gohugo.io/content-management/shortcodes/#inline) . By activating this feature, you are implicitly trusting the logic within the shortcodes and the data contained within your content files. It’s vital to remember that Hugo is a static site generator. This architectural choice significantly reduces the attack surface by eliminating the complexities and vulnerabilities associated with dynamic user input. Unlike dynamic websites, Hugo generates static HTML files, minimizing the risk of real-time attacks. Regarding content, Hugo’s default Markdown renderer is [configured to sanitize](https://gohugo.io/configuration/markup/#rendererunsafe) potentially unsafe content. This default behavior ensures that potentially malicious code or scripts are removed or escaped. However, this setting can be reconfigured if you have a high degree of confidence in the safety of your content sources. In essence, Hugo prioritizes secure output by establishing a clear trust boundary between developers and data. By default, it errs on the side of caution, sanitizing potentially unsafe content and escaping data. Developers have the flexibility to adjust these defaults through [`safe`](https://gohugo.io/functions/safe/) functions and [configuration options](https://gohugo.io/configuration/security/) , but they must do so with a clear understanding of the security implications. Hugo’s static site generation model further strengthens its security posture by minimizing dynamic vulnerabilities. Configuration ------------- See [configure security](https://gohugo.io/configuration/security/) . * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/about/security.md) --- # Other community projects Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/tools/other/](https://gohugo.io/images/qr/qr_132b63c52a4c407c.png) Some interesting projects developed by the Hugo community that don’t quite fit into our other developer tool categories. And for all the other community projects around Hugo: * [diego](https://github.com/ttybitnik/diego) - A CLI tool that integrates with Hugo to assist in importing and utilizing exported social media data from popular services on Hugo websites. * [Emacs Easy Hugo](https://github.com/masasam/emacs-easy-hugo) - Emacs package for writing blog posts in Markdown or org-mode and building your project with Hugo. * [Hugo SFTP Upload](https://github.com/thomasmey/HugoSftpUpload) - Sync the local build of your Hugo website with your remote web server via SFTP. * [HugoPhotoSwipe](https://github.com/GjjvdBurg/HugoPhotoSwipe) - Make it easy to create image galleries using PhotoSwipe. * [JAMStack Themes](https://jamstackthemes.dev/ssg/hugo/) - A collection of site themes filterable by static site generator and supported CMS to help build CMS-connected sites using Hugo (linking to Hugo-specific themes). * [flickr-hugo-embed](https://github.com/nikhilm/flickr-hugo-embed) - Print shortcodes to embed a set of images from an album on Flickr into Hugo. * [hugo-gallery](https://github.com/icecreammatt/hugo-gallery) - Create an image gallery for Hugo sites. * [hugo-openapispec-shortcode](https://github.com/tenfourty/hugo-openapispec-shortcode) - A shortcode that allows you to include [Open API Spec](https://openapis.org/) (formerly known as Swagger Spec) in a page. * [plausible-hugo](https://github.com/divinerites/plausible-hugo) - Easy Hugo integration for Plausible Analytics, a simple, open-source, lightweight and privacy-friendly web analytics alternative to Google Analytics. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/tools/other.md) --- # Directory structure Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/getting-started/directory-structure/](https://gohugo.io/images/qr/qr_ec3a013042d18050.png) An overview of Hugo’s directory structure. Each Hugo project is a directory, with subdirectories that contribute to content, structure, behavior, and presentation. Project skeleton ---------------- Hugo generates a project skeleton when you create a new project. For example, this command: hugo new project my-project Creates this directory structure: my-project/ ├── archetypes/ │ └── default.md ├── assets/ ├── content/ ├── data/ ├── i18n/ ├── layouts/ ├── static/ ├── themes/ └── hugo.toml <-- project configuration Depending on requirements, you may wish to organize your project configuration into subdirectories: my-project/ ├── archetypes/ │ └── default.md ├── assets/ ├── config/ <-- project configuration │ └── _default/ │ └── hugo.toml ├── content/ ├── data/ ├── i18n/ ├── layouts/ ├── static/ └── themes/ When you build your project, Hugo creates a `public` directory, and typically a `resources` directory as well: my-project/ ├── archetypes/ │ └── default.md ├── assets/ ├── config/ │ └── _default/ │ └── hugo.toml ├── content/ ├── data/ ├── i18n/ ├── layouts/ ├── public/ <-- created when you build your project ├── resources/ <-- created when you build your project ├── static/ └── themes/ Directories ----------- Each of the subdirectories contributes to content, structure, behavior, or presentation. archetypes The `archetypes` directory contains templates for new content. See [details](https://gohugo.io/content-management/archetypes/) . assets The `assets` directory contains global resources typically passed through an asset pipeline. This includes resources such as images, CSS, Sass, JavaScript, and TypeScript. See [details](https://gohugo.io/hugo-pipes/introduction/) . config The `config` directory contains your project configuration, possibly split into multiple subdirectories and files. For projects with minimal configuration or projects that do not need to behave differently in different environments, a single configuration file named `hugo.toml` in the root of the project is sufficient. See [details](https://gohugo.io/configuration/introduction/#configuration-directory) . content The `content` directory contains the markup files (typically Markdown) and page resources that comprise the content of your project. See [details](https://gohugo.io/content-management/organization/) . data The `data` directory contains data files (JSON, TOML, YAML, or XML) that augment content, configuration, localization, and navigation. See [details](https://gohugo.io/content-management/data-sources/) . i18n The `i18n` directory contains translation tables for multilingual projects. See [details](https://gohugo.io/content-management/multilingual/) . layouts The `layouts` directory contains templates to transform content, data, and resources into a complete website. See [details](https://gohugo.io/templates/) . public The `public` directory contains the published website, generated when you run the `hugo build` or `hugo server` commands. Hugo recreates this directory and its content as needed. See [details](https://gohugo.io/getting-started/usage/#build-your-project) . resources The `resources` directory contains cached output from Hugo’s asset pipelines, generated when you run the `hugo build` or `hugo server` commands. By default this cache directory includes CSS and images. Hugo recreates this directory and its content as needed. static The `static` directory contains files that will be copied to the `public` directory when you build your project. For example: `favicon.ico`, `robots.txt`, and files that verify website ownership. Before the introduction of [page bundles](https://gohugo.io/quick-reference/glossary/#page-bundle) and [asset pipelines](https://gohugo.io/hugo-pipes/introduction/) , the `static` directory was also used for images, CSS, and JavaScript. themes The `themes` directory contains one or more [themes](https://gohugo.io/quick-reference/glossary/#theme) , each in its own subdirectory. Union file system ----------------- Hugo creates a union file system, allowing you to mount two or more directories to the same location. For example, let’s say your home directory contains a Hugo project in one directory, and shared content in another: home/ └── user/ ├── my-project/ │ ├── content/ │ │ ├── books/ │ │ │ ├── _index.md │ │ │ ├── book-1.md │ │ │ └── book-2.md │ │ └── _index.md │ ├── themes/ │ │ └── my-theme/ │ └── hugo.toml └── shared-content/ └── films/ ├── _index.md ├── film-1.md └── film-2.md You can include the shared content using mounts. In your project configuration: module: mounts: - source: content target: content - source: /home/user/shared-content target: content [module] [[module.mounts]] source = 'content' target = 'content' [[module.mounts]] source = '/home/user/shared-content' target = 'content' { "module": { "mounts": [\ {\ "source": "content",\ "target": "content"\ },\ {\ "source": "/home/user/shared-content",\ "target": "content"\ }\ ] } } When you overlay one directory on top of another, you must mount both directories. Hugo does not follow symbolic links. If you need the functionality provided by symbolic links, use Hugo’s union file system instead. After mounting, the union file system has this structure: home/ └── user/ └── my-project/ ├── content/ │ ├── books/ │ │ ├── _index.md │ │ ├── book-1.md │ │ └── book-2.md │ ├── films/ │ │ ├── _index.md │ │ ├── film-1.md │ │ └── film-2.md │ └── _index.md ├── themes/ │ └── my-theme/ └── hugo.toml When two or more files have the same path, the order of precedence follows the order of the mounts. For example, if the shared content directory contains `books/book-1.md`, it will be ignored because the project’s `content` directory was mounted first. You can mount directories to `archetypes`, `assets`, `content`, `data`, `i18n`, `layouts`, and `static`. See [details](https://gohugo.io/configuration/module/#mounts) . You can also mount directories from Git repositories using Hugo Modules. See [details](https://gohugo.io/hugo-modules/) . Theme skeleton -------------- Hugo generates a functional theme skeleton when you create a new theme. For example, this command: hugo new theme my-theme Creates this directory structure (subdirectories not shown): my-theme/ ├── archetypes/ ├── assets/ ├── content/ ├── data/ ├── i18n/ ├── layouts/ ├── static/ └── hugo.toml Using the union file system described above, Hugo mounts each of these directories to the corresponding location in the project. When two files have the same path, the file in the project directory takes precedence. This allows you, for example, to override a theme’s template by placing a copy in the same location within the project directory. If you are simultaneously using components from two or more themes or modules, and there’s a path collision, the first mount takes precedence. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/getting-started/directory-structure.md) --- # Migrate to Hugo Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/tools/migrations/](https://gohugo.io/images/qr/qr_7c54bc164beffed0.png) A list of community-developed tools for migrating from your existing static site generator or content management system to Hugo. This section highlights some independently developed projects related to Hugo. These tools extend functionality or help you to get started. Take a look at this list of migration tools if you currently use other blogging tools like Jekyll or WordPress but intend to switch to Hugo instead. They’ll help you export your content into Hugo-friendly formats. Jekyll ------ Alternatively, you can use the [Jekyll import command](https://gohugo.io/commands/hugo_import_jekyll/) . [JekyllToHugo](https://github.com/fredrikloch/JekyllToHugo) A Small script for converting Jekyll blog posts to a Hugo site. [ConvertToHugo](https://github.com/coderzh/ConvertToHugo) Convert your blog from Jekyll to Hugo. Octopress --------- [octohug](https://github.com/codebrane/octohug) Octopress to Hugo migrator. DokuWiki -------- [dokuwiki-to-hugo](https://github.com/wgroeneveld/dokuwiki-to-hugo) Migrates your DokuWiki source pages from [DokuWiki syntax](https://www.dokuwiki.org/wiki:syntax) to Hugo Markdown syntax. Includes extras like the TODO plugin. Written with extensibility in mind using Python 3. Also generates a TOML header for each page. Designed to copy-paste the wiki directory into your `content` directory. WordPress --------- [wordpress-to-hugo-exporter](https://github.com/SchumacherFM/wordpress-to-hugo-exporter) A one-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Markdown and YAML which can be dropped into Hugo. (Note: If you have trouble using this plugin, you can [export your site for Jekyll](https://wordpress.org/plugins/jekyll-exporter/) and use Hugo’s built-in Jekyll converter listed above.) [blog2md](https://github.com/palaniraja/blog2md) Works with [exported xml](https://en.support.wordpress.com/export/) file of your free YOUR-TLD.wordpress.com website. It also saves approved comments to `YOUR-POST-NAME-comments.md` file along with posts. [wordhugopress](https://github.com/nantipov/wordhugopress) A small utility written in Java that exports the entire WordPress site from the database and resource (e.g., images) files stored locally or remotely. Therefore, migration from the backup files is possible. Supports merging multiple WordPress sites into a single Hugo site. [wp2hugo](https://github.com/ashishb/wp2hugo) A Go-based CLI tool to migrate WordPress websites to Hugo. It preserves original URLs, GUIDs, image URLs, code highlights, tables of contents, and WordPress navigation categories. It migrates WordPress custom post types, custom taxonomies, custom fields, and page hierarchy. It supports translated WordPress blogs via Polylang or WPML. It imports a WordPress media library database with original titles and dates. The tool can download all media or only media inserted into pages from the original server. It converts WordPress shortcodes and Gutenberg blocks to Hugo shortcodes including galleries, images, audio, YouTube embeds, Gists, and Google Maps. Medium ------ [medium2md](https://github.com/gautamdhameja/medium-2-md) A simple Medium to Hugo exporter able to import stories in one command, including front matter. [medium-to-hugo](https://github.com/bgadrian/medium-to-hugo) A CLI tool written in Go to export medium posts into a Hugo-compatible Markdown format. Tags and images are included. All images will be downloaded locally and linked appropriately. Tumblr ------ [tumblr-importr](https://github.com/carlmjohnson/tumblr-importr) An importer that uses the Tumblr API to create a Hugo static site. [tumblr2hugomarkdown](https://github.com/Wysie/tumblr2hugomarkdown) Export all your Tumblr content to Hugo Markdown files with preserved original formatting. [Tumblr to Hugo](https://github.com/jipiboily/tumblr-to-hugo) A migration tool that converts each of your Tumblr posts to a content file with a proper title and path. It also generates a CSV file to help you set up URL redirects. Drupal ------ [drupal2hugo](https://github.com/danapsimer/drupal2hugo) Convert a Drupal site to Hugo. Joomla ------ [hugojoomla](https://github.com/davetcc/hugojoomla) This utility written in Java takes a Joomla database and converts all the content into Markdown files. It changes any URLs that are in Joomla’s internal format and converts them to a suitable form. Blogger ------- [blogimport](https://github.com/natefinch/blogimport) A tool to import from Blogger posts to Hugo. [blogger-to-hugo](https://pypi.org/project/blogger-to-hugo/) Another tool to import Blogger posts to Hugo. It also downloads embedded images so they will be stored locally. [blog2md](https://github.com/palaniraja/blog2md) Works with [exported xml](https://support.google.com/blogger/answer/41387?hl=en) file of your YOUR-TLD.blogspot.com website. It also saves comments to `YOUR-POST-NAME-comments.md` file along with posts. [BloggerToHugo](https://github.com/huanlin/blogger-to-hugo) Yet another tool to import Blogger posts to Hugo. For Windows platform only, and .NET Framework 4.5 is required. See README.md before using this tool. [blogger2hugo](https://github.com/noorkhafidzin/blogger2hugo) Converts a Blogger backup file (`.atom`) from [Google Takeout](https://takeout.google.com/takeout/custom/blogger?hl=en) to Markdown (`.md`) files. The tool generates output compatible with the Hugo `content/` structure. Contentful ---------- [contentful-hugo](https://github.com/ModiiMedia/contentful-hugo) A tool to create content-files for Hugo from content on [Contentful](https://www.contentful.com/) . BlogML ------ [BlogML2Hugo](https://github.com/jijiechen/BlogML2Hugo) A tool that helps you convert BlogML xml file to Hugo Markdown files. Users need to take care of links to attachments and images by themselves. This helps the blogs that export BlogML files (e.g. BlogEngine.NET) transform to hugo sites easily. * * * Last updated: February 26, 2026 : [content: Add blogger2hugo migration tool (291ffc3f6)](https://github.com/gohugoio/hugoDocs/commit/291ffc3f6bbfc43d218748c729a1c4b3f996ed6a) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/tools/migrations.md) --- # Template lookup order Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/lookup-order/](https://gohugo.io/images/qr/qr_9339767282538b62.png) Hugo uses the rules below to select a template for a given page, starting from the most specific. We did a complete overhaul of Hugo’s template system in v0.146.0. We’re working on getting all of the relevant documentation up to date, but until then, see [this page](https://gohugo.io/templates/new-templatesystem-overview/) . Lookup rules ------------ Hugo takes the parameters listed below into consideration when choosing a template for a given page. The templates are ordered by specificity. This should feel natural, but look at the table below for concrete examples of the different parameter variations. Kind The page `Kind` (the home page is one). See the example tables below per kind. This also determines if it is a **single page** (i.e. a regular content page. We then look for a template in `_default/single.html` for HTML) or a **list page** (section listings, home page, taxonomy lists, taxonomy terms. We then look for a template in `_default/list.html` for HTML). Layout Can be set in front matter. Output Format See [configure output formats](https://gohugo.io/configuration/output-formats/) . An output format has both a `name` (e.g. `rss`, `amp`, `html`) and a `suffix` (e.g. `xml`, `html`). We prefer matches with both (e.g. `index.amp.html`), but look for less specific templates. Note that if the output format’s Media Type has more than one suffix defined, only the first is considered. Language We will consider a language tag in the template name. If the site language is `fr`, `index.fr.amp.html` will win over `index.amp.html`, but `index.amp.html` will be chosen before `index.fr.html`. Type Is value of `type` if set in front matter, else it is the name of the root section (e.g. “blog”). It will always have a value, so if not set, the value is “page”. Section Is relevant for `section`, `taxonomy` and `term` types. Templates can live in either the project’s or the themes’ `layout` directories, and the most specific templates will be chosen. Hugo will interleave the lookups listed below, finding the most specific one either in the project or themes. Target a template ----------------- You cannot change the lookup order to target a content page, but you can change a content page to target a template. Specify `type`, `layout`, or both in front matter. Consider this content structure: content/ ├── about.md └── contact.md Files in the root of the `content` directory have a [content type](https://gohugo.io/quick-reference/glossary/#content-type) of `page`. To render these pages with a unique template, create a matching subdirectory: layouts/ └── page/ └── single.html But the contact page probably has a form and requires a different template. In the front matter specify `layout`: --- layout: contact title: Contact --- +++ layout = 'contact' title = 'Contact' +++ { "layout": "contact", "title": "Contact" } Then create the template for the contact page: layouts/ └── page/ └── contact.html <-- renders contact.md └── single.html <-- renders about.md As a content type, the word `page` is vague. Perhaps `miscellaneous` would be better. Add `type` to the front matter of each page: --- title: About type: miscellaneous --- +++ title = 'About' type = 'miscellaneous' +++ { "title": "About", "type": "miscellaneous" } --- layout: contact title: Contact type: miscellaneous --- +++ layout = 'contact' title = 'Contact' type = 'miscellaneous' +++ { "layout": "contact", "title": "Contact", "type": "miscellaneous" } Now place the layouts in the corresponding directory: layouts/ └── miscellaneous/ └── contact.html <-- renders contact.md └── single.html <-- renders about.md * * * Last updated: July 7, 2025 : [Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45' (079671b41)](https://github.com/gohugoio/hugoDocs/commit/079671b41b9395f2c2b48879f14d3f09d69a63dc) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/lookup-order.md) --- # Linux Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/installation/linux/](https://gohugo.io/images/qr/qr_797cf575f7027a0f.png) Install Hugo on Linux. Editions -------- Hugo offers a standard edition with core features, plus extended and extended/deploy editions with more. Use the standard edition unless you need the features below. | Feature | extended edition | extended/deploy edition | | --- | --- | --- | | [Transpile Sass to CSS](https://gohugo.io/functions/css/sass/)
via embedded LibSass. Note that embedded LibSass was deprecated in v0.153.0 and will be removed in a future release. Use the [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass)
transpiler instead, which is compatible with any edition. | ✔️ | ✔️ | | Deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or an Azure Storage container. See [details](https://gohugo.io/host-and-deploy/deploy-with-hugo-deploy/)
. | ❌ | ✔️ | Prerequisites ------------- Although not required in all cases, [Git](https://git-scm.com/) , [Go](https://go.dev/) , and [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass) are commonly used when working with Hugo. Git is required to: * Build Hugo from source * Use the [Hugo Modules](https://gohugo.io/hugo-modules/) feature * Install a theme as a Git submodule * Access [commit information](https://gohugo.io/methods/page/gitinfo/) from a local Git repository * Host your site on [CI/CD](https://gohugo.io/quick-reference/glossary/#cicd) platforms such as [Cloudflare](https://gohugo.io/host-and-deploy/host-on-cloudflare/) , [GitHub Pages](https://gohugo.io/host-and-deploy/host-on-github-pages/) , [GitLab Pages](https://gohugo.io/host-and-deploy/host-on-gitlab-pages/) , [Netlify](https://gohugo.io/host-and-deploy/host-on-netlify/) , [Render](https://gohugo.io/host-and-deploy/host-on-render/) , or [Vercel](https://gohugo.io/host-and-deploy/host-on-vercel/) Go is required to: * Build Hugo from source * Use the Hugo Modules feature Dart Sass is required to transpile Sass to CSS when using the latest features of the Sass language. Please refer to the relevant documentation for installation instructions: * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) * [Go](https://go.dev/doc/install) * [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass) Prebuilt binaries ----------------- Prebuilt binaries are available for a variety of operating systems and architectures. Visit the [latest release](https://github.com/gohugoio/hugo/releases/latest) page, and scroll down to the Assets section. 1. Download the archive for the desired edition, operating system, and architecture 2. Extract the archive 3. Move the executable to the desired directory 4. Add this directory to the PATH environment variable 5. Verify that you have _execute_ permission on the file Please consult your operating system documentation if you need help setting file permissions or modifying your PATH environment variable. If you do not see a prebuilt binary for the desired edition, operating system, and architecture, install Hugo using one of the methods described below. Package managers ---------------- ### Snap [Snap](https://snapcraft.io/) is a free and open-source package manager for Linux. Available for [most distributions](https://snapcraft.io/docs/installing-snapd) , snap packages are simple to install and are automatically updated. The Hugo snap package is [strictly confined](https://snapcraft.io/docs/snap-confinement) . Strictly confined snaps run in complete isolation, up to a minimal access level that’s deemed always safe. The sites you create and build must be located within your home directory, or on removable media. To install the extended edition of Hugo: sudo snap install hugo To control automatic updates: # disable automatic updates sudo snap refresh --hold hugo # enable automatic updates sudo snap refresh --unhold hugo To control access to removable media: # allow access sudo snap connect hugo:removable-media # revoke access sudo snap disconnect hugo:removable-media To control access to SSH keys: # allow access sudo snap connect hugo:ssh-keys # revoke access sudo snap disconnect hugo:ssh-keys ### Homebrew [Homebrew](https://brew.sh/) is a free and open-source package manager for macOS and Linux. To install the extended/deploy edition of Hugo: brew install hugo Repository packages ------------------- Most Linux distributions maintain a repository for commonly installed applications. The Hugo version available in package repositories varies based on Linux distribution and release, and in some cases will not be the [latest version](https://github.com/gohugoio/hugo/releases/latest) . Use one of the other installation methods if your package repository does not provide the desired version. ### Alpine Linux To install the extended edition of Hugo on [Alpine Linux](https://alpinelinux.org/) : doas apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community hugo ### Arch Linux Derivatives of the [Arch Linux](https://archlinux.org/) distribution of Linux include [EndeavourOS](https://endeavouros.com/) , [Garuda Linux](https://garudalinux.org/) , [Manjaro](https://manjaro.org/) , and others. To install the extended edition of Hugo: sudo pacman -S hugo ### Debian Derivatives of the [Debian](https://www.debian.org/) distribution of Linux include [elementary OS](https://elementary.io/) , [KDE neon](https://neon.kde.org/) , [Linux Lite](https://www.linuxliteos.com/) , [Linux Mint](https://linuxmint.com/) , [MX Linux](https://mxlinux.org/) , [Pop!\_OS](https://pop.system76.com/) , [Ubuntu](https://ubuntu.com/) , [Zorin OS](https://zorin.com/os/) , and others. To install the extended edition of Hugo: sudo apt install hugo You can also download Debian packages from the [latest release](https://github.com/gohugoio/hugo/releases/latest) page. ### Exherbo To install the extended edition of Hugo on [Exherbo](https://www.exherbolinux.org/) : 1. Add this line to /etc/paludis/options.conf: www-apps/hugo extended 2. Install using the Paludis package manager: cave resolve -x repository/heirecka cave resolve -x hugo ### Fedora Derivatives of the [Fedora](https://getfedora.org/) distribution of Linux include [CentOS](https://www.centos.org/) , [Red Hat Enterprise Linux](https://www.redhat.com/) , and others. To install the extended edition of Hugo: sudo dnf install hugo ### Gentoo Derivatives of the [Gentoo](https://www.gentoo.org/) distribution of Linux include [Calculate Linux](https://www.calculate-linux.org/) , [Funtoo](https://www.funtoo.org/) , and others. To install the extended edition of Hugo: 1. Specify the `extended` [USE](https://packages.gentoo.org/packages/www-apps/hugo) flag in /etc/portage/package.use/hugo: www-apps/hugo extended 2. Build using the Portage package manager: sudo emerge www-apps/hugo ### NixOS The NixOS distribution of Linux includes Hugo in its package repository. To install the extended edition of Hugo: nix-env -iA nixos.hugo ### openSUSE Derivatives of the [openSUSE](https://www.opensuse.org/) distribution of Linux include [GeckoLinux](https://geckolinux.github.io/) , [Linux Karmada](https://linuxkamarada.com/) , and others. To install the extended edition of Hugo: sudo zypper install hugo ### Solus The [Solus](https://getsol.us/) distribution of Linux includes Hugo in its package repository. To install the extended edition of Hugo: sudo eopkg install hugo ### Void Linux To install the extended edition of Hugo on [Void Linux](https://voidlinux.org/) : sudo xbps-install -S hugo Build from source ----------------- To build the extended or extended/deploy edition from source you must: 1. Install [Git](https://git-scm.com/) 2. Install [Go](https://go.dev/) version 1.24.0 or later 3. Install a C compiler, either [GCC](https://gcc.gnu.org/) or [Clang](https://clang.llvm.org/) 4. Update your `PATH` environment variable as described in the [Go documentation](https://go.dev/doc/code#Command) > The install directory is controlled by the `GOPATH` and `GOBIN` environment variables. If `GOBIN` is set, binaries are installed to that directory. If `GOPATH` is set, binaries are installed to the bin subdirectory of the first directory in the `GOPATH` list. Otherwise, binaries are installed to the bin subdirectory of the default `GOPATH` (`$HOME/go` or `%USERPROFILE%\go`). To build the standard edition: go install github.com/gohugoio/hugo@latest To build the extended edition: CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest To build the extended/deploy edition: CGO_ENABLED=1 go install -tags extended,withdeploy github.com/gohugoio/hugo@latest Comparison ---------- | | Prebuilt binaries | Package managers | Repository packages | Build from source | | --- | --- | --- | --- | --- | | Easy to install? | ✔️ | ✔️ | ✔️ | ✔️ | | Easy to upgrade? | ✔️ | ✔️ | varies | ✔️ | | Easy to downgrade? | ✔️ | ✔️ [1](https://gohugo.io/installation/linux/#fn:1) | varies | ✔️ | | Automatic updates? | ❌ | varies [2](https://gohugo.io/installation/linux/#fn:2) | ❌ | ❌ | | Latest version available? | ✔️ | ✔️ | varies | ✔️ | * * * 1. Easy if a previous version is still installed. [↩︎](https://gohugo.io/installation/linux/#fnref:1) 2. Snap packages are automatically updated. Homebrew requires advanced configuration. [↩︎](https://gohugo.io/installation/linux/#fnref:2) * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/installation/linux.md) --- # BSD Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/installation/bsd/](https://gohugo.io/images/qr/qr_8d83376511b728fd.png) Install Hugo on BSD derivatives. Editions -------- Hugo offers a standard edition with core features, plus extended and extended/deploy editions with more. Use the standard edition unless you need the features below. | Feature | extended edition | extended/deploy edition | | --- | --- | --- | | [Transpile Sass to CSS](https://gohugo.io/functions/css/sass/)
via embedded LibSass. Note that embedded LibSass was deprecated in v0.153.0 and will be removed in a future release. Use the [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass)
transpiler instead, which is compatible with any edition. | ✔️ | ✔️ | | Deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or an Azure Storage container. See [details](https://gohugo.io/host-and-deploy/deploy-with-hugo-deploy/)
. | ❌ | ✔️ | Prerequisites ------------- Although not required in all cases, [Git](https://git-scm.com/) , [Go](https://go.dev/) , and [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass) are commonly used when working with Hugo. Git is required to: * Build Hugo from source * Use the [Hugo Modules](https://gohugo.io/hugo-modules/) feature * Install a theme as a Git submodule * Access [commit information](https://gohugo.io/methods/page/gitinfo/) from a local Git repository * Host your site on [CI/CD](https://gohugo.io/quick-reference/glossary/#cicd) platforms such as [Cloudflare](https://gohugo.io/host-and-deploy/host-on-cloudflare/) , [GitHub Pages](https://gohugo.io/host-and-deploy/host-on-github-pages/) , [GitLab Pages](https://gohugo.io/host-and-deploy/host-on-gitlab-pages/) , [Netlify](https://gohugo.io/host-and-deploy/host-on-netlify/) , [Render](https://gohugo.io/host-and-deploy/host-on-render/) , or [Vercel](https://gohugo.io/host-and-deploy/host-on-vercel/) Go is required to: * Build Hugo from source * Use the Hugo Modules feature Dart Sass is required to transpile Sass to CSS when using the latest features of the Sass language. Please refer to the relevant documentation for installation instructions: * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) * [Go](https://go.dev/doc/install) * [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass) Prebuilt binaries ----------------- Prebuilt binaries are available for a variety of operating systems and architectures. Visit the [latest release](https://github.com/gohugoio/hugo/releases/latest) page, and scroll down to the Assets section. 1. Download the archive for the desired edition, operating system, and architecture 2. Extract the archive 3. Move the executable to the desired directory 4. Add this directory to the PATH environment variable 5. Verify that you have _execute_ permission on the file Please consult your operating system documentation if you need help setting file permissions or modifying your PATH environment variable. If you do not see a prebuilt binary for the desired edition, operating system, and architecture, install Hugo using one of the methods described below. Repository packages ------------------- Most BSD derivatives maintain a repository for commonly installed applications. Please note that these repositories may not contain the [latest release](https://github.com/gohugoio/hugo/releases/latest) . ### DragonFly BSD [DragonFly BSD](https://www.dragonflybsd.org/) includes Hugo in its package repository. To install the extended edition of Hugo: sudo pkg install gohugo ### FreeBSD [FreeBSD](https://www.freebsd.org/) includes Hugo in its package repository. To install the extended edition of Hugo: sudo pkg install gohugo ### NetBSD [NetBSD](https://www.netbsd.org/) includes Hugo in its package repository. To install the extended edition of Hugo: sudo pkgin install go-hugo ### OpenBSD [OpenBSD](https://www.openbsd.org/) includes Hugo in its package repository. This will prompt you to select which edition of Hugo to install: doas pkg_add hugo Build from source ----------------- To build the extended or extended/deploy edition from source you must: 1. Install [Git](https://git-scm.com/) 2. Install [Go](https://go.dev/) version 1.24.0 or later 3. Install a C compiler, either [GCC](https://gcc.gnu.org/) or [Clang](https://clang.llvm.org/) 4. Update your `PATH` environment variable as described in the [Go documentation](https://go.dev/doc/code#Command) > The install directory is controlled by the `GOPATH` and `GOBIN` environment variables. If `GOBIN` is set, binaries are installed to that directory. If `GOPATH` is set, binaries are installed to the bin subdirectory of the first directory in the `GOPATH` list. Otherwise, binaries are installed to the bin subdirectory of the default `GOPATH` (`$HOME/go` or `%USERPROFILE%\go`). To build the standard edition: go install github.com/gohugoio/hugo@latest To build the extended edition: CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest To build the extended/deploy edition: CGO_ENABLED=1 go install -tags extended,withdeploy github.com/gohugoio/hugo@latest Comparison ---------- | | Prebuilt binaries | Repository packages | Build from source | | --- | --- | --- | --- | | Easy to install? | ✔️ | ✔️ | ✔️ | | Easy to upgrade? | ✔️ | varies | ✔️ | | Easy to downgrade? | ✔️ | varies | ✔️ | | Automatic updates? | ❌ | varies | ❌ | | Latest version available? | ✔️ | varies | ✔️ | * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/installation/bsd.md) --- # Windows Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/installation/windows/](https://gohugo.io/images/qr/qr_b1d194e61be161cc.png) Install Hugo on Windows. Hugo v0.121.1 and later require at least Windows 10 or Windows Server 2016. Editions -------- Hugo offers a standard edition with core features, plus extended and extended/deploy editions with more. Use the standard edition unless you need the features below. | Feature | extended edition | extended/deploy edition | | --- | --- | --- | | [Transpile Sass to CSS](https://gohugo.io/functions/css/sass/)
via embedded LibSass. Note that embedded LibSass was deprecated in v0.153.0 and will be removed in a future release. Use the [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass)
transpiler instead, which is compatible with any edition. | ✔️ | ✔️ | | Deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or an Azure Storage container. See [details](https://gohugo.io/host-and-deploy/deploy-with-hugo-deploy/)
. | ❌ | ✔️ | Prerequisites ------------- Although not required in all cases, [Git](https://git-scm.com/) , [Go](https://go.dev/) , and [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass) are commonly used when working with Hugo. Git is required to: * Build Hugo from source * Use the [Hugo Modules](https://gohugo.io/hugo-modules/) feature * Install a theme as a Git submodule * Access [commit information](https://gohugo.io/methods/page/gitinfo/) from a local Git repository * Host your site on [CI/CD](https://gohugo.io/quick-reference/glossary/#cicd) platforms such as [Cloudflare](https://gohugo.io/host-and-deploy/host-on-cloudflare/) , [GitHub Pages](https://gohugo.io/host-and-deploy/host-on-github-pages/) , [GitLab Pages](https://gohugo.io/host-and-deploy/host-on-gitlab-pages/) , [Netlify](https://gohugo.io/host-and-deploy/host-on-netlify/) , [Render](https://gohugo.io/host-and-deploy/host-on-render/) , or [Vercel](https://gohugo.io/host-and-deploy/host-on-vercel/) Go is required to: * Build Hugo from source * Use the Hugo Modules feature Dart Sass is required to transpile Sass to CSS when using the latest features of the Sass language. Please refer to the relevant documentation for installation instructions: * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) * [Go](https://go.dev/doc/install) * [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass) Prebuilt binaries ----------------- Prebuilt binaries are available for a variety of operating systems and architectures. Visit the [latest release](https://github.com/gohugoio/hugo/releases/latest) page, and scroll down to the Assets section. 1. Download the archive for the desired edition, operating system, and architecture 2. Extract the archive 3. Move the executable to the desired directory 4. Add this directory to the PATH environment variable 5. Verify that you have _execute_ permission on the file Please consult your operating system documentation if you need help setting file permissions or modifying your PATH environment variable. If you do not see a prebuilt binary for the desired edition, operating system, and architecture, install Hugo using one of the methods described below. Package managers ---------------- ### Chocolatey [Chocolatey](https://chocolatey.org/) is a free and open-source package manager for Windows. To install the extended edition of Hugo: choco install hugo-extended ### Scoop [Scoop](https://scoop.sh/) is a free and open-source package manager for Windows. To install the extended edition of Hugo: scoop install hugo-extended ### Winget [Winget](https://learn.microsoft.com/en-us/windows/package-manager/) is Microsoft’s official free and open-source package manager for Windows. To install the extended edition of Hugo: winget install Hugo.Hugo.Extended To uninstall the extended edition of Hugo: winget uninstall --name "Hugo (Extended)" Build from source ----------------- To build the extended or extended/deploy edition from source you must: 1. Install [Git](https://git-scm.com/) 2. Install [Go](https://go.dev/) version 1.24.0 or later 3. Install a C compiler, either [GCC](https://gcc.gnu.org/) or [Clang](https://clang.llvm.org/) 4. Update your `PATH` environment variable as described in the [Go documentation](https://go.dev/doc/code#Command) > The install directory is controlled by the `GOPATH` and `GOBIN` environment variables. If `GOBIN` is set, binaries are installed to that directory. If `GOPATH` is set, binaries are installed to the bin subdirectory of the first directory in the `GOPATH` list. Otherwise, binaries are installed to the bin subdirectory of the default `GOPATH` (`$HOME/go` or `%USERPROFILE%\go`). To build the standard edition: go install github.com/gohugoio/hugo@latest To build the extended edition: CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest To build the extended/deploy edition: CGO_ENABLED=1 go install -tags extended,withdeploy github.com/gohugoio/hugo@latest See these [detailed instructions](https://discourse.gohugo.io/t/41370) to install GCC on Windows. Comparison ---------- | | Prebuilt binaries | Package managers | Build from source | | --- | --- | --- | --- | | Easy to install? | ✔️ | ✔️ | ✔️ | | Easy to upgrade? | ✔️ | ✔️ | ✔️ | | Easy to downgrade? | ✔️ | ✔️ [1](https://gohugo.io/installation/windows/#fn:1) | ✔️ | | Automatic updates? | ❌ | ❌ [2](https://gohugo.io/installation/windows/#fn:2) | ❌ | | Latest version available? | ✔️ | ✔️ | ✔️ | * * * 1. Easy if a previous version is still installed. [↩︎](https://gohugo.io/installation/windows/#fnref:1) 2. Possible but requires advanced configuration. [↩︎](https://gohugo.io/installation/windows/#fnref:2) * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/installation/windows.md) --- # Sitemap templates Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/sitemap/](https://gohugo.io/images/qr/qr_d8457d4fbbb1392d.png) Hugo provides built-in sitemap templates. Overview -------- Hugo’s embedded sitemap templates conform to v0.9 of the [sitemap protocol](https://www.sitemaps.org/protocol.html) . With a monolingual project, Hugo generates a sitemap.xml file in the root of the [`publishDir`](https://gohugo.io/configuration/all/#publishdir) using the [embedded sitemap template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/sitemap.xml) . With a multilingual project, Hugo generates: * A sitemap.xml file in the root of each site (language) using the [embedded sitemap template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/sitemap.xml) * A sitemap.xml file in the root of the [`publishDir`](https://gohugo.io/configuration/all/#publishdir) using the [embedded sitemapindex template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/sitemapindex.xml) Configuration ------------- See [configure sitemap](https://gohugo.io/configuration/sitemap/) . Override default values ----------------------- Override the default values for a given page in front matter. --- sitemap: changefreq: weekly disable: true priority: 0.8 title: News --- +++ title = 'News' [sitemap] changefreq = 'weekly' disable = true priority = 0.8 +++ { "sitemap": { "changefreq": "weekly", "disable": true, "priority": 0.8 }, "title": "News" } Override built-in templates --------------------------- To override the built-in sitemap.xml template, create a new `layouts/sitemap.xml` file. 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 `layouts/sitemapindex.xml` file. Disable sitemap generation -------------------------- You may disable sitemap generation in your project configuration: disableKinds: - sitemap disableKinds = ['sitemap'] { "disableKinds": [\ "sitemap"\ ] } * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/sitemap.md) --- # Abs Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/duration/abs/](https://gohugo.io/images/qr/qr_1e14ca9ac06b4860.png) Returns the absolute value of the given time.Duration value. Syntax DURATION.Abs Returns time.Duration {{ $d = time.ParseDuration "-3h" }} {{ $d.Abs }} → 3h0m0s * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/duration/Abs.md) --- # Custom 404 page Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/404/](https://gohugo.io/images/qr/qr_55edf23897e86650.png) Create a template to render a 404 error page. To render a 404 error page in the root of your site, create a 404 template in the root of the `layouts` directory. For example: layouts/404.html {{ define "main" }}

404 Not Found

The page you requested cannot be found.

Return to the home page

{{ end }} For multilingual projects, add the language key to the file name: layouts/ ├── 404.de.html ├── 404.en.html └── 404.fr.html Your production server redirects the browser to the 404 page when a page is not found. Capabilities and configuration vary by host. | Host | Capabilities and configuration | | --- | --- | | Amazon CloudFront | See [details](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/GeneratingCustomErrorResponses.html)
. | | Amazon S3 | See [details](https://docs.aws.amazon.com/AmazonS3/latest/userguide/CustomErrorDocSupport.html)
. | | Apache | See [details](https://httpd.apache.org/docs/2.4/custom-error.html)
. | | Azure Static Web Apps | See [details](https://learn.microsoft.com/en-us/azure/static-web-apps/configuration#response-overrides)
. | | Azure Storage | See [details](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website#setting-up-a-static-website)
. | | Caddy | See [details](https://caddyserver.com/docs/caddyfile/directives/handle_errors)
. | | Cloudflare Pages | See [details](https://developers.cloudflare.com/pages/configuration/serving-pages/#not-found-behavior)
. | | DigitalOcean App Platform | See [details](https://docs.digitalocean.com/products/app-platform/how-to/manage-static-sites/#configure-a-static-site)
. | | Firebase | See [details](https://firebase.google.com/docs/hosting/full-config#404)
. | | GitHub Pages | Redirection to is automatic and not configurable. | | GitLab Pages | See [details](https://docs.gitlab.com/ee/user/project/pages/introduction.html#custom-error-codes-pages)
. | | NGINX | See [details](https://nginx.org/en/docs/http/ngx_http_core_module.html#error_page)
. | | Netlify | See [details](https://docs.netlify.com/routing/redirects/redirect-options/)
. | * * * Last updated: February 26, 2026 : [content: More site-to-project changes (05b69f84e)](https://github.com/gohugoio/hugoDocs/commit/05b69f84e25e9cdd10ed1ac7ce5d37d4ac0b3725) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/404.md) --- # RSS templates Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/rss/](https://gohugo.io/images/qr/qr_d124fc97af97fe25.png) Use the embedded RSS template, or create your own. Configuration ------------- By default, when you build your project, Hugo generates RSS feeds for home, section, taxonomy, and term pages. Control feed generation in your project configuration. For example, to generate feeds for home and section pages, but not for taxonomy and term pages: outputs: home: - html - rss section: - html - rss taxonomy: - html term: - html [outputs] home = ['html', 'rss'] section = ['html', 'rss'] taxonomy = ['html'] term = ['html'] { "outputs": { "home": [\ "html",\ "rss"\ ], "section": [\ "html",\ "rss"\ ], "taxonomy": [\ "html"\ ], "term": [\ "html"\ ] } } To disable feed generation for all [page kinds](https://gohugo.io/quick-reference/glossary/#page-kind) : disableKinds: - rss disableKinds = ['rss'] { "disableKinds": [\ "rss"\ ] } By default, the number of items in each feed is unlimited. Change this as needed in your project configuration: services: rss: limit: 42 [services] [services.rss] limit = 42 { "services": { "rss": { "limit": 42 } } } Set `limit` to `-1` to generate an unlimited number of items per feed. The built-in RSS template will render the following values, if present, from your project configuration: copyright: © 2023 ABC Widgets, Inc. params: author: email: jdoe@example.org name: John Doe copyright = '© 2023 ABC Widgets, Inc.' [params] [params.author] email = 'jdoe@example.org' name = 'John Doe' { "copyright": "© 2023 ABC Widgets, Inc.", "params": { "author": { "email": "jdoe@example.org", "name": "John Doe" } } } Include feed reference ---------------------- To include a feed reference in the `head` element of your rendered pages, place this within the `head` element of your templates: {{ with .OutputFormats.Get "rss" }} {{ printf `` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} {{ end }} Hugo will render this to: Custom templates ---------------- Override Hugo’s [embedded RSS template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/rss.xml) by creating one or more of your own. For example, to use different templates for home, section, taxonomy, and term pages: layouts/ ├── home.rss.xml ├── section.rss.xml ├── taxonomy.rss.xml └── term.rss.xml RSS templates receive the `.Page` and `.Site` objects in context. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/rss.md) --- # Site audit Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/troubleshooting/audit/](https://gohugo.io/images/qr/qr_db78aa9a0cda272b.png) Run this audit before deploying your production site. There are several conditions that can produce errors in your published site which are not detected during the build. Run this audit before your final build. HUGO_MINIFY_TDEWOLFF_HTML_KEEPCOMMENTS=true HUGO_ENABLEMISSINGTRANSLATIONPLACEHOLDERS=true hugo && grep -inorE "<\!-- raw HTML omitted -->|ZgotmplZ|\[i18n\]|\(\)|(<nil>)|hahahugo" public/ _Tested with GNU Bash 5.1 and GNU grep 3.7._ Example output -------------- ![site audit terminal output](https://gohugo.io/troubleshooting/audit/screen-capture.png) Explanation ----------- ### Environment variables `HUGO_MINIFY_TDEWOLFF_HTML_KEEPCOMMENTS=true` Retain HTML comments even if minification is enabled. This takes precedence over `minify.tdewolff.html.keepComments` in your project configuration. If you minify without keeping HTML comments when performing this audit, you will not be able to detect when raw HTML has been omitted. `HUGO_ENABLEMISSINGTRANSLATIONPLACEHOLDERS=true` Show a placeholder instead of the default value or an empty string if a translation is missing. This takes precedence over `enableMissingTranslationPlaceholders` in your project configuration. ### Grep options `-i, --ignore-case` Ignore case distinctions in patterns and input data, so that characters that differ only in case match each other. `-n, --line-number` Prefix each line of output with the 1-based line number within its input file. `-o, --only-matching` Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line. `-r, --recursive` Read all files under each directory, recursively, following symbolic links only if they are on the command line. `-E, --extended-regexp` Interpret PATTERNS as extended regular expressions. ### Patterns `` By default, Hugo strips raw HTML from your Markdown prior to rendering, and leaves this HTML comment in its place. `ZgotmplZ` ZgotmplZ is a special value that indicates that unsafe content reached a CSS or URL context at runtime. See [details](https://pkg.go.dev/html/template) . `[i18n]` This is the placeholder produced instead of the default value or an empty string if a translation is missing. `()` This string will appear in the rendered HTML when passing a nil value to the `printf` function. `(<nil>)` Same as above when the value returned from the `printf` function has not been passed through `safeHTML`. `HAHAHUGO` Under certain conditions a rendered shortcode may include all or a portion of the string HAHAHUGOSHORTCODE in either uppercase or lowercase. This is difficult to detect in all circumstances, but a case-insensitive search of the output for `HAHAHUGO` is likely to catch the majority of cases without producing false positives. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/troubleshooting/audit/index.md) --- # Features Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/about/features/](https://gohugo.io/images/qr/qr_d524e35860dfaf3e.png) Hugo’s rich and powerful feature set provides the framework and tools to create static sites that build in seconds, often less. Framework --------- [Multiplatform](https://gohugo.io/installation/) Install Hugo’s single executable on Linux, macOS, Windows, and more. [Multilingual](https://gohugo.io/content-management/multilingual/) Localize your project for each language and region, including translations, images, dates, currencies, numbers, percentages, and collation sequence. Hugo’s multilingual framework supports single-host and multihost configurations. [Output formats](https://gohugo.io/configuration/output-formats/) Render each page of your project to one or more output formats, with granular control by page kind, section, and path. While HTML is the default output format, you can add JSON, RSS, CSV, and more. For example, create a REST API to access content. [Templates](https://gohugo.io/templates/introduction/) Create templates using variables, functions, and methods to transform your content, resources, and data into a published page. While HTML templates are the most common, you can create templates for any output format. [Themes](https://themes.gohugo.io/) Reduce development time and cost by using one of the hundreds of themes contributed by the Hugo community. Themes are available for corporate sites, documentation projects, image portfolios, landing pages, personal and professional blogs, resumes, CVs, and more. [Modules](https://gohugo.io/hugo-modules/) Reduce development time and cost by creating or importing packaged combinations of archetypes, assets, content, data, templates, translation tables, static files, or configuration settings. A module may serve as the basis for a new project, or to augment an existing project. [Privacy](https://gohugo.io/configuration/privacy/) Configure your project to help comply with regional privacy regulations. [Security](https://gohugo.io/about/security/) Hugo’s security model is based on the premise that template and configuration authors are trusted, but content authors are not. This model enables generation of HTML output safe against code injection. Other protections prevent “shelling out” to arbitrary applications, limit access to specific environment variables, prevent connections to arbitrary remote data sources, and more. Content authoring ----------------- [Content formats](https://gohugo.io/content-management/formats/) Create your content using Markdown, HTML, AsciiDoc, Emacs Org Mode, Pandoc, or reStructuredText. Markdown is the default content format, conforming to the [CommonMark](https://spec.commonmark.org/current/) and [GitHub Flavored Markdown](https://github.github.com/gfm/) specifications. [Markdown attributes](https://gohugo.io/content-management/markdown-attributes/) Apply HTML attributes such as `class` and `id` to Markdown images and block elements including blockquotes, fenced code blocks, headings, horizontal rules, lists, paragraphs, and tables. [Markdown extensions](https://gohugo.io/configuration/markup/#extensions) Leverage the embedded Markdown extensions to create tables, definition lists, footnotes, task lists, inserted text, mark text, subscripts, superscripts, and more. [Markdown render hooks](https://gohugo.io/render-hooks/introduction/) Override the conversion of Markdown to HTML when rendering blockquotes, fenced code blocks, headings, images, links, and tables. For example, render every standalone image as an HTML `figure` element. [Diagrams](https://gohugo.io/content-management/diagrams/) Use fenced code blocks and Markdown render hooks to include diagrams in your content. [Mathematics](https://gohugo.io/content-management/mathematics/) Include mathematical equations and expressions in Markdown using LaTeX markup. [Syntax highlighting](https://gohugo.io/content-management/syntax-highlighting/) Syntactically highlight code examples using Hugo’s embedded syntax highlighter, enabled by default for fenced code blocks in Markdown. The syntax highlighter supports hundreds of code languages and dozens of styles. [Shortcodes](https://gohugo.io/content-management/shortcodes/) Use Hugo’s embedded shortcodes, or create your own, to insert complex content. For example, use shortcodes to include `audio` and `video` elements, render tables from local or remote data sources, insert snippets from other pages, and more. Content management ------------------ [Multidimensional content model](https://gohugo.io/quick-reference/glossary/#sites-matrix) Generate pages across any combination of language, version, and role from a single source. This allows a single piece of content to be published to multiple [sites](https://gohugo.io/quick-reference/glossary/#site) within your project, removing the need to duplicate files for different audiences or versions. [Content adapters](https://gohugo.io/content-management/content-adapters/) Create content adapters to dynamically add content when building your project. For example, use a content adapter to create pages from a remote data source such as JSON, TOML, YAML, or XML. [Taxonomies](https://gohugo.io/content-management/taxonomies/) Classify content to establish simple or complex logical relationships between pages. For example, create an authors taxonomy, and assign one or more authors to each page. Among other uses, the taxonomy system provides an inverted, weighted index to render a list of related pages, ordered by relevance. [Data](https://gohugo.io/content-management/data-sources/) Augment your content using local or remote data sources including CSV, JSON, TOML, YAML, and XML. For example, create a shortcode to render an HTML table from a remote CSV file. [Menus](https://gohugo.io/content-management/menus/) Provide rapid access to content via Hugo’s menu system, configured automatically, globally, or on a page-by-page basis. The menu system is a key component of Hugo’s multilingual architecture. [URL management](https://gohugo.io/content-management/urls/) Serve any page from any path via global configuration or on a page-by-page basis. Asset pipelines --------------- [Image processing](https://gohugo.io/content-management/image-processing/) Convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract metadata. [JavaScript bundling](https://gohugo.io/functions/js/build/) Transpile TypeScript and JSX to JavaScript, bundle, tree shake, minify, create source maps, and perform SRI hashing. [Sass processing](https://gohugo.io/functions/css/sass/) Transpile Sass to CSS, bundle, tree shake, minify, create source maps, perform SRI hashing, and integrate with PostCSS. [Tailwind CSS processing](https://gohugo.io/functions/css/tailwindcss/) Compile Tailwind CSS utility classes into standard CSS, bundle, tree shake, optimize, minify, perform SRI hashing, and integrate with PostCSS. Performance ----------- [Caching](https://gohugo.io/functions/partials/includecached/) Reduce build time and cost by rendering a _partial_ template once then cache the result, either globally or within a given context. For example, cache the result of an asset pipeline to prevent reprocessing on every rendered page. [Segmentation](https://gohugo.io/configuration/segments/) Reduce build time and cost by partitioning your sites into segments. For example, render the home page and the “news section” every hour, and render the entire project once a week. [Minification](https://gohugo.io/configuration/minify/) Minify HTML, CSS, and JavaScript to reduce file size, bandwidth consumption, and loading times. * * * Last updated: February 26, 2026 : [content: More site-to-project changes (05b69f84e)](https://github.com/gohugoio/hugoDocs/commit/05b69f84e25e9cdd10ed1ac7ce5d37d4ac0b3725) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/about/features.md) --- # Menu templates Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/menu/](https://gohugo.io/images/qr/qr_5f57e2a666809bf1.png) Create templates to render one or more menus. Overview -------- After [defining menu entries](https://gohugo.io/content-management/menus/) , use [menu methods](https://gohugo.io/methods/menu/) to render a menu. Three factors determine how to render a menu: 1. The method used to define the menu entries: [automatic](https://gohugo.io/content-management/menus/#define-automatically) , in [front matter](https://gohugo.io/content-management/menus/#define-in-front-matter) , or in your [project configuration](https://gohugo.io/content-management/menus/#define-in-project-configuration) 2. The menu structure: flat or nested 3. The method used to [localize the menu entries](https://gohugo.io/content-management/multilingual/#menus) : project configuration or translation tables The example below handles every combination. Example ------- This _partial_ template recursively “walks” a menu structure, rendering a localized, accessible nested list. layouts/\_partials/menu.html {{- $page := .page }} {{- $menuID := .menuID }} {{- with index site.Menus $menuID }} {{- end }} {{- define "_partials/inline/menu/walk.html" }} {{- $page := .page }} {{- range .menuEntries }} {{- $attrs := dict "href" .URL }} {{- if $page.IsMenuCurrent .Menu . }} {{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }} {{- else if $page.HasMenuCurrent .Menu .}} {{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }} {{- end }} {{- $name := .Name }} {{- with .Identifier }} {{- with T . }} {{- $name = . }} {{- end }} {{- end }}
  • {{ $name }} {{- with .Children }}
      {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
    {{- end }}
  • {{- end }} {{- end }} Call the partial above, passing a menu ID and the current page in context. layouts/page.html {{ partial "menu.html" (dict "menuID" "main" "page" .) }} {{ partial "menu.html" (dict "menuID" "footer" "page" .) }} Page references --------------- Regardless of how you [define menu entries](https://gohugo.io/content-management/menus/) , an entry associated with a page has access to page context. This simplistic example renders a page parameter named `version` next to each entry’s `name`. Code defensively using `with` or `if` to handle entries where (a) the entry points to an external resource, or (b) the `version` parameter is not defined. layouts/page.html {{- range site.Menus.main }} {{ .Name }} {{- with .Page }} {{- with .Params.version -}} ({{ . }}) {{- end }} {{- end }} {{- end }} Menu entry parameters --------------------- When you define menu entries in your [project configuration](https://gohugo.io/content-management/menus/#define-in-project-configuration) or in [front matter](https://gohugo.io/content-management/menus/#define-in-front-matter) , you can include a `params` key as shown in these examples: * [Menu entry defined in your project configuration](https://gohugo.io/configuration/menus/) * [Menu entry defined in front matter](https://gohugo.io/content-management/menus/#example) This simplistic example renders a `class` attribute for each anchor element. Code defensively using `with` or `if` to handle entries where `params.class` is not defined. layouts/\_partials/menu.html {{- range site.Menus.main }} {{ .Name }} {{- end }} Localize -------- Hugo provides two methods to localize your menu entries. See [multilingual](https://gohugo.io/content-management/multilingual/#menus) . * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/menu.md) --- # robots.txt template Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/robots/](https://gohugo.io/images/qr/qr_def445958694f5d.png) Hugo can generate a customized robots.txt in the same way as any other template. To generate a robots.txt file from a template, change your [project configuration](https://gohugo.io/configuration/) : enableRobotsTXT: true enableRobotsTXT = true { "enableRobotsTXT": true } By default, Hugo generates robots.txt using an [embedded template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/robots.txt) . 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//layouts/robots.txt` robots.txt template example --------------------------- layouts/robots.txt User-agent: * {{ range .Pages }} Disallow: {{ .RelPermalink }} {{ end }} 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. To create a robots.txt file without using a template: 1. Set `enableRobotsTXT` to `false` in your project configuration. 2. Create a robots.txt file in the `static` directory. Remember that Hugo copies everything in the static director to the root of `publishDir` (typically `public`) when you build your project. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/robots.md) --- # Categories Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) --- # Alphabetical Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/taxonomy/alphabetical/](https://gohugo.io/images/qr/qr_6a31e48280bc2a96.png) Returns an ordered taxonomy, sorted alphabetically by term. Syntax TAXONOMY.Alphabetical Returns page.OrderedTaxonomy The `Alphabetical` method on a `Taxonomy` object returns an [ordered taxonomy](https://gohugo.io/quick-reference/glossary/#ordered-taxonomy) , sorted alphabetically by [term](https://gohugo.io/quick-reference/glossary/#term) . While a `Taxonomy` object is a [map](https://gohugo.io/quick-reference/glossary/#map) , an ordered taxonomy is a [slice](https://gohugo.io/quick-reference/glossary/#slice) , where each element is an object that contains the term and a slice of its [weighted pages](https://gohugo.io/quick-reference/glossary/#weighted-page) . Before we can use a `Taxonomy` method, we need to capture a `Taxonomy` object. Capture a Taxonomy object ------------------------- Consider this project configuration: taxonomies: author: authors genre: genres [taxonomies] author = 'authors' genre = 'genres' { "taxonomies": { "author": "authors", "genre": "genres" } } And this content structure: content/ ├── books/ │ ├── and-then-there-were-none.md --> genres: suspense │ ├── death-on-the-nile.md --> genres: suspense │ └── jamaica-inn.md --> genres: suspense, romance │ └── pride-and-prejudice.md --> genres: romance └── _index.md To capture the “genres” `Taxonomy` object from within any template, use the [`Taxonomies`](https://gohugo.io/methods/site/taxonomies/) method on a `Site` object. {{ $taxonomyObject := .Site.Taxonomies.genres }} To capture the “genres” `Taxonomy` object when rendering its page with a _taxonomy_ template, use the [`Terms`](https://gohugo.io/methods/page/data/#in-a-taxonomy-template) method on the page’s [`Data`](https://gohugo.io/methods/page/data/) object: layouts/taxonomy.html {{ $taxonomyObject := .Data.Terms }} To inspect the data structure:
    {{ debug.Dump $taxonomyObject }}
    Although the [`Alphabetical`](https://gohugo.io/methods/taxonomy/alphabetical/) and [`ByCount`](https://gohugo.io/methods/taxonomy/bycount/) methods provide a better data structure for ranging through the taxonomy, you can render the weighted pages by term directly from the `Taxonomy` object: {{ range $term, $weightedPages := $taxonomyObject }}

    {{ .Page.LinkTitle }}

    {{ end }} In the example above, the first anchor element is a link to the term page. Get the ordered taxonomy ------------------------ Now that we have captured the “genres” Taxonomy object, let’s get the ordered taxonomy sorted alphabetically by term: {{ $taxonomyObject.Alphabetical }} To reverse the sort order: {{ $taxonomyObject.Alphabetical.Reverse }} To inspect the data structure:
    {{ debug.Dump $taxonomyObject.Alphabetical }}
    An ordered taxonomy is a slice, where each element is an object that contains the term and a slice of its weighted pages. Each element of the slice provides these methods: Count (`int`) Returns the number of pages to which the term is assigned. Page (`page.Page`) Returns the term’s `Page` object, useful for linking to the term page. Pages (`page.Pages`) Returns a `Pages` object containing the `Page` objects to which the term is assigned, sorted by [taxonomic weight](https://gohugo.io/quick-reference/glossary/#taxonomic-weight) . To sort or group, use any of the [methods](https://gohugo.io/methods/pages/) available to the `Pages` object. For example, sort by the last modification date. Term (`string`) Returns the term name. WeightedPages (`page.WeightedPages`) Returns a slice of weighted pages to which the term is assigned, sorted by taxonomic weight. The `Pages` method above is more flexible, allowing you to sort and group. Example ------- With this template: {{ range $taxonomyObject.Alphabetical }}

    {{ .Page.LinkTitle }} ({{ .Count }})

    {{ end }} Hugo renders:

    romance (2)

    suspense (3)

    * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/taxonomy/Alphabetical.md) --- # Partial decorators Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/partial-decorators/](https://gohugo.io/images/qr/qr_37d804249fa35fca.png) Use partial decorators to create reusable wrapper components that enclose and compose template content. [New in v0.154.0](https://github.com/gohugoio/hugo/releases/tag/v0.154.0) Overview -------- A _partial decorator_ is specific type of [_partial_](https://gohugo.io/quick-reference/glossary/#partial) that functions as a [_wrapper component_](https://gohugo.io/quick-reference/glossary/#wrapper-component) . While a standard partial simply renders data within a fixed template, a decorator uses composition to enclose an entire block of content. It utilizes the [`templates.Inner`](https://gohugo.io/functions/templates/inner/) function as a placeholder to define exactly where that external content should be injected within the wrapper’s layout. This approach creates a connection between two files. The calling template provides a block of code and the partial decorator determines where that code appears. This allows the partial to wrap around content without needing to know the specific markup or internal logic of the enclosed block. Implementation -------------- To use a partial decorator, use a block-style call in your templates. The [`with`](https://gohugo.io/functions/go-template/with/) statement is required to initiate the partial and create a container for the content. This block can include any valid template code including page methods and functions. layouts/home.html {{ with partial "components/wrapper.html" . }}

    Everything in this block will be wrapped.

    {{ .Content | transform.Plainify | strings.Truncate 200 }}

    {{ end }} Inside the partial template, place the `templates.Inner` function call where the wrapped content should appear. layouts/\_partials/components/wrapper.html
    {{ templates.Inner . }}
    The `with` statement creates a new [scope](https://gohugo.io/quick-reference/glossary/#scope) . Variables defined outside of the `with` block are not available inside it. To use external data within the wrapped content, you must ensure it is part of the [context](https://gohugo.io/quick-reference/glossary/#context) passed in the partial call. A key feature of the `templates.Inner` function is its ability to accept a context argument. By passing a context to the function, you define what the dot (`.`) represents inside the wrapped block. This ensures that the injected content has access to the correct data even when nested inside multiple layers of wrappers. Benefits of composition ----------------------- Using partial decorators to build wrapper components provides several advantages: * It eliminates the need to use separate partials for opening and closing tags when encapsulating a block of code. * It prevents parameter bloat because a standard partial no longer requires an extensive list of arguments to account for every possible variation of the content inside it. * It enables clean composition where the wrapped block can execute any template logic without the wrapper needing to receive or process that data. This approach separates container logic from content logic. The wrapper handles structural requirements like specific class hierarchies or CSS grid containers. The calling template retains control over the inner markup and how data is displayed. Example ------- The following templates illustrate how to nest three wrapper components including a section, a column, and a card while passing context through each layer. The home template initiates the structure by calling the section, column, and card partials as decorators: layouts/home.html {{ $ctx := dict "page" . "label" "Recent Posts" "pageCollection" ((site.GetPage "/posts").RegularPages) }} {{ with partial "components/section.html" $ctx }}
    {{ range .pageCollection }} {{ with partial "components/column.html" (dict "page" . "class" "col-half") }} {{ with partial "components/card.html" (dict "page" .page "url" .page.RelPermalink "title" .page.LinkTitle) }}

    {{ .page.Content | plainify | strings.Truncate 240 }}

    {{ end }} {{ end }} {{ end }}
    {{ end }} The section component provides a semantic container and an optional heading: layouts/\_partials/components/section.html
    {{ with .label }} {{ end }}
    {{ templates.Inner . }}
    The column component manages layout width by applying a CSS class: layouts/\_partials/components/column.html
    {{ templates.Inner . }}
    The card component defines the visual boundary for the content: layouts/\_partials/components/card.html
    {{ with .title }}

    {{ if $.url }} {{ . }} {{ else }} {{ . }} {{ end }}

    {{ end }}
    {{ templates.Inner . }}
    {{ with .url }} {{ end }}
    * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/partial-decorators.md) --- # Minify Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/hugo-pipes/minification/](https://gohugo.io/images/qr/qr_c0ff34581801cd6f.png) Minify a given resource. See the [`resources.Minify`](https://gohugo.io/functions/resources/minify/) function. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/hugo-pipes/minification.md) --- # Template types Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/types/](https://gohugo.io/images/qr/qr_e028e53278d9df00.png) Create templates of different types to render your content, resources, and data. Structure --------- Create templates in the `layouts` directory in the root of your project. Although your site may not require each of these templates, the example below is typical for a site of medium complexity. layouts/ ├── _markup/ │ ├── render-image.html <-- render hook │ └── render-link.html <-- render hook ├── _partials/ │ ├── footer.html │ └── header.html ├── _shortcodes/ │ ├── audio.html │ └── video.html ├── books/ │ ├── page.html │ └── section.html ├── films/ │ ├── view_card.html <-- content view │ ├── view_li.html <-- content view │ ├── page.html │ └── section.html ├── baseof.html ├── home.html ├── page.html ├── section.html ├── taxonomy.html └── term.html Hugo’s [template lookup order](https://gohugo.io/templates/lookup-order/) determines the template path, allowing you to create unique templates for any page. You must have thorough understanding of the template lookup order when creating templates. Template selection is based on template type, page kind, content type, section, language, and output format. The purpose of each template type is described below. Base ---- A _base_ template serves as a foundational layout that other templates can build upon. It typically defines the common structural components of your HTML, such as the `html`, `head`, and `body` elements. It also often includes recurring features like headers, footers, navigation, and script inclusions that appear across multiple pages of your site. By defining these common aspects once in a _base_ template, you avoid redundancy, ensure consistency, and simplify the maintenance of your website. Hugo can apply a _base_ template to the following template types: [home](https://gohugo.io/templates/types/#home) , [page](https://gohugo.io/templates/types/#page) , [section](https://gohugo.io/templates/types/#section) , [taxonomy](https://gohugo.io/templates/types/#taxonomy) , [term](https://gohugo.io/templates/types/#term) , [single](https://gohugo.io/templates/types/#single) , [list](https://gohugo.io/templates/types/#list) , and [all](https://gohugo.io/templates/types/#all) . When Hugo parses any of these template types, it will apply a _base_ template only if the template being parsed meets these specific conditions: * It must include at least one [`define`](https://gohugo.io/functions/go-template/define/) [action](https://gohugo.io/quick-reference/glossary/#action) . * It can only contain `define` actions, whitespace, and [template comments](https://gohugo.io/templates/introduction/#comments) . No other content is allowed. If a template doesn’t meet all these criteria, Hugo executes it exactly as provided, without applying a _base_ template. When Hugo applies a _base_ template, it replaces its [`block`](https://gohugo.io/functions/go-template/block/) actions with content from the corresponding `define` actions found in the template to which the base template is applied. For example, the _base_ template below calls the [`partial`](https://gohugo.io/functions/partials/include/) function to include `head`, `header`, and `footer` elements. The `block` action acts as a placeholder, and its content will be replaced by a matching `define` action from the template to which it is applied. layouts/baseof.html {{ partial "head.html" . }}
    {{ partial "header.html" . }}
    {{ block "main" . }} This will be replaced with content from the corresponding "define" action found in the template to which this base template is applied. {{ end }}
    {{ partial "footer.html" . }}
    layouts/home.html {{ define "main" }} This will replace the content of the "block" action found in the base template. {{ end }} Home ---- A _home_ template renders your site’s home page. For example, Hugo applies a _base_ template to the _home_ template below, then renders the page content and a list of the site’s regular pages. layouts/home.html {{ define "main" }} {{ .Content }} {{ range .Site.RegularPages }}

    {{ .LinkTitle }}

    {{ end }} {{ end }} The [page collections quick reference guide](https://gohugo.io/quick-reference/page-collections/) describes methods and functions to filter, sort, and group page collections. Page ---- A _page_ template renders a regular page. For example, Hugo applies a _base_ template to the _page_ template below, then renders the page title and page content. layouts/page.html {{ define "main" }}

    {{ .Title }}

    {{ .Content }} {{ end }} Section ------- A _section_ template renders a list of pages within a [section](https://gohugo.io/quick-reference/glossary/#section) . For example, Hugo applies a _base_ template to the _section_ template below, then renders the page title, page content, and a list of pages in the current section. layouts/section.html {{ define "main" }}

    {{ .Title }}

    {{ .Content }} {{ range .Pages }}

    {{ .LinkTitle }}

    {{ end }} {{ end }} The [page collections quick reference guide](https://gohugo.io/quick-reference/page-collections/) describes methods and functions to filter, sort, and group page collections. Taxonomy -------- A _taxonomy_ template renders a list of terms in a [taxonomy](https://gohugo.io/quick-reference/glossary/#taxonomy) . For example, Hugo applies a _base_ template to the _taxonomy_ template below, then renders the page title, page content, and a list of [terms](https://gohugo.io/quick-reference/glossary/#term) in the current taxonomy. layouts/taxonomy.html {{ define "main" }}

    {{ .Title }}

    {{ .Content }} {{ range .Pages }}

    {{ .LinkTitle }}

    {{ end }} {{ end }} The [page collections quick reference guide](https://gohugo.io/quick-reference/page-collections/) describes methods and functions to filter, sort, and group page collections. Within a _taxonomy_ template, the [`Data`](https://gohugo.io/methods/page/data/) object provides these taxonomy-specific methods: * [`Singular`](https://gohugo.io/methods/page/data/#singular) * [`Plural`](https://gohugo.io/methods/page/data/#plural) * [`Terms`](https://gohugo.io/methods/page/data/#terms) The `Terms` method returns a [taxonomy object](https://gohugo.io/quick-reference/glossary/#taxonomy-object) , allowing you to call any of its methods including [`Alphabetical`](https://gohugo.io/methods/taxonomy/alphabetical/) and [`ByCount`](https://gohugo.io/methods/taxonomy/bycount/) . For example, use the `ByCount` method to render a list of terms sorted by the number of pages associated with each term: layouts/taxonomy.html {{ define "main" }}

    {{ .Title }}

    {{ .Content }} {{ range .Data.Terms.ByCount }}

    {{ .Page.LinkTitle }} ({{ .Count }})

    {{ end }} {{ end }} Term ---- A _term_ template renders a list of pages associated with a [term](https://gohugo.io/quick-reference/glossary/#term) . For example, Hugo applies a _base_ template to the _term_ template below, then renders the page title, page content, and a list of pages associated with the current term. layouts/term.html {{ define "main" }}

    {{ .Title }}

    {{ .Content }} {{ range .Pages }}

    {{ .LinkTitle }}

    {{ end }} {{ end }} The [page collections quick reference guide](https://gohugo.io/quick-reference/page-collections/) describes methods and functions to filter, sort, and group page collections. Within a _term_ template, the [`Data`](https://gohugo.io/methods/page/data/) object provides these term-specific methods: * [`Singular`](https://gohugo.io/methods/page/data/#singular-1) * [`Plural`](https://gohugo.io/methods/page/data/#plural-1) * [`Term`](https://gohugo.io/methods/page/data/#term) Single ------ A _single_ template is a fallback for a _page_ template. If a _page_ template does not exist, Hugo will look for a _single_ template instead. For example, Hugo applies a _base_ template to the _single_ template below, then renders the page title and page content. layouts/single.html {{ define "main" }}

    {{ .Title }}

    {{ .Content }} {{ end }} List ---- A _list_ template is a fallback for [home](https://gohugo.io/templates/types/#home) , [section](https://gohugo.io/templates/types/#section) , [taxonomy](https://gohugo.io/templates/types/#taxonomy) , and [term](https://gohugo.io/templates/types/#term) templates. If one of these template types does not exist, Hugo will look for a _list_ template instead. For example, Hugo applies a _base_ template to the _list_ template below, then renders the page title, page content, and a list of pages. layouts/list.html {{ define "main" }}

    {{ .Title }}

    {{ .Content }} {{ range .Pages }}

    {{ .LinkTitle }}

    {{ end }} {{ end }} All --- An _all_ template is a fallback for [home](https://gohugo.io/templates/types/#home) , [page](https://gohugo.io/templates/types/#page) , [section](https://gohugo.io/templates/types/#section) , [taxonomy](https://gohugo.io/templates/types/#taxonomy) , [term](https://gohugo.io/templates/types/#term) , [single](https://gohugo.io/templates/types/#single) , and [list](https://gohugo.io/templates/types/#list) templates. If one of these template types does not exist, Hugo will look for an _all_ template instead. For example, Hugo applies a _base_ template to the _all_ template below, then conditionally renders a page based on its page kind. layouts/all.html {{ define "main" }} {{ if eq .Kind "home" }} {{ .Content }} {{ range .Site.RegularPages }}

    {{ .LinkTitle }}

    {{ end }} {{ else if eq .Kind "page" }}

    {{ .Title }}

    {{ .Content }} {{ else if in (slice "section" "taxonomy" "term") .Kind }}

    {{ .Title }}

    {{ .Content }} {{ range .Pages }}

    {{ .LinkTitle }}

    {{ end }} {{ else }} {{ errorf "Unsupported page kind: %s" .Kind }} {{ end }} {{ end }} Partial ------- A _partial_ template is typically used to render a component of your site, though you may also create _partial_ templates that return values. For example, the _partial_ template below renders copyright information: layouts/\_partials/footer.html

    Copyright {{ now.Year }}. All rights reserved.

    Execute the _partial_ template by calling the [`partial`](https://gohugo.io/functions/partials/include/) or [`partialCached`](https://gohugo.io/functions/partials/includecached/) function, optionally passing context as the second argument: layouts/baseof.html {{ partial "footer.html" . }} Unlike other template types, Hugo does not consider the current page kind, content type, logical path, language, or output format when searching for a matching _partial_ template. However, it _does_ apply the same _name_ matching logic it uses for other template types. This means it tries to find the most specific match first, then progressively looks for more general versions if the specific one isn’t found. For example, with this call: layouts/baseof.html {{ partial "footer.section.de.html" . }} Hugo uses this lookup order to find a matching template: 1. `layouts/_partials/footer.section.de.html` 2. `layouts/_partials/footer.section.html` 3. `layouts/_partials/footer.de.html` 4. `layouts/_partials/footer.html` A _partial_ template can also be defined inline within another template. However, it’s important to note that the template namespace is global; ensuring unique names for these _partial_ templates is necessary to prevent conflicts. Value: {{ partial "my-inline-partial.html" . }} {{ define "_partials/my-inline-partial.html" }} {{ $value := 32 }} {{ return $value }} {{ end }} Content view ------------ A _content view_ template is similar to a _partial_ template, invoked by calling the [`Render`](https://gohugo.io/methods/page/render/) method on a `Page` object. Unlike _partial_ templates, _content view_ templates: * Inherit the context of the current page * Can target any page kind, content type, logical path, language, or output format * Can reside at any level within the `layouts` directory For example, Hugo applies a _base_ template to the _home_ template below, then renders the page content and a card component for each page within the “films” section of your site. layouts/home.html {{ define "main" }} {{ .Content }}
      {{ range where site.RegularPages "Section" "films" }} {{ .Render "view_card" }} {{ end }}
    {{ end }} layouts/films/view\_card.html

    {{ .LinkTitle }}

    {{ .Summary }}
    In the example above, the content view template’s name starts with `view_`. While not strictly required, this naming convention helps distinguish content view templates from other templates within the same directory, improving organization and clarity. Render hook ----------- A _render hook_ template overrides the conversion of Markdown to HTML. For example, the _render hook_ template below adds an anchor link to the right of each heading. layouts/\_markup/render-heading.html {{ .Text }} # Learn more about [render hook templates](https://gohugo.io/render-hooks/) . Shortcode --------- A _shortcode_ template is used to render a component of your site. Unlike _partial_ or _content view_ templates, _shortcode_ templates are called from content pages. For example, the _shortcode_ template below renders an audio element from a [global resource](https://gohugo.io/quick-reference/glossary/#global-resource) . layouts/\_shortcodes/audio.html {{ with resources.Get (.Get "src") }} {{ end }} Then call the shortcode from within markup: content/example.md {{< audio src=/audio/test.mp3 >}} Learn more about [shortcode templates](https://gohugo.io/templates/shortcode/) . Other ----- Use other specialized templates to create: * [Sitemaps](https://gohugo.io/templates/sitemap/) * [RSS feeds](https://gohugo.io/templates/rss/) * [404 error pages](https://gohugo.io/templates/404/) * [robots.txt files](https://gohugo.io/templates/robots/) * * * Last updated: December 19, 2025 : [Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)](https://github.com/gohugoio/hugoDocs/commit/7e1a08e545030efcad0ac52c1cf9469244bc3f2b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/types.md) --- # Introduction to templating Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/introduction/](https://gohugo.io/images/qr/qr_9476c08d103695bf.png) An introduction to Hugo’s templating syntax. We did a complete overhaul of Hugo’s template system in v0.146.0. We’re working on getting all of the relevant documentation up to date, but until then, see [this page](https://gohugo.io/templates/new-templatesystem-overview/) . A _template_ is a file with [_template actions_](https://gohugo.io/quick-reference/glossary/#template-action) , located within the `layouts` directory of a project, theme, or module. Templates use [variables](https://gohugo.io/templates/introduction/#variables) , [functions](https://gohugo.io/functions/) , and [methods](https://gohugo.io/methods/) to transform your content, resources, and data into a published page. Hugo uses Go’s [`text/template`](https://pkg.go.dev/text/template) and [`html/template`](https://pkg.go.dev/html/template) packages. The `text/template` package implements data-driven templates for generating textual output, while the `html/template` package implements data-driven templates for generating HTML output safe against code injection. By default, Hugo uses the `html/template` package when rendering HTML files. For example, this HTML template initializes the `$v1` and `$v2` variables, then displays them and their product within an HTML paragraph. {{ $v1 := 6 }} {{ $v2 := 7 }}

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

    While HTML templates are the most common, you can create templates for any [output format](https://gohugo.io/quick-reference/glossary/#output-format) including CSV, JSON, RSS, and plain text. Context ------- The most important concept to understand before creating a template is _context_, the data passed into each template. The data may be a simple value, or more commonly [objects](https://gohugo.io/quick-reference/glossary/#object) and associated [methods](https://gohugo.io/quick-reference/glossary/#method) . For example, a _page_ template receives a `Page` object, and the `Page` object provides methods to return values or perform actions. ### Current context Within a template, the dot (`.`) represents the current context. layouts/page.html

    {{ .Title }}

    In the example above the dot represents the `Page` object, and we call its [`Title`](https://gohugo.io/methods/page/title/) method to return the title as defined in [front matter](https://gohugo.io/content-management/front-matter/) . The current context may change within a template. For example, at the top of a template the context might be a `Page` object, but we rebind the context to another value or object within [`range`](https://gohugo.io/functions/go-template/range/) or [`with`](https://gohugo.io/functions/go-template/with/) blocks. layouts/page.html

    {{ .Title }}

    {{ range slice "foo" "bar" }}

    {{ . }}

    {{ end }} {{ with "baz" }}

    {{ . }}

    {{ end }} In the example above, the context changes as we `range` through the [slice](https://gohugo.io/quick-reference/glossary/#slice) of values. In the first iteration the context is “foo”, and in the second iteration the context is “bar”. Inside of the `with` block the context is “baz”. Hugo renders the above to:

    My Page Title

    foo

    bar

    baz

    ### Template context Within a `range` or `with` block you can access the context passed into the template by prepending a dollar sign (`$`) to the dot: layouts/page.html {{ with "foo" }}

    {{ $.Title }} - {{ . }}

    {{ end }} Hugo renders this to:

    My Page Title - foo

    Make sure that you thoroughly understand the concept of _context_ before you continue reading. The most common templating errors made by new users relate to context. Actions ------- In the examples above, the paired opening and closing braces represent the beginning and end of a template action, a data evaluation or control structure within a template. A template action may contain literal values ([boolean](https://gohugo.io/quick-reference/glossary/#boolean) , [string](https://gohugo.io/quick-reference/glossary/#string) , [integer](https://gohugo.io/quick-reference/glossary/#integer) , and [float](https://gohugo.io/quick-reference/glossary/#float) ), the [current context](https://gohugo.io/templates/introduction/#current-context) , [variables](https://gohugo.io/templates/introduction/#variables) , [functions](https://gohugo.io/templates/introduction/#functions) , [methods](https://gohugo.io/templates/introduction/#methods) , and the [`nil`](https://gohugo.io/templates/introduction/#nil) keyword. layouts/page.html {{ $convertToLower := true }} {{ if $convertToLower }}

    {{ strings.ToLower .Title }}

    {{ end }} In the example above: * `$convertToLower` is a variable * `true` is a literal boolean value * `if` is the beginning of a control structure * `strings.ToLower` is a function that converts all characters to lowercase * `Title` is a method on a the `Page` object * `end` is the end of a control structure Hugo renders the above to:

    my page title

    ### Whitespace Notice the blank lines and indentation in the previous example? Although irrelevant in production when you typically minify the output, you can remove the adjacent whitespace by using template action delimiters with hyphens: layouts/page.html {{- $convertToLower := true -}} {{- if $convertToLower -}}

    {{ strings.ToLower .Title }}

    {{- end -}} Hugo renders this to:

    my page title

    Whitespace includes spaces, horizontal tabs, carriage returns, and newlines. ### Quote characters Hugo templates use different quote characters to define how text and characters are processed. Use double quotes for [interpreted string literals](https://gohugo.io/quick-reference/glossary/#interpreted-string-literal) . These interpret backslashes as special instructions: {{ print "Hello world\u0021" }} → Hello world! Use backticks for [raw string literals](https://gohugo.io/quick-reference/glossary/#raw-string-literal) . These ignore backslashes and treat every character literally: {{ print `Hello world\u0021` }} → Hello world\u0021 Use single quotes for [rune literals](https://gohugo.io/quick-reference/glossary/#rune-literal) . Unlike strings, these represent a single character as its numerical Unicode value: {{ print '!' }} → 33 In practical terms, you will rarely, if ever, use rune literals in your template code. They are most commonly used in low-level programming; in a Hugo template, you will almost always want a string instead. ### Pipes Within a template action you may [pipe](https://gohugo.io/quick-reference/glossary/#pipe) a value to a function or method. The piped value becomes the final argument to the function or method. For example, these are equivalent: {{ strings.ToLower "Hugo" }} → hugo {{ "Hugo" | strings.ToLower }} → hugo You can pipe the result of one function or method into another. For example, these are equivalent: {{ strings.TrimSuffix "o" (strings.ToLower "Hugo") }} → hug {{ "Hugo" | strings.ToLower | strings.TrimSuffix "o" }} → hug These are also equivalent: {{ mul 6 (add 2 5) }} → 42 {{ 5 | add 2 | mul 6 }} → 42 Remember that the piped value becomes the final argument to the function or method to which you are piping. ### Line splitting You can split a template action over two or more lines. For example, these are equivalent: {{ $v := or $arg1 $arg2 }} {{ $v := or $arg1 $arg2 }} You can also split [raw string literals](https://gohugo.io/quick-reference/glossary/#raw-string-literal) over two or more lines. For example, these are equivalent: {{ $msg := "This is line one.\nThis is line two." }} {{ $msg := `This is line one. This is line two.` }} ### Nil Other than using the `nil` keyword in comparisons, you may not use it as an argument to any function or method, nor may you assign it to a variable. For example, these are valid uses of the `nil` keyword: {{ if gt 42 nil }}

    42 is greater than nil

    {{ end }} {{ $pages := where .Site.RegularPages "Params.color" "ne" nil }} These, on the other hand, are invalid: {{ $a := nil }} {{ add 3 nil }} {{ nil | print}} The actions above throw an error. Variables --------- A variable is a user-defined [identifier](https://gohugo.io/quick-reference/glossary/#identifier) prepended with a dollar sign (`$`), representing a value of any data type, initialized or assigned within a template action. For example, `$foo` and `$bar` are variables. Variables may contain [scalars](https://gohugo.io/quick-reference/glossary/#scalar) , [slices](https://gohugo.io/quick-reference/glossary/#slice) , [maps](https://gohugo.io/quick-reference/glossary/#map) , or [objects](https://gohugo.io/quick-reference/glossary/#object) . Use `:=` to initialize a variable, and use `=` to assign a value to a variable that has been previously initialized. For example: {{ $total := 3 }} {{ range slice 7 11 21 }} {{ $total = add $total . }} {{ end }} {{ $total }} → 42 Variables initialized inside of an `if`, `range`, or `with` block are scoped to the block. Variables initialized outside of these blocks are scoped to the template. With variables that represent a slice or map, use the [`index`](https://gohugo.io/functions/collections/indexfunction/) function to return the desired value. {{ $slice := slice "foo" "bar" "baz" }} {{ index $slice 2 }} → baz {{ $map := dict "a" "foo" "b" "bar" "c" "baz" }} {{ index $map "c" }} → baz Slices and arrays are zero-based; element 0 is the first element. With variables that represent a map or object, [chain](https://gohugo.io/quick-reference/glossary/#chain) identifiers to return the desired value or to access the desired method. {{ $map := dict "a" "foo" "b" "bar" "c" "baz" }} {{ $map.c }} → baz {{ $homePage := .Site.Home }} {{ $homePage.Title }} → My Homepage As seen above, object and method names are capitalized. Although not required, to avoid confusion we recommend beginning variable and map key names with a lowercase letter or underscore. Functions --------- Used within a template action, a function takes one or more arguments and returns a value. Unlike methods, functions are not associated with an object. Go’s `text/template` and `html/template` packages provide a small set of functions, operators, and statements for general use. See the [go-templates](https://gohugo.io/functions/go-template/) section of the function documentation for details. Hugo provides hundreds of custom [functions](https://gohugo.io/functions/) categorized by namespace. For example, the `strings` namespace includes these and other functions: | Function | Alias | | --- | --- | | [`strings.ToLower`](https://gohugo.io/functions/strings/tolower/) | `lower` | | [`strings.ToUpper`](https://gohugo.io/functions/strings/toupper/) | `upper` | | [`strings.Replace`](https://gohugo.io/functions/strings/replace/) | `replace` | As shown above, frequently used functions have an alias. Use aliases in your templates to reduce code length. When calling a function, separate the arguments from the function, and from each other, with a space. For example: {{ $total := add 1 2 3 4 }} Methods ------- Used within a template action and associated with an object, a method takes zero or more arguments and either returns a value or performs an action. The most commonly accessed objects are the [`Page`](https://gohugo.io/methods/page/) and [`Site`](https://gohugo.io/methods/site/) objects. This is a small sampling of the [methods](https://gohugo.io/methods/) available to each object. | Object | Method | Description | | --- | --- | --- | | `Page` | [`Date`](https://gohugo.io/methods/page/date/) | Returns the date of the given page. | | `Page` | [`Params`](https://gohugo.io/methods/page/params/) | Returns a map of custom parameters as defined in the front matter of the given page. | | `Page` | [`Title`](https://gohugo.io/methods/page/title/) | Returns the title of the given page. | | `Site` | [`Data`](https://gohugo.io/methods/site/data/) | Returns a data structure composed from the files in the `data` directory. | | `Site` | [`Params`](https://gohugo.io/methods/site/params/) | Returns a map of custom parameters as defined in your project configuration. | | `Site` | [`Title`](https://gohugo.io/methods/site/title/) | Returns the title as defined in the your project configuration. | Chain the method to its object with a dot (`.`) as shown below, remembering that the leading dot represents the [current context](https://gohugo.io/templates/introduction/#current-context) . layouts/page.html {{ .Site.Title }} → My Site Title {{ .Page.Title }} → My Page Title The context passed into most templates is a `Page` object, so this is equivalent to the previous example: layouts/page.html {{ .Site.Title }} → My Site Title {{ .Title }} → My Page Title Some methods take an argument. Separate the argument from the method with a space. For example: layouts/page.html {{ $page := .Page.GetPage "/books/les-miserables" }} {{ $page.Title }} → Les Misérables Comments -------- Do not attempt to use HTML comment delimiters to comment out template code. Hugo strips HTML comments when rendering a page, but first evaluates any template code within the HTML comment delimiters. Depending on the template code within the HTML comment delimiters, this could cause unexpected results or fail the build. Template comments are similar to template actions. Paired opening and closing braces represent the beginning and end of a comment. For example: {{/* This is an inline comment. */}} {{- /* This is an inline comment with adjacent whitespace removed. */ -}} Code within a comment is not parsed, executed, or displayed. Comments may be inline, as shown above, or in block form: {{/* This is a block comment. */}} {{- /* This is a block comment with adjacent whitespace removed. */ -}} You may not nest one comment inside of another. To render an HTML comment, pass a string through the [`safeHTML`](https://gohugo.io/functions/safe/html/) template function. For example: {{ "" | safeHTML }} {{ printf "" .Site.Title | safeHTML }} Include ------- Use the [`template`](https://gohugo.io/functions/go-template/template/) function to include one or more of Hugo’s [embedded templates](https://gohugo.io/templates/embedded/) : {{ partial "google_analytics.html" . }} {{ partial "opengraph" . }} {{ partial "pagination.html" . }} {{ partial "schema.html" . }} {{ partial "twitter_cards.html" . }} Use the [`partial`](https://gohugo.io/functions/partials/include/) or [`partialCached`](https://gohugo.io/functions/partials/includecached/) function to include one or more [partial templates](https://gohugo.io/templates/types/#partial) : {{ partial "breadcrumbs.html" . }} {{ partialCached "css.html" . }} Create your _partial_ templates in the `layouts/_partials` directory. In the examples above, note that we are passing the current context (the dot) to each of the templates. Examples -------- This limited set of contrived examples demonstrates some of concepts described above. Please see the [functions](https://gohugo.io/functions/) , [methods](https://gohugo.io/methods/) , and [templates](https://gohugo.io/templates/) documentation for specific examples. ### Conditional blocks See documentation for [`if`](https://gohugo.io/functions/go-template/if/) , [`else`](https://gohugo.io/functions/go-template/else/) , and [`end`](https://gohugo.io/functions/go-template/end/) . {{ $var := 42 }} {{ if eq $var 6 }} {{ print "var is 6" }} {{ else if eq $var 7 }} {{ print "var is 7" }} {{ else if eq $var 42 }} {{ print "var is 42" }} {{ else }} {{ print "var is something else" }} {{ end }} ### Logical operators See documentation for [`and`](https://gohugo.io/functions/go-template/and/) and [`or`](https://gohugo.io/functions/go-template/or/) . {{ $v1 := true }} {{ $v2 := false }} {{ $v3 := false }} {{ $result := false }} {{ if and $v1 $v2 $v3 }} {{ $result = true }} {{ end }} {{ $result }} → false {{ if or $v1 $v2 $v3 }} {{ $result = true }} {{ end }} {{ $result }} → true ### Loops See documentation for [`range`](https://gohugo.io/functions/go-template/range/) , [`else`](https://gohugo.io/functions/go-template/else/) , and [`end`](https://gohugo.io/functions/go-template/end/) . {{ $s := slice "foo" "bar" "baz" }} {{ range $s }}

    {{ . }}

    {{ else }}

    The collection is empty

    {{ end }} To loop a specified number of times: {{ $s := slice }} {{ range 3 }} {{ $s = $s | append . }} {{ end }} {{ $s }} → [0 1 2] ### Rebind context See documentation for [`with`](https://gohugo.io/functions/go-template/with/) , [`else`](https://gohugo.io/functions/go-template/else/) , and [`end`](https://gohugo.io/functions/go-template/end/) . {{ $var := "foo" }} {{ with $var }} {{ . }} → foo {{ else }} {{ print "var is falsy" }} {{ end }} To test multiple conditions: {{ $v1 := 0 }} {{ $v2 := 42 }} {{ with $v1 }} {{ . }} {{ else with $v2 }} {{ . }} → 42 {{ else }} {{ print "v1 and v2 are falsy" }} {{ end }} ### Access site parameters See documentation for the [`Params`](https://gohugo.io/methods/site/params/) method on a `Site` object. With this project configuration: baseURL: https://example.org params: author: email: jsmith@example.org name: John Smith copyright-year: '2023' layouts: rfc_1123: Mon, 02 Jan 2006 15:04:05 MST rfc_3339: '2006-01-02T15:04:05-07:00' subtitle: The Best Widgets on Earth title: ABC Widgets baseURL = 'https://example.org' title = 'ABC Widgets' [params] copyright-year = '2023' subtitle = 'The Best Widgets on Earth' [params.author] email = 'jsmith@example.org' name = 'John Smith' [params.layouts] rfc_1123 = 'Mon, 02 Jan 2006 15:04:05 MST' rfc_3339 = '2006-01-02T15:04:05-07:00' { "baseURL": "https://example.org", "params": { "author": { "email": "jsmith@example.org", "name": "John Smith" }, "copyright-year": "2023", "layouts": { "rfc_1123": "Mon, 02 Jan 2006 15:04:05 MST", "rfc_3339": "2006-01-02T15:04:05-07:00" }, "subtitle": "The Best Widgets on Earth" }, "title": "ABC Widgets" } Access the custom site parameters by chaining the identifiers: {{ .Site.Params.subtitle }} → The Best Widgets on Earth {{ .Site.Params.author.name }} → John Smith {{ $layout := .Site.Params.layouts.rfc_1123 }} {{ .Site.Lastmod.Format $layout }} → Tue, 17 Oct 2023 13:21:02 PDT ### Access page parameters See documentation for the [`Params`](https://gohugo.io/methods/page/params/) method on a `Page` object. By way of example, consider this front matter: --- date: 2023-10-17T15:11:37-07:00 params: author: email: jsmith@example.org name: John Smith display_related: true key-with-hyphens: must use index function title: Annual conference --- +++ date = 2023-10-17T15:11:37-07:00 title = 'Annual conference' [params] display_related = true key-with-hyphens = 'must use index function' [params.author] email = 'jsmith@example.org' name = 'John Smith' +++ { "date": "2023-10-17T15:11:37-07:00", "params": { "author": { "email": "jsmith@example.org", "name": "John Smith" }, "display_related": true, "key-with-hyphens": "must use index function" }, "title": "Annual conference" } The `title` and `date` fields are standard [front matter fields](https://gohugo.io/content-management/front-matter/#fields) , while the other fields are user-defined. Access the custom fields by [chaining](https://gohugo.io/quick-reference/glossary/#chain) the [identifiers](https://gohugo.io/quick-reference/glossary/#identifier) when needed: {{ .Params.display_related }} → true {{ .Params.author.email }} → jsmith@example.org {{ .Params.author.name }} → John Smith In the template example above, each of the keys is a valid identifier. For example, none of the keys contains a hyphen. To access a key that is not a valid identifier, use the [`index`](https://gohugo.io/functions/collections/indexfunction/) function: {{ index .Params "key-with-hyphens" }} → must use index function * * * Last updated: February 27, 2026 : [content: Miscellaneous udpates for v0.157.0 (35da1aa3c)](https://github.com/gohugoio/hugoDocs/commit/35da1aa3c2fe3b54bdb57df1a308533844af9df5) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/introduction.md) --- # Cast functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/cast/](https://gohugo.io/images/qr/qr_a3cd866170cf42dd.png) [### cast.ToFloat\ \ cast.ToFloat INPUT\ \ Converts a value to a decimal floating-point number (base 10).](https://gohugo.io/functions/cast/tofloat/) [### cast.ToInt\ \ cast.ToInt INPUT\ \ Converts a value to a decimal integer (base 10).](https://gohugo.io/functions/cast/toint/) [### cast.ToString\ \ cast.ToString INPUT\ \ Converts a value to a string.](https://gohugo.io/functions/cast/tostring/) --- # ByName Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/menu/byname/](https://gohugo.io/images/qr/qr_c28294690fd5d3e5.png) Returns the given menu with its entries sorted by name. Syntax MENU.ByName Returns navigation.Menu The `Sort` method returns the given menu with its entries sorted by `name`. Consider this menu definition: menus: main: - name: Services pageRef: /services weight: 10 - name: About pageRef: /about weight: 20 - name: Contact pageRef: /contact weight: 30 [menus] [[menus.main]] name = 'Services' pageRef = '/services' weight = 10 [[menus.main]] name = 'About' pageRef = '/about' weight = 20 [[menus.main]] name = 'Contact' pageRef = '/contact' weight = 30 { "menus": { "main": [\ {\ "name": "Services",\ "pageRef": "/services",\ "weight": 10\ },\ {\ "name": "About",\ "pageRef": "/about",\ "weight": 20\ },\ {\ "name": "Contact",\ "pageRef": "/contact",\ "weight": 30\ }\ ] } } To sort the entries by `name`:
      {{ range .Site.Menus.main.ByName }}
    • {{ .Name }}
    • {{ end }}
    Hugo renders this to: You can also sort menu entries using the [`sort`](https://gohugo.io/functions/collections/sort/) function. For example, to sort by `name` in descending order:
      {{ range sort .Site.Menus.main "Name" "desc" }}
    • {{ .Name }}
    • {{ end }}
    When using the sort function with menu entries, specify any of the following keys: `Identifier`, `Name`, `Parent`, `Post`, `Pre`, `Title`, `URL`, or `Weight`. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/menu/ByName.md) --- # cast.ToInt Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/cast/toint/](https://gohugo.io/images/qr/qr_ce634a94308880db.png) Converts a value to a decimal integer (base 10). Syntax cast.ToInt INPUT Returns int Alias int With a decimal (base 10) input: {{ int 11 }} → 11 (int) {{ int "11" }} → 11 (int) {{ int 11.1 }} → 11 (int) {{ int 11.9 }} → 11 (int) With a binary (base 2) input: {{ int 0b11 }} → 3 (int) {{ int "0b11" }} → 3 (int) With an octal (base 8) input (use either notation): {{ int 011 }} → 9 (int) {{ int "011" }} → 9 (int) {{ int 0o11 }} → 9 (int) {{ int "0o11" }} → 9 (int) With a hexadecimal (base 16) input: {{ int 0x11 }} → 17 (int) {{ int "0x11" }} → 17 (int) Values with a leading zero are octal (base 8). When casting a string representation of a decimal (base 10) number, remove leading zeros: `{{ strings.TrimLeft "0" "0011" | int }} → 11` * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/cast/ToInt.md) --- # cast.ToFloat Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/cast/tofloat/](https://gohugo.io/images/qr/qr_a04c14465449e045.png) Converts a value to a decimal floating-point number (base 10). Syntax cast.ToFloat INPUT Returns float64 Alias float With a decimal (base 10) input: {{ float 11 }} → 11 (float64) {{ float "11" }} → 11 (float64) {{ float 11.1 }} → 11.1 (float64) {{ float "11.1" }} → 11.1 (float64) {{ float 11.9 }} → 11.9 (float64) {{ float "11.9" }} → 11.9 (float64) With a binary (base 2) input: {{ float 0b11 }} → 3 (float64) With an octal (base 8) input (use either notation): {{ float 011 }} → 9 (float64) {{ float "011" }} → 11 (float64) {{ float 0o11 }} → 9 (float64) With a hexadecimal (base 16) input: {{ float 0x11 }} → 17 (float64) * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/cast/ToFloat.md) --- # cast.ToString Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/cast/tostring/](https://gohugo.io/images/qr/qr_b239e0566d0558f.png) Converts a value to a string. Syntax cast.ToString INPUT Returns string Alias string With a decimal (base 10) input: {{ string 11 }} → 11 (string) {{ string "11" }} → 11 (string) {{ string 11.1 }} → 11.1 (string) {{ string "11.1" }} → 11.1 (string) {{ string 11.9 }} → 11.9 (string) {{ string "11.9" }} → 11.9 (string) With a binary (base 2) input: {{ string 0b11 }} → 3 (string) {{ string "0b11" }} → 0b11 (string) With an octal (base 8) input (use either notation): {{ string 011 }} → 9 (string) {{ string "011" }} → 011 (string) {{ string 0o11 }} → 9 (string) {{ string "0o11" }} → 0o11 (string) With a hexadecimal (base 16) input: {{ string 0x11 }} → 17 (string) {{ string "0x11" }} → 0x11 (string) * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/cast/ToString.md) --- # Blockquote render hooks Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/render-hooks/blockquotes/](https://gohugo.io/images/qr/qr_408c3909b7e146b8.png) Create blockquote render hook templates to override the rendering of Markdown blockquotes to HTML. [New in v0.132.0](https://github.com/gohugoio/hugo/releases/tag/v0.132.0) Context ------- Blockquote _render hook_ templates receive the following [context](https://gohugo.io/quick-reference/glossary/#context) : AlertType (`string`) Applicable when [`Type`](https://gohugo.io/render-hooks/blockquotes/#type) is `alert`, this is the alert type converted to lowercase. See the [alerts](https://gohugo.io/render-hooks/blockquotes/#alerts) section below. AlertTitle [New in v0.134.0](https://github.com/gohugoio/hugo/releases/tag/v0.134.0) (`template.HTML`) Applicable when [`Type`](https://gohugo.io/render-hooks/blockquotes/#type) is `alert`, this is the alert title. See the [alerts](https://gohugo.io/render-hooks/blockquotes/#alerts) section below. AlertSign [New in v0.134.0](https://github.com/gohugoio/hugo/releases/tag/v0.134.0) (`string`) Applicable when [`Type`](https://gohugo.io/render-hooks/blockquotes/#type) is `alert`, this is the alert sign. Typically used to indicate whether an alert is graphically foldable, this is one of `+`, `-`, or an empty string. See the [alerts](https://gohugo.io/render-hooks/blockquotes/#alerts) section below. Attributes (`map`) The [Markdown attributes](https://gohugo.io/content-management/markdown-attributes/) , available if you configure your site as follows: markup: goldmark: parser: attribute: block: true [markup] [markup.goldmark] [markup.goldmark.parser] [markup.goldmark.parser.attribute] block = true { "markup": { "goldmark": { "parser": { "attribute": { "block": true } } } } } Ordinal (`int`) The zero-based ordinal of the blockquote on the page. Page (`page`) A reference to the current page. PageInner (`page`) A reference to a page nested via the [`RenderShortcodes`](https://gohugo.io/methods/page/rendershortcodes/) method. [See details](https://gohugo.io/render-hooks/blockquotes/#pageinner-details) . Position (`string`) The position of the blockquote within the page content. Text (`template.HTML`) The blockquote text, excluding the first line if [`Type`](https://gohugo.io/render-hooks/blockquotes/#type) is `alert`. See the [alerts](https://gohugo.io/render-hooks/blockquotes/#alerts) section below. Type (`string`) The blockquote type. Returns `alert` if the blockquote has an alert designator, else `regular`. See the [alerts](https://gohugo.io/render-hooks/blockquotes/#alerts) section below. Examples -------- In its default configuration, Hugo renders Markdown blockquotes according to the [CommonMark specification](https://spec.commonmark.org/current/) . To create a render hook that does the same thing: layouts/\_markup/render-blockquote.html
    {{ .Text }}
    To render a blockquote as an HTML `figure` element with an optional citation and caption: layouts/\_markup/render-blockquote.html
    {{ .Text }}
    {{ with .Attributes.caption }}
    {{ . | safeHTML }}
    {{ end }}
    Then in your markdown: > Some text {cite="https://gohugo.io" caption="Some caption"} Alerts ------ Also known as _callouts_ or _admonitions_, alerts are blockquotes used to emphasize critical information. ### Basic syntax With the basic Markdown syntax, the first line of each alert is an alert designator consisting of an exclamation point followed by the alert type, wrapped within brackets. For example: content/example.md > [!NOTE] > Useful information that users should know, even when skimming content. > [!TIP] > Helpful advice for doing things better or more easily. > [!IMPORTANT] > Key information users need to know to achieve their goal. > [!WARNING] > Urgent info that needs immediate user attention to avoid problems. > [!CAUTION] > Advises about risks or negative outcomes of certain actions. The basic syntax is compatible with [GitHub](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts) , [Obsidian](https://help.obsidian.md/Editing+and+formatting/Callouts) , and [Typora](https://support.typora.io/Markdown-Reference/#callouts--github-style-alerts) . ### Extended syntax With the extended Markdown syntax, you may optionally include an alert sign and/or an alert title. The alert sign is one of `+` or `-`, typically used to indicate whether an alert is graphically foldable. For example: content/example.md > [!WARNING]+ Radiation hazard > Do not approach or handle without protective gear. The extended syntax is compatible with [Obsidian](https://help.obsidian.md/Editing+and+formatting/Callouts) . The extended syntax is not compatible with GitHub or Typora. If you include an alert sign or an alert title, these applications render the Markdown as a blockquote. ### Example This blockquote render hook renders a multilingual alert if an alert designator is present, otherwise it renders a blockquote according to the CommonMark specification. layouts/\_markup/render-blockquote.html {{ $emojis := dict "caution" ":exclamation:" "important" ":information_source:" "note" ":information_source:" "tip" ":bulb:" "warning" ":information_source:" }} {{ if eq .Type "alert" }}

    {{ transform.Emojify (index $emojis .AlertType) }} {{ with .AlertTitle }} {{ . }} {{ else }} {{ or (i18n .AlertType) (title .AlertType) }} {{ end }}

    {{ .Text }}
    {{ else }}
    {{ .Text }}
    {{ end }} To override the label, create these entries in your i18n files: caution: Caution important: Important note: Note tip: Tip warning: Warning caution = 'Caution' important = 'Important' note = 'Note' tip = 'Tip' warning = 'Warning' { "caution": "Caution", "important": "Important", "note": "Note", "tip": "Tip", "warning": "Warning" } Although you can use one template with conditional logic as shown above, you can also create separate templates for each [`Type`](https://gohugo.io/render-hooks/blockquotes/#type) of blockquote: layouts/ └── _markup/ ├── render-blockquote-alert.html └── render-blockquote-regular.html PageInner details ----------------- The primary use case for `PageInner` is to resolve links and [page resources](https://gohugo.io/quick-reference/glossary/#page-resource) relative to an included `Page`. For example, create an “include” shortcode to compose a page from multiple content files, while preserving a global context for footnotes and the table of contents: layouts/\_shortcodes/include.html {{ with .Get 0 }} {{ with $.Page.GetPage . }} {{- .RenderShortcodes }} {{ else }} {{ errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position }} {{ end }} {{ else }} {{ errorf "The %q shortcode requires a positional parameter indicating the logical path of the file to include. See %s" .Name .Position }} {{ end }} Then call the shortcode in your Markdown: content/posts/post-1.md {{% include "/posts/post-2" %}} Any render hook triggered while rendering `/posts/post-2` will get: * `/posts/post-1` when calling `Page` * `/posts/post-2` when calling `PageInner` `PageInner` falls back to the value of `Page` if not relevant, and always returns a value. The `PageInner` method is only relevant for shortcodes that invoke the [`RenderShortcodes`](https://gohugo.io/methods/page/rendershortcodes/) method, and you must call the shortcode using [Markdown notation](https://gohugo.io/content-management/shortcodes/#notation) . As a practical example, Hugo’s embedded link and image render hooks use the `PageInner` method to resolve markdown link and image destinations. See the source code for each: * [Embedded link render hook](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_markup/render-link.html) * [Embedded image render hook](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_markup/render-image.html) * * * Last updated: August 23, 2025 : [Merge commit 'bfa74537929f409fca841540b971125b7678963a' (6c911d1e5)](https://github.com/gohugoio/hugoDocs/commit/6c911d1e52fb9c8065c079820327f4b0e37529d4) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/render-hooks/blockquotes.md) --- # Embedded partial templates Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/embedded/](https://gohugo.io/images/qr/qr_fd615f4a363c6314.png) Hugo provides embedded partial templates for common use cases. We did a complete overhaul of Hugo’s template system in v0.146.0. We’re working on getting all of the relevant documentation up to date, but until then, see [this page](https://gohugo.io/templates/new-templatesystem-overview/) . Disqus ------ To override Hugo’s embedded Disqus template, copy the [source code](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/disqus.html) to a file with the same name in the `layouts/_partials` directory, then call it from your templates using the [`partial`](https://gohugo.io/functions/partials/include/) function: `{{ partial "disqus.html" . }}` Hugo includes an embedded template for [Disqus](https://disqus.com/) , a popular commenting system for both static and dynamic websites. To effectively use Disqus, secure a Disqus “shortname” by [signing up](https://disqus.com/profile/signup/) for the free service. To include the embedded template: {{ partial "disqus.html" . }} ### Configuration To use Hugo’s Disqus template, first set up a single configuration value: services: disqus: shortname: your-disqus-shortname [services] [services.disqus] shortname = 'your-disqus-shortname' { "services": { "disqus": { "shortname": "your-disqus-shortname" } } } Hugo’s Disqus template accesses this value with: {{ .Site.Config.Services.Disqus.Shortname }} You can also set the following in the front matter for a given piece of content: * `disqus_identifier` * `disqus_title` * `disqus_url` ### Privacy Adjust the relevant privacy settings in your project configuration. privacy: disqus: disable: false [privacy] [privacy.disqus] disable = false { "privacy": { "disqus": { "disable": false } } } disable (`bool`) Whether to disable the template. Default is `false`. Google Analytics ---------------- To override Hugo’s embedded Google Analytics template, copy the [source code](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/google_analytics.html) to a file with the same name in the `layouts/_partials` directory, then call it from your templates using the [`partial`](https://gohugo.io/functions/partials/include/) function: `{{ partial "google_analytics.html" . }}` Hugo includes an embedded template supporting [Google Analytics 4](https://support.google.com/analytics/answer/10089681) . To include the embedded template: {{ partial "google_analytics.html" . }} ### Configuration Provide your tracking ID in your configuration file: services: googleAnalytics: id: G-MEASUREMENT_ID [services] [services.googleAnalytics] id = 'G-MEASUREMENT_ID' { "services": { "googleAnalytics": { "id": "G-MEASUREMENT_ID" } } } To use this value in your own template, access the configured ID with `{{ site.Config.Services.GoogleAnalytics.ID }}`. ### Privacy Adjust the relevant privacy settings in your project configuration. privacy: googleAnalytics: disable: false respectDoNotTrack: true [privacy] [privacy.googleAnalytics] disable = false respectDoNotTrack = true { "privacy": { "googleAnalytics": { "disable": false, "respectDoNotTrack": true } } } disable (`bool`) Whether to disable the template. Default is `false`. respectDoNotTrack (`bool`) Whether to respect the browser’s “do not track” setting. Default is `true`. Open Graph ---------- To override Hugo’s embedded Open Graph template, copy the [source code](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/opengraph.html) to a file with the same name in the `layouts/_partials` directory, then call it from your templates using the [`partial`](https://gohugo.io/functions/partials/include/) function: `{{ partial "opengraph.html" . }}` Hugo includes an embedded 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. To include the embedded template: {{ partial "opengraph.html" . }} ### Configuration Hugo’s Open Graph template is configured using a mix of configuration settings and [front matter](https://gohugo.io/content-management/front-matter/) on individual pages. params: description: Text about my cool site images: - site-feature-image.jpg social: facebook_admin: jsmith title: My cool site taxonomies: series: series [params] description = 'Text about my cool site' images = ['site-feature-image.jpg'] title = 'My cool site' [params.social] facebook_admin = 'jsmith' [taxonomies] series = 'series' { "params": { "description": "Text about my cool site", "images": [\ "site-feature-image.jpg"\ ], "social": { "facebook_admin": "jsmith" }, "title": "My cool site" }, "taxonomies": { "series": "series" } } --- audio: [] date: 2024-03-08T08:18:11-08:00 description: Text about this post images: - post-cover.png series: [] tags: [] title: Post title videos: [] --- +++ audio = [] date = 2024-03-08T08:18:11-08:00 description = 'Text about this post' images = ['post-cover.png'] series = [] tags = [] title = 'Post title' videos = [] +++ { "audio": [], "date": "2024-03-08T08:18:11-08:00", "description": "Text about this post", "images": [\ "post-cover.png"\ ], "series": [], "tags": [], "title": "Post title", "videos": [] } 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](https://gohugo.io/content-management/page-bundles/) are used and the `images` array is empty or undefined, images with file names matching `*feature*`, `*cover*`, or `*thumbnail*` are used for image metadata. 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 ``. Use the `https://youtu.be/` format with YouTube videos (example: `https://youtu.be/qtIqKaDlqXo`). Pagination ---------- See [details](https://gohugo.io/templates/pagination/) . Schema ------ To override Hugo’s embedded Schema template, copy the [source code](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/schema.html) to a file with the same name in the `layouts/_partials` directory, then call it from your templates using the [`partial`](https://gohugo.io/functions/partials/include/) function: `{{ partial "schema.html" . }}` Hugo includes an embedded template to render [microdata](https://html.spec.whatwg.org/multipage/microdata.html#microdata) `meta` elements within the `head` element of your templates. To include the embedded template: {{ partial "schema.html" . }} X (Twitter) Cards ----------------- To override Hugo’s embedded Twitter Cards template, copy the [source code](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/twitter_cards.html) to a file with the same name in the `layouts/_partials` directory, then call it from your templates using the [`partial`](https://gohugo.io/functions/partials/include/) function: `{{ partial "twitter_cards.html" . }}` Hugo includes an embedded template for [X (Twitter) Cards](https://developer.x.com/en/docs/twitter-for-websites/cards/overview/abouts-cards) , metadata used to attach rich media to Tweets linking to your site. To include the embedded template: {{ partial "twitter_cards.html" . }} ### Configuration Hugo’s X (Twitter) Card template is configured using a mix of configuration settings and [front-matter](https://gohugo.io/content-management/front-matter/) values on individual pages. params: description: Text about my cool site images: - site-feature-image.jpg [params] description = 'Text about my cool site' images = ['site-feature-image.jpg'] { "params": { "description": "Text about my cool site", "images": [\ "site-feature-image.jpg"\ ] } } --- description: Text about this post images: - post-cover.png title: Post title --- +++ description = 'Text about this post' images = ['post-cover.png'] title = 'Post title' +++ { "description": "Text about this post", "images": [\ "post-cover.png"\ ], "title": "Post title" } If [page bundles](https://gohugo.io/content-management/page-bundles/) are used and the `images` array is empty or undefined, images with file names matching `*feature*`, `*cover*`, or `*thumbnail*` are used for image metadata. If no image resources with those names are found, the images defined in your [project configuration](https://gohugo.io/configuration/) are used instead. If no images are found at all, then an image-less Twitter `summary` card is used instead of `summary_large_image`. Hugo uses the page title and description for the card’s title and description fields. The page summary is used if no description is given. Set the value of `twitter:site` in your project configuration: params: social: twitter: GoHugoIO [params] [params.social] twitter = 'GoHugoIO' { "params": { "social": { "twitter": "GoHugoIO" } } } NOTE: The `@` will be added for you * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/embedded.md) --- # ByCount Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/taxonomy/bycount/](https://gohugo.io/images/qr/qr_6fa46951f224aba3.png) Returns an ordered taxonomy, sorted by the number of pages associated with each term. Syntax TAXONOMY.ByCount Returns page.OrderedTaxonomy The `ByCount` method on a `Taxonomy` object returns an [ordered taxonomy](https://gohugo.io/quick-reference/glossary/#ordered-taxonomy) , sorted by the number of pages associated with each [term](https://gohugo.io/quick-reference/glossary/#term) , then sorted alphabetically by term in the event of a tie. While a `Taxonomy` object is a [map](https://gohugo.io/quick-reference/glossary/#map) , an ordered taxonomy is a [slice](https://gohugo.io/quick-reference/glossary/#slice) , where each element is an object that contains the term and a slice of its [weighted pages](https://gohugo.io/quick-reference/glossary/#weighted-page) . Before we can use a `Taxonomy` method, we need to capture a `Taxonomy` object. Capture a Taxonomy object ------------------------- Consider this project configuration: taxonomies: author: authors genre: genres [taxonomies] author = 'authors' genre = 'genres' { "taxonomies": { "author": "authors", "genre": "genres" } } And this content structure: content/ ├── books/ │ ├── and-then-there-were-none.md --> genres: suspense │ ├── death-on-the-nile.md --> genres: suspense │ └── jamaica-inn.md --> genres: suspense, romance │ └── pride-and-prejudice.md --> genres: romance └── _index.md To capture the “genres” `Taxonomy` object from within any template, use the [`Taxonomies`](https://gohugo.io/methods/site/taxonomies/) method on a `Site` object. {{ $taxonomyObject := .Site.Taxonomies.genres }} To capture the “genres” `Taxonomy` object when rendering its page with a _taxonomy_ template, use the [`Terms`](https://gohugo.io/methods/page/data/#in-a-taxonomy-template) method on the page’s [`Data`](https://gohugo.io/methods/page/data/) object: layouts/taxonomy.html {{ $taxonomyObject := .Data.Terms }} To inspect the data structure:
    {{ debug.Dump $taxonomyObject }}
    Although the [`Alphabetical`](https://gohugo.io/methods/taxonomy/alphabetical/) and [`ByCount`](https://gohugo.io/methods/taxonomy/bycount/) methods provide a better data structure for ranging through the taxonomy, you can render the weighted pages by term directly from the `Taxonomy` object: {{ range $term, $weightedPages := $taxonomyObject }}

    {{ .Page.LinkTitle }}

    {{ end }} In the example above, the first anchor element is a link to the term page. Get the ordered taxonomy ------------------------ Now that we have captured the “genres” Taxonomy object, let’s get the ordered taxonomy sorted by the number of pages associated with each term: {{ $taxonomyObject.ByCount }} To reverse the sort order: {{ $taxonomyObject.ByCount.Reverse }} To inspect the data structure:
    {{ debug.Dump $taxonomyObject.ByCount }}
    An ordered taxonomy is a slice, where each element is an object that contains the term and a slice of its weighted pages. Each element of the slice provides these methods: Count (`int`) Returns the number of pages to which the term is assigned. Page (`page.Page`) Returns the term’s `Page` object, useful for linking to the term page. Pages (`page.Pages`) Returns a `Pages` object containing the `Page` objects to which the term is assigned, sorted by [taxonomic weight](https://gohugo.io/quick-reference/glossary/#taxonomic-weight) . To sort or group, use any of the [methods](https://gohugo.io/methods/pages/) available to the `Pages` object. For example, sort by the last modification date. Term (`string`) Returns the term name. WeightedPages (`page.WeightedPages`) Returns a slice of weighted pages to which the term is assigned, sorted by taxonomic weight. The `Pages` method above is more flexible, allowing you to sort and group. Example ------- With this template: {{ range $taxonomyObject.ByCount }}

    {{ .Page.LinkTitle }} ({{ .Count }})

    {{ end }} Hugo renders:

    suspense (3)

    romance (2)

    * * * Last updated: December 19, 2025 : [Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)](https://github.com/gohugoio/hugoDocs/commit/7e1a08e545030efcad0ac52c1cf9469244bc3f2b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/taxonomy/ByCount.md) --- # ByWeight Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/menu/byweight/](https://gohugo.io/images/qr/qr_21d0132dac68ee48.png) Returns the given menu with its entries sorted by weight, then by name, then by identifier. Syntax MENU.ByWeight Returns navigation.Menu The `ByWeight` method returns the given menu with its entries sorted by [`weight`](https://gohugo.io/quick-reference/glossary/#weight) , then by `name`, then by `identifier`. This is the default sort order. Consider this menu definition: menus: main: - identifier: about name: About pageRef: /about weight: 20 - identifier: services name: Services pageRef: /services weight: 10 - identifier: contact name: Contact pageRef: /contact weight: 30 [menus] [[menus.main]] identifier = 'about' name = 'About' pageRef = '/about' weight = 20 [[menus.main]] identifier = 'services' name = 'Services' pageRef = '/services' weight = 10 [[menus.main]] identifier = 'contact' name = 'Contact' pageRef = '/contact' weight = 30 { "menus": { "main": [\ {\ "identifier": "about",\ "name": "About",\ "pageRef": "/about",\ "weight": 20\ },\ {\ "identifier": "services",\ "name": "Services",\ "pageRef": "/services",\ "weight": 10\ },\ {\ "identifier": "contact",\ "name": "Contact",\ "pageRef": "/contact",\ "weight": 30\ }\ ] } } To sort the entries by `weight`, then by `name`, then by `identifier`:
      {{ range .Site.Menus.main.ByWeight }}
    • {{ .Name }}
    • {{ end }}
    Hugo renders this to: In the menu definition above, note that the `identifier` property is only required when two or more menu entries have the same name, or when localizing the name using translation tables. You can also sort menu entries using the [`sort`](https://gohugo.io/functions/collections/sort/) function. For example, to sort by `weight` in descending order:
      {{ range sort .Site.Menus.main "Weight" "desc" }}
    • {{ .Name }}
    • {{ end }}
    When using the sort function with menu entries, specify any of the following keys: `Identifier`, `Name`, `Parent`, `Post`, `Pre`, `Title`, `URL`, or `Weight`. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/menu/ByWeight.md) --- # and Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/go-template/and/](https://gohugo.io/images/qr/qr_9d9f54d75b3bb817.png) Returns the first falsy argument. If all arguments are truthy, returns the last argument. Syntax and VALUE... Returns any The falsy values are `false`, `0`, any `nil` pointer or interface value, any array, slice, map, or string of length zero, and zero `time.Time` values. Everything else is truthy. The `and` function evaluates the arguments from left to right, and returns when the result is determined. {{ and 1 0 "" }} → 0 (int) {{ and 1 false 0 }} → false (bool) {{ and 1 2 3 }} → 3 (int) {{ and "a" "b" "c" }} → c (string) {{ and "a" 1 true }} → true (bool) {{ and false (math.Div 1 0) }} → false (bool) See Go’s [`text/template`](https://pkg.go.dev/text/template) documentation for more information. * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/go-template/and.md) --- # break Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/go-template/break/](https://gohugo.io/images/qr/qr_a36c1945ec94628d.png) Used with the range statement, stops the innermost iteration and bypasses all remaining iterations. Syntax break This template code: {{ $s := slice "foo" "bar" "baz" }} {{ range $s }} {{ if eq . "bar" }} {{ break }} {{ end }}

    {{ . }}

    {{ end }} Is rendered to:

    foo

    See Go’s [`text/template`](https://pkg.go.dev/text/template) documentation for more information. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/go-template/break.md) --- # block Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/go-template/block/](https://gohugo.io/images/qr/qr_96a323b2b2bbb792.png) Defines a template and executes it in place. Syntax block NAME CONTEXT A block is shorthand for defining a template: {{ define "name" }} T1 {{ end }} and then executing it in place: {{ template "name" pipeline }} The typical use is to define a set of root templates that are then customized by redefining the block templates within. layouts/baseof.html
    {{ block "main" . }} {{ print "default value if 'main' template is empty" }} {{ end }}
    layouts/page.html {{ define "main" }}

    {{ .Title }}

    {{ .Content }} {{ end }} layouts/section.html {{ define "main" }}

    {{ .Title }}

    {{ .Content }} {{ range .Pages }}

    {{ .LinkTitle }}

    {{ end }} {{ end }} See Go’s [`text/template`](https://pkg.go.dev/text/template) documentation for more information. * * * Last updated: August 23, 2025 : [Merge commit 'bfa74537929f409fca841540b971125b7678963a' (6c911d1e5)](https://github.com/gohugoio/hugoDocs/commit/6c911d1e52fb9c8065c079820327f4b0e37529d4) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/go-template/block.md) --- # Add Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/time/add/](https://gohugo.io/images/qr/qr_f2c00cc5f86ae222.png) Returns the given time plus the given duration. Syntax TIME.Add DURATION Returns time.Time {{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }} {{ $d1 = time.ParseDuration "3h20m10s" }} {{ $d2 = time.ParseDuration "-3h20m10s" }} {{ $t.Add $d1 }} → 2023-01-28 03:05:08 -0800 PST {{ $t.Add $d2 }} → 2023-01-27 20:24:48 -0800 PST * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/time/Add.md) --- # Code block render hooks Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/render-hooks/code-blocks/](https://gohugo.io/images/qr/qr_30dd7ee76cda7565.png) Create code block render hook templates to override the rendering of Markdown code blocks to HTML. Markdown -------- This Markdown example contains a fenced code block: content/example.md ```sh {class="my-class" id="my-codeblock" lineNos=inline tabWidth=2} declare a=1 echo "$a" exit ``` A fenced code block consists of: * A leading [code fence](https://spec.commonmark.org/current/#code-fence) * An optional [info string](https://spec.commonmark.org/current/#info-string) * A code sample * A trailing code fence In the previous example, the info string contains: * The language of the code sample (the first word) * An optional space-delimited or comma-delimited list of attributes (everything within braces) The attributes in the info string can be generic attributes or highlighting options. In the example above, the _generic attributes_ are `class` and `id`. In the absence of special handling within a code block render hook, Hugo adds each generic attribute to the HTML element surrounding the rendered code block. Consistent with its content security model, Hugo removes HTML event attributes such as `onclick` and `onmouseover`. Generic attributes are typically global HTML attributes, but you may include custom attributes as well. In the example above, the _highlighting options_ are `lineNos` and `tabWidth`. Hugo uses the [Chroma](https://github.com/alecthomas/chroma/) syntax highlighter to render the code sample. You can control the appearance of the rendered code by specifying one or more [highlighting options](https://gohugo.io/functions/transform/highlight/#options) . Although `style` is a global HTML attribute, when used in an info string it is a highlighting option. Context ------- Code block _render hook_ templates receive the following [context](https://gohugo.io/quick-reference/glossary/#context) : Attributes (`map`) The generic attributes from the info string. Inner (`string`) The content between the leading and trailing code fences, excluding the info string. Options (`map`) The highlighting options from the info string. This map is empty if [`Type`](https://gohugo.io/render-hooks/code-blocks/#type) is an empty string or a code language that is not supported by the Chroma syntax highlighter. However, in this case, the highlighting options are available in the [`Attributes`](https://gohugo.io/render-hooks/code-blocks/#attributes) map. Ordinal (`int`) The zero-based ordinal of the code block on the page. Page (`page`) A reference to the current page. PageInner (`page`) A reference to a page nested via the [`RenderShortcodes`](https://gohugo.io/methods/page/rendershortcodes/) method. [See details](https://gohugo.io/render-hooks/code-blocks/#pageinner-details) . Position (`text.Position`) The position of the code block within the page content. Type (`string`) The first word of the info string, typically the code language. Examples -------- In its default configuration, Hugo renders fenced code blocks by passing the code sample through the Chroma syntax highlighter and wrapping the result. To create a render hook that does the same thing: layouts/\_markup/render-codeblock.html {{ $result := transform.HighlightCodeBlock . }} {{ $result.Wrapped }} Although you can use one template with conditional logic to control the behavior on a per-language basis, you can also create language-specific templates. layouts/ └── _markup/ ├── render-codeblock-mermaid.html ├── render-codeblock-python.html └── render-codeblock.html For example, to create a code block render hook to render [Mermaid](https://mermaid.js.org/) diagrams: layouts/\_markup/render-codeblock-mermaid.html
          {{ .Inner | htmlEscape | safeHTML }}
        
    {{ .Page.Store.Set "hasMermaid" true }} Then include this snippet at the _bottom_ of your base template, before the closing `body` tag: layouts/baseof.html {{ if .Store.Get "hasMermaid" }} {{ end }} See the [diagrams](https://gohugo.io/content-management/diagrams/#mermaid-diagrams) page for details. Embedded -------- Hugo includes an [embedded code block render hook](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_markup/render-codeblock-goat.html) to render [GoAT diagrams](https://gohugo.io/content-management/diagrams/#goat-diagrams-ascii) . PageInner details ----------------- The primary use case for `PageInner` is to resolve links and [page resources](https://gohugo.io/quick-reference/glossary/#page-resource) relative to an included `Page`. For example, create an “include” shortcode to compose a page from multiple content files, while preserving a global context for footnotes and the table of contents: layouts/\_shortcodes/include.html {{ with .Get 0 }} {{ with $.Page.GetPage . }} {{- .RenderShortcodes }} {{ else }} {{ errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position }} {{ end }} {{ else }} {{ errorf "The %q shortcode requires a positional parameter indicating the logical path of the file to include. See %s" .Name .Position }} {{ end }} Then call the shortcode in your Markdown: content/posts/post-1.md {{% include "/posts/post-2" %}} Any render hook triggered while rendering `/posts/post-2` will get: * `/posts/post-1` when calling `Page` * `/posts/post-2` when calling `PageInner` `PageInner` falls back to the value of `Page` if not relevant, and always returns a value. The `PageInner` method is only relevant for shortcodes that invoke the [`RenderShortcodes`](https://gohugo.io/methods/page/rendershortcodes/) method, and you must call the shortcode using [Markdown notation](https://gohugo.io/content-management/shortcodes/#notation) . As a practical example, Hugo’s embedded link and image render hooks use the `PageInner` method to resolve markdown link and image destinations. See the source code for each: * [Embedded link render hook](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_markup/render-link.html) * [Embedded image render hook](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_markup/render-image.html) * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/render-hooks/code-blocks.md) --- # After Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/time/after/](https://gohugo.io/images/qr/qr_d9413da716482b5c.png) Reports whether TIME1 is after TIME2. Syntax TIME1.After TIME2 Returns bool {{ $t1 := time.AsTime "2023-01-01T17:00:00-08:00" }} {{ $t2 := time.AsTime "2010-01-01T17:00:00-08:00" }} {{ $t1.After $t2 }} → true * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/time/After.md) --- # AddDate Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/time/adddate/](https://gohugo.io/images/qr/qr_f9721e7dab66caef.png) Returns the time corresponding to adding the given number of years, months, and days to the given time.Time value. Syntax TIME.AddDate YEARS MONTHS DAYS Returns time.Time {{ $d := "2022-01-01" | time.AsTime }} {{ $d.AddDate 0 0 1 | time.Format "2006-01-02" }} → 2022-01-02 {{ $d.AddDate 0 1 1 | time.Format "2006-01-02" }} → 2022-02-02 {{ $d.AddDate 1 1 1 | time.Format "2006-01-02" }} → 2023-02-02 {{ $d.AddDate -1 -1 -1 | time.Format "2006-01-02" }} → 2020-11-30 When adding months or years, Hugo normalizes the final `time.Time` value if the resulting day does not exist. For example, adding one month to 31 January produces 2 March or 3 March, depending on the year. See [this explanation](https://github.com/golang/go/issues/31145#issuecomment-479067967) from the Go team. {{ $d := "2023-01-31" | time.AsTime }} {{ $d.AddDate 0 1 0 | time.Format "2006-01-02" }} → 2023-03-03 {{ $d := "2024-01-31" | time.AsTime }} {{ $d.AddDate 0 1 0 | time.Format "2006-01-02" }} → 2024-03-02 {{ $d := "2024-02-29" | time.AsTime }} {{ $d.AddDate 1 0 0 | time.Format "2006-01-02" }} → 2025-03-01 * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/time/AddDate.md) --- # AllPages Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/site/allpages/](https://gohugo.io/images/qr/qr_87af6d42d1fd4c9d.png) Returns a collection of all pages in all languages. Syntax SITE.AllPages Returns page.Pages Deprecated in [v0.156.0](https://github.com/gohugoio/hugo/releases/tag/v0.156.0) See [details](https://discourse.gohugo.io/t/56732) . * * * Last updated: March 2, 2026 : [content: Clean up content for deprecated features (850dc5b2b)](https://github.com/gohugoio/hugoDocs/commit/850dc5b2b26b7136504b24a46d6abede248c0fed) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/site/AllPages.md) --- # All settings Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/configuration/all/](https://gohugo.io/images/qr/qr_c19b1c602434218c.png) The complete list of Hugo configuration settings. Settings -------- archetypeDir (`string`) The designated directory for [archetypes](https://gohugo.io/quick-reference/glossary/#archetype) . Default is `archetypes`. For a more flexible approach to configuring this directory, consult the section on [module mounts](https://gohugo.io/configuration/module/#mounts) . assetDir (`string`) The designated directory for [global resources](https://gohugo.io/quick-reference/glossary/#global-resource) . Default is `assets`. For a more flexible approach to configuring this directory, consult the section on [module mounts](https://gohugo.io/configuration/module/#mounts) . baseURL (`string`) The absolute URL of your published site including the protocol, host, path, and a trailing slash. build See [configure build](https://gohugo.io/configuration/build/) . buildDrafts (`bool`) Whether to include draft content when building a site. Default is `false`. buildExpired (`bool`) Whether to include expired content when building a site. Default is `false`. buildFuture (`bool`) Whether to include future content when building a site. Default is `false`. cacheDir (`string`) The designated cache directory. See [details](https://gohugo.io/configuration/all/#cache-directory) . caches See [configure file caches](https://gohugo.io/configuration/caches/) . canonifyURLs (`bool`) See [details](https://gohugo.io/content-management/urls/#canonical-urls) before enabling this feature. Default is `false`. capitalizeListTitles (`bool`) Whether to capitalize automatic list titles. Applicable to section, taxonomy, and term pages. Use the [`titleCaseStyle`](https://gohugo.io/configuration/all/#titlecasestyle) setting to configure capitalization rules. Default is `true`. cascade See [configure cascade](https://gohugo.io/configuration/cascade/) . cleanDestinationDir (`bool`) Whether to remove files from the [`publishDir`](https://gohugo.io/configuration/all/#publishdir) that do not exist in the [`staticDir`](https://gohugo.io/configuration/all/#staticdir) when building the site. This setting will not take effect if the `staticDir` does not exist. Note that `.gitignore` and `.gitattributes` files, along with directories named `.git`, are always preserved in the `publishDir`. Default is `false`. contentDir (`string`) The designated directory for content files. Default is `content`. For a more flexible approach to configuring this directory, consult the section on [module mounts](https://gohugo.io/configuration/module/#mounts) . copyright (`string`) The copyright notice for a site, typically displayed in the footer. dataDir (`string`) The designated directory for data files. Default is `data`. For a more flexible approach to configuring this directory, consult the section on [module mounts](https://gohugo.io/configuration/module/#mounts) . defaultContentLanguage (`string`) The projects’s [default language](https://gohugo.io/quick-reference/glossary/#default-language) , conforming to the syntax described in [RFC 5646](https://datatracker.ietf.org/doc/html/rfc5646#section-2.1) . defaultContentLanguageInSubdir (`bool`) Whether to publish the default content language to a subdirectory matching the [`defaultContentLanguage`](https://gohugo.io/configuration/all/#defaultcontentlanguage) . Default is `false`. defaultContentRole [New in v0.153.0](https://github.com/gohugoio/hugo/releases/tag/v0.153.0) (`string`) The project’s [default role](https://gohugo.io/quick-reference/glossary/#default-role) . defaultContentRoleInSubdir [New in v0.153.0](https://github.com/gohugoio/hugo/releases/tag/v0.153.0) (`bool`) Whether to publish the default content [role](https://gohugo.io/quick-reference/glossary/#role) to a subdirectory matching the [`defaultContentRole`](https://gohugo.io/configuration/all/#defaultcontentrole) . Default is `false`. defaultContentVersion [New in v0.153.0](https://github.com/gohugoio/hugo/releases/tag/v0.153.0) (`string`) The project’s [default version](https://gohugo.io/quick-reference/glossary/#default-version) . defaultContentVersionInSubdir [New in v0.153.0](https://github.com/gohugoio/hugo/releases/tag/v0.153.0) (`bool`) Whether to publish the default content version to a subdirectory matching the [`defaultContentVersion`](https://gohugo.io/configuration/all/#defaultcontentversion) . Default is `false`. defaultOutputFormat (`string`) The default output format for the site. If unspecified, the first available format in the defined order (by weight, then alphabetically) will be used. deployment See [configure deployment](https://gohugo.io/configuration/deployment/) . disableAliases (`bool`) Whether to disable the generation of HTML redirect files for each path defined in the [`aliases`](https://gohugo.io/content-management/front-matter/#aliases) front matter field. When `true`, Hugo will not create physical files for [client-side redirection](https://gohugo.io/content-management/urls/#client-side-redirection) , but the alias data remains available via the [`Aliases`](https://gohugo.io/methods/page/aliases/) method on a `Page` object. Default is `false`. disableDefaultLanguageRedirect [New in v0.140.0](https://github.com/gohugoio/hugo/releases/tag/v0.140.0) (`bool`) Whether to disable generation of the alias redirect for the default content language. When [`defaultContentLanguageInSubdir`](https://gohugo.io/configuration/all/#defaultcontentlanguageinsubdir) is `true`, this setting prevents the root directory from redirecting to the language subdirectory. Conversely, when `defaultContentLanguageInSubdir` is `false`, this setting prevents the language subdirectory from redirecting to the root directory. This is superseded by the more general [`disableDefaultSiteRedirect`](https://gohugo.io/configuration/all/#disabledefaultsiteredirect) setting. Default is `false`. disableDefaultSiteRedirect [New in v0.154.5](https://github.com/gohugoio/hugo/releases/tag/v0.154.5) (bool) Whether to disable generation of the alias redirect to the [default site](https://gohugo.io/quick-reference/glossary/#default-site) . When [`defaultContentLanguageInSubdir`](https://gohugo.io/configuration/all/#defaultcontentlanguageinsubdir) , [`defaultContentRoleInSubdir`](https://gohugo.io/configuration/all/#defaultcontentroleinsubdir) , or [`defaultContentVersionInSubdir`](https://gohugo.io/configuration/all/#defaultcontentversioninsubdir) is `true`, this prevents the root directory from redirecting to the default site’s subdirectory. Conversely, when these are `false`, it prevents the subdirectories from redirecting back to the root. Default is `false`. disableHugoGeneratorInject (`bool`) Whether to disable injection of a `` tag into the home page. Default is `false`. disableKinds (`[]string`) A slice of page [kinds](https://gohugo.io/quick-reference/glossary/#kind) to disable during the build process, any of `404`, `home`, `page`, `robotstxt`, `rss`, `section`, `sitemap`, `taxonomy`, or `term`. disableLanguages (`[]string`) A slice of language keys representing the languages to disable during the build process. Although this is functional, consider using the [`disabled`](https://gohugo.io/configuration/languages/#disabled) key under each language instead. disableLiveReload (`bool`) Whether to disable automatic live reloading of the browser window. Default is `false`. disablePathToLower (`bool`) Whether to disable transformation of page URLs to lower case. Default is `false`. enableEmoji (`bool`) Whether to allow emoji in Markdown. Default is `false`. enableGitInfo (`bool`) Whether to retrieve commit metadata from the Git history of your local project and any [modules](https://gohugo.io/quick-reference/glossary/#module) . This enables the [`GitInfo`](https://gohugo.io/methods/page/gitinfo/) method on a `Page` object. With the default front matter configuration, the [`Lastmod`](https://gohugo.io/methods/page/lastmod/) method on a `Page` object returns the Git author date of the last commit for that file. Default is `false`. enableMissingTranslationPlaceholders (`bool`) Whether to show a placeholder instead of the default value or an empty string if a translation is missing. Default is `false`. enableRobotsTXT (`bool`) Whether to enable generation of a `robots.txt` file. Default is `false`. environment (`string`) The build environment. Default is `production` when running `hugo build` and `development` when running `hugo server`. frontmatter See [configure front matter](https://gohugo.io/configuration/front-matter/) . hasCJKLanguage (`bool`) Whether to automatically detect [CJK](https://gohugo.io/quick-reference/glossary/#cjk) languages in content. Affects the values returned by the [`WordCount`](https://gohugo.io/methods/page/wordcount/) and [`FuzzyWordCount`](https://gohugo.io/methods/page/fuzzywordcount/) methods. Default is `false`. HTTPCache See [configure HTTP cache](https://gohugo.io/configuration/http-cache/) . i18nDir (`string`) The designated directory for translation tables. Default is `i18n`. For a more flexible approach to configuring this directory, consult the section on [module mounts](https://gohugo.io/configuration/module/#mounts) . ignoreCache (`bool`) Whether to ignore the cache directory. Default is `false`. ignoreFiles (`[]string`) A slice of [regular expressions](https://gohugo.io/quick-reference/glossary/#regular-expression) used to exclude specific files from a build. These expressions are matched against the absolute file path and apply to files within the `content`, `data`, and `i18n` directories. For more advanced file exclusion options, see the section on [module mounts](https://gohugo.io/configuration/module/#mounts) . ignoreLogs (`[]string`) A slice of message identifiers corresponding to warnings and errors you wish to suppress. See [`erroridf`](https://gohugo.io/functions/fmt/erroridf/) and [`warnidf`](https://gohugo.io/functions/fmt/warnidf/) . ignoreVendorPaths (`string`) A [glob pattern](https://gohugo.io/quick-reference/glossary/#glob-pattern) matching the module paths to exclude from the `_vendor` directory. imaging See [configure imaging](https://gohugo.io/configuration/imaging/) . languageCode (`string`) The site’s language tag, conforming to the syntax described in [RFC 5646](https://datatracker.ietf.org/doc/html/rfc5646#section-2.1) . This value does not affect translations or localization. Hugo uses this value to populate: * The `language` element in the [embedded RSS template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/rss.xml) * The `lang` attribute of the `html` element in the [embedded alias template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/alias.html) * The `og:locale` `meta` element in the [embedded Open Graph template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/opengraph.html) When present in the root of the configuration, this value is ignored if one or more language keys exists. Please specify this value independently for each language key. languages See [configure languages](https://gohugo.io/configuration/languages/) . layoutDir (`string`) The designated directory for templates. Default is `layouts`. For a more flexible approach to configuring this directory, consult the section on [module mounts](https://gohugo.io/configuration/module/#mounts) . mainSections (`string` or `[]string`) The main sections of a site. If set, the [`MainSections`](https://gohugo.io/methods/site/mainsections/) method on the `Site` object returns the given sections, otherwise it returns the section with the most pages. markup See [configure markup](https://gohugo.io/configuration/markup/) . mediaTypes See [configure media types](https://gohugo.io/configuration/media-types/) . menus See [configure menus](https://gohugo.io/configuration/menus/) . minify See [configure minify](https://gohugo.io/configuration/minify/) . module See [configure modules](https://gohugo.io/configuration/module/) . newContentEditor (`string`) The editor to use when creating new content. noBuildLock (`bool`) Whether to disable creation of the `.hugo_build.lock` file. Default is `false`. noChmod (`bool`) Whether to disable synchronization of file permission modes. Default is `false`. noTimes (`bool`) Whether to disable synchronization of file modification times. Default is `false`. outputFormats See [configure output formats](https://gohugo.io/configuration/output-formats/) . outputs See [configure outputs](https://gohugo.io/configuration/outputs/) . page See [configure page](https://gohugo.io/configuration/page/) . pagination See [configure pagination](https://gohugo.io/configuration/pagination/) . panicOnWarning (`bool`) Whether to panic on the first WARNING. Default is `false`. params See [configure params](https://gohugo.io/configuration/params/) . permalinks See [configure permalinks](https://gohugo.io/configuration/permalinks/) . pluralizeListTitles (`bool`) Whether to pluralize automatic list titles. Applicable to section pages. Default is `true`. printI18nWarnings (`bool`) Whether to log WARNINGs for each missing translation. Default is `false`. printPathWarnings (`bool`) Whether to log WARNINGs when Hugo publishes two or more files to the same path. Default is `false`. printUnusedTemplates (`bool`) Whether to log WARNINGs for each unused template. Default is `false`. privacy See [configure privacy](https://gohugo.io/configuration/privacy/) . publishDir (`string`) The designated directory for publishing the site. Default is `public`. refLinksErrorLevel (`string`) The logging error level to use when the `ref` and `relref` functions, methods, and shortcodes are unable to resolve a reference to a page. Either `ERROR` or `WARNING`. Any `ERROR` will fail the build. Default is `ERROR`. refLinksNotFoundURL (`string`) The URL to return when the `ref` and `relref` functions, methods, and shortcodes are unable to resolve a reference to a page. related See [configure related content](https://gohugo.io/configuration/related-content/) . relativeURLs (`bool`) See [details](https://gohugo.io/content-management/urls/#relative-urls) before enabling this feature. Default is `false`. removePathAccents (`bool`) Whether to remove [non-spacing marks](https://www.compart.com/en/unicode/category/Mn) from [composite characters](https://en.wikipedia.org/wiki/Precomposed_character) in content paths. Default is `false`. renderSegments (`[]string`) A slice of [segments](https://gohugo.io/quick-reference/glossary/#segment) to render. If omitted, all segments are rendered. This option is typically set via a command-line flag, such as `hugo build --renderSegments segment1,segment2`. The provided segment names must correspond to those defined in the [`segments`](https://gohugo.io/configuration/segments/) configuration. resourceDir (`string`) The designated directory for caching output from [asset pipelines](https://gohugo.io/quick-reference/glossary/#asset-pipeline) . Default is `resources`. roles See [configure roles](https://gohugo.io/configuration/roles/) . security See [configure security](https://gohugo.io/configuration/security/) . sectionPagesMenu (`string`) When set, each top-level section will be added to the menu identified by the provided value. See [details](https://gohugo.io/content-management/menus/#define-automatically) . segments See [configure segments](https://gohugo.io/configuration/segments/) . server See [configure server](https://gohugo.io/configuration/server/) . services See [configure services](https://gohugo.io/configuration/services/) . sitemap See [configure sitemap](https://gohugo.io/configuration/sitemap/) . staticDir (`string`) The designated directory for static files. Default is `static`. For a more flexible approach to configuring this directory, consult the section on [module mounts](https://gohugo.io/configuration/module/#mounts) . summaryLength (`int`) Applicable to [automatic summaries](https://gohugo.io/content-management/summaries/#automatic-summary) , the minimum number of words returned by the [`Summary`](https://gohugo.io/methods/page/summary/) method on a `Page` object. The `Summary` method will return content truncated at the paragraph boundary closest to the specified `summaryLength`, but at least this minimum number of words. Default is `70`. taxonomies See [configure taxonomies](https://gohugo.io/configuration/taxonomies/) . templateMetrics (`bool`) Whether to print template execution metrics to the console. Default is `false`. See [details](https://gohugo.io/troubleshooting/performance/#template-metrics) . templateMetricsHints (`bool`) Whether to print template execution improvement hints to the console. Applicable when `templateMetrics` is `true`. Default is `false`. See [details](https://gohugo.io/troubleshooting/performance/#template-metrics) . theme (`string` or `[]string`) The [theme](https://gohugo.io/quick-reference/glossary/#theme) to use. Multiple themes can be listed, with precedence given from left to right. See [details](https://gohugo.io/hugo-modules/theme-components/) . themesDir (`string`) The designated directory for themes. Default is `themes`. timeout (`string`) The timeout for generating page content, either as a [duration](https://pkg.go.dev/time#Duration) or in seconds. This timeout is used to prevent infinite recursion during content generation. You may need to increase this value if your pages take a long time to generate, for example, due to extensive image processing or reliance on remote content. Default is `60s`. timeZone (`string`) The time zone used to parse dates without time zone offsets, including front matter date fields and values passed to the [`time.AsTime`](https://gohugo.io/functions/time/astime/) and [`time.Format`](https://gohugo.io/functions/time/format/) template functions. The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) . For example, `America/Los_Angeles` and `Europe/Oslo` are valid time zones. title (`string`) The site title. titleCaseStyle (`string`) The capitalization rules to follow when Hugo automatically generates a section title, or when using the [`strings.Title`](https://gohugo.io/functions/strings/title/) function. One of `ap`, `chicago`, `go`, `firstupper`, or `none`. Default is `ap`. See [details](https://gohugo.io/configuration/all/#title-case-style) . uglyurls See [configure ugly URLs](https://gohugo.io/configuration/ugly-urls/) . versions See [configure versions](https://gohugo.io/configuration/versions/) . Cache directory --------------- Hugo’s file cache directory is configurable via the [`cacheDir`](https://gohugo.io/configuration/all/#cachedir) configuration option or the `HUGO_CACHEDIR` environment variable. If neither is set, Hugo will use, in order of preference: 1. If running on Netlify: `/opt/build/cache/hugo_cache/`. This means that if you run your builds on Netlify, all caches configured with `:cacheDir` will be saved and restored on the next build. For other [CI/CD](https://gohugo.io/quick-reference/glossary/#cicd) platforms, please read their documentation. For a CircleCI example, see [this configuration](https://github.com/bep/hugo-sass-test/blob/6c3960a8f4b90e8938228688bc49bdcdd6b2d99e/.circleci/config.yml) . 2. In a `hugo_cache` directory below the OS user cache directory as defined by Go’s [os.UserCacheDir](https://pkg.go.dev/os#UserCacheDir) function. On Unix systems, per the [XDG base directory specification](https://specifications.freedesktop.org/basedir-spec/latest/) , this is `$XDG_CACHE_HOME` if non-empty, else `$HOME/.cache`. On MacOS, this is `$HOME/Library/Caches`. On Windows, this is`%LocalAppData%`. On Plan 9, this is `$home/lib/cache`. 3. In a `hugo_cache_$USER` directory below the OS temp dir. To determine the current `cacheDir`: hugo config | grep cachedir Title case style ---------------- Hugo’s [`titleCaseStyle`](https://gohugo.io/configuration/all/#titlecasestyle) setting governs capitalization for automatically generated section titles and the [`strings.Title`](https://gohugo.io/functions/strings/title/) function. By default, it follows the capitalization rules published in the Associated Press Stylebook. Change this setting to use other capitalization rules. ap Use the capitalization rules published in the [Associated Press Stylebook](https://www.apstylebook.com/) . This is the default. chicago Use the capitalization rules published in the [Chicago Manual of Style](https://www.chicagomanualofstyle.org/home.html) . go Capitalize the first letter of every word. firstupper Capitalize the first letter of the first word. none Disable transformation of automatic section titles, and disable the transformation performed by the `strings.Title` function. This is useful if you would prefer to manually capitalize section titles as needed, and to bypass opinionated theme usage of the `strings.Title` function. Localized settings ------------------ Some configuration settings, such as menus and custom parameters, can be defined separately for each language. See [configure languages](https://gohugo.io/configuration/languages/) . * * * Last updated: February 27, 2026 : [content: Miscellaneous udpates for v0.157.0 (35da1aa3c)](https://github.com/gohugoio/hugoDocs/commit/35da1aa3c2fe3b54bdb57df1a308533844af9df5) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/configuration/all.md) --- # Children Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/menu-entry/children/](https://gohugo.io/images/qr/qr_3c8b63c93084f2e.png) Returns a collection of child menu entries, if any, under the given menu entry. Syntax MENUENTRY.Children Returns navigation.Menu Use the `Children` method when rendering a nested menu. With this project configuration: menus: main: - name: Products pageRef: /product weight: 10 - name: Product 1 pageRef: /products/product-1 parent: Products weight: 1 - name: Product 2 pageRef: /products/product-2 parent: Products weight: 2 [menus] [[menus.main]] name = 'Products' pageRef = '/product' weight = 10 [[menus.main]] name = 'Product 1' pageRef = '/products/product-1' parent = 'Products' weight = 1 [[menus.main]] name = 'Product 2' pageRef = '/products/product-2' parent = 'Products' weight = 2 { "menus": { "main": [\ {\ "name": "Products",\ "pageRef": "/product",\ "weight": 10\ },\ {\ "name": "Product 1",\ "pageRef": "/products/product-1",\ "parent": "Products",\ "weight": 1\ },\ {\ "name": "Product 2",\ "pageRef": "/products/product-2",\ "parent": "Products",\ "weight": 2\ }\ ] } } And this template:
      {{ range .Site.Menus.main }}
    • {{ .Name }} {{ if .HasChildren }} {{ end }}
    • {{ end }}
    Hugo renders this HTML: * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/menu-entry/Children.md) --- # Compare functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/compare/](https://gohugo.io/images/qr/qr_4025e0dda8e52e09.png) [### compare.Conditional\ \ compare.Conditional CONTROL ARG1 ARG2\ \ Returns one of two arguments depending on the value of the control argument.](https://gohugo.io/functions/compare/conditional/) [### compare.Default\ \ compare.Default DEFAULT INPUT\ \ Returns the second argument if set, else the first argument.](https://gohugo.io/functions/compare/default/) [### compare.Eq\ \ compare.Eq ARG1 ARG2 \[ARG...\]\ \ Returns the boolean truth of arg1 == arg2 || arg1 == arg3.](https://gohugo.io/functions/compare/eq/) [### compare.Ge\ \ compare.Ge ARG1 ARG2 \[ARG...\]\ \ Returns the boolean truth of arg1 >= arg2 && arg1 >= arg3.](https://gohugo.io/functions/compare/ge/) [### compare.Gt\ \ compare.Gt ARG1 ARG2 \[ARG...\]\ \ Returns the boolean truth of arg1 > arg2 && arg1 > arg3.](https://gohugo.io/functions/compare/gt/) [### compare.Le\ \ compare.Le ARG1 ARG2 \[ARG...\]\ \ Returns the boolean truth of arg1 <= arg2 && arg1 <= arg3.](https://gohugo.io/functions/compare/le/) [### compare.Lt\ \ compare.Lt ARG1 ARG2 \[ARG...\]\ \ Returns the boolean truth of arg1 < arg2 && arg1 < arg3.](https://gohugo.io/functions/compare/lt/) [### compare.Ne\ \ compare.Ne ARG1 ARG2 \[ARG...\]\ \ Returns the boolean truth of arg1 != arg2 && arg1 != arg3.](https://gohugo.io/functions/compare/ne/) --- # Before Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/time/before/](https://gohugo.io/images/qr/qr_9ecc9e18c102cc8.png) Reports whether TIME1 is before TIME2. Syntax TIME1.Before TIME2 Returns bool {{ $t1 := time.AsTime "2023-01-01T17:00:00-08:00" }} {{ $t2 := time.AsTime "2030-01-01T17:00:00-08:00" }} {{ $t1.Before $t2 }} → true * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/time/Before.md) --- # compare.Conditional Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/compare/conditional/](https://gohugo.io/images/qr/qr_e64b3c7488c2374d.png) Returns one of two arguments depending on the value of the control argument. Syntax compare.Conditional CONTROL ARG1 ARG2 Returns any Alias cond If CONTROL is truthy the function returns ARG1, otherwise it returns ARG2. {{ $qty := 42 }} {{ cond (le $qty 3) "few" "many" }} → many Unlike [ternary operators](https://en.wikipedia.org/wiki/Ternary_conditional_operator) in other languages, the `compare.Conditional` function does not perform [short-circuit evaluation](https://en.wikipedia.org/wiki/Short-circuit_evaluation) . It evaluates both ARG1 and ARG2 regardless of the CONTROL value. Due to the absence of short-circuit evaluation, these examples throw an error: {{ cond true "true" (div 1 0) }} {{ cond false (div 1 0) "false" }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/compare/Conditional.md) --- # Shortcode templates Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/shortcode/](https://gohugo.io/images/qr/qr_7b5e895d8fd9d4f9.png) Create custom shortcodes to simplify and standardize content creation. We did a complete overhaul of Hugo’s template system in v0.146.0. We’re working on getting all of the relevant documentation up to date, but until then, see [this page](https://gohugo.io/templates/new-templatesystem-overview/) . Before creating custom shortcodes, please review the [shortcodes](https://gohugo.io/content-management/shortcodes/) page in the [content management](https://gohugo.io/content-management/shortcodes/) section. Understanding the usage details will help you design and create better templates. Introduction ------------ Hugo provides [embedded shortcodes](https://gohugo.io/shortcodes/) for many common tasks, but you’ll likely need to create your own for more specific needs. Some examples of custom shortcodes you might develop include: * Audio players * Video players * Image galleries * Diagrams * Maps * Tables * And many other custom elements Directory structure ------------------- Create _shortcode_ templates within the `layouts/_shortcodes` directory, either at its root or organized into subdirectories. layouts/ └── _shortcodes/ ├── diagrams/ │ ├── kroki.html │ └── plotly.html ├── media/ │ ├── audio.html │ ├── gallery.html │ └── video.html ├── capture.html ├── column.html ├── include.html └── row.html When calling a shortcode in a subdirectory, specify its path relative to the `_shortcode` directory, excluding the file extension. {{< media/audio path=/audio/podcast/episode-42.mp3 >}} Lookup order ------------ Hugo selects _shortcode_ templates based on the shortcode name, the current output format, and the current language. The examples below are sorted by specificity in descending order. The least specific path is at the bottom of the list. | Shortcode name | Output format | Language | Template path | | --- | --- | --- | --- | | foo | html | en | `layouts/_shortcodes/foo.en.html` | | foo | html | en | `layouts/_shortcodes/foo.html.html` | | foo | html | en | `layouts/_shortcodes/foo.html` | | foo | html | en | `layouts/_shortcodes/foo.html.en.html` | | Shortcode name | Output format | Language | Template path | | --- | --- | --- | --- | | foo | rss | en | `layouts/_shortcodes/foo.en.rss.xml` | | foo | rss | en | `layouts/_shortcodes/foo.rss.xml` | | foo | rss | en | `layouts/_shortcodes/foo.en.xml` | | foo | rss | en | `layouts/_shortcodes/foo.xml` | Methods ------- Use these methods in your _shortcode_ templates. Refer to each methods’s documentation for details and examples. [Get](https://gohugo.io/methods/shortcode/get/) Returns the value of the given argument. [Inner](https://gohugo.io/methods/shortcode/inner/) Returns the content between opening and closing shortcode tags, applicable when the shortcode call includes a closing tag. [InnerDeindent](https://gohugo.io/methods/shortcode/innerdeindent/) Returns the content between opening and closing shortcode tags, with indentation removed, applicable when the shortcode call includes a closing tag. [IsNamedParams](https://gohugo.io/methods/shortcode/isnamedparams/) Reports whether the shortcode call uses named arguments. [Name](https://gohugo.io/methods/shortcode/name/) Returns the shortcode file name, excluding the file extension. [Ordinal](https://gohugo.io/methods/shortcode/ordinal/) Returns the zero-based ordinal of the shortcode in relation to its parent. [Page](https://gohugo.io/methods/shortcode/page/) Returns the Page object from which the shortcode was called. [Params](https://gohugo.io/methods/shortcode/params/) Returns a collection of the shortcode arguments. [Parent](https://gohugo.io/methods/shortcode/parent/) Returns the parent shortcode context in nested shortcodes. [Position](https://gohugo.io/methods/shortcode/position/) Returns the file name and position from which the shortcode was called. [Ref](https://gohugo.io/methods/shortcode/ref/) Returns the absolute URL of the page with the given path, language, and output format. [RelRef](https://gohugo.io/methods/shortcode/relref/) Returns the relative URL of the page with the given path, language, and output format. [Scratch](https://gohugo.io/methods/shortcode/scratch/) Returns a "scratch pad" to store and manipulate data, scoped to the current shortcode. [Site](https://gohugo.io/methods/shortcode/site/) Returns the Site object. [Store](https://gohugo.io/methods/shortcode/store/) Returns a "scratch pad" to store and manipulate data, scoped to the current shortcode. Examples -------- These examples range in complexity from simple to moderately advanced, with some simplified for clarity. ### Insert year Create a shortcode to insert the current year: layouts/\_shortcodes/year.html {{- now.Format "2006" -}} Then call the shortcode from within your markup: content/example.md This is {{< year >}}, and look at how far we've come. This shortcode can be used inline or as a block on its own line. If a shortcode might be used inline, remove the surrounding [whitespace](https://gohugo.io/templates/introduction/#whitespace) by using [template action](https://gohugo.io/quick-reference/glossary/#template-action) delimiters with hyphens. ### Insert image This example assumes the following content structure, where `content/example/index.md` is a [page bundle](https://gohugo.io/quick-reference/glossary/#page-bundle) containing one or more [page resources](https://gohugo.io/quick-reference/glossary/#page-resource) . content/ ├── example/ │ ├── a.jpg │ └── index.md └── _index.md Create a shortcode to capture an image as a page resource, resize it to the given width, convert it to the WebP format, and add an `alt` attribute: layouts/\_shortcodes/image.html {{- with .Page.Resources.Get (.Get "path") }} {{- with .Process (printf "resize %dx wepb" ($.Get "width")) -}} {{ $.Get {{- end }} {{- end -}} Then call the shortcode from within your markup: content/example/index.md {{< image path=a.jpg width=300 alt="A white kitten" >}} The example above uses: * The [`with`](https://gohugo.io/functions/go-template/with/) statement to rebind the [context](https://gohugo.io/quick-reference/glossary/#context) after each successful operation * The [`Get`](https://gohugo.io/methods/shortcode/get/) method to retrieve arguments by name * The `$` to access the template context Make sure that you thoroughly understand the concept of context. The most common templating errors made by new users relate to context. Read more about context in the [introduction to templating](https://gohugo.io/templates/introduction/) . ### Insert image with error handling The previous example, while functional, silently fails if the image is missing, and does not gracefully exit if a required argument is missing. We’ll add error handling to address these issues: layouts/\_shortcodes/image.html {{- with .Get "path" }} {{- with $r := $.Page.Resources.Get ($.Get "path") }} {{- with $.Get "width" }} {{- with $r.Process (printf "resize %dx wepb" ($.Get "width" )) }} {{- $alt := or ($.Get "alt") "" -}} {{ $alt }} {{- end }} {{- else }} {{- errorf "The %q shortcode requires a 'width' argument: see %s" $.Name $.Position }} {{- end }} {{- else }} {{- warnf "The %q shortcode was unable to find %s: see %s" $.Name ($.Get "path") $.Position }} {{- end }} {{- else }} {{- errorf "The %q shortcode requires a 'path' argument: see %s" .Name .Position }} {{- end -}} This template throws an error and gracefully fails the build if the author neglected to provide a `path` or `width` argument, and it emits a warning if it cannot find the image at the specified path. If the author does not provide an `alt` argument, the `alt` attribute is set to an empty string. The [`Name`](https://gohugo.io/methods/shortcode/name/) and [`Position`](https://gohugo.io/methods/shortcode/position/) methods provide helpful context for errors and warnings. For example, a missing `width` argument causes the shortcode to throw this error: ERROR The "image" shortcode requires a 'width' argument: see "/home/user/project/content/example/index.md:7:1" ### Positional arguments Shortcode arguments can be [named or positional](https://gohugo.io/content-management/shortcodes/#arguments) . We used named arguments previously; let’s explore positional arguments. Here’s the named argument version of our example: content/example/index.md {{< image path=a.jpg width=300 alt="A white kitten" >}} Here’s how to call it with positional arguments: content/example/index.md {{< image a.jpg 300 "A white kitten" >}} Using the `Get` method with zero-indexed keys, we’ll initialize variables with descriptive names in our template: layouts/\_shortcodes/image.html {{ $path := .Get 0 }} {{ $width := .Get 1 }} {{ $alt := .Get 2 }} Positional arguments work well for frequently used shortcodes with one or two arguments. Since you’ll use them often, the argument order will be easy to remember. For less frequently used shortcodes, or those with more than two arguments, named arguments improve readability and reduce the chance of errors. ### Named and positional arguments You can create a shortcode that will accept both named and positional arguments, but not at the same time. Use the [`IsNamedParams`](https://gohugo.io/methods/shortcode/isnamedparams/) method to determine whether the shortcode call used named or positional arguments: layouts/\_shortcodes/image.html {{ $path := cond (.IsNamedParams) (.Get "path") (.Get 0) }} {{ $width := cond (.IsNamedParams) (.Get "width") (.Get 1) }} {{ $alt := cond (.IsNamedParams) (.Get "alt") (.Get 2) }} This example uses the `cond` alias for the [`compare.Conditional`](https://gohugo.io/functions/compare/conditional/) function to get the argument by name if `IsNamedParams` returns `true`, otherwise get the argument by position. ### Argument collection Use the [`Params`](https://gohugo.io/methods/shortcode/params/) method to access the arguments as a collection. When using named arguments, the `Params` method returns a map: content/example/index.md {{< image path=a.jpg width=300 alt="A white kitten" >}} layouts/\_shortcodes/image.html {{ .Params.path }} → a.jpg {{ .Params.width }} → 300 {{ .Params.alt }} → A white kitten When using positional arguments, the `Params` method returns a slice: content/example/index.md {{< image a.jpg 300 "A white kitten" >}} layouts/\_shortcodes/image.html {{ index .Params 0 }} → a.jpg {{ index .Params 1 }} → 300 {{ index .Params 1 }} → A white kitten Combine the `Params` method with the [`collections.IsSet`](https://gohugo.io/functions/collections/isset/) function to determine if a parameter is set, even if its value is falsy. ### Inner content Extract the content enclosed within shortcode tags using the [`Inner`](https://gohugo.io/methods/shortcode/inner/) method. This example demonstrates how to pass both content and a title to a shortcode. The shortcode then generates a `div` element containing an `h2` element (displaying the title) and the provided content. content/example.md {{< contrived title="A Contrived Example" >}} This is a **bold** word, and this is an _emphasized_ word. {{< /contrived >}} layouts/\_shortcodes/contrived.html

    {{ .Get "title" }}

    {{ .Inner | .Page.RenderString }}
    The preceding example called the shortcode using [standard notation](https://gohugo.io/content-management/shortcodes/#standard-notation) , requiring us to process the inner content with the [`RenderString`](https://gohugo.io/methods/page/renderstring/) method to convert the Markdown to HTML. This conversion is unnecessary when calling a shortcode using [Markdown notation](https://gohugo.io/content-management/shortcodes/#markdown-notation) . ### Nesting The [`Parent`](https://gohugo.io/methods/shortcode/parent/) method 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. The following example is contrived but demonstrates the concept. Assume you have a `gallery` shortcode that expects one named `class` argument: layouts/\_shortcodes/gallery.html
    {{ .Inner }}
    You also have an `img` shortcode with a single named `src` argument that you want to call inside of `gallery` and other shortcodes, so that the parent defines the context of each `img`: layouts/\_shortcodes/img.html {{ $src := .Get "src" }} {{ with .Parent }} {{ else }} {{ end }} You can then call your shortcode in your content as follows: content/example.md {{< 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`: ### Other examples For guidance, consider examining Hugo’s embedded shortcodes. The source code, available on [GitHub](https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates/_shortcodes) , can provide a useful model. Detection --------- The [`HasShortcode`](https://gohugo.io/methods/page/hasshortcode/) method allows you to check if a specific shortcode has been called on a page. For example, consider a custom audio shortcode: content/example.md {{< audio src=/audio/test.mp3 >}} You can use the `HasShortcode` method in your base template to conditionally load CSS if the audio shortcode was used on the page: layouts/baseof.html ... {{ if .HasShortcode "audio" }} {{ end }} ... * * * Last updated: February 27, 2026 : [content: Miscellaneous udpates for v0.157.0 (35da1aa3c)](https://github.com/gohugoio/hugoDocs/commit/35da1aa3c2fe3b54bdb57df1a308533844af9df5) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/shortcode.md) --- # Pagination Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/templates/pagination/](https://gohugo.io/images/qr/qr_7b2735158cd91823.png) Split a list page into two or more subsets. Displaying a large page collection on a list page is not user-friendly: * A massive list can be intimidating and difficult to navigate. Users may get lost in the sheer volume of information. * Large pages take longer to load, which can frustrate users and lead to them abandoning the site. * Without any filtering or organization, finding a specific item becomes a tedious scrolling exercise. Improve usability by paginating `home`, `section`, `taxonomy`, and `term` pages. The most common templating mistake related to pagination is invoking pagination more than once for a given list page. See the [caching](https://gohugo.io/templates/pagination/#caching) section below. Terminology ----------- paginate To split a [list page](https://gohugo.io/quick-reference/glossary/#list-page) into two or more subsets. pagination The process of paginating a list page. pager Created during pagination, a pager contains a subset of a list page and navigation links to other pagers. paginator A collection of pagers. Configuration ------------- See [configure pagination](https://gohugo.io/configuration/pagination/) . Methods ------- To paginate a `home`, `section`, `taxonomy`, or `term` page, invoke either of these methods on the `Page` object in the corresponding template: * [`Paginate`](https://gohugo.io/methods/page/paginate/) * [`Paginator`](https://gohugo.io/methods/page/paginator/) The `Paginate` method is more flexible, allowing you to: * Paginate any page collection * Filter, sort, and group the page collection * Override the number of pages per pager as defined in your project configuration By comparison, the `Paginator` method paginates the page collection passed into the template, and you cannot override the number of pages per pager. Examples -------- To paginate a list page using the `Paginate` method: {{ $pages := where site.RegularPages "Type" "posts" }} {{ $paginator := .Paginate $pages.ByTitle 7 }} {{ range $paginator.Pages }}

    {{ .LinkTitle }}

    {{ end }} {{ partial "pagination.html" . }} In the example above, we: 1. Build a page collection 2. Sort the page collection by title 3. Paginate the page collection, with 7 pages per pager 4. Range over the paginated page collection, rendering a link to each page 5. Call the embedded pagination template to create navigation links between pagers To paginate a list page using the `Paginator` method: {{ range .Paginator.Pages }}

    {{ .LinkTitle }}

    {{ end }} {{ partial "pagination.html" . }} In the example above, we: 1. Paginate the page collection passed into the template, with the default number of pages per pager 2. Range over the paginated page collection, rendering a link to each page 3. Call the embedded pagination template to create navigation links between pagers Caching ------- The most common templating mistake related to pagination is invoking pagination more than once for a given list page. Regardless of pagination method, the initial invocation is cached and cannot be changed. If you invoke pagination more than once for a given list page, subsequent invocations use the cached result. This means that subsequent invocations will not behave as written. When paginating conditionally, do not use the `compare.Conditional` function due to its eager evaluation of arguments. Use an `if-else` construct instead. Grouping -------- Use pagination with any of the [grouping methods](https://gohugo.io/quick-reference/page-collections/#group) . For example: {{ $pages := where site.RegularPages "Type" "posts" }} {{ $paginator := .Paginate ($pages.GroupByDate "Jan 2006") }} {{ range $paginator.PageGroups }}

    {{ .Key }}

    {{ range .Pages }}

    {{ .LinkTitle }}

    {{ end }} {{ end }} {{ partial "pagination.html" . }} Navigation ---------- As shown in the examples above, the easiest way to add navigation between pagers is with Hugo’s embedded pagination template: {{ partial "pagination.html" . }} The embedded pagination template has two formats: `default` and `terse`. The above is equivalent to: {{ partial "pagination.html" (dict "page" . "format" "default") }} The `terse` format has fewer controls and page slots, consuming less space when styled as a horizontal list. To use the `terse` format: {{ partial "pagination.html" (dict "page" . "format" "terse") }} To override Hugo’s embedded pagination template, copy the [source code](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/pagination.html) to a file with the same name in the `layouts/_partials` directory, then call it from your templates using the [`partial`](https://gohugo.io/functions/partials/include/) function: `{{ partial "pagination.html" . }}` Create custom navigation components using any of the `Pager` methods: [First](https://gohugo.io/methods/pager/first/) Returns the first pager in the pager collection. [HasNext](https://gohugo.io/methods/pager/hasnext/) Reports whether there is a pager after the current pager. [HasPrev](https://gohugo.io/methods/pager/hasprev/) Reports whether there is a pager before the current pager. [Last](https://gohugo.io/methods/pager/last/) Returns the last pager in the pager collection. [Next](https://gohugo.io/methods/pager/next/) Returns the next pager in the pager collection. [NumberOfElements](https://gohugo.io/methods/pager/numberofelements/) Returns the number of pages in the current pager. [PageGroups](https://gohugo.io/methods/pager/pagegroups/) Returns the page groups in the current pager. [PageNumber](https://gohugo.io/methods/pager/pagenumber/) Returns the current pager's number within the pager collection. [Pagers](https://gohugo.io/methods/pager/pagers/) Returns the pagers collection. [PagerSize](https://gohugo.io/methods/pager/pagersize/) Returns the number of pages per pager. [Pages](https://gohugo.io/methods/pager/pages/) Returns the pages in the current pager. [PageSize](https://gohugo.io/methods/pager/pagesize/) Returns the number of pages per pager. [Prev](https://gohugo.io/methods/pager/prev/) Returns the previous pager in the pager collection. [TotalNumberOfElements](https://gohugo.io/methods/pager/totalnumberofelements/) Returns the number of pages in the pager collection. [TotalPages](https://gohugo.io/methods/pager/totalpages/) Returns the number of pagers in the pager collection. [URL](https://gohugo.io/methods/pager/url/) Returns the URL of the current pager relative to the site root. Structure --------- The example below depicts the published site structure when paginating a list page. With this content: content/ ├── posts/ │ ├── _index.md │ ├── post-1.md │ ├── post-2.md │ ├── post-3.md │ └── post-4.md └── _index.md And this project configuration: pagination: disableAliases: false pagerSize: 2 path: page [pagination] disableAliases = false pagerSize = 2 path = 'page' { "pagination": { "disableAliases": false, "pagerSize": 2, "path": "page" } } And this _section_ template: layouts/section.html {{ range (.Paginate .Pages).Pages }}

    {{ .LinkTitle }}

    {{ end }} {{ partial "pagination.html" . }} The published site has this structure: public/ ├── posts/ │ ├── page/ │ │ ├── 1/ │ │ │ └── index.html <-- alias to public/posts/index.html │ │ └── 2/ │ │ └── index.html │ ├── post-1/ │ │ └── index.html │ ├── post-2/ │ │ └── index.html │ ├── post-3/ │ │ └── index.html │ ├── post-4/ │ │ └── index.html │ └── index.html └── index.html To disable alias generation for the first pager, change your project configuration: pagination: disableAliases: true pagerSize: 2 path: page [pagination] disableAliases = true pagerSize = 2 path = 'page' { "pagination": { "disableAliases": true, "pagerSize": 2, "path": "page" } } Now the published site will have this structure: public/ ├── posts/ │ ├── page/ │ │ └── 2/ │ │ └── index.html │ ├── post-1/ │ │ └── index.html │ ├── post-2/ │ │ └── index.html │ ├── post-3/ │ │ └── index.html │ ├── post-4/ │ │ └── index.html │ └── index.html └── index.html * * * Last updated: February 27, 2026 : [content: Miscellaneous udpates for v0.157.0 (35da1aa3c)](https://github.com/gohugoio/hugoDocs/commit/35da1aa3c2fe3b54bdb57df1a308533844af9df5) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/templates/pagination.md) --- # compare.Default Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/compare/default/](https://gohugo.io/images/qr/qr_45f9318fef40e11f.png) Returns the second argument if set, else the first argument. Syntax compare.Default DEFAULT INPUT Returns any Alias default The `default` function returns the second argument if set, else the first argument. When the second argument is the boolean `false` value, the `default` function returns `false`. All _other_ falsy values are considered unset. The falsy values are `false`, `0`, any `nil` pointer or interface value, any array, slice, map, or string of length zero, and zero `time.Time` values. Everything else is truthy. To set a default value based on truthiness, use the [`or`](https://gohugo.io/functions/go-template/or/) operator instead. The `default` function returns the second argument if set: {{ default 42 1 }} → 1 {{ default 42 "foo" }} → foo {{ default 42 (dict "k" "v") }} → map[k:v] {{ default 42 (slice "a" "b") }} → [a b] {{ default 42 true }} → true {{ default 42 false }} → false The `default` function returns the first argument if the second argument is not set: {{ default 42 0 }} → 42 {{ default 42 "" }} → 42 {{ default 42 dict }} → 42 {{ default 42 slice }} → 42 {{ default 42 nil }} → 42 * * * Last updated: December 19, 2025 : [Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)](https://github.com/gohugoio/hugoDocs/commit/7e1a08e545030efcad0ac52c1cf9469244bc3f2b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/compare/Default.md) --- # compare.Gt Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/compare/gt/](https://gohugo.io/images/qr/qr_b8f7fd725bf04fb.png) Returns the boolean truth of arg1 > arg2 && arg1 > arg3. Syntax compare.Gt ARG1 ARG2 \[ARG...\] Returns bool Alias gt {{ gt 1 1 }} → false {{ gt 1 2 }} → false {{ gt 2 1 }} → true {{ gt 1 1 1 }} → false {{ gt 1 1 2 }} → false {{ gt 1 2 1 }} → false {{ gt 1 2 2 }} → false {{ gt 2 1 1 }} → true {{ gt 2 1 2 }} → false {{ gt 2 2 1 }} → false Use the `compare.Gt` function to compare other data types as well: {{ gt "ab" "a" }} → true {{ gt time.Now (time.AsTime "1964-12-30") }} → true {{ gt true false }} → true * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/compare/Gt.md) --- # compare.Eq Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/compare/eq/](https://gohugo.io/images/qr/qr_a2749c60c2d78a00.png) Returns the boolean truth of arg1 == arg2 || arg1 == arg3. Syntax compare.Eq ARG1 ARG2 \[ARG...\] Returns bool Alias eq {{ eq 1 1 }} → true {{ eq 1 2 }} → false {{ eq 1 1 1 }} → true {{ eq 1 1 2 }} → true {{ eq 1 2 1 }} → true {{ eq 1 2 2 }} → false You can also use the `compare.Eq` function to compare strings, boolean values, dates, slices, maps, and pages. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/compare/Eq.md) --- # compare.Ge Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/compare/ge/](https://gohugo.io/images/qr/qr_ffb8379410b32e96.png) Returns the boolean truth of arg1 >= arg2 && arg1 >= arg3. Syntax compare.Ge ARG1 ARG2 \[ARG...\] Returns bool Alias ge {{ ge 1 1 }} → true {{ ge 1 2 }} → false {{ ge 2 1 }} → true {{ ge 1 1 1 }} → true {{ ge 1 1 2 }} → false {{ ge 1 2 1 }} → false {{ ge 1 2 2 }} → false {{ ge 2 1 1 }} → true {{ ge 2 1 2 }} → true {{ ge 2 2 1 }} → true Use the `compare.Ge` function to compare other data types as well: {{ ge "ab" "a" }} → true {{ ge time.Now (time.AsTime "1964-12-30") }} → true {{ ge true false }} → true * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/compare/Ge.md) --- # compare.Lt Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/compare/lt/](https://gohugo.io/images/qr/qr_f11b65892a78dcd7.png) Returns the boolean truth of arg1 < arg2 && arg1 < arg3. Syntax compare.Lt ARG1 ARG2 \[ARG...\] Returns bool Alias lt {{ lt 1 1 }} → false {{ lt 1 2 }} → true {{ lt 2 1 }} → false {{ lt 1 1 1 }} → false {{ lt 1 1 2 }} → false {{ lt 1 2 1 }} → false {{ lt 1 2 2 }} → true {{ lt 2 1 1 }} → false {{ lt 2 1 2 }} → false {{ lt 2 2 1 }} → false Use the `compare.Lt` function to compare other data types as well: {{ lt "ab" "a" }} → false {{ lt time.Now (time.AsTime "1964-12-30") }} → false {{ lt true false }} → false * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/compare/Lt.md) --- # compare.Le Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/compare/le/](https://gohugo.io/images/qr/qr_f68c3556532174bf.png) Returns the boolean truth of arg1 <= arg2 && arg1 <= arg3. Syntax compare.Le ARG1 ARG2 \[ARG...\] Returns bool Alias le {{ le 1 1 }} → true {{ le 1 2 }} → true {{ le 2 1 }} → false {{ le 1 1 1 }} → true {{ le 1 1 2 }} → true {{ le 1 2 1 }} → true {{ le 1 2 2 }} → true {{ le 2 1 1 }} → false {{ le 2 1 2 }} → false {{ le 2 2 1 }} → false Use the `compare.Le` function to compare other data types as well: {{ le "ab" "a" }} → false {{ le time.Now (time.AsTime "1964-12-30") }} → false {{ le true false }} → false * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/compare/Le.md) --- # Crypto functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/crypto/](https://gohugo.io/images/qr/qr_f89747b1ddd3b976.png) [### crypto.FNV32a\ \ crypto.FNV32a STRING\ \ Returns the 32-bit FNV (Fowler-Noll-Vo) non-cryptographic hash of the given string.](https://gohugo.io/functions/crypto/fnv32a/) [### crypto.HMAC\ \ crypto.HMAC HASH\_TYPE KEY MESSAGE \[ENCODING\]\ \ Returns a cryptographic hash that uses a key to sign a message.](https://gohugo.io/functions/crypto/hmac/) [### crypto.MD5\ \ crypto.MD5 INPUT\ \ Hashes the given input and returns its MD5 checksum encoded to a hexadecimal string.](https://gohugo.io/functions/crypto/md5/) [### crypto.SHA1\ \ crypto.SHA1 INPUT\ \ Hashes the given input and returns its SHA1 checksum encoded to a hexadecimal string.](https://gohugo.io/functions/crypto/sha1/) [### crypto.SHA256\ \ crypto.SHA256 INPUT\ \ Hashes the given input and returns its SHA256 checksum encoded to a hexadecimal string.](https://gohugo.io/functions/crypto/sha256/) --- # Archetypes Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/content-management/archetypes/](https://gohugo.io/images/qr/qr_43536f83b3e5580a.png) An archetype is a template for new content. Overview -------- A content file consists of [front matter](https://gohugo.io/quick-reference/glossary/#front-matter) and markup. The markup is typically Markdown, but Hugo also supports other [content formats](https://gohugo.io/quick-reference/glossary/#content-format) . Front matter can be TOML, YAML, or JSON. The `hugo new content` command creates a new file in the `content` directory, using an archetype as a template. This is the default archetype: --- date: '{{ .Date }}' draft: true title: '{{ replace .File.ContentBaseName `-` ` ` | title }}' --- +++ date = '{{ .Date }}' draft = true title = '{{ replace .File.ContentBaseName `-` ` ` | title }}' +++ { "date": "{{ .Date }}", "draft": true, "title": "{{ replace .File.ContentBaseName `-` ` ` | title }}" } When you create new content, Hugo evaluates the [template actions](https://gohugo.io/quick-reference/glossary/#template-action) within the archetype. For example: hugo new content posts/my-first-post.md With the default archetype shown above, Hugo creates this content file: --- date: '2023-08-24T11:49:46-07:00' draft: true title: My First Post --- +++ date = '2023-08-24T11:49:46-07:00' draft = true title = 'My First Post' +++ { "date": "2023-08-24T11:49:46-07:00", "draft": true, "title": "My First Post" } You can create an archetype for one or more [content types](https://gohugo.io/quick-reference/glossary/#content-type) . For example, use one archetype for posts, and use the default archetype for everything else: archetypes/ ├── default.md └── posts.md Lookup order ------------ Hugo looks for archetypes in the `archetypes` directory in the root of your project, falling back to the `archetypes` directory in themes or installed modules. An archetype for a specific content type takes precedence over the default archetype. For example, if you have enabled a theme named `my-theme` and you run this command: hugo new content posts/my-first-post.md The archetype lookup order is: 1. `archetypes/posts.md` 2. `themes/my-theme/archetypes/posts.md` 3. `archetypes/default.md` 4. `themes/my-theme/archetypes/default.md` If none of these exists, Hugo uses a built-in default archetype. Functions and context --------------------- You can use any template [function](https://gohugo.io/quick-reference/glossary/#function) within an archetype. As shown above, the default archetype uses the [`replace`](https://gohugo.io/functions/strings/replace/) function to replace hyphens with spaces when populating the title in front matter. Archetypes receive the following [context](https://gohugo.io/quick-reference/glossary/#context) : Date (`string`) The current date and time, formatted in compliance with RFC3339. File (`hugolib.fileInfo`) Returns file information for the current page. See [details](https://gohugo.io/methods/page/file/) . Type (`string`) The [content type](https://gohugo.io/quick-reference/glossary/#content-type) inferred from the top-level directory name, or as specified by the `--kind` flag passed to the `hugo new content` command. Site (`page.Site`) The current site object. See [details](https://gohugo.io/methods/site/) . Date format ----------- To insert date and time with a different format, use the [`time.Now`](https://gohugo.io/functions/time/now/) function: --- date: '{{ time.Now.Format "2006-01-02" }}' draft: true title: '{{ replace .File.ContentBaseName `-` ` ` | title }}' --- +++ date = '{{ time.Now.Format "2006-01-02" }}' draft = true title = '{{ replace .File.ContentBaseName `-` ` ` | title }}' +++ { "date": "{{ time.Now.Format \"2006-01-02\" }}", "draft": true, "title": "{{ replace .File.ContentBaseName `-` ` ` | title }}" } Include content --------------- Although typically used as a front matter template, you can also use an archetype to populate content. For example, in a documentation site you might have a section (content type) for functions. Every page within this section should follow the same format: a brief description, the function signature, examples, and notes. We can pre-populate the page to remind content authors of the standard format. archetypes/functions.md --- date: '{{ .Date }}' draft: true title: '{{ replace .File.ContentBaseName `-` ` ` | title }}' --- A brief description of what the function does, using simple present tense in the third person singular form. For example: `someFunction` returns the string `s` repeated `n` times. ## Signature ```text func someFunction(s string, n int) string ``` ## Examples One or more practical examples, each within a fenced code block. ## Notes Additional information to clarify as needed. Although you can include [template actions](https://gohugo.io/quick-reference/glossary/#template-action) within the content body, remember that Hugo evaluates these once—at the time of content creation. In most cases, place template actions in a [template](https://gohugo.io/quick-reference/glossary/#template) where Hugo evaluates the actions every time you [build](https://gohugo.io/quick-reference/glossary/#build) the site. Leaf bundles ------------ You can also create archetypes for [leaf bundles](https://gohugo.io/quick-reference/glossary/#leaf-bundle) . For example, in a photography site you might have a section (content type) for galleries. Each gallery is leaf bundle with content and images. Create an archetype for galleries: archetypes/ ├── galleries/ │ ├── images/ │ │ └── .gitkeep │ └── index.md <-- same format as default.md └── default.md Subdirectories within an archetype must contain at least one file. Without a file, Hugo will not create the subdirectory when you create new content. The name and size of the file are irrelevant. The example above includes a `.gitkeep` file, an empty file commonly used to preserve otherwise empty directories in a Git repository. To create a new gallery: hugo new galleries/bryce-canyon This produces: content/ ├── galleries/ │ └── bryce-canyon/ │ ├── images/ │ │ └── .gitkeep │ └── index.md └── _index.md Specify archetype ----------------- Use the `--kind` command line flag to specify an archetype when creating content. For example, let’s say your site has two sections: articles and tutorials. Create an archetype for each content type: archetypes/ ├── articles.md ├── default.md └── tutorials.md To create an article using the articles archetype: hugo new content articles/something.md To create an article using the tutorials archetype: hugo new content --kind tutorials articles/something.md * * * Last updated: December 19, 2025 : [Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)](https://github.com/gohugoio/hugoDocs/commit/7e1a08e545030efcad0ac52c1cf9469244bc3f2b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/content-management/archetypes.md) --- # ByExpiryDate Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/byexpirydate/](https://gohugo.io/images/qr/qr_28fc2f2cf6ca68b6.png) Returns the given page collection sorted by expiration date in ascending order. Syntax PAGES.ByExpiryDate Returns page.Pages When sorting by expiration date, the value is determined by your [project configuration](https://gohugo.io/configuration/front-matter/#dates) , defaulting to the `expiryDate` field in front matter. {{ range .Pages.ByExpiryDate }}

    {{ .LinkTitle }}

    {{ end }} To sort in descending order: {{ range .Pages.ByExpiryDate.Reverse }}

    {{ .LinkTitle }}

    {{ end }} * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/ByExpiryDate.md) --- # ByDate Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/bydate/](https://gohugo.io/images/qr/qr_5a0ac4bdef6b945d.png) Returns the given page collection sorted by date in ascending order. Syntax PAGES.ByDate Returns page.Pages When sorting by date, the value is determined by your [project configuration](https://gohugo.io/configuration/front-matter/#dates) , defaulting to the `date` field in front matter. {{ range .Pages.ByDate }}

    {{ .LinkTitle }}

    {{ end }} To sort in descending order: {{ range .Pages.ByDate.Reverse }}

    {{ .LinkTitle }}

    {{ end }} * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/ByDate.md) --- # ByLastmod Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/bylastmod/](https://gohugo.io/images/qr/qr_dcf500388e31bcc5.png) Returns the given page collection sorted by last modification date in ascending order. Syntax PAGES.ByLastmod Returns page.Pages When sorting by last modification date, the value is determined by your [project configuration](https://gohugo.io/configuration/front-matter/#dates) , defaulting to the `lastmod` field in front matter. {{ range .Pages.ByLastmod }}

    {{ .LinkTitle }}

    {{ end }} To sort in descending order: {{ range .Pages.ByLastmod.Reverse }}

    {{ .LinkTitle }}

    {{ end }} * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/ByLastmod.md) --- # compare.Ne Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/compare/ne/](https://gohugo.io/images/qr/qr_9eef284958d503bd.png) Returns the boolean truth of arg1 != arg2 && arg1 != arg3. Syntax compare.Ne ARG1 ARG2 \[ARG...\] Returns bool Alias ne {{ ne 1 1 }} → false {{ ne 1 2 }} → true {{ ne 1 1 1 }} → false {{ ne 1 1 2 }} → false {{ ne 1 2 1 }} → false {{ ne 1 2 2 }} → true You can also use the `compare.Ne` function to compare strings, boolean values, dates, slices, maps, and pages. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/compare/Ne.md) --- # crypto.MD5 Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/crypto/md5/](https://gohugo.io/images/qr/qr_8c7c9662b515535b.png) Hashes the given input and returns its MD5 checksum encoded to a hexadecimal string. Syntax crypto.MD5 INPUT Returns string Alias md5 {{ md5 "Hello world" }} → 3e25960a79dbc69b674cd4ec67a72c62 This can be useful if you want to use [Gravatar](https://en.gravatar.com/) for generating a unique avatar: * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/crypto/MD5.md) --- # crypto.HMAC Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/crypto/hmac/](https://gohugo.io/images/qr/qr_2db9efd280a1dfb8.png) Returns a cryptographic hash that uses a key to sign a message. Syntax crypto.HMAC HASH\_TYPE KEY MESSAGE \[ENCODING\] Returns string Alias hmac Set the `HASH_TYPE` argument to `md5`, `sha1`, `sha256`, or `sha512`. Set the optional `ENCODING` argument to either `hex` (default) or `binary`. {{ hmac "sha256" "Secret key" "Secret message" }} 5cceb491f45f8b154e20f3b0a30ed3a6ff3027d373f85c78ffe8983180b03c84 {{ hmac "sha256" "Secret key" "Secret message" "hex" }} 5cceb491f45f8b154e20f3b0a30ed3a6ff3027d373f85c78ffe8983180b03c84 {{ hmac "sha256" "Secret key" "Secret message" "binary" | base64Encode }} XM60kfRfixVOIPOwow7Tpv8wJ9Nz+Fx4/+iYMYCwPIQ= * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/crypto/HMAC.md) --- # crypto.SHA1 Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/crypto/sha1/](https://gohugo.io/images/qr/qr_2f2aa60807eb8b67.png) Hashes the given input and returns its SHA1 checksum encoded to a hexadecimal string. Syntax crypto.SHA1 INPUT Returns string Alias sha1 {{ sha1 "Hello world" }} → 7b502c3a1f48c8609ae212cdfb639dee39673f5e * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/crypto/SHA1.md) --- # CSS functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/css/](https://gohugo.io/images/qr/qr_cbfc0f39d1934515.png) [### css.PostCSS\ \ css.PostCSS \[OPTIONS\] RESOURCE\ \ Processes the given resource with PostCSS using any PostCSS plugin.](https://gohugo.io/functions/css/postcss/) [### css.Quoted\ \ css.Quoted STRING\ \ Returns the given string, setting its data type to indicate that it must be quoted when used in CSS.](https://gohugo.io/functions/css/quoted/) [### css.Sass\ \ css.Sass \[OPTIONS\] RESOURCE\ \ Transpiles Sass to CSS.](https://gohugo.io/functions/css/sass/) [### css.TailwindCSS\ \ css.TailwindCSS \[OPTIONS\] RESOURCE\ \ Processes the given resource with the Tailwind CSS CLI.](https://gohugo.io/functions/css/tailwindcss/) [### css.Unquoted\ \ css.Unquoted STRING\ \ Returns the given string, setting its data type to indicate that it must not be quoted when used in CSS.](https://gohugo.io/functions/css/unquoted/) --- # Debug functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/debug/](https://gohugo.io/images/qr/qr_e97b4ab6b6345cf2.png) [### debug.Dump\ \ debug.Dump VALUE\ \ Returns an object dump as a string.](https://gohugo.io/functions/debug/dump/) [### debug.Timer\ \ debug.Timer NAME\ \ Creates a named timer that reports elapsed time to the console.](https://gohugo.io/functions/debug/timer/) [### debug.VisualizeSpaces\ \ debug.VisualizeSpaces STRING\ \ Returns the given string with spaces replaced by a visible string.](https://gohugo.io/functions/debug/visualizespaces/) --- # BuildDrafts Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/site/builddrafts/](https://gohugo.io/images/qr/qr_e8e7a9f8f298418b.png) Reports reports whether draft publishing is enabled for the current build. Syntax SITE.BuildDrafts Returns bool Deprecated in [v0.156.0](https://github.com/gohugoio/hugo/releases/tag/v0.156.0) See [details](https://discourse.gohugo.io/t/56732) . * * * Last updated: March 2, 2026 : [content: Clean up content for deprecated features (850dc5b2b)](https://github.com/gohugoio/hugoDocs/commit/850dc5b2b26b7136504b24a46d6abede248c0fed) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/site/BuildDrafts.md) --- # ByLength Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/bylength/](https://gohugo.io/images/qr/qr_4631e37e7203b211.png) Returns the given page collection sorted by content length in ascending order. Syntax PAGES.ByLength Returns page.Pages {{ range .Pages.ByLength }}

    {{ .LinkTitle }}

    {{ end }} To sort in descending order: {{ range .Pages.ByLength.Reverse }}

    {{ .LinkTitle }}

    {{ end }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/ByLength.md) --- # ByLinkTitle Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/bylinktitle/](https://gohugo.io/images/qr/qr_4f3614219c4bd24b.png) Returns the given page collection sorted by link title in ascending order, falling back to title if link title is not defined. Syntax PAGES.ByLinkTitle Returns page.Pages {{ range .Pages.ByLinkTitle }}

    {{ .LinkTitle }}

    {{ end }} To sort in descending order: {{ range .Pages.ByLinkTitle.Reverse }}

    {{ .LinkTitle }}

    {{ end }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/ByLinkTitle.md) --- # crypto.FNV32a Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/crypto/fnv32a/](https://gohugo.io/images/qr/qr_eb17af9b67a778b7.png) Returns the 32-bit FNV (Fowler-Noll-Vo) non-cryptographic hash of the given string. Syntax crypto.FNV32a STRING Returns int Deprecated in [v0.129.0](https://github.com/gohugoio/hugo/releases/tag/v0.129.0) Use [`hash.FNV32a`](https://gohugo.io/functions/hash/fnv32a/) instead. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/crypto/FNV32a.md) --- # crypto.SHA256 Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/crypto/sha256/](https://gohugo.io/images/qr/qr_1bff56fdfe7c9601.png) Hashes the given input and returns its SHA256 checksum encoded to a hexadecimal string. Syntax crypto.SHA256 INPUT Returns string Alias sha256 {{ sha256 "Hello world" }} → 64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/crypto/SHA256.md) --- # debug.Dump Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/debug/dump/](https://gohugo.io/images/qr/qr_94e5c911937860f9.png) Returns an object dump as a string. Syntax debug.Dump VALUE Returns string
    {{ debug.Dump hugo.Data.books }}
    [\ {\ "author": "Victor Hugo",\ "rating": 4,\ "title": "The Hunchback of Notre Dame"\ },\ {\ "author": "Victor Hugo",\ "rating": 5,\ "title": "Les Misérables"\ }\ ] Output from this function may change from one release to the next. Use for debugging only. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/debug/Dump.md) --- # debug.Timer Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/debug/timer/](https://gohugo.io/images/qr/qr_e517e2454ca0bea3.png) Creates a named timer that reports elapsed time to the console. Syntax debug.Timer NAME Returns debug.Timer Use the `debug.Timer` function to determine execution time for a block of code, useful for finding performance bottlenecks in templates. The timer starts when you instantiate it, and stops when you call its `Stop` method. {{ $t := debug.Timer "TestSqrt" }} {{ range 2000 }} {{ $f := math.Sqrt . }} {{ end }} {{ $t.Stop }} Use the `--logLevel info` command line flag when you build the site. hugo build --logLevel info The results are displayed in the console at the end of the build. You can have as many timers as you want and if you don’t stop them, they will be stopped at the end of build. INFO timer: name TestSqrt count 1002 duration 2.496017496s average 2.491035ms median 2.282291ms * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/debug/Timer.md) --- # Diagram functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/diagrams/](https://gohugo.io/images/qr/qr_1863a88fd309d6d4.png) [### diagrams.Goat\ \ diagrams.Goat MARKUP\ \ Returns an SVGDiagram object created from the given GoAT markup and options.](https://gohugo.io/functions/diagrams/goat/) --- # ByPublishDate Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/bypublishdate/](https://gohugo.io/images/qr/qr_9f1293cc8be1d383.png) Returns the given page collection sorted by publish date in ascending order. Syntax PAGES.ByPublishDate Returns page.Pages When sorting by publish date, the value is determined by your [project configuration](https://gohugo.io/configuration/front-matter/#dates) , defaulting to the `publishDate` field in front matter. {{ range .Pages.ByPublishDate }}

    {{ .LinkTitle }}

    {{ end }} To sort in descending order: {{ range .Pages.ByPublishDate.Reverse }}

    {{ .LinkTitle }}

    {{ end }} * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/ByPublishDate.md) --- # ByParam Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/byparam/](https://gohugo.io/images/qr/qr_a7d2eb1935d4d3e2.png) Returns the given page collection sorted by the given parameter in ascending order. Syntax PAGES.ByParam PARAM Returns page.Pages If the given parameter is not present in front matter, Hugo will use the matching parameter in your project configuration if present. {{ range .Pages.ByParam "author" }}

    {{ .LinkTitle }}

    {{ end }} To sort in descending order: {{ range (.Pages.ByParam "author").Reverse }}

    {{ .LinkTitle }}

    {{ end }} If the targeted parameter is nested, access the field using dot notation: {{ range .Pages.ByParam "author.last_name" }}

    {{ .LinkTitle }}

    {{ end }} * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/ByParam.md) --- # Concat Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/hugo-pipes/bundling/](https://gohugo.io/images/qr/qr_9207a3104c7a3e0c.png) Bundle any number of assets into one resource. See the [`resources.Concat`](https://gohugo.io/functions/resources/concat/) function. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/hugo-pipes/bundling.md) --- # css.Quoted Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/css/quoted/](https://gohugo.io/images/qr/qr_a4b95b3d3d5b4683.png) Returns the given string, setting its data type to indicate that it must be quoted when used in CSS. Syntax css.Quoted STRING Returns css.QuotedString This function is only applicable to the [`vars`](https://gohugo.io/functions/css/sass/#vars) option passed to the [`css.Sass`](https://gohugo.io/functions/css/sass/) function. When passing a `vars` map to the `css.Sass` function, Hugo detects common typed CSS values such as `24px` or `#FF0000` using regular expression matching. If necessary, you can bypass automatic type inference by using the `css.Quoted` function to explicitly indicate that the value must be treated as a quoted string. For example: assets/sass/main.scss @use "hugo:vars" as h; ol li::after { content: h.$ol-li-after; } ul li::after { content: h.$ul-li-after; } layouts/\_partials/css.html {{ $vars := dict "ol_li_after" ("6" | css.Quoted ) "ul_li_after" ("7" | css.Quoted ) }} {{ with resources.Get "sass/main.scss" }} {{ $opts := dict "enableSourceMap" hugo.IsDevelopment "outputStyle" (cond hugo.IsDevelopment "expanded" "compressed") "targetPath" "css/main.css" "transpiler" "dartsass" "vars" $vars }} {{ with . | toCSS $opts }} {{ if hugo.IsDevelopment }} {{ else }} {{ with . | fingerprint }} {{ end }} {{ end }} {{ end }} {{ end }} The Sass code is transpiled to: public/css/main.css ol li::after { content: "6"; } ul li::after { content: "7"; } * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/css/Quoted.md) --- # debug.VisualizeSpaces Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/debug/visualizespaces/](https://gohugo.io/images/qr/qr_d108093fd7255a63.png) Returns the given string with spaces replaced by a visible string. Syntax debug.VisualizeSpaces STRING Returns string {{ debug.VisualizeSpaces "foo bar" }} → foo[SPACE][SPACE]bar * * * Last updated: December 19, 2025 : [Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)](https://github.com/gohugoio/hugoDocs/commit/7e1a08e545030efcad0ac52c1cf9469244bc3f2b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/debug/VisualizeSpaces.md) --- # ByTitle Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/bytitle/](https://gohugo.io/images/qr/qr_c39d8ada281e1567.png) Returns the given page collection sorted by title in ascending order. Syntax PAGES.ByTitle Returns page.Pages {{ range .Pages.ByTitle }}

    {{ .Title }}

    {{ end }} To sort in descending order: {{ range .Pages.ByTitle.Reverse }}

    {{ .Title }}

    {{ end }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/ByTitle.md) --- # ByWeight Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/byweight/](https://gohugo.io/images/qr/qr_3441f12bde1d92df.png) Returns the given page collection sorted by weight in ascending order. Syntax PAGES.ByWeight Returns page.Pages Assign a [weight](https://gohugo.io/quick-reference/glossary/#weight) to a page using the `weight` field in front matter. The weight must be a non-zero integer. Lighter items float to the top, while heavier items sink to the bottom. Unweighted or zero-weighted pages are placed at the end of the collection. {{ range .Pages.ByWeight }}

    {{ .LinkTitle }}

    {{ end }} To sort in descending order: {{ range .Pages.ByWeight.Reverse }}

    {{ .LinkTitle }}

    {{ end }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/ByWeight.md) --- # Count Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/taxonomy/count/](https://gohugo.io/images/qr/qr_1cf233a0dffa9365.png) Returns the number of number of weighted pages to which the given term has been assigned. Syntax TAXONOMY.Count TERM Returns int The `Count` method on a `Taxonomy` object returns the number of number of [weighted pages](https://gohugo.io/quick-reference/glossary/#weighted-page) to which the given [term](https://gohugo.io/quick-reference/glossary/#term) has been assigned. Before we can use a `Taxonomy` method, we need to capture a `Taxonomy` object. Capture a Taxonomy object ------------------------- Consider this project configuration: taxonomies: author: authors genre: genres [taxonomies] author = 'authors' genre = 'genres' { "taxonomies": { "author": "authors", "genre": "genres" } } And this content structure: content/ ├── books/ │ ├── and-then-there-were-none.md --> genres: suspense │ ├── death-on-the-nile.md --> genres: suspense │ └── jamaica-inn.md --> genres: suspense, romance │ └── pride-and-prejudice.md --> genres: romance └── _index.md To capture the “genres” `Taxonomy` object from within any template, use the [`Taxonomies`](https://gohugo.io/methods/site/taxonomies/) method on a `Site` object. {{ $taxonomyObject := .Site.Taxonomies.genres }} To capture the “genres” `Taxonomy` object when rendering its page with a _taxonomy_ template, use the [`Terms`](https://gohugo.io/methods/page/data/#in-a-taxonomy-template) method on the page’s [`Data`](https://gohugo.io/methods/page/data/) object: layouts/taxonomy.html {{ $taxonomyObject := .Data.Terms }} To inspect the data structure:
    {{ debug.Dump $taxonomyObject }}
    Although the [`Alphabetical`](https://gohugo.io/methods/taxonomy/alphabetical/) and [`ByCount`](https://gohugo.io/methods/taxonomy/bycount/) methods provide a better data structure for ranging through the taxonomy, you can render the weighted pages by term directly from the `Taxonomy` object: {{ range $term, $weightedPages := $taxonomyObject }}

    {{ .Page.LinkTitle }}

    {{ end }} In the example above, the first anchor element is a link to the term page. Count the weighted pages ------------------------ Now that we have captured the “genres” `Taxonomy` object, let’s count the number of weighted pages to which the “suspense” term has been assigned: {{ $taxonomyObject.Count "suspense" }} → 3 * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/taxonomy/Count.md) --- # css.Unquoted Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/css/unquoted/](https://gohugo.io/images/qr/qr_5a0bf0af88714dfe.png) Returns the given string, setting its data type to indicate that it must not be quoted when used in CSS. Syntax css.Unquoted STRING Returns css.UnquotedString This function is only applicable to the [`vars`](https://gohugo.io/functions/css/sass/#vars) option passed to the [`css.Sass`](https://gohugo.io/functions/css/sass/) function. When passing a `vars` map to the `css.Sass` function, Hugo detects common typed CSS values such as `24px` or `#FF0000` using regular expression matching. If necessary, you can bypass automatic type inference by using the `css.Unquoted` function to explicitly indicate that the value must not be treated as a quoted string. For example: assets/sass/main.scss @use "hugo:vars" as h; h1 { font-size: h.$font-size-h1; } h2 { font-size: h.$font-size-h2; } layouts/\_partials/css.html {{ $vars := dict "font_size_h1" ("72px * 0.500" | css.Unquoted) "font_size_h2" ("72px * 0.375" | css.Unquoted) }} {{ with resources.Get "sass/main.scss" }} {{ $opts := dict "enableSourceMap" hugo.IsDevelopment "outputStyle" (cond hugo.IsDevelopment "expanded" "compressed") "targetPath" "css/main.css" "transpiler" "dartsass" "vars" $vars }} {{ with . | toCSS $opts }} {{ if hugo.IsDevelopment }} {{ else }} {{ with . | fingerprint }} {{ end }} {{ end }} {{ end }} {{ end }} The Sass rules are transpiled to: public/css/main.css h1 { font-size: 36px; } h2 { font-size: 27px; } * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/css/Unquoted.md) --- # css.PostCSS Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/css/postcss/](https://gohugo.io/images/qr/qr_65de71e1cd7dd993.png) Processes the given resource with PostCSS using any PostCSS plugin. Syntax css.PostCSS \[OPTIONS\] RESOURCE Returns resource.Resource Alias postCSS [New in v0.128.0](https://github.com/gohugoio/hugo/releases/tag/v0.128.0) {{ with resources.Get "css/main.css" | postCSS }} {{ end }} Setup ----- Follow the steps below to transform CSS using any of the available [PostCSS plugins](https://postcss.org/docs/postcss-plugins) . Step 1 Install [Node.js](https://nodejs.org/en) . Step 2 Install the required Node.js packages in the root of your project. For example, to add vendor prefixes to your CSS rules: npm i -D postcss postcss-cli autoprefixer Step 3 Create a PostCSS configuration file in the root of your project. postcss.config.js module.exports = { plugins: [\ require('autoprefixer')\ ] }; If you are a Windows user, and the path to your project contains a space, you must place the PostCSS configuration within the package.json file. See [this example](https://github.com/postcss/postcss-load-config#packagejson) and issue [#7333](https://github.com/gohugoio/hugo/issues/7333) . Step 4 Place your CSS file within the `assets/css` directory. Step 5 Process the resource with PostCSS: {{ with resources.Get "css/main.css" | postCSS }} {{ end }} Options ------- The `css.PostCSS` method takes an optional map of options. config (`string`) The directory that contains the PostCSS configuration file. Default is the root of the project directory. noMap (`bool`) Whether to disable inline source maps. Default is `false`. inlineImports (`bool`) Whether to enable inlining of import statements. It does so recursively, but will only import a file once. URL imports (e.g. `@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');`) and imports with media queries will be ignored. Note that this import routine does not care about the CSS spec, so you can have @import anywhere in the file. Hugo will look for imports relative to the module mount and will respect theme overrides. Default is `false`. skipInlineImportsNotFound (`bool`) Whether to allow the build process to continue despite unresolved import statements, preserving the original import declarations. If you have regular CSS imports in your CSS that you want to preserve, you can either use imports with URL or media queries (Hugo does not try to resolve those) or set this option to `true`. Default is `false`." {{ $opts := dict "config" "config-directory" "noMap" true }} {{ with resources.Get "css/main.css" | postCSS $opts }} {{ end }} No configuration file --------------------- To avoid using a PostCSS configuration file, you can specify a minimal configuration using the options map. use (`string`) A space-delimited list of PostCSS plugins to use. parser (`string`) A custom PostCSS parser. stringifier (`string`) A custom PostCSS stringifier. syntax (`string`) Custom postcss syntax. {{ $opts := dict "use" "autoprefixer postcss-color-alpha" }} {{ with resources.Get "css/main.css" | postCSS $opts }} {{ end }} Check environment ----------------- The current Hugo environment name (set by `--environment` or in configuration or OS environment) is available in the Node context, which allows constructs like this: const autoprefixer = require('autoprefixer'); module.exports = { plugins: [\ process.env.HUGO_ENVIRONMENT !== 'development' ? autoprefixer : null\ ] } * * * Last updated: August 23, 2025 : [Merge commit 'bfa74537929f409fca841540b971125b7678963a' (6c911d1e5)](https://github.com/gohugoio/hugoDocs/commit/6c911d1e52fb9c8065c079820327f4b0e37529d4) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/css/PostCSS.md) --- # BaseURL Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/site/baseurl/](https://gohugo.io/images/qr/qr_9f6aed0a1b6d844e.png) Returns the base URL as defined in your project configuration. Syntax SITE.BaseURL Returns string Project configuration: baseURL: https://example.org/docs/ baseURL = 'https://example.org/docs/' { "baseURL": "https://example.org/docs/" } Template: {{ .Site.BaseURL }} → https://example.org/docs/ There is almost never a good reason to use this method in your templates. Its usage tends to be fragile due to misconfiguration. Use the [`absURL`](https://gohugo.io/functions/urls/absurl/) , [`absLangURL`](https://gohugo.io/functions/urls/abslangurl/) , [`relURL`](https://gohugo.io/functions/urls/relurl/) , or [`relLangURL`](https://gohugo.io/functions/urls/rellangurl/) functions instead. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/site/BaseURL.md) --- # ByLanguage Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/bylanguage/](https://gohugo.io/images/qr/qr_d00003d3aa244e8f.png) Returns the given page collection sorted by language. Syntax PAGES.ByLanguage Returns page.Pages When sorting by language, Hugo orders the page collection using the following priority: 1. Language weight (ascending) 2. Date (descending) 3. LinkTitle (ascending) This method is rarely, if ever, needed. Page collections that already contain multiple languages, such as those returned by the [`Rotate`](https://gohugo.io/methods/page/rotate/) , [`Translations`](https://gohugo.io/methods/page/translations/) , or [`AllTranslations`](https://gohugo.io/methods/page/alltranslations/) methods on a `Page` object, are already sorted by language weight. This contrived example aggregates pages from all sites and then sorts them by language: {{ $p := slice }} {{ range hugo.Sites }} {{ range .Pages }} {{ $p = $p | append . }} {{ end }} {{ end }} {{ range $p.ByLanguage }}

    {{ .LinkTitle }}

    {{ end }} To sort in descending order: {{ range $p.ByLanguage.Reverse }}

    {{ .LinkTitle }}

    {{ end }} * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/ByLanguage.md) --- # css.TailwindCSS Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/css/tailwindcss/](https://gohugo.io/images/qr/qr_3ca4466a69f87978.png) Processes the given resource with the Tailwind CSS CLI. Syntax css.TailwindCSS \[OPTIONS\] RESOURCE Returns resource.Resource [New in v0.128.0](https://github.com/gohugoio/hugo/releases/tag/v0.128.0) Use the `css.TailwindCSS` function to process your Tailwind CSS files. This function uses the Tailwind CSS CLI to: 1. Scan your templates for Tailwind CSS utility class usage. 2. Compile those utility classes into standard CSS. 3. Generate an optimized CSS output file. Use this function with Tailwind CSS v4.0 and later, which require a relatively [modern browser](https://tailwindcss.com/docs/compatibility#browser-support) to render correctly. Setup ----- Step 1 Install the Tailwind CSS CLI v4.0 or later: npm install --save-dev tailwindcss @tailwindcss/cli @tailwindcss/typography The Tailwind CSS CLI is also available as a [standalone executable](https://github.com/tailwindlabs/tailwindcss/releases/latest) . You must install it outside of your project directory and ensure its path is included in your system’s `PATH` environment variable. Step 2 Add this to your project configuration: build: buildStats: enable: true cachebusters: - source: 'assets/notwatching/hugo_stats\.json' target: css - source: '(postcss|tailwind)\.config\.js' target: css module: mounts: - source: assets target: assets - disableWatch: true source: hugo_stats.json target: assets/notwatching/hugo_stats.json [build] [build.buildStats] enable = true [[build.cachebusters]] source = 'assets/notwatching/hugo_stats\.json' target = 'css' [[build.cachebusters]] source = '(postcss|tailwind)\.config\.js' target = 'css' [module] [[module.mounts]] source = 'assets' target = 'assets' [[module.mounts]] disableWatch = true source = 'hugo_stats.json' target = 'assets/notwatching/hugo_stats.json' { "build": { "buildStats": { "enable": true }, "cachebusters": [\ {\ "source": "assets/notwatching/hugo_stats\\.json",\ "target": "css"\ },\ {\ "source": "(postcss|tailwind)\\.config\\.js",\ "target": "css"\ }\ ] }, "module": { "mounts": [\ {\ "source": "assets",\ "target": "assets"\ },\ {\ "disableWatch": true,\ "source": "hugo_stats.json",\ "target": "assets/notwatching/hugo_stats.json"\ }\ ] } } Step 3 Create a CSS entry file: assets/css/main.css @import "tailwindcss"; @plugin "@tailwindcss/typography"; @source "hugo_stats.json"; Tailwind CSS respects `.gitignore` files. This means that if `hugo_stats.json` is listed in your `.gitignore` file, Tailwind CSS will ignore it. To make `hugo_stats.json` available to Tailwind CSS you must explicitly source it as shown in the example above. Step 4 Create a _partial_ template to process the CSS with the Tailwind CSS CLI: layouts/\_partials/css.html {{ with resources.Get "css/main.css" }} {{ $opts := dict "minify" (not hugo.IsDevelopment) }} {{ with . | css.TailwindCSS $opts }} {{ if hugo.IsDevelopment }} {{ else }} {{ with . | fingerprint }} {{ end }} {{ end }} {{ end }} {{ end }} Step 5 Call the _partial_ template from your base template, deferring template execution until after all sites and output formats have been rendered: layouts/baseof.html ... {{ with (templates.Defer (dict "key" "global")) }} {{ partial "css.html" . }} {{ end }} ... Options ------- minify (`bool`) Whether to optimize and minify the output. Default is `false`. optimize (`bool`) Whether to optimize the output without minifying. Default is `false`. disableInlineImports [New in v0.147.4](https://github.com/gohugoio/hugo/releases/tag/v0.147.4) (`bool`) Whether to disable inlining of `@import` statements. Inlining is performed recursively, but currently once only per file. It is not possible to import the same file in different scopes (root, media query, etc.). Note that this import routine does not care about the CSS specification, so you can have `@import` statements anywhere in the file. Default is `false`. skipInlineImportsNotFound (`bool`) Whether to allow the build process to continue despite unresolved import statements, preserving the original import declarations. It is important to note that the inline importer does not process URL-based imports or those with media queries, and these will remain unaltered even when this option is disabled. Default is `false`. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/css/TailwindCSS.md) --- # Development Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/contribute/development/](https://gohugo.io/images/qr/qr_ea7f5b5726ebb029.png) Contribute to the development of Hugo. Introduction ------------ You can contribute to the Hugo project by: * Answering questions on the [forum](https://discourse.gohugo.io/) * Improving the [documentation](https://gohugo.io/documentation/) * Monitoring the [issue queue](https://github.com/gohugoio/hugo/issues) * Creating or improving [themes](https://themes.gohugo.io/) * Squashing [bugs](https://github.com/gohugoio/hugo/issues?q=is%3Aopen+is%3Aissue+label%3ABug) Please submit documentation issues and pull requests to the [documentation repository](https://github.com/gohugoio/hugoDocs) . If you have an idea for an enhancement or new feature, create a new topic on the [forum](https://discourse.gohugo.io/) in the “Feature” category. This will help you to: * Determine if the capability already exists * Measure interest * Refine the concept If there is sufficient interest, [create a proposal](https://github.com/gohugoio/hugo/issues/new?labels=Proposal%2C+NeedsTriage&template=feature_request.md) . Do not submit a pull request until the project lead accepts the proposal. For a complete guide to contributing to Hugo, see the [Contribution Guide](https://github.com/gohugoio/hugo/blob/master/CONTRIBUTING.md) . Prerequisites ------------- To build the extended or extended/deploy edition from source you must: 1. Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) 2. Install [Go](https://go.dev/doc/install) version 1.24.0 or later 3. Install a C compiler, either [GCC](https://gcc.gnu.org/) or [Clang](https://clang.llvm.org/) 4. Update your `PATH` environment variable as described in the [Go documentation](https://go.dev/doc/code#Command) See these [detailed instructions](https://discourse.gohugo.io/t/41370) to install GCC on Windows. GitHub workflow --------------- This section assumes that you have a working knowledge of Go, Git and GitHub, and are comfortable working on the command line. Use this workflow to create and submit pull requests. Step 1 Fork the [project repository](https://github.com/gohugoio/hugo/) . Step 2 Clone your fork. Step 3 Create a new branch with a descriptive name that includes the corresponding issue number. For a new feature: git checkout -b feat/implement-some-feature-99999 For a bug fix: git checkout -b fix/fix-some-bug-99999 Step 4 Make changes. Step 5 Compile and install. To compile and install the standard edition: go install To compile and install the extended edition: CGO_ENABLED=1 go install -tags extended To compile and install the extended/deploy edition: CGO_ENABLED=1 go install -tags extended,withdeploy Step 6 Test your changes: go test ./... Step 7 Commit your changes with a descriptive commit message: * Provide a summary on the first line, typically 50 characters or less, followed by a blank line. * Begin the summary with the name of the package, followed by a colon, a space, and a brief description of the change beginning with a capital letter * Use imperative present tense * See the [commit message guidelines](https://github.com/gohugoio/hugo/blob/master/CONTRIBUTING.md#git-commit-message-guidelines) for requirements * Optionally, provide a detailed description where each line is 72 characters or less, followed by a blank line. * Add one or more “Fixes” or “Closes” keywords, each on its own line, referencing the [issues](https://github.com/gohugoio/hugo/issues) addressed by this change. For example: git commit -m "tpl/strings: Create wrap function The strings.Wrap function wraps a string into one or more lines, splitting the string after the given number of characters, but not splitting in the middle of a word. Fixes #99998 Closes #99999" Step 8 Push the new branch to your fork of the documentation repository. Step 9 Visit the [project repository](https://github.com/gohugoio/hugo/) and create a pull request (PR). Step 10 A project maintainer will review your PR and may request changes. You may delete your branch after the maintainer merges your PR. Building from source -------------------- You can build, install, and test Hugo at any point in its development history. The examples below build and install the extended edition of Hugo. To build and install the latest release: CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest To build and install a specific release: CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.156.0 To build and install at the latest commit on the master branch: CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@master To build and install at a specific commit: CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@c0d9beb * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/contribute/development.md) --- # diagrams.Goat Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/diagrams/goat/](https://gohugo.io/images/qr/qr_7339ab111b10ea9e.png) Returns an SVGDiagram object created from the given GoAT markup and options. Syntax diagrams.Goat MARKUP Returns diagrams.SVGDiagram Useful in a [code block render hook](https://gohugo.io/render-hooks/code-blocks/) , the `diagrams.Goat` function returns an SVGDiagram object created from the given [GoAT](https://github.com/bep/goat) markup. Methods ------- The SVGDiagram object has the following methods: Inner (`template.HTML`) Returns the SVG child elements without a wrapping `svg` element, allowing you to create your own wrapper. Wrapped (`template.HTML`) Returns the SVG child elements wrapped in an `svg` element. Width (`int`) Returns the width of the rendered diagram, in pixels. Height (`int`) Returns the height of the rendered diagram, in pixels. GoAT Diagrams ------------- Hugo natively supports GoAT diagrams with an [embedded code block render hook](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_markup/render-codeblock-goat.html) . This Markdown: ```goat .---. .-. .-. .-. .---. | A +--->| 1 |<--->| 2 |<--->| 3 |<---+ B | '---' '-' '+' '+' '---' ``` Is rendered to:
    ...
    Which appears in your browser as: A123B To customize rendering, override Hugo’s [embedded code block render hook](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_markup/render-codeblock-goat.html) for GoAT diagrams. Code block render hook ---------------------- By way of example, let’s create a code block render hook to render GoAT diagrams as `figure` elements with an optional caption. layouts/\_markup/render-codeblock-goat.html {{ $caption := or .Attributes.caption "" }} {{ $class := or .Attributes.class "diagram" }} {{ $id := or .Attributes.id (printf "diagram-%d" (add 1 .Ordinal)) }}
    {{ with diagrams.Goat (trim .Inner "\n\r") }} {{ .Inner }} {{ end }}
    {{ $caption }}
    This Markdown: content/example.md ```goat {class="foo" caption="Diagram 1: Example"} .---. .-. .-. .-. .---. | A +--->| 1 |<--->| 2 |<--->| 3 |<---+ B | '---' '-' '+' '+' '---' ``` Is rendered to:
    ...
    Diagram 1: Example
    Use CSS to style the SVG as needed: svg.foo { font-family: "Segoe UI","Noto Sans",Helvetica,Arial,sans-serif } * * * Last updated: December 19, 2025 : [Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)](https://github.com/gohugoio/hugoDocs/commit/7e1a08e545030efcad0ac52c1cf9469244bc3f2b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/diagrams/Goat.md) --- # Deprecation Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/troubleshooting/deprecation/](https://gohugo.io/images/qr/qr_e9f19f34805aa9c0.png) The Hugo project follows a formal and consistent process to deprecate functions, methods, and configuration settings. When a project _deprecates_ something, they are telling its users: 1. Don’t use Thing One anymore. 2. Use Thing Two instead. 3. We’re going to remove Thing One at some point in the future. Common [reasons for deprecation](https://en.wikipedia.org/wiki/Deprecation) : * A feature has been replaced by a more powerful alternative. * A feature contains a design flaw. * A feature is considered extraneous, and will be removed in the future in order to simplify the system as a whole. * A future version of the software will make major structural changes, making it impossible or impractical to support older features. * Standardization or increased consistency in naming. * A feature that once was available only independently is now combined with its co-feature. After the project team deprecates something in code, Hugo will: 1. Log an INFO message for 3 minor releases[1](https://gohugo.io/troubleshooting/deprecation/#fn:1) 2. Log a WARN message for another 12 minor releases 3. Log an ERROR message and fail the build thereafter The project team will: 1. On the deprecation date, update the documentation with a note describing the deprecation and any relevant alternatives. 2. Remove the code six or more minor releases after Hugo begins logging ERROR messages and failing the build. At that point, Hugo will throw an error, but the error message will no longer mention the deprecation. 3. Remove the corresponding documentation two years after the deprecation date. To see the INFO messages, you must use the `--logLevel` command line flag: hugo build --logLevel info To limit the output to deprecation notices: hugo build --logLevel info | grep deprecate Run the above command every time you upgrade Hugo. * * * 1. For example, v0.1.1 => v0.2.0 is a minor release. [↩︎](https://gohugo.io/troubleshooting/deprecation/#fnref:1) * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/troubleshooting/deprecation.md) --- # Encoding functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/encoding/](https://gohugo.io/images/qr/qr_e252c0a952905f65.png) [### encoding.Base64Decode\ \ encoding.Base64Decode INPUT\ \ Returns the base64 decoding of the given content.](https://gohugo.io/functions/encoding/base64decode/) [### encoding.Base64Encode\ \ encoding.Base64Encode INPUT\ \ Returns the base64 decoding of the given content.](https://gohugo.io/functions/encoding/base64encode/) [### encoding.Jsonify\ \ encoding.Jsonify \[OPTIONS\] INPUT\ \ Encodes the given object to JSON.](https://gohugo.io/functions/encoding/jsonify/) --- # Build options Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/content-management/build-options/](https://gohugo.io/images/qr/qr_d8662ad308f0bc39.png) Build options help define how Hugo must treat a given page when building the site. Build options are stored in a reserved front matter object named `build`[1](https://gohugo.io/content-management/build-options/#fn:1) with these defaults: --- build: list: always publishResources: true render: always --- +++ [build] list = 'always' publishResources = true render = 'always' +++ { "build": { "list": "always", "publishResources": true, "render": "always" } } list When to include the page within page collections. Specify one of: * `always`: Include the page in _all_ page collections. For example, `site.RegularPages`, `.Pages`, etc. This is the default value. * `local`: Include the page in _local_ page collections. For example, `.RegularPages`, `.Pages`, etc. Use this option to create fully navigable but headless content sections. * `never`: Do not include the page in _any_ page collection. publishResources Applicable to [page bundles](https://gohugo.io/content-management/page-bundles/) , determines whether to publish the associated [page resources](https://gohugo.io/content-management/page-resources/) . Specify one of: * `true`: Always publish resources. This is the default value. * `false`: Only publish a resource when invoking its [`Permalink`](https://gohugo.io/methods/resource/permalink/) , [`RelPermalink`](https://gohugo.io/methods/resource/relpermalink/) , or [`Publish`](https://gohugo.io/methods/resource/publish/) method within a template. render When to render the page. Specify one of: * `always`: Always render the page to disk. This is the default value. * `link`: Do not render the page to disk, but assign `Permalink` and `RelPermalink` values. * `never`: Never render the page to disk, and exclude it from all page collections. Any page, regardless of its build options, will always be available by using the [`.Page.GetPage`](https://gohugo.io/methods/page/getpage/) or [`.Site.GetPage`](https://gohugo.io/methods/site/getpage/) method. Example – headless page ----------------------- Create a unpublished page whose content and resources can be included in other pages. content/ ├── headless/ │ ├── a.jpg │ ├── b.jpg │ └── index.md <-- leaf bundle └── _index.md <-- home page Set the build options in front matter: --- build: list: never publishResources: false render: never title: Headless page --- +++ title = 'Headless page' [build] list = 'never' publishResources = false render = 'never' +++ { "build": { "list": "never", "publishResources": false, "render": "never" }, "title": "Headless page" } To include the content and images on the home page: layouts/home.html {{ with .Site.GetPage "/headless" }} {{ .Content }} {{ range .Resources.ByType "image" }} {{ end }} {{ end }} The published site will have this structure: public/ ├── headless/ │ ├── a.jpg │ └── b.jpg └── index.html In the example above, note that: 1. Hugo did not publish an HTML file for the page. 2. Despite setting `publishResources` to `false` in front matter, Hugo published the [page resources](https://gohugo.io/content-management/page-resources/) because we invoked the [`RelPermalink`](https://gohugo.io/methods/resource/relpermalink/) method on each resource. This is the expected behavior. Example – headless section -------------------------- Create a unpublished section whose content and resources can be included in other pages. content/ ├── headless/ │ ├── note-1/ │ │ ├── a.jpg │ │ ├── b.jpg │ │ └── index.md <-- leaf bundle │ ├── note-2/ │ │ ├── c.jpg │ │ ├── d.jpg │ │ └── index.md <-- leaf bundle │ └── _index.md <-- branch bundle └── _index.md <-- home page Set the build options in front matter, using the `cascade` keyword to “cascade” the values down to descendant pages. --- cascade: - build: list: local publishResources: false render: never title: Headless section --- +++ title = 'Headless section' [[cascade]] [cascade.build] list = 'local' publishResources = false render = 'never' +++ { "cascade": [\ {\ "build": {\ "list": "local",\ "publishResources": false,\ "render": "never"\ }\ }\ ], "title": "Headless section" } In the front matter above, note that we have set `list` to `local` to include the descendant pages in local page collections. To include the content and images on the home page: layouts/home.html {{ with .Site.GetPage "/headless" }} {{ range .Pages }} {{ .Content }} {{ range .Resources.ByType "image" }} {{ end }} {{ end }} {{ end }} The published site will have this structure: public/ ├── headless/ │ ├── note-1/ │ │ ├── a.jpg │ │ └── b.jpg │ └── note-2/ │ ├── c.jpg │ └── d.jpg └── index.html In the example above, note that: 1. Hugo did not publish an HTML file for the page. 2. Despite setting `publishResources` to `false` in front matter, Hugo correctly published the [page resources](https://gohugo.io/content-management/page-resources/) because we invoked the [`RelPermalink`](https://gohugo.io/methods/resource/relpermalink/) method on each resource. This is the expected behavior. Example – list without publishing --------------------------------- Publish a section page without publishing the descendant pages. For example, to create a glossary: content/ ├── glossary/ │ ├── _index.md │ ├── bar.md │ ├── baz.md │ └── foo.md └── _index.md Set the build options in front matter, using the `cascade` keyword to “cascade” the values down to descendant pages. --- build: render: always cascade: - build: list: local publishResources: false render: never title: Glossary --- +++ title = 'Glossary' [build] render = 'always' [[cascade]] [cascade.build] list = 'local' publishResources = false render = 'never' +++ { "build": { "render": "always" }, "cascade": [\ {\ "build": {\ "list": "local",\ "publishResources": false,\ "render": "never"\ }\ }\ ], "title": "Glossary" } To render the glossary: layouts/glossary/section.html
    {{ range .Pages }}
    {{ .Title }}
    {{ .Content }}
    {{ end }}
    The published site will have this structure: public/ ├── glossary/ │ └── index.html └── index.html Example – publish without listing --------------------------------- Publish a section’s descendant pages without publishing the section page itself. content/ ├── books/ │ ├── _index.md │ ├── book-1.md │ └── book-2.md └── _index.md Set the build options in front matter: --- build: list: never render: never title: Books --- +++ title = 'Books' [build] list = 'never' render = 'never' +++ { "build": { "list": "never", "render": "never" }, "title": "Books" } The published site will have this structure: public/ ├── books/ │ ├── book-1/ │ │ └── index.html │ └── book-2/ │ └── index.html └── index.html Example – conditionally hide section ------------------------------------ Consider this example. A documentation site has a team of contributors with access to 20 custom shortcodes. Each shortcode takes several arguments, and requires documentation for the contributors to reference when using them. Instead of external documentation for the shortcodes, include an “internal” section that is hidden when building the production site. content/ ├── internal/ │ ├── shortcodes/ │ │ ├── _index.md │ │ ├── shortcode-1.md │ │ └── shortcode-2.md │ └── _index.md ├── reference/ │ ├── _index.md │ ├── reference-1.md │ └── reference-2.md ├── tutorials/ │ ├── _index.md │ ├── tutorial-1.md │ └── tutorial-2.md └── _index.md Set the build options in front matter, using the `cascade` keyword to “cascade” the values down to descendant pages, and use the `target` keyword to target the production environment. cascade: - build: list: never render: never target: environment: production title: Internal title = 'Internal' [[cascade]] [cascade.build] list = 'never' render = 'never' [cascade.target] environment = 'production' { "cascade": [\ {\ "build": {\ "list": "never",\ "render": "never"\ },\ "target": {\ "environment": "production"\ }\ }\ ], "title": "Internal" } The production site will have this structure: public/ ├── reference/ │ ├── reference-1/ │ │ └── index.html │ ├── reference-2/ │ │ └── index.html │ └── index.html ├── tutorials/ │ ├── tutorial-1/ │ │ └── index.html │ ├── tutorial-2/ │ │ └── index.html │ └── index.html └── index.html * * * 1. The `_build` alias for `build` is deprecated and will be removed in a future release. [↩︎](https://gohugo.io/content-management/build-options/#fnref:1) * * * Last updated: July 7, 2025 : [Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45' (079671b41)](https://github.com/gohugoio/hugoDocs/commit/079671b41b9395f2c2b48879f14d3f09d69a63dc) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/content-management/build-options.md) --- # encoding.Base64Encode Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/encoding/base64encode/](https://gohugo.io/images/qr/qr_e5ddaaf445d7c29b.png) Returns the base64 decoding of the given content. Syntax encoding.Base64Encode INPUT Returns string Alias base64Encode {{ "Hugo" | base64Encode }} → SHVnbw== * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/encoding/Base64Encode.md) --- # encoding.Base64Decode Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/encoding/base64decode/](https://gohugo.io/images/qr/qr_c0a91f9f3edccc78.png) Returns the base64 decoding of the given content. Syntax encoding.Base64Decode INPUT Returns string Alias base64Decode {{ "SHVnbw==" | base64Decode }} → Hugo Use the `base64Decode` function to decode responses from APIs. For example, the result of this call to GitHub’s API contains the base64-encoded representation of the repository’s README file: https://api.github.com/repos/gohugoio/hugo/readme To retrieve and render the content: {{ $url := "https://api.github.com/repos/gohugoio/hugo/readme" }} {{ with try (resources.GetRemote $url) }} {{ with .Err }} {{ errorf "%s" . }} {{ else with .Value }} {{ with . | transform.Unmarshal }} {{ .content | base64Decode | markdownify }} {{ end }} {{ else }} {{ errorf "Unable to get remote resource %q" $url }} {{ end }} {{ end }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/encoding/Base64Decode.md) --- # encoding.Jsonify Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/encoding/jsonify/](https://gohugo.io/images/qr/qr_691aab10ff011935.png) Encodes the given object to JSON. Syntax encoding.Jsonify \[OPTIONS\] INPUT Returns template.HTML Alias jsonify To customize the printing of the JSON, pass an options map as the first argument. Supported options are “prefix” and “indent”. Each JSON element in the output will begin on a new line beginning with _prefix_ followed by one or more copies of _indent_ according to the indentation nesting. {{ dict "title" .Title "content" .Plain | jsonify }} {{ dict "title" .Title "content" .Plain | jsonify (dict "indent" " ") }} {{ dict "title" .Title "content" .Plain | jsonify (dict "prefix" " " "indent" " ") }} Options ------- indent (`string`) Indentation to use. Default is “”. prefix (`string`) Indentation prefix. Default is “”. noHTMLEscape (`bool`) Whether to disable escaping of problematic HTML characters inside JSON quoted strings. The default behavior is to escape `&`, `<`, and `>` to `\u0026`, `\u003c`, and `\u003e` to avoid certain safety problems that can arise when embedding JSON in HTML. Default is `false`. * * * Last updated: August 23, 2025 : [Merge commit 'bfa74537929f409fca841540b971125b7678963a' (6c911d1e5)](https://github.com/gohugoio/hugoDocs/commit/6c911d1e52fb9c8065c079820327f4b0e37529d4) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/encoding/Jsonify.md) --- # Configure build Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/configuration/build/](https://gohugo.io/images/qr/qr_b51f7bf62c90fc9b.png) Configure global build options. The `build` configuration section contains global build-related configuration options. build: buildStats: disableClasses: false disableIDs: false disableTags: false enable: false cacheBusters: - source: '(postcss|tailwind)\.config\.js' target: (css|styles|scss|sass) noJSConfigInAssets: false useResourceCacheWhen: fallback [build] noJSConfigInAssets = false useResourceCacheWhen = 'fallback' [build.buildStats] disableClasses = false disableIDs = false disableTags = false enable = false [[build.cacheBusters]] source = '(postcss|tailwind)\.config\.js' target = '(css|styles|scss|sass)' { "build": { "buildStats": { "disableClasses": false, "disableIDs": false, "disableTags": false, "enable": false }, "cacheBusters": [\ {\ "source": "(postcss|tailwind)\\.config\\.js",\ "target": "(css|styles|scss|sass)"\ }\ ], "noJSConfigInAssets": false, "useResourceCacheWhen": "fallback" } } buildStats See the [build stats](https://gohugo.io/configuration/build/#build-stats) section below. cachebusters See the [cache busters](https://gohugo.io/configuration/build/#cache-busters) section below. noJSConfigInAssets (`bool`) Whether to disable writing a `jsconfig.json` in your `assets` directory 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. useResourceCacheWhen (`string`) When to use the resource file cache, one of `never`, `fallback`, or `always`. Applicable when transpiling Sass to CSS. Default is `fallback`. Cache busters ------------- The `build.cachebusters` configuration option was added to support development using Tailwind 3.x’s JIT compiler where a `build` configuration may look like this: build: buildStats: enable: true cachebusters: - source: 'assets/watching/hugo_stats\.json' target: 'styles\.css' - source: '(postcss|tailwind)\.config\.js' target: css - source: 'assets/.*\.(js|ts|jsx|tsx)' target: js - source: 'assets/.*\.(.*)$' target: $1 [build] [build.buildStats] enable = true [[build.cachebusters]] source = 'assets/watching/hugo_stats\.json' target = 'styles\.css' [[build.cachebusters]] source = '(postcss|tailwind)\.config\.js' target = 'css' [[build.cachebusters]] source = 'assets/.*\.(js|ts|jsx|tsx)' target = 'js' [[build.cachebusters]] source = 'assets/.*\.(.*)$' target = '$1' { "build": { "buildStats": { "enable": true }, "cachebusters": [\ {\ "source": "assets/watching/hugo_stats\\.json",\ "target": "styles\\.css"\ },\ {\ "source": "(postcss|tailwind)\\.config\\.js",\ "target": "css"\ },\ {\ "source": "assets/.*\\.(js|ts|jsx|tsx)",\ "target": "js"\ },\ {\ "source": "assets/.*\\.(.*)$",\ "target": "$1"\ }\ ] } } When `buildStats` is enabled, Hugo writes a `hugo_stats.json` file on each build with HTML classes etc. that’s used in the rendered output. Changes to this file will trigger a rebuild of the `styles.css` file. You also need to add `hugo_stats.json` to Hugo’s server watcher. See [Hugo Starter Tailwind Basic](https://github.com/bep/hugo-starter-tailwind-basic) for a running example. source (`string`) A [regular expression](https://gohugo.io/quick-reference/glossary/#regular-expression) matching file(s) relative to one of the virtual component directories in Hugo, typically `assets/...`. target (`string`) A [regular expression](https://gohugo.io/quick-reference/glossary/#regular-expression) matching the keys in the resource cache that should be expired when `source` changes. You can use the matching regexp groups from `source` in the expression, e.g. `$1`. Build stats ----------- build: buildStats: disableClasses: false disableIDs: false disableTags: false enable: false [build] [build.buildStats] disableClasses = false disableIDs = false disableTags = false enable = false { "build": { "buildStats": { "disableClasses": false, "disableIDs": false, "disableTags": false, "enable": false } } } enable (`bool`) Whether to create a `hugo_stats.json` file in the root of your project. This file contains arrays of the `class` attributes, `id` attributes, and tags of every HTML element within your published site. Use this file as data source when [removing unused CSS](https://gohugo.io/functions/resources/postprocess/) from your site. This process is also known as pruning, purging, or tree shaking. Default is `false`. disableIDs (`bool`) Whether to exclude `id` attributes. Default is `false`. disableTags (`bool`) Whether to exclude element tags. Default is `false`. disableClasses (`bool`) Whether to exclude `class` attributes. Default is `false`. Given that CSS purging is typically limited to production builds, place the `buildStats` object below [`config/production`](https://gohugo.io/configuration/introduction/#configuration-directory) . Built for speed, there may be “false positive” detections (e.g., HTML elements that are not HTML elements) while parsing the published site. These “false positives” are infrequent and inconsequential. Due to the nature of partial server builds, new HTML entities are added while the server is running, but old values will not be removed until you restart the server or run `hugo build`. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/configuration/build.md) --- # Collections functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/](https://gohugo.io/images/qr/qr_2a24a2978119df9c.png) [### collections.After\ \ collections.After N SLICE\ \ Returns a slice containing the elements after the first N elements of the given slice.](https://gohugo.io/functions/collections/after/) [### collections.Append\ \ collections.Append ELEMENT \[ELEMENT...\] SLICE\ \ Returns a slice by adding one or more elements, or an entire second slice, to the end of the given slice.](https://gohugo.io/functions/collections/append/) [### collections.Apply\ \ collections.Apply SLICE FUNCTION PARAM...\ \ Returns a slice by transforming each element of the given slice using a specific function and parameters.](https://gohugo.io/functions/collections/apply/) [### collections.Complement\ \ collections.Complement SLICE \[SLICE...\]\ \ Returns a slice by identifying elements in the last given slice that do not appear in any of the preceding slices.](https://gohugo.io/functions/collections/complement/) [### collections.D\ \ collections.D SEED N HIGH\ \ Returns a sorted slice of unique random integers based on a given seed, count, and maximum value.](https://gohugo.io/functions/collections/d/) [### collections.Delimit\ \ collections.Delimit SLICE|MAP DELIMITER \[LAST\]\ \ Returns a string by joining the values of the given slice or map with a delimiter.](https://gohugo.io/functions/collections/delimit/) [### collections.Dictionary\ \ collections.Dictionary \[VALUE...\]\ \ Returns a map created from the given key-value pairs.](https://gohugo.io/functions/collections/dictionary/) [### collections.First\ \ collections.First N SLICE|STRING\ \ Returns the first N elements of the given slice or string.](https://gohugo.io/functions/collections/first/) [### collections.Group\ \ collections.Group KEY PAGES\ \ Returns a map by grouping the given page collection (slice) by a specific key.](https://gohugo.io/functions/collections/group/) [### collections.In\ \ collections.In SLICE|STRING VALUE\ \ Reports whether a value exists within the given slice or string.](https://gohugo.io/functions/collections/in/) [### collections.Index\ \ collections.Index SLICE|MAP KEY...\ \ Returns an element or value from the given slice or map at the specified key(s).](https://gohugo.io/functions/collections/indexfunction/) [### collections.Intersect\ \ collections.Intersect SLICE1 SLICE2\ \ Returns a slice containing the common elements found in two given slices, in the same order as the first slice.](https://gohugo.io/functions/collections/intersect/) [### collections.IsSet\ \ collections.IsSet MAP|SLICE KEY|INDEX\ \ Reports whether a specific key or index exists in the given map or slice.](https://gohugo.io/functions/collections/isset/) [### collections.KeyVals\ \ collections.KeyVals KEY VALUE...\ \ Returns a KeyVals struct by pairing a given key and values.](https://gohugo.io/functions/collections/keyvals/) [### collections.Last\ \ collections.Last N SLICE|STRING\ \ Returns the last N elements of the given slice or string.](https://gohugo.io/functions/collections/last/) [### collections.Merge\ \ collections.Merge MAP MAP...\ \ Returns a map by combining two or more given maps.](https://gohugo.io/functions/collections/merge/) [### collections.NewScratch\ \ collections.NewScratch\ \ Returns a locally scoped "scratch pad" to store and manipulate data.](https://gohugo.io/functions/collections/newscratch/) [### collections.Querify\ \ collections.Querify MAP|SLICE|KEY VALUE...\ \ Returns a URL query string from the given map, slice, or sequence of key-value pairs.](https://gohugo.io/functions/collections/querify/) [### collections.Reverse\ \ collections.Reverse SLICE\ \ Returns a slice by reversing the order of elements in the given slice.](https://gohugo.io/functions/collections/reverse/) [### collections.Seq\ \ collections.Seq LAST\ \ Returns a slice of integers starting from 1 or a given value, incrementing by 1 or a given value, and ending at a given value.](https://gohugo.io/functions/collections/seq/) [### collections.Shuffle\ \ collections.Shuffle SLICE\ \ Returns a slice by randomizing the element order of the given slice.](https://gohugo.io/functions/collections/shuffle/) [### collections.Slice\ \ collections.Slice \[VALUE...\]\ \ Returns a slice created from the given values.](https://gohugo.io/functions/collections/slice/) [### collections.Sort\ \ collections.Sort MAP|SLICE \[KEY\] \[ORDER\]\ \ Returns a sorted map or slice by reordering the given collection by a key and order.](https://gohugo.io/functions/collections/sort/) [### collections.SymDiff\ \ SLICE1 | collections.SymDiff SLICE2\ \ Returns a slice containing the symmetric difference of two given slices.](https://gohugo.io/functions/collections/symdiff/) [### collections.Union\ \ collections.Union SLICE1 SLICE2\ \ Returns a slice containing the unique elements from two given slices.](https://gohugo.io/functions/collections/union/) [### collections.Uniq\ \ collections.Uniq SLICE\ \ Returns a slice by removing duplicate elements from the given slice.](https://gohugo.io/functions/collections/uniq/) [### collections.Where\ \ collections.Where SLICE KEY \[OPERATOR\] VALUE\ \ Returns a slice by filtering the given slice based on a key, operator, and value.](https://gohugo.io/functions/collections/where/) --- # continue Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/go-template/continue/](https://gohugo.io/images/qr/qr_52d5da7b3031dd14.png) Used with the range statement, stops the innermost iteration and continues to the next iteration. Syntax continue This template code: {{ $s := slice "foo" "bar" "baz" }} {{ range $s }} {{ if eq . "bar" }} {{ continue }} {{ end }}

    {{ . }}

    {{ end }} Is rendered to:

    foo

    baz

    See Go’s [`text/template`](https://pkg.go.dev/text/template) documentation for more information. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/go-template/continue.md) --- # css.Sass Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/css/sass/](https://gohugo.io/images/qr/qr_7e6e31e82599d46b.png) Transpiles Sass to CSS. Syntax css.Sass \[OPTIONS\] RESOURCE Returns resource.Resource Alias toCSS Transpile Sass to CSS using the LibSass transpiler included in Hugo’s extended and extended/deploy editions, or [install Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass) to use the latest features of the Sass language. The embedded LibSass transpiler was deprecated in [v0.153.0](https://github.com/gohugoio/hugo/releases/tag/v0.153.0) and will be removed in a future release. Use the Dart Sass transpiler instead. Sass has two forms of syntax: [SCSS](https://sass-lang.com/documentation/syntax#scss) and [indented](https://sass-lang.com/documentation/syntax#the-indented-syntax) . Hugo supports both. Options ------- enableSourceMap (`bool`) Whether to generate a source map. Default is `false`. includePaths (`slice`) A slice of paths, relative to the project root, that the transpiler will use when resolving `@use` and `@import` statements. outputStyle (`string`) The output style of the resulting CSS. With LibSass, one of `nested` (default), `expanded`, `compact`, or `compressed`. With Dart Sass, either `expanded` (default) or `compressed`. precision (`int`) The precision of floating point math. Applicable to LibSass. Default is `8`. silenceDeprecations [New in v0.139.0](https://github.com/gohugoio/hugo/releases/tag/v0.139.0) (`slice`) A slice of deprecation IDs to silence. IDs are enclosed in brackets within Dart Sass warning messages (e.g., `import` in `WARN Dart Sass: DEPRECATED [import]`). Applicable to Dart Sass. Default is `false`. silenceDependencyDeprecations [New in v0.146.0](https://github.com/gohugoio/hugo/releases/tag/v0.146.0) (`bool`) Whether to silence deprecation warnings from dependencies, where a dependency is considered any file transitively imported through a load path. This does not apply to `@warn` or `@debug` rules.Default is `false`. sourceMapIncludeSources (`bool`) Whether to embed sources in the generated source map. Applicable to Dart Sass. Default is `false`. targetPath (`string`) The publish path for the transformed resource, relative to the[`publishDir`](https://gohugo.io/configuration/all/#publishdir) . If unset, the target path defaults to the asset’s original path with a `.css` extension. transpiler (`string`) The transpiler to use, either `libsass` or `dartsass`. Hugo’s extended and extended/deploy editions include the LibSass transpiler. To use the Dart Sass transpiler, see the [installation instructions](https://gohugo.io/functions/css/sass/#dart-sass) . Default is `libsass`. The embedded LibSass transpiler was deprecated in [v0.153.0](https://github.com/gohugoio/hugo/releases/tag/v0.153.0) and will be removed in a future release. Use the Dart Sass transpiler instead. vars (`map`) A map of key-value pairs that will be available in the `hugo:vars` namespace. Useful for [initializing Sass variables from Hugo templates](https://discourse.gohugo.io/t/42053/) . // LibSass @import "hugo:vars"; // Dart Sass @use "hugo:vars" as v; When passing a `vars` map to the `css.Sass` function, Hugo detects common typed CSS values such as `24px` or `#FF0000` using regular expression matching. If necessary, you can bypass automatic type inference by using the [`css.Quoted`](https://gohugo.io/functions/css/quoted/) or [`css.Unquoted`](https://gohugo.io/functions/css/unquoted/) function to explicitly indicate a value’s type. Example ------- {{ with resources.Get "sass/main.scss" }} {{ $opts := dict "enableSourceMap" hugo.IsDevelopment "outputStyle" (cond hugo.IsDevelopment "expanded" "compressed") "targetPath" "css/main.css" "transpiler" "dartsass" "vars" site.Params.styles "includePaths" (slice "node_modules/bootstrap/scss") }} {{ with . | toCSS $opts }} {{ if hugo.IsDevelopment }} {{ else }} {{ with . | fingerprint }} {{ end }} {{ end }} {{ end }} {{ end }} Dart Sass --------- Hugo’s extended and extended/deploy editions include [LibSass](https://sass-lang.com/libsass) to transpile Sass to CSS. In 2020, the Sass team deprecated LibSass in favor of [Dart Sass](https://sass-lang.com/dart-sass/) . Use the latest features of the Sass language by installing Dart Sass in your development and production environments. ### Installation overview Dart Sass is compatible with Hugo v0.114.0 and later. If you have been using Embedded Dart Sass[1](https://gohugo.io/functions/css/sass/#fn:1) with Hugo v0.113.0 and earlier, uninstall Embedded Dart Sass, then install Dart Sass. If you have installed both, Hugo will use Dart Sass. If you install Hugo as a [Snap package](https://snapcraft.io/hugo) there is no need to install Dart Sass. The Hugo Snap package includes Dart Sass. ### Installing in a development environment When you install Dart Sass somewhere in your PATH, Hugo will find it. | OS | Package manager | Site | Installation | | --- | --- | --- | --- | | Linux | Homebrew | [brew.sh](https://brew.sh/) | `brew install sass/sass/sass` | | Linux | Snap | [snapcraft.io](https://snapcraft.io/dart-sass) | `sudo snap install dart-sass` | | macOS | Homebrew | [brew.sh](https://brew.sh/) | `brew install sass/sass/sass` | | Windows | Chocolatey | [chocolatey.org](https://community.chocolatey.org/packages/sass) | `choco install sass` | | Windows | Scoop | [scoop.sh](https://scoop.sh/#/apps?q=sass) | `scoop install sass` | You may also install [prebuilt binaries](https://github.com/sass/dart-sass/releases/latest) for Linux, macOS, and Windows. You must install the prebuilt binary outside of your project directory and ensure its path is included in your system’s PATH environment variable. Run `hugo env` to list the active transpilers. If you build Hugo from source and run `mage test -v`, the test will fail if you install Dart Sass as a Snap package. This is due to the Snap package’s strict confinement model. ### Installing in a production environment To use Dart Sass with Hugo on a [CI/CD](https://gohugo.io/quick-reference/glossary/#cicd) platform, you typically must modify your build workflow to install Dart Sass before the Hugo site build begins. This is because these platforms don’t have Dart Sass pre-installed, and Hugo needs it to process your Sass files. There’s one key exception where you can skip this step: you have committed your `resources` directory to your repository. This is only possible if: * You have not changed Hugo’s default asset cache location. * You have not set [`useResourceCacheWhen`](https://gohugo.io/configuration/build/#useresourcecachewhen) to never in your project configuration. By committing the `resources` directory, you’re providing the pre-built CSS files directly to your CI/CD platform, so it doesn’t need to run the Sass compilation itself. For examples of how to install Dart Sass in a production environment, see these hosting guides: * [Cloudflare](https://gohugo.io/host-and-deploy/host-on-cloudflare/) * [GitHub Pages](https://gohugo.io/host-and-deploy/host-on-github-pages/) * [GitLab Pages](https://gohugo.io/host-and-deploy/host-on-gitlab-pages/) * [Netlify](https://gohugo.io/host-and-deploy/host-on-netlify/) * [Render](https://gohugo.io/host-and-deploy/host-on-render/) * [SourceHut](https://gohugo.io/host-and-deploy/host-on-sourcehut-pages/) * [Vercel](https://gohugo.io/host-and-deploy/host-on-vercel/) * * * 1. In 2023, the Sass team deprecated Embedded Dart Sass in favor of Dart Sass. [↩︎](https://gohugo.io/functions/css/sass/#fnref:1) * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/css/Sass.md) --- # Global functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/global/](https://gohugo.io/images/qr/qr_eb9bcba38625043a.png) [### page\ \ page\ \ Provides global access to a Page object.](https://gohugo.io/functions/global/page/) [### site\ \ site\ \ Provides global access to the current Site object.](https://gohugo.io/functions/global/site/) --- # Duration methods Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/duration/](https://gohugo.io/images/qr/qr_40eefd49ad6545fc.png) [### Abs\ \ DURATION.Abs\ \ Returns the absolute value of the given time.Duration value.](https://gohugo.io/methods/duration/abs/) [### Hours\ \ DURATION.Hours\ \ Returns the time.Duration value as a floating point number of hours.](https://gohugo.io/methods/duration/hours/) [### Microseconds\ \ DURATION.Microseconds\ \ Returns the time.Duration value as an integer microsecond count.](https://gohugo.io/methods/duration/microseconds/) [### Milliseconds\ \ DURATION.Milliseconds\ \ Returns the time.Duration value as an integer millisecond count.](https://gohugo.io/methods/duration/milliseconds/) [### Minutes\ \ DURATION.Minutes\ \ Returns the time.Duration value as a floating point number of minutes.](https://gohugo.io/methods/duration/minutes/) [### Nanoseconds\ \ DURATION.Nanoseconds\ \ Returns the time.Duration value as an integer nanosecond count.](https://gohugo.io/methods/duration/nanoseconds/) [### Round\ \ DURATION1.Round DURATION2\ \ Returns the result of rounding DURATION1 to the nearest multiple of DURATION2.](https://gohugo.io/methods/duration/round/) [### Seconds\ \ DURATION.Seconds\ \ Returns the time.Duration value as a floating point number of seconds.](https://gohugo.io/methods/duration/seconds/) [### Truncate\ \ DURATION1.Truncate DURATION2\ \ Returns the result of rounding DURATION1 toward zero to a multiple of DURATION2.](https://gohugo.io/methods/duration/truncate/) --- # collections.Apply Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/apply/](https://gohugo.io/images/qr/qr_803899d280e71554.png) Returns a slice by transforming each element of the given slice using a specific function and parameters. Syntax collections.Apply SLICE FUNCTION PARAM... Returns \[\]any Alias apply The `apply` function takes three or more arguments, depending on the function being applied to the slice elements. The first argument is the slice itself, the second argument is the function name, and the remaining arguments are passed to the function, with the string `"."` representing the slice element. {{ $s := slice "hello" "world" }} {{ $s = apply $s "strings.FirstUpper" "." }} {{ $s }} → [Hello World] {{ $s = apply $s "strings.Replace" "." "l" "_" }} {{ $s }} → [He__o Wor_d] * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Apply.md) --- # collections.Append Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/append/](https://gohugo.io/images/qr/qr_46643a0828f491a7.png) Returns a slice by adding one or more elements, or an entire second slice, to the end of the given slice. Syntax collections.Append ELEMENT \[ELEMENT...\] SLICE collections.Append SLICE1 SLICE2 Returns \[\]any Alias append This function appends all elements, excluding the last, to the last element. This allows [pipe](https://gohugo.io/quick-reference/glossary/#pipe) constructs as shown below. Append a single element to a slice: {{ $s := slice "a" "b" }} {{ $s }} → [a b] {{ $s = $s | append "c" }} {{ $s }} → [a b c] Append two elements to a slice: {{ $s := slice "a" "b" }} {{ $s }} → [a b] {{ $s = $s | append "c" "d" }} {{ $s }} → [a b c d] Append two elements, as a slice, to a slice. This produces the same result as the previous example: {{ $s := slice "a" "b" }} {{ $s }} → [a b] {{ $s = $s | append (slice "c" "d") }} {{ $s }} → [a b c d] Start with an empty slice: {{ $s := slice }} {{ $s }} → [] {{ $s = $s | append "a" }} {{ $s }} → [a] {{ $s = $s | append "b" "c" }} {{ $s }} → [a b c] {{ $s = $s | append (slice "d" "e") }} {{ $s }} → [a b c d e] If you start with a slice of a slice: {{ $s := slice (slice "a" "b") }} {{ $s }} → [[a b]] {{ $s = $s | append (slice "c" "d") }} {{ $s }} → [[a b] [c d]] To create a slice of slices, starting with an empty slice: {{ $s := slice }} {{ $s }} → [] {{ $s = $s | append (slice (slice "a" "b")) }} {{ $s }} → [[a b]] {{ $s = $s | append (slice "c" "d") }} {{ $s }} → [[a b] [c d]] Although the elements in the examples above are strings, you can use the `append` function with any data type, including Pages. For example, on the home page of a corporate site, to display links to the two most recent press releases followed by links to the four most recent articles: {{ $p := where site.RegularPages "Type" "press-releases" | first 2 }} {{ $p = $p | append (where site.RegularPages "Type" "articles" | first 4) }} {{ with $p }} {{ end }} * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Append.md) --- # Documentation Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/contribute/documentation/](https://gohugo.io/images/qr/qr_4df236d37f3cb514.png) Help us to improve the documentation by identifying issues and suggesting changes. Introduction ------------ We welcome corrections and improvements to the documentation. The documentation lives in a separate repository from the main project. To contribute: * For corrections and improvements to existing documentation, submit issues and pull requests to the [documentation repository](https://github.com/gohugoio/hugoDocs/) . * For documentation of new features, include the documentation changes in your pull request to the [project repository](https://github.com/gohugoio/hugo) . Guidelines ---------- ### Style Follow Google’s [developer documentation style guide](https://developers.google.com/style) . ### Markdown Adhere to these Markdown conventions: * Use [ATX](https://spec.commonmark.org/current/#atx-headings) headings (levels 2-4), not [setext](https://spec.commonmark.org/current/#setext-heading) headings. * Use [collapsed link references](https://discourse.gohugo.io/t/55714) instead of full or shortcut references. For example: This is a [link][]. [link]: https://example.org * Use [fenced code blocks](https://spec.commonmark.org/current/#fenced-code-blocks) instead of [indented code blocks](https://spec.commonmark.org/current/#indented-code-blocks) . * Use hyphens, not asterisks, for unordered [list items](https://spec.commonmark.org/current/#list-items) . * Use [callouts](https://gohugo.io/contribute/documentation/#callouts) instead of bold text for emphasis. * Do not mix [raw HTML](https://spec.commonmark.org/current/#raw-html) within Markdown. * Do not use bold text in place of a heading or description term (`dt`). * Remove consecutive blank lines. * Remove trailing spaces. ### Glossary [Glossary](https://gohugo.io/quick-reference/glossary/) terms are defined on individual pages, providing a central repository for definitions, though these pages are not directly linked from the site. Definitions must be complete sentences, with the first sentence defining the term. Italicize the first occurrence of the term and any referenced glossary terms for consistency. Link to glossary terms using this syntax: `[term](g)` Term lookups are case-insensitive, ignore formatting, and support singular and plural forms. For example, all of these variations will link to the same glossary term: [global resource](g) [Global Resource](g) [Global Resources](g) [`Global Resources`](g) Use the [glossary-term shortcode](https://gohugo.io/contribute/documentation/#glossary-term) to insert a term definition: {{% glossary-term "global resource" %}} ### Terminology Link to the [glossary](https://gohugo.io/quick-reference/glossary/) as needed and use terms consistently. Pay particular attention to: * “front matter” (two words, except when referring to the configuration key) * “home page” (two words) * “website” (one word) * “standalone” (one word, no hyphen) * “map” (instead of “dictionary”) * “flag” (instead of “option” for command-line flags) * “client side” (noun), “client-side” (adjective) * “server side” (noun), “server-side” (adjective) * “Markdown” (capitalized) * “open-source” (hyphenated adjective) ### Template types When you refer to a template type, italicize it: When creating a _taxonomy_ template, do this... However, if the template type is also a link, do not italicize it to avoid distracting formatting: When creating a [taxonomy] template, do this... Do not italicize the template type in a title, heading, or front matter description. ### Titles and headings * Use sentence-style capitalization. * Avoid formatted strings. * Keep them concise. ### Page descriptions When writing the page `description` use imperative present tense when possible. For example: --- description: Use these functions to read local or remote data files. linkTitle: data title: Data functions --- +++ description = 'Use these functions to read local or remote data files.' linkTitle = 'data' title = 'Data functions' +++ { "description": "Use these functions to read local or remote data files.", "linkTitle": "data", "title": "Data functions" } ### Writing style Use active voice and present tense wherever possible. No → With Hugo you can build a static site. Yes → Build a static site with Hugo. No → This will cause Hugo to generate HTML files in the `public` directory. Yes → Hugo generates HTML files in the `public` directory. Use second person instead of third person. No → Users should exercise caution when deleting files. Better → You must be cautious when deleting files. Best → Be cautious when deleting files. Minimize adverbs. No → Hugo is extremely fast. Yes → Hugo is fast. “It’s an adverb, Sam. It’s a lazy tool of a weak mind.” (Outbreak, 1995). ### Function and method descriptions Start descriptions in the functions and methods sections with “Returns”, or for boolean values, “Reports whether”. ### File paths and names Enclose directory names, file names, and file paths in backticks, except when used in: * Page titles * Section headings (h1-h6) * Definition list terms * The `description` field in front matter ### Miscellaneous Other best practices: * Introduce lists with a sentence or phrase, not directly under a heading. * Avoid bold text; use [callouts](https://gohugo.io/contribute/documentation/#callouts) for emphasis. * Do not put description terms (`dt`) in backticks unless syntactically necessary. * Do not use Hugo’s `ref` or `relref` shortcodes. * Prioritize current best practices over multiple options or historical information. * Use short, focused code examples. * Use [basic english](https://simple.wikipedia.org/wiki/Basic_English) where possible for a global audience. Front matter fields ------------------- This site uses the front matter fields listed in the table below. Of the four required fields, only `title` and `description` require data. title: The title description: The description categories: [] keywords: [] This example demonstrates the minimum required front matter fields. If quotation marks are required, prefer single quotes to double quotes when possible. | Field | Description | Required | | --- | --- | --- | | `title` | The page title | ✔️ | | `linkTitle` | A short version of the page title | | | `description` | A complete sentence describing the page | ✔️ | | `categories` | An array of terms in the categories taxonomy | ✔️ [1](https://gohugo.io/contribute/documentation/#fn:1) | | `keywords` | An array of keywords used to identify related content | ✔️ [1](https://gohugo.io/contribute/documentation/#fn:1) | | `publishDate` | Applicable to news items: the publication date | | | `params.alt_title` | An alternate title: used in the “see also” panel if provided | | | `params.functions_and_methods.aliases` | Applicable to function and method pages: an array of alias names | | | `params.functions_and_methods.returnType` | Applicable to function and method pages: the data type returned | | | `params.functions_and_methods.signatures` | Applicable to function and method pages: an array of signatures | | | `params.hide_in_this_section` | Whether to hide the “in this section” panel | | | `params.minversion` | Applicable to the quick start page: the minimum Hugo version required | | | `params.permalink` | Reserved for use by the news content adapter | | | `params.reference (used in glossary term)` | Applicable to glossary entries: a URL for additional information | | | `params.searchable` | Whether to add the content of this page to the search index. The default value is cascaded down from the project configuration; `true` if the page kind is `page`, and `false` if the page kind is one of `home`, `section`, `taxonomy`, or `term`. Add this field to override the default value. | | | `params.show_publish_date` | Whether to show the `publishDate` when rendering the page | | | `weight` | The page weight | | | `aliases` | Previous URLs used to access this page | | | `expirydate` | The expiration date | | Related content --------------- When available, the “See also” sidebar displays related pages using Hugo’s [related content](https://gohugo.io/content-management/related-content/) feature, based on front matter keywords. We ensure consistent keyword usage by validating them against `data/keywords.yaml` during the build process. If a keyword is not found, you’ll be alerted and must either modify the keyword or update the data file. This validation process helps to refine the related content for better results. If the title in the “See also” sidebar is ambiguous or the same as another page, you can define an alternate title in the front matter: linkTitle: Short title params: alt_title: Whatever you want title: Long descriptive title linkTitle = 'Short title' title = 'Long descriptive title' [params] alt_title = 'Whatever you want' { "linkTitle": "Short title", "params": { "alt_title": "Whatever you want" }, "title": "Long descriptive title" } Use of the alternate title is limited to the “See also” sidebar. Think carefully before setting the `alt_title`. Use it only when absolutely necessary. Code examples ------------- With examples of template code: * Indent with two spaces. * Insert a space after an opening action delimiter. * Insert a space before a closing action delimiter. * Do not add white space removal syntax to action delimiters unless required. For example, inline elements like `img` and `a` require whitespace removal on both sides. {{ if eq $foo $bar }} {{ fmt.Printf "%s is %s" $foo $bar }} {{ end }} ### Fenced code blocks Always specify the language. When providing a Mardown example, set the code language to “text” to prevent erroneous lexing/highlighting of shortcode calls. ```go-html-template {{ if eq $foo "bar" }} {{ print "foo is bar" }} {{ end }} ``` To include a file name header and copy-to-clipboard button: ```go-html-template {file="layouts/_partials/foo.html" copy=true} {{ if eq $foo "bar" }} {{ print "foo is bar" }} {{ end }} ``` To wrap the code block within an initially-opened `details` element using a non-default summary: ```go-html-template {details=true open=true summary="layouts/_partials/foo.html" copy=true} {{ if eq $foo "bar" }} {{ print "foo is bar" }} {{ end }} ``` Whitespace trimming is enabled by default. To override this behavior and preserve leading and trailing spaces: ```go-html-template {trim=false} {{ if eq $foo "bar" }} {{ print "foo is bar" }} {{ end }} ``` ### Shortcode calls Use this syntax : ```text {{}} {{%/* foo */%}} ``` ### Project configuration Use the [code-toggle shortcode](https://gohugo.io/contribute/documentation/#code-toggle) to include project configuration examples: {{< code-toggle file=hugo >}} baseURL = 'https://example.org/' languageCode = 'en-US' title = 'My Site' {{< /code-toggle >}} ### Front matter Use the [code-toggle shortcode](https://gohugo.io/contribute/documentation/#code-toggle) to include front matter examples: {{< code-toggle file=content/posts/my-first-post.md fm=true >}} title = 'My first post' date = 2023-11-09T12:56:07-08:00 draft = false {{< /code-toggle >}} Callouts -------- To visually emphasize important information, use callouts (admonitions). Callout types are case-insensitive. Effective March 8, 2025, we utilize only three of the five available types. * note (272 instances) * warning (2 instances) * caution (1 instance) Limiting the number of callout types helps us to use them consistently. > [!note] > Useful information that users should know, even when skimming content. Useful information that users should know, even when skimming content. > [!warning] > Urgent info that needs immediate user attention to avoid problems. Urgent info that needs immediate user attention to avoid problems. > [!caution] > Advises about risks or negative outcomes of certain actions. Advises about risks or negative outcomes of certain actions. > [!tip] > Helpful advice for doing things better or more easily. Helpful advice for doing things better or more easily. > [!important] > Key information users need to know to achieve their goal. Key information users need to know to achieve their goal. Shortcodes ---------- These shortcodes are commonly used throughout the documentation. Other shortcodes are available for specialized use. ### code-toggle Use the `code-toggle` shortcode to display examples of project configuration, front matter, or data files. This shortcode takes these arguments: config (`string`) The section of `hugo.Data.docs.config` to render. copy (`bool`) Whether to display a copy-to-clipboard button. Default is `false`. datakey: (`string`) The section of `hugo.Data.docs` to render. file (`string`) The file name to display above the rendered code. Omit the file extension for project configuration examples. fm (`bool`) Whether to render the code as front matter. Default is `false`. skipHeader (`bool`) Whether to omit top-level key(s) when rendering a section of `hugo.Data.docs.config`. {{< code-toggle file=hugo copy=true >}} baseURL = 'https://example.org/' languageCode = 'en-US' title = 'My Site' {{< /code-toggle >}} ### deprecated-in Use the `deprecated-in` shortcode to indicate that a feature is deprecated: {{< deprecated-in 0.144.0 />}} You can also include details: {{< deprecated-in 0.144.0 >}} Use [`hugo.IsServer`](/functions/hugo/isserver/) instead. {{< /deprecated-in >}} ### eturl Use the embedded template URL (`eturl`) shortcode to insert an absolute URL to the source code for an embedded template. The shortcode takes a single argument, the base file name of the template (omit the file extension). This is a link to the [embedded alias template]. [embedded alias template]: <{{% eturl alias %}}> ### glossary-term Use the `glossary-term` shortcode to insert the definition of the given glossary term. {{% glossary-term scalar %}} ### include Use the `include` shortcode to include content from another page. {{% include "_common/glob-patterns.md" %}} ### new-in Use the `new-in` shortcode to indicate a new feature: {{< new-in 0.144.0 />}} You can also include details: {{< new-in 0.144.0 >}} This is a new feature. {{< /new-in >}} New features ------------ Use the [new-in](https://gohugo.io/contribute/documentation/#new-in) shortcode to indicate a new feature. The new-in shortcode will trigger a build warning if the specified version is older than a predefined threshold, based on differences in major and minor versions. This serves as a reminder to remove this shortcode call. See [details](https://github.com/gohugoio/hugoDocs/blob/master/layouts/_partials/layouts/blocks/feature-state.html) . Deprecated features ------------------- Use the [deprecated-in](https://gohugo.io/contribute/documentation/#deprecated-in) shortcode to indicate that a feature is deprecated. The deprecated-in shortcode will trigger a build warning if the specified version is older than a predefined threshold, based on differences in major and minor versions. This serves as a reminder to remove this shortcode call and the associated content. See [details](https://github.com/gohugoio/hugoDocs/blob/master/layouts/_partials/layouts/blocks/feature-state.html) . When deprecating a feature that has its own page, also set the `expiryDate` in front matter to two years from the date of deprecation. Include a brief comment to explain the setting: expiryDate: 2028-03-03 # deprecated 2026-03-03 in v0.157.0 GitHub workflow --------------- This section assumes that you have a working knowledge of Git and GitHub, and are comfortable working on the command line. Use this workflow to create and submit pull requests. Step 1 Fork the [documentation repository](https://github.com/gohugoio/hugoDocs/) . Step 2 Clone your fork. Step 3 Create a new branch with a descriptive name that includes the corresponding issue number, if any: git checkout -b restructure-foo-page-99999 Step 4 Make changes. Step 5 Build the site locally to preview your changes. Step 6 Commit your changes with a descriptive commit message: * Provide a summary on the first line, typically 50 characters or less, followed by a blank line. * Begin the summary with one of `content`, `theme`, `config`, `all`, or `misc`, followed by a colon, a space, and a brief description of the change beginning with a capital letter * Use imperative present tense * Optionally, provide a detailed description where each line is 72 characters or less, followed by a blank line. * Optionally, add one or more “Fixes” or “Closes” keywords, each on its own line, referencing the [issues](https://github.com/gohugoio/hugoDocs/issues) addressed by this change. For example: git commit -m "content: Restructure the taxonomy page This restructures the taxonomy page by splitting topics into logical sections, each with one or more examples. Fixes #9999 Closes #9998" Step 7 Push the new branch to your fork of the documentation repository. Step 8 Visit the [documentation repository](https://github.com/gohugoio/hugoDocs/) and create a pull request (PR). Step 9 A project maintainer will review your PR and may request changes. You may delete your branch after the maintainer merges your PR. * * * 1. The field is required, but its data is not. [↩︎](https://gohugo.io/contribute/documentation/#fnref:1)  [↩︎](https://gohugo.io/contribute/documentation/#fnref1:1) * * * Last updated: March 3, 2026 : [content: Update documentation contribution guide (63d4a992a)](https://github.com/gohugoio/hugoDocs/commit/63d4a992a25735a9cf38582d83c75dd6469b4ada) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/contribute/documentation.md) --- # collections.Delimit Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/delimit/](https://gohugo.io/images/qr/qr_aac86d90ba1cfc0c.png) Returns a string by joining the values of the given slice or map with a delimiter. Syntax collections.Delimit SLICE|MAP DELIMITER \[LAST\] Returns string Alias delimit Delimit a slice: {{ $s := slice "b" "a" "c" }} {{ delimit $s ", " }} → b, a, c {{ delimit $s ", " " and "}} → b, a and c Delimit a map: The `delimit` function sorts maps by key, returning the values. {{ $m := dict "b" 2 "a" 1 "c" 3 }} {{ delimit $m ", " }} → 1, 2, 3 {{ delimit $m ", " " and "}} → 1, 2 and 3 * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Delimit.md) --- # collections.After Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/after/](https://gohugo.io/images/qr/qr_9fbd37c81158edb2.png) Returns a slice containing the elements after the first N elements of the given slice. Syntax collections.After N SLICE Returns \[\]any Alias after The following shows `after` being used in conjunction with the [`slice`](https://gohugo.io/functions/collections/slice/) function: {{ $data := slice "one" "two" "three" "four" }}
      {{ range after 2 $data }}
    • {{ . }}
    • {{ end }}
    The template above is rendered to:
    • three
    • four
    Example of `after` with `first`: 2nd–4th most recent articles ------------------------------------------------------------- You can use `after` in combination with the [`first`](https://gohugo.io/functions/collections/first/) function and Hugo’s [powerful sorting methods](https://gohugo.io/quick-reference/page-collections/#sort) . Let’s assume you have a `section` page at `example.com/articles`. You have 10 articles, but you want your template to show only two rows: 1. The top row is titled “Featured” and shows only the most recently published article (i.e. by `publishdate` in the content files’ front matter). 2. The second row is titled “Recent Articles” and shows only the 2nd- to 4th-most recently published articles. layouts/section/articles.html {{ define "main" }}

    Featured Article

    {{ range first 1 .Pages.ByPublishDate.Reverse }}

    {{ .Title }}

    {{ .Description }}

    {{ end }}

    Recent Articles

    {{ range first 3 (after 1 .Pages.ByPublishDate.Reverse) }}

    {{ .Title }}

    {{ .Description }}

    {{ end }}
    {{ end }} * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/After.md) --- # collections.Complement Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/complement/](https://gohugo.io/images/qr/qr_85de391e02b01c06.png) Returns a slice by identifying elements in the last given slice that do not appear in any of the preceding slices. Syntax collections.Complement SLICE \[SLICE...\] Returns \[\]any Alias complement To find the elements within `$c3` that do not exist in `$c1` or `$c2`: {{ $c1 := slice 3 }} {{ $c2 := slice 4 5 }} {{ $c3 := slice 1 2 3 4 5 }} {{ complement $c1 $c2 $c3 }} → [1 2] Make your code simpler to understand by using a [chained pipeline](https://pkg.go.dev/text/template#hdr-Pipelines) : {{ $c3 | complement $c1 $c2 }} → [1 2] You can also use the `complement` function with page collections. Let’s say your site has five content types: content/ ├── blog/ ├── books/ ├── faqs/ ├── films/ └── songs/ To list everything except blog articles (`blog`) and frequently asked questions (`faqs`): {{ $blog := where site.RegularPages "Type" "blog" }} {{ $faqs := where site.RegularPages "Type" "faqs" }} {{ range site.RegularPages | complement $blog $faqs }} {{ .LinkTitle }} {{ end }} Although the example above demonstrates the `complement` function, you could use the [`where`](https://gohugo.io/functions/collections/where/) function as well: {{ range where site.RegularPages "Type" "not in" (slice "blog" "faqs") }} {{ .LinkTitle }} {{ end }} In this example we use the `complement` function to remove [stop words](https://en.wikipedia.org/wiki/Stop_word) from a sentence: {{ $text := "The quick brown fox jumps over the lazy dog" }} {{ $stopWords := slice "a" "an" "in" "over" "the" "under" }} {{ $filtered := split $text " " | complement $stopWords }} {{ delimit $filtered " " }} → The quick brown fox jumps lazy dog * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Complement.md) --- # collections.Dictionary Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/dictionary/](https://gohugo.io/images/qr/qr_ada268b3dba23e8a.png) Returns a map created from the given key-value pairs. Syntax collections.Dictionary \[VALUE...\] Returns map\[string\]any Alias dict Specify the key-value pairs as individual arguments: {{ $m := dict "a" 1 "b" 2 }} The above produces this data structure: { "a": 1, "b": 2 } To create an empty map: {{ $m := dict }} Note that the `key` can be either a `string` or a `[]string`. The latter is useful to create a deeply nested structure, e.g.: {{ $m := dict (slice "a" "b" "c") "value" }} The above produces this data structure: { "a": { "b": { "c": "value" } } } * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Dictionary.md) --- # collections.First Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/first/](https://gohugo.io/images/qr/qr_58a1ddcbdd75802f.png) Returns the first N elements of the given slice or string. Syntax collections.First N SLICE|STRING Returns any Alias first {{ slice "a" "b" "c" | first 1 }} → [a] {{ slice "a" "b" "c" | first 2 }} → [a b] Given that a string is in effect a read-only slice of bytes, this function can be used to return the specified number of bytes from the beginning of the string: {{ "abc" | first 1 }} → a {{ "abc" | first 2 }} → ab Note that a _character_ may consist of multiple _bytes_: {{ "Schön" | first 3 }} → Sch {{ "Schön" | first 4 }} → Sch\xc3 {{ "Schön" | first 5 }} → Schö To use the `collections.First` function with a page collection: {{ range first 5 .Pages }} {{ .Render "summary" }} {{ end }} Set `N` to zero to return an empty slice: {{ $emptyPageCollection := first 0 .Pages }} Use `first` and [`where`](https://gohugo.io/functions/collections/where/) together: {{ range where .Pages "Section" "articles" | first 5 }} {{ .Render "summary" }} {{ end }} * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/First.md) --- # Deploy with rclone Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/host-and-deploy/deploy-with-rclone/](https://gohugo.io/images/qr/qr_bf5ea68fd2264978.png) Deploy your site with the rclone CLI. Assumptions ----------- * A web host running a web server. This could be a shared hosting environment or a VPS. * Access to your web host with any of the [protocols supported by rclone](https://rclone.org/#providers) , such as SFTP. * A functional static website built with Hugo * Deploying from an [Rclone](https://rclone.org/) compatible operating system * You have [installed Rclone](https://rclone.org/install/) . **NB**: You can remove `--interactive` in the commands below once you are comfortable with rclone, if you wish. Also, `--gc` and `--minify` are optional in the commands below. Getting started --------------- The spoiler is that you can even deploy your entire website from any compatible OS with no configuration. Using SFTP for example: hugo build --gc --minify rclone sync --interactive --sftp-host sftp.example.com --sftp-user www-data --sftp-ask-password public/ :sftp:www/ Configure Rclone for even easier usage -------------------------------------- The easiest way is simply to run `rclone config`. The [Rclone docs](https://rclone.org/docs/) provide [an example of configuring Rclone to use SFTP](https://rclone.org/sftp/) . For the next commands, we will assume you configured a remote you named `hugo-www`. The above ‘spoiler’ commands could become: hugo build --gc --minify rclone sync --interactive public/ hugo-www:www/ After you issue the above commands (and respond to any prompts), check your website and you will see that it is deployed. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/host-and-deploy/deploy-with-rclone.md) --- # Details shortcode Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/shortcodes/details/](https://gohugo.io/images/qr/qr_e633612b348188bc.png) Insert an HTML details element into your content using the details shortcode. [New in v0.140.0](https://github.com/gohugoio/hugo/releases/tag/v0.140.0) To override Hugo’s embedded `details` shortcode, copy the [source code](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_shortcodes/details.html) to a file with the same name in the `layouts/_shortcodes` directory. Example ------- With this markup: {{< details summary="See the details" >}} This is a **bold** word. {{< /details >}} Hugo renders this HTML:
    See the details

    This is a bold word.

    Which looks like this in your browser: See the details This is a **bold** word. Arguments --------- summary (`string`) The content of the child `summary` element rendered from Markdown to HTML. Default is `Details`. open (`bool`) Whether to initially display the content of the `details` element. Default is `false`. class (`string`) The `class` attribute of the `details` element. name (`string`) The `name` attribute of the `details` element. title (`string`) The `title` attribute of the `details` element. Styling ------- Use CSS to style the `details` element, the `summary` element, and the content itself. /* target the details element */ details { } /* target the summary element */ details > summary { } /* target the children of the summary element */ details > summary > * { } /* target the content */ details > :not(summary) { } * * * Last updated: December 19, 2025 : [Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)](https://github.com/gohugoio/hugoDocs/commit/7e1a08e545030efcad0ac52c1cf9469244bc3f2b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/shortcodes/details.md) --- # Fmt functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/fmt/](https://gohugo.io/images/qr/qr_f854da18740ffe1e.png) [### fmt.Errorf\ \ fmt.Errorf FORMAT \[INPUT\]\ \ Log an ERROR from a template.](https://gohugo.io/functions/fmt/errorf/) [### fmt.Erroridf\ \ fmt.Erroridf ID FORMAT \[INPUT\]\ \ Log a suppressible ERROR from a template.](https://gohugo.io/functions/fmt/erroridf/) [### fmt.Print\ \ fmt.Print INPUT\ \ Prints the default representation of the given arguments using the standard \`fmt.Print\` function.](https://gohugo.io/functions/fmt/print/) [### fmt.Printf\ \ fmt.Printf FORMAT \[INPUT\]\ \ Formats a string using the standard \`fmt.Sprintf\` function.](https://gohugo.io/functions/fmt/printf/) [### fmt.Println\ \ fmt.Println INPUT\ \ Prints the default representation of the given argument using the standard \`fmt.Print\` function and enforces a line break.](https://gohugo.io/functions/fmt/println/) [### fmt.Warnf\ \ fmt.Warnf FORMAT \[INPUT\]\ \ Log a WARNING from a template.](https://gohugo.io/functions/fmt/warnf/) [### fmt.Warnidf\ \ fmt.Warnidf ID FORMAT \[INPUT\]\ \ Log a suppressible WARNING from a template.](https://gohugo.io/functions/fmt/warnidf/) --- # Hash functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/hash/](https://gohugo.io/images/qr/qr_a29df323fff0a3d5.png) [### hash.FNV32a\ \ hash.FNV32a STRING\ \ Returns the 32-bit FNV (Fowler-Noll-Vo) non-cryptographic hash of the given string.](https://gohugo.io/functions/hash/fnv32a/) [### hash.XxHash\ \ hash.XxHash STRING\ \ Returns the 64-bit xxHash non-cryptographic hash of the given string.](https://gohugo.io/functions/hash/xxhash/) --- # collections.In Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/in/](https://gohugo.io/images/qr/qr_3110a73704241767.png) Reports whether a value exists within the given slice or string. Syntax collections.In SLICE|STRING VALUE Returns bool Alias in {{ $s := slice "a" "b" "c" }} {{ in $s "b" }} → true {{ $s := "abc" }} {{ in $s "b" }} → true * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/In.md) --- # fmt.Errorf Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/fmt/errorf/](https://gohugo.io/images/qr/qr_f678a5db4e8ffd1d.png) Log an ERROR from a template. Syntax fmt.Errorf FORMAT \[INPUT\] Returns string Alias errorf The documentation for Go’s [fmt](https://pkg.go.dev/fmt) package describes the structure and content of the format string. The `errorf` function evaluates the format string, then prints the result to the ERROR log and fails the build. {{ errorf "The %q shortcode requires a src argument. See %s" .Name .Position }} Use the [`erroridf`](https://gohugo.io/functions/fmt/erroridf/) function to allow optional suppression of specific errors. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/fmt/Errorf.md) --- # hash.FNV32a Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/hash/fnv32a/](https://gohugo.io/images/qr/qr_2dc6eafe7b609b62.png) Returns the 32-bit FNV (Fowler-Noll-Vo) non-cryptographic hash of the given string. Syntax hash.FNV32a STRING Returns int {{ hash.FNV32a "Hello world" }} → 1498229191 * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/hash/FNV32a.md) --- # collections.Reverse Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/reverse/](https://gohugo.io/images/qr/qr_4acf9533dc17a181.png) Returns a slice by reversing the order of elements in the given slice. Syntax collections.Reverse SLICE Returns \[\]any {{ slice 2 1 3 | collections.Reverse }} → [3 1 2] * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Reverse.md) --- # collections.Intersect Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/intersect/](https://gohugo.io/images/qr/qr_70b467e91ad3e386.png) Returns a slice containing the common elements found in two given slices, in the same order as the first slice. Syntax collections.Intersect SLICE1 SLICE2 Returns \[\]any Alias intersect A useful example is to use it as `AND` filters when combined with where: {{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }} {{ $pages := $pages | union (where .Site.RegularPages "Params.pinned" true) }} {{ $pages := $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }} The above fetches regular pages not of `page` or `about` type unless they are pinned. And finally, we exclude all pages with no `images` set in Page parameters. See [union](https://gohugo.io/functions/collections/union/) for `OR`. * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Intersect.md) --- # collections.Index Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/indexfunction/](https://gohugo.io/images/qr/qr_144c7b72b6b1e75c.png) Returns an element or value from the given slice or map at the specified key(s). Syntax collections.Index SLICE|MAP KEY... Returns any Alias index Each indexed item must be a map or a slice: {{ $s := slice "a" "b" "c" }} {{ index $s 0 }} → a {{ index $s 1 }} → b {{ $m := dict "a" 100 "b" 200 }} {{ index $m "b" }} → 200 Use two or more keys to access a nested value: {{ $m := dict "a" 100 "b" 200 "c" (slice 10 20 30) }} {{ index $m "c" 1 }} → 20 {{ $m := dict "a" 100 "b" 200 "c" (dict "d" 10 "e" 20) }} {{ index $m "c" "e" }} → 20 You may also use a slice of keys to access a nested value: {{ $m := dict "a" 100 "b" 200 "c" (dict "d" 10 "e" 20) }} {{ $s := slice "c" "e" }} {{ index $m $s }} → 20 Use the `collections.Index` function to access a nested value when the key is variable. For example, these are equivalent: {{ .Site.Params.foo }} {{ $k := "foo" }} {{ index .Site.Params $k }} * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/IndexFunction.md) --- # collections.Slice Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/slice/](https://gohugo.io/images/qr/qr_cc7fc30599894d1.png) Returns a slice created from the given values. Syntax collections.Slice \[VALUE...\] Returns \[\]any Alias slice {{ $s := slice "a" "b" "c" }} {{ $s }} → [a b c] To create an empty slice: {{ $s := slice }} * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Slice.md) --- # Deploy with rsync Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/host-and-deploy/deploy-with-rsync/](https://gohugo.io/images/qr/qr_7c85b20213ca1554.png) Deploy your site with the rsync CLI. Assumptions ----------- * A web host running a web server. This could be a shared hosting environment or a VPS. * Access to your web host with SSH * A functional static website built with Hugo The spoiler is that you can deploy your entire website with a command that looks like the following: hugo && rsync -avz --delete public/ www-data@ftp.topologix.fr:~/www/ As you will see, we’ll put this command in a shell script file, which makes building and deployment as easy as executing `./deploy`. Copy Your SSH Key to your host ------------------------------ To make logging in to your server more secure and less interactive, you can upload your SSH key. If you have already installed your SSH key to your server, you can move on to the next section. First, install the ssh client. On Debian distributions, use the following command: install-openssh.sh sudo apt-get install openssh-client Then generate your ssh key. First, create the `.ssh` directory in your home directory if it doesn’t exist: ~$ cd && mkdir .ssh & cd .ssh Next, execute this command to generate a new keypair called `rsa_id`: ~/.ssh/$ ssh-keygen -t rsa -q -C "For SSH" -f rsa_id You’ll be prompted for a passphrase, which is an extra layer of protection. Enter the passphrase you’d like to use, and then enter it again when prompted, or leave it blank if you don’t want to have a passphrase. Not using a passphrase will let you transfer files non-interactively, as you won’t be prompted for a password when you log in, but it is slightly less secure. To make logging in easier, add a definition for your web host to the file `~/.ssh/config` with the following command, replacing `HOST` with the IP address or hostname of your web host, and `USER` with the username you use to log in to your web host when transferring files: ~/.ssh/$ cat >> config < Hugo renders this to: * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/fmt/Printf.md) --- # fmt.Print Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/fmt/print/](https://gohugo.io/images/qr/qr_aa03b5f7b6bf116c.png) Prints the default representation of the given arguments using the standard `fmt.Print` function. Syntax fmt.Print INPUT Returns string Alias print {{ print "foo" }} → foo {{ print "foo" "bar" }} → foobar {{ print (slice 1 2 3) }} → [1 2 3] * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/fmt/Print.md) --- # fmt.Println Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/fmt/println/](https://gohugo.io/images/qr/qr_eb8eb37e1bc0a1cf.png) Prints the default representation of the given argument using the standard `fmt.Print` function and enforces a line break. Syntax fmt.Println INPUT Returns string Alias println {{ println "foo" }} → foo\n {{ println "foo" "bar" }} → foo bar\n * * * Last updated: December 19, 2025 : [Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)](https://github.com/gohugoio/hugoDocs/commit/7e1a08e545030efcad0ac52c1cf9469244bc3f2b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/fmt/Println.md) --- # hash.XxHash Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/hash/xxhash/](https://gohugo.io/images/qr/qr_3ef363f20a4e0f4b.png) Returns the 64-bit xxHash non-cryptographic hash of the given string. Syntax hash.XxHash STRING Returns string Alias xxhash {{ hash.XxHash "Hello world" }} → c500b0c912b376d8 [xxHash](https://xxhash.com/) is a very fast non-cryptographic hash algorithm. Hugo uses [this Go implementation](https://github.com/cespare/xxhash) . * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/hash/XxHash.md) --- # Configure file caches Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/configuration/caches/](https://gohugo.io/images/qr/qr_566457e11ab70330.png) Configure file caches. This is the default configuration: caches: assets: dir: :resourceDir/_gen maxAge: -1 getresource: dir: :cacheDir/:project maxAge: -1 images: dir: :resourceDir/_gen maxAge: -1 misc: dir: :cacheDir/:project maxAge: -1 modulegitinfo: dir: :cacheDir/modules maxAge: 24h modulequeries: dir: :cacheDir/modules maxAge: 24h modules: dir: :cacheDir/modules maxAge: -1 [caches] [caches.assets] dir = ':resourceDir/_gen' maxAge = -1 [caches.getresource] dir = ':cacheDir/:project' maxAge = -1 [caches.images] dir = ':resourceDir/_gen' maxAge = -1 [caches.misc] dir = ':cacheDir/:project' maxAge = -1 [caches.modulegitinfo] dir = ':cacheDir/modules' maxAge = '24h' [caches.modulequeries] dir = ':cacheDir/modules' maxAge = '24h' [caches.modules] dir = ':cacheDir/modules' maxAge = -1 { "caches": { "assets": { "dir": ":resourceDir/_gen", "maxAge": -1 }, "getresource": { "dir": ":cacheDir/:project", "maxAge": -1 }, "images": { "dir": ":resourceDir/_gen", "maxAge": -1 }, "misc": { "dir": ":cacheDir/:project", "maxAge": -1 }, "modulegitinfo": { "dir": ":cacheDir/modules", "maxAge": "24h" }, "modulequeries": { "dir": ":cacheDir/modules", "maxAge": "24h" }, "modules": { "dir": ":cacheDir/modules", "maxAge": -1 } } } Purpose ------- Hugo uses file caches to store data on disk, avoiding repeated operations within the same build and persisting data from one build to the next. assets Caches processed CSS and Sass resources. getresource Caches files fetched from remote URLs via the [`resources.GetRemote`](https://gohugo.io/functions/resources/getremote/) function. images Caches processed images. misc Caches miscellaneous data. modulegitinfo Caches Git information for modules. modulequeries Caches the results of module resolution queries. modules Caches downloaded modules. Keys ---- dir (`string`) The absolute file system path where Hugo stores the cached files. You can begin the path with the `:cacheDir` or `:resourceDir` [tokens](https://gohugo.io/configuration/caches/#tokens) to anchor the cache to specific system or project locations. maxAge (`string`) The duration a cached entry remains valid before being evicted, expressed as a [duration](https://gohugo.io/quick-reference/glossary/#duration) . A value of `0` disables the cache for that key, and a value of `-1` means the cache entry never expires. Default is `-1`. Tokens ------ `:cacheDir` (`string`) The designated cache directory. See [details](https://gohugo.io/configuration/all/#cachedir) . `:project` (`string`) The base directory name of the current Hugo project. This ensures isolated file caches for each project, preventing the `hugo build --gc` command from affecting other projects on the same machine. `:resourceDir` (`string`) The designated directory for caching output from [asset pipelines](https://gohugo.io/quick-reference/glossary/#asset-pipeline) . See [details](https://gohugo.io/configuration/all/#resourcedir) . Garbage collection ------------------ As you modify your site or change your configuration, cached files from previous builds may remain on disk, consuming unnecessary space. Use the `hugo build --gc` command to remove these expired or unused entries from the file cache. * * * Last updated: February 27, 2026 : [content: Miscellaneous udpates for v0.157.0 (35da1aa3c)](https://github.com/gohugoio/hugoDocs/commit/35da1aa3c2fe3b54bdb57df1a308533844af9df5) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/configuration/caches.md) --- # collections.D Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/d/](https://gohugo.io/images/qr/qr_59f79bd8da9fc36c.png) Returns a sorted slice of unique random integers based on a given seed, count, and maximum value. Syntax collections.D SEED N HIGH Returns \[\]int [New in v0.149.0](https://github.com/gohugoio/hugo/releases/tag/v0.149.0) The `collections.D` function returns a sorted slice of unique random integers in the half-open [interval](https://gohugo.io/quick-reference/glossary/#interval) `[0, HIGH)` using the provided [`SEED`](https://gohugo.io/quick-reference/glossary/#seed)\ value. The number of elements in the resulting slice is `N` or `HIGH`, whichever is less.\ \ * `N` and `H` must be integers in the closed interval `[0, 1000000]`\ * `SEED` must be an integer in the closed interval `[0, 2^64 - 1]`\ \ Return values\ -------------\ \ | Condition | Return value | |\ | --- | --- | --- |\ | `N <= HIGH` | A sorted random sample of size `N` using J. S. Vitter’s [Method D](https://getkerf.wordpress.com/2016/03/30/the-best-algorithm-no-one-knows-about/)
    for sequential random sampling | |\ | `N > HIGH` | The full, sorted range `[0, HIGH)` of size `HIGH` | |\ | `N == 0` | An empty slice | |\ | `N < 0` | Error | |\ | `N > 10^6` | Error | |\ | `HIGH == 0` | An empty slice | |\ | `HIGH < 0` | Error | |\ | `HIGH > 10^6` | Error | |\ | `SEED < 0` | Error | |\ \ Examples\ --------\ \ {{ collections.D 6 7 42 }} → [4, 9, 10, 20, 22, 24, 41]\ \ The example above generates the _same_ random numbers each time it is called. To generate a _different_ set of 7 random numbers in the same range, change the seed value.\ \ {{ collections.D 2 7 42 }} → [3, 11, 19, 25, 32, 33, 38]\ \ When `N` is greater than `HIGH`, this function returns the full, sorted range \[0, `HIGH`) of size `HIGH`:\ \ {{ collections.D 6 42 7 }} → [0 1 2 3 4 5 6]\ \ A common use case is the selection of random pages from a page collection. For example, to render a list of 5 random pages using the [day of the year](https://gohugo.io/methods/time/yearday/)\ as the seed value:\ \
      \ {{ $p := site.RegularPages }}\ {{ range collections.D time.Now.YearDay 5 ($p | len) }}\ {{ with (index $p .) }}\
    • {{ .LinkTitle }}
    • \ {{ end }}\ {{ end }}\
    \ \ The construct above is significantly faster than using the [`collections.Shuffle`](https://gohugo.io/functions/collections/shuffle/)\ function.\ \ Seed value\ ----------\ \ Choosing an appropriate seed value depends on your objective.\ \ | Objective | Seed example |\ | --- | --- |\ | Consistent result | `42` |\ | Different result on each call | `int time.Now.UnixNano` |\ | Same result per day | `time.Now.YearDay` |\ | Same result per page | `hash.FNV32a .Path` |\ | Different result per page per day | `hash.FNV32a (print .Path time.Now.YearDay)` |\ \ * * *\ \ Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b)\ \ [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/D.md) --- # collections.Group Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/group/](https://gohugo.io/images/qr/qr_cfd125b98b6332de.png) Returns a map by grouping the given page collection (slice) by a specific key. Syntax collections.Group KEY PAGES Returns page.PageGroup Alias group {{ $new := .Site.RegularPages | first 10 | group "New" }} {{ $old := .Site.RegularPages | last 10 | group "Old" }} {{ $groups := slice $new $old }} {{ range $groups }}

    {{ .Key }}{{/* Prints "New", "Old" */}}

      {{ range .Pages }}
    • {{ .LinkTitle }}
      {{ .Date.Format "Mon, Jan 2, 2006" }}
    • {{ end }}
    {{ end }} The page group you get from `group` is of the same type you get from the built-in [group methods](https://gohugo.io/quick-reference/page-collections/#group) in Hugo. The example above can be [paginated](https://gohugo.io/templates/pagination/) . * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Group.md) --- # collections.IsSet Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/isset/](https://gohugo.io/images/qr/qr_9991caaa59f03807.png) Reports whether a specific key or index exists in the given map or slice. Syntax collections.IsSet MAP|SLICE KEY|INDEX Returns bool Alias isset For example, consider this project configuration: params: showHeroImage: false [params] showHeroImage = false { "params": { "showHeroImage": false } } If the value of `showHeroImage` is `true`, we can detect that it exists using either `if` or `with`: {{ if site.Params.showHeroImage }} {{ site.Params.showHeroImage }} → true {{ end }} {{ with site.Params.showHeroImage }} {{ . }} → true {{ end }} But if the value of `showHeroImage` is `false`, we can’t use either `if` or `with` to detect its existence. In this case, you must use the `isset` function: {{ if isset site.Params "showheroimage" }}

    The showHeroImage parameter is set to {{ site.Params.showHeroImage }}.

    {{ end }} When using the `isset` function you must reference the key using lower case. See the previous example. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/IsSet.md) --- # collections.Merge Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/merge/](https://gohugo.io/images/qr/qr_7b8e491a88e6f5e5.png) Returns a map by combining two or more given maps. Syntax collections.Merge MAP MAP... Returns map\[string\]any Alias merge Returns the result of merging two or more maps from left to right. If a key already exists, `merge` updates its value. If a key is absent, `merge` inserts the value under the new key. Key handling is case-insensitive. The following examples use these map definitions: {{ $m1 := dict "x" "foo" }} {{ $m2 := dict "x" "bar" "y" "wibble" }} {{ $m3 := dict "x" "baz" "y" "wobble" "z" (dict "a" "huey") }} Example 1 {{ $merged := merge $m1 $m2 $m3 }} {{ $merged.x }} → baz {{ $merged.y }} → wobble {{ $merged.z.a }} → huey Example 2 {{ $merged := merge $m3 $m2 $m1 }} {{ $merged.x }} → foo {{ $merged.y }} → wibble {{ $merged.z.a }} → huey Example 3 {{ $merged := merge $m2 $m3 $m1 }} {{ $merged.x }} → foo {{ $merged.y }} → wobble {{ $merged.z.a }} → huey Example 4 {{ $merged := merge $m1 $m3 $m2 }} {{ $merged.x }} → bar {{ $merged.y }} → wibble {{ $merged.z.a }} → huey Regardless of depth, merging only applies to maps. For slices, use [append](https://gohugo.io/functions/collections/append/) . * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Merge.md) --- # collections.Seq Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/seq/](https://gohugo.io/images/qr/qr_3c444b3a8bd87d4e.png) Returns a slice of integers starting from 1 or a given value, incrementing by 1 or a given value, and ending at a given value. Syntax collections.Seq LAST collections.Seq FIRST LAST collections.Seq FIRST INCREMENT LAST Returns \[\]int Alias seq {{ seq 2 }} → [1 2] {{ seq 0 2 }} → [0 1 2] {{ seq -2 2 }} → [-2 -1 0 1 2] {{ seq -2 2 2 }} → [-2 0 2] A contrived example of iterating over a sequence of integers: {{ $product := 1 }} {{ range seq 4 }} {{ $product = mul $product . }} {{ end }} {{ $product }} → 24 The slice created by this function is limited to 1 million elements. * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Seq.md) --- # collections.Last Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/last/](https://gohugo.io/images/qr/qr_8c3d0b4aa59fd7a6.png) Returns the last N elements of the given slice or string. Syntax collections.Last N SLICE|STRING Returns any Alias last {{ slice "a" "b" "c" | last 1 }} → [c] {{ slice "a" "b" "c" | last 2 }} → [b c] Given that a string is in effect a read-only slice of bytes, this function can be used to return the specified number of bytes from the end of the string: {{ "abc" | last 1 }} → c {{ "abc" | last 2 }} → bc Note that a _character_ may consist of multiple _bytes_: {{ "Schön" | last 1 }} → n {{ "Schön" | last 2 }} → \xb6n {{ "Schön" | last 3 }} → ön To use the `collections.Last` function with a page collection: {{ range last 5 .Pages }} {{ .Render "summary" }} {{ end }} Set `N` to zero to return an empty slice: {{ $emptyPageCollection := last 0 .Pages }} Use `last` and [`where`](https://gohugo.io/functions/collections/where/) together: {{ range where .Pages "Section" "articles" | last 5 }} {{ .Render "summary" }} {{ end }} * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Last.md) --- # collections.SymDiff Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/symdiff/](https://gohugo.io/images/qr/qr_5389e042c53cfe10.png) Returns a slice containing the symmetric difference of two given slices. Syntax SLICE1 | collections.SymDiff SLICE2 Returns \[\]any Alias symdiff Example: {{ slice 1 2 3 | symdiff (slice 3 4) }} → [1 2 4] Also see [https://en.wikipedia.org/wiki/Symmetric\_difference](https://en.wikipedia.org/wiki/Symmetric_difference) . * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/SymDiff.md) --- # collections.Querify Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/querify/](https://gohugo.io/images/qr/qr_e7a139409b8b320f.png) Returns a URL query string from the given map, slice, or sequence of key-value pairs. Syntax collections.Querify MAP|SLICE|KEY VALUE... Returns string Alias querify Specify the key-value pairs as a map, a slice, or a sequence of scalar values. For example, the following are equivalent: {{ collections.Querify (dict "a" 1 "b" 2) }} {{ collections.Querify (slice "a" 1 "b" 2) }} {{ collections.Querify "a" 1 "b" 2 }} To append a query string to a URL: {{ $qs := collections.Querify (dict "a" 1 "b" 2) }} {{ $href := printf "https://example.org?%s" $qs }} Link Hugo renders this to: Link You can also pass in a map from your project configuration or front matter. For example: --- params: query: a: 1 b: 2 title: Example --- +++ title = 'Example' [params] [params.query] a = 1 b = 2 +++ { "params": { "query": { "a": 1, "b": 2 } }, "title": "Example" } {{ collections.Querify .Params.query }} * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Querify.md) --- # Content Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/resource/content/](https://gohugo.io/images/qr/qr_ebc1d649fb559ba3.png) Returns the content of the given resource. Syntax RESOURCE.Content Returns any Use this method with [global resources](https://gohugo.io/quick-reference/glossary/#global-resource) , [page resources](https://gohugo.io/quick-reference/glossary/#page-resource) , or [remote resources](https://gohugo.io/quick-reference/glossary/#remote-resource) . The `Content` method on a `Resource` object returns `template.HTML` when the [resource type](https://gohugo.io/methods/resource/resourcetype/) is `page`, otherwise it returns a `string`. assets/quotations/kipling.txt He travels the fastest who travels alone. To get the content: {{ with resources.Get "quotations/kipling.txt" }} {{ .Content }} → He travels the fastest who travels alone. {{ end }} To get the size in bytes: {{ with resources.Get "quotations/kipling.txt" }} {{ .Content | len }} → 42 {{ end }} To create an inline image: {{ with resources.Get "images/a.jpg" }} {{ end }} To create inline CSS: {{ with resources.Get "css/style.css" }} {{ end }} To create inline JavaScript: {{ with resources.Get "js/script.js" }} {{ end }} * * * Last updated: August 23, 2025 : [Merge commit 'bfa74537929f409fca841540b971125b7678963a' (6c911d1e5)](https://github.com/gohugoio/hugoDocs/commit/6c911d1e52fb9c8065c079820327f4b0e37529d4) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/resource/Content.md) --- # Fingerprint Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/hugo-pipes/fingerprint/](https://gohugo.io/images/qr/qr_40416c01c3b202d6.png) Cryptographically hash the content of the given resource. See the [`resources.Fingerprint`](https://gohugo.io/functions/resources/fingerprint/) function. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/hugo-pipes/fingerprint.md) --- # fmt.Warnf Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/fmt/warnf/](https://gohugo.io/images/qr/qr_940fb0cfbd47aec2.png) Log a WARNING from a template. Syntax fmt.Warnf FORMAT \[INPUT\] Returns string Alias warnf The documentation for Go’s [fmt](https://pkg.go.dev/fmt) package describes the structure and content of the format string. The `warnf` function evaluates the format string, then prints the result to the WARNING log. Hugo prints each unique message once to avoid flooding the log with duplicate warnings. {{ warnf "The %q shortcode was unable to find %s. See %s" .Name $file .Position }} Use the [`warnidf`](https://gohugo.io/functions/fmt/warnidf/) function to allow optional suppression of specific warnings. To prevent suppression of duplicate messages when using `warnf` for debugging, make each message unique with the [`math.Counter`](https://gohugo.io/functions/math/counter/) function. For example: {{ range site.RegularPages }} {{ .Section | warnf "%#[2]v [%[1]d]" math.Counter }} {{ end }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/fmt/Warnf.md) --- # fmt.Warnidf Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/fmt/warnidf/](https://gohugo.io/images/qr/qr_1827e7300c98016b.png) Log a suppressible WARNING from a template. Syntax fmt.Warnidf ID FORMAT \[INPUT\] Returns string Alias warnidf The documentation for Go’s [fmt](https://pkg.go.dev/fmt) package describes the structure and content of the format string. The `warnidf` function evaluates the format string, then prints the result to the WARNING log. Unlike the [`warnf`](https://gohugo.io/functions/fmt/warnf/) function, you may suppress warnings logged by the `warnidf` function by adding the message ID to the `ignoreLogs` array in your project configuration. This template code: {{ warnidf "warning-42" "You should consider fixing this." }} Produces this console log: WARN You should consider fixing this. You can suppress this warning by adding the following to your project configuration: ignoreLogs = ['warning-42'] To suppress this message: ignoreLogs: - warning-42 ignoreLogs = ['warning-42'] { "ignoreLogs": [\ "warning-42"\ ] } * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/fmt/Warnidf.md) --- # Glob patterns Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/quick-reference/glob-patterns/](https://gohugo.io/images/qr/qr_6f2e896a6161e880.png) A quick reference guide to glob pattern syntax and matching rules for wildcards, character sets, and delimiters, featuring illustrative examples. A _glob pattern_ is a pattern used to match sets of values. It is a shorthand for specifying multiple targets at once, making it easier to work with groups of data or configurations. The table below details the supported glob pattern syntax and its matching behavior. Each example illustrates a specific match type, the pattern used, and the expected boolean result when evaluated against a test string. | Match type | Glob pattern | Test string | Match? | | --- | --- | --- | --- | | Simple wildcard | `a/*.md` | `a/page.md` | true | | Literal match | `'a/*.md'` | `a/*.md` | true | | Single-level wildcard | `a/*/page.md` | `a/b/page.md` | true | | Single-level wildcard | `a/*/page.md` | `a/b/c/page.md` | false | | Multi-level wildcard | `a/**/page.md` | `a/b/c/page.md` | true | | Single character | `file.???` | `file.txt` | true | | Single character | `file.???` | `file.js` | false | | Delimiter exclusion | `?at` | `f/at` | false | | Character list | `f.[jt]xt` | `f.txt` | true | | Negated list | `f.[!j]xt` | `f.txt` | true | | Character range | `f.[a-c].txt` | `f.b.txt` | true | | Character range | `f.[a-c].txt` | `f.z.txt` | false | | Negated range | `f.[!a-c].txt` | `f.z.txt` | true | | Pattern alternates | `*.{jpg,png}` | `logo.png` | true | | No match | `*.{jpg,png}` | `logo.webp` | false | The matching logic follows these rules: * Standard wildcard (`*`) matches any character except for a delimiter. * Super wildcard (`**`) matches any character including delimiters. * Single character (`?`) matches exactly one character, excluding delimiters. * Negation (`!`) matches any character except those specified in a list or range when used inside brackets. * Character ranges (`[a-z]`) match any single character within the specified range. The delimiter is a slash (`/`), except when matching semantic version strings, where the delimiter is a dot (`.`). * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/quick-reference/glob-patterns.md) --- # Comments Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/content-management/comments/](https://gohugo.io/images/qr/qr_568c2b22cea7271.png) Hugo ships with an internal Disqus template, but this isn’t the only commenting system that will work with your new Hugo website. Hugo ships with support for [Disqus](https://disqus.com/) , a third-party service that provides comment and community capabilities to websites via JavaScript. Your theme may already support Disqus, but if not, it is easy to add to your templates via [Hugo’s built-in Disqus partial](https://gohugo.io/templates/embedded/#disqus) . Add Disqus ---------- Hugo comes with all the code you need to load Disqus into your templates. Before adding Disqus to your site, you’ll need to [set up an account](https://disqus.com/profile/signup/) . ### Configure Disqus Disqus comments require you set a single value in your [project configuration](https://gohugo.io/configuration/) : services: disqus: shortname: your-disqus-shortname [services] [services.disqus] shortname = 'your-disqus-shortname' { "services": { "disqus": { "shortname": "your-disqus-shortname" } } } For many websites, this is enough configuration. However, you also have the option to set the following in the [front matter](https://gohugo.io/content-management/front-matter/) of a single content file: * `disqus_identifier` * `disqus_title` * `disqus_url` ### Render Hugo’s built-in Disqus partial template Disqus has its own [internal template](https://gohugo.io/templates/embedded/#disqus) available, to render it add the following code where you want comments to appear: {{ partial "disqus.html" . }} Alternatives ------------ Commercial commenting systems: * [Commentix](https://www.commentix.com/) * [Emote](https://emote.com/) * [Graph Comment](https://graphcomment.com/) * [Hyvor Talk](https://talk.hyvor.com/) * [IntenseDebate](https://intensedebate.com/) * [ReplyBox](https://getreplybox.com/) Open-source commenting systems: * [Cactus Comments](https://cactus.chat/docs/integrations/hugo/) * [Comentario](https://gitlab.com/comentario/comentario/) * [Comma](https://github.com/Dieterbe/comma/) * [Commento](https://commento.io/) * [Discourse](https://meta.discourse.org/t/embed-discourse-comments-on-another-website-via-javascript/31963) * [Giscus](https://giscus.app/) * [Isso](https://isso-comments.de/) * [Remark42](https://remark42.com/) * [Staticman](https://staticman.net/) * [Talkyard](https://blog-comments.talkyard.io/) * [Utterances](https://utteranc.es/) * [Zoomment](https://zoomment.com/) * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/content-management/comments.md) --- # Configure cascade Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/configuration/cascade/](https://gohugo.io/images/qr/qr_dd7a03cc61ba34db.png) Configure cascade. You can configure your site to cascade front matter values to the home page and any of its descendants. However, this cascading will be prevented if the descendant already defines the field, or if a closer ancestor [node](https://gohugo.io/quick-reference/glossary/#node) has already cascaded a value for the same field through its front matter’s `cascade` key. You can also configure cascading behavior within a page’s front matter. See [details](https://gohugo.io/content-management/front-matter/#cascade-1) . For example, to cascade a “color” parameter to the home page and all its descendants: cascade: params: color: red [cascade] [cascade.params] color = 'red' { "cascade": { "params": { "color": "red" } } } Target ------ The `target`[1](https://gohugo.io/configuration/cascade/#fn:1) keyword allows you to target specific pages or [environments](https://gohugo.io/quick-reference/glossary/#environment) . For example, to cascade a “color” parameter to pages within the “articles” section, including the “articles” section page itself: cascade: params: color: red target: path: '{/articles,/articles/**}' [cascade] [cascade.params] color = 'red' [cascade.target] path = '{/articles,/articles/**}' { "cascade": { "params": { "color": "red" }, "target": { "path": "{/articles,/articles/**}" } } } Use any combination of these keywords to target pages and/or environments: environment (`string`) A [glob pattern](https://gohugo.io/quick-reference/glossary/#glob-pattern) matching the build [environment](https://gohugo.io/quick-reference/glossary/#environment) . For example: `{staging,production}`. kind (`string`) A [glob pattern](https://gohugo.io/quick-reference/glossary/#glob-pattern) matching the [page kind](https://gohugo.io/quick-reference/glossary/#page-kind) . For example: `{taxonomy,term}`. lang (`string`) A [glob pattern](https://gohugo.io/quick-reference/glossary/#glob-pattern) matching the [page language](https://gohugo.io/methods/page/language/) . For example: `{en,de}`. path (`string`) A [glob pattern](https://gohugo.io/quick-reference/glossary/#glob-pattern) matching the page’s [logical path](https://gohugo.io/quick-reference/glossary/#logical-path) . For example: `{/books,/books/**}`. Array ----- Define an array of cascade parameters to apply different values to different targets. For example: cascade: - params: color: red target: kind: page lang: '{en,de}' path: /books/** - params: color: blue target: environment: production kind: page path: /films/** [[cascade]] [cascade.params] color = 'red' [cascade.target] kind = 'page' lang = '{en,de}' path = '/books/**' [[cascade]] [cascade.params] color = 'blue' [cascade.target] environment = 'production' kind = 'page' path = '/films/**' { "cascade": [\ {\ "params": {\ "color": "red"\ },\ "target": {\ "kind": "page",\ "lang": "{en,de}",\ "path": "/books/**"\ }\ },\ {\ "params": {\ "color": "blue"\ },\ "target": {\ "environment": "production",\ "kind": "page",\ "path": "/films/**"\ }\ }\ ] } * * * 1. The `_target` alias for `target` is deprecated and will be removed in a future release. [↩︎](https://gohugo.io/configuration/cascade/#fnref:1) * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/configuration/cascade.md) --- # collections.Shuffle Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/shuffle/](https://gohugo.io/images/qr/qr_2888bbb30f84f676.png) Returns a slice by randomizing the element order of the given slice. Syntax collections.Shuffle SLICE Returns \[\]any Alias shuffle {{ collections.Shuffle (slice "a" "b" "c") }} → [b a c] The result will vary from one build to the next. To render an unordered list of 5 random pages from a page collection:

      {{ $p := site.RegularPages }} {{ range $p | collections.Shuffle | first 5 }}
    • {{ .LinkTitle }}
    • {{ end }}
    [New in v0.149.0](https://github.com/gohugoio/hugo/releases/tag/v0.149.0) Using the [`collections.D`](https://gohugo.io/functions/collections/d/) function for the same task is significantly faster. * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Shuffle.md) --- # collections.Uniq Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/uniq/](https://gohugo.io/images/qr/qr_dabac57202a564f5.png) Returns a slice by removing duplicate elements from the given slice. Syntax collections.Uniq SLICE Returns \[\]any Alias uniq {{ slice 1 3 2 1 | uniq }} → [1 3 2] * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Uniq.md) --- # collections.KeyVals Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/keyvals/](https://gohugo.io/images/qr/qr_25b380b4b28d5eb4.png) Returns a KeyVals struct by pairing a given key and values. Syntax collections.KeyVals KEY VALUE... Returns types.KeyValues Alias keyVals The primary application for this function is the definition of the `namedSlices` value in the options map passed to the [`Related`](https://gohugo.io/methods/pages/related/) method on the `Pages` object. See [related content](https://gohugo.io/content-management/related-content/) . {{ $kv := keyVals "foo" "a" "b" "c" }} The resulting data structure is: { "Key": "foo", "Values": [\ "a",\ "b",\ "c"\ ] } To extract the key and values: {{ $kv.Key }} → foo {{ $kv.Values }} → [a b c] * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/KeyVals.md) --- # collections.Union Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/union/](https://gohugo.io/images/qr/qr_c05fefbd381c42ae.png) Returns a slice containing the unique elements from two given slices. Syntax collections.Union SLICE1 SLICE2 Returns \[\]any Alias union {{ union (slice 1 2 3) (slice 3 4 5) }} → [1 2 3 4 5] {{ union (slice 1 2 3) nil }} → [1 2 3] {{ union nil (slice 1 2 3) }} → [1 2 3] {{ union nil nil }} → [] OR filter in where query ------------------------ This is also very useful to use as `OR` filters when combined with where: {{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }} {{ $pages = $pages | union (where .Site.RegularPages "Params.pinned" true) }} {{ $pages = $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }} The above fetches regular pages not of `page` or `about` type unless they are pinned. And finally, we exclude all pages with no `images` set in Page parameters. See [intersect](https://gohugo.io/functions/collections/intersect/) for `AND`. * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Union.md) --- # Figure shortcode Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/shortcodes/figure/](https://gohugo.io/images/qr/qr_a0c5b37fba11001a.png) Insert an HTML figure element into your content using the figure shortcode. To override Hugo’s embedded `figure` shortcode, copy the [source code](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_shortcodes/figure.html) to a file with the same name in the `layouts/_shortcodes` directory. Example ------- With this markup: {{< figure src="/images/examples/zion-national-park.jpg" alt="A photograph of Zion National Park" link="https://www.nps.gov/zion/index.htm" caption="Zion National Park" class="ma0 w-75" >}} Hugo renders this HTML:
    A photograph of Zion National Park

    Zion National Park

    Which looks like this in your browser: [![A photograph of Zion National Park](https://gohugo.io/images/examples/zion-national-park.jpg)](https://www.nps.gov/zion/index.htm) Zion National Park Arguments --------- src (`string`) The `src` attribute of the `img` element. Typically this is a [page resource](https://gohugo.io/quick-reference/glossary/#page-resource) or a [global resource](https://gohugo.io/quick-reference/glossary/#global-resource) . alt (`string`) The `alt` attribute of the `img` element. width (`int`) The `width` attribute of the `img` element. height (`int`) The `height` attribute of the `img` element. loading (`string`) The `loading` attribute of the `img` element. class (`string`) The `class` attribute of the `figure` element. link (`string`) The `href` attribute of the anchor element that wraps the `img` element. target (`string`) The `target` attribute of the anchor element that wraps the `img` element. rel (`rel`) The `rel` attribute of the anchor element that wraps the `img` element. title (`string`) Within the `figurecaption` element, the title is at the top, wrapped within an `h4` element. caption (`string`) Within the `figurecaption` element, the caption is at the bottom and may contain plain text or markdown. attr (`string`) Within the `figurecaption` element, the attribution appears next to the caption and may contain plain text or markdown. attrlink (`string`) The `href` attribute of the anchor element that wraps the attribution. Image location -------------- The `figure` shortcode resolves internal Markdown destinations by looking for a matching [page resource](https://gohugo.io/quick-reference/glossary/#page-resource) , falling back to a matching [global resource](https://gohugo.io/quick-reference/glossary/#global-resource) . Remote destinations are passed through, and the render hook will not throw an error or warning if unable to resolve a destination. You must place global resources in the `assets` directory. If you have placed your resources in the `static` directory, and you are unable or unwilling to move them, you must mount the `static` directory to the `assets` directory by including both of these entries in your project configuration: module: mounts: - source: assets target: assets - source: static target: assets [module] [[module.mounts]] source = 'assets' target = 'assets' [[module.mounts]] source = 'static' target = 'assets' { "module": { "mounts": [\ {\ "source": "assets",\ "target": "assets"\ },\ {\ "source": "static",\ "target": "assets"\ }\ ] } } * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/shortcodes/figure.md) --- # Deploy with hugo Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/host-and-deploy/deploy-with-hugo-deploy/](https://gohugo.io/images/qr/qr_eeab06fdccef95fe.png) Deploy your site with the hugo CLI. Use the `hugo deploy` command to deploy your site Amazon S3, Azure Blob Storage, or Google Cloud Storage. This feature requires the Hugo extended/deploy edition. See the [installation](https://gohugo.io/installation/) section for details. Assumptions ----------- 1. You have completed the [Quick Start](https://gohugo.io/getting-started/quick-start/) or have a Hugo website you are ready to deploy and share with the world. 2. You have an account with the service provider ([AWS](https://aws.amazon.com/) , [Azure](https://azure.microsoft.com/) , or [Google Cloud](https://cloud.google.com/) ) that you want to deploy to. 3. You have authenticated. * AWS: [Install the CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html) and run [`aws configure`](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) . * Azure: [Install the CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) and run [`az login`](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli) . * Google Cloud: [Install the CLI](https://cloud.google.com/sdk) and run [`gcloud auth login`](https://cloud.google.com/sdk/gcloud/reference/auth/login) . Each service supports various authentication methods, including environment variables. See [details](https://gocloud.dev/howto/blob/#services) . 4. You have created a bucket to deploy to. If you want your site to be public, be sure to configure the bucket to be publicly readable as a static website. * AWS: [create a bucket](https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html) and [host a static website](https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteHosting.html) * Azure: [create a storage container](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal) and [host a static website](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website) * Google Cloud: [create a bucket](https://cloud.google.com/storage/docs/creating-buckets) and [host a static website](https://cloud.google.com/storage/docs/hosting-static-website) Configuration ------------- Create a deployment target in your [project configuration](https://gohugo.io/configuration/deployment/) . The only required parameters are [`name`](https://gohugo.io/configuration/deployment/#name) and [`url`](https://gohugo.io/configuration/deployment/#url) : deployment: targets: - name: production url: s3://my_bucket?region=us-west-1 [deployment] [[deployment.targets]] name = 'production' url = 's3://my_bucket?region=us-west-1' { "deployment": { "targets": [\ {\ "name": "production",\ "url": "s3://my_bucket?region=us-west-1"\ }\ ] } } Deploy ------ To deploy to a target: hugo deploy [--target=] This command syncs the contents of your local `public` directory (the default publish directory) with the destination bucket. If no target is specified, Hugo deploys to the first configured target. For more command-line options, see `hugo help deploy` or the [CLI documentation](https://gohugo.io/commands/hugo_deploy/) . ### File list creation `hugo deploy` creates local and remote file lists by traversing the local publish directory and the remote bucket. Inclusion and exclusion are determined by the deployment target’s [configuration](https://gohugo.io/configuration/deployment/#targets-1) : * `include`: All files are skipped by default except those that match the pattern. * `exclude`: Files matching the pattern are skipped. During local file list creation, Hugo skips `.DS_Store` files and hidden directories (those starting with a period, like `.git`), except for the [`.well-known`](https://en.wikipedia.org/wiki/Well-known_URI) directory, which is traversed if present. ### File list comparison Hugo compares the local and remote file lists to identify necessary changes. It first compares file names. If both exist, it compares sizes and MD5 checksums. Any difference triggers a re-upload, and remote files not present locally are deleted. Excluded remote files (due to `include`/`exclude` configuration) won’t be deleted. The `--force` flag forces all files to be re-uploaded, even if Hugo detects no local/remote differences. The `--confirm` or `--dryRun` flags cause Hugo to display the detected differences and then pause or stop. ### Synchronization Hugo applies the changes to the remote bucket: uploading missing or changed files and deleting remote files not present locally. Uploaded file headers are configured remotely based on the matchers configuration. To prevent accidental data loss, Hugo will not delete more than 256 remote files by default. Use the `--maxDeletes` flag to override this limit. Advanced configuration ---------------------- See [configure deployment](https://gohugo.io/configuration/deployment/) . * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/host-and-deploy/deploy-with-hugo-deploy.md) --- # Content formats Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/content-management/formats/](https://gohugo.io/images/qr/qr_925609c5e33a1506.png) Create your content using Markdown, HTML, Emacs Org Mode, AsciiDoc, Pandoc, or reStructuredText. Introduction ------------ You may mix content formats throughout your site. For example: content/ └── posts/ ├── post-1.md ├── post-2.adoc ├── post-3.org ├── post-4.pandoc ├── post-5.rst └── post-6.html Regardless of content format, all content must have [front matter](https://gohugo.io/content-management/front-matter/) , preferably including both `title` and `date`. Hugo selects the content renderer based on the `markup` identifier in front matter, falling back to the file extension. See the [classification](https://gohugo.io/content-management/formats/#classification) table below for a list of markup identifiers and recognized file extensions. Formats ------- ### Markdown Create your content in [Markdown](https://daringfireball.net/projects/markdown/) preceded by front matter. Markdown is Hugo’s default content format. Hugo natively renders Markdown to HTML using [Goldmark](https://github.com/yuin/goldmark) . Goldmark is fast and conforms to the [CommonMark](https://spec.commonmark.org/current/) and [GitHub Flavored Markdown](https://github.github.com/gfm/) specifications. You can configure Goldmark in your [project configuration](https://gohugo.io/configuration/markup/#goldmark) . Hugo provides custom Markdown features including: [Attributes](https://gohugo.io/content-management/markdown-attributes/) Apply HTML attributes such as `class` and `id` to Markdown images and block elements including blockquotes, fenced code blocks, headings, horizontal rules, lists, paragraphs, and tables. [Extensions](https://gohugo.io/configuration/markup/#extensions) Leverage the embedded Markdown extensions to create tables, definition lists, footnotes, task lists, inserted text, mark text, subscripts, superscripts, and more. [Mathematics](https://gohugo.io/content-management/mathematics/) Include mathematical equations and expressions in Markdown using LaTeX markup. [Render hooks](https://gohugo.io/render-hooks/introduction/) Override the conversion of Markdown to HTML when rendering fenced code blocks, headings, images, and links. For example, render every standalone image as an HTML `figure` element. ### HTML Create your content in [HTML](https://developer.mozilla.org/en-US/docs/Learn_web_development/Getting_started/Your_first_website/Creating_the_content) preceded by front matter. The content is typically what you would place within an HTML document’s `body` or `main` element. ### Emacs Org Mode Create your content in the [Emacs Org Mode](https://orgmode.org/) format preceded by front matter. You can use Org Mode keywords for front matter. See [details](https://gohugo.io/content-management/front-matter/#emacs-org-mode) . ### AsciiDoc Create your content in the [AsciiDoc](https://asciidoc.org/) format preceded by front matter. Hugo renders AsciiDoc content to HTML using the Asciidoctor executable. You must install Asciidoctor and its dependencies (Ruby) to render the AsciiDoc content format. You can configure the AsciiDoc renderer in your [project configuration](https://gohugo.io/configuration/markup/#asciidoc) . In its default configuration, Hugo passes these CLI flags when calling the Asciidoctor executable: --no-header-footer The CLI flags passed to the Asciidoctor executable depend on configuration. You may inspect the flags when building your project: hugo build --logLevel info ### Pandoc Create your content in the [Pandoc](https://pandoc.org/MANUAL.html#pandocs-markdown) format[1](https://gohugo.io/content-management/formats/#fn:1) preceded by front matter. Hugo renders Pandoc content to HTML using the Pandoc executable. You must install Pandoc to render the Pandoc content format. Hugo passes these CLI flags when calling the Pandoc executable: --mathjax ### reStructuredText Create your content in the [reStructuredText](https://docutils.sourceforge.io/rst.html) format preceded by front matter. Hugo renders reStructuredText content to HTML using [Docutils](https://docutils.sourceforge.io/) , specifically rst2html. You must install Docutils and its dependencies (Python) to render the reStructuredText content format. Hugo passes these CLI flags when calling the rst2html executable: --leave-comments --initial-header-level=2 Classification -------------- | Content format | Media type | Identifier | File extensions | | --- | --- | --- | --- | | Markdown | `text/markdown` | `markdown` | `markdown`,`md`, `mdown` | | HTML | `text/html` | `html` | `htm`, `html` | | Emacs Org Mode | `text/org` | `org` | `org` | | AsciiDoc | `text/asciidoc` | `asciidoc` | `ad`, `adoc`, `asciidoc` | | Pandoc | `text/pandoc` | `pandoc` | `pandoc`, `pdc` | | reStructuredText | `text/rst` | `rst` | `rst` | When converting content to HTML, Hugo uses: * Native renderers for Markdown, HTML, and Emacs Org mode * External renderers for AsciiDoc, Pandoc, and reStructuredText Native renderers are faster than external renderers. * * * 1. This is a derivation of the Markdown format as described by the CommonMark specification. [↩︎](https://gohugo.io/content-management/formats/#fnref:1) * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/content-management/formats.md) --- # define Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/go-template/define/](https://gohugo.io/images/qr/qr_cb95e71fac9472cc.png) Defines a template. Syntax define NAME Use with the [`block`](https://gohugo.io/functions/go-template/block/) statement: {{ block "main" . }} {{ print "default value if 'main' template is empty" }} {{ end }} {{ define "main" }}

    {{ .Title }}

    {{ .Content }} {{ end }} Use with the [`partial`](https://gohugo.io/functions/partials/include/) function: {{ partial "inline/foo.html" (dict "answer" 42) }} {{ define "_partials/inline/foo.html" }} {{ printf "The answer is %v." .answer }} {{ end }} Use with the [`template`](https://gohugo.io/functions/go-template/block/) function: {{ template "foo" (dict "answer" 42) }} {{ define "foo" }} {{ printf "The answer is %v." .answer }} {{ end }} See Go’s [`text/template`](https://pkg.go.dev/text/template) documentation for more information. * * * Last updated: August 23, 2025 : [Merge commit 'bfa74537929f409fca841540b971125b7678963a' (6c911d1e5)](https://github.com/gohugoio/hugoDocs/commit/6c911d1e52fb9c8065c079820327f4b0e37529d4) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/go-template/define.md) --- # Get Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/taxonomy/get/](https://gohugo.io/images/qr/qr_6efd2c516c94d9ad.png) Returns a slice of weighted pages to which the given term has been assigned. Syntax TAXONOMY.Get TERM Returns page.WeightedPages The `Get` method on a `Taxonomy` object returns a slice of [weighted pages](https://gohugo.io/quick-reference/glossary/#weighted-page) to which the given [term](https://gohugo.io/quick-reference/glossary/#term) has been assigned. Before we can use a `Taxonomy` method, we need to capture a `Taxonomy` object. Capture a Taxonomy object ------------------------- Consider this project configuration: taxonomies: author: authors genre: genres [taxonomies] author = 'authors' genre = 'genres' { "taxonomies": { "author": "authors", "genre": "genres" } } And this content structure: content/ ├── books/ │ ├── and-then-there-were-none.md --> genres: suspense │ ├── death-on-the-nile.md --> genres: suspense │ └── jamaica-inn.md --> genres: suspense, romance │ └── pride-and-prejudice.md --> genres: romance └── _index.md To capture the “genres” `Taxonomy` object from within any template, use the [`Taxonomies`](https://gohugo.io/methods/site/taxonomies/) method on a `Site` object. {{ $taxonomyObject := .Site.Taxonomies.genres }} To capture the “genres” `Taxonomy` object when rendering its page with a _taxonomy_ template, use the [`Terms`](https://gohugo.io/methods/page/data/#in-a-taxonomy-template) method on the page’s [`Data`](https://gohugo.io/methods/page/data/) object: layouts/taxonomy.html {{ $taxonomyObject := .Data.Terms }} To inspect the data structure:
    {{ debug.Dump $taxonomyObject }}
    Although the [`Alphabetical`](https://gohugo.io/methods/taxonomy/alphabetical/) and [`ByCount`](https://gohugo.io/methods/taxonomy/bycount/) methods provide a better data structure for ranging through the taxonomy, you can render the weighted pages by term directly from the `Taxonomy` object: {{ range $term, $weightedPages := $taxonomyObject }}

    {{ .Page.LinkTitle }}

    {{ end }} In the example above, the first anchor element is a link to the term page. Get the weighted pages ---------------------- Now that we have captured the “genres” `Taxonomy` object, let’s get the weighted pages to which the “suspense” term has been assigned: {{ $weightedPages := $taxonomyObject.Get "suspense" }} The above is equivalent to: {{ $weightedPages := $taxonomyObject.suspense }} But, if the term is not a valid [identifier](https://gohugo.io/quick-reference/glossary/#identifier) , you cannot use the [chaining](https://gohugo.io/quick-reference/glossary/#chain) syntax. For example, this will throw an error because the identifier contains a hyphen: {{ $weightedPages := $taxonomyObject.my-genre }} You could also use the [`index`](https://gohugo.io/functions/collections/indexfunction/) function, but the syntax is more verbose: {{ $weightedPages := index $taxonomyObject "my-genre" }} To inspect the data structure:
    {{ debug.Dump $weightedPages }}
    Example ------- With this template: {{ $weightedPages := $taxonomyObject.Get "suspense" }} {{ range $weightedPages }}

    {{ .LinkTitle }}

    {{ end }} Hugo renders:

    Jamaica inn

    Death on the nile

    And then there were none

    * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/taxonomy/Get.md) --- # collections.Sort Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/sort/](https://gohugo.io/images/qr/qr_470485cb8af65208.png) Returns a sorted map or slice by reordering the given collection by a key and order. Syntax collections.Sort MAP|SLICE \[KEY\] \[ORDER\] Returns any Alias sort 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 project configuration: params: grades: - b - a - c [params] grades = ['b', 'a', 'c'] { "params": { "grades": [\ "b",\ "a",\ "c"\ ] } } ### Ascending order Sort slice elements in ascending order using either of these constructs: {{ sort site.Params.grades }} → [a b c] {{ sort site.Params.grades "value" "asc" }} → [a b c] In the examples above, `value` is the `KEY` representing the value of the slice element. ### Descending order Sort slice elements in descending order: {{ sort site.Params.grades "value" "desc" }} → [c b a] In the example above, `value` is the `KEY` representing the value of the slice element. Sort a map ---------- The examples below assume this project configuration: params: authors: a: firstName: Marius lastName: Pontmercy b: firstName: Victor lastName: Hugo c: firstName: Jean lastName: Valjean [params] [params.authors] [params.authors.a] firstName = 'Marius' lastName = 'Pontmercy' [params.authors.b] firstName = 'Victor' lastName = 'Hugo' [params.authors.c] firstName = 'Jean' lastName = 'Valjean' { "params": { "authors": { "a": { "firstName": "Marius", "lastName": "Pontmercy" }, "b": { "firstName": "Victor", "lastName": "Hugo" }, "c": { "firstName": "Jean", "lastName": "Valjean" } } } } When sorting maps, the `KEY` argument must be lowercase. ### Ascending order Sort map objects in ascending order using either of these constructs: {{ range sort site.Params.authors "firstname" }} {{ .firstName }} {{ end }} {{ range sort site.Params.authors "firstname" "asc" }} {{ .firstName }} {{ end }} These produce: Jean Marius Victor ### Descending order Sort map objects in descending order: {{ range sort site.Params.authors "firstname" "desc" }} {{ .firstName }} {{ end }} This produces: Victor Marius Jean ### First level key removal Hugo removes the first level keys when sorting a map. Original map: { "felix": { "breed": "malicious", "type": "cat" }, "spot": { "breed": "boxer", "type": "dog" } } After sorting: [\ {\ "breed": "malicious",\ "type": "cat"\ },\ {\ "breed": "boxer",\ "type": "dog"\ }\ ] Sort a page collection ---------------------- Although you can use the `sort` function to sort a page collection, Hugo provides [sorting and grouping methods](https://gohugo.io/methods/pages/) as well. In this contrived example, sort the site’s regular pages by `.Type` in descending order: {{ range sort site.RegularPages "Type" "desc" }}

    {{ .LinkTitle }}

    {{ end }} * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Sort.md) --- # Colors Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/resource/colors/](https://gohugo.io/images/qr/qr_f5a62648fc68cd0b.png) Applicable to images, returns a slice of the most dominant colors using a simple histogram method. Syntax RESOURCE.Colors Returns \[\]images.Color Use this method with [global resources](https://gohugo.io/quick-reference/glossary/#global-resource) , [page resources](https://gohugo.io/quick-reference/glossary/#page-resource) , or [remote resources](https://gohugo.io/quick-reference/glossary/#remote-resource) . The `Colors` method returns a slice of the most dominant colors in a [processable image](https://gohugo.io/quick-reference/glossary/#processable-image) , ordered from most dominant to least dominant. Use the [`reflect.IsImageResourceProcessable`](https://gohugo.io/functions/reflect/isimageresourceprocessable/) function to verify that an image can be processed. Usage ----- This method is fast, but if you downscale your image first, you can further improve performance by extracting colors from the smaller resource. Methods ------- Each color in the slice is an object with the following methods: ### ColorHex (`string`) Returns the [hexadecimal color](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color) value, prefixed with a hash sign. ### Luminance (`float64`) Returns the [relative luminance](https://www.w3.org/TR/WCAG21/#dfn-relative-luminance) of the color in the sRGB colorspace in the range \[0, 1\]. A value of `0` represents the darkest black, while a value of `1` represents the lightest white. Image filters such as [`images.Dither`](https://gohugo.io/functions/images/dither/) , [`images.Padding`](https://gohugo.io/functions/images/padding/) , and [`images.Text`](https://gohugo.io/functions/images/text/) accept either hexadecimal color values or `images.Color` objects as arguments. Hugo renders an `images.Color` object as a hexadecimal color value. Sorting ------- As a contrived example, create a table of an image’s dominant colors with the most dominant color first, and display the relative luminance of each dominant color: {{ with resources.Get "images/a.jpg" }} {{ range .Colors }} {{ end }}
    Color Relative luminance
    {{ .ColorHex }} {{ .Luminance | lang.FormatNumber 4 }}
    {{ end }} Hugo renders this to: | ColorHex | Relative luminance | | --- | --- | | `#bebebd` | `0.5145` | | `#514947` | `0.0697` | | `#768a9a` | `0.2436` | | `#647789` | `0.1771` | | `#90725e` | `0.1877` | | `#a48974` | `0.2704` | To sort by dominance with the least dominant color first: {{ range .Colors | collections.Reverse }} To sort by relative luminance with the darkest color first: {{ range sort .Colors "Luminance" }} To sort by relative luminance with the lightest color first, use either of these constructs: {{ range sort .Colors "Luminance" | collections.Reverse }} {{ range sort .Colors "Luminance" "desc" }} Examples -------- ### Image borders To add a 5 pixel border to an image using the most dominant color: {{ with resources.Get "images/a.jpg" }} {{ $mostDominant := index .Colors 0 }} {{ $filter := images.Padding 5 $mostDominant }} {{ with .Filter $filter }} {{ end }} {{ end }} To add a 5 pixel border to an image using the darkest dominant color: {{ with resources.Get "images/a.jpg" }} {{ $darkest := index (sort .Colors "Luminance") 0 }} {{ $filter := images.Padding 5 $darkest }} {{ with .Filter $filter }} {{ end }} {{ end }} ### Light text on dark background To create a text box where the foreground and background colors are derived from an image’s lightest and darkest dominant colors: {{ with resources.Get "images/a.jpg" }} {{ $darkest := index (sort .Colors "Luminance") 0 }} {{ $lightest := index (sort .Colors "Luminance" "desc") 0 }}

    This is light text on a dark background.

    {{ end }} ### WCAG contrast ratio In the previous example we placed light text on a dark background, but does this color combination conform to [WCAG](https://en.wikipedia.org/wiki/Web_Content_Accessibility_Guidelines) guidelines for either the [minimum](https://www.w3.org/WAI/WCAG22/quickref/?showtechniques=145#contrast-minimum) or the [enhanced](https://www.w3.org/WAI/WCAG22/quickref/?showtechniques=145#contrast-enhanced) contrast ratio? The WCAG defines the [contrast ratio](https://www.w3.org/TR/WCAG21/#dfn-contrast-ratio) as: contrast ratio\=L1+0.05L2+0.05contrast\\ ratio = { L\_1 + 0.05 \\over L\_2 + 0.05 }contrast ratio\=L2​+0.05L1​+0.05​ where L1L\_1L1​ is the relative luminance of the lightest color and L2L\_2L2​ is the relative luminance of the darkest color. Calculate the contrast ratio to determine WCAG conformance: {{ with resources.Get "images/a.jpg" }} {{ $lightest := index (sort .Colors "Luminance" "desc") 0 }} {{ $darkest := index (sort .Colors "Luminance") 0 }} {{ $cr := div (add $lightest.Luminance 0.05) (add $darkest.Luminance 0.05) }} {{ if ge $cr 7.5 }} {{ printf "The %.2f contrast ratio conforms to WCAG Level AAA." $cr }} {{ else if ge $cr 4.5 }} {{ printf "The %.2f contrast ratio conforms to WCAG Level AA." $cr }} {{ else }} {{ printf "The %.2f contrast ratio does not conform to WCAG guidelines." $cr }} {{ end }} {{ end }} * * * Last updated: February 27, 2026 : [content: Miscellaneous udpates for v0.157.0 (35da1aa3c)](https://github.com/gohugoio/hugoDocs/commit/35da1aa3c2fe3b54bdb57df1a308533844af9df5) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/resource/Colors.md) --- # Frequently asked questions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/troubleshooting/faq/](https://gohugo.io/images/qr/qr_80b522c7305b4f17.png) These questions are frequently asked by new users. Hugo’s [forum](https://discourse.gohugo.io/) 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](https://discourse.gohugo.io/t/requesting-help/9132) before asking your first question. These are just a few of the questions most frequently asked by new users. An error message indicates that a feature is not available. Why? Editions -------- Hugo offers a standard edition with core features, plus extended and extended/deploy editions with more. Use the standard edition unless you need the features below. | Feature | extended edition | extended/deploy edition | | --- | --- | --- | | [Transpile Sass to CSS](https://gohugo.io/functions/css/sass/)
    via embedded LibSass. Note that embedded LibSass was deprecated in v0.153.0 and will be removed in a future release. Use the [Dart Sass](https://gohugo.io/functions/css/sass/#dart-sass)
    transpiler instead, which is compatible with any edition. | ✔️ | ✔️ | | Deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or an Azure Storage container. See [details](https://gohugo.io/host-and-deploy/deploy-with-hugo-deploy/)
    . | ❌ | ✔️ | When you attempt to use a feature that is not available in the edition that you installed, Hugo throws this error: this feature is not available in this edition of Hugo To resolve, install a different edition based on the feature table above. See the [installation](https://gohugo.io/installation/) section for details. Why do I see “Page Not Found” when visiting the home page? In the `content/_index.md` file: * Is `draft` set to `true`? * Is the `date` in the future? * Is the `publishDate` in the future? * Is the `expiryDate` in the past? If the answer to any of these questions is yes, either change the field values, or use one of these command line flags: `--buildDrafts`, `--buildFuture`, or `--buildExpired`. Why is a given page not published? In the `content/section/page.md` file, or in the `content/section/page/index.md` file: * Is `draft` set to `true`? * Is the `date` in the future? * Is the `publishDate` in the future? * Is the `expiryDate` in the past? If the answer to any of these questions is yes, either change the field values, or use one of these command line flags: `--buildDrafts`, `--buildFuture`, or `--buildExpired`. Why can’t I see any of a page’s descendants? You may have an `index.md` file instead of an `_index.md` file. See [details](https://gohugo.io/content-management/page-bundles/) . What is the difference between an `index.md` file and an `_index.md` file? A directory with an `index.md file` is a [leaf bundle](https://gohugo.io/quick-reference/glossary/#leaf-bundle) . A directory with an `_index.md` file is a [branch bundle](https://gohugo.io/quick-reference/glossary/#branch-bundle) . See [details](https://gohugo.io/content-management/page-bundles/) . Why is my _partial_ template not rendered as expected? You may have neglected to pass the required [context](https://gohugo.io/quick-reference/glossary/#context) when calling the partial. For example: {{/* incorrect */}} {{ partial "pagination.html" }} {{/* correct */}} {{ partial "pagination.html" . }} In a template, what’s the difference between `:=` and `=` when assigning values to variables? Use `:=` to initialize a variable, and use `=` to assign a value to a variable that has been previously initialized. See [details](https://pkg.go.dev/text/template#hdr-Variables) . When I paginate a list page, why is the page collection not filtered as specified? You are probably invoking the [`Paginate`](https://gohugo.io/methods/page/paginate/) or [`Paginator`](https://gohugo.io/methods/page/paginator/) method more than once on the same page. See [details](https://gohugo.io/templates/pagination/) . Why are there two ways to call a shortcode? Use the `{{% shortcode %}}` notation if the _shortcode_ template, or the content between the opening and closing shortcode tags, contains Markdown. Otherwise use the `{{< shortcode >}}` notation. See [details](https://gohugo.io/content-management/shortcodes/#notation) . Can I use environment variables to control configuration? Yes. See [details](https://gohugo.io/configuration/introduction/#environment-variables) . Why am I seeing inconsistent output from one build to the next? The most common causes are page collisions (publishing two pages to the same path) and the effects of concurrency. Use the `--printPathWarnings` command line flag to check for page collisions, and create a topic on the [forum](https://discourse.gohugo.io/) if you suspect concurrency problems. Why isn’t Hugo’s development server detecting file changes? In its default configuration, Hugo’s file watcher may not be able detect file changes when: * Running Hugo within Windows Subsystem for Linux (WSL/WSL2) with project files on a Windows partition * Running Hugo locally with project files on a removable drive * Running Hugo locally with project files on a storage server accessed via the NFS, SMB, or CIFS protocols In these cases, instead of monitoring native file system events, use the `--poll` command line flag. For example, to poll the project files every 700 milliseconds, use `--poll 700ms`. Why is my page Store missing a value? The [`Store`](https://gohugo.io/methods/page/store/) method on a `Page` object allows you to create a [scratch pad](https://gohugo.io/quick-reference/glossary/#scratch-pad) on the given page to store and manipulate data. Values are often set within a _shortcode_ template, a _partial_ template called by a _shortcode_ template, or by a _render hook_ template. In all three cases, the scratch pad values are not determinate until Hugo renders the page content. If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop](https://gohugo.io/quick-reference/glossary/#noop) variable: {{ $noop := .Content }} {{ .Store.Get "mykey" }} You can trigger content rendering with other methods as well. See next FAQ. Which page methods trigger content rendering? The following methods on a `Page` object trigger content rendering: `Content`, `ContentWithoutSummary`, `FuzzyWordCount`, `Len`, `Plain`, `PlainWords`, `ReadingTime`, `Summary`, `Truncated`, and `WordCount`. For other questions please visit the [forum](https://discourse.gohugo.io/) . A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help](https://discourse.gohugo.io/t/requesting-help/9132) before asking your first question. * * * Last updated: August 23, 2025 : [Merge commit 'bfa74537929f409fca841540b971125b7678963a' (6c911d1e5)](https://github.com/gohugoio/hugoDocs/commit/6c911d1e52fb9c8065c079820327f4b0e37529d4) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/troubleshooting/faq.md) --- # collections.NewScratch Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/newscratch/](https://gohugo.io/images/qr/qr_99c1b52c59a2bc25.png) Returns a locally scoped “scratch pad” to store and manipulate data. Syntax collections.NewScratch Returns maps.Scratch Alias newScratch Use the `collections.NewScratch` function to create a locally scoped [scratch pad](https://gohugo.io/quick-reference/glossary/#scratch-pad) to store and manipulate data. To create a scratch pad with a different [scope](https://gohugo.io/quick-reference/glossary/#scope) , refer to the [scope](https://gohugo.io/functions/collections/newscratch/#scope) section below. Methods ------- ### Set Sets the value of the given key. {{ $s := newScratch }} {{ $s.Set "greeting" "Hello" }} ### Get Gets the value of the given key. {{ $s := newScratch }} {{ $s.Set "greeting" "Hello" }} {{ $s.Get "greeting" }} → Hello ### Add Adds the given value to existing value(s) of the given key. For single values, `Add` accepts values that support Go’s `+` operator. If the first `Add` for a key is an array or slice, the following adds will be appended to that list. {{ $s := newScratch }} {{ $s.Set "greeting" "Hello" }} {{ $s.Add "greeting" "Welcome" }} {{ $s.Get "greeting" }} → HelloWelcome {{ $s := newScratch }} {{ $s.Set "total" 3 }} {{ $s.Add "total" 7 }} {{ $s.Get "total" }} → 10 {{ $s := newScratch }} {{ $s.Set "greetings" (slice "Hello") }} {{ $s.Add "greetings" (slice "Welcome" "Cheers") }} {{ $s.Get "greetings" }} → [Hello Welcome Cheers] ### SetInMap Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`. {{ $s := newScratch }} {{ $s.SetInMap "greetings" "english" "Hello" }} {{ $s.SetInMap "greetings" "french" "Bonjour" }} {{ $s.Get "greetings" }} → map[english:Hello french:Bonjour] ### DeleteInMap Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`. {{ $s := newScratch }} {{ $s.SetInMap "greetings" "english" "Hello" }} {{ $s.SetInMap "greetings" "french" "Bonjour" }} {{ $s.DeleteInMap "greetings" "english" }} {{ $s.Get "greetings" }} → map[french:Bonjour] ### GetSortedMapValues Returns an array of values from `key` sorted by `mapKey`. {{ $s := newScratch }} {{ $s.SetInMap "greetings" "english" "Hello" }} {{ $s.SetInMap "greetings" "french" "Bonjour" }} {{ $s.GetSortedMapValues "greetings" }} → [Hello Bonjour] ### Delete Removes the given key. {{ $s := newScratch }} {{ $s.Set "greeting" "Hello" }} {{ $s.Delete "greeting" }} ### Values Returns the raw backing map. Do not use with `Store` methods on a `Page` object due to concurrency issues. {{ $s := newScratch }} {{ $s.SetInMap "greetings" "english" "Hello" }} {{ $s.SetInMap "greetings" "french" "Bonjour" }} {{ $map := $s.Values }} Scope ----- The method or function used to create a scratch pad determines its scope. For example, use the `Store` method on a `Page` object to create a scratch pad scoped to the page. | Scope | Method or function | | --- | --- | | page | [`PAGE.Store`](https://gohugo.io/methods/page/store/) | | site | [`SITE.Store`](https://gohugo.io/methods/site/store/) | | global | [`hugo.Store`](https://gohugo.io/functions/hugo/store/) | | local | [`collections.NewScratch`](https://gohugo.io/functions/collections/newscratch/) | | shortcode | [`SHORTCODE.Store`](https://gohugo.io/methods/shortcode/store/) | * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/NewScratch.md) --- # Copyright Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/site/copyright/](https://gohugo.io/images/qr/qr_6daa0bb02bba66a7.png) Returns the copyright notice as defined in your project configuration. Syntax SITE.Copyright Returns string Project configuration: copyright: © 2023 ABC Widgets, Inc. copyright = '© 2023 ABC Widgets, Inc.' { "copyright": "© 2023 ABC Widgets, Inc." } Template: {{ .Site.Copyright }} → © 2023 ABC Widgets, Inc. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/site/Copyright.md) --- # Crop Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/resource/crop/](https://gohugo.io/images/qr/qr_99f1d0bac86e3dfb.png) Applicable to images, returns a new image resource cropped according to the given processing specification. Syntax RESOURCE.Crop SPECIFICATION Returns images.ImageResource Use this method with [global resources](https://gohugo.io/quick-reference/glossary/#global-resource) , [page resources](https://gohugo.io/quick-reference/glossary/#page-resource) , or [remote resources](https://gohugo.io/quick-reference/glossary/#remote-resource) . The `Crop` method returns a new resource from a [processable image](https://gohugo.io/quick-reference/glossary/#processable-image) according to the given [processing specification](https://gohugo.io/methods/resource/crop/#processing-specification) . Use the [`reflect.IsImageResourceProcessable`](https://gohugo.io/functions/reflect/isimageresourceprocessable/) function to verify that an image can be processed. Usage ----- When cropping, you must provide both width and height (such as `200x200`) within the specification. This method does not perform any resizing; it simply extracts a region of the image based on the dimensions and the [anchor](https://gohugo.io/methods/resource/crop/#anchor) provided, if any. {{ with resources.Get "images/original.jpg" }} {{ with .Crop "200x200 TopRight" }} {{ end }} {{ end }} In the example above, `"200x200 TopRight"` is the processing specification. Processing specification ------------------------ The processing specification is a space-delimited, case-insensitive list containing one or more of the following options in any sequence: action Specify one of `crop`, `fill`, `fit`, or `resize`. This is applicable to the [`Process`](https://gohugo.io/methods/resource/process/) method and the [`images.Process`](https://gohugo.io/functions/images/process/) filter. If you specify an action, you must also provide dimensions. anchor The focal point used when cropping or filling an image. Valid options include `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. The `Smart` option utilizes the [`muesli/smartcrop`](https://github.com/muesli/smartcrop) package to identify the most interesting area of the image. This defaults to the [`anchor`](https://gohugo.io/configuration/imaging/#anchor) parameter in your project configuration. background color The background color used when converting transparent images to formats that do not support transparency, such as PNG to JPEG. This color also fills the empty space created when rotating an image by a non-orthogonal angle if the space is not transparent and a background color is not specified in the processing specification. The value must be an RGB [hexadecimal color](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color) . This defaults to the [`bgColor`](https://gohugo.io/configuration/imaging/#bgcolor) parameter in your project configuration. compression [New in v0.153.5](https://github.com/gohugoio/hugo/releases/tag/v0.153.5) The encoding strategy used for the image. Options are `lossy` or `lossless`. Note that `lossless` is only supported by the WebP format. This defaults to the [`compression`](https://gohugo.io/configuration/imaging/#compression) parameter in your project configuration. dimensions The dimensions of the resulting image, in pixels. The format is `WIDTHxHEIGHT` where `WIDTH` and `HEIGHT` are whole numbers. When resizing an image, you may specify only the width (such as `600x`) or only the height (such as `x400`) for proportional scaling. Specifying both width and height when resizing an image may result in non-proportional scaling. When cropping, fitting, or filling, you must provide both width and height such as `600x400`. format The format of the resulting image. Valid options include `bmp`, `gif`, `jpeg`, `png`, `tiff`, or `webp`. This defaults to the format of the source image. hint The encoding preset used when processing WebP images, equivalent to the `-preset` flag for the [`cwebp`](https://developers.google.com/speed/webp/docs/cwebp) CLI. Valid options include `drawing`, `icon`, `photo`, `picture`, or `text`. This defaults to the [`hint`](https://gohugo.io/configuration/imaging/#hint) parameter in your project configuration. | 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 | quality The visual fidelity of the image, applicable to JPEG and WebP formats when using `lossy` compression. The format is `qQUALITY` where `QUALITY` is a whole number between `1` and `100`, inclusive. Lower numbers prioritize smaller file size, while higher numbers prioritize visual clarity. This defaults to the [`quality`](https://gohugo.io/configuration/imaging/#quality) parameter in your project configuration. resampling filter The algorithm used to calculate new pixels when resizing, fitting, or filling an image. Common options include `box`, `lanczos`, `catmullRom`, `mitchellNetravali`, `linear`, or `nearestNeighbor`. This defaults to the [`resampleFilter`](https://gohugo.io/configuration/imaging/#resamplefilter) parameter in your project configuration. | 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 | Refer to the [source documentation](https://github.com/disintegration/imaging#image-resizing) for a complete list of available resampling filters. If you wish to improve image quality at the expense of performance, you may wish to experiment with the alternative filters. rotation The number of whole degrees to rotate an image counter-clockwise. The format is `rDEGREES` where `DEGREES` is a whole number. Hugo performs rotation before any other transformations, so your [target dimensions](https://gohugo.io/methods/resource/crop/#dimensions) and any [anchor](https://gohugo.io/methods/resource/crop/#anchor) should refer to the image orientation after rotation. Use `r90`, `r180`, or `r270` for orthogonal rotations, or arbitrary angles such as `r45`. To rotate clockwise, use a negative number such as `r-45`. To automatically rotate an image based on its Exif orientation tag, use the [`images.AutoOrient`](https://gohugo.io/functions/images/autoorient/) filter instead of manual rotation. Rotating by non-orthogonal values increases the image extents to fit the rotated corners. For formats supporting alpha channels such as PNG or WebP, this resulting empty space is transparent by default. If the target format does not support transparency such as JPEG, or if you explicitly specify a [background color](https://gohugo.io/methods/resource/crop/#background-color) in the processing specification, the space is filled. If a color is required but not specified in the processing string, it defaults to the [`bgColor`](https://gohugo.io/configuration/imaging/#bgcolor) parameter in your project configuration. Example ------- {{ with resources.Get "images/original.jpg" }} {{ with .Crop "200x200 TopRight" }} {{ end }} {{ end }} Original ![Zion National Park](https://gohugo.io/images/examples/zion-national-park_hu_4668ccb5c983a9ac.jpg) Processed ![Zion National Park](https://gohugo.io/images/examples/zion-national-park_hu_88a548be09ef71d5.jpg) * * * Last updated: February 27, 2026 : [content: Miscellaneous udpates for v0.157.0 (35da1aa3c)](https://github.com/gohugoio/hugoDocs/commit/35da1aa3c2fe3b54bdb57df1a308533844af9df5) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/resource/Crop.md) --- # else Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/go-template/else/](https://gohugo.io/images/qr/qr_8e06f7f2216fdba0.png) Begins an alternate block for if, with, and range statements. Syntax else VALUE Use with the [`if`](https://gohugo.io/functions/go-template/if/) statement: {{ $var := "foo" }} {{ if $var }} {{ $var }} → foo {{ else }} {{ print "var is falsy" }} {{ end }} Use with the [`with`](https://gohugo.io/functions/go-template/with/) statement: {{ $var := "foo" }} {{ with $var }} {{ . }} → foo {{ else }} {{ print "var is falsy" }} {{ end }} Use with the [`range`](https://gohugo.io/functions/go-template/range/) statement: {{ $var := slice 1 2 3 }} {{ range $var }} {{ . }} → 1 2 3 {{ else }} {{ print "var is falsy" }} {{ end }} Use `else if` to check multiple conditions. {{ $var := 12 }} {{ if eq $var 6 }} {{ print "var is 6" }} {{ else if eq $var 7 }} {{ print "var is 7" }} {{ else if eq $var 42 }} {{ print "var is 42" }} {{ else }} {{ print "var is something else" }} {{ end }} See Go’s [`text/template`](https://pkg.go.dev/text/template) documentation for more information. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/go-template/else.md) --- # end Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/go-template/end/](https://gohugo.io/images/qr/qr_1cc20c975774feca.png) Terminates if, with, range, block, and define statements. Syntax end Use with the [`if`](https://gohugo.io/functions/go-template/if/) statement: {{ $var := "foo" }} {{ if $var }} {{ $var }} → foo {{ end }} Use with the [`with`](https://gohugo.io/functions/go-template/with/) statement: {{ $var := "foo" }} {{ with $var }} {{ . }} → foo {{ end }} Use with the [`range`](https://gohugo.io/functions/go-template/range/) statement: {{ $var := slice 1 2 3 }} {{ range $var }} {{ . }} → 1 2 3 {{ end }} Use with the [`block`](https://gohugo.io/functions/go-template/block/) statement: {{ block "main" . }}{{ end }} Use with the [`define`](https://gohugo.io/functions/go-template/define/) statement: {{ define "main" }} {{ print "this is the main section" }} {{ end }} See Go’s [`text/template`](https://pkg.go.dev/text/template) documentation for more information. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/go-template/end.md) --- # Data Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/resource/data/](https://gohugo.io/images/qr/qr_6d3c44957bb81d48.png) Applicable to resources returned by the resources.GetRemote function, returns information from the HTTP response. Syntax RESOURCE.Data Returns map The `Data` method on a resource returned by the [`resources.GetRemote`](https://gohugo.io/functions/resources/getremote/) function returns information from the HTTP response. Example ------- {{ $url := "https://example.org/images/a.jpg" }} {{ $opts := dict "responseHeaders" (slice "Server") }} {{ with try (resources.GetRemote $url) }} {{ with .Err }} {{ errorf "%s" . }} {{ else with .Value }} {{ with .Data }} {{ .ContentLength }} → 42764 {{ .ContentType }} → image/jpeg {{ .Headers }} → map[Server:[Netlify]] {{ .Status }} → 200 OK {{ .StatusCode }} → 200 {{ .TransferEncoding }} → [] {{ end }} {{ else }} {{ errorf "Unable to get remote resource %q" $url }} {{ end }} {{ end }} Methods ------- ### ContentLength (`int`) The content length in bytes. ### ContentType (`string`) The content type. ### Headers (`map[string][]string`) A map of response headers matching those requested in the [`responseHeaders`](https://gohugo.io/functions/resources/getremote/#responseheaders) option passed to the `resources.GetRemote` function. The header name matching is case-insensitive. In most cases there will be one value per header key. ### Status (`string`) The HTTP status text. ### StatusCode (`int`) The HTTP status code. ### TransferEncoding (`string`) The transfer encoding. * * * Last updated: August 23, 2025 : [Merge commit 'bfa74537929f409fca841540b971125b7678963a' (6c911d1e5)](https://github.com/gohugoio/hugoDocs/commit/6c911d1e52fb9c8065c079820327f4b0e37529d4) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/resource/Data.md) --- # First Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pager/first/](https://gohugo.io/images/qr/qr_462bcb2811366be2.png) Returns the first pager in the pager collection. Syntax PAGER.First Returns page.Pager Use the `First` method to build navigation between pagers. {{ $pages := where site.RegularPages "Type" "posts" }} {{ $paginator := .Paginate $pages }} {{ range $paginator.Pages }}

    {{ .LinkTitle }}

    {{ end }} {{ with $paginator }}
      {{ with .First }}
    • First
    • {{ end }} {{ with .Prev }}
    • Previous
    • {{ end }} {{ with .Next }}
    • Next
    • {{ end }} {{ with .Last }}
    • Last
    • {{ end }}
    {{ end }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pager/First.md) --- # Config Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/site/config/](https://gohugo.io/images/qr/qr_23e5c8999302a46c.png) Returns a subset of your project configuration. Syntax SITE.Config Returns page.SiteConfig The `Config` method on a `Site` object provides access to a subset of your project configuration, specifically the `services` and `privacy` keys. Services -------- See [configure services](https://gohugo.io/configuration/services/) . For example, to use Hugo’s built-in Google Analytics template you must add a [Google tag ID](https://support.google.com/tagmanager/answer/12326985?hl=en) : services: googleAnalytics: id: G-XXXXXXXXX [services] [services.googleAnalytics] id = 'G-XXXXXXXXX' { "services": { "googleAnalytics": { "id": "G-XXXXXXXXX" } } } To access this value from a template: {{ .Site.Config.Services.GoogleAnalytics.ID }} → G-XXXXXXXXX You must capitalize each identifier as shown above. Privacy ------- See [configure privacy](https://gohugo.io/configuration/privacy/) . For example, to disable usage of the built-in YouTube shortcode: privacy: youtube: disable: true [privacy] [privacy.youtube] disable = true { "privacy": { "youtube": { "disable": true } } } To access this value from a template: {{ .Site.Config.Privacy.YouTube.Disable }} → true You must capitalize each identifier as shown above. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/site/Config.md) --- # Data sources Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/content-management/data-sources/](https://gohugo.io/images/qr/qr_dc81f22cb4160ee5.png) Use local and remote data sources to augment or create content. Hugo can access and [unmarshal](https://gohugo.io/quick-reference/glossary/#unmarshal) local and remote data sources including CSV, JSON, TOML, YAML, and XML. Use this data to augment existing content or to create new content. A data source might be a file in the `data` directory, a [global resource](https://gohugo.io/quick-reference/glossary/#global-resource) , a [page resource](https://gohugo.io/quick-reference/glossary/#page-resource) , or a [remote resource](https://gohugo.io/quick-reference/glossary/#remote-resource) . Data directory -------------- The `data` directory in the root of your project may contain one or more data files, in either a flat or nested tree. Hugo merges the data files to create a single data structure, accessible with the `Data` method on a `Site` object. Hugo also merges data directories from themes and modules into this single data structure, where the `data` directory in the root of your project takes precedence. Hugo reads the combined data structure into memory and keeps it there for the entire build. For data that is infrequently accessed, use global or page resources instead. Theme and module authors may wish to namespace their data files to prevent collisions. For example: project/ └── data/ └── mytheme/ └── foo.json Do not place CSV files in the `data` directory. Access CSV files as page, global, or remote resources. See the documentation for the [`Data`](https://gohugo.io/methods/site/data/) method on a `Site` object for details and examples. Global resources ---------------- Use the `resources.Get` and `transform.Unmarshal` functions to access data files that exist as global resources. See the [`transform.Unmarshal`](https://gohugo.io/functions/transform/unmarshal/#global-resource) documentation for details and examples. Page resources -------------- Use the `Resources.Get` method on a `Page` object combined with the `transform.Unmarshal` function to access data files that exist as page resources. See the [`transform.Unmarshal`](https://gohugo.io/functions/transform/unmarshal/#page-resource) documentation for details and examples. Remote resources ---------------- Use the `resources.GetRemote` and `transform.Unmarshal` functions to access remote data. See the [`transform.Unmarshal`](https://gohugo.io/functions/transform/unmarshal/#remote-resource) documentation for details and examples. Augment existing content ------------------------ Use data sources to augment existing content. For example, create a shortcode to render an HTML table from a global CSV resource. assets/pets.csv "name","type","breed","age" "Spot","dog","Collie","3" "Felix","cat","Malicious","7" content/example.md {{< csv-to-table "pets.csv" >}} layouts/\_shortcodes/csv-to-table.html {{ with $file := .Get 0 }} {{ with resources.Get $file }} {{ with . | transform.Unmarshal }} {{ range index . 0 }} {{ end }} {{ range after 1 . }} {{ range . }} {{ end }} {{ end }}
    {{ . }}
    {{ . }}
    {{ end }} {{ else }} {{ errorf "The %q shortcode was unable to find %s. See %s" $.Name $file $.Position }} {{ end }} {{ else }} {{ errorf "The %q shortcode requires one positional argument, the path to the CSV file relative to the assets directory. See %s" .Name .Position }} {{ end }} Hugo renders this to: | name | type | breed | age | | --- | --- | --- | --- | | Spot | dog | Collie | 3 | | Felix | cat | Malicious | 7 | Create new content ------------------ Use [content adapters](https://gohugo.io/content-management/content-adapters/) to create new content. * * * Last updated: July 7, 2025 : [Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45' (079671b41)](https://github.com/gohugoio/hugoDocs/commit/079671b41b9395f2c2b48879f14d3f09d69a63dc) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/content-management/data-sources.md) --- # Day Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/time/day/](https://gohugo.io/images/qr/qr_6228b23cba6feff3.png) Returns the day of the month of the given time.Time value. Syntax TIME.Day Returns int {{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }} {{ $t.Day }} → 27 * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/time/Day.md) --- # Get Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/shortcode/get/](https://gohugo.io/images/qr/qr_530a3ee75ba0678f.png) Returns the value of the given argument. Syntax SHORTCODE.Get ARG Returns any Specify the argument by position or by name. When calling a shortcode within Markdown, use either positional or named argument, but not both. Some shortcodes support positional arguments, some support named arguments, and others support both. Refer to the shortcode’s documentation for usage details. Positional arguments -------------------- This shortcode call uses positional arguments: content/about.md {{< myshortcode "Hello" "world" >}} To retrieve arguments by position: layouts/\_shortcodes/myshortcode.html {{ printf "%s %s." (.Get 0) (.Get 1) }} → Hello world. Named arguments --------------- This shortcode call uses named arguments: content/about.md {{< myshortcode greeting="Hello" firstName="world" >}} To retrieve arguments by name: layouts/\_shortcodes/myshortcode.html {{ printf "%s %s." (.Get "greeting") (.Get "firstName") }} → Hello world. Argument names are case-sensitive. * * * Last updated: July 7, 2025 : [Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45' (079671b41)](https://github.com/gohugoio/hugoDocs/commit/079671b41b9395f2c2b48879f14d3f09d69a63dc) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/shortcode/Get.md) --- # Content adapters Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/content-management/content-adapters/](https://gohugo.io/images/qr/qr_d9ef072b5bf7d82b.png) Create content adapters to dynamically add content when building your project. Overview -------- A content adapter is a template that dynamically creates pages when building a site. For example, use a content adapter to create pages from a remote data source such as JSON, TOML, YAML, or XML. Unlike templates that reside in the `layouts` directory, content adapters reside in the `content` directory, no more than one per directory per language. When a content adapter creates a page, the page’s [logical path](https://gohugo.io/quick-reference/glossary/#logical-path) will be relative to the content adapter. content/ ├── articles/ │ ├── _index.md │ ├── article-1.md │ └── article-2.md ├── books/ │ ├── _content.gotmpl <-- content adapter │ └── _index.md └── films/ ├── _content.gotmpl <-- content adapter └── _index.md Each content adapter is named `_content.gotmpl` and uses the same [syntax](https://gohugo.io/templates/introduction/) as templates in the `layouts` directory. You can use any of the [template functions](https://gohugo.io/functions/) within a content adapter, as well as the methods described below. Methods ------- Use these methods within a content adapter. ### AddPage Adds a page to the site. content/books/\_content.gotmpl {{ $content := dict "mediaType" "text/markdown" "value" "The _Hunchback of Notre Dame_ was written by Victor Hugo." }} {{ $page := dict "content" $content "kind" "page" "path" "the-hunchback-of-notre-dame" "title" "The Hunchback of Notre Dame" }} {{ .AddPage $page }} ### AddResource Adds a page resource to the site. content/books/\_content.gotmpl {{ with resources.Get "images/a.jpg" }} {{ $content := dict "mediaType" .MediaType.Type "value" . }} {{ $resource := dict "content" $content "path" "the-hunchback-of-notre-dame/cover.jpg" }} {{ $.AddResource $resource }} {{ end }} Then retrieve the new page resource with something like: layouts/page.html {{ with .Resources.Get "cover.jpg" }} {{ end }} ### Site Returns the `Site` to which the pages will be added. content/books/\_content.gotmpl {{ .Site.Title }} Note that the `Site` returned isn’t fully built when invoked from the content adapters; if you try to call methods that depends on pages, e.g. `.Site.Pages`, you will get an error saying “this method cannot be called before the site is fully initialized”. ### Store Returns a persistent “scratch pad” to store and manipulate data. The main use case for this is to transfer values between executions when [EnableAllLanguages](https://gohugo.io/content-management/content-adapters/#enablealllanguages) is set. See [examples](https://gohugo.io/methods/page/store/) . content/books/\_content.gotmpl {{ .Store.Set "key" "value" }} {{ .Store.Get "key" }} ### EnableAllLanguages By default, Hugo executes the content adapter only once for the first matching site in the [sites matrix](https://gohugo.io/quick-reference/glossary/#sites-matrix) . Use this method to expand execution to all languages while maintaining the current role and version. For more fine-grained control, define a `sites.matrix` in front matter or in a content mount. content/books/\_content.gotmpl {{ .EnableAllLanguages }} {{ $content := dict "mediaType" "text/markdown" "value" "The _Hunchback of Notre Dame_ was written by Victor Hugo." }} {{ $page := dict "content" $content "kind" "page" "path" "the-hunchback-of-notre-dame" "title" "The Hunchback of Notre Dame" }} {{ .AddPage $page }} ### EnableAllDimensions By default, Hugo executes the content adapter only once for the first matching site in the [sites matrix](https://gohugo.io/quick-reference/glossary/#sites-matrix) . Use this method to expand execution to every possible combination of language, version, and role. For more fine-grained control, define a `sites.matrix` in front matter or in a content mount. [New in v0.153.0](https://github.com/gohugoio/hugo/releases/tag/v0.153.0) Page map -------- Set any [front matter field](https://gohugo.io/content-management/front-matter/#fields) in the map passed to the [`AddPage`](https://gohugo.io/content-management/content-adapters/#addpage) method, excluding `markup`. Instead of setting the `markup` field, specify the `content.mediaType` as described below. This table describes the fields most commonly passed to the `AddPage` method. | Key | Description | Required | | --- | --- | --- | | `content.mediaType` | The content [media type](https://en.wikipedia.org/wiki/Media_type)
    . Default is `text/markdown`. See [content formats](https://gohugo.io/content-management/formats/#classification)
    for examples. | | | `content.value` | The content value as a string. | | | `dates.date` | The page creation date as a `time.Time` value. | | | `dates.expiryDate` | The page expiry date as a `time.Time` value. | | | `dates.lastmod` | The page last modification date as a `time.Time` value. | | | `dates.publishDate` | The page publication date as a `time.Time` value. | | | `params` | A map of page parameters. | | | `path` | The page’s [logical path](https://gohugo.io/quick-reference/glossary/#logical-path)
    relative to the content adapter. Do not include a leading slash or file extension. | ✔️ | | `title` | The page title. | | While `path` is the only required field, we recommend setting `title` as well. When setting the `path`, Hugo transforms the given string to a logical path. For example, setting `path` to `A B C` produces a logical path of `/section/a-b-c`. Resource map ------------ Construct the map passed to the [`AddResource`](https://gohugo.io/content-management/content-adapters/#addresource) method using the fields below. | Key | Description | Required | | --- | --- | --- | | `content.mediaType` | The content [media type](https://en.wikipedia.org/wiki/Media_type)
    . | ✔️ | | `content.value` | The content value as a string or resource. | ✔️ | | `name` | The resource name. | | | `params` | A map of resource parameters. | | | `path` | The resources’s [logical path](https://gohugo.io/quick-reference/glossary/#logical-path)
    relative to the content adapter. Do not include a leading slash. | ✔️ | | `title` | The resource title. | | When `content.value` is a string, Hugo generates a new resource with a publication path relative to the page. However, if `content.value` is already a resource, Hugo directly uses its value and publishes it relative to the site root. This latter method is more efficient. When setting the `path`, Hugo transforms the given string to a logical path. For example, setting `path` to `A B C/cover.jpg` produces a logical path of `/section/a-b-c/cover.jpg`. Example ------- Create pages from remote data, where each page represents a book review. Step 1 Create the content structure. content/ └── books/ ├── _content.gotmpl <-- content adapter └── _index.md Step 2 Inspect the remote data to determine how to map key-value pairs to front matter fields. [https://gohugo.io/shared/examples/data/books.json](https://gohugo.io/shared/examples/data/books.json) Step 3 Create the content adapter. content/books/\_content.gotmpl {{/* Get remote data. */}} {{ $data := dict }} {{ $url := "https://gohugo.io/shared/examples/data/books.json" }} {{ with try (resources.GetRemote $url) }} {{ with .Err }} {{ errorf "Unable to get remote resource %s: %s" $url . }} {{ else with .Value }} {{ $data = . | transform.Unmarshal }} {{ else }} {{ errorf "Unable to get remote resource %s" $url }} {{ end }} {{ end }} {{/* Add pages and page resources. */}} {{ range $data }} {{/* Add page. */}} {{ $content := dict "mediaType" "text/markdown" "value" .summary }} {{ $dates := dict "date" (time.AsTime .date) }} {{ $params := dict "author" .author "isbn" .isbn "rating" .rating "tags" .tags }} {{ $page := dict "content" $content "dates" $dates "kind" "page" "params" $params "path" .title "title" .title }} {{ $.AddPage $page }} {{/* Add page resource. */}} {{ $item := . }} {{ with $url := $item.cover }} {{ with try (resources.GetRemote $url) }} {{ with .Err }} {{ errorf "Unable to get remote resource %s: %s" $url . }} {{ else with .Value }} {{ $content := dict "mediaType" .MediaType.Type "value" .Content }} {{ $params := dict "alt" $item.title }} {{ $resource := dict "content" $content "params" $params "path" (printf "%s/cover.%s" $item.title .MediaType.SubType) }} {{ $.AddResource $resource }} {{ else }} {{ errorf "Unable to get remote resource %s" $url }} {{ end }} {{ end }} {{ end }} {{ end }} Step 4 Create a _page_ template to render each book review. layouts/books/page.html {{ define "main" }}

    {{ .Title }}

    {{ with .Resources.GetMatch "cover.*" }} {{ .Params.alt }} {{ end }}

    Author: {{ .Params.author }}

    ISBN: {{ .Params.isbn }}
    Rating: {{ .Params.rating }}
    Review date: {{ .Date | time.Format ":date_long" }}

    {{ with .GetTerms "tags" }}

    Tags:

    {{ end }} {{ .Content }} {{ end }} Multilingual projects --------------------- With multilingual projects you can: 1. Create one content adapter for all languages using the [`EnableAllLanguages`](https://gohugo.io/content-management/content-adapters/#enablealllanguages) method as described above. 2. Create content adapters unique to each language. See the examples below. ### Translations by file name With this project configuration: languages: de: weight: 2 en: weight: 1 [languages] [languages.de] weight = 2 [languages.en] weight = 1 { "languages": { "de": { "weight": 2 }, "en": { "weight": 1 } } } Include a language designator in the content adapter’s file name. content/ └── books/ ├── _content.de.gotmpl ├── _content.en.gotmpl ├── _index.de.md └── _index.en.md ### Translations by content directory With this project configuration: languages: de: contentDir: content/de weight: 2 en: contentDir: content/en weight: 1 [languages] [languages.de] contentDir = 'content/de' weight = 2 [languages.en] contentDir = 'content/en' weight = 1 { "languages": { "de": { "contentDir": "content/de", "weight": 2 }, "en": { "contentDir": "content/en", "weight": 1 } } } Create a single content adapter in each directory: content/ ├── de/ │ └── books/ │ ├── _content.gotmpl │ └── _index.md └── en/ └── books/ ├── _content.gotmpl └── _index.md Page collisions --------------- Two or more pages collide when they have the same publication path. Due to concurrency, the content of the published page is indeterminate. Consider this example: content/ └── books/ ├── _content.gotmpl <-- content adapter ├── _index.md └── the-hunchback-of-notre-dame.md If the content adapter also creates `books/the-hunchback-of-notre-dame`, the content of the published page is indeterminate. You can not define the processing order. To detect page collisions, use the `--printPathWarnings` flag when building your project. * * * Last updated: February 26, 2026 : [content: More site-to-project changes (05b69f84e)](https://github.com/gohugoio/hugoDocs/commit/05b69f84e25e9cdd10ed1ac7ce5d37d4ac0b3725) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/content-management/content-adapters.md) --- # collections.Where Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/collections/where/](https://gohugo.io/images/qr/qr_5f8da0262ace89f.png) Returns a slice by filtering the given slice based on a key, operator, and value. Syntax collections.Where SLICE KEY \[OPERATOR\] VALUE Returns \[\]any Alias where The `where` function returns the given slice, removing elements that do not satisfy the comparison condition. The comparison condition is composed of the `KEY`, `OPERATOR`, and `VALUE` arguments: collections.Where SLICE KEY [OPERATOR] VALUE -------------------- comparison condition Hugo will test for equality if you do not provide an `OPERATOR` argument. For example: {{ $pages := where .Site.RegularPages "Section" "books" }} {{ $books := where hugo.Data.books "genres" "suspense" }} Arguments --------- The where function takes three or four arguments. The `OPERATOR` argument is optional. SLICE (`[]any`) A [page collection](https://gohugo.io/quick-reference/glossary/#page-collection) or a [slice](https://gohugo.io/quick-reference/glossary/#slice) of [maps](https://gohugo.io/quick-reference/glossary/#map) . KEY (`string`) The key of the page or map value to compare with `VALUE`. With page collections, commonly used comparison keys are `Section`, `Type`, and `Params`. To compare with a member of the page `Params` map, [chain](https://gohugo.io/quick-reference/glossary/#chain) the subkey as shown below: {{ $result := where .Site.RegularPages "Params.foo" "bar" }} OPERATOR (`string`) The logical comparison [operator](https://gohugo.io/functions/collections/where/#operators) . VALUE (`any`) The value with which to compare. The values to compare must have comparable data types. For example: | Comparison | Result | | --- | --- | | `"123" "eq" "123"` | `true` | | `"123" "eq" 123` | `false` | | `false "eq" "false"` | `false` | | `false "eq" false` | `true` | When one or both of the values to compare is a slice, use the `in`, `not in`, or `intersect` operators as described below. Operators --------- Use any of the following logical operators: `=`, `==`, `eq` (`bool`) Reports whether the given field value is equal to `VALUE`. `!=`, `<>`, `ne` (`bool`) Reports whether the given field value is not equal to `VALUE`. `>=`, `ge` (`bool`) Reports whether the given field value is greater than or equal to `VALUE`. `>`, `gt` `true` Reports whether the given field value is greater than `VALUE`. `<=`, `le` (`bool`) Reports whether the given field value is less than or equal to `VALUE`. `<`, `lt` (`bool`) Reports whether the given field value is less than `VALUE`. `in` (`bool`) Reports whether the given field value is a member of `VALUE`. Compare string to slice, or string to string. See [details](https://gohugo.io/functions/collections/in/) . `not in` (`bool`) Reports whether the given field value is not a member of `VALUE`. Compare string to slice, or string to string. See [details](https://gohugo.io/functions/collections/in/) . `intersect` (`bool`) Reports whether the given field value (a slice) contains one or more elements in common with `VALUE`. See [details](https://gohugo.io/functions/collections/intersect/) . `like` (`bool`) Reports whether the given field value matches the [regular expression](https://gohugo.io/quick-reference/glossary/#regular-expression) specified in `VALUE`. Use the `like` operator to compare `string` values. The `like` operator returns `false` when comparing other data types to the regular expression. The examples below perform comparisons within a page collection, but the same comparisons are applicable to a slice of maps. String comparison ----------------- Compare the value of the given field to a [`string`](https://gohugo.io/quick-reference/glossary/#string) : {{ $pages := where .Site.RegularPages "Section" "eq" "books" }} {{ $pages := where .Site.RegularPages "Section" "ne" "books" }} Numeric comparison ------------------ Compare the value of the given field to an [`int`](https://gohugo.io/quick-reference/glossary/#int) or [`float`](https://gohugo.io/quick-reference/glossary/#float) : {{ $books := where site.RegularPages "Section" "eq" "books" }} {{ $pages := where $books "Params.price" "eq" 42 }} {{ $pages := where $books "Params.price" "ne" 42.67 }} {{ $pages := where $books "Params.price" "ge" 42 }} {{ $pages := where $books "Params.price" "gt" 42.67 }} {{ $pages := where $books "Params.price" "le" 42 }} {{ $pages := where $books "Params.price" "lt" 42.67 }} Boolean comparison ------------------ Compare the value of the given field to a [`bool`](https://gohugo.io/quick-reference/glossary/#bool) : {{ $books := where site.RegularPages "Section" "eq" "books" }} {{ $pages := where $books "Params.fiction" "eq" true }} {{ $pages := where $books "Params.fiction" "eq" false }} {{ $pages := where $books "Params.fiction" "ne" true }} {{ $pages := where $books "Params.fiction" "ne" false }} Member comparison ----------------- Compare a [`scalar`](https://gohugo.io/quick-reference/glossary/#scalar) to a [`slice`](https://gohugo.io/quick-reference/glossary/#slice) . For example, to return a slice of pages where the `color` page parameter is either “red” or “yellow”: {{ $fruit := where site.RegularPages "Section" "eq" "fruit" }} {{ $colors := slice "red" "yellow" }} {{ $pages := where $fruit "Params.color" "in" $colors }} To return a slice of pages where the “color” page parameter is neither “red” nor “yellow”: {{ $fruit := where site.RegularPages "Section" "eq" "fruit" }} {{ $colors := slice "red" "yellow" }} {{ $pages := where $fruit "Params.color" "not in" $colors }} Intersection comparison ----------------------- Compare a `slice` to a `slice`, returning elements with common values. This is frequently used when comparing taxonomy terms. For example, to return a slice of pages where any of the terms in the “genres” taxonomy are “suspense” or “romance”: {{ $books := where site.RegularPages "Section" "eq" "books" }} {{ $genres := slice "suspense" "romance" }} {{ $pages := where $books "Params.genres" "intersect" $genres }} Regular expression comparison ----------------------------- To return a slice of pages where the “author” page parameter begins with either “victor” or “Victor”: {{ $pages := where .Site.RegularPages "Params.author" "like" `(?i)^victor` }} When specifying the regular expression, use a raw [string literal](https://go.dev/ref/spec#String_literals) (backticks) instead of an interpreted string literal (double quotes) to simplify the syntax. With an interpreted string literal you must escape backslashes. Go’s regular expression package implements the [RE2 syntax](https://github.com/google/re2/wiki/Syntax/) . The RE2 syntax is a subset of that accepted by [PCRE](https://www.pcre.org/) , roughly speaking, and with various [caveats](https://swtch.com/~rsc/regexp/regexp3.html#caveats) . Note that the RE2 `\C` escape sequence is not supported. Use the `like` operator to compare string values. Comparing other data types will result in an empty slice. Date comparison --------------- ### Predefined dates There are four predefined front matter dates: [`date`](https://gohugo.io/methods/page/date/) , \[`publishDate`\], [`lastmod`](https://gohugo.io/methods/page/lastmod/) , and \[`expiryDate`\]. Regardless of the front matter data format (TOML, YAML, or JSON) these are [`time.Time`](https://pkg.go.dev/time#Time) values, allowing precise comparisons. For example, to return a slice of pages that were created before the current year: {{ $startOfYear := time.AsTime (printf "%d-01-01" now.Year) }} {{ $pages := where .Site.RegularPages "Date" "lt" $startOfYear }} ### Custom dates With custom front matter dates, the comparison depends on the front matter data format (TOML, YAML, or JSON). Using TOML for pages with custom front matter dates enables precise date comparisons. With TOML, date values are first-class citizens. TOML has a date data type while JSON and YAML do not. If you quote a TOML date, it is a string. If you do not quote a TOML date value, it is [`time.Time`](https://pkg.go.dev/time#Time) value, enabling precise comparisons. In the TOML example below, note that the event date is not quoted. content/events/2024-user-conference.md +++ title = '2024 User Conference" eventDate = 2024-04-01 +++ To return a slice of future events: {{ $events := where .Site.RegularPages "Type" "events" }} {{ $futureEvents := where $events "Params.eventDate" "gt" now }} When working with YAML or JSON, or quoted TOML values, custom dates are strings; you cannot compare them with `time.Time` values. String comparisons may be possible if the custom date layout is consistent from one page to the next. To be safe, filter the pages by ranging over the slice: {{ $events := where .Site.RegularPages "Type" "events" }} {{ $futureEvents := slice }} {{ range $events }} {{ if gt (time.AsTime .Params.eventDate) now }} {{ $futureEvents = $futureEvents | append . }} {{ end }} {{ end }} Nil comparison -------------- To return a slice of pages where the “color” parameter is present in front matter, compare to `nil`: {{ $pages := where .Site.RegularPages "Params.color" "ne" nil }} To return a slice of pages where the “color” parameter is not present in front matter, compare to `nil`: {{ $pages := where .Site.RegularPages "Params.color" "eq" nil }} In both examples above, note that `nil` is not quoted. Nested comparison ----------------- These are equivalent: {{ $pages := where .Site.RegularPages "Type" "tutorials" }} {{ $pages = where $pages "Params.level" "eq" "beginner" }} {{ $pages := where (where .Site.RegularPages "Type" "tutorials") "Params.level" "eq" "beginner" }} Portable section comparison --------------------------- Useful for theme authors, avoid hardcoding section names by using the `where` function with the [`MainSections`](https://gohugo.io/methods/site/mainsections/) method on a `Site` object. {{ $pages := where .Site.RegularPages "Section" "in" .Site.MainSections }} With this construct, a theme author can instruct users to specify their main sections in their project configuration: mainSections: - blog - galleries mainSections = ['blog', 'galleries'] { "mainSections": [\ "blog",\ "galleries"\ ] } If `mainSections` is not defined in your project configuration, the `MainSections` method returns a slice with one element—the top-level section with the most pages. Boolean/undefined comparison ---------------------------- Consider this project structure: content/ ├── posts/ │ ├── _index.md │ ├── post-1.md <-- front matter: exclude = false │ ├── post-2.md <-- front matter: exclude = true │ └── post-3.md <-- front matter: exclude not defined └── _index.md The first two pages have an “exclude” field in front matter, but the last page does not. When testing for _equality_, the third page is _excluded_ from the result. When testing for _inequality_, the third page is _included_ in the result. ### Equality test This template:
      {{ range where .Site.RegularPages "Params.exclude" "eq" false }}
    • {{ .LinkTitle }}
    • {{ end }}
    Is rendered to: This template:
      {{ range where .Site.RegularPages "Params.exclude" "eq" true }}
    • {{ .LinkTitle }}
    • {{ end }}
    Is rendered to: ### Inequality test This template:
      {{ range where .Site.RegularPages "Params.exclude" "ne" false }}
    • {{ .LinkTitle }}
    • {{ end }}
    Is rendered to: This template:
      {{ range where .Site.RegularPages "Params.exclude" "ne" true }}
    • {{ .LinkTitle }}
    • {{ end }}
    Is rendered to: To exclude a page with an undefined field from a boolean _inequality_ test: 1. Create a slice using a boolean comparison 2. Create a slice using a nil comparison 3. Subtract the second slice from the first slice using the [`collections.Complement`](https://gohugo.io/functions/collections/complement/) function. This template: {{ $p1 := where .Site.RegularPages "Params.exclude" "ne" true }} {{ $p2 := where .Site.RegularPages "Params.exclude" "eq" nil }} Is rendered to: This template: {{ $p1 := where .Site.RegularPages "Params.exclude" "ne" false }} {{ $p2 := where .Site.RegularPages "Params.exclude" "eq" nil }} Is rendered to: * * * Last updated: February 26, 2026 : [content: More site-to-project changes (05b69f84e)](https://github.com/gohugoio/hugoDocs/commit/05b69f84e25e9cdd10ed1ac7ce5d37d4ac0b3725) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/functions/collections/Where.md) --- # Data Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/site/data/](https://gohugo.io/images/qr/qr_23ae47fba34eae36.png) Returns a data structure composed from the files in the data directory. Syntax SITE.Data Returns map Deprecated in [v0.156.0](https://github.com/gohugoio/hugo/releases/tag/v0.156.0) Use [`hugo.Data`](https://gohugo.io/functions/hugo/data/) instead. * * * Last updated: March 2, 2026 : [content: Clean up content for deprecated features (850dc5b2b)](https://github.com/gohugoio/hugoDocs/commit/850dc5b2b26b7136504b24a46d6abede248c0fed) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/site/Data.md) --- # Exif Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/resource/exif/](https://gohugo.io/images/qr/qr_7d90184fd7e0aadc.png) Returns an object containing Exif metadata for supported image formats. Syntax RESOURCE.Exif Returns meta.ExifInfo Deprecated in [v0.155.0](https://github.com/gohugoio/hugo/releases/tag/v0.155.0) Use [`Meta`](https://gohugo.io/methods/resource/meta/) instead. * * * Last updated: March 2, 2026 : [content: Clean up content for deprecated features (850dc5b2b)](https://github.com/gohugoio/hugoDocs/commit/850dc5b2b26b7136504b24a46d6abede248c0fed) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/resource/Exif.md) --- # Err Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/resource/err/](https://gohugo.io/images/qr/qr_c73930f33bc69592.png) Applicable to resources returned by the resources.GetRemote function, returns an error message if the HTTP request fails, else nil. Syntax RESOURCE.Err Returns resource.resourceError Deprecated in [v0.141.0](https://github.com/gohugoio/hugo/releases/tag/v0.141.0) Use the `try` statement instead. See [example](https://gohugo.io/functions/go-template/try/#example) . * * * Last updated: March 2, 2026 : [content: Clean up content for deprecated features (850dc5b2b)](https://github.com/gohugoio/hugoDocs/commit/850dc5b2b26b7136504b24a46d6abede248c0fed) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/resource/Err.md) --- # Go template functions, operators, and statements Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/functions/go-template/](https://gohugo.io/images/qr/qr_3c8b28624d26232b.png) [### and\ \ and VALUE...\ \ Returns the first falsy argument. If all arguments are truthy, returns the last argument.](https://gohugo.io/functions/go-template/and/) [### block\ \ block NAME CONTEXT\ \ Defines a template and executes it in place.](https://gohugo.io/functions/go-template/block/) [### break\ \ break\ \ Used with the range statement, stops the innermost iteration and bypasses all remaining iterations.](https://gohugo.io/functions/go-template/break/) [### continue\ \ continue\ \ Used with the range statement, stops the innermost iteration and continues to the next iteration.](https://gohugo.io/functions/go-template/continue/) [### define\ \ define NAME\ \ Defines a template.](https://gohugo.io/functions/go-template/define/) [### else\ \ else VALUE\ \ Begins an alternate block for if, with, and range statements.](https://gohugo.io/functions/go-template/else/) [### end\ \ end\ \ Terminates if, with, range, block, and define statements.](https://gohugo.io/functions/go-template/end/) [### if\ \ if EXPR\ \ Executes the block if the expression is truthy.](https://gohugo.io/functions/go-template/if/) [### len\ \ len VALUE\ \ Returns the length of a string, slice, map, or collection.](https://gohugo.io/functions/go-template/len/) [### not\ \ not VALUE\ \ Returns the boolean negation of its single argument.](https://gohugo.io/functions/go-template/not/) [### or\ \ or VALUE...\ \ Returns the first truthy argument. If all arguments are falsy, returns the last argument.](https://gohugo.io/functions/go-template/or/) [### range\ \ range COLLECTION\ \ Iterates over a non-empty collection, binds context (the dot) to successive elements, and executes the block.](https://gohugo.io/functions/go-template/range/) [### return\ \ return \[VALUE\]\ \ Used within partial templates, terminates template execution and returns the given value, if any.](https://gohugo.io/functions/go-template/return/) [### template\ \ template NAME \[CONTEXT\]\ \ Executes the given template, optionally passing context.](https://gohugo.io/functions/go-template/template/) [### try\ \ try EXPRESSION\ \ Returns a TryValue object after evaluating the given expression.](https://gohugo.io/functions/go-template/try/) [### urlquery\ \ urlquery VALUE \[VALUE...\]\ \ Returns the escaped value of the textual representation of its arguments in a form suitable for embedding in a URL query.](https://gohugo.io/functions/go-template/urlquery/) [### with\ \ with EXPR\ \ Binds context (the dot) to the expression and executes the block if expression is truthy.](https://gohugo.io/functions/go-template/with/) --- # Configure content types Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/configuration/content-types/](https://gohugo.io/images/qr/qr_6b1a65725d3cd63e.png) Configure content types. [New in v0.144.0](https://github.com/gohugoio/hugo/releases/tag/v0.144.0) Hugo supports six [content formats](https://gohugo.io/quick-reference/glossary/#content-format) : | Content format | Media type | Identifier | File extensions | | --- | --- | --- | --- | | Markdown | `text/markdown` | `markdown` | `markdown`,`md`, `mdown` | | HTML | `text/html` | `html` | `htm`, `html` | | Emacs Org Mode | `text/org` | `org` | `org` | | AsciiDoc | `text/asciidoc` | `asciidoc` | `ad`, `adoc`, `asciidoc` | | Pandoc | `text/pandoc` | `pandoc` | `pandoc`, `pdc` | | reStructuredText | `text/rst` | `rst` | `rst` | These can be used as either page content or [page resources](https://gohugo.io/quick-reference/glossary/#page-resource) . When used as page resources, their [resource type](https://gohugo.io/quick-reference/glossary/#resource-type) is `page`. Consider this example of a [page bundle](https://gohugo.io/quick-reference/glossary/#page-bundle) : content/ └── example/ ├── index.md <-- content ├── a.adoc <-- resource (resource type: page) ├── b.html <-- resource (resource type: page) ├── c.md <-- resource (resource type: page) ├── d.org <-- resource (resource type: page) ├── e.pdc <-- resource (resource type: page) ├── f.rst <-- resource (resource type: page) ├── g.jpg <-- resource (resource type: image) └── h.png <-- resource (resource type: image) The `index.md` file is the page’s content, while the other files are page resources. Files `a` through `f` are of resource type `page`, while `g` and `h` are of resource type `image`. When you build a site, Hugo does not publish page resources having a resource type of `page`. For example, this is the result of building the site above: public/ ├── example/ │ ├── g.jpg │ ├── h.png │ └── index.html └── index.html The default behavior is appropriate in most cases. Given that page resources containing markup are typically intended for inclusion in the main content, publishing them independently is generally undesirable. The default behavior is determined by the `contentTypes` configuration: contentTypes: text/asciidoc: {} text/html: {} text/markdown: {} text/org: {} text/pandoc: {} text/rst: {} [contentTypes] [contentTypes.'text/asciidoc'] [contentTypes.'text/html'] [contentTypes.'text/markdown'] [contentTypes.'text/org'] [contentTypes.'text/pandoc'] [contentTypes.'text/rst'] { "contentTypes": { "text/asciidoc": {}, "text/html": {}, "text/markdown": {}, "text/org": {}, "text/pandoc": {}, "text/rst": {} } } In this default configuration, page resources with those media types will have a resource type of `page`, and will not be automatically published. To change the resource type assignment from `page` to `text` for a given media type, remove the corresponding entry from the list. For example, to set the resource type of `text/html` files to `text`, thereby enabling automatic publication, remove the `text/html` entry: contentTypes: text/asciidoc: {} text/markdown: {} text/org: {} text/pandoc: {} text/rst: {} [contentTypes] [contentTypes.'text/asciidoc'] [contentTypes.'text/markdown'] [contentTypes.'text/org'] [contentTypes.'text/pandoc'] [contentTypes.'text/rst'] { "contentTypes": { "text/asciidoc": {}, "text/markdown": {}, "text/org": {}, "text/pandoc": {}, "text/rst": {} } } * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/configuration/content-types.md) --- # HasChildren Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/menu-entry/haschildren/](https://gohugo.io/images/qr/qr_f2c7d67bd05c016d.png) Reports whether the given menu entry has child menu entries. Syntax MENUENTRY.HasChildren Returns bool Use the `HasChildren` method when rendering a nested menu. With this project configuration: menus: main: - name: Products pageRef: /product weight: 10 - name: Product 1 pageRef: /products/product-1 parent: Products weight: 1 - name: Product 2 pageRef: /products/product-2 parent: Products weight: 2 [menus] [[menus.main]] name = 'Products' pageRef = '/product' weight = 10 [[menus.main]] name = 'Product 1' pageRef = '/products/product-1' parent = 'Products' weight = 1 [[menus.main]] name = 'Product 2' pageRef = '/products/product-2' parent = 'Products' weight = 2 { "menus": { "main": [\ {\ "name": "Products",\ "pageRef": "/product",\ "weight": 10\ },\ {\ "name": "Product 1",\ "pageRef": "/products/product-1",\ "parent": "Products",\ "weight": 1\ },\ {\ "name": "Product 2",\ "pageRef": "/products/product-2",\ "parent": "Products",\ "weight": 2\ }\ ] } } And this template:
      {{ range .Site.Menus.main }}
    • {{ .Name }} {{ if .HasChildren }} {{ end }}
    • {{ end }}
    Hugo renders this HTML: * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/menu-entry/HasChildren.md) --- # Dimension Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/site/dimension/](https://gohugo.io/images/qr/qr_61057e2255e91a35.png) Returns the dimension object for the given dimension for the given site. Syntax SITE.Dimension DIMENSION Returns page.SiteDimension [New in v0.153.0](https://github.com/gohugoio/hugo/releases/tag/v0.153.0) The `Dimension` method on a `Site` object returns the dimension object for the given [dimension](https://gohugo.io/quick-reference/glossary/#dimension) . The `DIMENSION` argument must be one of `language`, `version`, or `role`. | Example | Returns | Equivalent to | | --- | --- | --- | | `{{ .Site.Dimension "language" }}` | `langs.Language` | `{{ .Site.Language }}` | | `{{ .Site.Dimension "version" }}` | `version.Version` | `{{ .Site.Version }}` | | `{{ .Site.Dimension "role" }}` | `roles.Role` | `{{ .Site.Role }}` | {{ $languageObject := .Site.Dimension "language" }} {{ $languageObject.IsDefault }} → true {{ $languageObject.Name }} → en {{ $versionObject := .Site.Dimension "version" }} {{ $versionObject.IsDefault }} → true {{ $versionObject.Name }} → v1.0.0 {{ $roleObject := .Site.Dimension "role" }} {{ $roleObject.IsDefault }} → true {{ $roleObject.Name }} → guest * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/site/Dimension.md) --- # Equal Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/time/equal/](https://gohugo.io/images/qr/qr_9d920306b37b7a23.png) Reports whether TIME1 is equal to TIME2. Syntax TIME1.Equal TIME2 Returns bool {{ $t1 := time.AsTime "2023-01-01T17:00:00-08:00" }} {{ $t2 := time.AsTime "2023-01-01T20:00:00-05:00" }} {{ $t1.Equal $t2 }} → true * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/time/Equal.md) --- # Fill Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/resource/fill/](https://gohugo.io/images/qr/qr_bf3f2dc03f567c9b.png) Applicable to images, returns a new image resource cropped and resized according to the given processing specification. Syntax RESOURCE.Fill SPECIFICATION Returns images.ImageResource Use this method with [global resources](https://gohugo.io/quick-reference/glossary/#global-resource) , [page resources](https://gohugo.io/quick-reference/glossary/#page-resource) , or [remote resources](https://gohugo.io/quick-reference/glossary/#remote-resource) . The `Fill` method returns a new resource from a [processable image](https://gohugo.io/quick-reference/glossary/#processable-image) according to the given [processing specification](https://gohugo.io/methods/resource/fill/#processing-specification) . Use the [`reflect.IsImageResourceProcessable`](https://gohugo.io/functions/reflect/isimageresourceprocessable/) function to verify that an image can be processed. Usage ----- When filling, you must provide both width and height (such as `500x200`) within the specification. `Fill` maintains the original aspect ratio by resizing the image to cover the target area and cropping any overflowing pixels based on the [anchor](https://gohugo.io/methods/resource/fill/#anchor) provided. {{ with resources.Get "images/original.jpg" }} {{ with .Fill "500x200 TopRight" }} {{ end }} {{ end }} In the example above, `"500x200 TopRight"` is the \_processing specification. Processing specification ------------------------ The processing specification is a space-delimited, case-insensitive list containing one or more of the following options in any sequence: action Specify one of `crop`, `fill`, `fit`, or `resize`. This is applicable to the [`Process`](https://gohugo.io/methods/resource/process/) method and the [`images.Process`](https://gohugo.io/functions/images/process/) filter. If you specify an action, you must also provide dimensions. anchor The focal point used when cropping or filling an image. Valid options include `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. The `Smart` option utilizes the [`muesli/smartcrop`](https://github.com/muesli/smartcrop) package to identify the most interesting area of the image. This defaults to the [`anchor`](https://gohugo.io/configuration/imaging/#anchor) parameter in your project configuration. background color The background color used when converting transparent images to formats that do not support transparency, such as PNG to JPEG. This color also fills the empty space created when rotating an image by a non-orthogonal angle if the space is not transparent and a background color is not specified in the processing specification. The value must be an RGB [hexadecimal color](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color) . This defaults to the [`bgColor`](https://gohugo.io/configuration/imaging/#bgcolor) parameter in your project configuration. compression [New in v0.153.5](https://github.com/gohugoio/hugo/releases/tag/v0.153.5) The encoding strategy used for the image. Options are `lossy` or `lossless`. Note that `lossless` is only supported by the WebP format. This defaults to the [`compression`](https://gohugo.io/configuration/imaging/#compression) parameter in your project configuration. dimensions The dimensions of the resulting image, in pixels. The format is `WIDTHxHEIGHT` where `WIDTH` and `HEIGHT` are whole numbers. When resizing an image, you may specify only the width (such as `600x`) or only the height (such as `x400`) for proportional scaling. Specifying both width and height when resizing an image may result in non-proportional scaling. When cropping, fitting, or filling, you must provide both width and height such as `600x400`. format The format of the resulting image. Valid options include `bmp`, `gif`, `jpeg`, `png`, `tiff`, or `webp`. This defaults to the format of the source image. hint The encoding preset used when processing WebP images, equivalent to the `-preset` flag for the [`cwebp`](https://developers.google.com/speed/webp/docs/cwebp) CLI. Valid options include `drawing`, `icon`, `photo`, `picture`, or `text`. This defaults to the [`hint`](https://gohugo.io/configuration/imaging/#hint) parameter in your project configuration. | 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 | quality The visual fidelity of the image, applicable to JPEG and WebP formats when using `lossy` compression. The format is `qQUALITY` where `QUALITY` is a whole number between `1` and `100`, inclusive. Lower numbers prioritize smaller file size, while higher numbers prioritize visual clarity. This defaults to the [`quality`](https://gohugo.io/configuration/imaging/#quality) parameter in your project configuration. resampling filter The algorithm used to calculate new pixels when resizing, fitting, or filling an image. Common options include `box`, `lanczos`, `catmullRom`, `mitchellNetravali`, `linear`, or `nearestNeighbor`. This defaults to the [`resampleFilter`](https://gohugo.io/configuration/imaging/#resamplefilter) parameter in your project configuration. | 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 | Refer to the [source documentation](https://github.com/disintegration/imaging#image-resizing) for a complete list of available resampling filters. If you wish to improve image quality at the expense of performance, you may wish to experiment with the alternative filters. rotation The number of whole degrees to rotate an image counter-clockwise. The format is `rDEGREES` where `DEGREES` is a whole number. Hugo performs rotation before any other transformations, so your [target dimensions](https://gohugo.io/methods/resource/fill/#dimensions) and any [anchor](https://gohugo.io/methods/resource/fill/#anchor) should refer to the image orientation after rotation. Use `r90`, `r180`, or `r270` for orthogonal rotations, or arbitrary angles such as `r45`. To rotate clockwise, use a negative number such as `r-45`. To automatically rotate an image based on its Exif orientation tag, use the [`images.AutoOrient`](https://gohugo.io/functions/images/autoorient/) filter instead of manual rotation. Rotating by non-orthogonal values increases the image extents to fit the rotated corners. For formats supporting alpha channels such as PNG or WebP, this resulting empty space is transparent by default. If the target format does not support transparency such as JPEG, or if you explicitly specify a [background color](https://gohugo.io/methods/resource/fill/#background-color) in the processing specification, the space is filled. If a color is required but not specified in the processing string, it defaults to the [`bgColor`](https://gohugo.io/configuration/imaging/#bgcolor) parameter in your project configuration. Example ------- {{ with resources.Get "images/original.jpg" }} {{ with .Fill "500x200 TopRight" }} {{ end }} {{ end }} Original ![Zion National Park](https://gohugo.io/images/examples/zion-national-park_hu_4668ccb5c983a9ac.jpg) Processed ![Zion National Park](https://gohugo.io/images/examples/zion-national-park_hu_13802abba3b410bb.jpg) * * * Last updated: February 27, 2026 : [content: Miscellaneous udpates for v0.157.0 (35da1aa3c)](https://github.com/gohugoio/hugoDocs/commit/35da1aa3c2fe3b54bdb57df1a308533844af9df5) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/resource/Fill.md) --- # Fit Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/resource/fit/](https://gohugo.io/images/qr/qr_f2b01861a0e23055.png) Applicable to images, returns a new image resource downscaled to fit according to the given processing specification. Syntax RESOURCE.Fit SPECIFICATION Returns images.ImageResource Use this method with [global resources](https://gohugo.io/quick-reference/glossary/#global-resource) , [page resources](https://gohugo.io/quick-reference/glossary/#page-resource) , or [remote resources](https://gohugo.io/quick-reference/glossary/#remote-resource) . The `Fit` method returns a new resource from a [processable image](https://gohugo.io/quick-reference/glossary/#processable-image) according to the given [processing specification](https://gohugo.io/methods/resource/fit/#processing-specification) . Use the [`reflect.IsImageResourceProcessable`](https://gohugo.io/functions/reflect/isimageresourceprocessable/) function to verify that an image can be processed. Usage ----- When fitting, you must provide both width and height (such as `300x175`) within the specification. `Fit` maintains the original aspect ratio by downscaling the image until it fits within the specified dimensions. Unlike [`Fill`](https://gohugo.io/methods/resource/fill/) or [`Resize`](https://gohugo.io/methods/resource/resize/) , this method will never upscale an image; if the source image is smaller than the target dimensions, the dimensions of the resulting image are the same as the original. {{ with resources.Get "images/original.jpg" }} {{ with .Fit "300x175" }} {{ end }} {{ end }} In the example above, `"300x175"` is the processing specification. Processing specification ------------------------ The processing specification is a space-delimited, case-insensitive list containing one or more of the following options in any sequence: action Specify one of `crop`, `fill`, `fit`, or `resize`. This is applicable to the [`Process`](https://gohugo.io/methods/resource/process/) method and the [`images.Process`](https://gohugo.io/functions/images/process/) filter. If you specify an action, you must also provide dimensions. anchor The focal point used when cropping or filling an image. Valid options include `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. The `Smart` option utilizes the [`muesli/smartcrop`](https://github.com/muesli/smartcrop) package to identify the most interesting area of the image. This defaults to the [`anchor`](https://gohugo.io/configuration/imaging/#anchor) parameter in your project configuration. background color The background color used when converting transparent images to formats that do not support transparency, such as PNG to JPEG. This color also fills the empty space created when rotating an image by a non-orthogonal angle if the space is not transparent and a background color is not specified in the processing specification. The value must be an RGB [hexadecimal color](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color) . This defaults to the [`bgColor`](https://gohugo.io/configuration/imaging/#bgcolor) parameter in your project configuration. compression [New in v0.153.5](https://github.com/gohugoio/hugo/releases/tag/v0.153.5) The encoding strategy used for the image. Options are `lossy` or `lossless`. Note that `lossless` is only supported by the WebP format. This defaults to the [`compression`](https://gohugo.io/configuration/imaging/#compression) parameter in your project configuration. dimensions The dimensions of the resulting image, in pixels. The format is `WIDTHxHEIGHT` where `WIDTH` and `HEIGHT` are whole numbers. When resizing an image, you may specify only the width (such as `600x`) or only the height (such as `x400`) for proportional scaling. Specifying both width and height when resizing an image may result in non-proportional scaling. When cropping, fitting, or filling, you must provide both width and height such as `600x400`. format The format of the resulting image. Valid options include `bmp`, `gif`, `jpeg`, `png`, `tiff`, or `webp`. This defaults to the format of the source image. hint The encoding preset used when processing WebP images, equivalent to the `-preset` flag for the [`cwebp`](https://developers.google.com/speed/webp/docs/cwebp) CLI. Valid options include `drawing`, `icon`, `photo`, `picture`, or `text`. This defaults to the [`hint`](https://gohugo.io/configuration/imaging/#hint) parameter in your project configuration. | 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 | quality The visual fidelity of the image, applicable to JPEG and WebP formats when using `lossy` compression. The format is `qQUALITY` where `QUALITY` is a whole number between `1` and `100`, inclusive. Lower numbers prioritize smaller file size, while higher numbers prioritize visual clarity. This defaults to the [`quality`](https://gohugo.io/configuration/imaging/#quality) parameter in your project configuration. resampling filter The algorithm used to calculate new pixels when resizing, fitting, or filling an image. Common options include `box`, `lanczos`, `catmullRom`, `mitchellNetravali`, `linear`, or `nearestNeighbor`. This defaults to the [`resampleFilter`](https://gohugo.io/configuration/imaging/#resamplefilter) parameter in your project configuration. | 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 | Refer to the [source documentation](https://github.com/disintegration/imaging#image-resizing) for a complete list of available resampling filters. If you wish to improve image quality at the expense of performance, you may wish to experiment with the alternative filters. rotation The number of whole degrees to rotate an image counter-clockwise. The format is `rDEGREES` where `DEGREES` is a whole number. Hugo performs rotation before any other transformations, so your [target dimensions](https://gohugo.io/methods/resource/fit/#dimensions) and any [anchor](https://gohugo.io/methods/resource/fit/#anchor) should refer to the image orientation after rotation. Use `r90`, `r180`, or `r270` for orthogonal rotations, or arbitrary angles such as `r45`. To rotate clockwise, use a negative number such as `r-45`. To automatically rotate an image based on its Exif orientation tag, use the [`images.AutoOrient`](https://gohugo.io/functions/images/autoorient/) filter instead of manual rotation. Rotating by non-orthogonal values increases the image extents to fit the rotated corners. For formats supporting alpha channels such as PNG or WebP, this resulting empty space is transparent by default. If the target format does not support transparency such as JPEG, or if you explicitly specify a [background color](https://gohugo.io/methods/resource/fit/#background-color) in the processing specification, the space is filled. If a color is required but not specified in the processing string, it defaults to the [`bgColor`](https://gohugo.io/configuration/imaging/#bgcolor) parameter in your project configuration. Example ------- {{ with resources.Get "images/original.jpg" }} {{ with .Fit "300x175" }} {{ end }} {{ end }} Original ![Zion National Park](https://gohugo.io/images/examples/zion-national-park_hu_4668ccb5c983a9ac.jpg) Processed ![Zion National Park](https://gohugo.io/images/examples/zion-national-park_hu_8e4ac01e8e46146.jpg) * * * Last updated: February 27, 2026 : [content: Miscellaneous udpates for v0.157.0 (35da1aa3c)](https://github.com/gohugoio/hugoDocs/commit/35da1aa3c2fe3b54bdb57df1a308533844af9df5) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/resource/Fit.md) --- # GroupBy Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/groupby/](https://gohugo.io/images/qr/qr_e8182088033351e0.png) Returns the given page collection grouped by the given field in ascending order. Syntax PAGES.GroupBy FIELD \[SORT\] Returns page.PagesGroup For the optional sort order, specify either `asc` for ascending order, or `desc` for descending order. {{ range .Pages.GroupBy "Section" }}

    {{ .Key }}

    {{ end }} To sort the groups in descending order: {{ range .Pages.GroupBy "Section" "desc" }}

    {{ .Key }}

    {{ end }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/GroupBy.md) --- # GroupByParam Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/groupbyparam/](https://gohugo.io/images/qr/qr_8f23c369e25dbbc5.png) Returns the given page collection grouped by the given parameter in ascending order. Syntax PAGES.GroupByParam PARAM \[SORT\] Returns page.PagesGroup For the optional sort order, specify either `asc` for ascending order, or `desc` for descending order. {{ range .Pages.GroupByParam "color" }}

    {{ .Key | title }}

    {{ end }} To sort the groups in descending order: {{ range .Pages.GroupByParam "color" "desc" }}

    {{ .Key | title }}

    {{ end }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/GroupByParam.md) --- # GroupByDate Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/groupbydate/](https://gohugo.io/images/qr/qr_a8f950c296ac16ba.png) Returns the given page collection grouped by date in descending order. Syntax PAGES.GroupByDate LAYOUT \[SORT\] Returns page.PagesGroup When grouping by date, the value is determined by your [project configuration](https://gohugo.io/configuration/front-matter/#dates) , defaulting to the `date` field in front matter. The [layout string](https://gohugo.io/methods/pages/groupbydate/#layout-string) has the same format as the layout string for the [`time.Format`](https://gohugo.io/functions/time/format/) function. The resulting group key is [localized](https://gohugo.io/quick-reference/glossary/#localization) for language and region. For the optional sort order, specify either `asc` for ascending order, or `desc` for descending order. To group content by year and month: {{ range .Pages.GroupByDate "January 2006" }}

    {{ .Key }}

    {{ end }} To sort the groups in ascending order: {{ range .Pages.GroupByDate "January 2006" "asc" }}

    {{ .Key }}

    {{ end }} The pages within each group will also be sorted by date, either ascending or descending depending on the grouping option. To sort the pages within each group, use one of the sorting methods. For example, to sort the pages within each group by title: {{ range .Pages.GroupByDate "January 2006" }}

    {{ .Key }}

    {{ end }} Layout string ------------- Format a `time.Time` value based on [Go’s reference time](https://pkg.go.dev/time#pkg-constants) : Mon Jan 2 15:04:05 MST 2006 Create a layout string using these components: | Description | Valid components | | --- | --- | | Year | `"2006" "06"` | | Month | `"Jan" "January" "01" "1"` | | Day of the week | `"Mon" "Monday"` | | Day of the month | `"2" "_2" "02"` | | Day of the year | `"__2" "002"` | | Hour | `"15" "3" "03"` | | Minute | `"4" "04"` | | Second | `"5" "05"` | | AM/PM mark | `"PM"` | | Time zone offsets | `"-0700" "-07:00" "-07" "-070000" "-07:00:00"` | Replace the sign in the layout string with a Z to print Z instead of an offset for the UTC zone. | Description | Valid components | | --- | --- | | Time zone offsets | `"Z0700" "Z07:00" "Z07" "Z070000" "Z07:00:00"` | {{ $t := "2023-01-27T23:44:58-08:00" }} {{ $t = time.AsTime $t }} {{ $t = $t.Format "Jan 02, 2006 3:04 PM Z07:00" }} {{ $t }} → Jan 27, 2023 11:44 PM -08:00 Strings such as `PST` and `CET` are not time zones. They are time zone _abbreviations_. Strings such as `-07:00` and `+01:00` are not time zones. They are time zone _offsets_. A time zone is a geographic area with the same local time. For example, the time zone abbreviated by `PST` and `PDT` (depending on Daylight Savings Time) is `America/Los_Angeles`. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/GroupByDate.md) --- # GroupByLastmod Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/groupbylastmod/](https://gohugo.io/images/qr/qr_5ccf6260109cb5eb.png) Returns the given page collection grouped by last modification date in descending order. Syntax PAGES.GroupByLastmod LAYOUT \[SORT\] Returns page.PagesGroup When grouping by last modification date, the value is determined by your [project configuration](https://gohugo.io/configuration/front-matter/#dates) , defaulting to the `lastmod` field in front matter. The [layout string](https://gohugo.io/methods/pages/groupbylastmod/#layout-string) has the same format as the layout string for the [`time.Format`](https://gohugo.io/functions/time/format/) function. The resulting group key is [localized](https://gohugo.io/quick-reference/glossary/#localization) for language and region. For the optional sort order, specify either `asc` for ascending order, or `desc` for descending order. To group content by year and month: {{ range .Pages.GroupByLastmod "January 2006" }}

    {{ .Key }}

    {{ end }} To sort the groups in ascending order: {{ range .Pages.GroupByLastmod "January 2006" "asc" }}

    {{ .Key }}

    {{ end }} The pages within each group will also be sorted by last modification date, either ascending or descending depending on your grouping option. To sort the pages within each group, use one of the sorting methods. For example, to sort the pages within each group by title: {{ range .Pages.GroupByLastmod "January 2006" }}

    {{ .Key }}

    {{ end }} Layout string ------------- Format a `time.Time` value based on [Go’s reference time](https://pkg.go.dev/time#pkg-constants) : Mon Jan 2 15:04:05 MST 2006 Create a layout string using these components: | Description | Valid components | | --- | --- | | Year | `"2006" "06"` | | Month | `"Jan" "January" "01" "1"` | | Day of the week | `"Mon" "Monday"` | | Day of the month | `"2" "_2" "02"` | | Day of the year | `"__2" "002"` | | Hour | `"15" "3" "03"` | | Minute | `"4" "04"` | | Second | `"5" "05"` | | AM/PM mark | `"PM"` | | Time zone offsets | `"-0700" "-07:00" "-07" "-070000" "-07:00:00"` | Replace the sign in the layout string with a Z to print Z instead of an offset for the UTC zone. | Description | Valid components | | --- | --- | | Time zone offsets | `"Z0700" "Z07:00" "Z07" "Z070000" "Z07:00:00"` | {{ $t := "2023-01-27T23:44:58-08:00" }} {{ $t = time.AsTime $t }} {{ $t = $t.Format "Jan 02, 2006 3:04 PM Z07:00" }} {{ $t }} → Jan 27, 2023 11:44 PM -08:00 Strings such as `PST` and `CET` are not time zones. They are time zone _abbreviations_. Strings such as `-07:00` and `+01:00` are not time zones. They are time zone _offsets_. A time zone is a geographic area with the same local time. For example, the time zone abbreviated by `PST` and `PDT` (depending on Daylight Savings Time) is `America/Los_Angeles`. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/GroupByLastmod.md) --- # GroupByExpiryDate Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/groupbyexpirydate/](https://gohugo.io/images/qr/qr_e235cd2f3443403f.png) Returns the given page collection grouped by expiration date in descending order. Syntax PAGES.GroupByExpiryDate LAYOUT \[SORT\] Returns page.PagesGroup When grouping by expiration date, the value is determined by your [project configuration](https://gohugo.io/configuration/front-matter/#dates) , defaulting to the `expiryDate` field in front matter. The [layout string](https://gohugo.io/methods/pages/groupbyexpirydate/#layout-string) has the same format as the layout string for the [`time.Format`](https://gohugo.io/functions/time/format/) function. The resulting group key is [localized](https://gohugo.io/quick-reference/glossary/#localization) for language and region. For the optional sort order, specify either `asc` for ascending order, or `desc` for descending order. To group content by year and month: {{ range .Pages.GroupByExpiryDate "January 2006" }}

    {{ .Key }}

    {{ end }} To sort the groups in ascending order: {{ range .Pages.GroupByExpiryDate "January 2006" "asc" }}

    {{ .Key }}

    {{ end }} The pages within each group will also be sorted by expiration date, either ascending or descending depending on your grouping option. To sort the pages within each group, use one of the sorting methods. For example, to sort the pages within each group by title: {{ range .Pages.GroupByExpiryDate "January 2006" }}

    {{ .Key }}

    {{ end }} Layout string ------------- Format a `time.Time` value based on [Go’s reference time](https://pkg.go.dev/time#pkg-constants) : Mon Jan 2 15:04:05 MST 2006 Create a layout string using these components: | Description | Valid components | | --- | --- | | Year | `"2006" "06"` | | Month | `"Jan" "January" "01" "1"` | | Day of the week | `"Mon" "Monday"` | | Day of the month | `"2" "_2" "02"` | | Day of the year | `"__2" "002"` | | Hour | `"15" "3" "03"` | | Minute | `"4" "04"` | | Second | `"5" "05"` | | AM/PM mark | `"PM"` | | Time zone offsets | `"-0700" "-07:00" "-07" "-070000" "-07:00:00"` | Replace the sign in the layout string with a Z to print Z instead of an offset for the UTC zone. | Description | Valid components | | --- | --- | | Time zone offsets | `"Z0700" "Z07:00" "Z07" "Z070000" "Z07:00:00"` | {{ $t := "2023-01-27T23:44:58-08:00" }} {{ $t = time.AsTime $t }} {{ $t = $t.Format "Jan 02, 2006 3:04 PM Z07:00" }} {{ $t }} → Jan 27, 2023 11:44 PM -08:00 Strings such as `PST` and `CET` are not time zones. They are time zone _abbreviations_. Strings such as `-07:00` and `+01:00` are not time zones. They are time zone _offsets_. A time zone is a geographic area with the same local time. For example, the time zone abbreviated by `PST` and `PDT` (depending on Daylight Savings Time) is `America/Los_Angeles`. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/GroupByExpiryDate.md) --- # GroupByPublishDate Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/groupbypublishdate/](https://gohugo.io/images/qr/qr_b0a99614ebac423b.png) Returns the given page collection grouped by publish date in descending order. Syntax PAGES.GroupByPublishDate LAYOUT \[SORT\] Returns page.PagesGroup When grouping by publish date, the value is determined by your [project configuration](https://gohugo.io/configuration/front-matter/#dates) , defaulting to the `publishDate` field in front matter. The [layout string](https://gohugo.io/methods/pages/groupbypublishdate/#layout-string) has the same format as the layout string for the [`time.Format`](https://gohugo.io/functions/time/format/) function. The resulting group key is [localized](https://gohugo.io/quick-reference/glossary/#localization) for language and region. For the optional sort order, specify either `asc` for ascending order, or `desc` for descending order. To group content by year and month: {{ range .Pages.GroupByPublishDate "January 2006" }}

    {{ .Key }}

    {{ end }} To sort the groups in ascending order: {{ range .Pages.GroupByPublishDate "January 2006" "asc" }}

    {{ .Key }}

    {{ end }} The pages within each group will also be sorted by publish date, either ascending or descending depending on your grouping option. To sort the pages within each group, use one of the sorting methods. For example, to sort the pages within each group by title: {{ range .Pages.GroupByPublishDate "January 2006" }}

    {{ .Key }}

    {{ end }} Layout string ------------- Format a `time.Time` value based on [Go’s reference time](https://pkg.go.dev/time#pkg-constants) : Mon Jan 2 15:04:05 MST 2006 Create a layout string using these components: | Description | Valid components | | --- | --- | | Year | `"2006" "06"` | | Month | `"Jan" "January" "01" "1"` | | Day of the week | `"Mon" "Monday"` | | Day of the month | `"2" "_2" "02"` | | Day of the year | `"__2" "002"` | | Hour | `"15" "3" "03"` | | Minute | `"4" "04"` | | Second | `"5" "05"` | | AM/PM mark | `"PM"` | | Time zone offsets | `"-0700" "-07:00" "-07" "-070000" "-07:00:00"` | Replace the sign in the layout string with a Z to print Z instead of an offset for the UTC zone. | Description | Valid components | | --- | --- | | Time zone offsets | `"Z0700" "Z07:00" "Z07" "Z070000" "Z07:00:00"` | {{ $t := "2023-01-27T23:44:58-08:00" }} {{ $t = time.AsTime $t }} {{ $t = $t.Format "Jan 02, 2006 3:04 PM Z07:00" }} {{ $t }} → Jan 27, 2023 11:44 PM -08:00 Strings such as `PST` and `CET` are not time zones. They are time zone _abbreviations_. Strings such as `-07:00` and `+01:00` are not time zones. They are time zone _offsets_. A time zone is a geographic area with the same local time. For example, the time zone abbreviated by `PST` and `PDT` (depending on Daylight Savings Time) is `America/Los_Angeles`. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/GroupByPublishDate.md) --- # GroupByParamDate Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/pages/groupbyparamdate/](https://gohugo.io/images/qr/qr_9c0c94b236e9a04e.png) Returns the given page collection grouped by the given date parameter in descending order. Syntax PAGES.GroupByParamDate PARAM LAYOUT \[SORT\] Returns page.PagesGroup The [layout string](https://gohugo.io/methods/pages/groupbyparamdate/#layout-string) has the same format as the layout string for the [`time.Format`](https://gohugo.io/functions/time/format/) function. The resulting group key is [localized](https://gohugo.io/quick-reference/glossary/#localization) for language and region. For the optional sort order, specify either `asc` for ascending order, or `desc` for descending order. To group content by year and month: {{ range .Pages.GroupByParamDate "eventDate" "January 2006" }}

    {{ .Key }}

    {{ end }} To sort the groups in ascending order: {{ range .Pages.GroupByParamDate "eventDate" "January 2006" "asc" }}

    {{ .Key }}

    {{ end }} The pages within each group will also be sorted by the parameter date, either ascending or descending depending on your grouping option. To sort the pages within each group, use one of the sorting methods. For example, to sort the pages within each group by title: {{ range .Pages.GroupByParamDate "eventDate" "January 2006" }}

    {{ .Key }}

    {{ end }} Layout string ------------- Format a `time.Time` value based on [Go’s reference time](https://pkg.go.dev/time#pkg-constants) : Mon Jan 2 15:04:05 MST 2006 Create a layout string using these components: | Description | Valid components | | --- | --- | | Year | `"2006" "06"` | | Month | `"Jan" "January" "01" "1"` | | Day of the week | `"Mon" "Monday"` | | Day of the month | `"2" "_2" "02"` | | Day of the year | `"__2" "002"` | | Hour | `"15" "3" "03"` | | Minute | `"4" "04"` | | Second | `"5" "05"` | | AM/PM mark | `"PM"` | | Time zone offsets | `"-0700" "-07:00" "-07" "-070000" "-07:00:00"` | Replace the sign in the layout string with a Z to print Z instead of an offset for the UTC zone. | Description | Valid components | | --- | --- | | Time zone offsets | `"Z0700" "Z07:00" "Z07" "Z070000" "Z07:00:00"` | {{ $t := "2023-01-27T23:44:58-08:00" }} {{ $t = time.AsTime $t }} {{ $t = $t.Format "Jan 02, 2006 3:04 PM Z07:00" }} {{ $t }} → Jan 27, 2023 11:44 PM -08:00 Strings such as `PST` and `CET` are not time zones. They are time zone _abbreviations_. Strings such as `-07:00` and `+01:00` are not time zones. They are time zone _offsets_. A time zone is a geographic area with the same local time. For example, the time zone abbreviated by `PST` and `PDT` (depending on Daylight Savings Time) is `America/Los_Angeles`. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/pages/GroupByParamDate.md) --- # Configure deployment Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/configuration/deployment/](https://gohugo.io/images/qr/qr_6523aaec8ee31b2e.png) Configure deployments to Amazon S3, Azure Blob Storage, or Google Cloud Storage. This configuration is only relevant when running `hugo deploy`. See [details](https://gohugo.io/host-and-deploy/deploy-with-hugo-deploy/) . Top-level options ----------------- These settings control the overall behavior of the deployment process. This is the default configuration: deployment: confirm: false dryRun: false force: false invalidateCDN: true matchers: null maxDeletes: 256 order: null target: '' targets: null workers: 10 [deployment] confirm = false dryRun = false force = false invalidateCDN = true maxDeletes = 256 target = '' workers = 10 { "deployment": { "confirm": false, "dryRun": false, "force": false, "invalidateCDN": true, "matchers": null, "maxDeletes": 256, "order": null, "target": "", "targets": null, "workers": 10 } } confirm (`bool`) Whether to prompt for confirmation before deploying. Default is `false`. dryRun (`bool`) Whether to simulate the deployment without any remote changes. Default is `false`. force (`bool`) Whether to re-upload all files. Default is `false`. invalidateCDN (`bool`) Whether to invalidate the CDN cache listed in the deployment target. Default is `true`. maxDeletes (`int`) The maximum number of files to delete, or `-1` to disable. Default is `256`. matchers (`[]*Matcher`) A slice of [matchers](https://gohugo.io/configuration/deployment/#matchers-1) . order (`[]string`) An ordered slice of [regular expressions](https://gohugo.io/quick-reference/glossary/#regular-expression) that determines upload priority (left to right). Files not matching any expression are uploaded last in an arbitrary order. target (`string`) The target deployment [`name`](https://gohugo.io/configuration/deployment/#name) . Defaults to the first target. targets (`[]*Target`) A slice of [targets](https://gohugo.io/configuration/deployment/#targets-1) . workers (`int`) The number of concurrent workers to use when uploading files. Default is `10`. Targets ------- A target represents a deployment target such as “staging” or “production”. cloudFrontDistributionID (`string`) The CloudFront Distribution ID, applicable if you are using the Amazon Web Services CloudFront CDN. Hugo will invalidate the CDN when deploying this target. exclude (`string`) A [glob pattern](https://gohugo.io/quick-reference/glossary/#glob-pattern) matching files to exclude when deploying to this target. Local files failing the include/exclude filters are not uploaded, and remote files failing these filters are not deleted. googleCloudCDNOrigin (`string`) The Google Cloud project and CDN origin to invalidate when deploying this target, specified as `/`. include (`string`) A [glob pattern](https://gohugo.io/quick-reference/glossary/#glob-pattern) matching files to include when deploying to this target. Local files failing the include/exclude filters are not uploaded, and remote files failing these filters are not deleted. name (`string`) An arbitrary name for this target. stripIndexHTML (`bool`) Whether to map files named `/index.html` to `` on the remote (except for the root `index.html`). This is useful for key-value cloud storage (e.g., Amazon S3, Google Cloud Storage, Azure Blob Storage) to align canonical URLs with object keys. Default is `false`. url (`string`) The [destination URL](https://gohugo.io/configuration/deployment/#destination-urls) for deployment. Matchers -------- A Matcher represents a configuration to be applied to files whose paths match the specified pattern. cacheControl (`string`) The caching attributes to use when serving the blob. See [details](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) . contentEncoding (`string`) The encoding used for the blob’s content, if any. See [details](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding) . contentType (`string`) The media type of the blob being written. See [details](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) . force (`bool`) Whether matching files should be re-uploaded. Useful when other route-determined metadata (e.g., `contentType`) has changed. Default is `false`. gzip (`bool`) Whether the file should be gzipped before upload. If so, the `ContentEncoding` field will automatically be set to `gzip`. Default is `false`. pattern (`string`) A [regular expression](https://gohugo.io/quick-reference/glossary/#regular-expression) used to match paths. Paths are converted to use forward slashes (`/`) before matching. Destination URLs ---------------- | Service | URL example | | --- | --- | | Amazon Simple Storage Service (S3) | `s3://my-bucket?region=us-west-1` | | Azure Blob Storage | `azblob://my-container` | | Google Cloud Storage (GCS) | `gs://my-bucket` | With Google Cloud Storage you can target a subdirectory: gs://my-bucket?prefix=a/subdirectory You can also to deploy to storage servers compatible with Amazon S3 such as: * [Ceph](https://ceph.com/) * [MinIO](https://www.minio.io/) * [SeaweedFS](https://github.com/chrislusf/seaweedfs) For example, the `url` for a MinIO deployment target might resemble this: s3://my-bucket?endpoint=https://my.minio.instance&awssdk=v2&use_path_style=true&disable_https=false Example ------- deployment: matchers: - cacheControl: max-age=31536000, no-transform, public gzip: true pattern: '^.+\.(js|css|svg|ttf)$' - cacheControl: max-age=31536000, no-transform, public gzip: false pattern: '^.+\.(png|jpg)$' - contentType: application/xml gzip: true pattern: '^sitemap\.xml$' - gzip: true pattern: '^.+\.(html|xml|json)$' order: - .jpg$ - .gif$ targets: - cloudFrontDistributionID: E1234567890ABCDEF0 exclude: '**.{heic,psd}' name: production url: s3://my_production_bucket?region=us-west-1 - exclude: '**.{heic,psd}' name: staging url: s3://my_staging_bucket?region=us-west-1 [deployment] order = ['.jpg$', '.gif$'] [[deployment.matchers]] cacheControl = 'max-age=31536000, no-transform, public' gzip = true pattern = '^.+\.(js|css|svg|ttf)$' [[deployment.matchers]] cacheControl = 'max-age=31536000, no-transform, public' gzip = false pattern = '^.+\.(png|jpg)$' [[deployment.matchers]] contentType = 'application/xml' gzip = true pattern = '^sitemap\.xml$' [[deployment.matchers]] gzip = true pattern = '^.+\.(html|xml|json)$' [[deployment.targets]] cloudFrontDistributionID = 'E1234567890ABCDEF0' exclude = '**.{heic,psd}' name = 'production' url = 's3://my_production_bucket?region=us-west-1' [[deployment.targets]] exclude = '**.{heic,psd}' name = 'staging' url = 's3://my_staging_bucket?region=us-west-1' { "deployment": { "matchers": [\ {\ "cacheControl": "max-age=31536000, no-transform, public",\ "gzip": true,\ "pattern": "^.+\\.(js|css|svg|ttf)$"\ },\ {\ "cacheControl": "max-age=31536000, no-transform, public",\ "gzip": false,\ "pattern": "^.+\\.(png|jpg)$"\ },\ {\ "contentType": "application/xml",\ "gzip": true,\ "pattern": "^sitemap\\.xml$"\ },\ {\ "gzip": true,\ "pattern": "^.+\\.(html|xml|json)$"\ }\ ], "order": [\ ".jpg$",\ ".gif$"\ ], "targets": [\ {\ "cloudFrontDistributionID": "E1234567890ABCDEF0",\ "exclude": "**.{heic,psd}",\ "name": "production",\ "url": "s3://my_production_bucket?region=us-west-1"\ },\ {\ "exclude": "**.{heic,psd}",\ "name": "staging",\ "url": "s3://my_staging_bucket?region=us-west-1"\ }\ ] } } * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/configuration/deployment.md) --- # Format Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/time/format/](https://gohugo.io/images/qr/qr_99a55e11b3cc921c.png) Returns a textual representation of the time.Time value formatted according to the layout string. Syntax TIME.Format LAYOUT Returns string {{ $t := "2023-01-27T23:44:58-08:00" }} {{ $t = time.AsTime $t }} {{ $format := "2 Jan 2006" }} {{ $t.Format $format }} → 27 Jan 2023 To [localize](https://gohugo.io/quick-reference/glossary/#localization) the return value, use the [`time.Format`](https://gohugo.io/functions/time/format/) function instead. Use the `Format` method with any `time.Time` value, including the four predefined front matter dates: {{ $format := "2 Jan 2006" }} {{ .Date.Format $format }} {{ .PublishDate.Format $format }} {{ .ExpiryDate.Format $format }} {{ .Lastmod.Format $format }} Use the [`time.Format`](https://gohugo.io/functions/time/format/) function to format string representations of dates, and to format raw TOML dates that exclude time and time zone offset. Layout string ------------- Format a `time.Time` value based on [Go’s reference time](https://pkg.go.dev/time#pkg-constants) : Mon Jan 2 15:04:05 MST 2006 Create a layout string using these components: | Description | Valid components | | --- | --- | | Year | `"2006" "06"` | | Month | `"Jan" "January" "01" "1"` | | Day of the week | `"Mon" "Monday"` | | Day of the month | `"2" "_2" "02"` | | Day of the year | `"__2" "002"` | | Hour | `"15" "3" "03"` | | Minute | `"4" "04"` | | Second | `"5" "05"` | | AM/PM mark | `"PM"` | | Time zone offsets | `"-0700" "-07:00" "-07" "-070000" "-07:00:00"` | Replace the sign in the layout string with a Z to print Z instead of an offset for the UTC zone. | Description | Valid components | | --- | --- | | Time zone offsets | `"Z0700" "Z07:00" "Z07" "Z070000" "Z07:00:00"` | {{ $t := "2023-01-27T23:44:58-08:00" }} {{ $t = time.AsTime $t }} {{ $t = $t.Format "Jan 02, 2006 3:04 PM Z07:00" }} {{ $t }} → Jan 27, 2023 11:44 PM -08:00 Strings such as `PST` and `CET` are not time zones. They are time zone _abbreviations_. Strings such as `-07:00` and `+01:00` are not time zones. They are time zone _offsets_. A time zone is a geographic area with the same local time. For example, the time zone abbreviated by `PST` and `PDT` (depending on Daylight Savings Time) is `America/Los_Angeles`. Examples -------- Given this front matter: --- date: 2023-01-27T23:44:58-08:00 title: About time --- +++ date = 2023-01-27T23:44:58-08:00 title = 'About time' +++ { "date": "2023-01-27T23:44:58-08:00", "title": "About time" } The examples below were rendered in the `America/Los_Angeles` time zone: | Format string | Result | | --- | --- | | `Monday, January 2, 2006` | `Friday, January 27, 2023` | | `Mon Jan 2 2006` | `Fri Jan 27 2023` | | `January 2006` | `January 2023` | | `2006-01-02` | `2023-01-27` | | `Monday` | `Friday` | | `02 Jan 06 15:04 MST` | `27 Jan 23 23:44 PST` | | `Mon, 02 Jan 2006 15:04:05 MST` | `Fri, 27 Jan 2023 23:44:58 PST` | | `Mon, 02 Jan 2006 15:04:05 -0700` | `Fri, 27 Jan 2023 23:44:58 -0800` | UTC and local time ------------------ Convert and format any `time.Time` value to either Coordinated Universal Time (UTC) or local time. {{ $t := "2023-01-27T23:44:58-08:00" }} {{ $t = time.AsTime $t }} {{ $format := "2 Jan 2006 3:04:05 PM MST" }} {{ $t.UTC.Format $format }} → 28 Jan 2023 7:44:58 AM UTC {{ $t.Local.Format $format }} → 27 Jan 2023 11:44:58 PM PST Ordinal representation ---------------------- Use the [`humanize`](https://gohugo.io/functions/inflect/humanize/) function to render the day of the month as an ordinal number: {{ $t := "2023-01-27T23:44:58-08:00" }} {{ $t = time.AsTime $t }} {{ humanize $t.Day }} of {{ $t.Format "January 2006" }} → 27th of January 2023 * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/time/Format.md) --- # GetPage Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/site/getpage/](https://gohugo.io/images/qr/qr_3aa1b41d9c2afbb8.png) Returns a Page object from the given path. Syntax SITE.GetPage PATH Returns page.Page The `GetPage` method is also available on `Page` objects, allowing you to specify a path relative to the current page. See [details](https://gohugo.io/methods/page/getpage/) . When using the `GetPage` method on a `Site` object, specify a path relative to the `content` directory. If Hugo cannot resolve the path to a page, the method returns nil. Consider this content structure: content/ ├── works/ │ ├── paintings/ │ │ ├── _index.md │ │ ├── starry-night.md │ │ └── the-mona-lisa.md │ ├── sculptures/ │ │ ├── _index.md │ │ ├── david.md │ │ └── the-thinker.md │ └── _index.md └── _index.md This _home_ template: layouts/home.html {{ with .Site.GetPage "/works/paintings" }}
      {{ range .Pages }}
    • {{ .Title }} by {{ .Params.artist }}
    • {{ end }}
    {{ end }} Is rendered to:
    • Starry Night by Vincent van Gogh
    • The Mona Lisa by Leonardo da Vinci
    To get a regular page instead of a section page: layouts/home.html {{ with .Site.GetPage "/works/paintings/starry-night" }} {{ .Title }} → Starry Night {{ .Params.artist }} → Vincent van Gogh {{ end }} Multilingual projects --------------------- With multilingual projects, the `GetPage` method on a `Site` object resolves the given path to a page in the current language. To get a page from a different language, query the `Sites` object: {{ with where hugo.Sites "Language.Lang" "eq" "de" }} {{ with index . 0 }} {{ with .GetPage "/works/paintings/starry-night" }} {{ .Title }} → Sternenklare Nacht {{ end }} {{ end }} {{ end }} Page bundles ------------ Consider this content structure: content/ ├── headless/ │ ├── a.jpg │ ├── b.jpg │ ├── c.jpg │ └── index.md <-- front matter: headless = true └── _index.md In the _home_ template, use the `GetPage` method on a `Site` object to render all the images in the headless [page bundle](https://gohugo.io/quick-reference/glossary/#page-bundle) : layouts/home.html {{ with .Site.GetPage "/headless" }} {{ range .Resources.ByType "image" }} {{ end }} {{ end }} * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/site/GetPage.md) --- # Configure front matter Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/configuration/front-matter/](https://gohugo.io/images/qr/qr_2686710ecffb48ba.png) Configure front matter. Dates ----- There are four methods on a `Page` object that return a date. | Method | Description | | --- | --- | | [`Date`](https://gohugo.io/methods/page/date/) | Returns the date of the given page. | | [`ExpiryDate`](https://gohugo.io/methods/page/expirydate/) | Returns the expiry date of the given page. | | [`Lastmod`](https://gohugo.io/methods/page/lastmod/) | Returns the last modification date of the given page. | | [`PublishDate`](https://gohugo.io/methods/page/publishdate/) | Returns the publish date of the given page. | Hugo determines the values to return based on this configuration: frontmatter: date: - date - publishdate - pubdate - published - lastmod - modified expiryDate: - expirydate - unpublishdate lastmod: - :git - lastmod - modified - date - publishdate - pubdate - published publishDate: - publishdate - pubdate - published - date [frontmatter] date = ['date', 'publishdate', 'pubdate', 'published', 'lastmod', 'modified'] expiryDate = ['expirydate', 'unpublishdate'] lastmod = [':git', 'lastmod', 'modified', 'date', 'publishdate', 'pubdate', 'published'] publishDate = ['publishdate', 'pubdate', 'published', 'date'] { "frontmatter": { "date": [\ "date",\ "publishdate",\ "pubdate",\ "published",\ "lastmod",\ "modified"\ ], "expiryDate": [\ "expirydate",\ "unpublishdate"\ ], "lastmod": [\ ":git",\ "lastmod",\ "modified",\ "date",\ "publishdate",\ "pubdate",\ "published"\ ], "publishDate": [\ "publishdate",\ "pubdate",\ "published",\ "date"\ ] } } The `ExpiryDate` method, for example, returns the `expirydate` value if it exists, otherwise it returns `unpublishdate`. You can also use custom date parameters: frontmatter: date: - myDate - date [frontmatter] date = ['myDate', 'date'] { "frontmatter": { "date": [\ "myDate",\ "date"\ ] } } In the example above, the `Date` method returns the `myDate` value if it exists, otherwise it returns `date`. To fall back to the default sequence of dates, use the `:default` token: frontmatter: date: - myDate - :default [frontmatter] date = ['myDate', ':default'] { "frontmatter": { "date": [\ "myDate",\ ":default"\ ] } } In the example above, the `Date` method returns the `myDate` value if it exists, otherwise it returns the first valid date from `date`, `publishdate`, `pubdate`, `published`, `lastmod`, and `modified`. Aliases ------- Some of the front matter fields have aliases. | Front matter field | Aliases | | --- | --- | | `expiryDate` | `unpublishdate` | | `lastmod` | `modified` | | `publishDate` | `pubdate`, `published` | The default front matter configuration includes these aliases. Tokens ------ Hugo provides the following [tokens](https://gohugo.io/quick-reference/glossary/#token) to help you configure your front matter: `:default` The default ordered sequence of date fields. `:fileModTime` The file’s last modification timestamp. `:filename` Extracts the date from the file name, provided the file name begins with a date in one of the following formats: * `YYYY-MM-DD` * `YYYY-MM-DD-HH-MM-SS` [New in v0.148.0](https://github.com/gohugoio/hugo/releases/tag/v0.148.0) Within the `YYYY-MM-DD-HH-MM-SS` format, the date and time values may be separated by any character including a space (e.g., `2025-02-01T14-30-00`). Hugo resolves the extracted date to the [`timeZone`](https://gohugo.io/configuration/all/#timezone) defined in your project configuration, falling back to the system time zone. After extracting the date, Hugo uses the remaining part of the file name to generate the page’s [`slug`](https://gohugo.io/content-management/front-matter/#slug) , but only if you haven’t already specified a slug in the page’s front matter. For example, if you name your file `2025-02-01-article.md`, Hugo will set the date to `2025-02-01` and the slug to `article`. `:git` The Git author date for the file’s last revision. To enable access to the Git author date, set [`enableGitInfo`](https://gohugo.io/configuration/all/#enablegitinfo) to `true`. Example ------- Consider this project configuration: frontmatter: date: - :filename - :default lastmod: - lastmod - :fileModTime publishDate: - :filename - :default [frontmatter] date = [':filename', ':default'] lastmod = ['lastmod', ':fileModTime'] publishDate = [':filename', ':default'] { "frontmatter": { "date": [\ ":filename",\ ":default"\ ], "lastmod": [\ "lastmod",\ ":fileModTime"\ ], "publishDate": [\ ":filename",\ ":default"\ ] } } To determine `date` and `publishDate`, Hugo tries to extract the value from the file name, falling back to the default ordered sequence of date fields. To determine `lastmod`, Hugo looks for a `lastmod` field in front matter, falling back to the file’s last modification timestamp. * * * Last updated: February 27, 2026 : [content: Miscellaneous udpates for v0.157.0 (35da1aa3c)](https://github.com/gohugoio/hugoDocs/commit/35da1aa3c2fe3b54bdb57df1a308533844af9df5) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/configuration/front-matter.md) --- # Diagrams Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/content-management/diagrams/](https://gohugo.io/images/qr/qr_5de6d1d075c2526f.png) Use fenced code blocks and Markdown render hooks to include diagrams in your content. GoAT diagrams (ASCII) --------------------- Hugo natively supports [GoAT](https://github.com/bep/goat) diagrams with an [embedded code block render hook](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_markup/render-codeblock-goat.html) . This means that this code block: ```goat . . . .--- 1 .-- 1 / 1 / \ | | .---+ .-+ + / \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2 + + | | | | ---+ ---+ + / \ / \ .-+-. .-+-. .+. .+. | .--- 3 | .-- 3 \ / 3 / \ / \ | | | | | | | | '---+ '-+ + 1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4 ``` Will be rendered as: 123412341234123412341234 Mermaid diagrams ---------------- Hugo does not provide a built-in template for Mermaid diagrams. Create your own using a [code block render hook](https://gohugo.io/render-hooks/code-blocks/) : layouts/\_markup/render-codeblock-mermaid.html
          {{ .Inner | htmlEscape | safeHTML }}
        
    {{ .Page.Store.Set "hasMermaid" true }} Then include this snippet at the _bottom_ of your base template, before the closing `body` tag: layouts/baseof.html {{ if .Store.Get "hasMermaid" }} {{ end }} With that you can use the `mermaid` language in Markdown code blocks: ```mermaid sequenceDiagram participant Alice participant Bob Alice->>John: Hello John, how are you? loop Healthcheck John->>John: Fight against hypochondria end Note right of John: Rational thoughts
    prevail! John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good! ``` Goat ASCII diagram examples --------------------------- ### Graphics 15042637+z+y+xv1vP0Xv3Eyve2RefractionReflection ### Complex &AMSioiqfbBxujoea(\-xdra\>efR\>coCnuob(nr))dneeJdrosinNoRDtoiuaangddloitneDiagonalsCVuerrvteidcalnotANC:ouldrriAa/Ivnsineehstd\-e\-trlBihiision'sreqn.u\*oobttoelasd'\*lineDonSee?arc3h ### Process PSIRTNOAPCRUETTSSENDACPHROOICCEESSBCPORMOXPCLEESXSPREPARATIONX ### File tree Created from [https://arthursonzogni.com/Diagon/#Tree](https://arthursonzogni.com/Diagon/#Tree) ───Linux─┬├││││├└────ADCFneeedbndritooaorinsad─┬│││└──UMbiunnttu─┬├├└────LKXXuuuubbbbuuuunnnnttttuuuu ### Sequence diagram [https://arthursonzogni.com/Diagon/#Sequence](https://arthursonzogni.com/Diagon/#Sequence) ┌│└┌│└─A──A──l──l──i┬││││││┴i──c──H<─c──e─H─e──e─┐│┘e─l─┐│┘l─l─l─o─o───A─B─l─o─i─b─c─┌│└!─e─┌│└─B─\>!──B──o┬││││││┴o──b──b─┐│┘┐│┘ ### Flowchart [https://arthursonzogni.com/Diagon/#Flowchart](https://arthursonzogni.com/Diagon/#Flowchart) OL\_DF\_KI\_BO\_OL\_AN\_UN\_O\_YE\_TE\_┌│└YW\_,\_S\_─I─O\_L\_Y\_┌│└──UC\_YA\_OL\_─L──H─H\_OB\_UA\_─I──A─UA\_\_UE\_\_B\_─S──T─NR\_│▽L\_│▽SE\_│▽T┬▽E─DT\_n\_SE\_n\_EL\_n─E───ES\_o\_ED\_o\_EE\_o─N──Y─R?\_\_E\_\_D\_─.──O─S\_\_'\_\_T\_┐│┘─U─T\_\_TY\_\_H'\_┐│┘A\_\_HE\_\_EN\_N\_\_ES\_\_O\_D\_\_'\_\_'\_\_?\_\_?\_\_y\_e\_y\_y\_s\_e\_e\_\_s\_s\_\_┌│└\_\_─W─\_\_─A─\_\_─I─\_\_─T─\_\_─,─\_\_──\_\_─W─\_\_─H─\_\_─A─\_\_─T─\_\_─?─\_\_┐│┘\_\_\_T\_\_H\_BF\_\_E\_UO\_\_\_TL\_\_AO\_L\_\_NN\_YO\_\_DE\_OW\_\_S\_UE\_\_Y\_D\_\_OL\_\_J\_\_UA\_│▽UT\_││└\_B\_n\_SH\_n─┌││└\_CE\_o\_TE\_o──(A─\_AL\_\_M\_──T─┌│└\_NE\_\_\_──HQ──S─\_D\_\_T\_──AU──C─\_S\_\_W\_──TE──R─\_E'\_\_I\_──S──E─\_EN\_\_C\_┬▽WT┬▽W┬└\_O\_\_E\_──AI────\_'\_\_?\_──SO──I──┌││└\_?\_──NN──T───HI─\_──')─┐│┘─┌│└─EN─\_\_y──T───L──YS─\_\_y\_e─┐││┘┬│└─E──,T─\_\_e\_s────T──A─\_\_s││││┘───'──IL─\_┌│└───S──L─\_─G──────SI─\_─O────G──HN─\_─O┬│││││││││││││││││┘┬▽O┬▽OG─\_─D─────U─\_┐│┘──D──LF─┌│└──R──DR──G───I──E──O───N──TE──O┬│││││││││││││││││││││││││┘─G──RB──D─┐│┘─YS──!──D─┐│┘─!─┐││┘ ### Table [https://arthursonzogni.com/Diagon/#Table](https://arthursonzogni.com/Diagon/#Table) ┌│├│├│├│├│├│├│├│├│├│├│├│└──S─P─E─T─F─────I─L───Y─R─X─E─A─────D─I───N─O─P─R─C─────E─T───T─D─R─M─T─────N─E───A─U─E──O─────T─R───X─C─S──R─────I─A────T─S───────F─L────I─I───────I─────O─O───────E─────N─N───────R─────────|─|─|─|─────\=─\=─\=─\=─\=─────\=─\=────────L─"─"─"─────{─I─T─F─I─I─\[─(─{─l─"────D─E─A─D─T─"─"─"─e─"───P─E─R─C─E─E────t─"───R─N─M─T─N─R─E─E─E─t─"───O─T──O─T─A─X─X─X─e────D─I─{─R─I─L─P─P─P─r─c───U─F───F──R─R─R──h───C─I─"─{─I──E─E─E─{─a───T─E─|──E──S─S─S──r───I─R─"─F─R──S─S─S─l─a───O───A───I─I─I─e─c───N─"─T─C───O─O─O─t─t────\=─E─T───N─N─N─t─e───}─"─R─O──────e─r─────M─R───"─"─"─r────.─E─────\]─)─}──{────X─}─}───"─"─"─}─────P─────────c────R─.─.─────.─.─h────E─────────a────S─────────r────S─────────a────I─────────c────O─────────t────N─────────e─────────────r────"─────────────.─────────}────"──────────────────────"────.─────────"─────────────"─────────────"──────────────────────────.─┐│┤│┤│┤│┤│┤│┤│┤│┤│┤│┤│┤│┘ * * * Last updated: December 19, 2025 : [Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' (7e1a08e54)](https://github.com/gohugoio/hugoDocs/commit/7e1a08e545030efcad0ac52c1cf9469244bc3f2b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/content-management/diagrams.md) --- # Emojis Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/quick-reference/emojis/](https://gohugo.io/images/qr/qr_39b1479c3a7b6b5.png) Include emoji shortcodes in your Markdown or templates. Attribution ----------- This quick reference guide was generated using the [ikatyang/emoji-cheat-sheet](https://github.com/ikatyang/emoji-cheat-sheet/) project which reads from the [GitHub Emoji API](https://api.github.com/emojis) and the [Unicode Full Emoji List](https://unicode.org/emoji/charts/full-emoji-list.html) . Note that GitHub [custom emoji](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) are not supported. Usage ----- Configure Hugo to enable emoji processing in Markdown: enableEmoji: true enableEmoji = true { "enableEmoji": true } With emoji processing enabled, this Markdown: Hello! :wave: Is rendered to: Hello! 👋 And in your browser… Hello! 👋 To process an emoji shortcode from within a template, use the [`emojify`](https://gohugo.io/functions/transform/emojify/) function or pass the string through the [`RenderString`](https://gohugo.io/methods/page/renderstring/) method on a `Page` object: {{ "Hello! :wave:" | .RenderString }} Table of Contents ----------------- * [Smileys & Emotion](https://gohugo.io/quick-reference/emojis/#smileys--emotion) * [People & Body](https://gohugo.io/quick-reference/emojis/#people--body) * [Animals & Nature](https://gohugo.io/quick-reference/emojis/#animals--nature) * [Food & Drink](https://gohugo.io/quick-reference/emojis/#food--drink) * [Travel & Places](https://gohugo.io/quick-reference/emojis/#travel--places) * [Activities](https://gohugo.io/quick-reference/emojis/#activities) * [Objects](https://gohugo.io/quick-reference/emojis/#objects) * [Symbols](https://gohugo.io/quick-reference/emojis/#symbols) * [Flags](https://gohugo.io/quick-reference/emojis/#flags) * [GitHub Custom Emoji](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) Smileys & Emotion ----------------- * [Face Smiling](https://gohugo.io/quick-reference/emojis/#face-smiling) * [Face Affection](https://gohugo.io/quick-reference/emojis/#face-affection) * [Face Tongue](https://gohugo.io/quick-reference/emojis/#face-tongue) * [Face Hand](https://gohugo.io/quick-reference/emojis/#face-hand) * [Face Neutral Skeptical](https://gohugo.io/quick-reference/emojis/#face-neutral-skeptical) * [Face Sleepy](https://gohugo.io/quick-reference/emojis/#face-sleepy) * [Face Unwell](https://gohugo.io/quick-reference/emojis/#face-unwell) * [Face Hat](https://gohugo.io/quick-reference/emojis/#face-hat) * [Face Glasses](https://gohugo.io/quick-reference/emojis/#face-glasses) * [Face Concerned](https://gohugo.io/quick-reference/emojis/#face-concerned) * [Face Negative](https://gohugo.io/quick-reference/emojis/#face-negative) * [Face Costume](https://gohugo.io/quick-reference/emojis/#face-costume) * [Cat Face](https://gohugo.io/quick-reference/emojis/#cat-face) * [Monkey Face](https://gohugo.io/quick-reference/emojis/#monkey-face) * [Heart](https://gohugo.io/quick-reference/emojis/#heart) * [Emotion](https://gohugo.io/quick-reference/emojis/#emotion) ### Face Smiling | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😀 | `:grinning:` | 😃 | `:smiley:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😄 | `:smile:` | 😁 | `:grin:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😆 | `:laughing:` `:satisfied:` | 😅 | `:sweat_smile:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🤣 | `:rofl:` | 😂 | `:joy:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🙂 | `:slightly_smiling_face:` | 🙃 | `:upside_down_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🫠 | `:melting_face:` | 😉 | `:wink:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😊 | `:blush:` | 😇 | `:innocent:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Face Affection | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🥰 | `:smiling_face_with_three_hearts:` | 😍 | `:heart_eyes:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🤩 | `:star_struck:` | 😘 | `:kissing_heart:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😗 | `:kissing:` | ☺️ | `:relaxed:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😚 | `:kissing_closed_eyes:` | 😙 | `:kissing_smiling_eyes:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🥲 | `:smiling_face_with_tear:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Face Tongue | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😋 | `:yum:` | 😛 | `:stuck_out_tongue:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😜 | `:stuck_out_tongue_winking_eye:` | 🤪 | `:zany_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😝 | `:stuck_out_tongue_closed_eyes:` | 🤑 | `:money_mouth_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Face Hand | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🤗 | `:hugs:` | 🤭 | `:hand_over_mouth:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🫢 | `:face_with_open_eyes_and_hand_over_mouth:` | 🫣 | `:face_with_peeking_eye:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🤫 | `:shushing_face:` | 🤔 | `:thinking:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🫡 | `:saluting_face:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Face Neutral Skeptical | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🤐 | `:zipper_mouth_face:` | 🤨 | `:raised_eyebrow:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😐 | `:neutral_face:` | 😑 | `:expressionless:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😶 | `:no_mouth:` | 🫥 | `:dotted_line_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😶‍🌫️ | `:face_in_clouds:` | 😏 | `:smirk:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😒 | `:unamused:` | 🙄 | `:roll_eyes:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😬 | `:grimacing:` | 😮‍💨 | `:face_exhaling:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🤥 | `:lying_face:` | 🫨 | `:shaking_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Face Sleepy | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😌 | `:relieved:` | 😔 | `:pensive:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😪 | `:sleepy:` | 🤤 | `:drooling_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😴 | `:sleeping:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Face Unwell | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😷 | `:mask:` | 🤒 | `:face_with_thermometer:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🤕 | `:face_with_head_bandage:` | 🤢 | `:nauseated_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🤮 | `:vomiting_face:` | 🤧 | `:sneezing_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🥵 | `:hot_face:` | 🥶 | `:cold_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🥴 | `:woozy_face:` | 😵 | `:dizzy_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😵‍💫 | `:face_with_spiral_eyes:` | 🤯 | `:exploding_head:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Face Hat | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🤠 | `:cowboy_hat_face:` | 🥳 | `:partying_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🥸 | `:disguised_face:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Face Glasses | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😎 | `:sunglasses:` | 🤓 | `:nerd_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🧐 | `:monocle_face:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Face Concerned | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😕 | `:confused:` | 🫤 | `:face_with_diagonal_mouth:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😟 | `:worried:` | 🙁 | `:slightly_frowning_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | ☹️ | `:frowning_face:` | 😮 | `:open_mouth:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😯 | `:hushed:` | 😲 | `:astonished:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😳 | `:flushed:` | 🥺 | `:pleading_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🥹 | `:face_holding_back_tears:` | 😦 | `:frowning:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😧 | `:anguished:` | 😨 | `:fearful:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😰 | `:cold_sweat:` | 😥 | `:disappointed_relieved:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😢 | `:cry:` | 😭 | `:sob:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😱 | `:scream:` | 😖 | `:confounded:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😣 | `:persevere:` | 😞 | `:disappointed:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😓 | `:sweat:` | 😩 | `:weary:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😫 | `:tired_face:` | 🥱 | `:yawning_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Face Negative | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😤 | `:triumph:` | 😡 | `:pout:` `:rage:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😠 | `:angry:` | 🤬 | `:cursing_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😈 | `:smiling_imp:` | 👿 | `:imp:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💀 | `:skull:` | ☠️ | `:skull_and_crossbones:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Face Costume | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💩 | `:hankey:` `:poop:` `:shit:` | 🤡 | `:clown_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 👹 | `:japanese_ogre:` | 👺 | `:japanese_goblin:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 👻 | `:ghost:` | 👽 | `:alien:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 👾 | `:space_invader:` | 🤖 | `:robot:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Cat Face | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😺 | `:smiley_cat:` | 😸 | `:smile_cat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😹 | `:joy_cat:` | 😻 | `:heart_eyes_cat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😼 | `:smirk_cat:` | 😽 | `:kissing_cat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🙀 | `:scream_cat:` | 😿 | `:crying_cat_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 😾 | `:pouting_cat:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Monkey Face | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🙈 | `:see_no_evil:` | 🙉 | `:hear_no_evil:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🙊 | `:speak_no_evil:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Heart | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💌 | `:love_letter:` | 💘 | `:cupid:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💝 | `:gift_heart:` | 💖 | `:sparkling_heart:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💗 | `:heartpulse:` | 💓 | `:heartbeat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💞 | `:revolving_hearts:` | 💕 | `:two_hearts:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💟 | `:heart_decoration:` | ❣️ | `:heavy_heart_exclamation:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💔 | `:broken_heart:` | ❤️‍🔥 | `:heart_on_fire:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | ❤️‍🩹 | `:mending_heart:` | ❤️ | `:heart:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🩷 | `:pink_heart:` | 🧡 | `:orange_heart:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💛 | `:yellow_heart:` | 💚 | `:green_heart:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💙 | `:blue_heart:` | 🩵 | `:light_blue_heart:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💜 | `:purple_heart:` | 🤎 | `:brown_heart:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🖤 | `:black_heart:` | 🩶 | `:grey_heart:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🤍 | `:white_heart:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Emotion | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💋 | `:kiss:` | 💯 | `:100:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💢 | `:anger:` | 💥 | `:boom:` `:collision:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💫 | `:dizzy:` | 💦 | `:sweat_drops:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💨 | `:dash:` | 🕳️ | `:hole:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💬 | `:speech_balloon:` | 👁️‍🗨️ | `:eye_speech_bubble:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 🗨️ | `:left_speech_bubble:` | 🗯️ | `:right_anger_bubble:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#smileys--emotion) | 💭 | `:thought_balloon:` | 💤 | `:zzz:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | People & Body ------------- * [Hand Fingers Open](https://gohugo.io/quick-reference/emojis/#hand-fingers-open) * [Hand Fingers Partial](https://gohugo.io/quick-reference/emojis/#hand-fingers-partial) * [Hand Single Finger](https://gohugo.io/quick-reference/emojis/#hand-single-finger) * [Hand Fingers Closed](https://gohugo.io/quick-reference/emojis/#hand-fingers-closed) * [Hands](https://gohugo.io/quick-reference/emojis/#hands) * [Hand Prop](https://gohugo.io/quick-reference/emojis/#hand-prop) * [Body Parts](https://gohugo.io/quick-reference/emojis/#body-parts) * [Person](https://gohugo.io/quick-reference/emojis/#person) * [Person Gesture](https://gohugo.io/quick-reference/emojis/#person-gesture) * [Person Role](https://gohugo.io/quick-reference/emojis/#person-role) * [Person Fantasy](https://gohugo.io/quick-reference/emojis/#person-fantasy) * [Person Activity](https://gohugo.io/quick-reference/emojis/#person-activity) * [Person Sport](https://gohugo.io/quick-reference/emojis/#person-sport) * [Person Resting](https://gohugo.io/quick-reference/emojis/#person-resting) * [Family](https://gohugo.io/quick-reference/emojis/#family) * [Person Symbol](https://gohugo.io/quick-reference/emojis/#person-symbol) ### Hand Fingers Open | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👋 | `:wave:` | 🤚 | `:raised_back_of_hand:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🖐️ | `:raised_hand_with_fingers_splayed:` | ✋ | `:hand:` `:raised_hand:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🖖 | `:vulcan_salute:` | 🫱 | `:rightwards_hand:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🫲 | `:leftwards_hand:` | 🫳 | `:palm_down_hand:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🫴 | `:palm_up_hand:` | 🫷 | `:leftwards_pushing_hand:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🫸 | `:rightwards_pushing_hand:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Hand Fingers Partial | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👌 | `:ok_hand:` | 🤌 | `:pinched_fingers:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤏 | `:pinching_hand:` | ✌️ | `:v:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤞 | `:crossed_fingers:` | 🫰 | `:hand_with_index_finger_and_thumb_crossed:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤟 | `:love_you_gesture:` | 🤘 | `:metal:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤙 | `:call_me_hand:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Hand Single Finger | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👈 | `:point_left:` | 👉 | `:point_right:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👆 | `:point_up_2:` | 🖕 | `:fu:` `:middle_finger:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👇 | `:point_down:` | ☝️ | `:point_up:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🫵 | `:index_pointing_at_the_viewer:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Hand Fingers Closed | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👍 | `:+1:` `:thumbsup:` | 👎 | `:-1:` `:thumbsdown:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | ✊ | `:fist:` `:fist_raised:` | 👊 | `:facepunch:` `:fist_oncoming:` `:punch:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤛 | `:fist_left:` | 🤜 | `:fist_right:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Hands | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👏 | `:clap:` | 🙌 | `:raised_hands:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🫶 | `:heart_hands:` | 👐 | `:open_hands:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤲 | `:palms_up_together:` | 🤝 | `:handshake:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🙏 | `:pray:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Hand Prop | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | ✍️ | `:writing_hand:` | 💅 | `:nail_care:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤳 | `:selfie:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Body Parts | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 💪 | `:muscle:` | 🦾 | `:mechanical_arm:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🦿 | `:mechanical_leg:` | 🦵 | `:leg:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🦶 | `:foot:` | 👂 | `:ear:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🦻 | `:ear_with_hearing_aid:` | 👃 | `:nose:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧠 | `:brain:` | 🫀 | `:anatomical_heart:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🫁 | `:lungs:` | 🦷 | `:tooth:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🦴 | `:bone:` | 👀 | `:eyes:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👁️ | `:eye:` | 👅 | `:tongue:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👄 | `:lips:` | 🫦 | `:biting_lip:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Person | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👶 | `:baby:` | 🧒 | `:child:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👦 | `:boy:` | 👧 | `:girl:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑 | `:adult:` | 👱 | `:blond_haired_person:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨 | `:man:` | 🧔 | `:bearded_person:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧔‍♂️ | `:man_beard:` | 🧔‍♀️ | `:woman_beard:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍🦰 | `:red_haired_man:` | 👨‍🦱 | `:curly_haired_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍🦳 | `:white_haired_man:` | 👨‍🦲 | `:bald_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩 | `:woman:` | 👩‍🦰 | `:red_haired_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍🦰 | `:person_red_hair:` | 👩‍🦱 | `:curly_haired_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍🦱 | `:person_curly_hair:` | 👩‍🦳 | `:white_haired_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍🦳 | `:person_white_hair:` | 👩‍🦲 | `:bald_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍🦲 | `:person_bald:` | 👱‍♀️ | `:blond_haired_woman:` `:blonde_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👱‍♂️ | `:blond_haired_man:` | 🧓 | `:older_adult:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👴 | `:older_man:` | 👵 | `:older_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Person Gesture | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🙍 | `:frowning_person:` | 🙍‍♂️ | `:frowning_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🙍‍♀️ | `:frowning_woman:` | 🙎 | `:pouting_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🙎‍♂️ | `:pouting_man:` | 🙎‍♀️ | `:pouting_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🙅 | `:no_good:` | 🙅‍♂️ | `:ng_man:` `:no_good_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🙅‍♀️ | `:ng_woman:` `:no_good_woman:` | 🙆 | `:ok_person:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🙆‍♂️ | `:ok_man:` | 🙆‍♀️ | `:ok_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 💁 | `:information_desk_person:` `:tipping_hand_person:` | 💁‍♂️ | `:sassy_man:` `:tipping_hand_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 💁‍♀️ | `:sassy_woman:` `:tipping_hand_woman:` | 🙋 | `:raising_hand:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🙋‍♂️ | `:raising_hand_man:` | 🙋‍♀️ | `:raising_hand_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧏 | `:deaf_person:` | 🧏‍♂️ | `:deaf_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧏‍♀️ | `:deaf_woman:` | 🙇 | `:bow:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🙇‍♂️ | `:bowing_man:` | 🙇‍♀️ | `:bowing_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤦 | `:facepalm:` | 🤦‍♂️ | `:man_facepalming:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤦‍♀️ | `:woman_facepalming:` | 🤷 | `:shrug:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤷‍♂️ | `:man_shrugging:` | 🤷‍♀️ | `:woman_shrugging:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Person Role | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍⚕️ | `:health_worker:` | 👨‍⚕️ | `:man_health_worker:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍⚕️ | `:woman_health_worker:` | 🧑‍🎓 | `:student:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍🎓 | `:man_student:` | 👩‍🎓 | `:woman_student:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍🏫 | `:teacher:` | 👨‍🏫 | `:man_teacher:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍🏫 | `:woman_teacher:` | 🧑‍⚖️ | `:judge:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍⚖️ | `:man_judge:` | 👩‍⚖️ | `:woman_judge:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍🌾 | `:farmer:` | 👨‍🌾 | `:man_farmer:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍🌾 | `:woman_farmer:` | 🧑‍🍳 | `:cook:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍🍳 | `:man_cook:` | 👩‍🍳 | `:woman_cook:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍🔧 | `:mechanic:` | 👨‍🔧 | `:man_mechanic:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍🔧 | `:woman_mechanic:` | 🧑‍🏭 | `:factory_worker:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍🏭 | `:man_factory_worker:` | 👩‍🏭 | `:woman_factory_worker:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍💼 | `:office_worker:` | 👨‍💼 | `:man_office_worker:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍💼 | `:woman_office_worker:` | 🧑‍🔬 | `:scientist:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍🔬 | `:man_scientist:` | 👩‍🔬 | `:woman_scientist:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍💻 | `:technologist:` | 👨‍💻 | `:man_technologist:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍💻 | `:woman_technologist:` | 🧑‍🎤 | `:singer:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍🎤 | `:man_singer:` | 👩‍🎤 | `:woman_singer:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍🎨 | `:artist:` | 👨‍🎨 | `:man_artist:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍🎨 | `:woman_artist:` | 🧑‍✈️ | `:pilot:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍✈️ | `:man_pilot:` | 👩‍✈️ | `:woman_pilot:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍🚀 | `:astronaut:` | 👨‍🚀 | `:man_astronaut:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍🚀 | `:woman_astronaut:` | 🧑‍🚒 | `:firefighter:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍🚒 | `:man_firefighter:` | 👩‍🚒 | `:woman_firefighter:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👮 | `:cop:` `:police_officer:` | 👮‍♂️ | `:policeman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👮‍♀️ | `:policewoman:` | 🕵️ | `:detective:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🕵️‍♂️ | `:male_detective:` | 🕵️‍♀️ | `:female_detective:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 💂 | `:guard:` | 💂‍♂️ | `:guardsman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 💂‍♀️ | `:guardswoman:` | 🥷 | `:ninja:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👷 | `:construction_worker:` | 👷‍♂️ | `:construction_worker_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👷‍♀️ | `:construction_worker_woman:` | 🫅 | `:person_with_crown:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤴 | `:prince:` | 👸 | `:princess:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👳 | `:person_with_turban:` | 👳‍♂️ | `:man_with_turban:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👳‍♀️ | `:woman_with_turban:` | 👲 | `:man_with_gua_pi_mao:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧕 | `:woman_with_headscarf:` | 🤵 | `:person_in_tuxedo:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤵‍♂️ | `:man_in_tuxedo:` | 🤵‍♀️ | `:woman_in_tuxedo:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👰 | `:person_with_veil:` | 👰‍♂️ | `:man_with_veil:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👰‍♀️ | `:bride_with_veil:` `:woman_with_veil:` | 🤰 | `:pregnant_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🫃 | `:pregnant_man:` | 🫄 | `:pregnant_person:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤱 | `:breast_feeding:` | 👩‍🍼 | `:woman_feeding_baby:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍🍼 | `:man_feeding_baby:` | 🧑‍🍼 | `:person_feeding_baby:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Person Fantasy | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👼 | `:angel:` | 🎅 | `:santa:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤶 | `:mrs_claus:` | 🧑‍🎄 | `:mx_claus:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🦸 | `:superhero:` | 🦸‍♂️ | `:superhero_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🦸‍♀️ | `:superhero_woman:` | 🦹 | `:supervillain:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🦹‍♂️ | `:supervillain_man:` | 🦹‍♀️ | `:supervillain_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧙 | `:mage:` | 🧙‍♂️ | `:mage_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧙‍♀️ | `:mage_woman:` | 🧚 | `:fairy:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧚‍♂️ | `:fairy_man:` | 🧚‍♀️ | `:fairy_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧛 | `:vampire:` | 🧛‍♂️ | `:vampire_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧛‍♀️ | `:vampire_woman:` | 🧜 | `:merperson:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧜‍♂️ | `:merman:` | 🧜‍♀️ | `:mermaid:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧝 | `:elf:` | 🧝‍♂️ | `:elf_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧝‍♀️ | `:elf_woman:` | 🧞 | `:genie:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧞‍♂️ | `:genie_man:` | 🧞‍♀️ | `:genie_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧟 | `:zombie:` | 🧟‍♂️ | `:zombie_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧟‍♀️ | `:zombie_woman:` | 🧌 | `:troll:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Person Activity | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 💆 | `:massage:` | 💆‍♂️ | `:massage_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 💆‍♀️ | `:massage_woman:` | 💇 | `:haircut:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 💇‍♂️ | `:haircut_man:` | 💇‍♀️ | `:haircut_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🚶 | `:walking:` | 🚶‍♂️ | `:walking_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🚶‍♀️ | `:walking_woman:` | 🧍 | `:standing_person:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧍‍♂️ | `:standing_man:` | 🧍‍♀️ | `:standing_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧎 | `:kneeling_person:` | 🧎‍♂️ | `:kneeling_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧎‍♀️ | `:kneeling_woman:` | 🧑‍🦯 | `:person_with_probing_cane:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍🦯 | `:man_with_probing_cane:` | 👩‍🦯 | `:woman_with_probing_cane:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍🦼 | `:person_in_motorized_wheelchair:` | 👨‍🦼 | `:man_in_motorized_wheelchair:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍🦼 | `:woman_in_motorized_wheelchair:` | 🧑‍🦽 | `:person_in_manual_wheelchair:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍🦽 | `:man_in_manual_wheelchair:` | 👩‍🦽 | `:woman_in_manual_wheelchair:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🏃 | `:runner:` `:running:` | 🏃‍♂️ | `:running_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🏃‍♀️ | `:running_woman:` | 💃 | `:dancer:` `:woman_dancing:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🕺 | `:man_dancing:` | 🕴️ | `:business_suit_levitating:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👯 | `:dancers:` | 👯‍♂️ | `:dancing_men:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👯‍♀️ | `:dancing_women:` | 🧖 | `:sauna_person:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧖‍♂️ | `:sauna_man:` | 🧖‍♀️ | `:sauna_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧗 | `:climbing:` | 🧗‍♂️ | `:climbing_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧗‍♀️ | `:climbing_woman:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Person Sport | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤺 | `:person_fencing:` | 🏇 | `:horse_racing:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | ⛷️ | `:skier:` | 🏂 | `:snowboarder:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🏌️ | `:golfing:` | 🏌️‍♂️ | `:golfing_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🏌️‍♀️ | `:golfing_woman:` | 🏄 | `:surfer:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🏄‍♂️ | `:surfing_man:` | 🏄‍♀️ | `:surfing_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🚣 | `:rowboat:` | 🚣‍♂️ | `:rowing_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🚣‍♀️ | `:rowing_woman:` | 🏊 | `:swimmer:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🏊‍♂️ | `:swimming_man:` | 🏊‍♀️ | `:swimming_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | ⛹️ | `:bouncing_ball_person:` | ⛹️‍♂️ | `:basketball_man:` `:bouncing_ball_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | ⛹️‍♀️ | `:basketball_woman:` `:bouncing_ball_woman:` | 🏋️ | `:weight_lifting:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🏋️‍♂️ | `:weight_lifting_man:` | 🏋️‍♀️ | `:weight_lifting_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🚴 | `:bicyclist:` | 🚴‍♂️ | `:biking_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🚴‍♀️ | `:biking_woman:` | 🚵 | `:mountain_bicyclist:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🚵‍♂️ | `:mountain_biking_man:` | 🚵‍♀️ | `:mountain_biking_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤸 | `:cartwheeling:` | 🤸‍♂️ | `:man_cartwheeling:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤸‍♀️ | `:woman_cartwheeling:` | 🤼 | `:wrestling:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤼‍♂️ | `:men_wrestling:` | 🤼‍♀️ | `:women_wrestling:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤽 | `:water_polo:` | 🤽‍♂️ | `:man_playing_water_polo:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤽‍♀️ | `:woman_playing_water_polo:` | 🤾 | `:handball_person:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤾‍♂️ | `:man_playing_handball:` | 🤾‍♀️ | `:woman_playing_handball:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤹 | `:juggling_person:` | 🤹‍♂️ | `:man_juggling:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🤹‍♀️ | `:woman_juggling:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Person Resting | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧘 | `:lotus_position:` | 🧘‍♂️ | `:lotus_position_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧘‍♀️ | `:lotus_position_woman:` | 🛀 | `:bath:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🛌 | `:sleeping_bed:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Family | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🧑‍🤝‍🧑 | `:people_holding_hands:` | 👭 | `:two_women_holding_hands:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👫 | `:couple:` | 👬 | `:two_men_holding_hands:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 💏 | `:couplekiss:` | 👩‍❤️‍💋‍👨 | `:couplekiss_man_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍❤️‍💋‍👨 | `:couplekiss_man_man:` | 👩‍❤️‍💋‍👩 | `:couplekiss_woman_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 💑 | `:couple_with_heart:` | 👩‍❤️‍👨 | `:couple_with_heart_woman_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍❤️‍👨 | `:couple_with_heart_man_man:` | 👩‍❤️‍👩 | `:couple_with_heart_woman_woman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍👩‍👦 | `:family_man_woman_boy:` | 👨‍👩‍👧 | `:family_man_woman_girl:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍👩‍👧‍👦 | `:family_man_woman_girl_boy:` | 👨‍👩‍👦‍👦 | `:family_man_woman_boy_boy:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍👩‍👧‍👧 | `:family_man_woman_girl_girl:` | 👨‍👨‍👦 | `:family_man_man_boy:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍👨‍👧 | `:family_man_man_girl:` | 👨‍👨‍👧‍👦 | `:family_man_man_girl_boy:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍👨‍👦‍👦 | `:family_man_man_boy_boy:` | 👨‍👨‍👧‍👧 | `:family_man_man_girl_girl:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍👩‍👦 | `:family_woman_woman_boy:` | 👩‍👩‍👧 | `:family_woman_woman_girl:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍👩‍👧‍👦 | `:family_woman_woman_girl_boy:` | 👩‍👩‍👦‍👦 | `:family_woman_woman_boy_boy:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍👩‍👧‍👧 | `:family_woman_woman_girl_girl:` | 👨‍👦 | `:family_man_boy:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍👦‍👦 | `:family_man_boy_boy:` | 👨‍👧 | `:family_man_girl:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👨‍👧‍👦 | `:family_man_girl_boy:` | 👨‍👧‍👧 | `:family_man_girl_girl:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍👦 | `:family_woman_boy:` | 👩‍👦‍👦 | `:family_woman_boy_boy:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍👧 | `:family_woman_girl:` | 👩‍👧‍👦 | `:family_woman_girl_boy:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👩‍👧‍👧 | `:family_woman_girl_girl:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Person Symbol | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 🗣️ | `:speaking_head:` | 👤 | `:bust_in_silhouette:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👥 | `:busts_in_silhouette:` | 🫂 | `:people_hugging:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#people--body) | 👪 | `:family:` | 👣 | `:footprints:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | Animals & Nature ---------------- * [Animal Mammal](https://gohugo.io/quick-reference/emojis/#animal-mammal) * [Animal Bird](https://gohugo.io/quick-reference/emojis/#animal-bird) * [Animal Amphibian](https://gohugo.io/quick-reference/emojis/#animal-amphibian) * [Animal Reptile](https://gohugo.io/quick-reference/emojis/#animal-reptile) * [Animal Marine](https://gohugo.io/quick-reference/emojis/#animal-marine) * [Animal Bug](https://gohugo.io/quick-reference/emojis/#animal-bug) * [Plant Flower](https://gohugo.io/quick-reference/emojis/#plant-flower) * [Plant Other](https://gohugo.io/quick-reference/emojis/#plant-other) ### Animal Mammal | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐵 | `:monkey_face:` | 🐒 | `:monkey:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦍 | `:gorilla:` | 🦧 | `:orangutan:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐶 | `:dog:` | 🐕 | `:dog2:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦮 | `:guide_dog:` | 🐕‍🦺 | `:service_dog:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐩 | `:poodle:` | 🐺 | `:wolf:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦊 | `:fox_face:` | 🦝 | `:raccoon:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐱 | `:cat:` | 🐈 | `:cat2:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐈‍⬛ | `:black_cat:` | 🦁 | `:lion:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐯 | `:tiger:` | 🐅 | `:tiger2:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐆 | `:leopard:` | 🐴 | `:horse:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🫎 | `:moose:` | 🫏 | `:donkey:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐎 | `:racehorse:` | 🦄 | `:unicorn:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦓 | `:zebra:` | 🦌 | `:deer:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦬 | `:bison:` | 🐮 | `:cow:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐂 | `:ox:` | 🐃 | `:water_buffalo:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐄 | `:cow2:` | 🐷 | `:pig:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐖 | `:pig2:` | 🐗 | `:boar:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐽 | `:pig_nose:` | 🐏 | `:ram:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐑 | `:sheep:` | 🐐 | `:goat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐪 | `:dromedary_camel:` | 🐫 | `:camel:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦙 | `:llama:` | 🦒 | `:giraffe:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐘 | `:elephant:` | 🦣 | `:mammoth:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦏 | `:rhinoceros:` | 🦛 | `:hippopotamus:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐭 | `:mouse:` | 🐁 | `:mouse2:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐀 | `:rat:` | 🐹 | `:hamster:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐰 | `:rabbit:` | 🐇 | `:rabbit2:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐿️ | `:chipmunk:` | 🦫 | `:beaver:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦔 | `:hedgehog:` | 🦇 | `:bat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐻 | `:bear:` | 🐻‍❄️ | `:polar_bear:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐨 | `:koala:` | 🐼 | `:panda_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦥 | `:sloth:` | 🦦 | `:otter:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦨 | `:skunk:` | 🦘 | `:kangaroo:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦡 | `:badger:` | 🐾 | `:feet:` `:paw_prints:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Animal Bird | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦃 | `:turkey:` | 🐔 | `:chicken:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐓 | `:rooster:` | 🐣 | `:hatching_chick:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐤 | `:baby_chick:` | 🐥 | `:hatched_chick:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐦 | `:bird:` | 🐧 | `:penguin:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🕊️ | `:dove:` | 🦅 | `:eagle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦆 | `:duck:` | 🦢 | `:swan:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦉 | `:owl:` | 🦤 | `:dodo:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🪶 | `:feather:` | 🦩 | `:flamingo:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦚 | `:peacock:` | 🦜 | `:parrot:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🪽 | `:wing:` | 🐦‍⬛ | `:black_bird:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🪿 | `:goose:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Animal Amphibian | | ico | shortcode | | | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐸 | `:frog:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Animal Reptile | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐊 | `:crocodile:` | 🐢 | `:turtle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦎 | `:lizard:` | 🐍 | `:snake:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐲 | `:dragon_face:` | 🐉 | `:dragon:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦕 | `:sauropod:` | 🦖 | `:t-rex:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Animal Marine | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐳 | `:whale:` | 🐋 | `:whale2:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐬 | `:dolphin:` `:flipper:` | 🦭 | `:seal:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐟 | `:fish:` | 🐠 | `:tropical_fish:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐡 | `:blowfish:` | 🦈 | `:shark:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐙 | `:octopus:` | 🐚 | `:shell:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🪸 | `:coral:` | 🪼 | `:jellyfish:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Animal Bug | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐌 | `:snail:` | 🦋 | `:butterfly:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐛 | `:bug:` | 🐜 | `:ant:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐝 | `:bee:` `:honeybee:` | 🪲 | `:beetle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🐞 | `:lady_beetle:` | 🦗 | `:cricket:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🪳 | `:cockroach:` | 🕷️ | `:spider:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🕸️ | `:spider_web:` | 🦂 | `:scorpion:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🦟 | `:mosquito:` | 🪰 | `:fly:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🪱 | `:worm:` | 🦠 | `:microbe:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Plant Flower | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 💐 | `:bouquet:` | 🌸 | `:cherry_blossom:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 💮 | `:white_flower:` | 🪷 | `:lotus:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🏵️ | `:rosette:` | 🌹 | `:rose:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🥀 | `:wilted_flower:` | 🌺 | `:hibiscus:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🌻 | `:sunflower:` | 🌼 | `:blossom:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🌷 | `:tulip:` | 🪻 | `:hyacinth:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Plant Other | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🌱 | `:seedling:` | 🪴 | `:potted_plant:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🌲 | `:evergreen_tree:` | 🌳 | `:deciduous_tree:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🌴 | `:palm_tree:` | 🌵 | `:cactus:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🌾 | `:ear_of_rice:` | 🌿 | `:herb:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | ☘️ | `:shamrock:` | 🍀 | `:four_leaf_clover:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🍁 | `:maple_leaf:` | 🍂 | `:fallen_leaf:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🍃 | `:leaves:` | 🪹 | `:empty_nest:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#animals--nature) | 🪺 | `:nest_with_eggs:` | 🍄 | `:mushroom:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | Food & Drink ------------ * [Food Fruit](https://gohugo.io/quick-reference/emojis/#food-fruit) * [Food Vegetable](https://gohugo.io/quick-reference/emojis/#food-vegetable) * [Food Prepared](https://gohugo.io/quick-reference/emojis/#food-prepared) * [Food Asian](https://gohugo.io/quick-reference/emojis/#food-asian) * [Food Marine](https://gohugo.io/quick-reference/emojis/#food-marine) * [Food Sweet](https://gohugo.io/quick-reference/emojis/#food-sweet) * [Drink](https://gohugo.io/quick-reference/emojis/#drink) * [Dishware](https://gohugo.io/quick-reference/emojis/#dishware) ### Food Fruit | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍇 | `:grapes:` | 🍈 | `:melon:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍉 | `:watermelon:` | 🍊 | `:mandarin:` `:orange:` `:tangerine:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍋 | `:lemon:` | 🍌 | `:banana:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍍 | `:pineapple:` | 🥭 | `:mango:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍎 | `:apple:` | 🍏 | `:green_apple:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍐 | `:pear:` | 🍑 | `:peach:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍒 | `:cherries:` | 🍓 | `:strawberry:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🫐 | `:blueberries:` | 🥝 | `:kiwi_fruit:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍅 | `:tomato:` | 🫒 | `:olive:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥥 | `:coconut:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Food Vegetable | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥑 | `:avocado:` | 🍆 | `:eggplant:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥔 | `:potato:` | 🥕 | `:carrot:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🌽 | `:corn:` | 🌶️ | `:hot_pepper:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🫑 | `:bell_pepper:` | 🥒 | `:cucumber:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥬 | `:leafy_green:` | 🥦 | `:broccoli:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🧄 | `:garlic:` | 🧅 | `:onion:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥜 | `:peanuts:` | 🫘 | `:beans:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🌰 | `:chestnut:` | 🫚 | `:ginger_root:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🫛 | `:pea_pod:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Food Prepared | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍞 | `:bread:` | 🥐 | `:croissant:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥖 | `:baguette_bread:` | 🫓 | `:flatbread:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥨 | `:pretzel:` | 🥯 | `:bagel:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥞 | `:pancakes:` | 🧇 | `:waffle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🧀 | `:cheese:` | 🍖 | `:meat_on_bone:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍗 | `:poultry_leg:` | 🥩 | `:cut_of_meat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥓 | `:bacon:` | 🍔 | `:hamburger:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍟 | `:fries:` | 🍕 | `:pizza:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🌭 | `:hotdog:` | 🥪 | `:sandwich:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🌮 | `:taco:` | 🌯 | `:burrito:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🫔 | `:tamale:` | 🥙 | `:stuffed_flatbread:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🧆 | `:falafel:` | 🥚 | `:egg:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍳 | `:fried_egg:` | 🥘 | `:shallow_pan_of_food:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍲 | `:stew:` | 🫕 | `:fondue:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥣 | `:bowl_with_spoon:` | 🥗 | `:green_salad:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍿 | `:popcorn:` | 🧈 | `:butter:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🧂 | `:salt:` | 🥫 | `:canned_food:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Food Asian | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍱 | `:bento:` | 🍘 | `:rice_cracker:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍙 | `:rice_ball:` | 🍚 | `:rice:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍛 | `:curry:` | 🍜 | `:ramen:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍝 | `:spaghetti:` | 🍠 | `:sweet_potato:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍢 | `:oden:` | 🍣 | `:sushi:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍤 | `:fried_shrimp:` | 🍥 | `:fish_cake:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥮 | `:moon_cake:` | 🍡 | `:dango:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥟 | `:dumpling:` | 🥠 | `:fortune_cookie:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥡 | `:takeout_box:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Food Marine | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🦀 | `:crab:` | 🦞 | `:lobster:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🦐 | `:shrimp:` | 🦑 | `:squid:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🦪 | `:oyster:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Food Sweet | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍦 | `:icecream:` | 🍧 | `:shaved_ice:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍨 | `:ice_cream:` | 🍩 | `:doughnut:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍪 | `:cookie:` | 🎂 | `:birthday:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍰 | `:cake:` | 🧁 | `:cupcake:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥧 | `:pie:` | 🍫 | `:chocolate_bar:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍬 | `:candy:` | 🍭 | `:lollipop:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍮 | `:custard:` | 🍯 | `:honey_pot:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Drink | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍼 | `:baby_bottle:` | 🥛 | `:milk_glass:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | ☕ | `:coffee:` | 🫖 | `:teapot:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍵 | `:tea:` | 🍶 | `:sake:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍾 | `:champagne:` | 🍷 | `:wine_glass:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍸 | `:cocktail:` | 🍹 | `:tropical_drink:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍺 | `:beer:` | 🍻 | `:beers:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥂 | `:clinking_glasses:` | 🥃 | `:tumbler_glass:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🫗 | `:pouring_liquid:` | 🥤 | `:cup_with_straw:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🧋 | `:bubble_tea:` | 🧃 | `:beverage_box:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🧉 | `:mate:` | 🧊 | `:ice_cube:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Dishware | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🥢 | `:chopsticks:` | 🍽️ | `:plate_with_cutlery:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🍴 | `:fork_and_knife:` | 🥄 | `:spoon:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🔪 | `:hocho:` `:knife:` | 🫙 | `:jar:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#food--drink) | 🏺 | `:amphora:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | Travel & Places --------------- * [Place Map](https://gohugo.io/quick-reference/emojis/#place-map) * [Place Geographic](https://gohugo.io/quick-reference/emojis/#place-geographic) * [Place Building](https://gohugo.io/quick-reference/emojis/#place-building) * [Place Religious](https://gohugo.io/quick-reference/emojis/#place-religious) * [Place Other](https://gohugo.io/quick-reference/emojis/#place-other) * [Transport Ground](https://gohugo.io/quick-reference/emojis/#transport-ground) * [Transport Water](https://gohugo.io/quick-reference/emojis/#transport-water) * [Transport Air](https://gohugo.io/quick-reference/emojis/#transport-air) * [Hotel](https://gohugo.io/quick-reference/emojis/#hotel) * [Time](https://gohugo.io/quick-reference/emojis/#time) * [Sky & Weather](https://gohugo.io/quick-reference/emojis/#sky--weather) ### Place Map | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌍 | `:earth_africa:` | 🌎 | `:earth_americas:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌏 | `:earth_asia:` | 🌐 | `:globe_with_meridians:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🗺️ | `:world_map:` | 🗾 | `:japan:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🧭 | `:compass:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Place Geographic | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏔️ | `:mountain_snow:` | ⛰️ | `:mountain:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌋 | `:volcano:` | 🗻 | `:mount_fuji:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏕️ | `:camping:` | 🏖️ | `:beach_umbrella:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏜️ | `:desert:` | 🏝️ | `:desert_island:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏞️ | `:national_park:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Place Building | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏟️ | `:stadium:` | 🏛️ | `:classical_building:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏗️ | `:building_construction:` | 🧱 | `:bricks:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🪨 | `:rock:` | 🪵 | `:wood:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛖 | `:hut:` | 🏘️ | `:houses:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏚️ | `:derelict_house:` | 🏠 | `:house:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏡 | `:house_with_garden:` | 🏢 | `:office:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏣 | `:post_office:` | 🏤 | `:european_post_office:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏥 | `:hospital:` | 🏦 | `:bank:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏨 | `:hotel:` | 🏩 | `:love_hotel:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏪 | `:convenience_store:` | 🏫 | `:school:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏬 | `:department_store:` | 🏭 | `:factory:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏯 | `:japanese_castle:` | 🏰 | `:european_castle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 💒 | `:wedding:` | 🗼 | `:tokyo_tower:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🗽 | `:statue_of_liberty:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Place Religious | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ⛪ | `:church:` | 🕌 | `:mosque:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛕 | `:hindu_temple:` | 🕍 | `:synagogue:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ⛩️ | `:shinto_shrine:` | 🕋 | `:kaaba:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Place Other | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ⛲ | `:fountain:` | ⛺ | `:tent:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌁 | `:foggy:` | 🌃 | `:night_with_stars:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏙️ | `:cityscape:` | 🌄 | `:sunrise_over_mountains:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌅 | `:sunrise:` | 🌆 | `:city_sunset:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌇 | `:city_sunrise:` | 🌉 | `:bridge_at_night:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ♨️ | `:hotsprings:` | 🎠 | `:carousel_horse:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛝 | `:playground_slide:` | 🎡 | `:ferris_wheel:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🎢 | `:roller_coaster:` | 💈 | `:barber:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🎪 | `:circus_tent:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Transport Ground | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚂 | `:steam_locomotive:` | 🚃 | `:railway_car:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚄 | `:bullettrain_side:` | 🚅 | `:bullettrain_front:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚆 | `:train2:` | 🚇 | `:metro:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚈 | `:light_rail:` | 🚉 | `:station:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚊 | `:tram:` | 🚝 | `:monorail:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚞 | `:mountain_railway:` | 🚋 | `:train:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚌 | `:bus:` | 🚍 | `:oncoming_bus:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚎 | `:trolleybus:` | 🚐 | `:minibus:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚑 | `:ambulance:` | 🚒 | `:fire_engine:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚓 | `:police_car:` | 🚔 | `:oncoming_police_car:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚕 | `:taxi:` | 🚖 | `:oncoming_taxi:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚗 | `:car:` `:red_car:` | 🚘 | `:oncoming_automobile:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚙 | `:blue_car:` | 🛻 | `:pickup_truck:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚚 | `:truck:` | 🚛 | `:articulated_lorry:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚜 | `:tractor:` | 🏎️ | `:racing_car:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🏍️ | `:motorcycle:` | 🛵 | `:motor_scooter:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🦽 | `:manual_wheelchair:` | 🦼 | `:motorized_wheelchair:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛺 | `:auto_rickshaw:` | 🚲 | `:bike:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛴 | `:kick_scooter:` | 🛹 | `:skateboard:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛼 | `:roller_skate:` | 🚏 | `:busstop:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛣️ | `:motorway:` | 🛤️ | `:railway_track:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛢️ | `:oil_drum:` | ⛽ | `:fuelpump:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛞 | `:wheel:` | 🚨 | `:rotating_light:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚥 | `:traffic_light:` | 🚦 | `:vertical_traffic_light:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛑 | `:stop_sign:` | 🚧 | `:construction:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Transport Water | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ⚓ | `:anchor:` | 🛟 | `:ring_buoy:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ⛵ | `:boat:` `:sailboat:` | 🛶 | `:canoe:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚤 | `:speedboat:` | 🛳️ | `:passenger_ship:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ⛴️ | `:ferry:` | 🛥️ | `:motor_boat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚢 | `:ship:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Transport Air | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ✈️ | `:airplane:` | 🛩️ | `:small_airplane:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛫 | `:flight_departure:` | 🛬 | `:flight_arrival:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🪂 | `:parachute:` | 💺 | `:seat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚁 | `:helicopter:` | 🚟 | `:suspension_railway:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🚠 | `:mountain_cableway:` | 🚡 | `:aerial_tramway:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛰️ | `:artificial_satellite:` | 🚀 | `:rocket:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛸 | `:flying_saucer:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Hotel | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🛎️ | `:bellhop_bell:` | 🧳 | `:luggage:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Time | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ⌛ | `:hourglass:` | ⏳ | `:hourglass_flowing_sand:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ⌚ | `:watch:` | ⏰ | `:alarm_clock:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ⏱️ | `:stopwatch:` | ⏲️ | `:timer_clock:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕰️ | `:mantelpiece_clock:` | 🕛 | `:clock12:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕧 | `:clock1230:` | 🕐 | `:clock1:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕜 | `:clock130:` | 🕑 | `:clock2:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕝 | `:clock230:` | 🕒 | `:clock3:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕞 | `:clock330:` | 🕓 | `:clock4:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕟 | `:clock430:` | 🕔 | `:clock5:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕠 | `:clock530:` | 🕕 | `:clock6:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕡 | `:clock630:` | 🕖 | `:clock7:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕢 | `:clock730:` | 🕗 | `:clock8:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕣 | `:clock830:` | 🕘 | `:clock9:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕤 | `:clock930:` | 🕙 | `:clock10:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕥 | `:clock1030:` | 🕚 | `:clock11:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🕦 | `:clock1130:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Sky & Weather | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌑 | `:new_moon:` | 🌒 | `:waxing_crescent_moon:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌓 | `:first_quarter_moon:` | 🌔 | `:moon:` `:waxing_gibbous_moon:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌕 | `:full_moon:` | 🌖 | `:waning_gibbous_moon:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌗 | `:last_quarter_moon:` | 🌘 | `:waning_crescent_moon:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌙 | `:crescent_moon:` | 🌚 | `:new_moon_with_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌛 | `:first_quarter_moon_with_face:` | 🌜 | `:last_quarter_moon_with_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌡️ | `:thermometer:` | ☀️ | `:sunny:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌝 | `:full_moon_with_face:` | 🌞 | `:sun_with_face:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🪐 | `:ringed_planet:` | ⭐ | `:star:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌟 | `:star2:` | 🌠 | `:stars:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌌 | `:milky_way:` | ☁️ | `:cloud:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ⛅ | `:partly_sunny:` | ⛈️ | `:cloud_with_lightning_and_rain:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌤️ | `:sun_behind_small_cloud:` | 🌥️ | `:sun_behind_large_cloud:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌦️ | `:sun_behind_rain_cloud:` | 🌧️ | `:cloud_with_rain:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌨️ | `:cloud_with_snow:` | 🌩️ | `:cloud_with_lightning:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌪️ | `:tornado:` | 🌫️ | `:fog:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌬️ | `:wind_face:` | 🌀 | `:cyclone:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌈 | `:rainbow:` | 🌂 | `:closed_umbrella:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ☂️ | `:open_umbrella:` | ☔ | `:umbrella:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ⛱️ | `:parasol_on_ground:` | ⚡ | `:zap:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ❄️ | `:snowflake:` | ☃️ | `:snowman_with_snow:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | ⛄ | `:snowman:` | ☄️ | `:comet:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🔥 | `:fire:` | 💧 | `:droplet:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#travel--places) | 🌊 | `:ocean:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | Activities ---------- * [Event](https://gohugo.io/quick-reference/emojis/#event) * [Award Medal](https://gohugo.io/quick-reference/emojis/#award-medal) * [Sport](https://gohugo.io/quick-reference/emojis/#sport) * [Game](https://gohugo.io/quick-reference/emojis/#game) * [Arts & Crafts](https://gohugo.io/quick-reference/emojis/#arts--crafts) ### Event | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎃 | `:jack_o_lantern:` | 🎄 | `:christmas_tree:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎆 | `:fireworks:` | 🎇 | `:sparkler:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🧨 | `:firecracker:` | ✨ | `:sparkles:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎈 | `:balloon:` | 🎉 | `:tada:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎊 | `:confetti_ball:` | 🎋 | `:tanabata_tree:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎍 | `:bamboo:` | 🎎 | `:dolls:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎏 | `:flags:` | 🎐 | `:wind_chime:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎑 | `:rice_scene:` | 🧧 | `:red_envelope:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎀 | `:ribbon:` | 🎁 | `:gift:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎗️ | `:reminder_ribbon:` | 🎟️ | `:tickets:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎫 | `:ticket:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Award Medal | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎖️ | `:medal_military:` | 🏆 | `:trophy:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🏅 | `:medal_sports:` | 🥇 | `:1st_place_medal:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🥈 | `:2nd_place_medal:` | 🥉 | `:3rd_place_medal:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Sport | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#activities) | ⚽ | `:soccer:` | ⚾ | `:baseball:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🥎 | `:softball:` | 🏀 | `:basketball:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🏐 | `:volleyball:` | 🏈 | `:football:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🏉 | `:rugby_football:` | 🎾 | `:tennis:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🥏 | `:flying_disc:` | 🎳 | `:bowling:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🏏 | `:cricket_game:` | 🏑 | `:field_hockey:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🏒 | `:ice_hockey:` | 🥍 | `:lacrosse:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🏓 | `:ping_pong:` | 🏸 | `:badminton:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🥊 | `:boxing_glove:` | 🥋 | `:martial_arts_uniform:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🥅 | `:goal_net:` | ⛳ | `:golf:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | ⛸️ | `:ice_skate:` | 🎣 | `:fishing_pole_and_fish:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🤿 | `:diving_mask:` | 🎽 | `:running_shirt_with_sash:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎿 | `:ski:` | 🛷 | `:sled:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🥌 | `:curling_stone:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Game | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎯 | `:dart:` | 🪀 | `:yo_yo:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🪁 | `:kite:` | 🔫 | `:gun:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎱 | `:8ball:` | 🔮 | `:crystal_ball:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🪄 | `:magic_wand:` | 🎮 | `:video_game:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🕹️ | `:joystick:` | 🎰 | `:slot_machine:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎲 | `:game_die:` | 🧩 | `:jigsaw:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🧸 | `:teddy_bear:` | 🪅 | `:pinata:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🪩 | `:mirror_ball:` | 🪆 | `:nesting_dolls:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | ♠️ | `:spades:` | ♥️ | `:hearts:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | ♦️ | `:diamonds:` | ♣️ | `:clubs:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | ♟️ | `:chess_pawn:` | 🃏 | `:black_joker:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🀄 | `:mahjong:` | 🎴 | `:flower_playing_cards:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Arts & Crafts | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎭 | `:performing_arts:` | 🖼️ | `:framed_picture:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🎨 | `:art:` | 🧵 | `:thread:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🪡 | `:sewing_needle:` | 🧶 | `:yarn:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#activities) | 🪢 | `:knot:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | Objects ------- * [Clothing](https://gohugo.io/quick-reference/emojis/#clothing) * [Sound](https://gohugo.io/quick-reference/emojis/#sound) * [Music](https://gohugo.io/quick-reference/emojis/#music) * [Musical Instrument](https://gohugo.io/quick-reference/emojis/#musical-instrument) * [Phone](https://gohugo.io/quick-reference/emojis/#phone) * [Computer](https://gohugo.io/quick-reference/emojis/#computer) * [Light & Video](https://gohugo.io/quick-reference/emojis/#light--video) * [Book Paper](https://gohugo.io/quick-reference/emojis/#book-paper) * [Money](https://gohugo.io/quick-reference/emojis/#money) * [Mail](https://gohugo.io/quick-reference/emojis/#mail) * [Writing](https://gohugo.io/quick-reference/emojis/#writing) * [Office](https://gohugo.io/quick-reference/emojis/#office) * [Lock](https://gohugo.io/quick-reference/emojis/#lock) * [Tool](https://gohugo.io/quick-reference/emojis/#tool) * [Science](https://gohugo.io/quick-reference/emojis/#science) * [Medical](https://gohugo.io/quick-reference/emojis/#medical) * [Household](https://gohugo.io/quick-reference/emojis/#household) * [Other Object](https://gohugo.io/quick-reference/emojis/#other-object) ### Clothing | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 👓 | `:eyeglasses:` | 🕶️ | `:dark_sunglasses:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🥽 | `:goggles:` | 🥼 | `:lab_coat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🦺 | `:safety_vest:` | 👔 | `:necktie:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 👕 | `:shirt:` `:tshirt:` | 👖 | `:jeans:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🧣 | `:scarf:` | 🧤 | `:gloves:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🧥 | `:coat:` | 🧦 | `:socks:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 👗 | `:dress:` | 👘 | `:kimono:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🥻 | `:sari:` | 🩱 | `:one_piece_swimsuit:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🩲 | `:swim_brief:` | 🩳 | `:shorts:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 👙 | `:bikini:` | 👚 | `:womans_clothes:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪭 | `:folding_hand_fan:` | 👛 | `:purse:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 👜 | `:handbag:` | 👝 | `:pouch:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🛍️ | `:shopping:` | 🎒 | `:school_satchel:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🩴 | `:thong_sandal:` | 👞 | `:mans_shoe:` `:shoe:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 👟 | `:athletic_shoe:` | 🥾 | `:hiking_boot:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🥿 | `:flat_shoe:` | 👠 | `:high_heel:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 👡 | `:sandal:` | 🩰 | `:ballet_shoes:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 👢 | `:boot:` | 🪮 | `:hair_pick:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 👑 | `:crown:` | 👒 | `:womans_hat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🎩 | `:tophat:` | 🎓 | `:mortar_board:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🧢 | `:billed_cap:` | 🪖 | `:military_helmet:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | ⛑️ | `:rescue_worker_helmet:` | 📿 | `:prayer_beads:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 💄 | `:lipstick:` | 💍 | `:ring:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 💎 | `:gem:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Sound | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔇 | `:mute:` | 🔈 | `:speaker:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔉 | `:sound:` | 🔊 | `:loud_sound:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📢 | `:loudspeaker:` | 📣 | `:mega:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📯 | `:postal_horn:` | 🔔 | `:bell:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔕 | `:no_bell:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Music | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🎼 | `:musical_score:` | 🎵 | `:musical_note:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🎶 | `:notes:` | 🎙️ | `:studio_microphone:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🎚️ | `:level_slider:` | 🎛️ | `:control_knobs:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🎤 | `:microphone:` | 🎧 | `:headphones:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📻 | `:radio:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Musical Instrument | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🎷 | `:saxophone:` | 🪗 | `:accordion:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🎸 | `:guitar:` | 🎹 | `:musical_keyboard:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🎺 | `:trumpet:` | 🎻 | `:violin:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪕 | `:banjo:` | 🥁 | `:drum:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪘 | `:long_drum:` | 🪇 | `:maracas:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪈 | `:flute:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Phone | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📱 | `:iphone:` | 📲 | `:calling:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | ☎️ | `:phone:` `:telephone:` | 📞 | `:telephone_receiver:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📟 | `:pager:` | 📠 | `:fax:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Computer | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔋 | `:battery:` | 🪫 | `:low_battery:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔌 | `:electric_plug:` | 💻 | `:computer:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🖥️ | `:desktop_computer:` | 🖨️ | `:printer:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | ⌨️ | `:keyboard:` | 🖱️ | `:computer_mouse:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🖲️ | `:trackball:` | 💽 | `:minidisc:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 💾 | `:floppy_disk:` | 💿 | `:cd:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📀 | `:dvd:` | 🧮 | `:abacus:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Light & Video | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🎥 | `:movie_camera:` | 🎞️ | `:film_strip:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📽️ | `:film_projector:` | 🎬 | `:clapper:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📺 | `:tv:` | 📷 | `:camera:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📸 | `:camera_flash:` | 📹 | `:video_camera:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📼 | `:vhs:` | 🔍 | `:mag:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔎 | `:mag_right:` | 🕯️ | `:candle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 💡 | `:bulb:` | 🔦 | `:flashlight:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🏮 | `:izakaya_lantern:` `:lantern:` | 🪔 | `:diya_lamp:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Book Paper | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📔 | `:notebook_with_decorative_cover:` | 📕 | `:closed_book:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📖 | `:book:` `:open_book:` | 📗 | `:green_book:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📘 | `:blue_book:` | 📙 | `:orange_book:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📚 | `:books:` | 📓 | `:notebook:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📒 | `:ledger:` | 📃 | `:page_with_curl:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📜 | `:scroll:` | 📄 | `:page_facing_up:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📰 | `:newspaper:` | 🗞️ | `:newspaper_roll:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📑 | `:bookmark_tabs:` | 🔖 | `:bookmark:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🏷️ | `:label:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Money | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 💰 | `:moneybag:` | 🪙 | `:coin:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 💴 | `:yen:` | 💵 | `:dollar:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 💶 | `:euro:` | 💷 | `:pound:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 💸 | `:money_with_wings:` | 💳 | `:credit_card:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🧾 | `:receipt:` | 💹 | `:chart:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Mail | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | ✉️ | `:envelope:` | 📧 | `:e-mail:` `:email:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📨 | `:incoming_envelope:` | 📩 | `:envelope_with_arrow:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📤 | `:outbox_tray:` | 📥 | `:inbox_tray:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📦 | `:package:` | 📫 | `:mailbox:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📪 | `:mailbox_closed:` | 📬 | `:mailbox_with_mail:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📭 | `:mailbox_with_no_mail:` | 📮 | `:postbox:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🗳️ | `:ballot_box:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Writing | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | ✏️ | `:pencil2:` | ✒️ | `:black_nib:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🖋️ | `:fountain_pen:` | 🖊️ | `:pen:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🖌️ | `:paintbrush:` | 🖍️ | `:crayon:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📝 | `:memo:` `:pencil:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Office | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 💼 | `:briefcase:` | 📁 | `:file_folder:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📂 | `:open_file_folder:` | 🗂️ | `:card_index_dividers:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📅 | `:date:` | 📆 | `:calendar:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🗒️ | `:spiral_notepad:` | 🗓️ | `:spiral_calendar:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📇 | `:card_index:` | 📈 | `:chart_with_upwards_trend:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📉 | `:chart_with_downwards_trend:` | 📊 | `:bar_chart:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📋 | `:clipboard:` | 📌 | `:pushpin:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📍 | `:round_pushpin:` | 📎 | `:paperclip:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🖇️ | `:paperclips:` | 📏 | `:straight_ruler:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📐 | `:triangular_ruler:` | ✂️ | `:scissors:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🗃️ | `:card_file_box:` | 🗄️ | `:file_cabinet:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🗑️ | `:wastebasket:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Lock | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔒 | `:lock:` | 🔓 | `:unlock:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔏 | `:lock_with_ink_pen:` | 🔐 | `:closed_lock_with_key:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔑 | `:key:` | 🗝️ | `:old_key:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Tool | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔨 | `:hammer:` | 🪓 | `:axe:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | ⛏️ | `:pick:` | ⚒️ | `:hammer_and_pick:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🛠️ | `:hammer_and_wrench:` | 🗡️ | `:dagger:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | ⚔️ | `:crossed_swords:` | 💣 | `:bomb:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪃 | `:boomerang:` | 🏹 | `:bow_and_arrow:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🛡️ | `:shield:` | 🪚 | `:carpentry_saw:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔧 | `:wrench:` | 🪛 | `:screwdriver:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔩 | `:nut_and_bolt:` | ⚙️ | `:gear:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🗜️ | `:clamp:` | ⚖️ | `:balance_scale:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🦯 | `:probing_cane:` | 🔗 | `:link:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | ⛓️ | `:chains:` | 🪝 | `:hook:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🧰 | `:toolbox:` | 🧲 | `:magnet:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪜 | `:ladder:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Science | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | ⚗️ | `:alembic:` | 🧪 | `:test_tube:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🧫 | `:petri_dish:` | 🧬 | `:dna:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🔬 | `:microscope:` | 🔭 | `:telescope:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 📡 | `:satellite:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Medical | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 💉 | `:syringe:` | 🩸 | `:drop_of_blood:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 💊 | `:pill:` | 🩹 | `:adhesive_bandage:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🩼 | `:crutch:` | 🩺 | `:stethoscope:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🩻 | `:x_ray:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Household | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🚪 | `:door:` | 🛗 | `:elevator:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪞 | `:mirror:` | 🪟 | `:window:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🛏️ | `:bed:` | 🛋️ | `:couch_and_lamp:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪑 | `:chair:` | 🚽 | `:toilet:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪠 | `:plunger:` | 🚿 | `:shower:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🛁 | `:bathtub:` | 🪤 | `:mouse_trap:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪒 | `:razor:` | 🧴 | `:lotion_bottle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🧷 | `:safety_pin:` | 🧹 | `:broom:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🧺 | `:basket:` | 🧻 | `:roll_of_paper:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪣 | `:bucket:` | 🧼 | `:soap:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🫧 | `:bubbles:` | 🪥 | `:toothbrush:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🧽 | `:sponge:` | 🧯 | `:fire_extinguisher:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🛒 | `:shopping_cart:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Other Object | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🚬 | `:smoking:` | ⚰️ | `:coffin:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪦 | `:headstone:` | ⚱️ | `:funeral_urn:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🧿 | `:nazar_amulet:` | 🪬 | `:hamsa:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🗿 | `:moyai:` | 🪧 | `:placard:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#objects) | 🪪 | `:identification_card:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | Symbols ------- * [Transport Sign](https://gohugo.io/quick-reference/emojis/#transport-sign) * [Warning](https://gohugo.io/quick-reference/emojis/#warning) * [Arrow](https://gohugo.io/quick-reference/emojis/#arrow) * [Religion](https://gohugo.io/quick-reference/emojis/#religion) * [Zodiac](https://gohugo.io/quick-reference/emojis/#zodiac) * [Av Symbol](https://gohugo.io/quick-reference/emojis/#av-symbol) * [Gender](https://gohugo.io/quick-reference/emojis/#gender) * [Math](https://gohugo.io/quick-reference/emojis/#math) * [Punctuation](https://gohugo.io/quick-reference/emojis/#punctuation) * [Currency](https://gohugo.io/quick-reference/emojis/#currency) * [Other Symbol](https://gohugo.io/quick-reference/emojis/#other-symbol) * [Keycap](https://gohugo.io/quick-reference/emojis/#keycap) * [Alphanum](https://gohugo.io/quick-reference/emojis/#alphanum) * [Geometric](https://gohugo.io/quick-reference/emojis/#geometric) ### Transport Sign | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🏧 | `:atm:` | 🚮 | `:put_litter_in_its_place:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🚰 | `:potable_water:` | ♿ | `:wheelchair:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🚹 | `:mens:` | 🚺 | `:womens:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🚻 | `:restroom:` | 🚼 | `:baby_symbol:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🚾 | `:wc:` | 🛂 | `:passport_control:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🛃 | `:customs:` | 🛄 | `:baggage_claim:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🛅 | `:left_luggage:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Warning | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⚠️ | `:warning:` | 🚸 | `:children_crossing:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⛔ | `:no_entry:` | 🚫 | `:no_entry_sign:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🚳 | `:no_bicycles:` | 🚭 | `:no_smoking:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🚯 | `:do_not_litter:` | 🚱 | `:non-potable_water:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🚷 | `:no_pedestrians:` | 📵 | `:no_mobile_phones:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔞 | `:underage:` | ☢️ | `:radioactive:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ☣️ | `:biohazard:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Arrow | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⬆️ | `:arrow_up:` | ↗️ | `:arrow_upper_right:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ➡️ | `:arrow_right:` | ↘️ | `:arrow_lower_right:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⬇️ | `:arrow_down:` | ↙️ | `:arrow_lower_left:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⬅️ | `:arrow_left:` | ↖️ | `:arrow_upper_left:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ↕️ | `:arrow_up_down:` | ↔️ | `:left_right_arrow:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ↩️ | `:leftwards_arrow_with_hook:` | ↪️ | `:arrow_right_hook:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⤴️ | `:arrow_heading_up:` | ⤵️ | `:arrow_heading_down:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔃 | `:arrows_clockwise:` | 🔄 | `:arrows_counterclockwise:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔙 | `:back:` | 🔚 | `:end:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔛 | `:on:` | 🔜 | `:soon:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔝 | `:top:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Religion | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🛐 | `:place_of_worship:` | ⚛️ | `:atom_symbol:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🕉️ | `:om:` | ✡️ | `:star_of_david:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ☸️ | `:wheel_of_dharma:` | ☯️ | `:yin_yang:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ✝️ | `:latin_cross:` | ☦️ | `:orthodox_cross:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ☪️ | `:star_and_crescent:` | ☮️ | `:peace_symbol:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🕎 | `:menorah:` | 🔯 | `:six_pointed_star:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🪯 | `:khanda:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Zodiac | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ♈ | `:aries:` | ♉ | `:taurus:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ♊ | `:gemini:` | ♋ | `:cancer:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ♌ | `:leo:` | ♍ | `:virgo:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ♎ | `:libra:` | ♏ | `:scorpius:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ♐ | `:sagittarius:` | ♑ | `:capricorn:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ♒ | `:aquarius:` | ♓ | `:pisces:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⛎ | `:ophiuchus:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Av Symbol | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔀 | `:twisted_rightwards_arrows:` | 🔁 | `:repeat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔂 | `:repeat_one:` | ▶️ | `:arrow_forward:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⏩ | `:fast_forward:` | ⏭️ | `:next_track_button:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⏯️ | `:play_or_pause_button:` | ◀️ | `:arrow_backward:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⏪ | `:rewind:` | ⏮️ | `:previous_track_button:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔼 | `:arrow_up_small:` | ⏫ | `:arrow_double_up:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔽 | `:arrow_down_small:` | ⏬ | `:arrow_double_down:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⏸️ | `:pause_button:` | ⏹️ | `:stop_button:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⏺️ | `:record_button:` | ⏏️ | `:eject_button:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🎦 | `:cinema:` | 🔅 | `:low_brightness:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔆 | `:high_brightness:` | 📶 | `:signal_strength:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🛜 | `:wireless:` | 📳 | `:vibration_mode:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 📴 | `:mobile_phone_off:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Gender | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ♀️ | `:female_sign:` | ♂️ | `:male_sign:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⚧️ | `:transgender_symbol:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Math | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ✖️ | `:heavy_multiplication_x:` | ➕ | `:heavy_plus_sign:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ➖ | `:heavy_minus_sign:` | ➗ | `:heavy_division_sign:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🟰 | `:heavy_equals_sign:` | ♾️ | `:infinity:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Punctuation | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ‼️ | `:bangbang:` | ⁉️ | `:interrobang:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ❓ | `:question:` | ❔ | `:grey_question:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ❕ | `:grey_exclamation:` | ❗ | `:exclamation:` `:heavy_exclamation_mark:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 〰️ | `:wavy_dash:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Currency | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 💱 | `:currency_exchange:` | 💲 | `:heavy_dollar_sign:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Other Symbol | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⚕️ | `:medical_symbol:` | ♻️ | `:recycle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⚜️ | `:fleur_de_lis:` | 🔱 | `:trident:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 📛 | `:name_badge:` | 🔰 | `:beginner:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⭕ | `:o:` | ✅ | `:white_check_mark:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ☑️ | `:ballot_box_with_check:` | ✔️ | `:heavy_check_mark:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ❌ | `:x:` | ❎ | `:negative_squared_cross_mark:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ➰ | `:curly_loop:` | ➿ | `:loop:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 〽️ | `:part_alternation_mark:` | ✳️ | `:eight_spoked_asterisk:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ✴️ | `:eight_pointed_black_star:` | ❇️ | `:sparkle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ©️ | `:copyright:` | ®️ | `:registered:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ™️ | `:tm:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Keycap | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | #️⃣ | `:hash:` | \*️⃣ | `:asterisk:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 0️⃣ | `:zero:` | 1️⃣ | `:one:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 2️⃣ | `:two:` | 3️⃣ | `:three:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 4️⃣ | `:four:` | 5️⃣ | `:five:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 6️⃣ | `:six:` | 7️⃣ | `:seven:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 8️⃣ | `:eight:` | 9️⃣ | `:nine:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔟 | `:keycap_ten:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Alphanum | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔠 | `:capital_abcd:` | 🔡 | `:abcd:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔢 | `:1234:` | 🔣 | `:symbols:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔤 | `:abc:` | 🅰️ | `:a:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🆎 | `:ab:` | 🅱️ | `:b:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🆑 | `:cl:` | 🆒 | `:cool:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🆓 | `:free:` | ℹ️ | `:information_source:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🆔 | `:id:` | Ⓜ️ | `:m:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🆕 | `:new:` | 🆖 | `:ng:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🅾️ | `:o2:` | 🆗 | `:ok:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🅿️ | `:parking:` | 🆘 | `:sos:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🆙 | `:up:` | 🆚 | `:vs:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🈁 | `:koko:` | 🈂️ | `:sa:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🈷️ | `:u6708:` | 🈶 | `:u6709:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🈯 | `:u6307:` | 🉐 | `:ideograph_advantage:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🈹 | `:u5272:` | 🈚 | `:u7121:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🈲 | `:u7981:` | 🉑 | `:accept:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🈸 | `:u7533:` | 🈴 | `:u5408:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🈳 | `:u7a7a:` | ㊗️ | `:congratulations:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ㊙️ | `:secret:` | 🈺 | `:u55b6:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🈵 | `:u6e80:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Geometric | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔴 | `:red_circle:` | 🟠 | `:orange_circle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🟡 | `:yellow_circle:` | 🟢 | `:green_circle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔵 | `:large_blue_circle:` | 🟣 | `:purple_circle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🟤 | `:brown_circle:` | ⚫ | `:black_circle:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⚪ | `:white_circle:` | 🟥 | `:red_square:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🟧 | `:orange_square:` | 🟨 | `:yellow_square:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🟩 | `:green_square:` | 🟦 | `:blue_square:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🟪 | `:purple_square:` | 🟫 | `:brown_square:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ⬛ | `:black_large_square:` | ⬜ | `:white_large_square:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ◼️ | `:black_medium_square:` | ◻️ | `:white_medium_square:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ◾ | `:black_medium_small_square:` | ◽ | `:white_medium_small_square:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | ▪️ | `:black_small_square:` | ▫️ | `:white_small_square:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔶 | `:large_orange_diamond:` | 🔷 | `:large_blue_diamond:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔸 | `:small_orange_diamond:` | 🔹 | `:small_blue_diamond:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔺 | `:small_red_triangle:` | 🔻 | `:small_red_triangle_down:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 💠 | `:diamond_shape_with_a_dot_inside:` | 🔘 | `:radio_button:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#symbols) | 🔳 | `:white_square_button:` | 🔲 | `:black_square_button:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | Flags ----- * [Flag](https://gohugo.io/quick-reference/emojis/#flag) * [Country Flag](https://gohugo.io/quick-reference/emojis/#country-flag) * [Subdivision Flag](https://gohugo.io/quick-reference/emojis/#subdivision-flag) ### Flag | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🏁 | `:checkered_flag:` | 🚩 | `:triangular_flag_on_post:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🎌 | `:crossed_flags:` | 🏴 | `:black_flag:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🏳️ | `:white_flag:` | 🏳️‍🌈 | `:rainbow_flag:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🏳️‍⚧️ | `:transgender_flag:` | 🏴‍☠️ | `:pirate_flag:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Country Flag | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇦🇨 | `:ascension_island:` | 🇦🇩 | `:andorra:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇦🇪 | `:united_arab_emirates:` | 🇦🇫 | `:afghanistan:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇦🇬 | `:antigua_barbuda:` | 🇦🇮 | `:anguilla:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇦🇱 | `:albania:` | 🇦🇲 | `:armenia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇦🇴 | `:angola:` | 🇦🇶 | `:antarctica:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇦🇷 | `:argentina:` | 🇦🇸 | `:american_samoa:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇦🇹 | `:austria:` | 🇦🇺 | `:australia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇦🇼 | `:aruba:` | 🇦🇽 | `:aland_islands:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇦🇿 | `:azerbaijan:` | 🇧🇦 | `:bosnia_herzegovina:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇧🇧 | `:barbados:` | 🇧🇩 | `:bangladesh:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇧🇪 | `:belgium:` | 🇧🇫 | `:burkina_faso:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇧🇬 | `:bulgaria:` | 🇧🇭 | `:bahrain:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇧🇮 | `:burundi:` | 🇧🇯 | `:benin:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇧🇱 | `:st_barthelemy:` | 🇧🇲 | `:bermuda:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇧🇳 | `:brunei:` | 🇧🇴 | `:bolivia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇧🇶 | `:caribbean_netherlands:` | 🇧🇷 | `:brazil:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇧🇸 | `:bahamas:` | 🇧🇹 | `:bhutan:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇧🇻 | `:bouvet_island:` | 🇧🇼 | `:botswana:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇧🇾 | `:belarus:` | 🇧🇿 | `:belize:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇨🇦 | `:canada:` | 🇨🇨 | `:cocos_islands:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇨🇩 | `:congo_kinshasa:` | 🇨🇫 | `:central_african_republic:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇨🇬 | `:congo_brazzaville:` | 🇨🇭 | `:switzerland:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇨🇮 | `:cote_divoire:` | 🇨🇰 | `:cook_islands:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇨🇱 | `:chile:` | 🇨🇲 | `:cameroon:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇨🇳 | `:cn:` | 🇨🇴 | `:colombia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇨🇵 | `:clipperton_island:` | 🇨🇷 | `:costa_rica:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇨🇺 | `:cuba:` | 🇨🇻 | `:cape_verde:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇨🇼 | `:curacao:` | 🇨🇽 | `:christmas_island:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇨🇾 | `:cyprus:` | 🇨🇿 | `:czech_republic:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇩🇪 | `:de:` | 🇩🇬 | `:diego_garcia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇩🇯 | `:djibouti:` | 🇩🇰 | `:denmark:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇩🇲 | `:dominica:` | 🇩🇴 | `:dominican_republic:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇩🇿 | `:algeria:` | 🇪🇦 | `:ceuta_melilla:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇪🇨 | `:ecuador:` | 🇪🇪 | `:estonia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇪🇬 | `:egypt:` | 🇪🇭 | `:western_sahara:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇪🇷 | `:eritrea:` | 🇪🇸 | `:es:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇪🇹 | `:ethiopia:` | 🇪🇺 | `:eu:` `:european_union:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇫🇮 | `:finland:` | 🇫🇯 | `:fiji:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇫🇰 | `:falkland_islands:` | 🇫🇲 | `:micronesia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇫🇴 | `:faroe_islands:` | 🇫🇷 | `:fr:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇬🇦 | `:gabon:` | 🇬🇧 | `:gb:` `:uk:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇬🇩 | `:grenada:` | 🇬🇪 | `:georgia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇬🇫 | `:french_guiana:` | 🇬🇬 | `:guernsey:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇬🇭 | `:ghana:` | 🇬🇮 | `:gibraltar:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇬🇱 | `:greenland:` | 🇬🇲 | `:gambia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇬🇳 | `:guinea:` | 🇬🇵 | `:guadeloupe:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇬🇶 | `:equatorial_guinea:` | 🇬🇷 | `:greece:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇬🇸 | `:south_georgia_south_sandwich_islands:` | 🇬🇹 | `:guatemala:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇬🇺 | `:guam:` | 🇬🇼 | `:guinea_bissau:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇬🇾 | `:guyana:` | 🇭🇰 | `:hong_kong:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇭🇲 | `:heard_mcdonald_islands:` | 🇭🇳 | `:honduras:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇭🇷 | `:croatia:` | 🇭🇹 | `:haiti:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇭🇺 | `:hungary:` | 🇮🇨 | `:canary_islands:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇮🇩 | `:indonesia:` | 🇮🇪 | `:ireland:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇮🇱 | `:israel:` | 🇮🇲 | `:isle_of_man:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇮🇳 | `:india:` | 🇮🇴 | `:british_indian_ocean_territory:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇮🇶 | `:iraq:` | 🇮🇷 | `:iran:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇮🇸 | `:iceland:` | 🇮🇹 | `:it:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇯🇪 | `:jersey:` | 🇯🇲 | `:jamaica:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇯🇴 | `:jordan:` | 🇯🇵 | `:jp:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇰🇪 | `:kenya:` | 🇰🇬 | `:kyrgyzstan:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇰🇭 | `:cambodia:` | 🇰🇮 | `:kiribati:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇰🇲 | `:comoros:` | 🇰🇳 | `:st_kitts_nevis:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇰🇵 | `:north_korea:` | 🇰🇷 | `:kr:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇰🇼 | `:kuwait:` | 🇰🇾 | `:cayman_islands:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇰🇿 | `:kazakhstan:` | 🇱🇦 | `:laos:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇱🇧 | `:lebanon:` | 🇱🇨 | `:st_lucia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇱🇮 | `:liechtenstein:` | 🇱🇰 | `:sri_lanka:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇱🇷 | `:liberia:` | 🇱🇸 | `:lesotho:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇱🇹 | `:lithuania:` | 🇱🇺 | `:luxembourg:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇱🇻 | `:latvia:` | 🇱🇾 | `:libya:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇲🇦 | `:morocco:` | 🇲🇨 | `:monaco:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇲🇩 | `:moldova:` | 🇲🇪 | `:montenegro:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇲🇫 | `:st_martin:` | 🇲🇬 | `:madagascar:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇲🇭 | `:marshall_islands:` | 🇲🇰 | `:macedonia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇲🇱 | `:mali:` | 🇲🇲 | `:myanmar:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇲🇳 | `:mongolia:` | 🇲🇴 | `:macau:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇲🇵 | `:northern_mariana_islands:` | 🇲🇶 | `:martinique:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇲🇷 | `:mauritania:` | 🇲🇸 | `:montserrat:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇲🇹 | `:malta:` | 🇲🇺 | `:mauritius:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇲🇻 | `:maldives:` | 🇲🇼 | `:malawi:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇲🇽 | `:mexico:` | 🇲🇾 | `:malaysia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇲🇿 | `:mozambique:` | 🇳🇦 | `:namibia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇳🇨 | `:new_caledonia:` | 🇳🇪 | `:niger:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇳🇫 | `:norfolk_island:` | 🇳🇬 | `:nigeria:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇳🇮 | `:nicaragua:` | 🇳🇱 | `:netherlands:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇳🇴 | `:norway:` | 🇳🇵 | `:nepal:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇳🇷 | `:nauru:` | 🇳🇺 | `:niue:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇳🇿 | `:new_zealand:` | 🇴🇲 | `:oman:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇵🇦 | `:panama:` | 🇵🇪 | `:peru:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇵🇫 | `:french_polynesia:` | 🇵🇬 | `:papua_new_guinea:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇵🇭 | `:philippines:` | 🇵🇰 | `:pakistan:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇵🇱 | `:poland:` | 🇵🇲 | `:st_pierre_miquelon:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇵🇳 | `:pitcairn_islands:` | 🇵🇷 | `:puerto_rico:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇵🇸 | `:palestinian_territories:` | 🇵🇹 | `:portugal:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇵🇼 | `:palau:` | 🇵🇾 | `:paraguay:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇶🇦 | `:qatar:` | 🇷🇪 | `:reunion:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇷🇴 | `:romania:` | 🇷🇸 | `:serbia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇷🇺 | `:ru:` | 🇷🇼 | `:rwanda:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇸🇦 | `:saudi_arabia:` | 🇸🇧 | `:solomon_islands:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇸🇨 | `:seychelles:` | 🇸🇩 | `:sudan:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇸🇪 | `:sweden:` | 🇸🇬 | `:singapore:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇸🇭 | `:st_helena:` | 🇸🇮 | `:slovenia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇸🇯 | `:svalbard_jan_mayen:` | 🇸🇰 | `:slovakia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇸🇱 | `:sierra_leone:` | 🇸🇲 | `:san_marino:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇸🇳 | `:senegal:` | 🇸🇴 | `:somalia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇸🇷 | `:suriname:` | 🇸🇸 | `:south_sudan:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇸🇹 | `:sao_tome_principe:` | 🇸🇻 | `:el_salvador:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇸🇽 | `:sint_maarten:` | 🇸🇾 | `:syria:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇸🇿 | `:swaziland:` | 🇹🇦 | `:tristan_da_cunha:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇹🇨 | `:turks_caicos_islands:` | 🇹🇩 | `:chad:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇹🇫 | `:french_southern_territories:` | 🇹🇬 | `:togo:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇹🇭 | `:thailand:` | 🇹🇯 | `:tajikistan:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇹🇰 | `:tokelau:` | 🇹🇱 | `:timor_leste:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇹🇲 | `:turkmenistan:` | 🇹🇳 | `:tunisia:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇹🇴 | `:tonga:` | 🇹🇷 | `:tr:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇹🇹 | `:trinidad_tobago:` | 🇹🇻 | `:tuvalu:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇹🇼 | `:taiwan:` | 🇹🇿 | `:tanzania:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇺🇦 | `:ukraine:` | 🇺🇬 | `:uganda:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇺🇲 | `:us_outlying_islands:` | 🇺🇳 | `:united_nations:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇺🇸 | `:us:` | 🇺🇾 | `:uruguay:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇺🇿 | `:uzbekistan:` | 🇻🇦 | `:vatican_city:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇻🇨 | `:st_vincent_grenadines:` | 🇻🇪 | `:venezuela:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇻🇬 | `:british_virgin_islands:` | 🇻🇮 | `:us_virgin_islands:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇻🇳 | `:vietnam:` | 🇻🇺 | `:vanuatu:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇼🇫 | `:wallis_futuna:` | 🇼🇸 | `:samoa:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇽🇰 | `:kosovo:` | 🇾🇪 | `:yemen:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇾🇹 | `:mayotte:` | 🇿🇦 | `:south_africa:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🇿🇲 | `:zambia:` | 🇿🇼 | `:zimbabwe:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | ### Subdivision Flag | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🏴󠁧󠁢󠁥󠁮󠁧󠁿 | `:england:` | 🏴󠁧󠁢󠁳󠁣󠁴󠁿 | `:scotland:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#flags) | 🏴󠁧󠁢󠁷󠁬󠁳󠁿 | `:wales:` | | | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | GitHub Custom Emoji ------------------- | | ico | shortcode | ico | shortcode | | | --- | --- | --- | --- | --- | --- | | [top](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) | :accessibility: | `:accessibility:` | :atom: | `:atom:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) | :basecamp: | `:basecamp:` | :basecampy: | `:basecampy:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) | :bowtie: | `:bowtie:` | :dependabot: | `:dependabot:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) | :electron: | `:electron:` | :feelsgood: | `:feelsgood:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) | :finnadie: | `:finnadie:` | :fishsticks: | `:fishsticks:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) | :goberserk: | `:goberserk:` | :godmode: | `:godmode:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) | :hurtrealbad: | `:hurtrealbad:` | :neckbeard: | `:neckbeard:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) | :octocat: | `:octocat:` | :rage1: | `:rage1:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) | :rage2: | `:rage2:` | :rage3: | `:rage3:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) | :rage4: | `:rage4:` | :shipit: | `:shipit:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | | [top](https://gohugo.io/quick-reference/emojis/#github-custom-emoji) | :suspect: | `:suspect:` | :trollface: | `:trollface:` | [top](https://gohugo.io/quick-reference/emojis/#table-of-contents) | * * * Last updated: July 7, 2025 : [Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45' (079671b41)](https://github.com/gohugoio/hugoDocs/commit/079671b41b9395f2c2b48879f14d3f09d69a63dc) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/quick-reference/emojis.md) --- # Filter Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/resource/filter/](https://gohugo.io/images/qr/qr_2a5bd84bea26da6c.png) Applicable to images, applies one or more image filters to the given image resource. Syntax RESOURCE.Filter FILTER... Returns images.ImageResource Use this method with [global resources](https://gohugo.io/quick-reference/glossary/#global-resource) , [page resources](https://gohugo.io/quick-reference/glossary/#page-resource) , or [remote resources](https://gohugo.io/quick-reference/glossary/#remote-resource) . The `Filter` method returns a new resource from a [processable image](https://gohugo.io/quick-reference/glossary/#processable-image) after applying one or more [image filters](https://gohugo.io/methods/resource/filter/#image-filters) . Use the [`reflect.IsImageResourceProcessable`](https://gohugo.io/functions/reflect/isimageresourceprocessable/) function to verify that an image can be processed. Usage ----- Use the `Filter` method to apply effects such as blurring, sharpening, or grayscale conversion. You can pass a single filter or a slice of filters. When providing a slice, Hugo applies the filters from left to right. To apply a single filter: {{ with resources.Get "images/original.jpg" }} {{ with .Filter images.Grayscale }} {{ end }} {{ end }} To apply multiple filters: {{ $filters := slice images.Grayscale (images.GaussianBlur 8) }} {{ with resources.Get "images/original.jpg" }} {{ with .Filter $filters }} {{ end }} {{ end }} You can also apply image filters using the [`images.Filter`](https://gohugo.io/functions/images/filter/) function. Example ------- {{ with resources.Get "images/original.jpg" }} {{ with .Filter images.Grayscale }} {{ end }} {{ end }} Original ![Zion National Park](https://gohugo.io/images/examples/zion-national-park_hu_4668ccb5c983a9ac.jpg) Processed ![Zion National Park](https://gohugo.io/images/examples/zion-national-park_hu_50e34f4c6bd693f2.jpg) Image filters ------------- Use any of these filters with the `Filter` method. [images.AutoOrient](https://gohugo.io/functions/images/autoorient/) Returns an image filter that rotates and flips an image as needed per its Exif orientation tag. [images.Brightness](https://gohugo.io/functions/images/brightness/) Returns an image filter that changes the brightness of an image. [images.ColorBalance](https://gohugo.io/functions/images/colorbalance/) Returns an image filter that changes the color balance of an image. [images.Colorize](https://gohugo.io/functions/images/colorize/) Returns an image filter that produces a colorized version of an image. [images.Contrast](https://gohugo.io/functions/images/contrast/) Returns an image filter that changes the contrast of an image. [images.Dither](https://gohugo.io/functions/images/dither/) Returns an image filter that dithers an image. [images.Gamma](https://gohugo.io/functions/images/gamma/) Returns an image filter that performs gamma correction on an image. [images.GaussianBlur](https://gohugo.io/functions/images/gaussianblur/) Returns an image filter that applies a gaussian blur to an image. [images.Grayscale](https://gohugo.io/functions/images/grayscale/) Returns an image filter that produces a grayscale version of an image. [images.Hue](https://gohugo.io/functions/images/hue/) Returns an image filter that rotates the hue of an image. [images.Invert](https://gohugo.io/functions/images/invert/) Returns an image filter that negates the colors of an image. [images.Mask](https://gohugo.io/functions/images/mask/) Returns an image filter that applies a mask to the source image. [images.Opacity](https://gohugo.io/functions/images/opacity/) Returns an image filter that changes the opacity of an image. [images.Overlay](https://gohugo.io/functions/images/overlay/) Returns an image filter that overlays the source image at the given coordinates, relative to the upper left corner. [images.Padding](https://gohugo.io/functions/images/padding/) Returns an image filter that resizes the image canvas without resizing the image. [images.Pixelate](https://gohugo.io/functions/images/pixelate/) Returns an image filter that applies a pixelation effect to an image. [images.Process](https://gohugo.io/functions/images/process/) Returns an image filter that processes an image according to the given processing specification. [images.QR](https://gohugo.io/functions/images/qr/) Encodes the given text into a QR code using the specified options, returning an image resource. [images.Saturation](https://gohugo.io/functions/images/saturation/) Returns an image filter that changes the saturation of an image. [images.Sepia](https://gohugo.io/functions/images/sepia/) Returns an image filter that produces a sepia-toned version of an image. [images.Sigmoid](https://gohugo.io/functions/images/sigmoid/) Returns an image filter that changes the contrast of an image using a sigmoidal function. [images.Text](https://gohugo.io/functions/images/text/) Returns an image filter that adds text to an image. [images.UnsharpMask](https://gohugo.io/functions/images/unsharpmask/) Returns an image filter that sharpens an image. * * * Last updated: February 27, 2026 : [content: Miscellaneous udpates for v0.157.0 (35da1aa3c)](https://github.com/gohugoio/hugoDocs/commit/35da1aa3c2fe3b54bdb57df1a308533844af9df5) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/resource/Filter.md) --- # Glossary Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/quick-reference/glossary/](https://gohugo.io/images/qr/qr_b022508800b80dc1.png) Terms commonly used throughout the documentation. [A](https://gohugo.io/quick-reference/glossary/#action)   [B](https://gohugo.io/quick-reference/glossary/#bool)   [C](https://gohugo.io/quick-reference/glossary/#cache)   [D](https://gohugo.io/quick-reference/glossary/#default-language)   [E](https://gohugo.io/quick-reference/glossary/#element)   [F](https://gohugo.io/quick-reference/glossary/#field)   [G](https://gohugo.io/quick-reference/glossary/#glob-pattern)   [H](https://gohugo.io/quick-reference/glossary/#headless-bundle)   [I](https://gohugo.io/quick-reference/glossary/#i18n)   [K](https://gohugo.io/quick-reference/glossary/#kind)   [L](https://gohugo.io/quick-reference/glossary/#l10n)   [M](https://gohugo.io/quick-reference/glossary/#map)   [N](https://gohugo.io/quick-reference/glossary/#node)   [O](https://gohugo.io/quick-reference/glossary/#object)   [P](https://gohugo.io/quick-reference/glossary/#page-bundle)   [R](https://gohugo.io/quick-reference/glossary/#raw-string-literal)   [S](https://gohugo.io/quick-reference/glossary/#scalar)   [T](https://gohugo.io/quick-reference/glossary/#taxonomic-weight)   [U](https://gohugo.io/quick-reference/glossary/#ugly-url)   [V](https://gohugo.io/quick-reference/glossary/#variable)   [W](https://gohugo.io/quick-reference/glossary/#walk)   [Z](https://gohugo.io/quick-reference/glossary/#zero-time)   action See [_template action_](https://gohugo.io/quick-reference/glossary/#template-action) . archetype An _archetype_ is a template for new content. See [details](https://gohugo.io/content-management/archetypes/) . argument An _argument_ is a [_scalar_](https://gohugo.io/quick-reference/glossary/#scalar) , [_array_](https://gohugo.io/quick-reference/glossary/#array) , [_slice_](https://gohugo.io/quick-reference/glossary/#slice) , [_map_](https://gohugo.io/quick-reference/glossary/#map) , or [_object_](https://gohugo.io/quick-reference/glossary/#object) passed to a [_function_](https://gohugo.io/quick-reference/glossary/#function) , [_method_](https://gohugo.io/quick-reference/glossary/#method) , or [_shortcode_](https://gohugo.io/quick-reference/glossary/#shortcode) . array An _array_ is a numbered sequence of [_elements_](https://gohugo.io/quick-reference/glossary/#element) . Unlike Go’s [_slice_](https://gohugo.io/quick-reference/glossary/#slice) data type, an array has a fixed length. Elements within an array can be [_scalars_](https://gohugo.io/quick-reference/glossary/#scalar) , slices, [_maps_](https://gohugo.io/quick-reference/glossary/#map) , pages, or other arrays. See [details](https://go.dev/ref/spec#Array_types) . asset pipeline An _asset pipeline_ is a system that automates and optimizes the handling of static assets like images, stylesheets, and JavaScript files. bool See [_boolean_](https://gohugo.io/quick-reference/glossary/#boolean) . boolean A _boolean_ is a data type with two possible values, either `true` or `false`. branch bundle A _branch bundle_ is a top-level content directory or any content directory containing an `_index.md` file. Analogous to a physical branch, a branch bundle may have descendants including [_leaf bundles_](https://gohugo.io/quick-reference/glossary/#leaf-bundle) and other branch bundles. A branch bundle may also contain [_page resources_](https://gohugo.io/quick-reference/glossary/#page-resource) such as images. See [details](https://gohugo.io/content-management/page-bundles/) . build To _build_ (verb) is to generate the static files for a [_project_](https://gohugo.io/quick-reference/glossary/#project) , including HTML, images, CSS, and JavaScript. This process involves rendering templates, transforming resources, and resolving the matrix of [_language_](https://gohugo.io/quick-reference/glossary/#language) , [_role_](https://gohugo.io/quick-reference/glossary/#role) , and [_version_](https://gohugo.io/quick-reference/glossary/#version) defined in your project configuration. build artifacts The _build artifacts_ are the static files produced during the [_build_](https://gohugo.io/quick-reference/glossary/#build) process. These assets are stored in the `public` directory by default and represent the final, ready-to-deploy output of the project. bundle See [_page bundle_](https://gohugo.io/quick-reference/glossary/#page-bundle) . cache A _cache_ is a software component that stores data so that future requests for the same data are faster. canonical output format The _canonical output format_ is the [_output format_](https://gohugo.io/quick-reference/glossary/#output-format) for the current page where the format’s [`rel`](https://gohugo.io/configuration/output-formats/#rel) property is set to `canonical` in your project configuration, if such a format exists. If there is only one _output format_ for the current page, that is the _canonical output format_, regardless of whether the format’s `rel` property is set to `canonical`. By default, `html` is the only predefined _output format_ with this setting; the `rel` property for all others is set to `alternate`. If two or more _output formats_ for the current page have their `rel` property set to `canonical`, the _canonical output format_ is the first one specified in: * The [`outputs`](https://gohugo.io/configuration/outputs/#outputs-per-page) front matter field of the current page, or * The [`outputs`](https://gohugo.io/configuration/outputs/#outputs-per-page-kind) section of your project configuration for the current [_page kind_](https://gohugo.io/quick-reference/glossary/#page-kind) . chain To _chain_ (verb) is to connect one or more [_identifiers_](https://gohugo.io/quick-reference/glossary/#identifier) with a dot. An identifier can represent a [_method_](https://gohugo.io/quick-reference/glossary/#method) , [_object_](https://gohugo.io/quick-reference/glossary/#object) , or [_field_](https://gohugo.io/quick-reference/glossary/#field) . For example, `.Site.Params.author.name` or `.Date.UTC.Hour`. CI/CD The term _CI/CD_ is an abbreviation for Continuous Integration and Continuous Delivery or Continuous Deployment depending on context. Popular _CI/CD_ platforms for building and deploying Hugo sites include [Cloudflare](https://gohugo.io/host-and-deploy/host-on-cloudflare/) , [GitHub Pages](https://gohugo.io/host-and-deploy/host-on-github-pages/) , [GitLab Pages](https://gohugo.io/host-and-deploy/host-on-gitlab-pages/) , [Netlify](https://gohugo.io/host-and-deploy/host-on-netlify/) , [Render](https://gohugo.io/host-and-deploy/host-on-render/) , and [Vercel](https://gohugo.io/host-and-deploy/host-on-vercel/) . See [details](https://en.wikipedia.org/wiki/CI/CD) . CJK _CJK_ is a collective term for the Chinese, Japanese, and Korean languages. CLI _CLI_ stands for command-line interface, a text-based method for interacting with computer programs or operating systems. collection A _collection_ is an [_array_](https://gohugo.io/quick-reference/glossary/#array) , [_slice_](https://gohugo.io/quick-reference/glossary/#slice) , or [_map_](https://gohugo.io/quick-reference/glossary/#map) . component A _component_ is a collection of related files, housed within the [_unified file system_](https://gohugo.io/quick-reference/glossary/#unified-file-system) , that fulfills a specific function in building a Hugo [_project_](https://gohugo.io/quick-reference/glossary/#project) . These components are categorized into seven types: [_archetypes_](https://gohugo.io/quick-reference/glossary/#archetype) , assets, content, data, templates, [_translation tables_](https://gohugo.io/quick-reference/glossary/#translation-table) , and static files, and can be defined within the project or provided by [_modules_](https://gohugo.io/quick-reference/glossary/#module) . Each component has a dedicated directory within the unified file system: | Component | Directory within the unified file system | | --- | --- | | archetypes | `archetypes` | | assets | `assets` | | content | `content` | | data | `data` | | templates | `layouts` | | translation tables | `i18n` | | static files | `static` | content adapter A _content adapter_ is a template that dynamically creates pages when building a site. For example, use a content adapter to create pages from a remote data source such as JSON, TOML, YAML, or XML. See [details](https://gohugo.io/content-management/content-adapters/) . content dimension See [_dimension_](https://gohugo.io/quick-reference/glossary/#dimension) . content format A _content format_ is a markup language for creating content. Typically Markdown, but may also be HTML, AsciiDoc, Org, Pandoc, or reStructuredText. See [details](https://gohugo.io/content-management/formats/) . content type A _content type_ is a classification of content inferred from the top-level directory name or the `type` set in [_front matter_](https://gohugo.io/quick-reference/glossary/#front-matter) . Pages in the root of the `content` directory, including the home page, are of type “page”. The content type is a contributing factor in the template lookup order and determines which [_archetype_](https://gohugo.io/quick-reference/glossary/#archetype) template to use when creating new content. content view A _content view_ is a template called with the [`Render`](https://gohugo.io/methods/page/render/) method on a `Page` object. See [details](https://gohugo.io/templates/types/#content-view) . context Represented by a dot (`.`) within a [_template action_](https://gohugo.io/quick-reference/glossary/#template-action) , _context_ is the current location in a data structure. For example, while iterating over a [_collection_](https://gohugo.io/quick-reference/glossary/#collection) of pages, the context within each iteration is the page’s data structure. The context received by each template depends on template type and/or how it was called. See [details](https://gohugo.io/templates/introduction/#context) . default language The _default language_ is is the value defined by the [`defaultContentLanguage`](https://gohugo.io/configuration/all/#defaultcontentlanguage) setting, falling back to the first language in the project, and finally to `en`. The first language is identified by the lowest [_weight_](https://gohugo.io/quick-reference/glossary/#weight) , using lexicographical order as the final fallback if weights are tied or undefined. See also: [_language_](https://gohugo.io/quick-reference/glossary/#language) . default role The _default role_ is the value defined by the [`defaultContentRole`](https://gohugo.io/configuration/all/#defaultcontentrole) setting, falling back to the first role in the project, and finally to `guest`. The first role is identified by the lowest [_weight_](https://gohugo.io/quick-reference/glossary/#weight) , using lexicographical order as the final fallback if weights are tied or undefined. See also: [_role_](https://gohugo.io/quick-reference/glossary/#role) . default site The _default site_ is the [_site_](https://gohugo.io/quick-reference/glossary/#site) with the [_default language_](https://gohugo.io/quick-reference/glossary/#default-language) , [_default version_](https://gohugo.io/quick-reference/glossary/#default-version) , and [_default role_](https://gohugo.io/quick-reference/glossary/#default-role) . default sort order The _default sort order_ for [_page collections_](https://gohugo.io/quick-reference/glossary/#page-collection) , used when no other criteria are set, follows this priority: 1. [`weight`](https://gohugo.io/content-management/front-matter/#weight) (ascending) 2. [`date`](https://gohugo.io/content-management/front-matter/#date) (descending) 3. [`linkTitle`](https://gohugo.io/content-management/front-matter/#linktitle) falling back to [`title`](https://gohugo.io/content-management/front-matter/#title) (ascending) 4. [logical path](https://gohugo.io/quick-reference/glossary/#logical-path) (ascending) default version The _default version_ is the value defined by the [`defaultContentVersion`](https://gohugo.io/configuration/all/#defaultcontentversion) setting, falling back to the first version in the project, and finally to `v1.0.0`. The first version is identified by the lowest [_weight_](https://gohugo.io/quick-reference/glossary/#weight) , using a descending semantic sort as the final fallback if weights are tied or undefined. See also: [_version_](https://gohugo.io/quick-reference/glossary/#version) . dependency graph A _dependency graph_ visually represents the relationships between the [_modules_](https://gohugo.io/quick-reference/glossary/#module) used in a Hugo project. It shows how modules depend on each other, forming a network of dependencies. dimension A _dimension_ is a categorized axis of content variation that allows multiple variations of a logical page to exist simultaneously. The three dimensions are [_language_](https://gohugo.io/quick-reference/glossary/#language) , [_role_](https://gohugo.io/quick-reference/glossary/#role) , and [_version_](https://gohugo.io/quick-reference/glossary/#version) . For example, a logical page may exist in 6 languages, 4 versions, and 2 roles. duration A _duration_ is a data type that represent a length of time, expressed using units such as seconds (represented by `s`), minutes (represented by `m`), and hours (represented by `h`). For example, `42s` means 42 seconds, `6m7s` means 6 minutes and 7 seconds, and `6h7m42s` means 6 hours, 7 minutes, and 42 seconds. element An _element_ is a member of a [_slice_](https://gohugo.io/quick-reference/glossary/#slice) or [_array_](https://gohugo.io/quick-reference/glossary/#array) . embedded template An _embedded template_ is a built-in component within the Hugo application. This includes features like [_partials_](https://gohugo.io/quick-reference/glossary/#partial) , [_shortcodes_](https://gohugo.io/quick-reference/glossary/#shortcode) , and [_render hooks_](https://gohugo.io/quick-reference/glossary/#render-hook) that provide pre-defined structures or functionalities for creating website content. environment Typically one of `development`, `staging`, or `production`, each _environment_ may exhibit different behavior depending on configuration and template logic. For example, in a production environment you might minify and fingerprint CSS, but that probably doesn’t make sense in a development environment. When running the built-in development server with the `hugo server` command, the environment is set to `development`. When building your project with the `hugo build` command, the environment is set to `production`. To override the environment value, use the `--environment` command line flag or the `HUGO_ENVIRONMENT` environment variable. To determine the current environment within a template, use the [`hugo.Environment`](https://gohugo.io/functions/hugo/environment/) function. field A _field_ is a predefined key-value pair in front matter such as `date` or `title`. flag A _flag_ is an option passed to a command-line program, beginning with one or two hyphens. See [details](https://gohugo.io/commands/hugo/) . float See [floating point](https://gohugo.io/quick-reference/glossary/#floating-point) . floating point The term _floating point_ refers to a numeric data type with a fractional component. For example, `3.14159`. fragment A _fragment_ is the final segment of a URL, beginning with a hash (`#`) mark, that references an `id` attribute of an HTML element on the page. front matter The term _front matter_ refers to the metadata at the beginning of each content page, separated from the content by format-specific delimiters. See [details](https://gohugo.io/content-management/front-matter/) . function Used within a [_template action_](https://gohugo.io/quick-reference/glossary/#template-action) , a _function_ takes one or more [_arguments_](https://gohugo.io/quick-reference/glossary/#argument) and returns a value. Unlike [_methods_](https://gohugo.io/quick-reference/glossary/#method) , functions are not associated with an [_object_](https://gohugo.io/quick-reference/glossary/#object) . See [details](https://gohugo.io/functions/) . glob pattern A _glob pattern_ is a pattern used to match sets of values. It is a shorthand for specifying multiple targets at once, making it easier to work with groups of data or configurations. See [details](https://gohugo.io/quick-reference/glob-patterns/) . glob slice A _glob slice_ is a [_slice_](https://gohugo.io/quick-reference/glossary/#slice) of [_glob patterns_](https://gohugo.io/quick-reference/glossary/#glob-pattern) . Within the _slice_, a _glob_ can be negated by prefixing it with an exclamation mark (`!`) and one space. Matches in negated patterns short-circuit the evaluation of the rest of the _slice_, and are useful for early coarse grained exclusions. The following example illustrates how to use _glob slices_ to define a [_sites matrix_](https://gohugo.io/quick-reference/glossary/#sites-matrix) in your project configuration: [sites.matrix] languages = [ "! no", "**" ] versions = [ "! v1.2.3", "v1.*.*", "v2.*.*" ] roles = [ "{member, guest}" ] The `versions` example above evaluates as: `(not v1.2.3) AND (v1.*.* OR v2.*.*)`. global resource A _global resource_ is file within the `assets` directory, or within any directory mounted to the `assets` directory. headless bundle A _headless bundle_ is an unpublished [_leaf bundle_](https://gohugo.io/quick-reference/glossary/#leaf-bundle) or an unpublished [_branch bundle_](https://gohugo.io/quick-reference/glossary/#branch-bundle) whose content and resources you can include in other pages. See [details](https://gohugo.io/content-management/build-options/) . i18n See [_internationalization_](https://gohugo.io/quick-reference/glossary/#internationalization) . IANA _IANA_ is an abbreviation for the Internet Assigned Numbers Authority, a non-profit organization that manages the allocation of global IP addresses, autonomous system numbers, DNS root zone, media types, and other Internet Protocol-related resources. See [details](https://www.iana.org/about) . identifier An _identifier_ is a string that represents a variable, method, object, or field. It must conform to Go’s [language specification](https://go.dev/ref/spec#Identifiers) , beginning with a letter or underscore, followed by zero or more letters, digits, or underscores. int See [_integer_](https://gohugo.io/quick-reference/glossary/#integer) . integer An _integer_ is a numeric data type without a fractional component. For example, `42`. internationalization The term _internationalization_ refers to software design and development efforts that enable [_localization_](https://gohugo.io/quick-reference/glossary/#localization) . interpreted string literal An _interpreted string literal_ is a character sequence between double quotes, as in `"foo"`. Within the quotes, any character may appear except a newline and an unescaped double quote. The text between the quotes forms the value of the literal, with backslash escapes interpreted. See [details](https://go.dev/ref/spec#String_literals) . interval An [_interval_](https://en.wikipedia.org/wiki/Interval_(mathematics)) is a range of numbers between two endpoints: closed, open, or half-open. * A _closed interval_, denoted by brackets, includes its endpoints. For example, \[0, 1\] is the interval where `0 <= x <= 1`. * An _open interval_, denoted by parentheses, excludes its endpoints. For example, (0, 1) is the interval where `0 < x < 1`. * A _half-open interval_ includes only one of its endpoints. For example, (0, 1\] is the _left-open_ interval where `0 < x <= 1`, while \[0, 1) is the _right-open_ interval where `0 <= x < 1`.\ \ \ kind\ \ See [_page kind_](https://gohugo.io/quick-reference/glossary/#page-kind)\ .\ \ l10n\ \ See [_localization_](https://gohugo.io/quick-reference/glossary/#localization)\ .\ \ language\ \ A _language_ is a [_dimension_](https://gohugo.io/quick-reference/glossary/#dimension)\ that facilitates the localization and internationalization of content. While [_version_](https://gohugo.io/quick-reference/glossary/#version)\ focuses on lifecycle and [_role_](https://gohugo.io/quick-reference/glossary/#role)\ focuses on audience, the language dimension allows a logical page to be represented in different locales across the project.\ \ See also: [_default language_](https://gohugo.io/quick-reference/glossary/#default-language)\ .\ \ layout\ \ See [_template_](https://gohugo.io/quick-reference/glossary/#template)\ .\ \ leaf bundle\ \ A _leaf bundle_ is a directory that contains an `index.md` file and zero or more [_resources_](https://gohugo.io/quick-reference/glossary/#resource)\ . Analogous to a physical leaf, a leaf bundle is at the end of a [_branch bundle_](https://gohugo.io/quick-reference/glossary/#branch-bundle)\ . It has no descendants.\ \ See [details](https://gohugo.io/content-management/page-bundles/)\ .\ \ lexer\ \ A _lexer_ is a software component that identifies keywords, identifiers, operators, numbers, and other basic building blocks of a programming language within the input text.\ \ list page\ \ A list page is any [_page kind_](https://gohugo.io/quick-reference/glossary/#page-kind)\ that receives a page [_collection_](https://gohugo.io/quick-reference/glossary/#collection)\ in [_context_](https://gohugo.io/quick-reference/glossary/#context)\ . This includes the home page, [_section pages_](https://gohugo.io/quick-reference/glossary/#section-page)\ , [_taxonomy pages_](https://gohugo.io/quick-reference/glossary/#taxonomy-page)\ , and [_term pages_](https://gohugo.io/quick-reference/glossary/#term-page)\ .\ \ localization\ \ The term _localization_ refers to the process of adapting a site to meet language and regional requirements. This includes translations, date formats, number formats, currency formats, and collation order.\ \ See [details](https://gohugo.io/content-management/multilingual/)\ .\ \ logical path\ \ A _logical path_ is a page or page resource identifier derived from the file path, excluding its extension and language identifier. This value is neither a file path nor a URL. Starting with a file path relative to the `content` directory, Hugo determines the logical path by stripping the file extension and language identifier, converting to lower case, then replacing spaces with hyphens. Path segments are separated with a slash (`/`).\ \ See [details](https://gohugo.io/methods/page/path/#examples)\ .\ \ map\ \ A _map_ is an unordered group of elements, each indexed by a unique key.\ \ See [details](https://go.dev/ref/spec#Map_types)\ .\ \ Markdown attribute\ \ A _Markdown attribute_ is a key-value pair attached to a Markdown element. These attributes are commonly used to add HTML attributes, like `class` and `id`, to the element when it’s rendered into HTML. They provide a way to extend the basic Markdown syntax and add more semantic meaning or styling hooks to your content.\ \ See [details](https://gohugo.io/content-management/markdown-attributes/)\ .\ \ marshal\ \ To _marshal_ (verb) is to transform a data structure into a serialized object. For example, transforming a [_map_](https://gohugo.io/quick-reference/glossary/#map)\ into a JSON string.\ \ See [details](https://gohugo.io/functions/transform/remarshal/)\ .\ \ media type\ \ A _media type_ (formerly known as a MIME type) is a two-part identifier for file formats and transmitted content. For example, the media type for JSON data is `application/json`.\ \ See [details](https://gohugo.io/configuration/media-types/)\ .\ \ method\ \ Used within a [_template action_](https://gohugo.io/quick-reference/glossary/#template-action)\ and associated with an [_object_](https://gohugo.io/quick-reference/glossary/#object)\ , a _method_ takes zero or more [_arguments_](https://gohugo.io/quick-reference/glossary/#argument)\ and either returns a value or performs an action. For example, `IsHome` is a method on a `Page` object which returns `true` if the current page is the home page. See also [_function_](https://gohugo.io/quick-reference/glossary/#function)\ .\ \ module\ \ A _module_ is a packaged combination of [_components_](https://gohugo.io/quick-reference/glossary/#component)\ which may include [_archetypes_](https://gohugo.io/quick-reference/glossary/#archetype)\ , assets, content, data, templates, [_translation tables_](https://gohugo.io/quick-reference/glossary/#translation-table)\ , and static files. A module may be a [_theme_](https://gohugo.io/quick-reference/glossary/#theme)\ , a complete project, or a smaller collection of one or more components.\ \ mount\ \ A _mount_ is a configuration object that maps a file system path (source) to a [_component_](https://gohugo.io/quick-reference/glossary/#component)\ path (target) within Hugo’s [_unified file system_](https://gohugo.io/quick-reference/glossary/#unified-file-system)\ .\ \ See [details](https://gohugo.io/configuration/module/)\ .\ \ node\ \ A _node_ is a class of [_page kinds_](https://gohugo.io/quick-reference/glossary/#page-kind)\ including `home`, `section`, `taxonomy`, and `term`.\ \ noop\ \ An abbreviated form of “no operation”, a _noop_ is a statement that does nothing.\ \ object\ \ An _object_ is a data structure with or without associated [_methods_](https://gohugo.io/quick-reference/glossary/#method)\ .\ \ ordered taxonomy\ \ Created by invoking the [`Alphabetical`](https://gohugo.io/methods/taxonomy/alphabetical/)\ or [`ByCount`](https://gohugo.io/methods/taxonomy/bycount/)\ method on a [`Taxonomy`](https://gohugo.io/quick-reference/glossary/#taxonomy)\ object, which is a [_map_](https://gohugo.io/quick-reference/glossary/#map)\ , an _ordered taxonomy_ is a [_slice_](https://gohugo.io/quick-reference/glossary/#slice)\ , where each element is an object that contains the [_term_](https://gohugo.io/quick-reference/glossary/#term)\ and a slice of its [_weighted pages_](https://gohugo.io/quick-reference/glossary/#weighted-page)\ .\ \ output format\ \ An _output format_ is a collection of settings that defines how Hugo renders a file when building a site. For example, `html`, `json`, and `rss` are built-in output formats. You can create multiple output formats and control their generation based on [_page kind_](https://gohugo.io/quick-reference/glossary/#page-kind)\ , or by enabling one or more output formats for specific pages.\ \ See [details](https://gohugo.io/configuration/output-formats/)\ .\ \ page bundle\ \ A _page bundle_ is a directory that encapsulates both content and associated [_resources_](https://gohugo.io/quick-reference/glossary/#resource)\ . There are two types of page bundles: [_leaf bundles_](https://gohugo.io/quick-reference/glossary/#leaf-bundle)\ and [_branch bundles_](https://gohugo.io/quick-reference/glossary/#branch-bundle)\ .\ \ See [details](https://gohugo.io/content-management/page-bundles/)\ .\ \ page collection\ \ A _page collection_ is a slice of `Page` objects.\ \ page kind\ \ A _page kind_ is a classification of pages, one of `home`, `page`, `section`, `taxonomy`, or `term`.\ \ See [details](https://gohugo.io/methods/page/kind/)\ .\ \ page resource\ \ A _page resource_ is a file within a [_page bundle_](https://gohugo.io/quick-reference/glossary/#page-bundle)\ .\ \ page-relative\ \ A _page-relative_ path is resolved relative to the current page’s location in the content hierarchy. These paths do not begin with a leading slash. Examples include `old-name`, `./old-name`, and `../old-name`.\ \ See also: [_site-relative_](https://gohugo.io/quick-reference/glossary/#site-relative)\ , [_server-relative_](https://gohugo.io/quick-reference/glossary/#server-relative)\ .\ \ pager\ \ Created during [_pagination_](https://gohugo.io/quick-reference/glossary/#pagination)\ , a _pager_ contains a subset of a list page and navigation links to other pagers.\ \ paginate\ \ To _paginate_ (verb) is to split a list page into two or more subsets.\ \ pagination\ \ The term _pagination_ refers to the process of [_paginating_](https://gohugo.io/quick-reference/glossary/#paginate)\ a list page.\ \ See [details](https://gohugo.io/templates/pagination/)\ .\ \ paginator\ \ A _paginator_ is a collection of [_pagers_](https://gohugo.io/quick-reference/glossary/#pager)\ .\ \ parameter\ \ A _parameter_ is typically a user-defined key-value pair at the site or page level, but may also refer to a configuration setting or an [_argument_](https://gohugo.io/quick-reference/glossary/#argument)\ .\ \ partial\ \ A _partial_ is a [_template_](https://gohugo.io/quick-reference/glossary/#template)\ called from any other template including [_shortcodes_](https://gohugo.io/quick-reference/glossary/#shortcode)\ , [render hooks](https://gohugo.io/quick-reference/glossary/#render-hook)\ , and other partials. A partial either renders something or returns something. A partial can also call itself, for example, to [_walk_](https://gohugo.io/quick-reference/glossary/#walk)\ a data structure.\ \ partial decorator\ \ A _partial decorator_ is specific type of [_partial_](https://gohugo.io/quick-reference/glossary/#partial)\ that functions as a [_wrapper component_](https://gohugo.io/quick-reference/glossary/#wrapper-component)\ . While a standard partial simply renders data within a fixed template, a decorator uses composition to enclose an entire block of content. It utilizes the [`templates.Inner`](https://gohugo.io/functions/templates/inner/)\ function as a placeholder to define exactly where that external content should be injected within the wrapper’s layout.\ \ See [details](https://gohugo.io/templates/partial-decorators/)\ .\ \ permalink\ \ A _permalink_ is the absolute URL of a published resource or a rendered page, including scheme and host.\ \ pipe\ \ See [_pipeline_](https://gohugo.io/quick-reference/glossary/#pipeline)\ .\ \ pipeline\ \ Within a [_template action_](https://gohugo.io/quick-reference/glossary/#template-action)\ , a _pipeline_ is a possibly chained sequence of values, [_function_](https://gohugo.io/quick-reference/glossary/#function)\ calls, or [_method_](https://gohugo.io/quick-reference/glossary/#method)\ calls. Functions and methods in the pipeline may take multiple [_arguments_](https://gohugo.io/quick-reference/glossary/#argument)\ .\ \ A pipeline may be chained by separating a sequence of commands with pipeline characters (`|`). In a chained pipeline, the result of each command is passed as the last argument to the following command. The output of the final command in the pipeline is the value of the pipeline.\ \ pretty URL\ \ A _pretty URL_ is a URL that does not include a file extension.\ \ primary output format\ \ A _primary output format_ defines the default URL returned by the [`Permalink`](https://gohugo.io/methods/page/permalink/)\ and [`RelPermalink`](https://gohugo.io/methods/page/relpermalink/)\ methods for a given [_page kind_](https://gohugo.io/quick-reference/glossary/#page-kind)\ . It is specified as the first entry within the [outputs configuration](https://gohugo.io/configuration/outputs/)\ for that page kind.\ \ processable image\ \ A _processable image_ is an image file characterized by one of the following [_media types_](https://gohugo.io/quick-reference/glossary/#media-type)\ :\ \ * `image/bmp`\ * `image/gif`\ * `image/jpeg`\ * `image/png`\ * `image/tiff`\ * `image/webp`\ \ Hugo can decode and encode these image formats, allowing you to use any of the [resource methods](https://gohugo.io/methods/resource/)\ applicable to images such as `Width`, `Height`, `Crop`, `Fill`, `Fit`, `Filter`, `Process`, `Resize`, etc.\ \ Use the [`reflect.IsImageResourceProcessable`](https://gohugo.io/functions/reflect/isimageresourceprocessable/)\ function to determine if an image can be processed.\ \ project\ \ A _project_ is a collection of [_components_](https://gohugo.io/quick-reference/glossary/#component)\ used to generate one or more [sites](https://gohugo.io/quick-reference/glossary/#site)\ . While a project may consist of only a single site, Hugo allows a single project to generate a matrix of sites based on [_language_](https://gohugo.io/quick-reference/glossary/#language)\ , [role](https://gohugo.io/quick-reference/glossary/#role)\ , and [_version_](https://gohugo.io/quick-reference/glossary/#version)\ . The project serves as the parent container for the common assets and logic used across all sites within the build.\ \ publish\ \ See [_build_](https://gohugo.io/quick-reference/glossary/#build)\ .\ \ raw string literal\ \ A _raw string literal_ is a character sequence between backticks, as in `` `bar` ``. Within the backticks, any character may appear except a backtick. Backslashes have no special meaning and the string may contain newlines. Carriage return characters (`\r`) inside raw string literals are discarded from the raw string value.\ \ See [details](https://go.dev/ref/spec#String_literals)\ .\ \ regular expression\ \ A _regular expression_, also known as a _regex_, is a sequence of characters that defines a search pattern. Use the [RE2 syntax](https://github.com/google/re2/wiki/syntax)\ when defining regular expressions in your templates or in your project configuration.\ \ regular page\ \ A _regular page_ is a page with the “page” [_page kind_](https://gohugo.io/quick-reference/glossary/#page-kind)\ . See also [_section page_](https://gohugo.io/quick-reference/glossary/#section-page)\ .\ \ relative permalink\ \ A _relative permalink_ is the host-relative URL of a published resource or a rendered page.\ \ remote resource\ \ A _remote resource_ is a file on a remote server, accessible via HTTP or HTTPS.\ \ render hook\ \ A _render hook_ is a [_template_](https://gohugo.io/quick-reference/glossary/#template)\ that overrides standard Markdown rendering.\ \ See [details](https://gohugo.io/render-hooks/)\ .\ \ resource\ \ A _resource_ is any file consumed by the build process to augment or generate content, structure, behavior, or presentation. For example: images, videos, content snippets, CSS, Sass, JavaScript, and data.\ \ Hugo supports three types of resources: [_global resources_](https://gohugo.io/quick-reference/glossary/#global-resource)\ , [_page resources_](https://gohugo.io/quick-reference/glossary/#page-resource)\ , and [_remote resources_](https://gohugo.io/quick-reference/glossary/#remote-resource)\ .\ \ resource type\ \ A _resource type_ is the main type of a resource’s [_media type_](https://gohugo.io/quick-reference/glossary/#media-type)\ . Content files such as Markdown, HTML, AsciiDoc, Pandoc, reStructuredText, and Emacs Org Mode have resource type `page`. Other resource types include `image`, `text`, `video`, and others. Retrieve the resource type using the [`ResourceType`](https://gohugo.io/methods/resource/resourcetype/)\ method on a `Resource` object.\ \ role\ \ A _role_ is a [_dimension_](https://gohugo.io/quick-reference/glossary/#dimension)\ that allows a logical page to be served in different forms depending on the target audience. While [_language_](https://gohugo.io/quick-reference/glossary/#language)\ focuses on localization and [_version_](https://gohugo.io/quick-reference/glossary/#version)\ focuses on lifecycle, the role dimension allows a project to generate variations of a page without duplicating content.\ \ See also: [_default role_](https://gohugo.io/quick-reference/glossary/#default-role)\ .\ \ rune\ \ A _rune_ is a way to represent a single character as a number. In Hugo and Go, text is stored as a sequence of bytes. However, while a basic letter like `x` uses only one byte, a single character such as the German `ü` is made up of multiple bytes. A _rune_ represents the entire character as one single value, no matter how many bytes it takes to store it.\ \ Technically, a _rune_ is just another name for a 32-bit [_integer_](https://gohugo.io/quick-reference/glossary/#integer)\ . It stores the Unicode [code point](https://en.wikipedia.org/wiki/Code_point)\ , which is the official number assigned to that specific character.\ \ When you want to manipulate text character-by-character rather than by raw data size, you are working with _runes_. You write a _rune_ in a [_template_](https://gohugo.io/quick-reference/glossary/#template)\ using a [_rune literal_](https://gohugo.io/quick-reference/glossary/#rune-literal)\ , such as `'x'`, `'\n'`, or `'ü'`.\ \ rune literal\ \ A _rune literal_ is the textual representation of a [_rune_](https://gohugo.io/quick-reference/glossary/#rune)\ within a [_template_](https://gohugo.io/quick-reference/glossary/#template)\ . It consists of a character sequence enclosed in single quotes, such as `'x'`, `'\n'`, or `'ü'`.\ \ Unlike [_interpreted string literals_](https://gohugo.io/quick-reference/glossary/#interpreted-string-literal)\ or [_raw string literals_](https://gohugo.io/quick-reference/glossary/#raw-string-literal)\ , which represent a sequence of characters, a _rune literal_ represents a single [_integer_](https://gohugo.io/quick-reference/glossary/#integer)\ value identifying a Unicode [code point](https://en.wikipedia.org/wiki/Code_point)\ . Within the quotes, any character may appear except a newline or an unescaped single quote. Multi-character sequences starting with a backslash (`\`) can be used to encode specific values, such as `\n` for a newline or `\u00FC` for the letter `ü`.\ \ See [details](https://go.dev/ref/spec#Rune_literals)\ .\ \ scalar\ \ A _scalar_ is a single value, one of [_string_](https://gohugo.io/quick-reference/glossary/#string)\ , [_integer_](https://gohugo.io/quick-reference/glossary/#integer)\ , [floating point](https://gohugo.io/quick-reference/glossary/#floating-point)\ , or [_boolean_](https://gohugo.io/quick-reference/glossary/#boolean)\ .\ \ scope\ \ The term _scope_ refers to the specific region of code where a [_variable_](https://gohugo.io/quick-reference/glossary/#variable)\ or [_object_](https://gohugo.io/quick-reference/glossary/#object)\ is accessible. For example, a variable initialized in one [_template_](https://gohugo.io/quick-reference/glossary/#template)\ is not available within another.\ \ scratch pad\ \ Conceptually, a _scratch pad_ is a [_map_](https://gohugo.io/quick-reference/glossary/#map)\ with [_methods_](https://gohugo.io/quick-reference/glossary/#method)\ to set, get, update, and delete values. Attach the data structure to a `Page` or `Site` object using the [`Store`](https://gohugo.io/methods/page/store/)\ method, or create a locally scoped scratch pad using the [`newScratch`](https://gohugo.io/functions/collections/newscratch/)\ function.\ \ section\ \ A _section_ is a top-level content directory or any content directory containing an `_index.md` file.\ \ section page\ \ A _section page_ is a page with the “section” [_page kind_](https://gohugo.io/quick-reference/glossary/#page-kind)\ . Typically a listing of [_regular pages_](https://gohugo.io/quick-reference/glossary/#regular-page)\ and/or other section pages within the current [_section_](https://gohugo.io/quick-reference/glossary/#section)\ .\ \ seed\ \ A _seed_ is the starting point for a computer algorithm that generates pseudo-random numbers. Using the same seed will always produce the identical sequence of numbers, which is essential for reproducibility in areas like simulations, cryptography, and video games.\ \ See [details](https://en.wikipedia.org/wiki/Random_seed)\ .\ \ segment\ \ A _segment_ is a subset of a site, filtered by [_logical path_](https://gohugo.io/quick-reference/glossary/#logical-path)\ , [_sites matrix_](https://gohugo.io/quick-reference/glossary/#sites-matrix)\ , [_page kind_](https://gohugo.io/quick-reference/glossary/#page-kind)\ , or [_output format_](https://gohugo.io/quick-reference/glossary/#output-format)\ .\ \ See [details](https://gohugo.io/configuration/segments/)\ .\ \ server-relative\ \ A _server-relative_ path is the final path from the web server’s root, used in the generated site. These paths always begin with a leading slash and account for the [`baseURL`](https://gohugo.io/configuration/all/#baseurl)\ and [_content dimension_](https://gohugo.io/quick-reference/glossary/#content-dimension)\ prefixes such as language, [_role_](https://gohugo.io/quick-reference/glossary/#role)\ , or version. For example, `/en/examples/old-name/` is a server-relative path.\ \ See also: [_page-relative_](https://gohugo.io/quick-reference/glossary/#page-relative)\ , [_site-relative_](https://gohugo.io/quick-reference/glossary/#site-relative)\ .\ \ shortcode\ \ A _shortcode_ is a [_template_](https://gohugo.io/quick-reference/glossary/#template)\ invoked within markup, accepting any number of [_arguments_](https://gohugo.io/quick-reference/glossary/#argument)\ . They can be used with any [_content format_](https://gohugo.io/quick-reference/glossary/#content-format)\ to insert elements such as videos, images, and social media embeds into your content.\ \ See [details](https://gohugo.io/content-management/shortcodes/)\ .\ \ site\ \ A _site_ is a specific instance of your [_project_](https://gohugo.io/quick-reference/glossary/#project)\ representing a unique combination of [_language_](https://gohugo.io/quick-reference/glossary/#language)\ , [_role_](https://gohugo.io/quick-reference/glossary/#role)\ , and [_version_](https://gohugo.io/quick-reference/glossary/#version)\ . While a simple project may consist of only a single site, Hugo’s multidimensional content model allows a single codebase to generate a matrix of sites simultaneously.\ \ site root\ \ The _site root_ is the root directory of the current [_site_](https://gohugo.io/quick-reference/glossary/#site)\ , relative to the [`publishDir`](https://gohugo.io/configuration/all/#publishdir)\ . The _site root_ may include one or more content [_dimension_](https://gohugo.io/quick-reference/glossary/#dimension)\ prefixes, such as [_language_](https://gohugo.io/quick-reference/glossary/#language)\ , [_role_](https://gohugo.io/quick-reference/glossary/#role)\ , or [_version_](https://gohugo.io/quick-reference/glossary/#version)\ .\ \ | Project description | Site root examples | |\ | --- | --- | --- |\ | Monolingual | `/`, `/guest`, `/guest/v1.2.3` | |\ | Multilingual single-host | `/en`, `/guest/en`, `/guest/v1.2.3/en` | |\ | Multilingual multihost | `/en`, `/en/guest`, `/en/guest/v1.2.3` | |\ \ site-relative\ \ A _site-relative_ path is resolved relative to the root of the content directory. These paths begin with a leading slash. For example, `/old-name` is a site-relative path.\ \ See also: [_page-relative_](https://gohugo.io/quick-reference/glossary/#page-relative)\ , [_server-relative_](https://gohugo.io/quick-reference/glossary/#server-relative)\ .\ \ sites complements\ \ A _sites complements_ is a configuration object defined in content front matter or a file mount. The links will point to the complementary [_sites_](https://gohugo.io/quick-reference/glossary/#site)\ . The configuration is structured as a map of [_glob slices_](https://gohugo.io/quick-reference/glossary/#glob-slice)\ .\ \ sites matrix\ \ A _sites matrix_ is a configuration object defined in content front matter or a file mount to precisely control which [_sites_](https://gohugo.io/quick-reference/glossary/#site)\ the content should be generated for. When defined in a file mount for templates, it controls which sites the template will be applied to. In Hugo multidimensional content model, the matrix defines the intersection of three dimensions: [_language_](https://gohugo.io/quick-reference/glossary/#language)\ , [_role_](https://gohugo.io/quick-reference/glossary/#role)\ , and [_version_](https://gohugo.io/quick-reference/glossary/#version)\ . The configuration is structured as a map of [_glob slices_](https://gohugo.io/quick-reference/glossary/#glob-slice)\ .\ \ See also [_sites complements_](https://gohugo.io/quick-reference/glossary/#sites-complements)\ , [front matter: sites](https://gohugo.io/content-management/front-matter/#sites)\ , [module mounts: sites](https://gohugo.io/configuration/module/#sites)\ , and [segments: sites](https://gohugo.io/configuration/segments/#sites)\ .\ \ slice\ \ A _slice_ is a numbered sequence of elements. Unlike Go’s [_array_](https://gohugo.io/quick-reference/glossary/#array)\ data type, slices are dynamically sized. [_Elements_](https://gohugo.io/quick-reference/glossary/#element)\ within a slice can be [_scalars_](https://gohugo.io/quick-reference/glossary/#scalar)\ , [_arrays_](https://gohugo.io/quick-reference/glossary/#array)\ , [_maps_](https://gohugo.io/quick-reference/glossary/#map)\ , pages, or other slices.\ \ See [details](https://go.dev/ref/spec#Slice_types)\ .\ \ string\ \ A _string_ is a sequence of bytes. For example, `"What is 6 times 7?"`.\ \ taxonomic weight\ \ Defined in front matter and unique to each taxonomy, a _taxonomic weight_ is a [_weight_](https://gohugo.io/quick-reference/glossary/#weight)\ that determines the sort order of page collections contained within a [`Taxonomy`](https://gohugo.io/quick-reference/glossary/#taxonomy)\ object.\ \ See [details](https://gohugo.io/content-management/taxonomies/#taxonomic-weight)\ .\ \ taxonomy\ \ A _taxonomy_ is a group of related [_terms_](https://gohugo.io/quick-reference/glossary/#term)\ used to classify content. For example, a “colors” taxonomy might include the terms “red”, “green”, and “blue”.\ \ See [details](https://gohugo.io/content-management/taxonomies/)\ .\ \ taxonomy object\ \ A _taxonomy object_ is a [_map_](https://gohugo.io/quick-reference/glossary/#map)\ of [_terms_](https://gohugo.io/quick-reference/glossary/#term)\ and the [_weighted pages_](https://gohugo.io/quick-reference/glossary/#weighted-page)\ associated with each term.\ \ taxonomy page\ \ A _taxonomy page_ is a page with the “taxonomy” [_page kind_](https://gohugo.io/quick-reference/glossary/#page-kind)\ . Typically a listing of [_terms_](https://gohugo.io/quick-reference/glossary/#term)\ within a given [_taxonomy_](https://gohugo.io/quick-reference/glossary/#taxonomy)\ .\ \ template\ \ A _template_ is a file with [_template actions_](https://gohugo.io/quick-reference/glossary/#template-action)\ , located within the `layouts` directory of a project, theme, or module.\ \ See [details](https://gohugo.io/templates/)\ .\ \ template action\ \ A data evaluation or control structure within a [_template_](https://gohugo.io/quick-reference/glossary/#template)\ , delimited by `{{` and `}}`.\ \ See [details](https://pkg.go.dev/text/template#hdr-Actions)\ .\ \ term\ \ A _term_ is a member of a [_taxonomy_](https://gohugo.io/quick-reference/glossary/#taxonomy)\ , used to classify content.\ \ See [details](https://gohugo.io/content-management/taxonomies/)\ .\ \ term page\ \ A _term page_ is a page with the “term” [_page kind_](https://gohugo.io/quick-reference/glossary/#page-kind)\ . Typically a listing of [_regular pages_](https://gohugo.io/quick-reference/glossary/#regular-page)\ and [_section pages_](https://gohugo.io/quick-reference/glossary/#section-page)\ with a given [_term_](https://gohugo.io/quick-reference/glossary/#term)\ .\ \ theme\ \ A _theme_ is a [_module_](https://gohugo.io/quick-reference/glossary/#module)\ that delivers a complete set of [_components_](https://gohugo.io/quick-reference/glossary/#component)\ defining a site’s layout, presentation, and behavior. While every theme is a module, not every module is a theme.\ \ token\ \ A _token_ is an identifier within a format string, beginning with a colon and replaced with a value when rendered. For example, use tokens in format strings for both [permalinks](https://gohugo.io/content-management/urls/#permalinks)\ and [dates](https://gohugo.io/functions/time/format/#localization)\ .\ \ translation table\ \ A _translation table_ is a data file within the `i18n` directory, holding translations for a single language.\ \ type\ \ See [_content type_](https://gohugo.io/quick-reference/glossary/#content-type)\ .\ \ ugly URL\ \ An _ugly URL_ is a URL that includes a file extension.\ \ unified file system\ \ Hugo’s _unified file system_ provides a layered view for each of its seven [_component_](https://gohugo.io/quick-reference/glossary/#component)\ types: [_archetypes_](https://gohugo.io/quick-reference/glossary/#archetype)\ , assets, content, data, templates, [_translation tables_](https://gohugo.io/quick-reference/glossary/#translation-table)\ , and static files. Project component directories are layered over [_module_](https://gohugo.io/quick-reference/glossary/#module)\ component directories. Hugo searches these layers in order to locate files.\ \ unmarshal\ \ To _unmarshal_ (verb) is to transform a serialized object into a data structure. For example, transforming a JSON file into a [_map_](https://gohugo.io/quick-reference/glossary/#map)\ that you can access within a template.\ \ See [details](https://gohugo.io/functions/transform/unmarshal/)\ .\ \ UTC\ \ _UTC_ is an abbreviation for Coordinated Universal Time, the primary time standard used worldwide to regulate clocks and time. It is the basis for civil time and time zones across the globe.\ \ See [details](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\ .\ \ variable\ \ A _variable_ is a user-defined [_identifier_](https://gohugo.io/quick-reference/glossary/#identifier)\ prepended with a `$` symbol, representing a value of any data type, initialized or assigned within a [_template action_](https://gohugo.io/quick-reference/glossary/#template-action)\ . For example, `$foo` and `$bar` are variables.\ \ vendor\ \ To _vendor_ (verb) in a software context is the process of including the source code of third-party dependencies directly within your own project’s repository, rather than downloading them on the fly from an external package manager.\ \ When you are asked to “vendor the dependencies into the project root,” you are being told to move those external libraries from a temporary cache into a dedicated folder that gets committed to your version control system.\ \ version\ \ A _version_ is a [_dimension_](https://gohugo.io/quick-reference/glossary/#dimension)\ that represents a specific iteration, release, or lifecycle stage of content. While [_language_](https://gohugo.io/quick-reference/glossary/#language)\ focuses on localization and [_role_](https://gohugo.io/quick-reference/glossary/#role)\ focuses on audience, the version dimension allows you to maintain multiple states of the same content simultaneously using [semantic versioning](https://semver.org/)\ .\ \ See also: [_default version_](https://gohugo.io/quick-reference/glossary/#default-version)\ .\ \ walk\ \ To _walk_ (verb) is to recursively traverse a nested data structure. For example, rendering a multilevel menu.\ \ weight\ \ A _weight_ is a numeric value used to position an element within a sorted [_collection_](https://gohugo.io/quick-reference/glossary/#collection)\ . Assign weights using non-zero integers. Lighter items float to the top, while heavier items sink to the bottom. Unweighted or zero-weighted elements are placed at the end of the collection. Weights are typically assigned to pages, menu entries, languages, [_roles_](https://gohugo.io/quick-reference/glossary/#role)\ , versions, and output formats.\ \ weighted page\ \ Contained within a [_taxonomy object_](https://gohugo.io/quick-reference/glossary/#taxonomy-object)\ , a _weighted page_ is a [_map_](https://gohugo.io/quick-reference/glossary/#map)\ with two [_elements_](https://gohugo.io/quick-reference/glossary/#element)\ : a `Page` object, and its [_taxonomic weight_](https://gohugo.io/quick-reference/glossary/#taxonomic-weight)\ as defined in front matter. Access the elements using the `Page` and `Weight` keys.\ \ workspace\ \ A _workspace_ is a collection of [_modules_](https://gohugo.io/quick-reference/glossary/#module)\ on disk.\ \ See [details](https://gohugo.io/hugo-modules/use-modules/#workspace)\ .\ \ wrapper component\ \ A _wrapper component_ is an interface pattern that encloses other content through composition rather than fixed parameters. It provides a reusable shell to handle layout, styling, or logic, allowing the calling template to inject arbitrary content into the component’s interior.\ \ See also: [_partial decorator_](https://gohugo.io/quick-reference/glossary/#partial-decorator)\ .\ \ zero time\ \ The _zero time_ is January 1, 0001, 00:00:00 UTC. Formatted per [RFC3339](https://www.rfc-editor.org/rfc/rfc3339)\ the _zero time_ is 0001-01-01T00:00:00-00:00.\ \ * * *\ \ Last updated: July 7, 2025 : [Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45' (079671b41)](https://github.com/gohugoio/hugoDocs/commit/079671b41b9395f2c2b48879f14d3f09d69a63dc)\ \ [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/quick-reference/glossary/_index.md) --- # AllTranslations Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/alltranslations/](https://gohugo.io/images/qr/qr_4fc85659e07697b8.png) Returns all translations of the given page, including the current language, sorted by language weight then language name. Syntax PAGE.AllTranslations Returns page.Pages With this project configuration: defaultContentLanguage: en languages: de: contentDir: content/de languageCode: de-DE languageName: Deutsch weight: 2 en: contentDir: content/en languageCode: en-US languageName: English weight: 1 fr: contentDir: content/fr languageCode: fr-FR languageName: Français weight: 3 defaultContentLanguage = 'en' [languages] [languages.de] contentDir = 'content/de' languageCode = 'de-DE' languageName = 'Deutsch' weight = 2 [languages.en] contentDir = 'content/en' languageCode = 'en-US' languageName = 'English' weight = 1 [languages.fr] contentDir = 'content/fr' languageCode = 'fr-FR' languageName = 'Français' weight = 3 { "defaultContentLanguage": "en", "languages": { "de": { "contentDir": "content/de", "languageCode": "de-DE", "languageName": "Deutsch", "weight": 2 }, "en": { "contentDir": "content/en", "languageCode": "en-US", "languageName": "English", "weight": 1 }, "fr": { "contentDir": "content/fr", "languageCode": "fr-FR", "languageName": "Français", "weight": 3 } } } And this content: content/ ├── de/ │ ├── books/ │ │ ├── book-1.md │ │ └── book-2.md │ └── _index.md ├── en/ │ ├── books/ │ │ ├── book-1.md │ │ └── book-2.md │ └── _index.md ├── fr/ │ ├── books/ │ │ └── book-1.md │ └── _index.md └── _index.md And this template: {{ with .AllTranslations }} {{ end }} Hugo will render this list on the “Book 1” page of each site: On the “Book 2” page of the English and German sites, Hugo will render this: * * * Last updated: March 6, 2026 : [content: Clarify page collection sort order (9297bb6fa)](https://github.com/gohugoio/hugoDocs/commit/9297bb6fa03c888357127a048fd4c559573b5ffb) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/AllTranslations.md) --- # AlternativeOutputFormats Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/alternativeoutputformats/](https://gohugo.io/images/qr/qr_8d9ee24ba2bcd999.png) Returns a slice of OutputFormat objects, excluding the current output format, each representing one of the output formats enabled for the given page. Syntax PAGE.AlternativeOutputFormats Returns page.OutputFormats An _output format_ is a collection of settings that defines how Hugo renders a file when building a site. For example, `html`, `json`, and `rss` are built-in output formats. You can create multiple output formats and control their generation based on [_page kind_](https://gohugo.io/quick-reference/glossary/#page-kind) , or by enabling one or more output formats for specific pages. The `AlternativeOutputFormats` method on a `Page` object returns a slice of `OutputFormat` objects, excluding the current output format, each representing one of the output formats enabled for the given page. See [details](https://gohugo.io/configuration/output-formats/) . For example, to generate a `link` element for each of the alternative output formats: {{ range .AlternativeOutputFormats }} {{ printf "" .Rel .MediaType.Type .Permalink | safeHTML }} {{ end }} Hugo renders this to something like: * * * Last updated: February 14, 2026 : [Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' (3e2f98235)](https://github.com/gohugoio/hugoDocs/commit/3e2f9823554f16b7b5a9a815b30c9c1fdbc7281b) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/AlternativeOutputFormats.md) --- # Ancestors Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/ancestors/](https://gohugo.io/images/qr/qr_e091aa1d825932c4.png) Returns a collection of Page objects, one for each ancestor section of the given page. Syntax PAGE.Ancestors Returns page.Pages With this content structure: content/ ├── auctions/ │ ├── 2023-11/ │ │ ├── _index.md <-- front matter: weight = 202311 │ │ ├── auction-1.md │ │ └── auction-2.md │ ├── 2023-12/ │ │ ├── _index.md <-- front matter: weight = 202312 │ │ ├── auction-3.md │ │ └── auction-4.md │ ├── _index.md <-- front matter: weight = 30 │ ├── bidding.md │ └── payment.md ├── books/ │ ├── _index.md <-- front matter: weight = 10 │ ├── book-1.md │ └── book-2.md ├── films/ │ ├── _index.md <-- front matter: weight = 20 │ ├── film-1.md │ └── film-2.md └── _index.md And this template: {{ range .Ancestors }} {{ .LinkTitle }} {{ end }} On the November 2023 auctions page, Hugo renders: Auctions in November 2023 Auctions Home In the example above, notice that Hugo orders the ancestors from closest to furthest. This makes breadcrumb navigation simple: With some CSS, the code above renders something like this, where each breadcrumb links to its page: Home > Auctions > Auctions in November 2023 > Auction 1 * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/Ancestors.md) --- # Aliases Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/aliases/](https://gohugo.io/images/qr/qr_e3b285e3e61971af.png) Returns the aliases defined in front matter as server-relative URLs, resolved according to the current content dimension. Syntax PAGE.Aliases Returns \[\]string The `Aliases` method on a `Page` object returns the values defined in the [`aliases`](https://gohugo.io/content-management/front-matter/#aliases) front matter field as server-relative URLs, resolved according to the current [content dimension](https://gohugo.io/quick-reference/glossary/#content-dimension) . The `Aliases` method is useful for generating a `_redirects` file, which contains a source URL, a target URL, and an HTTP status code for each alias. You can use a `_redirects` file with hosting services such as Cloudflare, GitLab Pages, and Netlify. Redirects --------- By default, Hugo handles aliases by creating individual HTML files for each alias path. These files contain a `meta http-equiv="refresh"` tag to redirect the visitor via the browser. While functional, generating a single `_redirects` file allows your hosting provider to handle redirects at the server level. This is more efficient than client-side redirection and improves performance by eliminating the need to load a middle-man HTML page. You can use the same general approach to generate an `.htaccess` file. Example ------- The following example demonstrates how to configure your site and create a template to automate the generation of a `_redirects` file. ### Content structure The content structure for this multilingual example looks like this: content/ ├── examples/ │ ├── a.de.md aliases = ['a-old'] │ ├── a.en.md aliases = ['a-old', 'a-older'] │ ├── b.de.md aliases = ['b-old'] │ └── b.en.md aliases = ['b-old', 'b-older'] └── _index.md In the example above, the aliases are [page-relative](https://gohugo.io/quick-reference/glossary/#page-relative) . To specify a [site-relative](https://gohugo.io/quick-reference/glossary/#site-relative) path, preface the entry with a slash (`/`). Both forms are resolved to [server-relative](https://gohugo.io/quick-reference/glossary/#server-relative) paths. Page-relative paths can also include directory traversal: | Path type | File path | Alias | Server-relative path | | --- | --- | --- | --- | | page-relative | `content/examples/a.en.md` | `a-old` | `/en/examples/a-old/` | | page-relative | `content/examples/a.en.md` | `../a-old` | `/en/a-old/` | | site-relative | `content/examples/a.en.md` | `/a-old` | `/en/a-old/` | ### Project configuration To implement this, you must update your project configuration to: 1. Disable the generation of default HTML redirect files by setting `disableAliases` to `true`. 2. Define a [media type](https://gohugo.io/configuration/media-types/) named `text/redirects` to handle the file format. 3. Define a custom [output format](https://gohugo.io/configuration/output-formats/) named `redirects` to set the filename to `_redirects` and place it at the root of the published site. 4. Configure the home page [outputs](https://gohugo.io/configuration/outputs/) to include the `redirects` format in addition to `html`. baseURL: https://example.org/ defaultContentLanguage: en defaultContentLanguageInSubdir: true disableAliases: true languages: de: languageCode: de-DE languageDirection: ltr languageName: Deutsch title: My Site in German weight: 2 en: languageCode: en-US languageDirection: ltr languageName: English title: My Site in English weight: 1 mediaTypes: text/redirects: delimiter: '' outputFormats: redirects: baseName: _redirects isPlainText: true mediaType: text/redirects root: true outputs: home: - html - redirects baseURL = 'https://example.org/' defaultContentLanguage = 'en' defaultContentLanguageInSubdir = true disableAliases = true [languages] [languages.de] languageCode = 'de-DE' languageDirection = 'ltr' languageName = 'Deutsch' title = 'My Site in German' weight = 2 [languages.en] languageCode = 'en-US' languageDirection = 'ltr' languageName = 'English' title = 'My Site in English' weight = 1 [mediaTypes] [mediaTypes.'text/redirects'] delimiter = '' [outputFormats] [outputFormats.redirects] baseName = '_redirects' isPlainText = true mediaType = 'text/redirects' root = true [outputs] home = ['html', 'redirects'] { "baseURL": "https://example.org/", "defaultContentLanguage": "en", "defaultContentLanguageInSubdir": true, "disableAliases": true, "languages": { "de": { "languageCode": "de-DE", "languageDirection": "ltr", "languageName": "Deutsch", "title": "My Site in German", "weight": 2 }, "en": { "languageCode": "en-US", "languageDirection": "ltr", "languageName": "English", "title": "My Site in English", "weight": 1 } }, "mediaTypes": { "text/redirects": { "delimiter": "" } }, "outputFormats": { "redirects": { "baseName": "_redirects", "isPlainText": true, "mediaType": "text/redirects", "root": true } }, "outputs": { "home": [\ "html",\ "redirects"\ ] } } ### Template implementation Next, create a home page template specifically for the `redirects` output format. The following template iterates through every page in every language and extracts its aliases. To ensure the resulting `_redirects` file is valid, the template uses the [`strings.FindRE`](https://gohugo.io/functions/strings/findre/) function to check for whitespace such as tabs or newlines within the alias string. If whitespace is detected, Hugo will throw an error and fail the build to prevent generating an invalid file. layouts/home.redirects {{- if site.IsDefault -}} {{- range hugo.Sites -}} {{- range $p := .Pages -}} {{- range .Aliases -}} {{- if findRE `\s` . -}} {{- errorf "One of the front matter aliases in %q contains whitespace" $p.String -}} {{- end -}} {{- printf "%s %s 301\n" . $p.RelPermalink -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} ### Generated output Once Hugo processes the template, it produces a clean list of redirect rules. Each line follows the required format: the source URL, the destination URL, and the HTTP status code. The resulting `_redirects` file looks like this: /de/examples/a-old /de/examples/a/ 301 /de/examples/b-old /de/examples/b/ 301 /en/examples/b-old /en/examples/b/ 301 /en/examples/b-older /en/examples/b/ 301 /en/examples/a-old /en/examples/a/ 301 /en/examples/a-older /en/examples/a/ 301 * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/Aliases.md) --- # Front matter Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/content-management/front-matter/](https://gohugo.io/images/qr/qr_86253fcc0370d71a.png) Use front matter to add metadata to your content. Overview -------- The front matter at the top of each content file is metadata that: * Describes the content * Augments the content * Establishes relationships with other content * Controls the published structure of your site * Determines template selection Provide front matter using a serialization format, one of [JSON](https://www.json.org/) , [TOML](https://toml.io/) , or [YAML](https://yaml.org/) . Hugo determines the front matter format by examining the delimiters that separate the front matter from the page content. See examples of front matter delimiters by toggling between the serialization formats below. --- date: 2024-02-02T04:14:54-08:00 draft: false params: author: John Smith title: Example weight: 10 --- +++ date = 2024-02-02T04:14:54-08:00 draft = false title = 'Example' weight = 10 [params] author = 'John Smith' +++ { "date": "2024-02-02T04:14:54-08:00", "draft": false, "params": { "author": "John Smith" }, "title": "Example", "weight": 10 } Front matter fields may be [boolean](https://gohugo.io/quick-reference/glossary/#boolean) , [integer](https://gohugo.io/quick-reference/glossary/#integer) , [float](https://gohugo.io/quick-reference/glossary/#float) , [string](https://gohugo.io/quick-reference/glossary/#string) , [arrays](https://gohugo.io/quick-reference/glossary/#array) , or [maps](https://gohugo.io/quick-reference/glossary/#map) . Note that the TOML format also supports unquoted date/time values. Fields ------ The most common front matter fields are `date`, `draft`, `title`, and `weight`, but you can specify metadata using any of fields below. The field names below are reserved. For example, you cannot create a custom field named `type`. Create custom fields under the `params` key. See the [parameters](https://gohugo.io/content-management/front-matter/#parameters) section for details. aliases (`[]string`) An array of one or more [page-relative](https://gohugo.io/quick-reference/glossary/#page-relative) or [site-relative](https://gohugo.io/quick-reference/glossary/#site-relative) paths that should redirect to the current page. Hugo resolves these to [server-relative](https://gohugo.io/quick-reference/glossary/#server-relative) URLs during the build process. Access these values from a template using the [`Aliases`](https://gohugo.io/methods/page/aliases/) method on a `Page` object. See the [aliases](https://gohugo.io/content-management/urls/#aliases) section for details. build (`map`) A map of [build options](https://gohugo.io/content-management/build-options/) . cascade (`map`) A map (or a slice of maps) of front matter keys whose values are passed down to the page’s descendants unless overwritten by self or a closer ancestor’s cascade. See the [cascade](https://gohugo.io/content-management/front-matter/#cascade-1) section for details. date (`string`) The date associated with the page, typically the creation date. Note that the TOML format also supports unquoted date/time values. See the [dates](https://gohugo.io/content-management/front-matter/#dates) section for examples. Access this value from a template using the [`Date`](https://gohugo.io/methods/page/date/) method on a `Page` object. description (`string`) Conceptually different than the page `summary`, the description is typically rendered within a `meta` element within the `head` element of the published HTML file. Access this value from a template using the [`Description`](https://gohugo.io/methods/page/description/) method on a `Page` object. draft (`bool`) Whether to disable rendering unless you pass the `--buildDrafts` flag to the `hugo` command. Access this value from a template using the [`Draft`](https://gohugo.io/methods/page/draft/) method on a `Page` object. expiryDate (`string`) The page expiration date. On or after the expiration date, the page will not be rendered unless you pass the `--buildExpired` flag to the `hugo` command. Note that the TOML format also supports unquoted date/time values. See the [dates](https://gohugo.io/content-management/front-matter/#dates) section for examples. Access this value from a template using the [`ExpiryDate`](https://gohugo.io/methods/page/expirydate/) method on a `Page` object. headless (`bool`) Applicable to [leaf bundles](https://gohugo.io/content-management/page-bundles/#leaf-bundles) , whether to set the `render` and `list` [build options](https://gohugo.io/content-management/build-options/) to `never`, creating a headless bundle of [page resources](https://gohugo.io/content-management/page-resources/#metadata) . isCJKLanguage (`bool`) Whether the content language is in the [CJK](https://gohugo.io/quick-reference/glossary/#cjk) family. This value determines how Hugo calculates word count, and affects the values returned by the [`WordCount`](https://gohugo.io/methods/page/wordcount/) , [`FuzzyWordCount`](https://gohugo.io/methods/page/wordcount/) , [`ReadingTime`](https://gohugo.io/methods/page/readingtime/) , and [`Summary`](https://gohugo.io/methods/page/summary/) methods on a `Page` object. keywords (`[]string`) An array of keywords, typically rendered within a `meta` element within the `head` element of the published HTML file, or used as a [taxonomy](https://gohugo.io/quick-reference/glossary/#taxonomy) to classify content. Access these values from a template using the [`Keywords`](https://gohugo.io/methods/page/keywords/) method on a `Page` object. lastmod (`string`) The date that the page was last modified. Note that the TOML format also supports unquoted date/time values. See the [dates](https://gohugo.io/content-management/front-matter/#dates) section for examples. Access this value from a template using the [`Lastmod`](https://gohugo.io/methods/page/date/) method on a `Page` object. layout (`string`) Provide a template name to [target a specific template](https://gohugo.io/templates/lookup-order/#target-a-template) , overriding the default [template lookup order](https://gohugo.io/templates/lookup-order/) . Set the value to the base file name of the template, excluding its extension. Access this value from a template using the [`Layout`](https://gohugo.io/methods/page/layout/) method on a `Page` object. linkTitle (`string`) Typically a shorter version of the `title`. Access this value from a template using the [`LinkTitle`](https://gohugo.io/methods/page/linktitle/) method on a `Page` object. markup (`string`) An identifier corresponding to one of the supported [content formats](https://gohugo.io/content-management/formats/#classification) . If not provided, Hugo determines the content renderer based on the file extension. menus (`string`, `[]string`, or `map`) If set, Hugo adds the page to the given menu or menus. See the [menus](https://gohugo.io/content-management/menus/#define-in-front-matter) page for details. modified Alias to [lastmod](https://gohugo.io/content-management/front-matter/#lastmod) . outputs (`[]string`) The [output formats](https://gohugo.io/configuration/output-formats/) to render. See [configure outputs](https://gohugo.io/configuration/outputs/#outputs-per-page) for more information. params (`map`) A map of custom [page parameters](https://gohugo.io/content-management/front-matter/#parameters) . pubdate Alias to [publishDate](https://gohugo.io/content-management/front-matter/#publishdate) . publishDate (`string`) The page publication date. Before the publication date, the page will not be rendered unless you pass the `--buildFuture` flag to the `hugo` command. Note that the TOML format also supports unquoted date/time values. See the [dates](https://gohugo.io/content-management/front-matter/#dates) section for examples. Access this value from a template using the [`PublishDate`](https://gohugo.io/methods/page/publishdate/) method on a `Page` object. published Alias to [publishDate](https://gohugo.io/content-management/front-matter/#publishdate) . resources (`map array`) An array of maps to provide metadata for [page resources](https://gohugo.io/content-management/page-resources/#metadata) . sitemap (`map`) A map of sitemap options. See the [sitemap templates](https://gohugo.io/templates/sitemap/) page for details. Access these values from a template using the [`Sitemap`](https://gohugo.io/methods/page/sitemap/) method on a `Page` object. sites [New in v0.153.0](https://github.com/gohugoio/hugo/releases/tag/v0.153.0) (`map`) A map to define [sites matrix](https://gohugo.io/quick-reference/glossary/#sites-matrix) and [sites complements](https://gohugo.io/quick-reference/glossary/#sites-complements) for the page. --- sites: complements: versions: - v3.*.* matrix: languages: - en - fr roles: - '**' versions: - v1.2.* - v2.*.* title: Home --- +++ title = 'Home' [sites] [sites.complements] versions = ['v3.*.*'] [sites.matrix] languages = ['en', 'fr'] roles = ['**'] versions = ['v1.2.*', 'v2.*.*'] +++ { "sites": { "complements": { "versions": [\ "v3.*.*"\ ] }, "matrix": { "languages": [\ "en",\ "fr"\ ], "roles": [\ "**"\ ], "versions": [\ "v1.2.*",\ "v2.*.*"\ ] } }, "title": "Home" } slug (`string`) Overrides the last segment of the URL path. Not applicable to `home`, `section`, `taxonomy`, or `term` pages. See the [URL management](https://gohugo.io/content-management/urls/#slug) page for details. Access this value from a template using the [`Slug`](https://gohugo.io/methods/page/slug/) method on a `Page` object. summary (`string`) Conceptually different than the page `description`, the summary either summarizes the content or serves as a teaser to encourage readers to visit the page. Access this value from a template using the [`Summary`](https://gohugo.io/methods/page/summary/) method on a `Page` object. title (`string`) The page title. Access this value from a template using the [`Title`](https://gohugo.io/methods/page/title/) method on a `Page` object. translationKey (`string`) An arbitrary value used to relate two or more translations of the same page, useful when the translated pages do not share a common path. Access this value from a template using the [`TranslationKey`](https://gohugo.io/methods/page/translationkey/) method on a `Page` object. type (`string`) The [content type](https://gohugo.io/quick-reference/glossary/#content-type) , overriding the value derived from the top-level section in which the page resides. Access this value from a template using the [`Type`](https://gohugo.io/methods/page/type/) method on a `Page` object. unpublishdate Alias to [expirydate](https://gohugo.io/content-management/front-matter/#expirydate) . url (`string`) Overrides the entire URL path. Applicable to regular pages and section pages. See the [URL management](https://gohugo.io/content-management/urls/#slug) page for details. weight (`int`) The page [weight](https://gohugo.io/quick-reference/glossary/#weight) , used to order the page within a [page collection](https://gohugo.io/quick-reference/glossary/#page-collection) . Access this value from a template using the [`Weight`](https://gohugo.io/methods/page/weight/) method on a `Page` object. Parameters ---------- Specify custom page parameters under the `params` key in front matter: --- date: 2024-02-02T04:14:54-08:00 draft: false params: author: John Smith title: Example weight: 10 --- +++ date = 2024-02-02T04:14:54-08:00 draft = false title = 'Example' weight = 10 [params] author = 'John Smith' +++ { "date": "2024-02-02T04:14:54-08:00", "draft": false, "params": { "author": "John Smith" }, "title": "Example", "weight": 10 } Access these values from a template using the [`Params`](https://gohugo.io/methods/page/params/) or [`Param`](https://gohugo.io/methods/page/param/) method on a `Page` object. Hugo provides [embedded templates](https://gohugo.io/templates/embedded/) to optionally insert meta data within the `head` element of your rendered pages. These embedded templates expect the following front matter parameters: | Parameter | Data type | Used by these embedded templates | | --- | --- | --- | | `audio` | `[]string` | [`opengraph.html`](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/opengraph.html) | | `images` | `[]string` | [`opengraph.html`](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/opengraph.html)
    , [`schema.html`](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/schema.html)
    , [`twitter_cards.html`](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/twitter_cards.html) | | `videos` | `[]string` | [`opengraph.html`](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_partials/opengraph.html) | The embedded templates will skip a parameter if not provided in front matter, but will throw an error if the data type is unexpected. Taxonomies ---------- Classify content by adding taxonomy terms to front matter. For example, with this project configuration: taxonomies: genre: genres tag: tags [taxonomies] genre = 'genres' tag = 'tags' { "taxonomies": { "genre": "genres", "tag": "tags" } } Add taxonomy terms as shown below: --- date: 2024-02-02T04:14:54-08:00 draft: false genres: - mystery - romance params: author: John Smith tags: - red - blue title: Example weight: 10 --- +++ date = 2024-02-02T04:14:54-08:00 draft = false genres = ['mystery', 'romance'] tags = ['red', 'blue'] title = 'Example' weight = 10 [params] author = 'John Smith' +++ { "date": "2024-02-02T04:14:54-08:00", "draft": false, "genres": [\ "mystery",\ "romance"\ ], "params": { "author": "John Smith" }, "tags": [\ "red",\ "blue"\ ], "title": "Example", "weight": 10 } You can add taxonomy terms to the front matter of any these [page kinds](https://gohugo.io/quick-reference/glossary/#page-kind) : * `home` * `page` * `section` * `taxonomy` * `term` Access taxonomy terms from a template using the [`Params`](https://gohugo.io/methods/page/params/) or [`GetTerms`](https://gohugo.io/methods/page/getterms/) method on a `Page` object. For example: layouts/page.html {{ with .GetTerms "tags" }}

    Tags

    {{ end }} Cascade ------- A [node](https://gohugo.io/quick-reference/glossary/#node) can cascade front matter values to its descendants. However, this cascading will be prevented if the descendant already defines the field, or if a closer ancestor node has already cascaded a value for that same field. For example, to cascade a “color” parameter from the home page to all its descendants: --- cascade: params: color: red title: Home --- +++ title = 'Home' [cascade] [cascade.params] color = 'red' +++ { "cascade": { "params": { "color": "red" } }, "title": "Home" } [New in v0.153.0](https://github.com/gohugoio/hugo/releases/tag/v0.153.0) From Hugo 0.153.0, you can also set the [sites](https://gohugo.io/content-management/front-matter/#sites) front matter as cascade front matter values, which means that you can e.g. apply one or more languages to the `target` pages. ### Target The `target`[1](https://gohugo.io/content-management/front-matter/#fn:1) keyword allows you to target specific pages or [environments](https://gohugo.io/quick-reference/glossary/#environment) . For example, to cascade a “color” parameter from the home page only to pages within the “articles” section, including the “articles” section page itself: --- cascade: params: color: red target: path: '{/articles,/articles/**}' sites: matrix: languages: - en - fr title: Home --- +++ title = 'Home' [cascade] [cascade.params] color = 'red' [cascade.target] path = '{/articles,/articles/**}' [cascade.target.sites] [cascade.target.sites.matrix] languages = ['en', 'fr'] +++ { "cascade": { "params": { "color": "red" }, "target": { "path": "{/articles,/articles/**}", "sites": { "matrix": { "languages": [\ "en",\ "fr"\ ] } } } }, "title": "Home" } Use any combination of these keywords to target pages and/or environments: environment (`string`) A [glob pattern](https://gohugo.io/quick-reference/glossary/#glob-pattern) matching the build [environment](https://gohugo.io/quick-reference/glossary/#environment) . For example: `{staging,production}`. kind (`string`) A [glob pattern](https://gohugo.io/quick-reference/glossary/#glob-pattern) matching the [page kind](https://gohugo.io/quick-reference/glossary/#page-kind) . For example: `{taxonomy,term}`. path (`string`) A [glob pattern](https://gohugo.io/quick-reference/glossary/#glob-pattern) matching the page’s [logical path](https://gohugo.io/quick-reference/glossary/#logical-path) . For example: `{/books,/books/**}`. sites [New in v0.153.0](https://github.com/gohugoio/hugo/releases/tag/v0.153.0) (`map`) A map to define [sites matrix](https://gohugo.io/quick-reference/glossary/#sites-matrix) for the target, as in: Which sites should receive the cascaded values. ### Array Define an array of cascade parameters to apply different values to different targets. For example: --- cascade: - params: color: red target: kind: page path: '{/books/**}' - params: color: blue target: kind: page path: '{/films/**}' title: Home --- +++ title = 'Home' [[cascade]] [cascade.params] color = 'red' [cascade.target] kind = 'page' path = '{/books/**}' [[cascade]] [cascade.params] color = 'blue' [cascade.target] kind = 'page' path = '{/films/**}' +++ { "cascade": [\ {\ "params": {\ "color": "red"\ },\ "target": {\ "kind": "page",\ "path": "{/books/**}"\ }\ },\ {\ "params": {\ "color": "blue"\ },\ "target": {\ "kind": "page",\ "path": "{/films/**}"\ }\ }\ ], "title": "Home" } For multilingual projects, defining cascade values in your project configuration is often more efficient. This avoids repeating the same cascade values on the home, section, taxonomy, or term page for each language. See [details](https://gohugo.io/configuration/cascade/) . If you choose to define cascade values in front matter for a multilingual project, you must create a corresponding home, section, taxonomy, or term page for every language. Emacs Org Mode -------------- If your [content format](https://gohugo.io/content-management/formats/) is [Emacs Org Mode](https://orgmode.org/) , you may provide front matter using Org Mode keywords. For example: content/example.org #+TITLE: Example #+DATE: 2024-02-02T04:14:54-08:00 #+DRAFT: false #+AUTHOR: John Smith #+GENRES: mystery #+GENRES: romance #+TAGS: red #+TAGS: blue #+WEIGHT: 10 Note that you can also specify array elements on a single line: content/example.org #+TAGS[]: red blue Dates ----- When populating a date field, whether a [custom page parameter](https://gohugo.io/content-management/front-matter/#parameters) or one of the four predefined fields ([`date`](https://gohugo.io/content-management/front-matter/#date) , [`expiryDate`](https://gohugo.io/content-management/front-matter/#expirydate) , [`lastmod`](https://gohugo.io/content-management/front-matter/#lastmod) , [`publishDate`](https://gohugo.io/content-management/front-matter/#publishdate) ), use one of these parsable formats: | Format | Time zone | | --- | --- | | `2023-10-15T13:18:50-07:00` | `America/Los_Angeles` | | `2023-10-15T13:18:50-0700` | `America/Los_Angeles` | | `2023-10-15T13:18:50Z` | `Etc/UTC` | | `2023-10-15T13:18:50` | Default is `Etc/UTC` | | `2023-10-15` | Default is `Etc/UTC` | | `15 Oct 2023` | Default is `Etc/UTC` | The last three examples are not fully qualified, and default to the `Etc/UTC` time zone. To override the default time zone, set the [`timeZone`](https://gohugo.io/configuration/all/#timezone) in your project configuration. The order of precedence for determining the time zone is: 1. The time zone offset in the date/time string 2. The time zone specified in your project configuration 3. The `Etc/UTC` time zone * * * 1. The `_target` alias for `target` is deprecated and will be removed in a future release. [↩︎](https://gohugo.io/content-management/front-matter/#fnref:1) * * * Last updated: February 26, 2026 : [content: More site-to-project changes (05b69f84e)](https://github.com/gohugoio/hugoDocs/commit/05b69f84e25e9cdd10ed1ac7ce5d37d4ac0b3725) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/content-management/front-matter.md) --- # BundleType Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/bundletype/](https://gohugo.io/images/qr/qr_339f70323f69a3e3.png) Returns the bundle type of the given page, or an empty string if the page is not a page bundle. Syntax PAGE.BundleType Returns string A page bundle is a directory that encapsulates both content and associated [resources](https://gohugo.io/quick-reference/glossary/#resource) . There are two types of page bundles: [leaf bundles](https://gohugo.io/quick-reference/glossary/#leaf-bundle) and [branch bundles](https://gohugo.io/quick-reference/glossary/#branch-bundle) . See [details](https://gohugo.io/content-management/page-bundles/) . The `BundleType` method on a `Page` object returns `branch` for branch bundles, `leaf` for leaf bundles, and an empty string if the page is not a page bundle. content/ ├── films/ │ ├── film-1/ │ │ ├── a.jpg │ │ └── index.md <-- leaf bundle │ ├── _index.md <-- branch bundle │ ├── b.jpg │ ├── film-2.md │ └── film-3.md └── _index.md <-- branch bundle To get the value within a template: {{ .BundleType }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/BundleType.md) --- # CodeOwners Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/codeowners/](https://gohugo.io/images/qr/qr_b27b89cdc1e6ddca.png) Returns of slice of code owners for the given page, derived from the CODEOWNERS file in the root of the project directory. Syntax PAGE.CodeOwners Returns \[\]string GitHub and GitLab support CODEOWNERS files. This file specifies the users responsible for developing and maintaining software and documentation. This definition can apply to the entire repository, specific directories, or to individual files. To learn more: * [GitHub CODEOWNERS documentation](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) * [GitLab CODEOWNERS documentation](https://docs.gitlab.com/ee/user/project/code_owners.html) Use the `CodeOwners` method on a `Page` object to determine the code owners for the given page. To use the `CodeOwners` method you must enable access to your local Git repository: enableGitInfo: true enableGitInfo = true { "enableGitInfo": true } Consider this project structure: my-project/ ├── content/ │ ├── books/ │ │ └── les-miserables.md │ └── films/ │ └── the-hunchback-of-notre-dame.md └── CODEOWNERS And this CODEOWNERS file: * @jdoe /content/books/ @tjones /content/films/ @mrichards @rsmith The table below shows the slice of code owners returned for each file: | Path | Code owners | | --- | --- | | `books/les-miserables.md` | `[@tjones]` | | `films/the-hunchback-of-notre-dame.md` | `[@mrichards @rsmith]` | Render the code owners for each content page: {{ range .CodeOwners }} {{ . }} {{ end }} Combine this method with [`resources.GetRemote`](https://gohugo.io/functions/resources/getremote/) to retrieve names and avatars from your Git provider by querying their API. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/CodeOwners.md) --- # Content Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/content/](https://gohugo.io/images/qr/qr_3ea354838ddc18cc.png) Returns the rendered content of the given page. Syntax PAGE.Content Returns template.HTML The `Content` method on a `Page` object renders Markdown and shortcodes to HTML. {{ .Content }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/Content.md) --- # ContentWithoutSummary Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/contentwithoutsummary/](https://gohugo.io/images/qr/qr_c35a8973d357db3b.png) Returns the rendered content of the given page, excluding the content summary. Syntax PAGE.ContentWithoutSummary Returns template.HTML [New in v0.134.0](https://github.com/gohugoio/hugo/releases/tag/v0.134.0) Applicable when using manual or automatic [content summaries](https://gohugo.io/content-management/summaries/#manual-summary) , the `ContentWithoutSummary` method on a `Page` object renders Markdown and shortcodes to HTML, excluding the content summary from the result. {{ .ContentWithoutSummary }} The `ContentWithoutSummary` method returns the same as `Content` if you define the content summary in front matter. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/ContentWithoutSummary.md) --- # CurrentSection Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/currentsection/](https://gohugo.io/images/qr/qr_8069602dbf0d85b0.png) Returns the Page object of the section in which the given page resides. Syntax PAGE.CurrentSection Returns page.Page A _section_ is a top-level content directory or any content directory containing an `_index.md` file. The current section of a [section page](https://gohugo.io/quick-reference/glossary/#section-page) , [taxonomy page](https://gohugo.io/quick-reference/glossary/#taxonomy-page) , [term page](https://gohugo.io/quick-reference/glossary/#term-page) , or the home page, is itself. Consider this content structure: content/ ├── auctions/ │ ├── 2023-11/ │ │ ├── _index.md <-- current section: 2023-11 │ │ ├── auction-1.md │ │ └── auction-2.md <-- current section: 2023-11 │ ├── 2023-12/ │ │ ├── _index.md │ │ ├── auction-3.md │ │ └── auction-4.md │ ├── _index.md <-- current section: auctions │ ├── bidding.md │ └── payment.md <-- current section: auctions ├── books/ │ ├── _index.md <-- current section: books │ ├── book-1.md │ └── book-2.md <-- current section: books ├── films/ │ ├── _index.md <-- current section: films │ ├── film-1.md │ └── film-2.md <-- current section: films └── _index.md <-- current section: home To create a link to the current section page: {{ .CurrentSection.LinkTitle }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/CurrentSection.md) --- # Date Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/date/](https://gohugo.io/images/qr/qr_37f2d5a9b1d9467e.png) Returns the date of the given page. Syntax PAGE.Date Returns time.Time Set the date in front matter: --- date: 2023-10-19T00:40:04-07:00 title: Article 1 --- +++ date = 2023-10-19T00:40:04-07:00 title = 'Article 1' +++ { "date": "2023-10-19T00:40:04-07:00", "title": "Article 1" } The date field in front matter is often considered to be the creation date, You can change its meaning, and its effect on your project, in your project configuration. See [details](https://gohugo.io/configuration/front-matter/#dates) . The date is a [time.Time](https://pkg.go.dev/time#Time) value. Format and localize the value with the [`time.Format`](https://gohugo.io/functions/time/format/) function, or use it with any of the [time methods](https://gohugo.io/methods/time/) . {{ .Date | time.Format ":date_medium" }} → Oct 19, 2023 In the example above we explicitly set the date in front matter. With Hugo’s default configuration, the `Date` method returns the front matter value. This behavior is configurable, allowing you to set fallback values if the date is not defined in front matter. See [details](https://gohugo.io/configuration/front-matter/#dates) . * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/Date.md) --- # Data Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/data/](https://gohugo.io/images/qr/qr_d8db2014367584dc.png) Returns a unique data object for each page kind. Syntax PAGE.Data Returns page.Data The `Data` method on a `Page` object returns a unique data object for each [page kind](https://gohugo.io/quick-reference/glossary/#page-kind) . The `Data` method is only useful within [taxonomy](https://gohugo.io/quick-reference/glossary/#taxonomy) and [term](https://gohugo.io/quick-reference/glossary/#term) templates. Themes that are not actively maintained may still use `.Data.Pages` in their templates. Although that syntax remains functional, use one of these methods instead: [`Pages`](https://gohugo.io/methods/page/pages/) , [`RegularPages`](https://gohugo.io/methods/page/regularpages/) , or [`RegularPagesRecursive`](https://gohugo.io/methods/page/regularpagesrecursive/) The examples that follow are based on this project configuration: taxonomies: author: authors genre: genres [taxonomies] author = 'authors' genre = 'genres' { "taxonomies": { "author": "authors", "genre": "genres" } } And this content structure: content/ ├── books/ │ ├── and-then-there-were-none.md --> genres: suspense │ ├── death-on-the-nile.md --> genres: suspense │ └── jamaica-inn.md --> genres: suspense, romance │ └── pride-and-prejudice.md --> genres: romance └── _index.md In a taxonomy template ---------------------- Use these methods on the `Data` object within a _taxonomy_ template. Singular (`string`) Returns the singular name of the taxonomy. {{ .Data.Singular }} → genre Plural (`string`) Returns the plural name of the taxonomy. {{ .Data.Plural }} → genres Terms (`page.Taxonomy`) Returns the `Taxonomy` object, consisting of a map of terms and the [weighted pages](https://gohugo.io/quick-reference/glossary/#weighted-page) associated with each term. {{ $taxonomyObject := .Data.Terms }} Once you have captured the `Taxonomy` object, use any of the [taxonomy methods](https://gohugo.io/methods/taxonomy/) to sort, count, or capture a subset of its weighted pages. Learn more about [taxonomy templates](https://gohugo.io/templates/types/#taxonomy) . In a term template ------------------ Use these methods on the `Data` object within a _term_ template. Singular (`string`) Returns the singular name of the taxonomy. {{ .Data.Singular }} → genre Plural (`string`) Returns the plural name of the taxonomy. {{ .Data.Plural }} → genres Term (`string`) Returns the name of the term. {{ .Data.Term }} → suspense Learn more about [term templates](https://gohugo.io/templates/types/#term) . * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/Data.md) --- # Description Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/description/](https://gohugo.io/images/qr/qr_d6006ed94864c933.png) Returns the description of the given page as defined in front matter. Syntax PAGE.Description Returns string Conceptually different from a [content summary](https://gohugo.io/content-management/summaries/) , a page description is typically used in metadata about the page. --- description: Instructions for making spicy tuna hand rolls. title: How to make spicy tuna hand rolls --- +++ description = 'Instructions for making spicy tuna hand rolls.' title = 'How to make spicy tuna hand rolls' +++ { "description": "Instructions for making spicy tuna hand rolls.", "title": "How to make spicy tuna hand rolls" } layouts/baseof.html ... ... * * * Last updated: July 7, 2025 : [Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45' (079671b41)](https://github.com/gohugoio/hugoDocs/commit/079671b41b9395f2c2b48879f14d3f09d69a63dc) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/Description.md) --- # Draft Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/draft/](https://gohugo.io/images/qr/qr_71ddc8f844e04297.png) Reports whether the given page is a draft as defined in front matter. Syntax PAGE.Draft Returns bool By default, Hugo does not publish draft pages when you build your project. To include draft pages when you build your project, use the `--buildDrafts` command line flag. --- draft: true title: Post 1 --- +++ draft = true title = 'Post 1' +++ { "draft": true, "title": "Post 1" } {{ .Draft }} → true * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/Draft.md) --- # Eq Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/eq/](https://gohugo.io/images/qr/qr_863d111ba130f62d.png) Reports whether two Page objects are equal. Syntax PAGE1.Eq PAGE2 Returns bool In this contrived example we list all pages in the current section except for the current page. layouts/page.html {{ $currentPage := . }} {{ range .CurrentSection.Pages }} {{ if not (.Eq $currentPage) }} {{ .LinkTitle }} {{ end }} {{ end }} * * * Last updated: July 7, 2025 : [Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45' (079671b41)](https://github.com/gohugoio/hugoDocs/commit/079671b41b9395f2c2b48879f14d3f09d69a63dc) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/Eq.md) --- # ExpiryDate Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/expirydate/](https://gohugo.io/images/qr/qr_18a30a4ec3a66a0.png) Returns the expiry date of the given page. Syntax PAGE.ExpiryDate Returns time.Time By default, Hugo excludes expired pages when building your project. To include expired pages, use the `--buildExpired` command line flag. Set the expiry date in front matter: --- expiryDate: 2024-10-19T00:32:13-07:00 title: Article 1 --- +++ expiryDate = 2024-10-19T00:32:13-07:00 title = 'Article 1' +++ { "expiryDate": "2024-10-19T00:32:13-07:00", "title": "Article 1" } The expiry date is a [time.Time](https://pkg.go.dev/time#Time) value. Format and localize the value with the [`time.Format`](https://gohugo.io/functions/time/format/) function, or use it with any of the [time methods](https://gohugo.io/methods/time/) . {{ .ExpiryDate | time.Format ":date_medium" }} → Oct 19, 2024 In the example above we explicitly set the expiry date in front matter. With Hugo’s default configuration, the `ExpiryDate` method returns the front matter value. This behavior is configurable, allowing you to set fallback values if the expiry date is not defined in front matter. See [details](https://gohugo.io/configuration/front-matter/#dates) . * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/ExpiryDate.md) --- # FirstSection Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/firstsection/](https://gohugo.io/images/qr/qr_421e882343acbb90.png) Returns the Page object of the top-level section of which the given page is a descendant. Syntax PAGE.FirstSection Returns page.Page A _section_ is a top-level content directory or any content directory containing an `_index.md` file. When called on the home page, the `FirstSection` method returns the `Page` object of the home page itself. Consider this content structure: content/ ├── auctions/ │ ├── 2023-11/ │ │ ├── _index.md <-- first section: auctions │ │ ├── auction-1.md │ │ └── auction-2.md <-- first section: auctions │ ├── 2023-12/ │ │ ├── _index.md │ │ ├── auction-3.md │ │ └── auction-4.md │ ├── _index.md <-- first section: auctions │ ├── bidding.md │ └── payment.md <-- first section: auctions ├── books/ │ ├── _index.md <-- first section: books │ ├── book-1.md │ └── book-2.md <-- first section: books ├── films/ │ ├── _index.md <-- first section: films │ ├── film-1.md │ └── film-2.md <-- first section: films └── _index.md <-- first section: home To link to the top-level section of which the current page is a descendant: {{ .FirstSection.LinkTitle }} * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/FirstSection.md) --- # File Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/file/](https://gohugo.io/images/qr/qr_c4b22e7fbd8c7277.png) For pages backed by a file, returns file information for the given page. Syntax PAGE.File Returns hugolib.fileInfo By default, not all pages are backed by a file, including top-level [section pages](https://gohugo.io/quick-reference/glossary/#section-page) , [taxonomy pages](https://gohugo.io/quick-reference/glossary/#taxonomy-page) , and [term pages](https://gohugo.io/quick-reference/glossary/#term-page) . By definition, you cannot retrieve file information when the file does not exist. To back one of the pages above with a file, create an `_index.md` file in the corresponding directory. For example: content/ └── books/ ├── _index.md <-- the top-slevel section page ├── book-1.md └── book-2.md Code defensively by verifying file existence as shown in the examples below. Methods ------- The path separators (slash or backslash) in `Path`, `Dir`, and `Filename` depend on the operating system. ### BaseFileName (`string`) The file name, excluding the extension. {{ with .File }} {{ .BaseFileName }} {{ end }} ### ContentBaseName (`string`) If the page is a branch or leaf bundle, the name of the containing directory, else the `TranslationBaseName`. {{ with .File }} {{ .ContentBaseName }} {{ end }} ### Dir (`string`) The file path, excluding the file name, relative to the `content` directory. {{ with .File }} {{ .Dir }} {{ end }} ### Ext (`string`) The file extension. {{ with .File }} {{ .Ext }} {{ end }} ### Filename (`string`) The absolute file path. {{ with .File }} {{ .Filename }} {{ end }} ### IsContentAdapter (`bool`) Reports whether the file is a [content adapter](https://gohugo.io/content-management/content-adapters/) . {{ with .File }} {{ .IsContentAdapter }} {{ end }} ### LogicalName (`string`) The file name. {{ with .File }} {{ .LogicalName }} {{ end }} ### Path (`string`) The file path, relative to the `content` directory. {{ with .File }} {{ .Path }} {{ end }} ### Section (`string`) The name of the top-level section in which the file resides. {{ with .File }} {{ .Section }} {{ end }} ### TranslationBaseName (`string`) The file name, excluding the extension and language identifier. {{ with .File }} {{ .TranslationBaseName }} {{ end }} ### UniqueID (`string`) The MD5 hash of `.File.Path`. {{ with .File }} {{ .UniqueID }} {{ end }} Examples -------- Consider this content structure in a multilingual project: content/ ├── news/ │ ├── b/ │ │ ├── index.de.md <-- leaf bundle │ │ └── index.en.md <-- leaf bundle │ ├── a.de.md <-- regular content │ ├── a.en.md <-- regular content │ ├── _index.de.md <-- branch bundle │ └── _index.en.md <-- branch bundle ├── _index.de.md └── _index.en.md With the English language site: | | regular content | leaf bundle | branch bundle | | --- | --- | --- | --- | | BaseFileName | a.en | index.en | \_index.en | | ContentBaseName | a | b | news | | Dir | news/ | news/b/ | news/ | | Ext | md | md | md | | Filename | /home/user/… | /home/user/… | /home/user/… | | IsContentAdapter | false | false | false | | LogicalName | a.en.md | index.en.md | \_index.en.md | | Path | news/a.en.md | news/b/index.en.md | news/\_index.en.md | | Section | news | news | news | | TranslationBaseName | a | index | \_index | | UniqueID | 15be14b… | 186868f… | 7d9159d… | Defensive coding ---------------- Some of the pages on a site may not be backed by a file. For example: * Top-level section pages * Taxonomy pages * Term pages Without a backing file, Hugo will throw an error if you attempt to access a `.File` property. To code defensively, first check for file existence: {{ with .File }} {{ .ContentBaseName }} {{ end }} * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/File.md) --- # FuzzyWordCount Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/fuzzywordcount/](https://gohugo.io/images/qr/qr_d8a52ff7a20f3d76.png) Returns the number of words in the content of the given page, rounded up to the nearest multiple of 100. Syntax PAGE.FuzzyWordCount Returns int {{ .FuzzyWordCount }} → 200 To get the exact word count, use the [`WordCount`](https://gohugo.io/methods/page/wordcount/) method. * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/FuzzyWordCount.md) --- # Fragments Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/fragments/](https://gohugo.io/images/qr/qr_c068eb036ad9c4a3.png) Returns a data structure of the fragments in the given page. Syntax PAGE.Fragments Returns tableofcontents.Fragments In a URL, whether absolute or relative, the [fragment](https://gohugo.io/quick-reference/glossary/#fragment) links to an `id` attribute of an HTML element on the page. /articles/article-1#section-2 ------------------- --------- path fragment Hugo assigns an `id` attribute to each Markdown [ATX](https://spec.commonmark.org/current/#atx-headings) and [setext](https://spec.commonmark.org/current/#setext-headings) heading within the page content. You can override the `id` with a [Markdown attribute](https://gohugo.io/quick-reference/glossary/#markdown-attribute) as needed. This creates the relationship between an entry in the [table of contents](https://gohugo.io/methods/page/tableofcontents/) (TOC) and a heading on the page. Use the `Fragments` method on a `Page` object to create a table of contents with the `Fragments.ToHTML` method, or by [walking](https://gohugo.io/quick-reference/glossary/#walk) the `Fragments.Map` data structure. Methods ------- ### Headings (`slice`) A slice of maps of all headings on the page, with first-level keys for each heading. Each map contains the following keys: `ID`, `Level`, `Title` and `Headings`. To inspect the data structure:
    {{ debug.Dump .Fragments.Headings }}
    ### HeadingsMap (`map`) A nested map of all headings on the page. Each map contains the following keys: `ID`, `Level`, `Title` and `Headings`. To inspect the data structure:
    {{ debug.Dump .Fragments.HeadingsMap }}
    ### Identifiers (`slice`) A slice containing the `id` attribute of each heading on the page. If so configured, will also contain the `id` attribute of each description term (i.e., `dt` element) on the page. See [configure Markup](https://gohugo.io/configuration/markup/#parserautodefinitiontermid) . To inspect the data structure:
    {{ debug.Dump .Fragments.Identifiers }}
    ### Identifiers.Contains ID (`bool`) Reports whether one or more headings on the page has the given `id` attribute, useful for validating fragments within a link [render hook](https://gohugo.io/quick-reference/glossary/#render-hook) . {{ .Fragments.Identifiers.Contains "section-2" }} → true ### Identifiers.Count ID (`int`) The number of headings on a page with the given `id` attribute, useful for detecting duplicates. {{ .Fragments.Identifiers.Count "section-2" }} → 1 ### ToHTML (`template.HTML`) Returns a TOC as a nested list, either ordered or unordered, identical to the HTML returned by the [`TableOfContents`](https://gohugo.io/methods/page/tableofcontents/) method. This method take three arguments: the start level (`int`), the end level (`int`), and a boolean (`true` to return an ordered list, `false` to return an unordered list). Use this method when you want to control the start level, end level, or list type independently from the table of contents settings in your project configuration. {{ $startLevel := 2 }} {{ $endLevel := 3 }} {{ $ordered := true }} {{ .Fragments.ToHTML $startLevel $endLevel $ordered }} Hugo renders this to: It is safe to use the `Fragments` methods within a render hook, even for the current page. When using the `Fragments` methods within a shortcode, call the shortcode using [standard notation](https://gohugo.io/content-management/shortcodes/#notation) . If you use [Markdown notation](https://gohugo.io/content-management/shortcodes/#notation) the rendered shortcode is included in the creation of the fragments map, resulting in a circular loop. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/Fragments.md) --- # GetTerms Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/getterms/](https://gohugo.io/images/qr/qr_e6cdc325d1545a08.png) Returns a collection of term pages for terms defined on the given page in the given taxonomy, ordered according to the sequence in which they appear in front matter. Syntax PAGE.GetTerms TAXONOMY Returns page.Pages Given this front matter: --- tags: - historical - classic - fiction title: Les Misérables --- +++ tags = ['historical', 'classic', 'fiction'] title = 'Les Misérables' +++ { "tags": [\ "historical",\ "classic",\ "fiction"\ ], "title": "Les Misérables" } This template code: {{ with .GetTerms "tags" }}

    Tags

    {{ end }} Is rendered to:

    Tags

    * * * Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/GetTerms.md) --- # GetPage Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/getpage/](https://gohugo.io/images/qr/qr_52cd2700d4392cb.png) Returns a Page object from the given path. Syntax PAGE.GetPage PATH Returns page.Page The `GetPage` method is also available on a `Site` object. See [details](https://gohugo.io/methods/site/getpage/) . When using the `GetPage` method on the `Page` object, specify a path relative to the current directory or relative to the `content` directory. If Hugo cannot resolve the path to a page, the method returns nil. If the path is ambiguous, Hugo throws an error and fails the build. Consider this content structure: content/ ├── works/ │ ├── paintings/ │ │ ├── _index.md │ │ ├── starry-night.md │ │ └── the-mona-lisa.md │ ├── sculptures/ │ │ ├── _index.md │ │ ├── david.md │ │ └── the-thinker.md │ └── _index.md └── _index.md The examples below depict the result of rendering `works/paintings/the-mona-lisa.md`: layouts/works/page.html {{ with .GetPage "starry-night" }} {{ .Title }} → Starry Night {{ end }} {{ with .GetPage "./starry-night" }} {{ .Title }} → Starry Night {{ end }} {{ with .GetPage "../paintings/starry-night" }} {{ .Title }} → Starry Night {{ end }} {{ with .GetPage "/works/paintings/starry-night" }} {{ .Title }} → Starry Night {{ end }} {{ with .GetPage "../sculptures/david" }} {{ .Title }} → David {{ end }} {{ with .GetPage "/works/sculptures/david" }} {{ .Title }} → David {{ end }} * * * Last updated: July 7, 2025 : [Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45' (079671b41)](https://github.com/gohugoio/hugoDocs/commit/079671b41b9395f2c2b48879f14d3f09d69a63dc) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/GetPage.md) --- # GitInfo Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/gitinfo/](https://gohugo.io/images/qr/qr_a061d5b35349f5b2.png) Provides access to commit metadata for a given page. Syntax PAGE.GitInfo Returns \*gitmap.GitInfo The `GitInfo` method on a `Page` object provides access to commit metadata from your Git history, such as the author’s name, the commit hash, and the commit message. Hugo’s Git integration is performant, but may increase build times for large projects. Prerequisites ------------- Install Git, create a repository, and commit your project files. You must also allow Hugo to access your repository by adding this to your project configuration: enableGitInfo: true enableGitInfo = true { "enableGitInfo": true } When you set [`enableGitInfo`](https://gohugo.io/configuration/all/#enablegitinfo) to `true`, the last modification date for each content page will automatically be the Author Date of the last commit for that file. This is configurable. See [details](https://gohugo.io/configuration/front-matter/#dates) . Scope ----- Commit metadata is available for content stored in your local repository and for content provided by [modules](https://gohugo.io/quick-reference/glossary/#module) . ### Local content Hugo retrieves commit metadata for files tracked within your project’s local repository. This includes all content files managed by Git in your main project directory. ### Module content [New in v0.157.0](https://github.com/gohugoio/hugo/releases/tag/v0.157.0) Hugo also retrieves commit metadata for content provided by modules. This allows you to display commit data for remote repositories that are mounted as content directories, such as when aggregating documentation from multiple sources. Methods ------- ### AbbreviatedHash (`string`) Returns the seven-character shortened version of the commit hash. {{ with .GitInfo }} {{ .AbbreviatedHash }} → aab9ec0 {{ end }} ### AuthorDate (`time.Time`) Returns the date the author originally created the commit. {{ with .GitInfo }} {{ .AuthorDate.Format "2006-01-02" }} → 2023-10-09 {{ end }} ### AuthorEmail (`string`) Returns the author’s email address, respecting [gitmailmap](https://git-scm.com/docs/gitmailmap) . {{ with .GitInfo }} {{ .AuthorEmail }} → jsmith@example.org {{ end }} ### AuthorName (`string`) Returns the author’s name, respecting [gitmailmap](https://git-scm.com/docs/gitmailmap) . {{ with .GitInfo }} {{ .AuthorName }} → John Smith {{ end }} ### CommitDate (`time.Time`) Returns the date the commit was applied to the branch. {{ with .GitInfo }} {{ .CommitDate.Format "2006-01-02" }} → 2023-10-09 {{ end }} ### Hash (`string`) Returns the full SHA-1 commit hash. {{ with .GitInfo }} {{ .Hash }} → aab9ec0b31ebac916a1468c4c9c305f2bebf78d4 {{ end }} ### Subject (`string`) Returns the first line of the commit message (the summary). {{ with .GitInfo }} {{ .Subject }} → Add tutorials {{ end }} ### Body (`string`) Returns the full content of the commit message, excluding the subject line. {{ with .GitInfo }} {{ .Body }} → Two new pages added. {{ end }} ### Ancestors (`gitmap.GitInfos`) Returns a list of previous commits for this specific file, ordered from most recent to oldest. For example, to list the last 5 commits: {{ with .GitInfo }} {{ range .Ancestors | first 5 }} {{ .CommitDate.Format "2006-01-02" }}: {{ .Subject }} {{ end }} {{ end }} To reverse the order: {{ with .GitInfo }} {{ range .Ancestors.Reverse | first 5 }} {{ .CommitDate.Format "2006-01-02" }}: {{ .Subject }} {{ end }} {{ end }} ### Parent (`*gitmap.GitInfo`) Returns the most recent ancestor commit for the file, if any. Last modified date ------------------ By default, when `enableGitInfo` is `true`, the `Lastmod` method on a `Page` object returns the Git AuthorDate of the last commit that included the file. You can change this behavior in your [project configuration](https://gohugo.io/configuration/front-matter/) . Hosting considerations ---------------------- On a [CI/CD](https://gohugo.io/quick-reference/glossary/#cicd) platform, the step that clones your project repository must perform a deep clone. If the clone is shallow, the Git information for a given file may be inaccurate. It might incorrectly reflect the most recent repository commit, rather than the commit that actually modified the file. While some providers perform a deep clone by default, others require you to configure the depth yourself. | Hosting service | Default clone depth | Configurable | | --- | --- | --- | | AWS Amplify | Deep | N/A | | Cloudflare | Shallow | Yes [1](https://gohugo.io/methods/page/gitinfo/#fn:1) | | DigitalOcean App Platform | Deep | N/A | | GitHub Pages | Shallow | Yes [2](https://gohugo.io/methods/page/gitinfo/#fn:2) | | GitLab Pages | Shallow | Yes [3](https://gohugo.io/methods/page/gitinfo/#fn:3) | | Netlify | Deep | N/A | | Render | Shallow | Yes [1](https://gohugo.io/methods/page/gitinfo/#fn:1) | | Vercel | Shallow | Yes [1](https://gohugo.io/methods/page/gitinfo/#fn:1) | * * * 1. To perform a deep clone when hosting on Cloudflare, Render, or Vercel, include this code in the build script after the repository has been cloned: if [ "$(git rev-parse --is-shallow-repository)" = "true" ]; then git fetch --unshallow fi  [↩︎](https://gohugo.io/methods/page/gitinfo/#fnref:1)  [↩︎](https://gohugo.io/methods/page/gitinfo/#fnref1:1)  [↩︎](https://gohugo.io/methods/page/gitinfo/#fnref2:1) 2. To perform a deep clone when hosting on GitHub Pages, set `fetch-depth: 0` in the `checkout` step of the GitHub Action. See [example](https://gohugo.io/host-and-deploy/host-on-github-pages/#step-7) . [↩︎](https://gohugo.io/methods/page/gitinfo/#fnref:2) 3. To perform a deep clone when hosting on GitLab Pages, set the `GIT_DEPTH` environment variable to `0` in the workflow file. See [example](https://gohugo.io/host-and-deploy/host-on-gitlab-pages/#configure-gitlab-cicd) . [↩︎](https://gohugo.io/methods/page/gitinfo/#fnref:3) * * * Last updated: February 27, 2026 : [content: Miscellaneous udpates for v0.157.0 (35da1aa3c)](https://github.com/gohugoio/hugoDocs/commit/35da1aa3c2fe3b54bdb57df1a308533844af9df5) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/GitInfo.md) --- # HasMenuCurrent Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/methods/page/hasmenucurrent/](https://gohugo.io/images/qr/qr_ae2564f0d47733a1.png) Reports whether the given Page object matches the Page object associated with one of the child menu entries under the given menu entry in the given menu. Syntax PAGE.HasMenuCurrent MENU MENUENTRY Returns bool If the `Page` object associated with the menu entry is a section, this method also returns `true` for any descendant of that section. {{ $currentPage := . }} {{ range site.Menus.main }} {{ if $currentPage.IsMenuCurrent .Menu . }} {{ .Name }} {{ else if $currentPage.HasMenuCurrent .Menu . }} {{ .Name }} {{ else }} {{ .Name }} {{ end }} {{ end }} See [menu templates](https://gohugo.io/templates/menu/#example) for a complete example. When using this method you must either define the menu entry in front matter, or specify a `pageRef` property when defining the menu entry in your project configuration. * * * Last updated: February 25, 2026 : [Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' (b0d3364f1)](https://github.com/gohugoio/hugoDocs/commit/b0d3364f14192a13e95a5d30e9e3af1febb0bf57) [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/methods/page/HasMenuCurrent.md) --- # Functions Menu Search [GitHub 87080 stars](https://github.com/gohugoio/hugo) [Mastodon](https://fosstodon.org/@gohugoio) Hugo Documentation ![Link to https://gohugo.io/quick-reference/functions/](https://gohugo.io/images/qr/qr_e1d6d8ec5ecfa4bc.png) A quick reference guide to Hugo’s functions, grouped by namespace. Aliases, if any, appear in parentheses to the right of the function name. cast ---- Use these functions to cast a value from one data type to another. [cast.ToFloat](https://gohugo.io/functions/cast/tofloat/) Converts a value to a decimal floating-point number (base 10). [cast.ToInt](https://gohugo.io/functions/cast/toint/) Converts a value to a decimal integer (base 10). [cast.ToString](https://gohugo.io/functions/cast/tostring/) Converts a value to a string. collections ----------- Use these functions to manipulate and query maps, slices, and strings. [collections.After](https://gohugo.io/functions/collections/after/) Returns a slice containing the elements after the first N elements of the given slice. [collections.Append](https://gohugo.io/functions/collections/append/) Returns a slice by adding one or more elements, or an entire second slice, to the end of the given slice. [collections.Apply](https://gohugo.io/functions/collections/apply/) Returns a slice by transforming each element of the given slice using a specific function and parameters. [collections.Complement](https://gohugo.io/functions/collections/complement/) Returns a slice by identifying elements in the last given slice that do not appear in any of the preceding slices. [collections.D](https://gohugo.io/functions/collections/d/) Returns a sorted slice of unique random integers based on a given seed, count, and maximum value. [collections.Delimit](https://gohugo.io/functions/collections/delimit/) Returns a string by joining the values of the given slice or map with a delimiter. [collections.Dictionary](https://gohugo.io/functions/collections/dictionary/) Returns a map created from the given key-value pairs. [collections.First](https://gohugo.io/functions/collections/first/) Returns the first N elements of the given slice or string. [collections.Group](https://gohugo.io/functions/collections/group/) Returns a map by grouping the given page collection (slice) by a specific key. [collections.In](https://gohugo.io/functions/collections/in/) Reports whether a value exists within the given slice or string. [collections.Index](https://gohugo.io/functions/collections/indexfunction/) Returns an element or value from the given slice or map at the specified key(s). [collections.Intersect](https://gohugo.io/functions/collections/intersect/) Returns a slice containing the common elements found in two given slices, in the same order as the first slice. [collections.IsSet](https://gohugo.io/functions/collections/isset/) Reports whether a specific key or index exists in the given map or slice. [collections.KeyVals](https://gohugo.io/functions/collections/keyvals/) Returns a KeyVals struct by pairing a given key and values. [collections.Last](https://gohugo.io/functions/collections/last/) Returns the last N elements of the given slice or string. [collections.Merge](https://gohugo.io/functions/collections/merge/) Returns a map by combining two or more given maps. [collections.NewScratch](https://gohugo.io/functions/collections/newscratch/) Returns a locally scoped "scratch pad" to store and manipulate data. [collections.Querify](https://gohugo.io/functions/collections/querify/) Returns a URL query string from the given map, slice, or sequence of key-value pairs. [collections.Reverse](https://gohugo.io/functions/collections/reverse/) Returns a slice by reversing the order of elements in the given slice. [collections.Seq](https://gohugo.io/functions/collections/seq/) Returns a slice of integers starting from 1 or a given value, incrementing by 1 or a given value, and ending at a given value. [collections.Shuffle](https://gohugo.io/functions/collections/shuffle/) Returns a slice by randomizing the element order of the given slice. [collections.Slice](https://gohugo.io/functions/collections/slice/) Returns a slice created from the given values. [collections.Sort](https://gohugo.io/functions/collections/sort/) Returns a sorted map or slice by reordering the given collection by a key and order. [collections.SymDiff](https://gohugo.io/functions/collections/symdiff/) Returns a slice containing the symmetric difference of two given slices. [collections.Union](https://gohugo.io/functions/collections/union/) Returns a slice containing the unique elements from two given slices. [collections.Uniq](https://gohugo.io/functions/collections/uniq/) Returns a slice by removing duplicate elements from the given slice. [collections.Where](https://gohugo.io/functions/collections/where/) Returns a slice by filtering the given slice based on a key, operator, and value. compare ------- Use these functions to compare two or more values. [compare.Conditional](https://gohugo.io/functions/compare/conditional/) Returns one of two arguments depending on the value of the control argument. [compare.Default](https://gohugo.io/functions/compare/default/) Returns the second argument if set, else the first argument. [compare.Eq](https://gohugo.io/functions/compare/eq/) Returns the boolean truth of arg1 == arg2 || arg1 == arg3. [compare.Ge](https://gohugo.io/functions/compare/ge/) Returns the boolean truth of arg1 >= arg2 && arg1 >= arg3. [compare.Gt](https://gohugo.io/functions/compare/gt/) Returns the boolean truth of arg1 > arg2 && arg1 > arg3. [compare.Le](https://gohugo.io/functions/compare/le/) Returns the boolean truth of arg1 <= arg2 && arg1 <= arg3. [compare.Lt](https://gohugo.io/functions/compare/lt/) Returns the boolean truth of arg1 < arg2 && arg1 < arg3. [compare.Ne](https://gohugo.io/functions/compare/ne/) Returns the boolean truth of arg1 != arg2 && arg1 != arg3. crypto ------ Use these functions to create cryptographic hashes. [crypto.FNV32a](https://gohugo.io/functions/crypto/fnv32a/) Returns the 32-bit FNV (Fowler-Noll-Vo) non-cryptographic hash of the given string. [crypto.HMAC](https://gohugo.io/functions/crypto/hmac/) Returns a cryptographic hash that uses a key to sign a message. [crypto.MD5](https://gohugo.io/functions/crypto/md5/) Hashes the given input and returns its MD5 checksum encoded to a hexadecimal string. [crypto.SHA1](https://gohugo.io/functions/crypto/sha1/) Hashes the given input and returns its SHA1 checksum encoded to a hexadecimal string. [crypto.SHA256](https://gohugo.io/functions/crypto/sha256/) Hashes the given input and returns its SHA256 checksum encoded to a hexadecimal string. css --- Use these functions to work with CSS and Sass files. [css.PostCSS](https://gohugo.io/functions/css/postcss/) Processes the given resource with PostCSS using any PostCSS plugin. [css.Quoted](https://gohugo.io/functions/css/quoted/) Returns the given string, setting its data type to indicate that it must be quoted when used in CSS. [css.Sass](https://gohugo.io/functions/css/sass/) Transpiles Sass to CSS. [css.TailwindCSS](https://gohugo.io/functions/css/tailwindcss/) Processes the given resource with the Tailwind CSS CLI. [css.Unquoted](https://gohugo.io/functions/css/unquoted/) Returns the given string, setting its data type to indicate that it must not be quoted when used in CSS. debug ----- Use these functions to debug your templates. [debug.Dump](https://gohugo.io/functions/debug/dump/) Returns an object dump as a string. [debug.Timer](https://gohugo.io/functions/debug/timer/) Creates a named timer that reports elapsed time to the console. [debug.VisualizeSpaces](https://gohugo.io/functions/debug/visualizespaces/) Returns the given string with spaces replaced by a visible string. diagrams -------- Use these functions to render diagrams. [diagrams.Goat](https://gohugo.io/functions/diagrams/goat/) Returns an SVGDiagram object created from the given GoAT markup and options. encoding -------- Use these functions to encode and decode data. [encoding.Base64Decode](https://gohugo.io/functions/encoding/base64decode/) Returns the base64 decoding of the given content. [encoding.Base64Encode](https://gohugo.io/functions/encoding/base64encode/) Returns the base64 decoding of the given content. [encoding.Jsonify](https://gohugo.io/functions/encoding/jsonify/) Encodes the given object to JSON. fmt --- Use these functions to print strings within a template or to print messages to the terminal. [fmt.Errorf](https://gohugo.io/functions/fmt/errorf/) Log an ERROR from a template. [fmt.Erroridf](https://gohugo.io/functions/fmt/erroridf/) Log a suppressible ERROR from a template. [fmt.Print](https://gohugo.io/functions/fmt/print/) Prints the default representation of the given arguments using the standard `fmt.Print` function. [fmt.Printf](https://gohugo.io/functions/fmt/printf/) Formats a string using the standard `fmt.Sprintf` function. [fmt.Println](https://gohugo.io/functions/fmt/println/) Prints the default representation of the given argument using the standard `fmt.Print` function and enforces a line break. [fmt.Warnf](https://gohugo.io/functions/fmt/warnf/) Log a WARNING from a template. [fmt.Warnidf](https://gohugo.io/functions/fmt/warnidf/) Log a suppressible WARNING from a template. global ------ Use these global functions to access page and site data. [page](https://gohugo.io/functions/global/page/) Provides global access to a Page object. [site](https://gohugo.io/functions/global/site/) Provides global access to the current Site object. go template ----------- These are the functions, operators, and statements provided by Go's text/template package. [and](https://gohugo.io/functions/go-template/and/) Returns the first falsy argument. If all arguments are truthy, returns the last argument. [block](https://gohugo.io/functions/go-template/block/) Defines a template and executes it in place. [break](https://gohugo.io/functions/go-template/break/) Used with the range statement, stops the innermost iteration and bypasses all remaining iterations. [continue](https://gohugo.io/functions/go-template/continue/) Used with the range statement, stops the innermost iteration and continues to the next iteration. [define](https://gohugo.io/functions/go-template/define/) Defines a template. [else](https://gohugo.io/functions/go-template/else/) Begins an alternate block for if, with, and range statements. [end](https://gohugo.io/functions/go-template/end/) Terminates if, with, range, block, and define statements. [if](https://gohugo.io/functions/go-template/if/) Executes the block if the expression is truthy. [len](https://gohugo.io/functions/go-template/len/) Returns the length of a string, slice, map, or collection. [not](https://gohugo.io/functions/go-template/not/) Returns the boolean negation of its single argument. [or](https://gohugo.io/functions/go-template/or/) Returns the first truthy argument. If all arguments are falsy, returns the last argument. [range](https://gohugo.io/functions/go-template/range/) Iterates over a non-empty collection, binds context (the dot) to successive elements, and executes the block. [return](https://gohugo.io/functions/go-template/return/) Used within partial templates, terminates template execution and returns the given value, if any. [template](https://gohugo.io/functions/go-template/template/) Executes the given template, optionally passing context. [try](https://gohugo.io/functions/go-template/try/) Returns a TryValue object after evaluating the given expression. [urlquery](https://gohugo.io/functions/go-template/urlquery/) Returns the escaped value of the textual representation of its arguments in a form suitable for embedding in a URL query. [with](https://gohugo.io/functions/go-template/with/) Binds context (the dot) to the expression and executes the block if expression is truthy. hash ---- Use these functions to create non-cryptographic hashes. [hash.FNV32a](https://gohugo.io/functions/hash/fnv32a/) Returns the 32-bit FNV (Fowler-Noll-Vo) non-cryptographic hash of the given string. [hash.XxHash](https://gohugo.io/functions/hash/xxhash/) Returns the 64-bit xxHash non-cryptographic hash of the given string. hugo ---- Use these functions to access information about the Hugo application and the current environment. [hugo.BuildDate](https://gohugo.io/functions/hugo/builddate/) Returns the compile date of the Hugo binary. [hugo.CommitHash](https://gohugo.io/functions/hugo/commithash/) Returns the Git commit hash of the Hugo binary. [hugo.Data](https://gohugo.io/functions/hugo/data/) Returns a data structure composed from the files in the data directory. [hugo.Deps](https://gohugo.io/functions/hugo/deps/) Returns a slice of project dependencies, either Hugo Modules or local theme components. [hugo.Environment](https://gohugo.io/functions/hugo/environment/) Returns the current running environment. [hugo.Generator](https://gohugo.io/functions/hugo/generator/) Renders an HTML meta element identifying the software that generated the site. [hugo.GoVersion](https://gohugo.io/functions/hugo/goversion/) Returns the Go version used to compile the Hugo binary [hugo.IsDevelopment](https://gohugo.io/functions/hugo/isdevelopment/) Reports whether the current running environment is "development". [hugo.IsExtended](https://gohugo.io/functions/hugo/isextended/) Reports whether the Hugo binary is either the extended or extended/deploy edition. [hugo.IsMultihost](https://gohugo.io/functions/hugo/ismultihost/) Reports whether each configured language has a unique base URL. [hugo.IsMultilingual](https://gohugo.io/functions/hugo/ismultilingual/) Reports whether there are two or more configured languages. [hugo.IsProduction](https://gohugo.io/functions/hugo/isproduction/) Reports whether the current running environment is "production". [hugo.IsServer](https://gohugo.io/functions/hugo/isserver/) Reports whether the built-in development server is running. [hugo.Sites](https://gohugo.io/functions/hugo/sites/) Returns a collection of all sites for all dimensions. [hugo.Store](https://gohugo.io/functions/hugo/store/) Returns a globally scoped "scratch pad" to store and manipulate data. [hugo.Version](https://gohugo.io/functions/hugo/version/) Returns the current version of the Hugo binary. [hugo.WorkingDir](https://gohugo.io/functions/hugo/workingdir/) Returns the project working directory. images ------ Use these functions to create an image filter, apply an image filter to an image, and to retrieve image information. [images.AutoOrient](https://gohugo.io/functions/images/autoorient/) Returns an image filter that rotates and flips an image as needed per its Exif orientation tag. [images.Brightness](https://gohugo.io/functions/images/brightness/) Returns an image filter that changes the brightness of an image. [images.ColorBalance](https://gohugo.io/functions/images/colorbalance/) Returns an image filter that changes the color balance of an image. [images.Colorize](https://gohugo.io/functions/images/colorize/) Returns an image filter that produces a colorized version of an image. [images.Config](https://gohugo.io/functions/images/config/) Returns an image.Config structure from the image at the specified path, relative to the working directory. [images.Contrast](https://gohugo.io/functions/images/contrast/) Returns an image filter that changes the contrast of an image. [images.Dither](https://gohugo.io/functions/images/dither/) Returns an image filter that dithers an image. [images.Filter](https://gohugo.io/functions/images/filter/) Applies one or more image filters to the given image resource. [images.Gamma](https://gohugo.io/functions/images/gamma/) Returns an image filter that performs gamma correction on an image. [images.GaussianBlur](https://gohugo.io/functions/images/gaussianblur/) Returns an image filter that applies a gaussian blur to an image. [images.Grayscale](https://gohugo.io/functions/images/grayscale/) Returns an image filter that produces a grayscale version of an image. [images.Hue](https://gohugo.io/functions/images/hue/) Returns an image filter that rotates the hue of an image. [images.Invert](https://gohugo.io/functions/images/invert/) Returns an image filter that negates the colors of an image. [images.Mask](https://gohugo.io/functions/images/mask/) Returns an image filter that applies a mask to the source image. [images.Opacity](https://gohugo.io/functions/images/opacity/) Returns an image filter that changes the opacity of an image. [images.Overlay](https://gohugo.io/functions/images/overlay/) Returns an image filter that overlays the source image at the given coordinates, relative to the upper left corner. [images.Padding](https://gohugo.io/functions/images/padding/) Returns an image filter that resizes the image canvas without resizing the image. [images.Pixelate](https://gohugo.io/functions/images/pixelate/) Returns an image filter that applies a pixelation effect to an image. [images.Process](https://gohugo.io/functions/images/process/) Returns an image filter that processes an image according to the given processing specification. [images.QR](https://gohugo.io/functions/images/qr/) Encodes the given text into a QR code using the specified options, returning an image resource. [images.Saturation](https://gohugo.io/functions/images/saturation/) Returns an image filter that changes the saturation of an image. [images.Sepia](https://gohugo.io/functions/images/sepia/) Returns an image filter that produces a sepia-toned version of an image. [images.Sigmoid](https://gohugo.io/functions/images/sigmoid/) Returns an image filter that changes the contrast of an image using a sigmoidal function. [images.Text](https://gohugo.io/functions/images/text/) Returns an image filter that adds text to an image. [images.UnsharpMask](https://gohugo.io/functions/images/unsharpmask/) Returns an image filter that sharpens an image. inflect ------- These functions provide word inflection features such as singularization and pluralization of English nouns. [inflect.Humanize](https://gohugo.io/functions/inflect/humanize/) Returns the humanized version of the input with the first letter capitalized. [inflect.Pluralize](https://gohugo.io/functions/inflect/pluralize/) Pluralizes the given word according to a set of common English pluralization rules. [inflect.Singularize](https://gohugo.io/functions/inflect/singularize/) Singularizes the given word according to a set of common English singularization rules. js -- Use these functions to work with JavaScript and TypeScript files. [js.Babel](https://gohugo.io/functions/js/babel/) Compile the given JavaScript resource with Babel. [js.Batch](https://gohugo.io/functions/js/batch/) Build JavaScript bundle groups with global code splitting and flexible hooks/runners setup. [js.Build](https://gohugo.io/functions/js/build/) Bundle, transpile, tree shake, and minify JavaScript resources. lang ---- Use these functions to adapt your site to meet language and regional requirements. [lang.FormatAccounting](https://gohugo.io/functions/lang/formataccounting/) Returns a currency representation of a number for the given currency and precision for the current language and region in accounting notation. [lang.FormatCurrency](https://gohugo.io/functions/lang/formatcurrency/) Returns a currency representation of a number for the given currency and precision for the current language and region. [lang.FormatNumber](https://gohugo.io/functions/lang/formatnumber/) Returns a numeric representation of a number with the given precision for the current language and region. [lang.FormatNumberCustom](https://gohugo.io/functions/lang/formatnumbercustom/) Returns a numeric representation of a number with the given precision using negative, decimal, and grouping options. [lang.FormatPercent](https://gohugo.io/functions/lang/formatpercent/) Returns a percentage representation of a number with the given precision for the current language and region. [lang.Merge](https://gohugo.io/functions/lang/merge/) Merge missing translations from other languages. [lang.Translate](https://gohugo.io/functions/lang/translate/) Translates a string using the translation tables in the i18n directory. math ---- Use these functions to perform mathematical operations. [math.Abs](https://gohugo.io/functions/math/abs/) Returns the absolute value of the given number. [math.Acos](https://gohugo.io/functions/math/acos/) Returns the arccosine, in radians, of the given number. [math.Add](https://gohugo.io/functions/math/add/) Adds two or more numbers. [math.Asin](https://gohugo.io/functions/math/asin/) Returns the arcsine, in radians, of the given number. [math.Atan](https://gohugo.io/functions/math/atan/) Returns the arctangent, in radians, of the given number. [math.Atan2](https://gohugo.io/functions/math/atan2/) Returns the arctangent, in radians, of the given number pair, determining the correct quadrant from their signs. [math.Ceil](https://gohugo.io/functions/math/ceil/) Returns the least integer value greater than or equal to the given number. [math.Cos](https://gohugo.io/functions/math/cos/) Returns the cosine of the given radian number. [math.Counter](https://gohugo.io/functions/math/counter/) Increments and returns a global counter. [math.Div](https://gohugo.io/functions/math/div/) Divides the first number by one or more numbers. [math.Floor](https://gohugo.io/functions/math/floor/) Returns the greatest integer value less than or equal to the given number. [math.Log](https://gohugo.io/functions/math/log/) Returns the natural logarithm of the given number. [math.Max](https://gohugo.io/functions/math/max/) Returns the greater of all numbers. Accepts scalars, slices, or both. [math.MaxInt64](https://gohugo.io/functions/math/maxint64/) Returns the maximum value for a signed 64-bit integer. [math.Min](https://gohugo.io/functions/math/min/) Returns the smaller of all numbers. Accepts scalars, slices, or both. [math.Mod](https://gohugo.io/functions/math/mod/) Returns the modulus of two integers. [math.ModBool](https://gohugo.io/functions/math/modbool/) Reports whether the modulus of two integers equals 0. [math.Mul](https://gohugo.io/functions/math/mul/) Multiplies two or more numbers. [math.Pi](https://gohugo.io/functions/math/pi/) Returns the mathematical constant pi. [math.Pow](https://gohugo.io/functions/math/pow/) Returns the first number raised to the power of the second number. [math.Product](https://gohugo.io/functions/math/product/) Returns the product of all numbers. Accepts scalars, slices, or both. [math.Rand](https://gohugo.io/functions/math/rand/) Returns a pseudo-random number in the half-open interval \[0.0, 1.0).\ \ [math.Round](https://gohugo.io/functions/math/round/)\ \ Returns the nearest integer, rounding half away from zero.\ \ [math.Sin](https://gohugo.io/functions/math/sin/)\ \ Returns the sine of the given radian number.\ \ [math.Sqrt](https://gohugo.io/functions/math/sqrt/)\ \ Returns the square root of the given number.\ \ [math.Sub](https://gohugo.io/functions/math/sub/)\ \ Subtracts one or more numbers from the first number.\ \ [math.Sum](https://gohugo.io/functions/math/sum/)\ \ Returns the sum of all numbers. Accepts scalars, slices, or both.\ \ [math.Tan](https://gohugo.io/functions/math/tan/)\ \ Returns the tangent of the given radian number.\ \ [math.ToDegrees](https://gohugo.io/functions/math/todegrees/)\ \ ToDegrees converts radians into degrees.\ \ [math.ToRadians](https://gohugo.io/functions/math/toradians/)\ \ ToRadians converts degrees into radians.\ \ openapi3\ --------\ \ Use these functions to work with OpenAPI 3 definitions.\ \ [openapi3.Unmarshal](https://gohugo.io/functions/openapi3/unmarshal/)\ \ Unmarshals the given resource into an OpenAPI 3 Description.\ \ os\ --\ \ Use these functions to interact with the operating system.\ \ [os.FileExists](https://gohugo.io/functions/os/fileexists/)\ \ Reports whether the file or directory exists.\ \ [os.Getenv](https://gohugo.io/functions/os/getenv/)\ \ Returns the value of an environment variable, or an empty string if the environment variable is not set.\ \ [os.ReadDir](https://gohugo.io/functions/os/readdir/)\ \ Returns an array of FileInfo structures sorted by file name, one element for each directory entry.\ \ [os.ReadFile](https://gohugo.io/functions/os/readfile/)\ \ Returns the contents of a file.\ \ [os.Stat](https://gohugo.io/functions/os/stat/)\ \ Returns a FileInfo structure describing a file or directory.\ \ partials\ --------\ \ Use these functions to call partial templates.\ \ [partials.Include](https://gohugo.io/functions/partials/include/)\ \ Executes the given template, optionally passing context. If the partial template contains a return statement, returns the given value, else returns the rendered output.\ \ [partials.IncludeCached](https://gohugo.io/functions/partials/includecached/)\ \ Executes the given template and caches the result, optionally passing one or more variant keys. If the partial template contains a return statement, returns the given value, else returns the rendered output.\ \ path\ ----\ \ Use these functions to work with file paths.\ \ [path.Base](https://gohugo.io/functions/path/base/)\ \ Replaces path separators with slashes (`/`) and returns the last element of the given path.\ \ [path.BaseName](https://gohugo.io/functions/path/basename/)\ \ Replaces path separators with slashes (`/`) and returns the last element of the given path, removing the extension if present.\ \ [path.Clean](https://gohugo.io/functions/path/clean/)\ \ Replaces path separators with slashes (`/`) and returns the shortest path name equivalent to the given path.\ \ [path.Dir](https://gohugo.io/functions/path/dir/)\ \ Replaces path separators with slashes (/) and returns all but the last element of the given path.\ \ [path.Ext](https://gohugo.io/functions/path/ext/)\ \ Replaces path separators with slashes (`/`) and returns the file name extension of the given path.\ \ [path.Join](https://gohugo.io/functions/path/join/)\ \ Replaces path separators with slashes (`/`), joins the given path elements into a single path, and returns the shortest path name equivalent to the result.\ \ [path.Split](https://gohugo.io/functions/path/split/)\ \ Replaces path separators with slashes (`/`) and splits the resulting path immediately following the final slash, separating it into a directory and file name component.\ \ reflect\ -------\ \ Use these functions to determine a value's data type.\ \ [reflect.IsImageResource](https://gohugo.io/functions/reflect/isimageresource/)\ \ Reports whether the given value is a Resource object representing an image as defined by its media type.\ \ [reflect.IsImageResourceProcessable](https://gohugo.io/functions/reflect/isimageresourceprocessable/)\ \ Reports whether the given value is a Resource object representing an image from which Hugo can extract dimensions and perform processing such as converting, resizing, cropping, or filtering.\ \ [reflect.IsImageResourceWithMeta](https://gohugo.io/functions/reflect/isimageresourcewithmeta/)\ \ Reports whether the given value is a Resource object representing an image from which Hugo can extract dimensions and, if present, Exif, IPTC, and XMP data.\ \ [reflect.IsMap](https://gohugo.io/functions/reflect/ismap/)\ \ Reports whether the given value is a map.\ \ [reflect.IsPage](https://gohugo.io/functions/reflect/ispage/)\ \ Reports whether the given value is a Page object.\ \ [reflect.IsResource](https://gohugo.io/functions/reflect/isresource/)\ \ Reports whether the given value is a Resource object.\ \ [reflect.IsSite](https://gohugo.io/functions/reflect/issite/)\ \ Reports whether the given value is a Site object.\ \ [reflect.IsSlice](https://gohugo.io/functions/reflect/isslice/)\ \ Reports whether the given value is a slice.\ \ resources\ ---------\ \ Use these functions to work with resources.\ \ [resources.Babel](https://gohugo.io/functions/resources/babel/)\ \ Compiles the given JavaScript resource with Babel.\ \ [resources.ByType](https://gohugo.io/functions/resources/bytype/)\ \ Returns a collection of global resources of the given media type, or nil if none found.\ \ [resources.Concat](https://gohugo.io/functions/resources/concat/)\ \ Returns a concatenated slice of resources.\ \ [resources.Copy](https://gohugo.io/functions/resources/copy/)\ \ Copies the given resource to the target path.\ \ [resources.ExecuteAsTemplate](https://gohugo.io/functions/resources/executeastemplate/)\ \ Returns a resource created from a Go template, parsed and executed with the given context.\ \ [resources.Fingerprint](https://gohugo.io/functions/resources/fingerprint/)\ \ Cryptographically hashes the content of the given resource.\ \ [resources.FromString](https://gohugo.io/functions/resources/fromstring/)\ \ Returns a resource created from a string.\ \ [resources.Get](https://gohugo.io/functions/resources/get/)\ \ Returns a global resource from the given path, or nil if none found.\ \ [resources.GetMatch](https://gohugo.io/functions/resources/getmatch/)\ \ Returns the first global resource from paths matching the given glob pattern, or nil if none found.\ \ [resources.GetRemote](https://gohugo.io/functions/resources/getremote/)\ \ Returns a remote resource from the given URL, or nil if none found.\ \ [resources.Match](https://gohugo.io/functions/resources/match/)\ \ Returns a collection of global resources from paths matching the given glob pattern, or nil if none found.\ \ [resources.Minify](https://gohugo.io/functions/resources/minify/)\ \ Minifies the given resource.\ \ [resources.PostCSS](https://gohugo.io/functions/resources/postcss/)\ \ Processes the given resource with PostCSS using any PostCSS plugin.\ \ [resources.PostProcess](https://gohugo.io/functions/resources/postprocess/)\ \ Processes the given resource after the build.\ \ [resources.ToCSS](https://gohugo.io/functions/resources/tocss/)\ \ Transpiles Sass to CSS.\ \ safe\ ----\ \ Use these functions to declare a value as safe in the context of Go's html/template package.\ \ [safe.CSS](https://gohugo.io/functions/safe/css/)\ \ Declares the given string as a safe CSS string.\ \ [safe.HTML](https://gohugo.io/functions/safe/html/)\ \ Declares the given string as a safeHTML string.\ \ [safe.HTMLAttr](https://gohugo.io/functions/safe/htmlattr/)\ \ Declares the given key-value pair as a safe HTML attribute.\ \ [safe.JS](https://gohugo.io/functions/safe/js/)\ \ Declares the given string as a safe JavaScript expression.\ \ [safe.JSStr](https://gohugo.io/functions/safe/jsstr/)\ \ Declares the given string as a safe JavaScript string.\ \ [safe.URL](https://gohugo.io/functions/safe/url/)\ \ Declares the given string as a safe URL or URL substring.\ \ strings\ -------\ \ Use these functions to work with strings.\ \ [strings.Chomp](https://gohugo.io/functions/strings/chomp/)\ \ Returns the given string, removing all trailing newline characters and carriage returns.\ \ [strings.Contains](https://gohugo.io/functions/strings/contains/)\ \ Reports whether the given string contains the given substring.\ \ [strings.ContainsAny](https://gohugo.io/functions/strings/containsany/)\ \ Reports whether the given string contains any character within the given set.\ \ [strings.ContainsNonSpace](https://gohugo.io/functions/strings/containsnonspace/)\ \ Reports whether the given string contains any non-space characters as defined by Unicode.\ \ [strings.Count](https://gohugo.io/functions/strings/count/)\ \ Returns the number of non-overlapping instances of the given substring within the given string.\ \ [strings.CountRunes](https://gohugo.io/functions/strings/countrunes/)\ \ Returns the number of runes in the given string excluding whitespace.\ \ [strings.CountWords](https://gohugo.io/functions/strings/countwords/)\ \ Returns the number of words in the given string.\ \ [strings.Diff](https://gohugo.io/functions/strings/diff/)\ \ Returns an anchored diff of the two texts OLD and NEW in the unified diff format. If OLD and NEW are identical, returns an empty string.\ \ [strings.FindRE](https://gohugo.io/functions/strings/findre/)\ \ Returns a slice of strings that match the regular expression.\ \ [strings.FindRESubmatch](https://gohugo.io/functions/strings/findresubmatch/)\ \ Returns a slice of all successive matches of the regular expression. Each element is a slice of strings holding the text of the leftmost match of the regular expression and the matches, if any, of its subexpressions.\ \ [strings.FirstUpper](https://gohugo.io/functions/strings/firstupper/)\ \ Returns the given string, capitalizing the first character.\ \ [strings.HasPrefix](https://gohugo.io/functions/strings/hasprefix/)\ \ Reports whether the given string begins with the given prefix.\ \ [strings.HasSuffix](https://gohugo.io/functions/strings/hassuffix/)\ \ Reports whether the given string ends with the given suffix.\ \ [strings.Repeat](https://gohugo.io/functions/strings/repeat/)\ \ Returns a new string consisting of zero or more copies of another string.\ \ [strings.Replace](https://gohugo.io/functions/strings/replace/)\ \ Returns a copy of INPUT, replacing all occurrences of OLD with NEW.\ \ [strings.ReplaceRE](https://gohugo.io/functions/strings/replacere/)\ \ Returns a copy of INPUT, replacing all occurrences of a regular expression with a replacement pattern.\ \ [strings.RuneCount](https://gohugo.io/functions/strings/runecount/)\ \ Returns the number of runes in the given string.\ \ [strings.SliceString](https://gohugo.io/functions/strings/slicestring/)\ \ Returns a substring of the given string, beginning with the start position and ending before the end position.\ \ [strings.Split](https://gohugo.io/functions/strings/split/)\ \ Returns a slice of strings by splitting the given string by a delimiter.\ \ [strings.Substr](https://gohugo.io/functions/strings/substr/)\ \ Returns a substring of the given string, beginning with the start position and ending after the given length.\ \ [strings.Title](https://gohugo.io/functions/strings/title/)\ \ Returns the given string, converting it to title case.\ \ [strings.ToLower](https://gohugo.io/functions/strings/tolower/)\ \ Returns the given string, converting all characters to lowercase.\ \ [strings.ToUpper](https://gohugo.io/functions/strings/toupper/)\ \ Returns the given string, converting all characters to uppercase.\ \ [strings.Trim](https://gohugo.io/functions/strings/trim/)\ \ Returns the given string, removing leading and trailing characters specified in the cutset.\ \ [strings.TrimLeft](https://gohugo.io/functions/strings/trimleft/)\ \ Returns the given string, removing leading characters specified in the cutset.\ \ [strings.TrimPrefix](https://gohugo.io/functions/strings/trimprefix/)\ \ Returns the given string, removing the prefix from the beginning of the string.\ \ [strings.TrimRight](https://gohugo.io/functions/strings/trimright/)\ \ Returns the given string, removing trailing characters specified in the cutset.\ \ [strings.TrimSpace](https://gohugo.io/functions/strings/trimspace/)\ \ Returns the given string, removing leading and trailing whitespace as defined by Unicode.\ \ [strings.TrimSuffix](https://gohugo.io/functions/strings/trimsuffix/)\ \ Returns the given string, removing the suffix from the end of the string.\ \ [strings.Truncate](https://gohugo.io/functions/strings/truncate/)\ \ Returns the given string, truncating it to a maximum length without cutting words or leaving unclosed HTML tags.\ \ templates\ ---------\ \ Use these functions to query the template system.\ \ [templates.Current](https://gohugo.io/functions/templates/current/)\ \ Returns information about the currently executing template.\ \ [templates.Defer](https://gohugo.io/functions/templates/defer/)\ \ Defer execution of a template until after all sites and output formats have been rendered.\ \ [templates.Exists](https://gohugo.io/functions/templates/exists/)\ \ Reports whether a template file exists under the given path relative to the layouts directory.\ \ [templates.Inner](https://gohugo.io/functions/templates/inner/)\ \ Executes the content block enclosed by a partial call.\ \ time\ ----\ \ Use these functions to work with time values.\ \ [time.AsTime](https://gohugo.io/functions/time/astime/)\ \ Returns the given string representation of a date/time value as a time.Time value.\ \ [time.Duration](https://gohugo.io/functions/time/duration/)\ \ Returns a time.Duration value using the given time unit and number.\ \ [time.Format](https://gohugo.io/functions/time/format/)\ \ Returns the given date/time as a formatted and localized string.\ \ [time.In](https://gohugo.io/functions/time/in/)\ \ Returns the given date/time as represented in the specified IANA time zone.\ \ [time.Now](https://gohugo.io/functions/time/now/)\ \ Returns the current local time.\ \ [time.ParseDuration](https://gohugo.io/functions/time/parseduration/)\ \ Returns a time.Duration value by parsing the given duration string.\ \ transform\ ---------\ \ Use these functions to transform values from one format to another.\ \ [transform.CanHighlight](https://gohugo.io/functions/transform/canhighlight/)\ \ Reports whether the given code language is supported by the Chroma highlighter.\ \ [transform.Emojify](https://gohugo.io/functions/transform/emojify/)\ \ Runs a string through the Emoji emoticons processor.\ \ [transform.Highlight](https://gohugo.io/functions/transform/highlight/)\ \ Renders code with a syntax highlighter.\ \ [transform.HighlightCodeBlock](https://gohugo.io/functions/transform/highlightcodeblock/)\ \ Highlights code received in context within a code block render hook.\ \ [transform.HTMLEscape](https://gohugo.io/functions/transform/htmlescape/)\ \ Returns the given string, escaping special characters by replacing them with HTML entities.\ \ [transform.HTMLToMarkdown](https://gohugo.io/functions/transform/htmltomarkdown/)\ \ Converts HTML to Markdown.\ \ [transform.HTMLUnescape](https://gohugo.io/functions/transform/htmlunescape/)\ \ Returns the given string, replacing each HTML entity with its corresponding character.\ \ [transform.Markdownify](https://gohugo.io/functions/transform/markdownify/)\ \ Renders Markdown to HTML.\ \ [transform.Plainify](https://gohugo.io/functions/transform/plainify/)\ \ Returns a string with all HTML tags removed.\ \ [transform.PortableText](https://gohugo.io/functions/transform/portabletext/)\ \ Converts Portable Text to Markdown.\ \ [transform.Remarshal](https://gohugo.io/functions/transform/remarshal/)\ \ Marshals a string of serialized data, or a map, into a string of serialized data in the specified format.\ \ [transform.ToMath](https://gohugo.io/functions/transform/tomath/)\ \ Renders mathematical equations and expressions written in the LaTeX markup language.\ \ [transform.Unmarshal](https://gohugo.io/functions/transform/unmarshal/)\ \ Parses serialized data and returns a map or an array. Supports CSV, JSON, TOML, YAML, and XML.\ \ [transform.XMLEscape](https://gohugo.io/functions/transform/xmlescape/)\ \ Returns the given string, removing disallowed characters then escaping the result to its XML equivalent.\ \ urls\ ----\ \ Use these functions to work with URLs.\ \ [urls.AbsLangURL](https://gohugo.io/functions/urls/abslangurl/)\ \ Returns an absolute URL with a language prefix, if any.\ \ [urls.AbsURL](https://gohugo.io/functions/urls/absurl/)\ \ Returns an absolute URL.\ \ [urls.Anchorize](https://gohugo.io/functions/urls/anchorize/)\ \ Returns the given string, sanitized for usage in an HTML id attribute.\ \ [urls.JoinPath](https://gohugo.io/functions/urls/joinpath/)\ \ Joins the provided elements into a URL string and cleans the result of any ./ or ../ elements. If the argument list is empty, JoinPath returns an empty string.\ \ [urls.Parse](https://gohugo.io/functions/urls/parse/)\ \ Parses a URL into a URL structure.\ \ [urls.PathEscape](https://gohugo.io/functions/urls/pathescape/)\ \ Returns the given string, applying percent-encoding to special characters and reserved delimiters so it can be safely used as a segment within a URL path.\ \ [urls.PathUnescape](https://gohugo.io/functions/urls/pathunescape/)\ \ Returns the given string, replacing all percent-encoded sequences with the corresponding unescaped characters.\ \ [urls.Ref](https://gohugo.io/functions/urls/ref/)\ \ Returns the absolute URL of the page with the given path, language, and output format.\ \ [urls.RelLangURL](https://gohugo.io/functions/urls/rellangurl/)\ \ Returns a relative URL with a language prefix, if any.\ \ [urls.RelRef](https://gohugo.io/functions/urls/relref/)\ \ Returns the relative URL of the page with the given path, language, and output format.\ \ [urls.RelURL](https://gohugo.io/functions/urls/relurl/)\ \ Returns a relative URL.\ \ [urls.URLize](https://gohugo.io/functions/urls/urlize/)\ \ Returns the given string, sanitized for usage in a URL.\ \ * * *\ \ Last updated: April 10, 2025 : [Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)](https://github.com/gohugoio/hugoDocs/commit/283e9778348774c2282f193fc7cf459e45a5c107)\ \ [Improve this page](https://github.com/gohugoio/hugoDocs/edit/master/content/en/quick-reference/functions.md) ---