Did you know that you can host websites for free on Github? It’s as easy as creating and pushing your code to the gh-pages branch! The catch however is that these pages can only be static. That means no “backend code” which would leave out PHP! But I’m not to sadden by this since I still had an opportunity to explore and play around with this because I wanted to be more familiar with Jekyll. Luckly for me, Jekyll works automatically with Github. All I have to do is push my code to the gh-pages branch and viola, I have a Jekyll “driven” site. Check it out!
I basically forked a theme from https://github.com/WebConfs/confs-theme, made some minor changes and pushed to the gh-pages branch. To learn more about the process, you can visit my repo’s read me page.
What I learned. Forgive for sounding like a total newb, but I thought Jekyll was some sort of advance post-processor that would somehow take your backend code and spits it out as static HTML. That doesn’t appear to be the case at all. It uses markdown, HTML, and CSS in which case it would then “compile” and create the HTML pages under _site which you would deploy to production. The solution to use Jekyll would apply only to the most simplistic websites and blogs. Basically if you were going to have Jekyll replace a WordPress blog, you would trade off the ability for a site owner or blogger from being able to go into the dashboard and create their own content for speed and security. This is because Jekyll doesn’t use a database. It’s all static files. And unless you know how to code in markup, HTML, and CSS, choosing Jekyll for a solution may not make sense depending on the end-user and how often they need content updated.
For more resources, I recommend:
- Jekyll’s main site – https://jekyllrb.com/
- Using Github Pages to Host Your Website – http://blog.teamtreehouse.com/using-github-pages-to-host-your-website
- Create a Jeckyll Site On Gihub (membership requred) – https://teamtreehouse.com/library/create-a-jekyll-site-on-github