Closed sedrubal closed 3 years ago
would this work?
{% assign post_title = t post.title %}
<title>{% post_title | xml_escape %}</title>
would this work?
{% assign post_title = t post.title %} <title>{% post_title | xml_escape %}</title>
No this does not work, neither. It's still empty.
My bad, it should be
{% assign post_title = t post.title %}
<title>{{ post_title | xml_escape }}</title>
and can you confirm that
{% t post.title %}
is not empty in first place?
This does not work neither.
I have:
<title>{%- t post.title -%}</title>
which prints the title but without xml_espace
.
{% assign post_title = t post.title %}
{{ post_title }}
This does print nothing. It seems, t
does not work with assign
. Thus
{% assign post_title = t post.title %}
<title>{{ post_title | xml_escape }}</title>
Is empty, too.
this for sure would work tho, and seems to be issue...with chaining liquid filters, something I admittedly don't understand very well
{% capture yolo %}{% t post.title %}{% endcapture %}
<title>{{ yolo | xml_escape }}</title>
Thank you, this works for me.
For the RSS feed I need to pipe the translated string through
|xml_escape
. Before using jekyll-multiple-languages-plugin, I had this:Now I'm searching for a solution like:
But this results in an empty string.