Skip to content

Commit fe28b21

Browse files
author
Zhang Yu
committed
add disqus comments, fix issue #1
1 parent e44c345 commit fe28b21

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎_includes/disqus_comments.html‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<div id="disqus_thread"></div>
2+
<script type="text/javascript">
3+
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
4+
var disqus_shortname = 'blogzhangyuso'; // required: replace example with your forum shortname
5+
6+
/* * * DON'T EDIT BELOW THIS LINE * * */
7+
(function() {
8+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
9+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
10+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
11+
})();
12+
</script>
13+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
14+

‎_layouts/page.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ <h1 class="post-title">{{ page.title }}</h1>
1010
<article class="post-content">
1111
{{ content }}
1212
</article>
13+
{% include disqus_comments.html %}
1314

1415
</div>

‎_layouts/post.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ <h1 class="post-title">{{ page.title }}</h1>
1111
<article class="post-content">
1212
{{ content }}
1313
</article>
14+
{% include disqus_comments.html %}
1415

1516
</div>

0 commit comments

Comments
 (0)