digitalcraftsman / hugo-steam-theme

Port of Tommaso Barbato's Ghost theme Steam to Hugo
MIT License
66 stars 51 forks source link

Disqus support not working #22

Closed eljobe closed 7 years ago

eljobe commented 7 years ago

My simple site built with this theme doesn't render a Disqus section for blog posts.

This line suggests that a templated called "_internal/disqus.html" should be rendered, but I don't see that template at all. Am I expected to provide it as a user of the theme?

digitalcraftsman commented 7 years ago

Hello @eljobe,

you as a user are not exptected to provide this template. Hugo ships a few built-in templates (hence the _internal in the path) for common usecases like the integration of Disqus.

Please make sure that disqusShortname has been set in the config with your Disqus shortname and that you setup Disqus accordingly.

eljobe commented 7 years ago

I finally figured that out. It looks like I needed to upgrade my version of hugo to the the disqus functionality. It's probably a good idea to mention a minimum hugo version in your documentation. (Sorry in advance if it's there and I missed it.)

Anyway. I got it working. Thanks.

digitalcraftsman commented 7 years ago

That's great. Which version of Hugo were you using? Btw, you can find the metadata of a theme, including the minimal required version of Hugo, in theme.toml.

eljobe commented 7 years ago

I was using 2.1. But, I actually found the "real" problem was that I had named my post directory posts so this check was failing. https://github.com/digitalcraftsman/hugo-steam-theme/blob/master/layouts/_default/single.html#L16

digitalcraftsman commented 7 years ago

Checking for the post type is a bit limiting for the user. I should improve template code in this area.