I have a title like this in my Zola (which uses the Tera templating engine) website:
<title>{% block title %}{% endblock %} - Newbyte's blog</title>
This generates something like this:
<title>Birds around the world - Newbyte's blog</title>
However, if I don't specify a title in a subtemplate, it generates this:
<title> - Newbyte's blog</title>
I would like to omit the " - " part if there's no title specified any only generate this
<title>Newbyte's blog</title>
Is there any way to achieve this in the Tera templating engine? I tried doing this, but it doesn't seem to work. It never generates the " - " part:
<title>{% block title %}{% if title %} - {% endif %}{% endblock %}Newbyte's blog</title>