Hi all,-
I've decided to experiment with allowing comments on my site through
Disqus. So I've followed the instructions (
http://nestacms.com/docs/config/comments-with-disqus) but the Disqus
functionality isn't showing below the articles.
My page.haml ends in this:
= haml :page_meta, :layout => false, :locals => { :page => @page }
>
> = haml :comments, :layout => false
>
Am I missing something?
Thanks,
James
PS. Merry Christmas and a Happy New Year everyone.
On 26 Dec 2011, at 15:44, James Abbott <abbottjam@gmail.com> wrote:
> Am I missing something?
That's why you shouldn't wave your iPhone about while replying to emails.
Let's try that again…
Check whether your web page has any HTML in it that is contained in the
comments HAML file. There'll be an if statement wrapped around it, that
will put a tag on the page for disqus to attach to on load.
I wonder whether your environment (i.e. production) is being setup
correctly? That might lead to the config being misread.
Thanks for the tip Graham. No, the HTML output doesn't contain any markup pertaining to comments - it's the page metadata and then the page footer ends. Here's my comments.haml: - if short_name = Nesta::Config.disqus_short_name > #disqus_thread > - if Sinatra::Application.environment == :development > %script(type="text/javascript") > var disqus_developer = true; > %script(type="text/javascript" src=" > http://disqus.com/forums/#{short_name}/embed.js") > %noscript > %a(href="http://disqus.com/forums/#{short_name}/?url=ref") View > comments. > I tried changing == :development to == :production but that produced no effect. Is there any other place I should tweak? Config.yml? / James On Mon, Dec 26, 2011 at 6:05 PM, Graham Ashton <graham@effectif.com> wrote: > On 26 Dec 2011, at 15:44, James Abbott <abbottjam@gmail.com> wrote: > > Am I missing something? > > > That's why you shouldn't wave your iPhone about while replying to emails. Let's > try that again… > > Check whether your web page has any HTML in it that is contained in the > comments HAML file. There'll be an if statement wrapped around it, that > will put a tag on the page for disqus to attach to on load. > > I wonder whether your environment (i.e. production) is being setup > correctly? That might lead to the config being misread. >
Try removing the env conditional altogether? I think env values are strings, not symbols, though sometimes both work. Pecked on my mobile keyboard, -- Wynn On Dec 26, 2011, at 12:52 PM, James Abbott <abbottjam@gmail.com> wrote: Thanks for the tip Graham. No, the HTML output doesn't contain any markup pertaining to comments - it's the page metadata and then the page footer ends. Here's my comments.haml: - if short_name = Nesta::Config.disqus_short_name > #disqus_thread > - if Sinatra::Application.environment == :development > %script(type="text/javascript") > var disqus_developer = true; > %script(type="text/javascript" src=" > http://disqus.com/forums/#{short_name}/embed.js") > %noscript > %a(href="http://disqus.com/forums/#{short_name}/?url=ref") View > comments. > I tried changing == :development to == :production but that produced no effect. Is there any other place I should tweak? Config.yml? / James On Mon, Dec 26, 2011 at 6:05 PM, Graham Ashton <graham@effectif.com> wrote: > On 26 Dec 2011, at 15:44, James Abbott <abbottjam@gmail.com> wrote: > > Am I missing something? > > > That's why you shouldn't wave your iPhone about while replying to emails. Let's > try that again… > > Check whether your web page has any HTML in it that is contained in the > comments HAML file. There'll be an if statement wrapped around it, that > will put a tag on the page for disqus to attach to on load. > > I wonder whether your environment (i.e. production) is being setup > correctly? That might lead to the config being misread. >
Argggh. YAML indentation fault. I had everything configured correctly except that my discus_short_name property was indented two spaces into the file. These indentation-sensitive languages have a way of tricking you into thinking you've done everything right, and then... busted! Thanks for the responses guys, James On Mon, Dec 26, 2011 at 9:58 PM, Wynn Netherland <wynn.netherland@gmail.com>wrote: > Try removing the env conditional altogether? I think env values are > strings, not symbols, though sometimes both work. > > Pecked on my mobile keyboard, > > -- Wynn > > On Dec 26, 2011, at 12:52 PM, James Abbott <abbottjam@gmail.com> wrote: > > Thanks for the tip Graham. No, the HTML output doesn't contain any markup > pertaining to comments - it's the page metadata and then the page footer > ends. > > Here's my comments.haml: > > - if short_name = Nesta::Config.disqus_short_name >> #disqus_thread >> - if Sinatra::Application.environment == :development >> %script(type="text/javascript") >> var disqus_developer = true; >> %script(type="text/javascript" src=" >> http://disqus.com/forums/#{short_name}/embed.js") >> %noscript >> %a(href="http://disqus.com/forums/#{short_name}/?url=ref") View >> comments. >> > > I tried changing == :development to == :production but that produced no > effect. Is there any other place I should tweak? Config.yml? > > / James > > On Mon, Dec 26, 2011 at 6:05 PM, Graham Ashton <graham@effectif.com>wrote: > >> On 26 Dec 2011, at 15:44, James Abbott <abbottjam@gmail.com> wrote: >> >> Am I missing something? >> >> >> That's why you shouldn't wave your iPhone about while replying to emails. Let's >> try that again… >> >> Check whether your web page has any HTML in it that is contained in the >> comments HAML file. There'll be an if statement wrapped around it, that >> will put a tag on the page for disqus to attach to on load. >> >> I wonder whether your environment (i.e. production) is being setup >> correctly? That might lead to the config being misread. >> > >
On 26 Dec 2011, at 18:52, James Abbott wrote:
> I tried changing == :development to == :production but that produced no
effect. Is there any other place I should tweak? Config.yml?
The disqus_short_name method will pull your Disqus details from an
environment specific section of config.yml, so what I was thinking was
that the environment might not be configured to "production" on your
server, which would cause the first if statement to return false, and all
the HTML to be hidden.
On 26 Dec 2011, at 15:44, James Abbott <abbottjam@gmail.com> wrote:
> Am I missing something?
Check whether your web page has any HTML in it that is contained in the
comments HAML file. There'll be an if statement wrapped around it, that
will put a tag on the page for disqus to attach to