Problem
Sometime in the last several months, my themes/CSS stopped loading when rebuilding, even for sites with no local changes. I am using the hugo-xmin theme as a module.
Deployed example
For example, this site is missing its CSS/theme. It is served from here.
Minimal example
I tried to create a site that does almost nothing but load the hugo-xmin
theme as a module. I cloned jmooring’s hugo-testing
and added the hugo-xmin
theme as a module in the config. I pushed the example to a public GitHub repo here. And it is deployed here. The theme’s CSS is not loaded.
Under-informed speculation about the problem
That I did not change anything local led me to be concerned about recent Hugo versions above 100 and about the theme itself. I may be barking up the wrong tree, but I notice that there have been changes in both Hugo and the theme that directly relate to loading CSS, in the relevant timeframe.
hugo-xmin changes
Specifically, this commit to hugo-xmin
deleted the leading /
before css
in:
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}" />
Hugo changes
In June there was also a Hugo commit that looks related to baseURL and relURL paths.
Local changes in my site due to Hugo run
The changes in my own, deployed site look like they might be happening at the same place, where
<link rel="stylesheet" href="/css/style.css" />
has been changed to
<link rel="stylesheet" href="/phi154/css/style.css" />