Open utterances-bot opened 3 years ago
Thanks a ton for this! Only thing I got stuck on was adding the component to my blog-post.js template file. I forgot to include the import!
Thanks for the code snippets. Worked like a charm. I implemented for my site https://hemanta.netlify.app.
Hello,
I implemented GraphComment for my Gatsby powered blog. However, I am getting an eslint error when I run yarn start
:
ERROR #98123 WEBPACK
Generating development JavaScript bundle failed
/home/hnhegde/work/square-deal-blog/src/components/Comments.jsx
20:13 error '__semio__gc_graphlogin' is not defined no-undef
✖ 1 problem (1 error, 0 warnings)
File: src/components/Comments.jsx
failed Building development bundle - 18.196s
And here is the snippet provided by GraphComment:
<div id="graphcomment"></div>
<script type="text/javascript">
/* - - - CONFIGURATION VARIABLES - - - */
var __semio__params = {
graphcommentId: "<your-site-id>", // make sure the id is yours
behaviour: {
// HIGHLY RECOMMENDED
// uid: "...", // uniq identifer for the comments thread on your page (ex: your page id)
},
// configure your variables here
}
/* - - - DON'T EDIT BELOW THIS LINE - - - */
function __semio__onload() {
__semio__gc_graphlogin(__semio__params)
}
(function() {
var gc = document.createElement('script'); gc.type = 'text/javascript'; gc.async = true;
gc.onload = __semio__onload; gc.defer = true; gc.src = 'https://integration.graphcomment.com/gc_graphlogin.js?' + Date.now();
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
})();
</script>
The error message itself makes sense because semiogc_graphlogin isn't defined anywhere. Has anyone used GraphComment with Gatsby/React? Did you encounter this issue?
I have this question on SO: https://stackoverflow.com/q/68743205/3666262
Would appreciate your responses.
Thank you!
Ignore this comment, testing out a bug for utterances
thanks for sharing this
Helpful 🙌
How to add comments to your Gatsby blog · Emma Goto
Does your Gatsby blog have a commenting system set up? If not, you could be missing out! Comments help drive engagement by giving your…
https://www.emgoto.com/gatsby-comments/?utterances=d9622f64a8ee929312999c53SHP8UNz4l2KLqDUw0Tvk1lAf9VzvcuPNZ%2FqhcbEvqbvlg6l9PCgewr5n4DV0o2KVCYiA4Tcp0P65fJawqfAjZd1Zz6vFZGirOBMuAk8OpLHP0GLN0YtHZirq%2BPg%3D