Bits / 2019 / Upgrade philnewton.net

 14%

This is another one of those things I’ve been meaning to do for years but haven’t got around to. Writing and publishing a new post currently looks looks like this:

  1. Run a test server locally to preview posts.
  2. Write the post in org-mode.
  3. Run a build script to convert posts from org-mode to html.
  4. If everything looks good, run another script to rebuild the site and upload it to the server.

If I have to update anything from bits, I need to run another script. Rebuilding the blog list also involves calling a script to fetch the data and rebuild the page. I also have to manually renew the SSL certificates on the site.

It’s not the most complicated setup, but it just feels cumbersome compared to how something like GitHub pages works. It also means I can’t schedule posts to publish in the future.

Ideally I’d like the process to go something like this:

  1. Run the test server for previewing.
  2. Write the post in org-mode. Have it automatically show up when saved without having to manually convert it.
  3. If everything looks good, commit the post to git and push it. Server updates the site automatically.

I’d also like the server to regularly rebuild the site so that I can schedule posts in the future.

Goal steps

Upgrade the site to Jekyll 3.8.5

Setup a system to automatically build org files when they are saved

Create git hook to rebuild site when files are committed

Setup a cron job to rebuild site regularly

Setup a cron job to rebuild data sources (blog list, bits etc)

Update server to automatically renew SSL certificates

Create a script to setup a server with all of the above features

Targets

Bronze Medal 33% of goal steps complete.
Silver Medal 66% of goal steps complete.
Gold Medal All goal steps complete.