mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
refactor: reduce language include file
This commit is contained in:
@@ -16,13 +16,13 @@
|
||||
{% endunless %}
|
||||
|
||||
{% capture read_prompt %}
|
||||
{{- site.data.locales[lang].post.read_time.prompt -}}
|
||||
{{- site.data.locales[site.lang].post.read_time.prompt -}}
|
||||
{% endcapture %}
|
||||
|
||||
<!-- return element -->
|
||||
<span class="readtime" data-toggle="tooltip" data-placement="bottom"
|
||||
title="{{ words }} {{ site.data.locales[lang].post.words }}">
|
||||
<em>{{- read_time -}}{{" "}}{{- site.data.locales[lang].post.read_time.unit -}}</em>
|
||||
title="{{ words }} {{ site.data.locales[site.lang].post.words }}">
|
||||
<em>{{- read_time -}}{{" "}}{{- site.data.locales[site.lang].post.read_time.unit -}}</em>
|
||||
{%- if include.prompt -%}
|
||||
{%- assign _prompt_words = read_prompt | number_of_words: 'auto' -%}
|
||||
{%- unless _prompt_words > 1 -%}{{ " " }}{%- endunless -%}{{ read_prompt }}
|
||||
|
||||
Reference in New Issue
Block a user