How to install Ghost Blog v4.0+ for Theme Development
Theme development requires two steps:
- Install Ghost Blog on your local computer.
- Configure your developer environment.
Step 0 - Install Node Version Manager
Read this article on how to install multiple versions of node using Node Version Manager.
Step 1 - Install Node
Ghost currently works with node v12.10.0.
nvm install 12.10.0
Set the node version to be the default.
nvm alias default use 12.10.0
Step 2 - Install Ghost + Cli
Install Ghost framework globally (
npm install ghost-cli@latest -g
Install Ghost on your local machine.
ghost install local
Step 3 - Start Ghost
Step 4 - Create a SymLink
Traditionally, Ghost wants you to work on the theme within
Ghost/content/themes but your GIT repo may live somewhere else. So the solution is to create a SymLink.
Change directory into the
/themes folder of your Ghost installation.
Create a SymLink
ln -s /path/to/git/repo/website/development/my_folder
Dev will run a gulp command. Gulp uses an NPM tool called BrowserSync to construct a wrapper around Ghost. This allows you to make changes to a file within the theme, and the Ghost website will update automatically.