Skip to content

Commit a2700bb

Browse files
committed
Merge pull request plusjade#184 from Treri/master
add duoshuo comment provider for chinese users > Isolated. New comment provider. Low risk. Merging.
2 parents 10ff39a + bd5e4ef commit a2700bb

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ JB :
9292
num_posts: 5
9393
width: 580
9494
colorscheme: light
95+
duoshuo :
96+
short_name : jekyllbootstrap
9597

9698
# Settings for analytics helper
9799
# Set 'provider' to the analytics provider you want to use.

_includes/JB/comments

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
{% include JB/comments-providers/intensedebate %}
1010
{% when "facebook" %}
1111
{% include JB/comments-providers/facebook %}
12+
{% when "duoshuo" %}
13+
{% include JB/comments-providers/duoshuo %}
1214
{% when "custom" %}
1315
{% include custom/comments %}
1416
{% endcase %}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!-- Duoshuo Comment BEGIN -->
2+
<div class="ds-thread"{% if page.wordpress_id %} data-thread-key="{{page.wordpress_id}}"{% endif %}></div>
3+
<script type="text/javascript">
4+
var duoshuoQuery = {short_name:'{{ site.JB.comments.duoshuo.short_name }}'};
5+
(function() {
6+
var ds = document.createElement('script');
7+
ds.type = 'text/javascript';ds.async = true;
8+
ds.src = 'http://static.duoshuo.com/embed.js';
9+
ds.charset = 'UTF-8';
10+
(document.getElementsByTagName('head')[0]
11+
|| document.getElementsByTagName('body')[0]).appendChild(ds);
12+
})();
13+
</script>
14+
<!-- Duoshuo Comment END -->

0 commit comments

Comments
 (0)