-
{% for item in update_list %}
@@ -30,7 +32,7 @@
{% if trending_tags.size > 0 %}
- - {{ site.data.locales[site.lang].tabs.home | default: "home" | upcase }} + {{ site.data.locales[lang].tabs.home | upcase }} @@ -42,7 +42,7 @@ {% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %} - {{ site.data.locales[site.lang].tabs.[tab_name] | default: tab_name | upcase }} + {{ site.data.locales[lang].tabs.[tab_name] | default: tab_name | upcase }} {% endfor %} diff --git a/_includes/timeago.html b/_includes/timeago.html index 91e42ec..b68e08b 100644 --- a/_includes/timeago.html +++ b/_includes/timeago.html @@ -3,9 +3,9 @@ See: /assets/js/_utils/timeage.js --> -{% assign tooltip_df = site.data.locales[site.lang].date_format.tooltip | default: '%a, %b %e, %Y, %l:%M %p %z' %} -{% assign post_long_df = site.data.locales[site.lang].date_format.post.long | default: '%b %e, %Y' %} -{% assign post_short_df = site.data.locales[site.lang].date_format.post.short | default: '%b %e' %} +{% assign tooltip_df = site.data.locales[lang].date_format.tooltip %} +{% assign post_long_df = site.data.locales[lang].date_format.post.long %} +{% assign post_short_df = site.data.locales[lang].date_format.post.short %} {% if include.preposition %} {{ include.preposition }} diff --git a/_includes/topbar.html b/_includes/topbar.html index c8eed87..6ecc176 100644 --- a/_includes/topbar.html +++ b/_includes/topbar.html @@ -10,7 +10,7 @@ {% if paths.size == 0 or page.layout == 'home' %} - {{ site.data.locales[site.lang].tabs.home | default: 'home' | capitalize }} + {{ site.data.locales[lang].tabs.home | capitalize }} {% else %} @@ -19,14 +19,14 @@ {% if forloop.first %} - {{ site.data.locales[site.lang].tabs.home | default: 'home' | capitalize }} + {{ site.data.locales[lang].tabs.home | capitalize }} {% elsif forloop.last %} {% if page.collection == 'tabs' %} - {{ site.data.locales[site.lang].tabs[item] | default: page.title }} + {{ site.data.locales[lang].tabs[item] | default: page.title }} {% else %} {{ page.title }} {% endif %} @@ -36,7 +36,7 @@ {% unless page.layout == 'post' %} - {{ site.data.locales[site.lang].tabs[item] | default: page.title }} + {{ site.data.locales[lang].tabs[item] | default: page.title }} {% endunless %} @@ -53,12 +53,12 @@
-
{% capture this_day %}{{ post.date | date: "%d" }}{% endcapture %} - {% capture _mth_df %}{{ site.data.locales[site.lang].date_format.post.archive_month | default: "%b" }}{% endcapture %} + {% capture _mth_df %}{{ site.data.locales[lang].date_format.post.archive_month }}{% endcapture %} {% capture this_month %}{{ post.date | date: _mth_df }}{% endcapture %} {{ this_day }} {% include no-zero-date.html date_str=this_month %} diff --git a/_layouts/categories.html b/_layouts/categories.html index 669f48f..4e9ce77 100644 --- a/_layouts/categories.html +++ b/_layouts/categories.html @@ -3,6 +3,8 @@ layout: page # All the Categories of posts --- +{% include lang.html %} + {% assign HEAD_PREFIX = "h_" %} {% assign LIST_PREFIX = "l_" %} @@ -45,10 +47,10 @@ layout: page {% if sub_categories_size > 0 %} {{ sub_categories_size }} - {{ site.data.locales[site.lang].categories.category_measure | default: 'categories' }}, + {{ site.data.locales[lang].categories.category_measure }}, {% endif %} {{ top_posts_size }} - {{ site.data.locales[site.lang].categories.post_measure | default: 'posts' }} + {{ site.data.locales[lang].categories.post_measure }} @@ -81,7 +83,7 @@ layout: page {% assign posts_size = site.categories[sub_category] | size %} {{ posts_size }} - {{ site.data.locales[site.lang].categories.post_measure | default: 'posts' }} + {{ site.data.locales[lang].categories.post_measure }} {% endfor %} diff --git a/_layouts/category.html b/_layouts/category.html index 60b8cd6..a366081 100644 --- a/_layouts/category.html +++ b/_layouts/category.html @@ -3,6 +3,8 @@ layout: page # The Category layout --- +{% include lang.html %} +
@@ -11,7 +13,7 @@ layout: page
-
- {% assign post_df = site.data.locales[site.lang].date_format.post.long | default: '%b %e, %Y' %}
+ {% assign post_df = site.data.locales[lang].date_format.post.long %}
{% for post in page.posts %}
-
diff --git a/_layouts/default.html b/_layouts/default.html
index 258a27a..2fe00e9 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -5,13 +5,15 @@ layout: compress
+{% include lang.html %}
+
{% capture prefer_mode %}
{% if site.theme_mode %}
mode="{{ site.theme_mode }}"
{% endif %}
{% endcapture %}
-
+
{% include head.html %}
diff --git a/_layouts/home.html b/_layouts/home.html
index 39e38e9..6cf5e3c 100644
--- a/_layouts/home.html
+++ b/_layouts/home.html
@@ -3,6 +3,8 @@ layout: page
# The Home page layout
---
+{% include lang.html %}
+
{% assign pinned = site.posts | where: "pin", "true" %}
{% assign default = site.posts | where_exp: "item", "item.pin != true" %}
@@ -78,7 +80,7 @@ layout: page
{% if post.pin %}
- {{ site.data.locales[site.lang].post.pin_prompt | default: 'Pinned' }} + {{ site.data.locales[lang].post.pin_prompt }}{% endif %} diff --git a/_layouts/page.html b/_layouts/page.html index 67d80b0..7afb697 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -10,7 +10,7 @@ layout: default
{% if page.collection == 'tabs' %} {%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%} - {{- site.data.locales[site.lang].tabs[tab_key] | default: page.title -}} + {{- site.data.locales[lang].tabs[tab_key] | default: page.title -}} {% else %} {{- page.title -}} {% endif %} diff --git a/_layouts/post.html b/_layouts/post.html index d8b06a4..961f0de 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -3,6 +3,8 @@ layout: default # The posts' layout --- +{% include lang.html %} +
@@ -17,7 +19,7 @@ layout: default {{ page.author | default: site.social.name }} - {% capture _preposition %}{{ site.data.locales[site.lang].post.published | default: 'on' }}{% endcapture %} + {% capture _preposition %}{{ site.data.locales[lang].post.published }}{% endcapture %} {% include timeago.html date=page.date tooltip=true preposition=_preposition %}@@ -25,7 +27,7 @@ layout: default {% if page.last_modified_at %} - {{ site.data.locales[site.lang].post.updated | default: 'Updated' }} + {{ site.data.locales[lang].post.updated }} {% include timeago.html date=page.last_modified_at class="lastmod" tooltip=true %} {% endif %} @@ -38,7 +40,7 @@ layout: default - {{ site.data.locales[site.lang].post.pageview_measure | default: "views" }} + {{ site.data.locales[lang].post.pageview_measure }} {% endif %}- {% if site.data.locales[site.lang].copyright.license.template %} + {% if site.data.locales[lang].copyright.license.template %} {% capture _replacement %} - - {{ site.data.locales[site.lang].copyright.license.name }} + + {{ site.data.locales[lang].copyright.license.name }} {% endcapture %} - {{ site.data.locales[site.lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }} + {{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }} {% endif %}diff --git a/_layouts/tag.html b/_layouts/tag.html index eb75aef..30371ef 100644 --- a/_layouts/tag.html +++ b/_layouts/tag.html @@ -3,6 +3,8 @@ layout: page # The layout for Tag page --- +{% include lang.html %} +@@ -10,7 +12,7 @@ layout: page {{ page.posts | size }}
-
- {% assign post_df = site.data.locales[site.lang].date_format.post.long | default: '%b %e, %Y' %}
+ {% assign post_df = site.data.locales[lang].date_format.post.long %}
{% for post in page.posts %}
-
diff --git a/assets/404.html b/assets/404.html
index d297a69..dde158a 100644
--- a/assets/404.html
+++ b/assets/404.html
@@ -11,19 +11,21 @@ redirect_from:
dynamic_title: true
---
+{% include lang.html %}
+
{%- capture _head_back -%} - {{ site.data.locales[site.lang].not_found.head_back }} + {{ site.data.locales[lang].not_found.head_back }} {%- endcapture -%} {%- capture _archives_page -%} - {{ site.data.locales[site.lang].not_found.archives_page }} + {{ site.data.locales[lang].not_found.archives_page }} {%- endcapture -%} -
{{site.data.locales[site.lang].not_found.statment }}
+{{site.data.locales[lang].not_found.statment }}
-{{ site.data.locales[site.lang].not_found.hint_template +
{{ site.data.locales[lang].not_found.hint_template | replace: ':HEAD_BAK', _head_back | replace: ':ARCHIVES_PAGE', _archives_page }}
diff --git a/assets/feed.xml b/assets/feed.xml index 7e2f4e7..b36f4af 100644 --- a/assets/feed.xml +++ b/assets/feed.xml @@ -15,7 +15,7 @@ permalink: /feed.xml{{ "/" | absolute_url }} -Jekyll © {{ 'now' | date: '%Y' }} {{ site.social.name }}
-
diff --git a/assets/404.html b/assets/404.html
index d297a69..dde158a 100644
--- a/assets/404.html
+++ b/assets/404.html
@@ -11,19 +11,21 @@ redirect_from:
dynamic_title: true
---
+{% include lang.html %}
+
-
diff --git a/_layouts/default.html b/_layouts/default.html
index 258a27a..2fe00e9 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -5,13 +5,15 @@ layout: compress
+{% include lang.html %}
+
{% capture prefer_mode %}
{% if site.theme_mode %}
mode="{{ site.theme_mode }}"
{% endif %}
{% endcapture %}
-
+
{% include head.html %}
diff --git a/_layouts/home.html b/_layouts/home.html
index 39e38e9..6cf5e3c 100644
--- a/_layouts/home.html
+++ b/_layouts/home.html
@@ -3,6 +3,8 @@ layout: page
# The Home page layout
---
+{% include lang.html %}
+
{% assign pinned = site.posts | where: "pin", "true" %}
{% assign default = site.posts | where_exp: "item", "item.pin != true" %}
@@ -78,7 +80,7 @@ layout: page
{% if post.pin %}
- {{- site.data.locales[site.lang].panel.trending_tags | default: 'Trending Tags' -}}
+ {{- site.data.locales[lang].panel.trending_tags -}}
{% for tag_name in trending_tags %}
@@ -48,7 +50,7 @@
- {{- site.data.locales[site.lang].panel.toc | default: 'Contents' -}}
+ {{- site.data.locales[lang].panel.toc -}}
diff --git a/_includes/post-nav.html b/_includes/post-nav.html
index c9c258c..bb3b52d 100644
--- a/_includes/post-nav.html
+++ b/_includes/post-nav.html
@@ -5,24 +5,24 @@
{% if page.previous.url %}
+ prompt="{{ site.data.locales[lang].post.button.previous }}">
{{ page.previous.title }}
{% else %} + prompt="{{ site.data.locales[lang].post.button.previous }}">-
{% endif %} {% if page.next.url %} + prompt="{{ site.data.locales[lang].post.button.next }}">{{ page.next.title }}
{% else %} + prompt="{{ site.data.locales[lang].post.button.next }}">-
{% endif %} diff --git a/_includes/post-sharing.html b/_includes/post-sharing.html index 252370f..4bf7d8d 100644 --- a/_includes/post-sharing.html +++ b/_includes/post-sharing.html @@ -3,7 +3,7 @@ -->
- {{ site.data.locales[site.lang].post.share | default: 'Share' }}
+ {{ site.data.locales[lang].post.share }}
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
{% assign url = page.url | absolute_url %}
@@ -16,9 +16,9 @@
{% endfor %}
-
+ title="{{ site.data.locales[lang].post.button.copy.title }}">
diff --git a/_includes/read-time.html b/_includes/read-time.html
index 460c65a..e537693 100644
--- a/_includes/read-time.html
+++ b/_includes/read-time.html
@@ -16,13 +16,13 @@
{% endunless %}
{% capture read_prompt %}
- {{- site.data.locales[site.lang].post.read_time.prompt | default: "read" -}}
+ {{- site.data.locales[lang].post.read_time.prompt -}}
{% endcapture %}
- {{- read_time -}}{{" "}}{{- site.data.locales[site.lang].post.read_time.unit | default: "min" -}}
+ title="{{ words }} {{ site.data.locales[lang].post.words }}">
+ {{- read_time -}}{{" "}}{{- site.data.locales[lang].post.read_time.unit -}}
{%- if include.prompt -%}
{% unless site.lang contains 'zh' %}{{" "}}{% endunless %}{{ read_prompt }}
{%- endif -%}
diff --git a/_includes/related-posts.html b/_includes/related-posts.html
index d4c3996..910de53 100644
--- a/_includes/related-posts.html
+++ b/_includes/related-posts.html
@@ -81,7 +81,7 @@
{% if index_list.size > 0 %}
{{ site.data.locales[site.lang].post.relate_posts | default: 'Further Reading' }}
+ data-toc-skip>{{ site.data.locales[lang].post.relate_posts }}
{% for entry in index_list %}
{% assign index = entry | plus: 0 %}
diff --git a/_includes/search-results.html b/_includes/search-results.html
index 07e180a..166ed5f 100644
--- a/_includes/search-results.html
+++ b/_includes/search-results.html
@@ -4,7 +4,7 @@
diff --git a/_layouts/archives.html b/_layouts/archives.html
index 634958f..dfb2d32 100644
--- a/_layouts/archives.html
+++ b/_layouts/archives.html
@@ -3,6 +3,8 @@ layout: page
# The Archives of posts.
---
+{% include lang.html %}
+
-
{{ site.data.locales[site.lang].panel.trending_tags | default: 'Trending Tags' }}
+{{ site.data.locales[lang].panel.trending_tags }}
{% include trending-tags.html %} diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 8497fa4..b32d717 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -32,7 +32,7 @@
{% if page.layout == 'home' %}
- {{- site.data.locales[site.lang].title | default: site.title -}}
+ {{- site.data.locales[lang].title | default: site.title -}}
{% elsif page.collection == 'tabs' %}
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
- {{- site.data.locales[site.lang].tabs[tab_key] | default: page.title -}}
+ {{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
{% else %}
- {{- site.data.locales[site.lang].layout[page.layout] | default: page.layout | capitalize -}}
+ {{- site.data.locales[lang].layout[page.layout] | default: page.layout | capitalize -}}
{% endif %}
@@ -66,10 +66,10 @@
+ aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[lang].search.hint | capitalize }}...">
- {{ site.data.locales[site.lang].search.cancel | default: 'Cancel' }}
+ {{ site.data.locales[lang].search.cancel }}
{% for post in site.posts %}
@@ -17,7 +19,7 @@ layout: page