A jekyll build pipe at home
So what’s down? Well. Working on a jekyll publication pipeline, we had a bit of hindsight-stupid puzzling-fun with the
jekyll build -b switch. That thing changes the site.baseurl, not the site.url! Which took some thinking/experimenting to find out from the fact that this switch caused the site to not find the
main.css stylesheet any longer… oh well.
Anyhow, something learned, something gained, as in this case we’re looking at the coming-together of our first online diary.
The primary takeaway on our jekyll experience is:
- find a decent jekyll theme - not at all easy!
- I found monochrome. Very nice, but needs some fixing esp for keeping the footer at the bottom of the page.
The code for this is up on github.
We need to find the best way to automate our build and hosting pipeline for the diary. Currently, there’s a build script that uses dockerized jekyll for site build, and then packages all of it up into an docker image. Have a look at the docker build files, as well as the shell script used to perform build&push to our local container registry. To complement this on the hosting side, I’ve created a little ansible setup to remote-control docker-compose on the home-central Raspi. It is an automation for stopping, then pulling and recreating our jekyll container according to this docker-compose definition we have created for our web-based diary:
version: "3" services: jekyll: image: homecentral:5000/messages-env container_name: jekyll ports: - 8000:80 restart: unless-stopped healthcheck: test: wget -q --spider http://192.168.0.10:8000 || exit 1 interval: 1m43s timeout: 10s retries: 3
Note that homecentral:5000 is our private docker registry, set up for this purpose. Not entirely sure whether we’ll stick with this setup for long, but consider it a stepping stone on the path…
Wrapping up this leg, one question remains
How do I actually operate this? The first naive idea is to use a git commit hook to initiate our build and hosting pipeline. This would work fine, except for when I’m going to shut down my notebook right after committing my last diary update… As long as I’m hosting all of this on my own infrastructure, the only real alternative will be running build etc on my Raspi - initiated by the commit command maybe, but otherwise headless. Or go straight for a jenkins setup. But don’t feel like going there just yet…
Maybe it will be more expedient to just make all of this public via github pages?
- Stupid f*ing css and footers - hiding the bottom of the content pages. Who designs this stuff? (DONE, see commit eb6f3757bd213300f2e2602b2b30c49f5ac9dd6b)
- css wants some changes to make hyperlinks more visible (DONE, see commit a52040ddbf554a5429601717671daa6db91b68bb)
- Fix jekyll navigation links for our purposes. Hm, what to put here…?
- See above - build and update on Raspi?