Simplify the top-bar title detect process

This commit is contained in:
Cotes Chung 2022-01-05 22:58:51 +08:00
parent dbf86a2309
commit 9620eddd12
2 changed files with 1 additions and 3 deletions

View file

@ -50,7 +50,7 @@
<div id="topbar-title"> <div id="topbar-title">
{% if page.layout == 'home' %} {% if page.layout == 'home' %}
{{- site.data.locales[lang].title | default: site.title -}} {{- site.data.locales[lang].title | default: site.title -}}
{% elsif page.collection == 'tabs' or page.dynamic_title %} {% elsif page.collection == 'tabs' or page.layout == 'page' %}
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%} {%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
{{- site.data.locales[lang].tabs[tab_key] | default: page.title -}} {{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
{% else %} {% else %}

View file

@ -7,8 +7,6 @@ redirect_from:
- /norobots/ - /norobots/
- /assets/ - /assets/
- /posts/ - /posts/
dynamic_title: true
--- ---
{% include lang.html %} {% include lang.html %}