HUGO
Menu
GitHub 90272 stars Mastodon

strings.Title

Returns the given string, converting it to title case.
Syntax
strings.Title STRING
Returns
string
Alias
title

Usage

The strings.Title function returns the given string, converting it to title case. By default, Hugo follows the capitalization rules published in the Associated Press Stylebook. To use different rules, change the titleCaseStyle setting in your project configuration.

Examples

{{ strings.Title "table of contents (TOC)" }} → Table of Contents (TOC)