How to create your own site
How to create your own site with GitHub Pages
This blog will show the steps of how to create your own personal site like this.
Conponets: GitHub Pages, Jekyll, Minimal Mistakes
1. GitHub Pages
Set up your GitHub Pages: the official guide cannot be more pellucid.
2. Jekyll
Set up Jekyll: you can go to Jekyll documents at the button of GitHub Pages website or here.
- Follow the steps in Prerequisites and run
gem install jekyll bundler
- Make sure you are in your local project folder (where you just cloned your GitHub repository), if not, run
cd your_repository_location
. - Run
jekyll new --skip-bundle
- Open the Gemfile that Jekyll created
- Add “#” to the beginning of the line that starts with
gem "jekyll"
to comment out this line. - Add the
github-pages
gem by editing the line starting with# gem "github-pages"
. Change this line to:gem "github-pages", "~> GITHUB-PAGES-VERSION", group: :jekyll_plugins
- Replace
GITHUB-PAGES-VERSION
with the latest supported version of thegithub-pages
gem. You can find this version here.
- Add “#” to the beginning of the line that starts with
- Run
bundle install
Troubleshooting
- If there is error about “wdm”, try comment this line in Gemfile:
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
- Remember to run
bundle install
andbundle update
everytime after you modify the Gemfile.
- If there is error about “wdm”, try comment this line in Gemfile:
- Build the site and see it on your local server
bundle exec jekyll serve
So far Jekyll should be set up, you can custom it in _config.yml
. More see the official guide.
3. Minimal Mistakes
Set up Minimal Mistakes (a Jekyll theme)
- Go to Minimal Mistakes document and install via Remote theme method.
- So far Minimal Mistakes should be set up, you can custom according to the official configuration.
- You can also have a look at Minimal Mistakes Github repository. There are samples pages for reference.
Note: everything in _site/ will be rebuilt after you run
bundle exec jekyll serve
. So remember to store your files outside.
Now it is done!