Skip to content

Commit

Permalink
Merge pull request #184 from Treri/master
Browse files Browse the repository at this point in the history
add duoshuo comment provider for chinese users

> Isolated. New comment provider. Low risk. Merging.
  • Loading branch information
groundh0g committed May 25, 2015
2 parents 10ff39a + bd5e4ef commit a2700bb
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 a2700bb

Please sign in to comment.