Principal Software Engineer Works at Oath: (which acquired Millennial Media) (which acquired Nexage) Lives in Atlanta, GA
Java developer, currently into Scala, likes to tinker, tries to solve all problems in life by writing code and loves the great indoors!
[ Blog ]
After using Hexo for a while to generate static content for my blog, I discovered Jekyll, which I like a lot more than Hexo. It is much easier to use, has better documentation and it is actually the blogging platform that powers GitHub Pages. This means it should be easy to deploy your site using Github for free! (even with a custom domain!)
Here is another 10 minute installation guide to get it up and running.
The only requirements are :
(If you don’t have Homebrew on your Mac OSX, you should install it!)
The best way to install Node.js is installing with nvm.
The above script clones the nvm
repository and also adds the source line to ~/.bashrc
(or ~/.bash_profile
or ~/.profile
)
Run the following to get a list of all the Node.js versions available and choose the version to install.
Install the version you have chosen by running the following:
The best way to install Jekyll is via RubyGems. Run the following on the terminal. This will add jekyll
executable to your path.
Now you can start using Jekyll. See the documentation if you run into any issues.
Create a new blog and start your blog on your localhost
This will start your blog on localhost on port 4000
(or at the PORT
if you used the --port
flag). Browse to http://localhost:[PORT]
to see your new blog.The --watch
flag will watch for changes and generate the content automatically without having to restart jekyll.
Create a new post by creating a new file under _posts
folder. The file name should follow the following format.
Here is an example
Edit the above file and add your content using markdown syntax.
The following will generate your site into the _site
folder. Now you can FTP the contents of the _site
folder your hosting provider.
Here is the best feature of Jekyll.
All you have to do is create a repository in your GitHub account with the name [githubusername].github.io
and push the entire contents of your blog
(not just the blog/_site
folder) to the repo. Give it a few minutes and now browse to http://[githubusername].github.io
. Your blog should be hosted there for free!
Here are the detailed steps.
[githubusername].github.io
blog
folder by running:
git init
git remote add origin git@github.com:[githubusername]/[githubusername].github.io.git
git add --all &&
git commit -m"Initial commit
git push -u origin master