Last active
October 24, 2016 20:04
-
-
Save mdrmike/78e1bd801ba8120f3dca8aee5a50d4f3 to your computer and use it in GitHub Desktop.
Install Jekyll 3.x on c9.io || run: wget -O - 'https://gist.github.com/mdrmike/78e1bd801ba8120f3dca8aee5a50d4f3/raw/1f6ee312914cbf5bb8ff106960d83317f881d2b6/setup-jekyll.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 | |
gem install jekyll bundler && echo ">>> Installed Jekyll and Bundler" | |
echo -e "source 'https://rubygems.org'\n\ngem 'github-pages', group: :jekyll_plugins" > Gemfile | |
bundle install && echo ">>> Installed Github pages dependencies" | |
bundle exec jekyll new . --force && echo ">>> Installed Jekyll" | |
sed -i 's|gem "jekyll"|# gem "jekyll"|g' Gemfile && echo ">>> Configured Gemfile: remove jekyll version lock" | |
sed -i 's|# gem "github-pages"|gem "github-pages"|g' Gemfile && echo ">>> Configured Gemfile: require github-pages gem" | |
sed -i 's|^ gem "jekyll-feed|# gem "jekyll-feed|g' Gemfile && echo ">>> Configured Gemfile: remove jekyll-feed gem" | |
echo -e "Gemfile.lock\n.c9\n_config_dev.yml\n" >> .gitignore | |
cat >> _config_dev.yml << EOF | |
host: "$IP" | |
port: "$PORT" | |
baseurl: "" | |
url: "https://$C9_HOSTNAME" | |
EOF | |
bundle install && echo ">>> Done." | |
echo -e "\nRun Jekyll: \n | |
bundle exec jekyll serve --config _config.yml,_config_dev.yml \n\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment