diff --git a/_config.yml b/_config.yml index 7e6fc74345..56131945f4 100644 --- a/_config.yml +++ b/_config.yml @@ -350,15 +350,18 @@ wechat_subscriber: #qcode: /path/to/your/wechatqcode e.g. /uploads/wechat-qcode.jpg #description: e.g. subscribe to my blog by scanning my public wechat account -# Reward -# If true, reward would be displayed in every article by default. -# You can show or hide reward in a specific article throuth `reward: true | false` in Front Matter. -reward: +# Reward (Donate) +reward_settings: + # If true, reward would be displayed in every article by default. + # You can show or hide reward in a specific article throuth `reward: true | false` in Front Matter. enable: false + animation: false #comment: Donate comment here - #wechatpay: /images/wechatpay.jpg - #alipay: /images/alipay.jpg - #bitcoin: /images/bitcoin.jpg + +reward: + #wechatpay: /images/wechatpay.png + #alipay: /images/alipay.png + #bitcoin: /images/bitcoin.png # Related popular posts # Dependencies: https://github.com/tea3/hexo-related-popular-posts diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index 6e29f9d631..f4a2746fd8 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -342,12 +342,12 @@ {% include '../_partials/post/wechat-subscriber.swig' %} {% endif %} - {% if page.reward === undefined and theme.reward.enable %} + {% if page.reward === undefined and theme.reward_settings.enable %} {% set reward_able = true %} {% else %} {% set reward_able = page.reward %} {% endif %} - {% if reward_able and (theme.reward.alipay or theme.reward.wechatpay or theme.reward.bitcoin) and not is_index %} + {% if reward_able and not is_index %}
{% include '../_partials/post/reward.swig' %}
diff --git a/layout/_partials/post/reward.swig b/layout/_partials/post/reward.swig index f27ae4e2d7..e8f60b69cd 100644 --- a/layout/_partials/post/reward.swig +++ b/layout/_partials/post/reward.swig @@ -1,30 +1,22 @@ -
-
{{ theme.reward.comment }}
- -