Use Jekyll and Github Pages to build the website
In this article, you will learn how to build your own website by utilizing the Github Pages and Jekyll.
1. Preliminary
Before continuing, you should google the following concepts and have a breif understanding:
- github pages
- ruby, gem
- bundler, Gemfile
- jekyll
Then, you can locally build a static website by following the step by step tutorial in Jekyll website. The next step is reading the document of github pages. This way, you can deploy the static website on Github Pages.
2. Use Theme
You may choose one theme from the Jekyll Theme and read the document of the corresponding theme. I will take the Minimal Mistakes theme as a example.
First step:
jekyll init .
This way, you init the project by the default theme of jekyll.
Second step: Change some configures in Gemfile.
gem "github-pages", group: :jekyll_plugins
gem "minimal-mistakes-jekyll"
Third step: Revise the _config.yml. Just copy this file into _config.yml.
Fourth step: Fix some bugs.
Bundle add webrick
If you see some warnings about the Token Api, see this link.
Last step: Test the website locally.
Bundle exec Jekyll serve —livereload
Remeber to set
JEKYLL_ENV=production
to force the environment to production.