You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
HTML
38 lines
1.1 KiB
HTML
![]()
1 year ago
|
{#- Setup -#}
|
||
![]()
2 years ago
|
{%- set prefix = config.title | safe -%}
|
||
|
{%- set custom_separator = config.extra.separator | default(value="•") -%}
|
||
|
{%- set separator = " " ~ custom_separator ~ " " -%}
|
||
![]()
2 years ago
|
|
||
![]()
1 year ago
|
{#- Get the base path for the current language -#}
|
||
![]()
2 years ago
|
{%- if lang != config.default_language %}
|
||
|
{%- set base_path = "/" ~ lang ~ "/" %}
|
||
|
{%- else -%}
|
||
|
{%- set base_path = "/" %}
|
||
|
{%- endif %}
|
||
|
|
||
|
{%- if current_path and current_path == base_path -%}
|
||
![]()
2 years ago
|
{%- set suffix = "" -%}
|
||
|
{%- set separator = "" -%}
|
||
![]()
2 years ago
|
{% elif title %}
|
||
![]()
2 years ago
|
{%- set suffix = title -%}
|
||
|
{% elif section.title -%}
|
||
|
{%- set suffix = section.title -%}
|
||
![]()
2 years ago
|
{% elif page.title %}
|
||
![]()
2 years ago
|
{%- set suffix = page.title -%}
|
||
![]()
2 years ago
|
{% elif term.name %}
|
||
![]()
1 year ago
|
{#- Individual tags -#}
|
||
![]()
2 years ago
|
{%- set suffix = term.name -%}
|
||
![]()
2 years ago
|
{% elif taxonomy.name %}
|
||
![]()
1 year ago
|
{#- List of tags -#}
|
||
![]()
1 year ago
|
{%- set suffix = macros_translate::translate(key=taxonomy.name, language_strings=language_strings) | capitalize -%}
|
||
![]()
2 years ago
|
{% else %}
|
||
![]()
2 years ago
|
{%- set suffix = "404" %}
|
||
![]()
2 years ago
|
{%- endif -%}
|
||
![]()
2 years ago
|
|
||
![]()
1 year ago
|
{#- Return the final concatenated string -#}
|
||
![]()
1 year ago
|
{%- if config.extra.invert_title_order -%}
|
||
|
{{- suffix ~ separator ~ prefix -}}
|
||
|
{%- else -%}
|
||
|
{{- prefix ~ separator ~ suffix -}}
|
||
|
{%- endif -%}
|