-
-
Notifications
You must be signed in to change notification settings - Fork 600
Closed
Description
Bug Description
I'm working on SEO titles for my website, the common convention is to use title | site name. I'm overriding some of my pages and want to fall back to site name when I break something... I want to avoid | site name in the title.
I thought I'd use ensure_right to get around this:
<title>{{ title ensure_right=" |" }} {{ config:app:name }}</title>
However, I found this doesn't work. I assume | is reserved for use in conditional statements or the parser is getting confused about it. Although I found that & works fine.
With different characters it works as expected:
<title>{{ title ensure_right=" @" }} {{ config:app:name }}</title>
<title>{{ title ensure_right=" ," }} {{ config:app:name }}</title>
<title>{{ title ensure_right=" ," }} {{ config:app:name }}</title>
<title>{{ title ensure_right=" &" }} {{ config:app:name }}</title>
<title>{{ title ensure_right=" !" }} {{ config:app:name }}</title>
It seems like most other options work fine except |.
Environment
Statamic 3.2.1 Pro
Laravel 8.56.0
PHP 8.0.6
statamic/ssg 0.8.0
Metadata
Metadata
Assignees
Labels
No labels