Jekyll on GitHub
Table of contents
Gemfile for GitHub Pages
For more details on How to publish Jekyll site to GitHub Pages
- Open
Gemfile
- Comment out
# gem "jekyll", "~> 4.2.1"
- Then add
gem "github-pages", group: :jekyll_plugins
, save - Done
Difference between jekyll serve
jekyll serve
bundler exec jekyll serve
When Gemfile
contains gem "jekyll", "~> 4.2.1"
, you can run command jekyll serve
.
When it’s using the Gemfile
is ready for Github Pages, run command bundler exec jekyll serve
for local development.
Build the production
bundle exec jekyll build
This will generate _site
in the project directory, so you can upload everything under this _site
folder to serve static HTML files generated by jekyll.