Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google-plus comments provider #1092

Closed
1 of 5 tasks
zmsp opened this issue Jul 2, 2017 · 3 comments
Closed
1 of 5 tasks

google-plus comments provider #1092

zmsp opened this issue Jul 2, 2017 · 3 comments

Comments

@zmsp
Copy link

zmsp commented Jul 2, 2017

google-plus comments provider seems to be stuck on loading. Didn't really see any javascript error on console.

  • This is a feature request.
  • This is a question about using the theme.
  • I have updated all gems with bundle update.
  • I have tested locally with bundle exec jekyll build.
  • I believe this to be a bug with the theme --- not Jekyll, GitHub Pages or one of the bundled plugins.

Environment informations

Latest minimal-mistakes version
OS: Windows: Chrome/Linux: Firefox

Steps to reproduce the behavior

To reproduce, try to add comments after enabling google-plus commenting.
page: zmsp.github.io/hardware/cryptocurrency/gfx-too-high/
repo: github.com/zmsp/zmsp.github.io
capture

@mmistakes
Copy link
Owner

mmistakes commented Jul 3, 2017

Not sure what's going on. I'm not seeing any script errors. Only thing I can think of Google changed the API or deprecated something.

To get this working originally I followed some instructions from a random blog post. I never could find official documentation from Google on how to embed G+ comments on a website. Wouldn't surprise me at all if they turned this feature off for new posts as they've been scaling back the whole G+ thing the last couple of years.

If you can find some documentation on how to fix or implement it directly from the horse's mouth I'll happily apply it.

@zmsp
Copy link
Author

zmsp commented Jul 4, 2017

This change fixed it. I am not familiar with how it loads the comment box so its not the most elegant. But let me know if you want the change and I can submit a pull request. zmsp/zmsp.github.io@23914d3

changes on _includes/comments.html

<script>
function initComment() {
    gapi.comments.render("g-comments", {
        href: window.location,
        width: "624",
        first_party_property: "BLOGGER",
        view_type: "FILTERED_POSTMOD"
    })
}
</script>
<script async type="text/javascript" src="https://apis.google.com/js/plusone.js" onload="initComment()" />

Pulled from here: https://floaternet.com/gcomments

@mmistakes
Copy link
Owner

A PR with this fix would be great.

koyumi0601 pushed a commit to koyumi0601/koyumi0601.github.io that referenced this issue Jul 31, 2023
Avoid Liquid failure when no pages with titles

Fix issue mmistakes#1085

The user's config specified collections (incorrectly). Trying to build the site resulted in Jekyll failing due to a Liquid error. The error report did not suggest the cause of the error.

Liquid fails with division by 0 when title_pages_size is 0. This fix guards that code by checking that title_pages is non-empty.

To test:

1.  Specify a Jekyll collection with no pages, and specify it as a JTD collection.
2. Build the site.
3. Check that the specified collection has no nav links to pages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants