commit
23a0e8cdb4
2 changed files with 16 additions and 0 deletions
|
@ -77,5 +77,6 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include "partial/disqus.html" %}
|
{% include "partial/disqus.html" %}
|
||||||
|
{% include "partial/duoshuo.html" %}
|
||||||
</article>
|
</article>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
15
templates/partial/duoshuo.html
Normal file
15
templates/partial/duoshuo.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{% if DUOSHUO_SITENAME %}
|
||||||
|
<div class="ds-thread" data-thread-key="{{ article.slug }}" data-title="{{ article.title }}" data-url="{{ SITEURL }}/{{ article.url }}"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
var duoshuoQuery = {short_name:'{{ DUOSHUO_SITENAME }}'};
|
||||||
|
(function() {
|
||||||
|
var ds = document.createElement('script');
|
||||||
|
ds.type = 'text/javascript';ds.async = true;
|
||||||
|
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
|
||||||
|
ds.charset = 'UTF-8';
|
||||||
|
(document.getElementsByTagName('head')[0]
|
||||||
|
|| document.getElementsByTagName('body')[0]).appendChild(ds);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
Loading…
Reference in a new issue