Happy to move in!
Lucky for me, I found Github Pages. It’s just like what I dreamed of! I used to host my page on AWS. It was bulky and tough. I had been reinventing different kind of wheels and I’m done with that… Until I found Github Pages then Jekyll!
How about getting started?
The most intriguing features of Github Pages with Jekyll are:
- Auto-build & hot-update locally by Jekyll.
- Built as pushed instead of manually.
- Great version control.
- Easy to setup with customized domain name.
- And it’s co cool to keep both codes and personal pages on Github.
It’s also well documented on Github about how to setup Github Pages here. It’s quite easy.
After finishing the guide above, the page is ready to use.
Embed Jekyll into Page
About how to get started with Jekyll, refer to Quick-start guide. It’s installed based on RubyGems.
I am using a Mac. When I wanted to execute
gem install jekyll bundler
I got an error
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
The reason is Mac has its built-in RubyGem but it’s reserved for system use.
To get over it, you can either use
sudo gem install jekyll bundler or
gem install jekyll bundler --user-install. The
bundler will be ready after a few seconds.
Now, you have jekyll locally. Next step is to run
jekyll new myblog cd myblog bundle exec jekyll serve
to create a static file server. Type
http://localhost:4000/ to access.
Push to Github
On local server, Jekyll is hot-built automatically. When it goes to Github, the best thing is Github builds it for you as well. All you need to do is
git commit your changes and
git push it. Wait for a while and go for your address.
Here you go!