diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 62830dc801..37a10dcb12 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -66,9 +66,9 @@ Short description in several words here. Issue Number(s): #xxxx. ### Files modified: -1. Short description of modified file [1]. xxxxxxx -2. Short description of modified file [2]. xxxxxxx -3. Short description of modified file [3]. xxxxxxx +1. Short description of modified file [1]. xxxxxxx +2. Short description of modified file [2]. xxxxxxx +3. Short description of modified file [3]. xxxxxxx ### Global code changes: * ADD: `newFunction` in `utils.js`. diff --git a/_config.yml b/_config.yml index f8105d898c..e6c844a068 100644 --- a/_config.yml +++ b/_config.yml @@ -385,11 +385,11 @@ cheers_enabled: true # --------------------------------------------------------------- # Font Settings -# - Find fonts on Google Fonts (https://www.google.com/fonts) -# - All fonts set here will have the following styles: -# light, light italic, normal, normal italic, bold, bold italic -# - Be aware that setting too much fonts will cause site running slowly -# - Introduced in 5.0.1 +# Find fonts on Google Fonts (https://www.google.com/fonts) +# All fonts set here will have the following styles: +# light, light italic, normal, normal italic, bold, bold italic +# Be aware that setting too much fonts will cause site running slowly +# Introduced in 5.0.1 # --------------------------------------------------------------- # CAUTION! Safari Version 10.1.2 bug: https://github.com/iissnan/hexo-theme-next/issues/1844 # To avoid space between header and sidebar in Pisces / Gemini themes recommended to use Web Safe fonts for `global` (and `logo`): @@ -567,7 +567,7 @@ gitment: # Gitalk # Demo: https://gitalk.github.io -# Reference: https://asdfv1929.github.io/2018/01/20/gitalk/, https://liujunzhou.cn/2018/8/10/gitalk-error/#more +# Reference: https://asdfv1929.github.io/2018/01/20/gitalk/, https://liujunzhou.top/2018/8/10/gitalk-error/ gitalk: enable: false github_id: # Github repo owner @@ -578,8 +578,7 @@ gitalk: distraction_free_mode: true # Facebook-like distraction free mode # Baidu Share -# Available values: -# button | slide +# Available values: button | slide # Warning: Baidu Share does not support https. #baidushare: ## type: button @@ -765,8 +764,8 @@ local_search: bookmark: enable: false # if auto - # - save the reading position when closing the page - # - or clicking the bookmark-icon + # - save the reading position when closing the page + # - or clicking the bookmark-icon # if manual, only save it by clicking the bookmark-icon save: auto @@ -891,7 +890,7 @@ canvas_ribbon: # Script Vendors. # Set a CDN address for the vendor you want to customize. # For example -# jquery: https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js +# jquery: https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js # Be aware that you should use the same version as internal ones to avoid potential problems. # Please use the https protocol of CDN files when you enable https on your site. vendors: @@ -929,7 +928,7 @@ vendors: lazyload: # Internal version: 1.2.1 - # See: http://VelocityJS.org + # See: http://velocityjs.org # Example: # velocity: //cdn.jsdelivr.net/npm/velocity-animate@1/velocity.min.js # velocity: //cdnjs.cloudflare.com/ajax/libs/velocity/1.2.1/velocity.min.js diff --git a/docs/zh-CN/MATH.md b/docs/zh-CN/MATH.md index 5bc3b79076..760053a573 100644 --- a/docs/zh-CN/MATH.md +++ b/docs/zh-CN/MATH.md @@ -214,8 +214,6 @@ math: mathjax: # Use 2.7.1 as default, jsdelivr as default CDN, works everywhere even in China cdn: //cdn.jsdelivr.net/npm/mathjax@2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML - # For newMathJax CDN (cdnjs.cloudflare.com) with fallback to oldMathJax (cdn.mathjax.org). - #cdn: //cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML # For direct link to MathJax.js with CloudFlare CDN (cdnjs.cloudflare.com). #cdn: //cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML diff --git a/layout/_layout.swig b/layout/_layout.swig index 1198a2c4aa..bbbb3da5fd 100644 --- a/layout/_layout.swig +++ b/layout/_layout.swig @@ -25,9 +25,9 @@ - {% set container_class = "container " %} + {% set container_class = 'container' %} {% if theme.sidebar.position %} - {% set container_class = container_class + 'sidebar-position-' + theme.sidebar.position %} + {% set container_class = container_class + ' sidebar-position-' + theme.sidebar.position %} {% endif %}
diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index 3e81d806c4..46f9d16f4f 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -139,61 +139,44 @@ {% endif %} {% if post.comments %} - {% if theme.facebook_comments_plugin.enable %} + {% macro comments() %} + {% endmacro %} + {% if theme.facebook_comments_plugin.enable %} + {{ comments() }} 0 {% elseif theme.disqus.enable and theme.disqus.count %} - - - + {{ comments() }} - {% if __('disqus') !== 'disqus' -%} - - {% endif %} - + {% elseif theme.changyan.enable and theme.changyan.appid and theme.changyan.appkey %} - - - + {{ comments() }} {% if is_post() %} - + {% else %} - + {% endif %} {% elseif is_post() and theme.gitment.enable and theme.gitment.mint and theme.gitment.count %} - - - + {{ comments() }} - + {% elseif (is_post() or theme.valine.comment_count) and theme.valine.enable and theme.valine.appid and theme.valine.appkey %} - - - + {{ comments() }} @@ -201,7 +184,7 @@ {% endif %} {% endif %} - {# LeanCould PageView #} + {# LeanCloud PageView #} {% if theme.leancloud_visitors.enable or (theme.valine.enable and theme.valine.appid and theme.valine.appkey and theme.valine.visitor) %} diff --git a/layout/_partials/github-banner.swig b/layout/_partials/github-banner.swig index fbcebfc153..9666cff84a 100644 --- a/layout/_partials/github-banner.swig +++ b/layout/_partials/github-banner.swig @@ -1,6 +1,6 @@ {% if theme.github_banner %} {% set github_banner_bg_color = theme.android_chrome_color %} - {% set github_banner_fg_color = "#fff" %} + {% set github_banner_fg_color = '#fff' %} {% set github_URL = theme.github_banner.split('||')[0] | trim %} {% set github_title = theme.github_banner.split('||')[1] | trim %} diff --git a/layout/_third-party/comments/changyan.swig b/layout/_third-party/comments/changyan.swig index 9ef9cc9bfc..cf8fd2c251 100644 --- a/layout/_third-party/comments/changyan.swig +++ b/layout/_third-party/comments/changyan.swig @@ -1,6 +1,6 @@ {% if is_home() %} -{% else %} +{% elif page.comments %} diff --git a/layout/_third-party/comments/disqus.swig b/layout/_third-party/comments/disqus.swig index 2e65a0fd4e..8491d686f5 100644 --- a/layout/_third-party/comments/disqus.swig +++ b/layout/_third-party/comments/disqus.swig @@ -1,30 +1,30 @@ {% if theme.disqus.count %} {% endif %} - +{% if page.comments %} +{% endif %} diff --git a/layout/_third-party/comments/index.swig b/layout/_third-party/comments/index.swig index 4f960d5ad7..3110f8b04f 100644 --- a/layout/_third-party/comments/index.swig +++ b/layout/_third-party/comments/index.swig @@ -1,18 +1,17 @@ +{% if theme.disqus.enable %} + {% include 'disqus.swig' %} +{% elif theme.changyan.enable and theme.changyan.appid and theme.changyan.appkey %} + {% include 'changyan.swig' %} +{% elif theme.valine.enable and theme.valine.appid and theme.valine.appkey %} + {% include 'valine.swig' %} +{% endif %} + {% if page.comments %} - {% if theme.disqus.enable %} - {% include 'disqus.swig' %} - {% elif theme.livere_uid %} + {% if theme.livere_uid %} {% include 'livere.swig' %} - {% elif theme.changyan.enable and theme.changyan.appid and theme.changyan.appkey %} - {% include 'changyan.swig' %} {% elif theme.gitment.enable and theme.gitment.client_id %} {% include 'gitment.swig' %} {% elif theme.gitalk.enable %} {% include 'gitalk.swig' %} {% endif %} {% endif %} - -{# Valine Comment Count #} -{% if theme.valine.enable and theme.valine.appid and theme.valine.appkey %} - {% include 'valine.swig' %} -{% endif %} diff --git a/layout/_third-party/comments/valine.swig b/layout/_third-party/comments/valine.swig index 60c8eb85bc..8ad4f47254 100644 --- a/layout/_third-party/comments/valine.swig +++ b/layout/_third-party/comments/valine.swig @@ -13,7 +13,7 @@