Now that I have the basics done, I’ve started setting up comments, ads, and Google Analytics.

Comments

Because Jekyll is a static site generator there’s no built in way to have comments on posts like in Wordpress.

I knew this was going to be a problem so I’ve recently moved all the comments to Disqus. When I started looking into the process of how to include the comment in Jekyll it was a fairly easy process.

Disqus includes an Universal Embed Code that you can just paste into your post.html file. They will automatically update the link to include your sites information:

<div id="disqus_thread"></div>
<script>
    (function() {  // DON'T EDIT BELOW THIS LINE
        var d = document, s = d.createElement('script');
        
        s.src = '//thisprogrammingthing.disqus.com/embed.js';
        
        s.setAttribute('data-timestamp', +new Date());
        (d.head || d.body).appendChild(s);
    })();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>

The problem I ran into was that on my test site when I ran this code none of my comments showed up. To fix this I had to add the following line:

var disqus_url = "http://thisprogrammingthing.com/2016/Moving-To-Jekyll-2/";

Comments and Ads

This was just a copy paste process so I’m not going to go into this (ads into post.html and google analytics into default.html). It was (again) super easy.

With any luck I’ll be done with this sooner than I thought. :-)