After upgrading to ghost 0.4.3 over the weekend and finding that a few of my custom configurations got zapped...well, I should have backed up the post.hbs
and the default.hbs
files, shouldn't I!
The below steps will get a muut comments section up and running on your site, but before you do that you might need to set up a muut account.
Once you have your muut details, to embed them into ghost simply do the following.
Configure the
default.hbs
file to pick up the muut stylesheet and the comments section plug in:- Open the
~/ghost/content/themes/casper/default.hbs
file. - Insert the following CSS stylesheet link into the
{{! Styles'n'Scripts }}
section of the file:<link rel="stylesheet" type="text/css" href="//cdn.muut.com/latest/moot.css">
- Insert the following muut JavaScript link into
{{! The main JavaScript file for Casper }}
section of the file.<script src="//cdn.muut.com/1/moot.min.js"></script>
- Save and exit. Here are screenshots of my configuration.
- Open the
Configure the
post.hbs
file to insert the comments section at the bottom of each article you write.
Note: Before you continue here, make sure you have your muut information. You should be able to get it, using this link as an example
https://muut.com/YOUR_FORUM_NAME#embed
. Once you have that, use the following steps:- Open the
~/ghost/content/themes/casper/post.hbs
file. - Add your muut forum code under the footer section of the file.
- Save and exit.
Here is a screenshot of my configuration.
- Open the
Finally, restart ghost to pick up the changes:
service ghost restart
Or, if like me you are using the forever command.
- Stop the running ghost instance and start it again
cd ~/var/www/ghost/ forever stop index.js NODE_ENV=production forever start index.js
Note: Using the forever restart
option does not pick up file changes for me, perhaps it's a bug with ghost, or forever, or me! That is why I have to stop/start it. And, below is the comments section that prove this works!