diff --git a/_config.yml b/_config.yml index e17f96f2b..0f806fc86 100755 --- a/_config.yml +++ b/_config.yml @@ -277,6 +277,10 @@ mathjax: # Gentie productKey #gentie_productKey: +# Support for youyan comments system. +# You can get your uid from http://www.uyan.cc +#youyan_uid: your uid + # Baidu Share # Available value: # button | slide diff --git a/layout/_layout.swig b/layout/_layout.swig index 38145c91c..f3bfc3bfb 100644 --- a/layout/_layout.swig +++ b/layout/_layout.swig @@ -31,7 +31,7 @@
- {% block content %}{% endblock %} + {% block content %}{% endblock %}
{% include '_partials/duoshuo-hot-articles.swig' %} {% include '_partials/comments.swig' %} diff --git a/layout/_partials/comments.swig b/layout/_partials/comments.swig index 4f98645d5..26c496ee4 100644 --- a/layout/_partials/comments.swig +++ b/layout/_partials/comments.swig @@ -22,6 +22,8 @@
{% elseif theme.gentie_productKey %}
+ {% elseif theme.youyan_uid %} +
{% endif %}
{% endif %} diff --git a/layout/_scripts/third-party/comments.swig b/layout/_scripts/third-party/comments.swig index e84ce7fda..e9bccfd30 100644 --- a/layout/_scripts/third-party/comments.swig +++ b/layout/_scripts/third-party/comments.swig @@ -2,3 +2,4 @@ {% include './comments/disqus.swig' %} {% include './comments/hypercomments.swig' %} {% include './comments/gentie.swig' %} +{% include './comments/youyan.swig' %} diff --git a/layout/_scripts/third-party/comments/youyan.swig b/layout/_scripts/third-party/comments/youyan.swig new file mode 100644 index 000000000..37dd1b233 --- /dev/null +++ b/layout/_scripts/third-party/comments/youyan.swig @@ -0,0 +1,17 @@ +{% if not (theme.duoshuo and theme.duoshuo.shortname) + and not theme.duoshuo_shortname + and not theme.disqus_shortname + and not theme.hypercomments_id + and not theme.gentie_productKey %} + + {% if theme.youyan_uid %} + {% set uid = theme.youyan_uid %} + {% endif %} + + {% if page.comments %} + + + + {% endif %} + +{% endif %}