Lego2012
7/10/2017 - 8:27 AM

Get full name of tag

Get full name of tag

You can take any hyphenated/dasherized/urilized string and do the following:

{{$hyphenated := "john-doe-random-quote"}}
{{humanize $hyphenated}}

=> "John doe random quote"

{{(humanize $hyphenated) | title }}

=> "John Doe Random Quote"

{{(replace $hyphenated "-" " ") | title}}

=> "John Doe Random Quote"