From 9620eddd1241e5fecbdd0dc3acf6c9ce6c781767 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 5 Jan 2022 22:58:51 +0800 Subject: [PATCH] Simplify the top-bar title detect process --- _includes/topbar.html | 2 +- assets/404.html | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/_includes/topbar.html b/_includes/topbar.html index 039434d..2443b9c 100644 --- a/_includes/topbar.html +++ b/_includes/topbar.html @@ -50,7 +50,7 @@
{% if page.layout == 'home' %} {{- 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 -%} {{- site.data.locales[lang].tabs[tab_key] | default: page.title -}} {% else %} diff --git a/assets/404.html b/assets/404.html index dde158a..1608517 100644 --- a/assets/404.html +++ b/assets/404.html @@ -7,8 +7,6 @@ redirect_from: - /norobots/ - /assets/ - /posts/ - -dynamic_title: true --- {% include lang.html %}