aboutsummaryrefslogtreecommitdiffhomepage
path: root/content/en/getting-started
diff options
context:
space:
mode:
Diffstat (limited to 'content/en/getting-started')
-rw-r--r--content/en/getting-started/_index.md4
-rw-r--r--content/en/getting-started/configuration-markup.md17
-rw-r--r--content/en/getting-started/configuration.md187
-rw-r--r--content/en/getting-started/directory-structure.md61
-rw-r--r--content/en/getting-started/external-learning-resources/index.md1
-rw-r--r--content/en/getting-started/glossary.md279
-rw-r--r--content/en/getting-started/quick-start.md2
-rw-r--r--content/en/getting-started/usage.md35
8 files changed, 358 insertions, 228 deletions
diff --git a/content/en/getting-started/_index.md b/content/en/getting-started/_index.md
index 3265e1782..780b96a62 100644
--- a/content/en/getting-started/_index.md
+++ b/content/en/getting-started/_index.md
@@ -2,8 +2,8 @@
title: Getting started
linkTitle: Overview
description: Quick start and guides for installing Hugo on your preferred operating system.
-categories: [getting started]
-keywords: [usage,docs]
+categories: []
+keywords: []
menu:
docs:
identifier: getting-started-overview
diff --git a/content/en/getting-started/configuration-markup.md b/content/en/getting-started/configuration-markup.md
index 02c4ea998..607301d3a 100644
--- a/content/en/getting-started/configuration-markup.md
+++ b/content/en/getting-started/configuration-markup.md
@@ -1,7 +1,7 @@
---
title: Configure markup
description: Configure rendering of markup to HTML.
-categories: [fundamentals, getting started]
+categories: [getting started,fundamentals]
keywords: [configuration,highlighting]
menu:
docs:
@@ -16,7 +16,7 @@ toc: true
By default, Hugo uses [Goldmark] to render markdown to HTML.
-{{< code-toggle file=hugo copy=false >}}
+{{< code-toggle file=hugo >}}
[markup]
defaultMarkdownHandler = 'goldmark'
{{< /code-toggle >}}
@@ -54,9 +54,9 @@ Unless you need a unique capability provided by one of the alternate markdown ha
This is the default configuration for the Goldmark markdown renderer:
-{{< code-toggle config="markup.goldmark" />}}
+{{< code-toggle config=markup.goldmark />}}
-For details on the extensions, refer to [this section](https://github.com/yuin/goldmark/#built-in-extensions) of the Goldmark documentation
+For details on the extensions, refer to the [Goldmark documentation](https://github.com/yuin/goldmark/#built-in-extensions).
Some settings explained:
@@ -82,7 +82,6 @@ Markdown|Replaced by|Description
`”`|`&rdquo;`|right double quote
`’`|`&rsquo;`|right single quote
-
attribute
: Enable custom attribute support for titles and blocks by adding attribute lists inside single curly brackets (`{.myclass class="class1 class2" }`) and placing it _after the Markdown element it decorates_, on the same line for titles and on a new line directly below for blocks.
@@ -120,13 +119,13 @@ Note that attributes in [code fences](/content-management/syntax-highlighting/#h
````
autoHeadingIDType ("github")
-: The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-Ascii characters after accent normalization, and `blackfriday` will make the IDs compatible with Blackfriday, the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/urls/anchorize) template func.
+: The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-ASCII characters after accent normalization, and `blackfriday` will make the IDs compatible with Blackfriday, the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/urls/anchorize) template func.
## Asciidoc
This is the default configuration for the AsciiDoc markdown renderer:
-{{< code-toggle config="markup.asciidocExt" />}}
+{{< code-toggle config=markup.asciidocExt />}}
attributes
: (`map`) Variables to be referenced in your AsciiDoc file. This is a list of variable name/value maps. See Asciidoctor’s [attributes].
@@ -190,7 +189,7 @@ INFO 2019/12/22 09:08:48 Rendering book-as-pdf.adoc with C:\Ruby26-x64\bin\ascii
This is the default `highlight` configuration. Note that some of these settings can be set per code block, see [Syntax Highlighting](/content-management/syntax-highlighting/).
-{{< code-toggle config="markup.highlight" />}}
+{{< code-toggle config=markup.highlight />}}
For `style`, see these galleries:
@@ -201,7 +200,7 @@ For CSS, see [Generate Syntax Highlighter CSS](/content-management/syntax-highli
## Table of contents
-{{< code-toggle config="markup.tableOfContents" />}}
+{{< code-toggle config=markup.tableOfContents />}}
These settings only works for the Goldmark renderer:
diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md
index e72bb8d3b..2ab5450f3 100644
--- a/content/en/getting-started/configuration.md
+++ b/content/en/getting-started/configuration.md
@@ -2,15 +2,15 @@
title: Configure Hugo
linkTitle: Configuration
description: How to configure your Hugo site.
-categories: [fundamentals,getting started]
+categories: [getting started,fundamentals]
keywords: [configuration,toml,yaml,json]
menu:
docs:
parent: getting-started
weight: 40
weight: 40
-aliases: [/overview/source-directory/,/overview/configuration/]
toc: true
+aliases: [/overview/source-directory/,/overview/configuration/]
---
## Configuration file
@@ -35,7 +35,7 @@ Multiple site configuration files can be specified as a comma-separated string t
In Hugo 0.110.0 we changed the default configuration base file name to `hugo`, e.g. `hugo.toml`. We will still look for `config.toml` etc., but we recommend you eventually rename it (but you need to wait if you want to support older Hugo versions). The main reason we're doing this is to make it easier for code editors and build tools to identify this as a Hugo configuration file and project.
-{{< new-in "0.110.0" >}}
+{{< new-in 0.110.0 >}}
## Configuration directory
@@ -44,12 +44,12 @@ In addition to using a single site configuration file, one can use the `configDi
- Each file represents a configuration root object, such as `params.toml` for `[Params]`, `menu(s).toml` for `[Menu]`, `languages.toml` for `[Languages]` etc...
- Each file's content must be top-level, for example:
-{{< code-toggle file="hugo" >}}
+{{< code-toggle file=hugo >}}
[Params]
foo = "bar"
{{< /code-toggle >}}
-{{< code-toggle file="params" >}}
+{{< code-toggle file=params >}}
foo = "bar"
{{< /code-toggle >}}
@@ -74,28 +74,56 @@ foo = "bar"
Considering the structure above, when running `hugo --environment staging`, Hugo will use every setting from `config/_default` and merge `staging`'s on top of those.
-Let's take an example to understand this better. Let's say you are using Google Analytics for your website. This requires you to specify `googleAnalytics = "G-XXXXXXXX"` in `hugo.toml`. Now consider the following scenario:
-- You don't want the Analytics code to be loaded in development i.e. in your `localhost`
-- You want to use separate googleAnalytics IDs for your production & staging environments (say):
- - `G-PPPPPPPP` for production
- - `G-SSSSSSSS` for staging
+Let's take an example to understand this better. Let's say you are using Google Analytics for your website. This requires you to specify a [Google tag ID] in your site configuration:
-This is how you need to configure your `hugo.toml` files considering the above scenario:
-1. In `_default/hugo.toml` you don't need to mention `googleAnalytics` parameter at all. This ensures that no Google Analytics code is loaded in your development server i.e. when you run `hugo server`. This works since, by default Hugo sets `Environment=development` when you run `hugo server` which uses the configuration files from `_default` folder
-2. In `production/hugo.toml` you just need to have one line:
+[Google tag ID]: https://support.google.com/tagmanager/answer/12326985?hl=en
- ```googleAnalytics = "G-PPPPPPPP"```
+{{< code-toggle file=hugo >}}
+[services.googleAnalytics]
+ID = 'G-XXXXXXXXX'
+{{< /code-toggle >}}
- You don't need to mention all other parameters like `title`, `baseURL`, `theme` etc. again in this configuration file. You need to mention only those parameters which are different or new for the production environment. This is due to the fact that Hugo is going to __merge__ this on top of `_default/hugo.toml`. Now when you run `hugo` (build command), by default hugo sets `Environment=production`, so the `G-PPPPPPPP` analytics code will be there in your production website
-3. Similarly in `staging/hugo.toml` you just need to have one line:
+Now consider the following scenario:
- ```googleAnalytics = "G-SSSSSSSS"```
+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:
- Now you need to tell Hugo that you are using the staging environment. So your build command should be `hugo --environment staging` which will load the `G-SSSSSSSS` analytics code in your staging website
+ - `G-PPPPPPPPP` for production
+ - `G-SSSSSSSSS` for staging
-{{% note %}}
-Default environments are __development__ with `hugo server` and __production__ with `hugo`.
-{{%/ note %}}
+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:
+
+ {{< code-toggle file=hugo >}}
+ [services.googleAnalytics]
+ ID = 'G-PPPPPPPPP'
+ {{< /code-toggle >}}
+
+ You do not need to include other parameters in this file. Include only those parameters that are specific to your production environment. Hugo will merge these parameters with the default configuration.
+
+ By default, Hugo sets its `environment` to `production` when running `hugo`. The analytics code will use the `G-PPPPPPPPP` tag ID.
+
+3. `config/staging/hugo.toml`
+
+ Include this section only:
+
+ {{< code-toggle file=hugo >}}
+ [services.googleAnalytics]
+ ID = 'G-SSSSSSSSS'
+ {{< /code-toggle >}}
+
+ You do not need to include other parameters in this file. Include only those parameters that are specific to your staging environment. Hugo will merge these parameters with the default configuration.
+
+ To build your staging site, run `hugo --environment staging`. The analytics code will use the `G-SSSSSSSSS` tag ID.
## Merge configuration from themes
@@ -112,7 +140,7 @@ deep
Note that you don't need to be so verbose as in the default setup below; a `_merge` value higher up will be inherited if not set.
-{{< code-toggle file="hugo" dataKey="config_helpers.mergeStrategy" skipHeader=true />}}
+{{< code-toggle file=hugo dataKey="config_helpers.mergeStrategy" skipHeader=true />}}
## All configuration settings
@@ -162,13 +190,19 @@ See [Configure File Caches](#configure-file-caches)
### cascade
-Pass down default configuration values (front matter) to pages in the content tree. The options in site configuration is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
+Pass down down default configuration values (front matter) to pages in the content tree. The options in site config is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
+
+{{% note %}}
+For a website in a single language, define the `[[cascade]]` in [Front Matter](/content-management/front-matter#front-matter-cascade). For a multilingual website, define the `[[cascade]]` in [Site Config](../../getting-started/configuration/#cascade).
+
+To remain consistent and prevent unexpected behaviour, do not mix these strategies.
+{{% /note %}}
### canonifyURLs
**Default value:** false
-Enable to turn relative URLs into absolute. See [details](/content-management/urls/#canonical-urls).
+Enable to turn relative URLs into absolute. See&nbsp;[details](/content-management/urls/#canonical-urls).
### cleanDestinationDir
@@ -240,7 +274,7 @@ Do not convert the url/path to lowercase.
**Default value:** false
-Enable Emoji emoticons support for page content; see the [Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet/).
+Enable Emoji emoticons support for page content; see the [emoji shortcode quick reference guide](/quick-reference/emojis/).
### enableGitInfo
@@ -270,12 +304,6 @@ Enable generation of `robots.txt` file.
See [Front matter Configuration](#configure-front-matter).
-### googleAnalytics
-
-**Default value:** ""
-
-Google Analytics tracking ID.
-
### hasCJKLanguage
**Default value:** false
@@ -355,7 +383,7 @@ Default number of elements per page in [pagination](/templates/pagination/).
**Default value:** "page"
-The path element used during pagination (`https://example.com/page/2`).
+The path element used during pagination (`https://example.org/page/2`).
### permalinks
@@ -381,7 +409,7 @@ See [Related Content](/content-management/related/#configure-related-content).
**Default value:** false
-Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs. See [details](/content-management/urls/#relative-urls).
+Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs. See&nbsp;[details](/content-management/urls/#relative-urls).
### refLinksErrorLevel
@@ -403,12 +431,6 @@ Removes [non-spacing marks](https://www.compart.com/en/unicode/category/Mn) from
content/post/hügó.md → https://example.org/post/hugo/
```
-### rssLimit
-
-**Default value:** -1 (unlimited)
-
-Maximum number of items in the RSS feed.
-
### sectionPagesMenu
See [Menus](/content-management/menus/#define-automatically).
@@ -491,9 +513,9 @@ enableemoji: true
The `build` configuration section contains global build-related configuration options.
-{{< code-toggle config="build" />}}
+{{< code-toggle config=build />}}
-buildStats {{< new-in "0.115.1" >}}
+buildStats {{< new-in 0.115.1 >}}
: When enabled, creates a `hugo_stats.json` file in the root of your project. This file contains arrays of the `class` attributes, `id` attributes, and tags of every HTML element within your published site. Use this file as data source when [removing unused CSS] from your site. This process is also known as pruning, purging, or tree shaking.
[removing unused CSS]: /hugo-pipes/postprocess/#css-purging-with-postcss
@@ -523,11 +545,11 @@ useResourceCacheWhen
## Configure cache busters
-{{< new-in "0.112.0" >}}
+{{< new-in 0.112.0 >}}
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:
-{{< code-toggle file="hugo" >}}
+{{< code-toggle file=hugo >}}
[build]
[build.buildStats]
enable = true
@@ -557,8 +579,7 @@ target
This is only relevant when running `hugo server`, and it allows to set HTTP headers during development, which allows you to test out your Content Security Policy and similar. The configuration format matches [Netlify's](https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file) with slightly more powerful [Glob matching](https://github.com/gobwas/glob):
-
-{{< code-toggle file="hugo" >}}
+{{< code-toggle file=hugo >}}
[server]
[[server.headers]]
for = "/**"
@@ -573,7 +594,7 @@ Content-Security-Policy = "script-src localhost:1313"
Since this is "development only", it may make sense to put it below the `development` environment:
-{{< code-toggle file="config/development/server">}}
+{{< code-toggle file=config/development/server >}}
[[headers]]
for = "/**"
@@ -589,7 +610,7 @@ You can also specify simple redirects rules for the server. The syntax is again
Note that a `status` code of 200 will trigger a [URL rewrite](https://docs.netlify.com/routing/redirects/rewrites-proxies/), which is what you want in SPA situations, e.g:
-{{< code-toggle file="config/development/server">}}
+{{< code-toggle file=config/development/server >}}
[[redirects]]
from = "/myspa/**"
to = "/myspa/"
@@ -601,11 +622,11 @@ Setting `force=true` will make a redirect even if there is existing content in t
## 404 server error page {#_404-server-error-page}
-{{< new-in "0.103.0" >}}
+{{< new-in 0.103.0 >}}
Hugo will, by default, render all 404 errors when running `hugo server` with the `404.html` template. Note that if you have already added one or more redirects to your [server configuration](#configure-server), you need to add the 404 redirect explicitly, e.g:
-{{< code-toggle file="config/development/server" copy=false >}}
+{{< code-toggle file=config/development/server >}}
[[redirects]]
from = "/**"
to = "/404.html"
@@ -614,17 +635,27 @@ status = 404
## Configure title case
-Set `titleCaseStyle` to specify the title style used by the [title](/functions/strings/title) template function and the automatic section titles in Hugo.
+By default, Hugo follows the capitalization rules published in the [Associated Press Stylebook] when creating automatic section titles, and when transforming strings with the [`strings.Title`] function.
-Can be one of:
+Change this behavior by setting `titleCaseStyle` in your site configuration to any of the values below:
-* `ap` (default), the capitalization rules in the [Associated Press (AP) Stylebook]
-* `chicago`, the [Chicago Manual of Style]
-* `go`, Go's convention of capitalizing every word.
-* `firstupper`, capitalize the first letter of the first word.
-* `none`, no capitalization.
+ap
+: Use the capitalization rules published in the [Associated Press Stylebook].
-[Associated Press (AP) Stylebook]: https://www.apstylebook.com/
+chicago
+: Use the capitalization rules published in the [Chicago Manual of Style].
+
+go
+: Capitalize the first letter of every word.
+
+firstupper
+: Capitalize the first letter of the first word.
+
+none
+: Disable transformation of automatic section titles, and disable the transformation performed by the `strings.Title` function. This is useful if you would prefer to manually capitalize section titles as needed, and to bypass opinionated theme usage of the `strings.Title` function.
+
+[`strings.Title`]: /functions/strings/title
+[Associated Press Stylebook]: https://www.apstylebook.com/
[Chicago Manual of Style]: https://www.chicagomanualofstyle.org/home.html
[site configuration]: /getting-started/configuration/#configure-title-case
@@ -647,7 +678,7 @@ In your configuration file, you can direct Hugo as to how you want your website
The following is a typical example of a configuration file. The values nested under `params:` will populate the [`.Site.Params`] variable for use in [templates]:
-{{< code-toggle file="hugo" >}}
+{{< code-toggle file=hugo >}}
baseURL: "https://yoursite.example.com/"
title: "My Hugo Site"
permalinks:
@@ -684,19 +715,21 @@ If you are using snake_cased variable names, the above will not work. Hugo deter
## Ignore content and data files when rendering
-**Note:** This works, but we recommend you use the newer and more powerful [includeFiles and excludeFiles](/hugo-modules/configuration/#module-configuration-mounts) mount options.
+{{% note %}}
+This works, but we recommend you use the newer and more powerful [includeFiles and excludeFiles](/hugo-modules/configuration/#module-configuration-mounts) mount options.
+{{% /note %}}
To exclude specific files from the `content`, `data`, and `i18n` directories when rendering your site, set `ignoreFiles` to one or more regular expressions to match against the absolute file path.
To ignore files ending with `.foo` or `.boo`:
-{{< code-toggle copy=false file="hugo" >}}
+{{< code-toggle file=hugo >}}
ignoreFiles = ['\.foo$', '\.boo$']
{{< /code-toggle >}}
To ignore a file using the absolute file path:
-{{< code-toggle copy=false file="hugo" >}}
+{{< code-toggle file=hugo >}}
ignoreFiles = ['^/home/user/project/content/test\.md$']
{{< /code-toggle >}}
@@ -708,11 +741,11 @@ Dates are important in Hugo, and you can configure how Hugo assigns dates to you
The default configuration is:
-{{< code-toggle config="frontmatter" />}}
+{{< code-toggle config=frontmatter />}}
If you, as an example, have a non-standard date parameter in some of your content, you can override the setting for `date`:
-{{< code-toggle file="hugo" >}}
+{{< code-toggle file=hugo >}}
[frontmatter]
date = ["myDate", ":default"]
{{< /code-toggle >}}
@@ -728,7 +761,7 @@ The special date handlers are:
An example:
-{{< code-toggle file="hugo" >}}
+{{< code-toggle file=hugo >}}
[frontmatter]
lastmod = ["lastmod", ":fileModTime", ":default"]
{{< /code-toggle >}}
@@ -740,7 +773,7 @@ The above will try first to extract the value for `.Lastmod` starting with the `
An example:
-{{< code-toggle file="hugo" >}}
+{{< code-toggle file=hugo >}}
[frontmatter]
date = [":filename", ":default"]
{{< /code-toggle >}}
@@ -758,32 +791,32 @@ Hugo v0.20 introduced the ability to render your content to multiple output form
Default configuration:
-{{< code-toggle config="minify" />}}
+{{< code-toggle config=minify />}}
## Configure file caches
Since Hugo 0.52 you can configure more than just the `cacheDir`. This is the default configuration:
-{{< code-toggle config="caches" />}}
+{{< code-toggle config=caches />}}
You can override any of these cache settings in your own `hugo.toml`.
### The keywords explained
-`:cacheDir`
-: See [Configure cacheDir](#configure-cachedir).
+cacheDir
+: (`string`) See [Configure cacheDir](#configure-cachedir).
-`:project`
-: The base directory name of the current Hugo project. This means that, in its default setting, every project will have separated file caches, which means that when you do `hugo --gc` you will not touch files related to other Hugo projects running on the same PC.
+project
+: (`string`) The base directory name of the current Hugo project. This means that, in its default setting, every project will have separated file caches, which means that when you do `hugo --gc` you will not touch files related to other Hugo projects running on the same PC.
-`:resourceDir`
-: This is the value of the `resourceDir` configuration option.
+resourceDir
+: (`string`) This is the value of the `resourceDir` configuration option.
maxAge
-: This is the duration before a cache entry will be evicted, -1 means forever and 0 effectively turns that particular cache off. Uses Go's `time.Duration`, so valid values are `"10s"` (10 seconds), `"10m"` (10 minutes) and `"10h"` (10 hours).
+: (`string`) This is the duration before a cache entry will be evicted, -1 means forever and 0 effectively turns that particular cache off. Uses Go's `time.Duration`, so valid values are `"10s"` (10 seconds), `"10m"` (10 minutes) and `"10h"` (10 hours).
dir
-: The absolute path to where the files for this cache will be stored. Allowed starting placeholders are `:cacheDir` and `:resourceDir` (see above).
+: (`string`) The absolute path to where the files for this cache will be stored. Allowed starting placeholders are `:cacheDir` and `:resourceDir` (see above).
## Configuration format specs
@@ -801,7 +834,6 @@ dir
[yaml]: https://yaml.org/spec/
[static-files]: /content-management/static-files/
-
## Configure cacheDir
This is the directory where Hugo by default will store its file caches. See [Configure File Caches](#configure-file-caches).
@@ -811,10 +843,9 @@ This can be set using the `cacheDir` config option or via the OS env variable `H
If this is not set, Hugo will use, in order of preference:
1. If running on Netlify: `/opt/build/cache/hugo_cache/`. This means that if you run your builds on Netlify, all caches configured with `:cacheDir` will be saved and restored on the next build. For other CI vendors, please read their documentation. For an CircleCI example, see [this configuration](https://github.com/bep/hugo-sass-test/blob/6c3960a8f4b90e8938228688bc49bdcdd6b2d99e/.circleci/config.yml).
-1. In a `hugo_cache` directory below the OS user cache directory as defined by Go's [os.UserCacheDir](https://pkg.go.dev/os#UserCacheDir). On Unix systems, this is `$XDG_CACHE_HOME` as specified by [basedir-spec-latest](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) 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`. {{< new-in "0.116.0" >}}
+1. In a `hugo_cache` directory below the OS user cache directory as defined by Go's [os.UserCacheDir](https://pkg.go.dev/os#UserCacheDir). On Unix systems, this is `$XDG_CACHE_HOME` as specified by [basedir-spec-latest](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) 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`. {{< new-in 0.116.0 >}}
1. In a `hugo_cache_$USER` directory below the OS temp dir.
If you want to know the current value of `cacheDir`, you can run `hugo config`, e.g: `hugo config | grep cachedir`.
-
[`time`]: /functions/time/astime
diff --git a/content/en/getting-started/directory-structure.md b/content/en/getting-started/directory-structure.md
index ecdda25cd..f91849375 100644
--- a/content/en/getting-started/directory-structure.md
+++ b/content/en/getting-started/directory-structure.md
@@ -1,22 +1,22 @@
---
title: Directory structure
description: Each Hugo project is a directory, with subdirectories that contribute to the content, structure, behavior, and presentation of your site.
-categories: [fundamentals,getting started]
+categories: [getting started,fundamentals]
keywords: [source, organization, directories]
menu:
docs:
parent: getting-started
weight: 30
weight: 30
-aliases: [/overview/source-directory/]
toc: true
+aliases: [/overview/source-directory/]
---
## Site skeleton
Hugo generates a project skeleton when you create a new site. For example, this command:
-```text
+```sh
hugo new site my-site
```
@@ -25,7 +25,7 @@ Creates this directory structure:
```txt
my-site/
├── archetypes/
-│   └── default.md
+│ └── default.md
├── assets/
├── content/
├── data/
@@ -41,11 +41,11 @@ Depending on requirements, you may wish to organize your site configuration into
```txt
my-site/
├── archetypes/
-│   └── default.md
+│ └── default.md
├── assets/
├── config/ <-- site configuration
-│   └── _default/
-│   └── hugo.toml
+│ └── _default/
+│ └── hugo.toml
├── content/
├── data/
├── i18n/
@@ -59,11 +59,11 @@ When you build your site, Hugo creates a `public` directory, and typically a `re
```txt
my-site/
├── archetypes/
-│   └── default.md
+│ └── default.md
├── assets/
├── config/
-│   └── _default/
-│   └── hugo.toml
+│ └── _default/
+│ └── hugo.toml
├── content/
├── data/
├── i18n/
@@ -119,15 +119,15 @@ Hugo creates a union file system, allowing you to mount two or more directories
home/
└── user/
├── my-site/
- │   ├── content/
- │   │   ├── books/
- │   │   │   ├── _index.md
- │   │   │   ├── book-1.md
- │   │   │   └── book-2.md
- │   │   └── _index.md
- │   ├── themes/
- │   │   └── my-theme/
- │   └── hugo.toml
+ │ ├── content/
+ │ │ ├── books/
+ │ │ │ ├── _index.md
+ │ │ │ ├── book-1.md
+ │ │ │ └── book-2.md
+ │ │ └── _index.md
+ │ ├── themes/
+ │ │ └── my-theme/
+ │ └── hugo.toml
└── shared-content/
└── films/
├── _index.md
@@ -137,7 +137,7 @@ home/
You can include the shared content when you build your site using mounts. In your site configuration:
-{{< code-toggle file=hugo copy=false >}}
+{{< code-toggle file=hugo >}}
[[module.mounts]]
source = 'content'
target = 'content'
@@ -160,17 +160,17 @@ home/
└── user/
└── my-site/
├── content/
- │   ├── books/
- │   │   ├── _index.md
- │   │   ├── book-1.md
- │   │   └── book-2.md
- │   ├── films/
- │   │   ├── _index.md
- │   │   ├── film-1.md
- │   │   └── film-2.md
- │   └── _index.md
+ │ ├── books/
+ │ │ ├── _index.md
+ │ │ ├── book-1.md
+ │ │ └── book-2.md
+ │ ├── films/
+ │ │ ├── _index.md
+ │ │ ├── film-1.md
+ │ │ └── film-2.md
+ │ └── _index.md
├── themes/
- │   └── my-theme/
+ │ └── my-theme/
└── hugo.toml
```
@@ -182,7 +182,6 @@ You can mount directories to `archetypes`, `assets`, `content`, `data`, `i18n`,
You can also mount directories from Git repositories using Hugo Modules. See&nbsp;[details](/hugo-modules/).
-
## Theme skeleton
Hugo generates a functional theme skeleton when you create a new theme. For example, this command:
diff --git a/content/en/getting-started/external-learning-resources/index.md b/content/en/getting-started/external-learning-resources/index.md
index 4337c51a4..634439bc6 100644
--- a/content/en/getting-started/external-learning-resources/index.md
+++ b/content/en/getting-started/external-learning-resources/index.md
@@ -1,6 +1,7 @@
---
title: External learning resources
description: A list of tutorials and books on Hugo.
+categories: [getting started]
keywords: [books, tutorials, learning, usage]
menu:
docs:
diff --git a/content/en/getting-started/glossary.md b/content/en/getting-started/glossary.md
index 759cb1cd1..edf64ab89 100644
--- a/content/en/getting-started/glossary.md
+++ b/content/en/getting-started/glossary.md
@@ -1,274 +1,375 @@
---
title: Glossary of terms
description: Terms commonly used throughout the documentation.
+categories: [getting started]
keywords: [glossary]
menu:
docs:
parent: getting-started
weight: 60
weight: 60
-type: glossary
+# Use level 6 headings for each term in the glossary.
---
-<!-- Use level 3 headings for each term in the glossary. -->
-
-### action
+###### action
See [template action](#template-action).
-### archetype
+###### archetype
-A template for new content. See [details](/content-management/archetypes/).
+A template for new content. See&nbsp;[details](/content-management/archetypes/).
-### argument
+###### argument
A [scalar](#scalar), [array](#array), [slice](#slice), [map](#map), or [object](#object) passed to a [function](#function), [method](#method), or [shortcode](#shortcode).
-### array
+###### array
-A numbered sequence of elements. Unlike Go's [slice](#slice) data type, an array has a fixed length. See the [Go&nbsp;documentation](https://go.dev/ref/spec#Array_types) for details.
+A numbered sequence of elements. Unlike Go's [slice](#slice) data type, an array has a fixed length. [Elements](#element) within an array can be [scalars](#scalar), slices, [maps](#map), pages, or other arrays. See the [Go&nbsp;documentation](https://go.dev/ref/spec#Array_types) for details.
-### bool
+###### bool
See [boolean](#boolean).
-### boolean
+###### boolean
A data type with two possible values, either `true` or `false`.
-### branch bundle
+###### branch bundle
-A [page bundle](#page-bundle) with an&nbsp;_index.md file and zero or more [resources](#resource). Analogous to a physical branch, a branch bundle may have descendants including regular pages, [leaf bundles](/getting-started/glossary/#leaf-bundle), and other branch bundles. See [details](/content-management/page-bundles/).
+A [page bundle](#page-bundle) with an&nbsp;_index.md file and zero or more [resources](#resource). Analogous to a physical branch, a branch bundle may have descendants including regular pages, [leaf bundles](/getting-started/glossary/#leaf-bundle), and other branch bundles. See&nbsp;[details](/content-management/page-bundles/).
-### build
+###### build
To generate a static site that includes HTML files and assets such as images, CSS, and JavaScript. The build process includes rendering and resource transformations.
-### bundle
+###### bundle
See [page bundle](#page-bundle).
-### cache
+###### cache
A software component that stores data so that future requests for the same data are faster.
-### collection
+###### chain
+
+Within a template, to connect one or more [identifiers](#identifier) with a dot. An identifier can represent a method, object, or field. For example, `.Site.Params.author.name` or `.Date.UTC.Hour`.
-Typically, a collection of pages, but may also refer to an [array](#array), [slice](#slice), or [map](#map). For example, the pages within a site's "articles" section are a page collection.
+###### collection
-### content format
+An [array](#array), [slice](#slice), or [map](#map).
-A markup language for creating content. Typically markdown, but may also be HTML, AsciiDoc, Org, Pandoc, or reStructuredText. See [details](/content-management/formats/).
+###### content format
-### content type
+A markup language for creating content. Typically markdown, but may also be HTML, AsciiDoc, Org, Pandoc, or reStructuredText. See&nbsp;[details](/content-management/formats/).
+
+###### content type
A classification of content inferred from the top-level directory name or the `type` set in [front matter](#front-matter). Pages in the root of the content directory, including the home page, are of type "page". Accessed via `.Page.Type` in [templates](#template). See&nbsp;[details](/content-management/types/).
-### content view
+###### content view
A template called with the `.Page.Render` method. See&nbsp;[details](/templates/views/).
-### context
+###### context
+
+Represented by a dot "." within a [template action](#template-action), context is the current location in a data structure. For example, while iterating over a [collection](#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&nbsp;[details](/templates/introduction/#the-dot).
+
+###### default sort order
+
+The default sort order for page collections. Hugo sorts by [weight](#weight), then by date (descending), then by link title, and then by file path.
+
+###### element
+
+A member of a slice or array.
+
+###### environment
+
+Typically one of `development`, `staging`, or `production`, each environment may exhibit different behavior depending on configuration and template logic. For example, in a production environment you might minify and fingerprint CSS, but that probably doesn't make sense in a development environment.
+
+When running the built-in development server with the `hugo server` command, the environment is set to `development`. When building your site with the `hugo` command, the environment is set to `production`. To override the environment value, use the `--environment` command line flag.
+
+To determine the current environment within a template, use the [`hugo.Environment`] function.
+
+[`hugo.Environment`]: /functions/hugo/environment
-Represented by a period "." within a [template action](#template-action), context is the current location in a data structure. For example, while iterating over a [collection](#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](/templates/introduction/#the-dot).
+###### field
-### flag
+A predefined key/value pair in front matter such as `date` or `title`. See&nbsp;also&nbsp;[parameter](#parameter).
-An option passed to a command-line program, beginning with one or two hyphens. See [details](/commands/hugo/).
-### float
+###### flag
+
+An option passed to a command-line program, beginning with one or two hyphens. See&nbsp;[details](/commands/hugo/).
+
+###### float
See [floating point](#floating-point).
-### floating point
+###### floating point
A numeric data type with a fractional component. For example, `3.14159`.
-### function
+###### fragment
-Used within a [template action](#template-action), a function takes one or more [arguments](#argument) and returns a value. Unlike [methods](#method), functions are not associated with an [object](#object). See [details](/functions/).
+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
+###### front matter
Metadata at the beginning of each content page, separated from the content by format-specific delimiters. See&nbsp;[details](/content-management/front-matter/).
-### identifier
+###### function
+
+Used within a [template action](#template-action), a function takes one or more [arguments](#argument) and returns a value. Unlike [methods](#method), functions are not associated with an [object](#object). See&nbsp;[details](/functions/).
+
+###### global resource
+
+A file within the assets directory, or within any directory [mounted](/hugo-modules/configuration/#module-configuration-mounts) to the assets directory. Capture one or more global resources using the [`resources.Get`], [`resources.GetMatch`], [`resources.Match`], or [`resources.ByType`] functions.
+
+[`resources.Get`]: /functions/resources/get
+[`resources.GetMatch`]: /functions/resources/getmatch
+[`resources.Match`]: /functions/resources/match
+[`resources.ByType`]: /functions/resources/byType
+
+###### identifier
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
+###### int
See [integer](#integer).
-### integer
+###### integer
A numeric data type without a fractional component. For example, `42`.
-### internationalization
+###### internationalization
Software design and development efforts that enable [localization](#localization). See the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated i18n.
-### kind
+###### kind
See [page kind](#page-kind).
-### layout
+###### layout
See [template](#template).
-### leaf bundle
+###### leaf bundle
-A [page bundle](#page-bundle) with an index.md file and zero or more [resources](#resource). Analogous to a physical leaf, a leaf bundle is at the end of a branch. Hugo ignores content (but not resources) beneath the leaf bundle. See [details](/content-management/page-bundles/).
+A [page bundle](#page-bundle) with an index.md file and zero or more [resources](#resource). Analogous to a physical leaf, a leaf bundle is at the end of a branch. Hugo ignores content (but not resources) beneath the leaf bundle. See&nbsp;[details](/content-management/page-bundles/).
-### list page
+###### list page
Any [page kind](#page-kind) that receives a page [collection](#collection) in [context](#context). This includes the home page, [section pages](#section-page), [taxonomy pages](#taxonomy-page), and [term pages](#term-page).
-### localization
+###### localization
-Adaptation of a site to meet language and regional requirements. This includes translations, language-specific media, date and currency formats, etc. See [details](/content-management/multilingual/) and the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated l10n.
+Adaptation of a site to meet language and regional requirements. This includes translations, language-specific media, date and currency formats, etc. See&nbsp;[details](/content-management/multilingual/) and the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated l10n.
-### map
+###### map
An unordered group of elements, each indexed by a unique key. See the [Go&nbsp;documentation](https://go.dev/ref/spec#Map_types) for details.
-### method
+###### markdown attribute
+
+A list of attributes, containing one or more key/value pairs, separated by spaces or commas, and wrapped by braces. Apply markdown attributes to images and block-level elements including blockquotes, fenced code blocks, headings, horizontal rules, lists, paragraphs, and tables. See&nbsp;[details](/getting-started/configuration-markup/#goldmark).
+
+###### marshal
+
+To transform a data structure into a serialized object. For example, transforming a [map](#map) into a JSON string. See [unmarshal](#unmarshal).
+
+###### method
Used within a [template action](#template-action) and associated with an [object](#object), a method takes zero or more [arguments](#argument) and either returns a value or performs an action. For example, `.IsHome` is a method on the `.Page` object which returns `true` if the current page is the home page. See also [function](#function).
-### module
+###### module
-Like a [theme](#theme), a module is a packaged combination of [archetypes](#archetype), assets, content, data, [templates](#template), translation tables, static files, or configuration settings. A module may serve as the basis for a new site, or to augment an existing site. See [details](/hugo-modules/).
+Like a [theme](#theme), a module is a packaged combination of [archetypes](#archetype), assets, content, data, [templates](#template), translation tables, static files, or configuration settings. A module may serve as the basis for a new site, or to augment an existing site. See&nbsp;[details](/hugo-modules/).
-### object
+###### object
A data structure with or without associated [methods](#method).
-### page bundle
+###### ordered taxonomy
+
+Created by invoking the [`Alphabetical`] or [`ByCount`] method on a [taxonomy object](#taxonomy-object), which is a [map](#map), an ordered taxonomy is a [slice](#slice), where each element is an object that contains the [term](#term) and a slice of its [weighted pages](#weighted-page).
+
+[`Alphabetical`]: /methods/taxonomy/alphabetical
+[`ByCount`]: /methods/taxonomy/bycount
-A directory that encapsulates both content and associated [resources](#resource). There are two types of page bundles: [leaf bundles](/getting-started/glossary/#leaf-bundle) and [branch bundles](/getting-started/glossary/#branch-bundle). See [details](/content-management/page-bundles/).
+###### output format
-### page kind
+{{% include "methods/page/_common/output-format-definition.md" %}}
-A classification of rendered pages, one of "home", "page", "section", "taxonomy", or "term". Accessed via `.Page.Kind` in [templates](#template). See&nbsp;[details](/templates/section-templates/#page-kinds).
+###### page bundle
-### pager
+A directory that encapsulates both content and associated [resources](#resource). There are two types of page bundles: [leaf bundles](#leaf-bundle) and [branch bundles](#branch-bundle). See&nbsp;[details](/content-management/page-bundles/).
+
+###### page kind
+
+A classification of pages, one of `home`, `page`, `section`, `taxonomy`, or `term`. See&nbsp;[details](/templates/section-templates/#page-kinds).
+
+Note that there are also `RSS`, `sitemap`, `robotsTXT`, and `404` page kinds, but these are only available during the rendering of each of these respective page's kind and therefore *not* available in any of the `Pages` collections.
+
+###### page resource
+
+A file within a [page bundle](#page-bundle). Capture one or more page resources using any of the [`Resources`] methods on a `Page` object.
+
+[`Resources`]: /methods/page/resources/#methods
+
+###### pager
Created during [pagination](#pagination), a pager contains a subset of a section list, and navigation links to other pagers.
-### paginate
+###### paginate
To split a [section](#section) list into two or more [pagers](#pager) See&nbsp;[details](/templates/pagination/).
-### pagination
+###### pagination
The process of [paginating](#paginate) a [section](#section) list.
-### parameter
+###### parameter
-Typically, a user-defined key/value pair at the site or page level, but may also refer to a configuration setting or an [argument](#argument).
+Typically, a user-defined key/value pair at the site or page level, but may also refer to a configuration setting or an [argument](#argument). See&nbsp;also&nbsp;[field](#field).
-### partial
+###### partial
A [template](#template) called from any other template including [shortcodes](#shortcode), [render hooks](#render-hook), and other partials. A partial either renders something or returns something. A partial can also call itself, for example, to [walk](#walk) a data structure.
-### permalink
+###### permalink
-The absolute URL of a rendered page, including scheme and host.
+The absolute URL of a published resource or a rendered page, including scheme and host.
-### pipe
+###### pipe
See [pipeline](#pipeline).
-### pipeline
+###### pipeline
Within a [template action](#template-action), a pipeline is a possibly chained sequence of values, [function](#function) calls, or [method](#method) calls. Functions and methods in the pipeline may take multiple [arguments](#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. See the [Go&nbsp;documentation](https://pkg.go.dev/text/template#hdr-Pipelines) for details.
-### publish
+###### publish
See [build](#build).
-### regular page
+###### regular page
Content with the "page" [page kind](#page-kind). See also [section page](#section-page).
-### render hook
+###### relative permalink
-A [template](#template) that overrides standard markdown rendering. See [details](/templates/render-hooks/).
+The host-relative URL of a published resource or a rendered page.
-### resource
+###### render hook
+
+A [template](#template) that overrides standard markdown rendering. See&nbsp;[details](/templates/render-hooks/).
+
+###### remote resource
+
+A file on a remote server, accessible via HTTP or HTTPS with the [`resources.GetRemote`](/functions/resources/getremote) function.
+
+###### resource
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: page resources (located in a [page bundle](/getting-started/glossary/#page-bundle)), global resources (located in the assets directory), and remote resources (typically accessed via HTTPS).
+Hugo supports three types of resources: [global](#global-resource), [page](#page-resource), and [remote](#remote-resource)
-### scalar
+###### scalar
A single value, one of [string](#string), [integer](#integer), [floating point](#floating-point), or [boolean](#boolean).
-### section
+###### scratch pad
+
+Conceptually, a [map](#map) with [methods](#method) to set, get, update, and delete values. Attach the data structure to a `Page` object using the [`Scratch`] or [`Store`] methods, or created a locally scoped scratch pad using the [`newScratch`] function.
+
+[`Scratch`]: /methods/page/scratch
+[`Store`]: /methods/page/store
+[`newScratch`]: /functions/collections/newscratch
-A top-level content directory, or any content directory with an&nbsp;_index.md file. A content directory with an&nbsp;_index.md file is also known as a [branch bundle](/getting-started/glossary/#branch-bundle). Section templates receive one or more page [collections](#collection) in [context](#context). See [details](/content-management/sections/).
+###### section
-### section page
+A top-level content directory, or any content directory with an&nbsp;_index.md file. A content directory with an&nbsp;_index.md file is also known as a [branch bundle](/getting-started/glossary/#branch-bundle). Section templates receive one or more page [collections](#collection) in [context](#context). See&nbsp;[details](/content-management/sections/).
+
+###### section page
Content with the "section" [page kind](#page-kind). Typically a listing of [regular pages](#regular-page) and/or [section pages](#section-page) within the current [section](#section). See also [regular page](#regular-page).
-### shortcode
+###### shortcode
-A [template](#template) called from within markdown, taking zero or more [arguments](#argument). See [details](/content-management/shortcodes/).
+A [template](#template) called from within markdown, taking zero or more [arguments](#argument). See&nbsp;[details](/content-management/shortcodes/).
-### slice
+###### slice
-A numbered sequence of elements. Unlike Go's [array](#array) data type, slices are dynamically sized. See the [Go&nbsp;documentation](https://go.dev/ref/spec#Slice_types) for details.
+A numbered sequence of elements. Unlike Go's [array](#array) data type, slices are dynamically sized. [Elements](#element) within a slice can be [scalars](#scalar), [arrays](#array), [maps](#map), pages, or other slices. See the [Go&nbsp;documentation](https://go.dev/ref/spec#Slice_types) for details.
-### string
+###### string
A sequence of bytes. For example, `"What is 6 times 7?"`&nbsp;.
-### taxonomy
+###### taxonomic weight
+
+Defined in front matter and unique to each taxonomy, this [weight](#weight) determines the sort order of page collections contained within a [taxonomy object](#taxonomy-object). See&nbsp;[details](/templates/taxonomy-templates/#assign-weight).
+
+###### taxonomy
A group of related [terms](#term) used to classify content. For example, a "colors" taxonomy might include the terms "red", "green", and "blue". See&nbsp;[details](/content-management/taxonomies/).
-### taxonomy page
+###### taxonomy object
+
+A [map](#map) of [terms](#term) and the [weighted pages](#weighted-page) associated with each term.
+
+###### taxonomy page
Content with the "taxonomy" [page kind](#page-kind). Typically a listing of [terms](#term) within a given [taxonomy](#taxonomy).
-### template
+###### template
A file with [template actions](#template-action), located within the layouts directory of a project, theme, or module. See&nbsp;[details](/templates/).
-### template action
+###### template action
A data evaluation or control structure within a [template](#template), delimited by "{{"&nbsp;and&nbsp;"}}". See the [Go&nbsp;documentation](https://pkg.go.dev/text/template#hdr-Actions) for details.
-### term
+###### term
A member of a [taxonomy](#taxonomy), used to classify content. See&nbsp;[details](/content-management/taxonomies/).
-### term page
+###### term page
Content with the "term" [page kind](#page-kind). Typically a listing of [regular pages](#regular-page) and [section pages](#section-page) with a given [term](#term).
-### theme
+###### theme
A packaged combination of [archetypes](#archetype), assets, content, data, [templates](#template), translation tables, static files, or configuration settings. A theme may serve as the basis for a new site, or to augment an existing site. See also [module](#module).
-### token
+###### token
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](/content-management/urls/#permalinks) and [dates](/functions/time/format/#localization).
-
-### type
+###### type
See [content type](#content-type).
-### variable
+###### unmarshal
-A variable initialized within a [template action](#template-action).
+To transform a serialized object into a data structure. For example, transforming a JSON file into a [map](#map) that you can access within a template. See [marshal](#marshal).
-### walk
+###### variable
+
+A user-defined [identifier](#identifier) prefaced with a `$` symbol, representing a value of any data type, initialized or assigned within a [template action](#template-action). For example, `$foo`&nbsp;and&nbsp;`$bar` are variables.
+
+###### walk
To recursively traverse a nested data structure. For example, rendering a multilevel menu.
+
+###### weight
+
+Used to position an element within a collection sorted by weight. 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, and output formats.
+
+###### weighted page
+
+Contained within a [taxonomy object](#taxonomy-object), a weighted page is a [map](#map) with two elements: a `Page` object, and its [taxonomic weight](#taxonomic-weight) as defined in front matter. Access the elements using the `Page` and `Weight` keys.
diff --git a/content/en/getting-started/quick-start.md b/content/en/getting-started/quick-start.md
index 24f2ba1fc..ce4312455 100644
--- a/content/en/getting-started/quick-start.md
+++ b/content/en/getting-started/quick-start.md
@@ -156,7 +156,7 @@ Hugo's rendering engine conforms to the CommonMark [specification] for markdown.
With your editor, open the [site configuration] file (`hugo.toml`) in the root of your project.
```text
-baseURL = 'http://example.org/'
+baseURL = 'https://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'
theme = 'ananke'
diff --git a/content/en/getting-started/usage.md b/content/en/getting-started/usage.md
index 11f28c6b2..f1d26edc2 100644
--- a/content/en/getting-started/usage.md
+++ b/content/en/getting-started/usage.md
@@ -8,15 +8,15 @@ menu:
parent: getting-started
weight: 30
weight: 30
-aliases: [/overview/usage/,/extras/livereload/,/doc/usage/,/usage/]
toc: true
+aliases: [/overview/usage/,/extras/livereload/,/doc/usage/,/usage/]
---
## Test your installation
After [installing] Hugo, test your installation by running:
-```bash
+```sh
hugo version
```
@@ -30,13 +30,13 @@ hugo v0.105.0-0e3b42b4a9bdeb4d866210819fc6ddcf51582ffa+extended linux/amd64 Buil
To see a list of the available commands and flags:
-```bash
+```sh
hugo help
```
To get help with a subcommand, use the `--help` flag. For example:
-```bash
+```sh
hugo server --help
```
@@ -44,7 +44,7 @@ hugo server --help
To build your site, `cd` into your project directory and run:
-```bash
+```sh
hugo
```
@@ -60,7 +60,6 @@ Depending on your needs, you may wish to manually clear the contents of the publ
Hugo allows you to set `draft`, `date`, `publishDate`, and `expiryDate` in the [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
@@ -68,7 +67,7 @@ Hugo allows you to set `draft`, `date`, `publishDate`, and `expiryDate` in the [
You can override the default behavior when running `hugo` or `hugo server` with command line flags:
-```bash
+```sh
hugo --buildDrafts # or -D
hugo --buildExpired # or -E
hugo --buildFuture # or -F
@@ -86,7 +85,7 @@ A common practice is to manually clear the contents of the `public` directory be
To view your site while developing layouts or creating content, `cd` into your project directory and run:
-```bash
+```sh
hugo server
```
@@ -108,7 +107,7 @@ While the server is running, Hugo injects JavaScript into the generated HTML pag
When editing content, if you want your browser to automatically redirect to the page you last modified, run:
-```bash
+```sh
hugo server --navigateToChanged
```
@@ -120,7 +119,7 @@ As noted above, Hugo does not clear the public directory before building your si
When you are ready to deploy your site, run:
-```bash
+```sh
hugo
```
@@ -129,16 +128,16 @@ This builds your site, publishing the files to the public directory. The directo
```text
public/
├── categories/
-│   ├── index.html
-│   └── index.xml <-- RSS feed for this section
+│ ├── index.html
+│ └── index.xml <-- RSS feed for this section
├── post/
-│   ├── my-first-post/
-│   │   └── index.html
-│   ├── index.html
-│   └── index.xml <-- RSS feed for this section
+│ ├── 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 this section
├── index.html
├── index.xml <-- RSS feed for the site
└── sitemap.xml