/ ghost

Getting started with Ghost

Today I was playing with Ghost an opensource platform for blogging that recently reached version 1.0.

Ghost has a clean design, a great care for details and looks like a nice platform to use. Plus it's opensource and well supported!

Here are some notes to get started:

Initial NODE Setup

If you need it, for being able to install npm packages globally without root permissions. Create ~/.npmrc file and write in it:

prefix = ~/.npm

put this at the end of your ~/.profile:

export PATH="~/.npm/bin:$PATH"

Install

There are various ways of install locally (I was following this guide) but the suggested one is via the ghost-cli

  1. Install the ghost-cli package

     yarn global add ghost-cli@latest
    
  2. create a new folder to keep your new Ghost-blog

  3. install/start ghost with

     yarn install local
    
  4. configure your owner account locally: https://dariosky.github.io/ghost/

  5. setup your blog ... until you're ready to publish

Deploy

For hosting Ghost you can go with the self-hosting option (it uses Node, and 1GB of RAM minimum is suggested), you can buy the hosting from the foundation and help founding the project, but I wanted to try to host it in the GitHub pages (that I started loving recently).

Here is how:

Install Python requirements

To create the static dump of the site for GitHub, we need some Python tool:

From the Ghost folder I used pyenv to setup a default virtual-environment named ghost (buster needs Python 2.7):

pyenv virtualenv 2.7.13 ghost
pyenv local ghost
pip install buster

We create a github repository named username.github.io that will host the static site.
Buster will take the site and freeze it in a static folder.

buster setup

Choose username.github.io, with your username when promptedm and then

buster generate

We can now push to GitHub:

cd static
git add -A
git commit -m "Website update at $(date)"
git push origin master

And that's it your blog should be updated