HUGO
News Docs Themes Community GitHub

Title

Returns the title of the given page.

Syntax

PAGE.Title

Returns

string

With pages backed by a file, the Title method returns the title field as defined in front matter:

---
title: About us
---
+++
title = 'About us'
+++
{
   "title": "About us"
}
{{ .Title }} → About us

When a page is not backed by a file, the value returned by the Title method depends on the page kind.

Page kindPage title when the page is not backed by a file
homesite title
sectionsection name (capitalized and pluralized)
taxonomytaxonomy name (capitalized and pluralized)
termterm name (capitalized and pluralized)

You can disable automatic capitalization and pluralization in your site configuration:

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:

titleCaseStyle: firstupper
titleCaseStyle = 'firstupper'
{
   "titleCaseStyle": "firstupper"
}

See details.