The following steps are for OS X. Skip steps if something is already installed, though updating/checking versions is probably advisable.
brew install ruby export PATH=/usr/local/bin:$PATH
The first line installs Ruby via Homebrew.
The second line updates the
$PATH to use the Homebrew copy of Ruby ahead of
OS X’s system copy.
brew install ImageMagick
gem install bundler
Bundler will handle dependencies for the repository.
cd to the directory where you want to clone the repo, then do:
git clone https://github.com/delucis/v3.chrisswithinbank.net.git cd v3.chrisswithinbank.net
Bundler will read the repository’s
Gemfile and install listed
Running local server and building
bundle exec jekyll serve
This will attempt to build the site and serve to http://0.0.0.0:4000/.
The site files are built to
To build without serving locally do:
bundle exec jekyll build
Building for production
To make sure URLs are processed using the correct host for deployment (rather than
JEKYLL_ENV=production bundle exec jekyll build
brew install git-ftp
git-ftp allows you to maintain a SHA-1 reference on the server and push
changes over FTP.
_site/ a repo
cd _site git init
Stage everything in the build folder for committing:
git add -A
Double check that really was everything:
Make your first commit:
git commit -m "Initial commit."
git config git-ftp.user FTPUSER git config git-ftp.password FTPPASSWORD git config git-ftp.url ftp.chrisswithinbank.net
This stores FTP credentials in
.git/config. Obviously don’t push these
First push to server
This pushes the entire repository, and sets the reference SHA-1 checksum on the server.
If the server already contains an SHA-1 checksum, this will fail. Run
git-ftp push, and when asked if you want to re-upload everything, type
Deploying site changes
git add -A git commit -m "DESCRIPTION OF CHANGES." git-ftp push
This checks the server’s SHA-1 checksum and pushes all local files that have changed since that commit.