For the past few years I've maintained a friend's portfolio website which was built with Wordpress in 2012. She was paying around $40 a month for a Linode VPS (including database backups) containing this Wordpress site. Periodically the site would accumulate spam injected into the content, causing Google to flag the site as malware. This kept happening because I wasn't constantly monitoring the site and keeping the Wordpress and plugin code up to date. As a temporary safeguard I did minor Wordpress upgrades, but doing a major version upgrade from Wordpress 3 to 4 seemed counter-productive on the crumbling infrastructure - I would just return to where I started in a few years with the same problems.
I knew we had to do something at some point, so I was thinking about what I would use to rebuild the site in a more secure and sustainable way. This site is basically "brochure-ware". Because it's for a video marketing agency, we need some way to show off some videos, and that's the most involved thing going on in the site. I figured this was a perfect use case for a static site setup. We could get rid of the creeping threat of spam that confused search engines, and hosting costs would go away as well. I considered migrating to a site hosted on Amazon S3, but to create the least amount of work for myself, I decided on just using GitHub Pages with its built-in Jekyll. The site would be in git anyways, so now there's one less thing to think about.
The new Jekyll site is at farmandcellar.com. The old Wordpress site isn't around anymore. The source is here. Right now there's some design quirks on the site that I plan to iron out. I need to fix the video slideshow on the front page or make my own. But that's not the focus of this post. Here's some things I learned about hosting a site on GitHub Pages:
- When using the default github domain (like farmandcellar.github.io), the site can be served over HTTPS. But when using a custom domain like farmandcellar.com, it doesn't seem possible at this point. So the site is using HTTP for now.
- GitHub recommends that you use a www subdomain as the canonical location instead of the apex domain (www.farmandcellar.com instead of farmandcellar.com) for a few reasons including benefitting from GitHub's CDN.
Jekyll, like Hugo, reads
content as Markdown, but you're free to use HTML in the
.mdfiles as well. I appreciate this flexibility: All the pages in this site required me to insert HTML in the content files.