Hello World! (Want your own GitHub blog?)
jekyll
]
Want to host your blog on GitHub? I got up and running by following this how-to guide from SmashingMagazine.
The Quick One-Two (3, 4, 5, 6, 7)
- Fork https://github.com/barryclark/jekyll-now, which is a GitHub blog starter kit.
- Change the starter kit’s repository name to yourUserName.github.io, which lets GitHub know this is the repository you want to host your site in.
- Get a local copy of your site: git clone https://github.com/yourUserName/yourUserName.github.io
- Edit the _config.yaml (e.g., change website name, bio pic, etc)
- Stage (git add *), commit (git commit *), and push (git push)
- Make first blog entry by editing the provided MarkDown file in _posts/, and referencing this MarkDown cheatsheet, if your eyes start crossing funny.
- Learn more about customizing the YAML options for your blog entries (e.g., how to use tags, categories, and more): http://jekyllrb.com/docs/frontmatter/
Finishing Moves
Do yourself a favor and install Jekyll. Otherwise, there’s going to be a lot of stage-commit-push for minor edits that crop up. Get jekyll immediately! As the page notes, I found that the native copy of ruby on OS X will lead you to failure here. The HomeBrew’d ruby is what you need. Might as well have the HomeBrew’d version of Git too.
- brew install git
- brew install ruby
- sudo gem install github-pages
- sudo gem install jekyll
- cd path/to/local/copy/of/yourUserName.github.io
- jekyll serve # used to be jekyll watch --server
- open http://0.0.0.0:4000/
Want comments? Set up a Disqus account. When logged in to your Disqus account, click on Settings > Add disqus to site. The site will help you figure it all out. Update your _config.yml file with your Disqus short-name. (Follow the Disqus directions and you will know what that means.)
More Info
The SmashingMagazine article is much more detailed, including info on how to use your own domain name, how to import blog posts from WordPress, how to change your blog’s template/theme, and more. So check it out!