Skip to main content

Fixing the pipeline, again

All good with my pipeline until I updated Hugo, and woke up a theme bug. I was not really looking forward to updating Hugo, but I run brew upgrade and everything was dutifully updated. Isn’t software marvelous? Well, there was a lurking bug in the Congo theme. Really, and the theme has not been fixed yet.

At the end I removed the theme, which was as a git submodule (that’s a whole I hate git subplot), cleaned the repository to remove all vestiges of the submodule, downloaded the latest version of the not-yet-released version of the theme, copied it under themes, deleted the 2 offending lines, git added the new version of the theme and the site works again. Finished at 12:30 am.

Symptoms: it all started when I run hugo serve and got “ERROR error building site: render: [en v1.0.0 guest] failed to render pages” as an answer in Terminal. Tried a few times and the first fail was always different, but always pointed to .../themes/congo/layouts/_partials/functions/warnings.html:10:6. This led me to the theme error.

Complications: The theme was installed as a git submodule that, first, would not update. And, even worse, even the dev release didn’t include the fix. Then the question was How to remove a submodule? According to a search, I was supposed to deinitialize the module, whatever that means, using git submodule deinit -f themename. This failed miserably, so I first deleted the theme rm -rf themes/congo and then run git submodule deinit -f themes/congo, which worked.

After that, I think I removed the submodule from git using rm -rf .git/modules/themes/congo, followed by removing the submodule from .gitmodules by using git config -f .gitmodules --remove-section submodule.themes/congo.

I added the whole shebang to git and commited the change. Later, I copied the latest version of Congo under themes (just plain copy), deleted the offending lines, git add and git commit the theme and, you know, it worked!

Thanks to this page for most of the fix.

Meccano set, from the time when it was much easier
to understand what was going on