Ultimate hosting solution for static websites

How often do you create simple web pages? No PHP, or anything, just pure HTML+CSS. How ofter do you update them? Do you use version control system for this purpose just like for other dev projects? How about hosting your project directly from the source code repository? Wouldn't that be perfect?

In the previous post I described how to use lftp to effectively update website on FTP server with the trick of reverse mirror mode. But if you are using GIT for versioning your HTML (which I strongly recommend even if there are no other people working on the project), you are also quite likely using GitHub for keeping your source code. Do you know that you can host your website directly from GitHub infrastructure? For free.

Of course it is possible to use custom domain name. In order to fully utilize GitHub's global Content Delivery Network it is advised to use CNAME record with for example www subdomain prefix to canonicalize domain name. Be sure to choose domain registrar which will allow you to configure HTTP 301 redirection for the main domain.

No comments:

Post a Comment