diff --git a/_config.yml b/_config.yml index 33c3e6e6a..60d6f9184 100755 --- a/_config.yml +++ b/_config.yml @@ -171,6 +171,9 @@ toc: # Automatically add list number to toc. number: true + # If true, all words will placed on next lines if header width longer then sidebar width. + wrap: false + # Creative Commons 4.0 International License. # http://creativecommons.org/ @@ -245,6 +248,7 @@ post_wordcount: item_text: true wordcount: false min2read: false + separated_meta: true # Wechat Subscriber #wechat_subscriber: @@ -400,6 +404,13 @@ vkontakte_api: comments: true num_of_posts: 10 +# Star rating support to each article. +# To get your ID visit https://widgetpack.com +rating: + enable: false + id: # + color: fc6423 + # Show number of visitors to each article. # You can visit https://leancloud.cn get AppID and AppKey. diff --git a/layout/_layout.swig b/layout/_layout.swig index 1a9799fdc..73898ab06 100644 --- a/layout/_layout.swig +++ b/layout/_layout.swig @@ -67,7 +67,9 @@ {% set scheme_script = '_scripts/schemes/' + theme.scheme | lower + '.swig' %} {% include scheme_script %} - {% block script_extra %}{% endblock %} + {% block script_extra %} + {% include '_scripts/pages/post-details.swig' %} + {% endblock %} {% include '_scripts/boostrap.swig' %} @@ -75,6 +77,7 @@ {% include '_third-party/search/index.swig' %} {% include '_third-party/analytics/lean-analytics.swig' %} {% include '_third-party/seo/baidu-push.swig' %} + {% include '_third-party/rating.swig' %} {% include '_third-party/mathjax.swig' %} {% include '_third-party/scroll-cookie.swig' %} {% include '_third-party/exturl.swig' %} diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index ca6d5c097..454f8de94 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -207,7 +207,9 @@ {% if theme.post_wordcount.wordcount or theme.post_wordcount.min2read %}
{% if theme.post_wordcount.wordcount %} - + {% if not theme.post_wordcount.separated_meta %} + + {% endif %} @@ -337,7 +339,14 @@
{% endif %} - {% if not is_index %} + {% if not is_index and (theme.rating.enable) or (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %} +
+ {% if theme.rating.enable %} +
+
+
+ {% endif %} + {% if (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %} {% endif %} +
{% endif %} {% if not is_index and (post.prev or post.next) %} diff --git a/layout/_macro/sidebar.swig b/layout/_macro/sidebar.swig index dc4d130cf..fab8fa3f2 100644 --- a/layout/_macro/sidebar.swig +++ b/layout/_macro/sidebar.swig @@ -10,7 +10,7 @@