mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
ec4e6f9df2
git-subtree-dir: docs git-subtree-split: f887bd7b4e3e7c7e76cd63951e5b0d37d8fe0ac7
810 B
810 B
title | description | godocref | date | publishdate | lastmod | categories | menu | signature | workson | hugoversion | relatedfuncs | deprecated | aliases | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
title | Converts all characters in the provided string to title case. | 2017-02-01 | 2017-02-01 | 2017-02-01 |
|
|
|
false |
{{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 Intial 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 }}