Why a static site generator?
- Static files can be deployed to any regular server. You don't need a Node.js server and a remote installation of Ghost.
- It's fast. Depending on the host, static HTML files can be served faster than a Node.js app.
- It's secure. There is no remote admin or config file. All your settings are restricted to the local environment.
- You can use it as a backup solution for your Ghost blog.
Installation
Install pip
Buster is written in Python. To install Buster, you will need pip, a Python package manager. Here is the official install guide: http://www.pip-installer.org/en/latest/installing.htmlYou can check if your system has pip installed by running this command:
$ pip --version
Install Homebrew
Buster requires wget, which can be installed through Homebrew, a package manager for Mac. Here is the official install guide: http://brew.shYou can check if your system has Homebrew installed by running this command:
$ brew --version
Install Buster
When you have pip and Homebrew installed, you are ready to install Buster.$ pip install buster
$ brew install wget
That's it. If there are no errors, the installation has succeeded. To make sure, you can run the version command:
$ buster --version
Usage
First you'll need to setup Buster:$ buster setup
Buster will ask you to "Enter the Github repository URL:". You will
need to have an empty GitHub repo at hand. Enter the url (change
username to your username and repo to your repo name):$ https://github.com/username/repo.git
Now you can generate the static files:$ buster generate --domain=http://127.0.0.1:2368
If you are using a different domain or port for Ghost, you should alter the command.With the preview command you can preview the generated output in the browser.
$ buster preview
The last step is to deploy the static files to the GitHub repo:$ buster deploy
from http://www.metacotta.com/ghost-static-site-generation-with-buster/