My Serendipity blog was woefully outdated and getting it upgraded would have been a lot of work. Instead, my friends Elie and Celine convinced me to switch to a more modern system. We settled on Hugo which generates completely static web sites. The result was a fast and essentially serverless website.
The whole setup required the following steps:
- Import RSS feed and convert it to markdown
- Fork Jimmy Hugo theme stack on Github
- Commit the generated markdown and images
- Configure a Firebase static web site
- Configure Cloudflare to proxy Firebase
- Set up Github Actions to generate the page and push it on each commit
- Create a docker container with Hugo and the git repo
A simple Jupyter notebook from Elie converted the RSS feed into markdown.
Setting up directories
You may need to adjust this to your own needs but it gives you a sense of the mechanics.
Setting up the Git Repo and Actions
git to clone the Jimmy hugo theme stack starter. This also sets up a basic
Github Action for you. This action will need to changed so that instead of publishing to Github pages, it will deploy to Firebase.
For all of this to work, you need to follow the Firebase instructions on how to configure the right secrets in Github. To help with serving and staying below the Firebase quota, you can also set up Cloudflare to proxy and cache the traffic. It’s incredibly powerful.
Making the development mobile
Writing in markdown and manually inserting images into a blog post can be a little bit tedious. To make the whole setup easier and more portable, I created a
docker image with Hugo and the
git repo that contains the blog. Once the image is ready, you can carry it around with you. At the moment, I am writing this blog post on a Chromebook with
VSCode attached to the container. You can run your container with:
Afterwards, you can point your local browser to `http://127.0.0.1:1313/ and see Hugo update and reload the blog as you write it.
Publishing A New Post
This only requires writing the blog post and then commiting and pushing it to github. This all takes place just inside of
VSCode. The configured Github Action will take care of the rest.