Set up a blog using Jekyll and GitHub Pages

16 Dec, 2014GitHub

Github Pages provides free and unlimited static HTML website hosting, Jekyll is a Ruby-based program for generating static websites, supports Markdown writing content, and parsing Liquid templates. Github Pages officially supports Jekyll. Simply upload the source files of the Jekyll website to the corresponding branch of the code repository corresponding to Github Pages to automatically generate the website and bind your own domain name.

1. Create Github Pages source code repository

Create a new Repository on Github and name it username.github.io, where username is the account name. Put static HTML in the master branch The file can be accessed directly through the URL http://username.github.io.

2. Build a local test environment

If you don't build a local environment, change any code, add or edit articles, you can only upload to Github through commit and push to see the effect, which is very slow. So it needs to be built locally and Github Pages is the same environment for testing. Because Jekyll plug-in is not supported on Github (plug-in needs to run Ruby program, so Github Pages becomes Github Server)


Powered by Gatsby. Theme inspired by end2end.

© 2014-2021. Made withby mdluo.