mirror of
https://github.com/Anon-Planet/thgtoa.git
synced 2025-07-11 17:09:22 -04:00

Move scripts to their own directory. Add `serve` script for serving locally (from internal build repo). Rename: - clean.sh -> script/clean - make.sh -> script/make Now you can type `make serve` to serve the guide locally. $ make <TAB> all clean guide serve Requirements are still included in the `serve` file. Signed-off-by: Sharp-tailed Grouse <sharptail@riseup.net>
37 lines
1.1 KiB
Bash
37 lines
1.1 KiB
Bash
#!/bin/bash
|
|
|
|
# Prerequisites:
|
|
# 1. git
|
|
# 2. ruby
|
|
# 3. ruby-dev
|
|
#
|
|
# Script MUST be in the root of the git clone directory of your choice.
|
|
# You MUST execute it with elevated privileges.
|
|
#
|
|
# When done you can execute these commands:
|
|
# $ bundle exec jekyll serve --livereload (will build and serve the project locally)
|
|
# $ bundle exec jekyll build (will build the site in _site folder)
|
|
|
|
gem update # Errors are safely ignored.
|
|
gem install bundler jekyll # Speaks for itself.
|
|
rm -f Gemfile* # Out with the old..
|
|
bundle init # ..and in with the new.
|
|
rm -rf ./vendor/ # In case `bundle init` above does anything weird.
|
|
|
|
# Creating the Gemfile we want
|
|
cat <<EOF >Gemfile
|
|
# frozen_string_literal: true
|
|
|
|
source "https://rubygems.org"
|
|
|
|
# gem "rails"
|
|
|
|
# gem "jekyll", "~> 4.2"
|
|
gem "github-pages", group: :jekyll_plugins
|
|
gem "jekyll-optional-front-matter", group: :jekyll_plugins
|
|
gem "webrick", "~> 1.7"
|
|
EOF
|
|
bundle install # this will install gems and create a new Gemfile.lock
|
|
|
|
echo "Now you can test locally: "
|
|
echo "$ bundle exec jekyll serve --livereload"
|