Skip to content

Commit

Permalink
Add Disqus comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LeNPaul committed Dec 29, 2017
1 parent f501727 commit 4f4b351
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
8 changes: 8 additions & 0 deletions _data/settings.yml
Expand Up @@ -27,6 +27,14 @@ seo:

#google-analytics-ua: UA-XXXXXX-X

#-------------------------------
# Disqus Section

# Change to true for Disqus comments
disqus:
comments: false
disqus_shortname: 'thathungrymind'

#-------------------------------
# About Section

Expand Down
14 changes: 14 additions & 0 deletions _includes/disqus.html
@@ -0,0 +1,14 @@
<section class="disqus">
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = "{{ site.data.settings.disqus.disqus_shortname }}";
var disqus_identifier = "{{ page.url }}";
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</section>
4 changes: 3 additions & 1 deletion _layouts/post.html
Expand Up @@ -7,6 +7,8 @@
<h4 class="project-title">{{ page.title }}</h4>
<div class="project-load">{{ content }}</div>
</div>
{% if site.data.settings.disqus.comments %}
{% include disqus.html %}
{% endif %}
</section>

{% include footer.html %}
3 changes: 3 additions & 0 deletions _site/index.html
Expand Up @@ -19,6 +19,9 @@
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

<!-- Use Atom -->
<link type="application/atom+xml" rel="alternate" href="http://localhost:4000/feed.xml" title="Portfolio Jekyll Theme" />

<script type="text/javascript" async
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
Expand Down

0 comments on commit 4f4b351

Please sign in to comment.