/
post.html
41 lines (35 loc) · 1.5 KB
/
post.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
layout: default
---
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
<p class="post-meta">
<time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
{% assign date_format = site.minima.date_format | default: "%b %-d, %Y" %}
{{ page.date | date: date_format }}
</time>
{% if "zh" != page.lang %} <!--number_of_word for cjk requires jekyll v4.1.0-->
{% assign word_count = content | number_of_words %}
{% if word_count > 180 %}
| ~ {{ word_count | divided_by: 150 }} minutes read
{% endif %}
{% endif %}
{% if page.tags %} |
{% for tag in page.tags %}
<a class="post-tag" href="{{ site.baseurl }}/tags/#{{ tag | slugify }}">{{ tag }}</a>
{% endfor %}
{% endif %}
{% if page.author %}
• <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>
{% endif %}
</p>
</header>
<div class="post-content" itemprop="articleBody">
{{ content | replace: '<a href="http', '<a rel="nofollow" target="_blank" href="http' }}
</div>
{% include prev_next.html prev_url=page.previous.url prev_text=page.previous.title next_url=page.next.url next_text=page.next.title %}
{% if site.disqus.shortname %}
{% include disqus_comments.html %}
{% endif %}
</article>