This guide will cover how to get the blog platform, ghost, running on MacOs.
Let’s setup homebrew for MacOs as it just makes the process so much easier. Homebrew is ‘ the missing package manager for MacOs‘ and you can read all about it here.
Setting it up is easy. Simply lunch the terminal app and paste the following code:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Press [ Enter ] to install homebrew and type your administrative password. (The one you use to log into your account.) Once the process is complete, you should be greeted with:
==> Next steps:
Homebrew will allows us to install/uninstall packages without having to download extra packages, or any additional steps.
Node.js and Npm
This simple command will install node.js and npm which are essential for getting ghost running.
brew install node@4
*Note: If it is still not allowing you to install the older version, type the following commands:
# The 1st command will force install Node Version 4 brew install node@4 --force # The 2nd command will force link this version of node. brew link node@4 --force
Verify Node and Npm are Installed
node -v && npm -v
The following command should output their version numbers. At the time, these were the version numbers:
So far our work has consisted of inputting commands via the terminal, but this next part will be more manual.
Navigate here to download the latest version of ghost. At the time, it was Ghost-0.11.9. Unzip the archive and place it in an easy to access location. I’ll keep it in /documents. Rename the folder to something easier, such as ghost, ghostblog, myblog, etc.
Installing Production Dependencies
Launch the terminal once more and type cd followed by the path where your ghost directory resides.
Hit enter to execute the command.
# This command will install production dependencies only. npm install --production
In case of failure, recheck your node version. Ghost supports Node v4.x-5. Note: Version 7 of Node is unsupported and you would get the following output:
ERROR: Unsupported version of Node
Upon success, you should see the following output:
Setting Up A Ghost Blog
Core files are installed. It’s time to set up your ghost blog. Note: Your blog is only viewable by you and lives only in your mac/pc/etc.
Input the following command in the terminal:
If you did everything correctly, your blog will be accessible on http://localhost:2368 and if you append /ghost to the end of the url, you’ll be able to set up your blog at http://localhost:2368/ghost
Setting up an account in ghost is simple. Email address, Full name (User name), Password, and blog title. On the next part click on ‘I’ll do this later. Take me to my blog.’
Ghost uses the beautiful language of markup but if you are into html, it also accepts that. You can see how ghost works from their introductory post.
To stop your ghost blog, simply press [CTRL] [C] at the same time. You should get the following output:
Ghost has shut down
What if you wanted to use the blogging platform ghost as your static website? To set up ghost as a static website, see this post.