axiantheme / ghostion

Free Ghost theme powered by Foundation 5
149 stars 59 forks source link

Disqus comments on homepage #11

Open skeddy opened 10 years ago

skeddy commented 10 years ago

Hi,

Using the current version of theme, I've noticed that even though I've updated the shortname for Disqus, it's not appearing on the homepage post list.

I have edited this partial

partials\home_page\at_mainbody.hbs

Below line 13, I have added in the following line

<span class="at_post_comments"><span class="fa fa-comments"></span> <a href="{{url}}#disqus_thread"> Comments</a></span>

I've also modified the CSS to add in a new "at_post_comments" so taht it sites next to the tags on the homepage.

The trouble is, I'm not seeing it update to "0 Comments" and even where there is a comment, it's not changing.

Have I modified this incorrectly?

skeddy commented 10 years ago

Dirty fix

Finally got this resolved.

The call for the disqus.com/count.js seems to be absent from the ghostion.min.js in /assets/js

By simply adding the disqus count.js call as described here I found the comment count magically appearing.

You do still need to add a class to the min.css

I simply amended this

.at_post_author,
.at_post_time,
.at_post_tags{
  display:inline-block;
  margin-right:15px;
}

to this

.at_post_author,
.at_post_time,
.at_post_tags,
.at_post_commentcount {
  display:inline-block;
  margin-right:15px;
}

Just don't call it .at_post_comments or you'll clash with other CSS classes and go mad for an hour like I did.

I'm sure there is a quicker way to work around this, and look forward to seeing someone implement it.

Cheers!

Rob

skeddy commented 10 years ago

Not such a dirty fix :-(

The comment count is now displayed, but it's taking into account every single post displayed, and only applying it to the first post listed.

You can see it in action on my blog: http://skeddy.net

In the first post, the homepage shows 1 comment. That actual comment has been left on post no.3 and now displays everywhere.

So there's a slight config change, and I'm sure it's pretty easy. If anyone spots it before I can update it, that would be awesome.

Cheers! Rob