diff --git a/_config.yml b/_config.yml index dd125120f..efa914530 100755 --- a/_config.yml +++ b/_config.yml @@ -217,7 +217,13 @@ post_meta: created_at: true updated_at: false categories: true - + +# Post wordcount display settings +# Dependies: https://github.com/willin/hexo-wordcount +post_wordcount: + item_text: true + wordcount: false + min2read: false # Wechat Subscriber #wechat_subscriber: @@ -300,10 +306,13 @@ mathjax: # See: https://www.google.com/webmasters/ #google_site_verification: - # Google Analytics #google_analytics: +# Yandex Webmaster tools verification setting +# See: https://webmaster.yandex.ru/ +#yandex_site_verification: + # CNZZ count #cnzz_siteid: @@ -339,6 +348,15 @@ facebook_comments_plugin: width: 100% # default width is 550px scheme: light # default scheme is light (light or dark) +# VKontakte API Support. +# To get your AppID visit https://vk.com/editapp?act=create +vkontakte_api: + enable: false + app_id: # + like: true + comments: true + num_of_posts: 10 + # Show number of visitors to each article. # You can visit https://leancloud.cn get AppID and AppKey. diff --git a/languages/default.yml b/languages/default.yml index 2f7050fea..7d1c6a5c9 100644 --- a/languages/default.yml +++ b/languages/default.yml @@ -2,6 +2,7 @@ title: archive: Archive category: Category tag: Tag + schedule: Schedule author: Author @@ -12,6 +13,7 @@ menu: tags: Tags about: About search: Search + schedule: Schedule sitemap: Sitemap sidebar: @@ -28,6 +30,8 @@ post: untitled: Untitled toc_empty: This post does not have a Table of Contents visitors: Visitors + wordcount: Words count in article + min2read: Reading time page: totally: Totally diff --git a/languages/en.yml b/languages/en.yml index deb0bf731..7d1c6a5c9 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -1,8 +1,8 @@ title: archive: Archive category: Category - schedule: Schedule tag: Tag + schedule: Schedule author: Author @@ -10,10 +10,10 @@ menu: home: Home archives: Archives categories: Categories - schedule: Schedule tags: Tags about: About search: Search + schedule: Schedule sitemap: Sitemap sidebar: @@ -30,6 +30,8 @@ post: untitled: Untitled toc_empty: This post does not have a Table of Contents visitors: Visitors + wordcount: Words count in article + min2read: Reading time page: totally: Totally diff --git a/languages/ru.yml b/languages/ru.yml index ba9226f44..af054fdb6 100644 --- a/languages/ru.yml +++ b/languages/ru.yml @@ -2,6 +2,7 @@ title: archive: Архив category: Категория tag: Тэг + schedule: Календарь author: Author @@ -12,6 +13,7 @@ menu: tags: Тэги about: О сайте search: Поиск + schedule: Календарь sitemap: Карта сайта sidebar: @@ -28,6 +30,8 @@ post: untitled: Без имени toc_empty: Эта запись без оглавления visitors: Просмотров + wordcount: Кол-во слов в статье + min2read: Время чтения в минутах page: totally: Всего diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index e37c89ee6..56dd0536a 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -172,11 +172,6 @@ {% endif %} {% endif %} - {% if not is_index and theme.facebook_sdk.enable and theme.facebook_sdk.like_button %} - | -
- {% endif %} - {# LeanCould PageView #} {% if theme.leancloud_visitors.enable %} @@ -198,6 +193,38 @@ {% endif %} + {% if theme.post_wordcount.wordcount or theme.post_wordcount.min2read %} +
+ {% if theme.post_wordcount.wordcount %} + + {% if theme.post_wordcount.item_text %} + + {% endif %} + + {{ wordcount(post.content) }} + + {% endif %} + + {% if theme.post_wordcount.wordcount and theme.post_wordcount.min2read %} + + {% endif %} + + {% if theme.post_wordcount.min2read %} + + {% if theme.post_wordcount.item_text %} + + {% endif %} + + {{ min2read(post.content) }} + + {% endif %} +
+ {% endif %} + {% if post.description and (not theme.excerpt_description or not is_index) %}
{{ post.description }} @@ -294,6 +321,24 @@
{% endif %} + {% if not is_index %} + {% if (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %} +
+ {% if theme.vkontakte_api.enable and theme.vkontakte_api.like %} +
+ +
+ {% endif %} + + {% if theme.facebook_sdk.enable and theme.facebook_sdk.like_button %} +
+
+
+ {% endif %} +
+ {% endif %} + {% endif %} + {% if not is_index and (post.prev or post.next) %}
diff --git a/layout/_partials/comments.swig b/layout/_partials/comments.swig index 26c496ee4..a61f536a6 100644 --- a/layout/_partials/comments.swig +++ b/layout/_partials/comments.swig @@ -11,6 +11,8 @@ data-width="{{ theme.facebook_comments_plugin.width }}" data-colorscheme="{{ theme.facebook_comments_plugin.scheme }}">
+ {% elseif theme.vkontakte_api.enable and theme.vkontakte_api.comments %} +
{% elseif theme.disqus_shortname %}