Blogging with GitHub and Jekyll
I decided to start a blog. Like Andrej Karpathy’s blog, this one is built using Jekyll and hosted by GitHub.
This first post just describes how to set up Jekyll and GitHub for
a personal page / blog combo.
My github username is goodfeli
.
I wanted a setup where I have a personal site at https://goodfeli.github.io
and a blog at https://goodfeli.github.io/blog. Because it wasn’t immediately
obvious how to do this, I thought I should document the process.
- Register a GitHub account if you do not already have one.
- Make a repository called
<username>.github.io
, in my casegoodfeli.github.io
. Make another repository calledblog
. - (Optional) I recommend setting both repositories to be private. Otherwise anyone can file a GitHub issue on the repository and it will be publicly visible.
- In your
<username.github.io>
directory, make a branch calledmaster
. Make anindex.html
file for your personal page. Pushing this to GitHub will result in it being published to the web at https://goodfeli.github.io. Note that we will not be making ablog
subdirectory within this repository; instead the separateblog
repository will serve that content. - Install Jekyll following the instructions for your platform.
- Run
jekyll new blog
and use the contents of the resulting directory to initialize thegh-pages
branch of yourblog
repository. Yes, the<username>.github.io
repository will serve themaster
branch and theblog
repository will serve thegh-pages
branch. Your blog with the default Jekyll files is now available, in my case, at https://goodfeli.github.io/blog.