Skip to content

Commit

Permalink
ADD: hexo-wordcount plugin support. (5)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-nginx authored Jan 18, 2017
1 parent 4965910 commit 614b8ea
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions layout/_macro/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,38 @@
</span>
{% endif %}

{% if theme.post_wordcount.wordcount or theme.post_wordcount.min2read %}
<div class="post-wordcount">
{% if theme.post_wordcount.wordcount %}
<span class="post-meta-item-icon">
<i class="fa fa-file-word-o"></i>
</span>
{% if theme.post_wordcount.item_text %}
<span class="post-meta-item-text">{{ __('post.wordcount') }}</span>
{% endif %}
<span title="{{ __('post.wordcount') }}" }}">
{{ wordcount(post.content) }}
</span>
{% endif %}

{% if theme.post_wordcount.wordcount and theme.post_wordcount.min2read %}
<span class="post-meta-divider">|</span>
{% endif %}

{% if theme.post_wordcount.min2read %}
<span class="post-meta-item-icon">
<i class="fa fa-clock-o"></i>
</span>
{% if theme.post_wordcount.item_text %}
<span class="post-meta-item-text">{{ __('post.min2read') }}</span>
{% endif %}
<span title="{{ __('post.min2read') }}" }}">
{{ min2read(post.content) }}
</span>
{% endif %}
</div>
{% endif %}

{% if post.description and (not theme.excerpt_description or not is_index) %}
<div class="post-description">
{{ post.description }}
Expand Down

0 comments on commit 614b8ea

Please sign in to comment.