Skip to content

Commit

Permalink
add duoshuo comment provider for chinese users
Browse files Browse the repository at this point in the history
  • Loading branch information
wyntau committed Sep 14, 2013
1 parent fed94a2 commit bd5e4ef
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ JB :
num_posts: 5
width: 580
colorscheme: light
duoshuo :
short_name : jekyllbootstrap

# Settings for analytics helper
# Set 'provider' to the analytics provider you want to use.
Expand Down
2 changes: 2 additions & 0 deletions _includes/JB/comments
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
{% include JB/comments-providers/intensedebate %}
{% when "facebook" %}
{% include JB/comments-providers/facebook %}
{% when "duoshuo" %}
{% include JB/comments-providers/duoshuo %}
{% when "custom" %}
{% include custom/comments %}
{% endcase %}
Expand Down
14 changes: 14 additions & 0 deletions _includes/JB/comments-providers/duoshuo
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Duoshuo Comment BEGIN -->
<div class="ds-thread"{% if page.wordpress_id %} data-thread-key="{{page.wordpress_id}}"{% endif %}></div>
<script type="text/javascript">
var duoshuoQuery = {short_name:'{{ site.JB.comments.duoshuo.short_name }}'};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.src = 'http://static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<!-- Duoshuo Comment END -->

0 comments on commit bd5e4ef

Please sign in to comment.