Title
Syntax
PAGE.Title
Returns
string
With pages backed by a file, the Title
method returns the title
field as defined in front matter:
content/about.md
---
title: About us
---
+++
title = 'About us'
+++
{
"title": "About us"
}
{{ .Title }} → About us
With section, taxonomy, and term pages not backed by a file, the Title
method returns the section name, capitalized and pluralized. You can disable these transformations by setting capitalizeListTitles
and pluralizeListTitles
in your site configuration. For example:
hugo.
capitalizeListTitles: false
pluralizeListTitles: false
capitalizeListTitles = false
pluralizeListTitles = false
{
"capitalizeListTitles": false,
"pluralizeListTitles": false
}
You can change the capitalization style in your site configuration to one of ap
, chicago
, go
, firstupper
, or none
. For example:
hugo.
titleCaseStyle: firstupper
titleCaseStyle = 'firstupper'
{
"titleCaseStyle": "firstupper"
}
See details.