v3.chrisswithinbank.net

Created: 2015-02-13 04:32
Updated: 2019-02-20 01:06

README.md

Build Status

Installation

The following steps are for OS X. Skip steps if something is already installed, though updating/checking versions is probably advisable.

Environment Set-Up

Make sure you have a user version of Ruby installed

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.

Install ImageMagick

brew install ImageMagick

Used for jekyll-picture-tag image processing.

Install Bundler

gem install bundler

Bundler will handle dependencies for the repository.

Repository Set-Up

Download repo

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

Install dependencies

bundle install

Bundler will read the repository’s Gemfile and install listed dependencies.

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 _site/.

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 localhost:4000/):

JEKYLL_ENV=production bundle exec jekyll build

Deployment

Set-Up

Install git-ftp

brew install git-ftp

git-ftp allows you to maintain a SHA-1 reference on the server and push changes over FTP.

Make _site/ a repo

cd _site
git init

Stage everything in the build folder for committing:

git add -A

Double check that really was everything:

git status

Make your first commit:

git commit -m "Initial commit."

Set up git-ftp defaults

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 anywhere public.

First push to server

git-ftp init

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 y.

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.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more