Disccus Intergation Working but Size is wrong and Not Fitting The Layout

**Ghost is the latest version of the dawn theme and using the following code in post.hbs **
See the current plugin layout (it’s not centered and going out of the screen ) : https://neurologicaldisorders.co/what-is-a-stroke/

this what my post.hbs file looks like I did this according to instruction here  ( https://ghost.org/integrations/disqus/ )  : 
{{!< default}}

<div class="content-area">
    <main class="site-main">
            {{> content width="wide"}}
  var disqus_config = function () {
    this.page.url = '{{url absolute=true}}';
    this.page.identifier = '{{comment_id}}';
<div id="disqus_thread"></div>
var disqus_config = function () {
	this.page.url = "{{url absolute="true"}}";  
	this.page.identifier = "ghost-{{comment_id}}"
(function() {
var d = document, s = d.createElement('script');
s.src = 'https://myname.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
        {{#is "post"}}

            {{> related}}
            {{> comment}}

Hey @Anubhav_Singh, add your comment code in partials/comment.hbs file. For Dawn theme, it should be like:

{{#if post.access}}
<div class="comment container small">
    Your comment code here...

But it looks like you’re using Ruby theme, but the idea is same.

1 Like

thanks for the help man, Yes I got it to work on a ruby first .
You have a great work experience man can you help me change the tag colour in ruby ?
as you can see now on my website its this colour

where in the code of ruby can I change the tag color ?

:slightly_smiling_face: I assume you want to change the brand color completely, instead of changing only tag color. If so, add this CSS in “Code injection > Site Header” field.

    :root {
        --primary-color: NEW_COLOR;

thanks man you are a lifesaver

1 Like

I have same issue here with Dawn, Disqus code is working fine when i paste it in post.hsb, but it doesn’t fit in Dawn Layout.

I have update it in partials/comment.hbs file, Disqus doesn’t load after ghost restart

Hey @yong, I was able to get Disqus loaded by copying your code and only changing the shortname myname in myname.disqus.org part. Have you replaced myname with your own Disqus shortname? Also comments are visible on public posts by default, but would require to be logged in when viewing members-only posts.

Hey @minimaluminium, I did exactly as you have mentioned. But the comments are still not loading for me in the dawn theme. I was previously using the dawn theme which was purchased from iveel.com but switched to the theme which is now available through Ghost’s theme directory.

Also, I am using CyberDuck to just download that comment.hbs, make edits, re-upload it to the folder, & then run ‘ghost restart’. Am I doing this wrong?

Please let me know what can I do!

I got it to work by pasting the code before the {{!-- {{#if post.access}} condition. Can you please tell me what does this condition do?

Hey @ankitst, {{#if access}} checks if the current user has access to the current post. The comment section was placed inside this condition block to make it only visible when a user has access to a post.

I assume you might not have uncommented (remove {{!-- and --}}) the block which should be like this:

{{#if post.access}}
<div class="comment container small">
    If you want to embed comments, this is a good place to do it!

Hey @minimaluminium, thank you. Uncommenting worked. You are awesome :slight_smile:

1 Like