Git
-
Github Pages for your Website
Introduction
We go over GitHub Pages and set up a simple website to get familiar with the GitHub interface and learn how to use Git via command line to sync up your local repository of any existing page to your GitHub page.
A bit of background on the topic before we get started.
When creating your website, blog or a simple portfolio page you’ll eventually come to the point where you need to find a service to host it. Generally you have to choose between a paid service or try one of the free options that are often not reliable, slow or include ads.
There another option which is free as well, reliable and even has some features that traditional website services don’t include, GitHub Pages. You might have heard of Git and GitHub or even used it as version control system. Many companies use it in technical departments, wherever code is involved.
It also works great to host any type of static websites (More about static websites). My entire website is hosted on GitHub: cinereal.github.io
GitHub pages have the added benefit of enforced SSL encryption (HTTPS) and of course free version control.
So what’s the catch? It only works for static websites. Meaning if you are using a CMS or any script that dynamically generates pages or requires execution on a server it will not work. Anything PHP won’t work. What will work are script that are run on the client machine such as JavaScript.
Nowadays Static Site Generators are great alternatives to CMSs. You can create an entire website without a line of code if you don’t want to dive too deep into web development.
There’s projects that go even a step further, they provide a CMS to edit content, generate static site and sync your git repositories. The most popular one is netlifycms.org.