Skip to content

Commit

Permalink
bug: prevent title | title
Browse files Browse the repository at this point in the history
  • Loading branch information
carlinmack committed Apr 5, 2024
1 parent 9cc8614 commit e29f697
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion invenio_theme/templates/semantic-ui/invenio_theme/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@
{%- endblock head_meta %}

{%- block head_title %}
<title>{%- if title %}{{title}} | {% endif -%}{{ _(config.THEME_SITENAME) or _('Invenio') }}</title>
{% set show_title = true %}
{% set sitename = _(config.THEME_SITENAME) or _('Invenio') %}
{% if title %}
{% if title == sitename %}
{% set show_title = false %}
{% endif -%}
{% endif -%}
<title>{%- if show_title and title %}{{title}} | {% endif -%}{{ sitename }}</title>
{%- endblock head_title %}

{%- block head_links %}
Expand Down

0 comments on commit e29f697

Please sign in to comment.