1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 13:44:15 +00:00

Improve the way to set the default value of locales

This commit is contained in:
Cotes Chung
2021-08-01 21:54:27 +08:00
parent 780af9ac5f
commit 0213331a16
23 changed files with 87 additions and 60 deletions

View File

@@ -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 %}
<!-- return element -->
<span class="readtime" data-toggle="tooltip" data-placement="bottom"
title="{{ words }} {{ site.data.locales[site.lang].post.words | default: "words" }}">
{{- 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 -%}