title

Converts a hyphen-separated slug into a title-cased string.

Known acronyms (AI, API, GPT, etc.) are uppercased automatically, and any extra acronyms passed as params are merged with that built-in list.

InputArgumentsReturnsstring...stringstring
Source

Behaviors

Coerces scalars to text
A scalar value such as a number or a boolean is converted to its text form before matching, so 42 is accepted as "42".
BasicSource

Title-cases a hyphen-separated slug and uppercases known acronyms such as API.

Given

{"slug": "user-api-gateway"}

Template

{{ slug | title }}

Result

User API Gateway
AcronymsSource

Uppercases multiple built-in acronyms in one slug.

Given

{"heading": "json-api-schema"}

Template

{{ heading | title }}

Result

JSON API Schema
Extra acronymsSource

Uppercases extra acronyms passed as parameters alongside the built-in list.

Given

{"heading": "seo-and-cta-tips"}

Template

{{ heading | title:'seo','cta' }}

Result

SEO And CTA Tips
NumbersSource

Keeps numeric segments as their own words.

Given

{"slug": "hello-world-2023"}

Template

{{ slug | title }}

Result

Hello World 2023