hugo/docs/content/en/functions/strings/Title.md
Bjørn Erik Pedersen 5fd1e74903
Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'
```
git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash
```

Closes #11925
2024-01-27 10:48:57 +01:00

1.1 KiB

title description categories keywords action aliases
strings.Title Returns the given string, converting it to title case.
aliases related returnType signatures
title
functions/strings/FirstUpper
functions/strings/ToLower
functions/strings/ToUpper
string
strings.Title STRING
/functions/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.