strings.Title
Returns the given string, converting it to title case.
Syntax
strings.Title STRING
Returns
string
Alias
title
{{ title "table of contents (TOC)" }} → Table of Contents (TOC)
By default, Hugo follows the capitalization rules published in the Associated Press Stylebook. Change your site configuration if you would prefer to:
- Follow the capitalization rules published in the Chicago Manual of Style
- Capitalize the first letter of every word
- Capitalize the first letter of the first word
- Disable the effects of the
title
function
The last option is useful if your theme uses the title
function, and you would prefer to manually capitalize strings as needed.
Last updated:
December 4, 2023
:
Squashed 'docs/' changes from 4d936aee6..4dd2d6415 (35dec7c96)
Improve this page