Skip to content

Instantly share code, notes, and snippets.

@riccardo1980
Created May 11, 2021 17:43
Show Gist options
  • Save riccardo1980/b96976d82b62ca0c2794cd51951e068f to your computer and use it in GitHub Desktop.
Save riccardo1980/b96976d82b62ca0c2794cd51951e068f to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
BLOGNAME=${1:-myblog}
echo "building $BLOGNAME"
mkdir $BLOGNAME
# bundle initialization and local configuration
pushd $BLOGNAME
bundle init
bundle config set --local path 'vendor/bundle'
bundle add jekyll
# jekyll template site creation
bundle exec jekyll new --force --skip-bundle .
bundle install
# site serving
bundle exec jekyll serve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment