blog/_includes/views/post-header.html
jeffreytse 48d4da4f1b fix: reading time was incorrect for cjk words (#20)
The liquid filter `number_of_words` is for english words, so here
we use a calculation to estimate accurately the words, especially
when the language is not English.
2021-01-11 11:18:35 +08:00

27 lines
1 KiB
HTML

<header class="post-header">
<h1 class="post-title p-name" itemprop="name headline">{{ heading | default: page.title | escape }}</h1>
<h3 class="post-subtitle">{{ subheading | default: page.subtitle | escape }}</h3>
<p class="post-meta">
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
{%- assign date_format = site.yat.date_format | default: "%b %-d, %Y" -%}
<i class="fa fa-calendar"></i> {{ page.date | date: date_format }}
</time>
{% assign article = page.content %}
{% assign lang = page.lang %}
{%- include functions.html func='get_reading_time' -%}
{% assign reading_time = return %}
<span class="post-reading-time left-vsplit"><i class="fa fa-clock-o"></i> {{ reading_time }}</span>
</p>
{%- if page.tags.size > 0 -%}
<div class="post-tags">
{%- for tag in page.tags -%}
<a class="post-tag" href="{{ '/tags.html ' | relative_url }}#{{tag}}">#{{tag}}</a>
{%- endfor -%}
</div>
{%- endif -%}
</header>