Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
graphcomment + ghost

Paste the comment code into post.hbs

Next, in your Ghost theme, locate the template file where you want to insert comments on your site. Usually post.hbs - right after the content. In Casper, Ghost’s default theme, you’ll see a line of code specifically reserved for inserting comments. This is where you’ll want to paste the Graphcomment code:

Make sure you remove the comments on line 65 and 69 Make sure you remove the comments on line 65 and 69

replace "<your_public_key>" by your own public key from the admin GraphComment.

<div id="graphcomment"></div>
<script type="text/javascript">
var __semio__params = {
graphcommentId: "<your_public_key>", // make sure the id is yours
behaviour: {
// uid: "...", // uniq identifer for the comments thread on your page (ex: your page id)
uid: "ghost-{{comment_id}}",
url: "{{url absolute="true"}}"
// configure your variables here
/* - - - DON'T EDIT BELOW THIS LINE - - - */
function __semio__onload() {
(function() {
var gc = document.createElement('script'); gc.type = 'text/javascript'; gc.async = true;
gc.onload = __semio__onload; gc.defer = true; gc.src = '' +;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment