GitHub Pages
by rusty-snake
Install ruby and bundler. Fedora command:
sudo dnf install ruby ruby-devel rubygem-bundler rubygem-json rubygem-bigdecimal
mkdir my-awesome-site
cd my-awesome-site
bundle init
bundle config set --local path 'vendor/bundle'
bundle add jekyll
bundle exec jekyll new --force --skip-bundle .
# edit Gemfile
# - obligatory:
# - remove 'gem "jekyll", …'
# - uncomment 'gem "github-pages", …'
# - optional:
# - remove superfluous comments
# - remove minima
# - remove the windows stuff
bundle install
git init
cat > .gitignore <<__EOF__
# Ignore metadata generated by Jekyll
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
# Ignore folders generated by Bundler
.bundle/
vendor/
__EOF__
# edit _config.yaml
# add your pages
# preview it with: bundle exec jekyll serve
# commit it
Update 2022-06-23: You need to run bundle add webrick
if you use Ruby 3.0, see https://github.com/github/pages-gem/issues/752.
Update 2022-10-29: This trick is for “classic Pages deployment”.
tags: