Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAdrianne Padua
7,506 PointsDisqus comments not working on Jekyll
I watched the video on how to add Disqus comments on a Jekyll site. I don't know how old or what version of Jekyll that the video is using, but I am using the latest one (3.0.1). I recently discovered a few days ago even that the pagination videos no longer work on Jekyll 3.0.1 and I had to install a separate ruby gem to enable Jekyll pagination.
On this one, I followed instructions on the video and when I try to turn on the server (by typing "jekyll serve"), it says that there's an error on my _config.yml etc. etc. The error looks like this:
jekyll 3.0.1 | Error: (C:\Sites\webconfs\_config.yml): found a tab character that violate intendation while scanning a plain scalar at line 25 column 17
My _config.yml looks like this:
# Site settings
title: WebConfs - A blog about web conferences
email: coolwebconfs@gmail.com
description: A blog about my favorite web conferences.
url: "http://webconfs.me" # the base hostname & protocol for your site
twitter_username: guilh
paginate: 3
# Build settings
markdown: kramdown
permalink: /:title
#Plugins
gems: [jekyll-paginate]
#Default settings
defaults:
-
scope:
path: "" # an empty string here means all files in the project
type: "posts" # previously `post` in Jekyll 2.2.
values:
author: Guil Hernandez
layout: "post"
category: conferences
comments: true
-
scope:
path: "" # an empty string here means all files in the project
type: "pages" # previously `post` in Jekyll 2.2.
values:
layout: "page"
My diisqus.html include file looks like this:
{% if page.comments %}
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
*/
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = '//adriwebconfs.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>
{% endif %}
My post.html looks like this:
---
layout: default
---
<div class="grid">
<div class="grid__col--12 post">
<header class="post__header">
<h1 class="post__title--grouped">{{ page.title }}</h1>
<div class="post__meta">
<b class="post__author">{% if page.author %}{{ page.author }}{% endif %}</b>
<b class="post__sep">●</b>
<b class="post__date">{{ page.date | date: "%b %-d, %Y" }}</b>
</div>
</header>
{% if page.image %}
<img class="feat-img is-hidden-mobile" src="/img/{{ page.image }}">
{% endif %}
<article class="post__content">
{{ content }}
</article>
{% include disqus.html disqus_identifier=page.disqus_identifier %}
</div>
</div>
I've looked everywhere regarding this issue and I haven't found any solution to this. Please help?
Ben Low
2,985 PointsBen Low
2,985 PointsHi @Adrianne - I'm experiencing the same issue as you. I think it might have something to do with the fact that we don't have a domain name or hosting option setup yet. However I'm not sure that's right considering Jekyll has it's own development server running locally... I'm a bit lost so hopefully someone can answer your questions with a solution as I'm stuck at the same point.
Thanks Ben