title
Syntax
title INPUT
strings.Title INPUT
{{title "BatMan"}}` → "Batman"
Can be combined in pipes. In the following snippet, the link text is cleaned up using humanize
to remove dashes and title
to convert the value of $name
to Initial Caps.
{{ range $name, $items := .Site.Taxonomies.categories }}
<li><a href="{{ printf "%s/%s" "categories" ($name | urlize | lower) | absURL }}">{{ $name | humanize | title }} ({{ len $items }})</a></li>
{{ end }}
Configure Title Case
The default is AP Stylebook, but you can configure it.