Last active
October 22, 2016 05:44
-
-
Save mdrmike/aade0e0e5cf651a89c395463bee2915a to your computer and use it in GitHub Desktop.
Setup Bootstrap on Jekyll 3.x || Run: wget -O - 'https://gist.github.com/mdrmike/aade0e0e5cf651a89c395463bee2915a/raw/6426e51c1f4f5f8bad59facd32ea3d9b930c2944/Install-bootstrap-on-Jekyll--3-2-x.sh' | bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
bootstrap_folder="_bootstrap-install" | |
backup_folder="$bootstrap_folder/backup" | |
# Check for existing folders and create backupfolder | |
( [[ -d css ]] || [[ -d fonts ]] || [[ -d images ]] || [[ -d js ]] ) && ( [[ ! -d "$backup_folder" ]] && mkdir -p "$backup_folder" ) | |
# Backup existing folders | |
[[ -d css ]] && mv css "$backup_folder/" | |
[[ -d fonts ]] && mv fonts "$backup_folder/" | |
[[ -d images ]] && mv images "$backup_folder/" | |
[[ -d js ]] && mv js "$backup_folder/" | |
[[ -d _layouts ]] && mv _layouts "$backup_folder/" | |
# download and prep bootstrap | |
wget "https://github.com/henrythemes/jekyll-bootstrap-theme/archive/master.zip" | |
unzip master.zip -d "$bootstrap_folder" | |
rm "$bootstrap_folder/jekyll-bootstrap-theme-master/.gitignore" | |
rm "$bootstrap_folder/jekyll-bootstrap-theme-master/_config.yml" | |
rm "$bootstrap_folder/jekyll-bootstrap-theme-master/index.html" | |
rm "$bootstrap_folder/jekyll-bootstrap-theme-master/README.md" | |
# Configure | |
mv "$bootstrap_folder"/jekyll-bootstrap-theme-master/* . | |
cat >> _config.yml <<EOF | |
sass: | |
sass_dir: css | |
style: expanded | |
EOF | |
# Cleanup | |
rm master.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment