You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I want to use comments providers, such as giscus, the page is not behaving as what I think. I can only see a “LEAVE A COMMENT” label at the bottom of the blog posts but no actual widgets.
Debugging
I believe the problem is that the _layouts/default.html doesn't include the /comments-providers/scripts.html.
I added {% include comments-providers/scripts.html %} to _includes/scripts.html and the problem is solved.
Is this a bug? If so I hope you could add the line to the file to solve this problem for others.
Before:
After:
The text was updated successfully, but these errors were encountered:
This does look like a bug, but there are other comment providers, so we would need to check to make sure adding /comments-providers/scripts.html to _layouts/default.html doesn't break things. Off-hand I suspect it would because the comments should only be rendering in places where they make sense such as the blog posts, as opposed to throughout the site, which edits to some of the default pages can tdo.
Yeah, I believe the code in /comments-providers/scripts.html take care of the problem you mentioned: only add comments section to blog posts, etc. instead of throughout the site. Check this line in /comments-providers/scripts.html:
{% if site.comments.provider and page.comments %}
If the _config.yaml does assign a true value to the comments field of a certain page, i.e. page.comments == true, then the comments section would appear; if not, it would not appear.
For me, the page I screenshot was a blog post page, which has the page.comments=true. After I performed my actions, the page behaved normally, with comments section only on certain pages.
Describe the bug
When I want to use comments providers, such as
giscus
, the page is not behaving as what I think. I can only see a “LEAVE A COMMENT” label at the bottom of the blog posts but no actual widgets.To Reproduce
Follow the tutorial by Lazy Ren
Debugging
I believe the problem is that the
_layouts/default.html
doesn't include the/comments-providers/scripts.html
.I added
{% include comments-providers/scripts.html %}
to_includes/scripts.html
and the problem is solved.Is this a bug? If so I hope you could add the line to the file to solve this problem for others.
Before:
After:
The text was updated successfully, but these errors were encountered: