Open Valhrafnaz opened 4 months ago
Have you looked at the hugo -s
CLI argument?
-s, --source string filesystem path to read files relative from
I think you need to run hugo -s blog/
See:
hugo -h
Sadly that does not seem to fix the issue whatsoever. Using -s ~/blog/ (the directory which contains the site files) produces the exact same error, which is expected, since that is the directory from which the command is run. The only way avoid this issue seems to be to change the baseURL to an incorrect value as mentioned in the issue. Renaming the build folder to something else (jic there is some weird interaction if the subdir and build folder are named the same) also does not help.
I think I have found the fix. Using hugo -v reveals that the resources.postCSS call in layouts/partial/head/stylesheets.html is deprecated. Cloning the repo, replacing said call with the recommended css.postCSS has fixed the issue for me. I don't really have capacity to test this, but on my end this does not seem to produce any other negative side effects.
I have this same issue. I am guessing it has to do with one of the newer versions of hugo. It works find on my linux machine runninghugo v0.92.2+extended linux/amd64 BuildDate=2023-01-31T11:11:57Z
On my mac running v0.132.1+extended darwin/arm64
I get the error.
I ran a nix flake with v0.132.1+extended
on my linux machine and encountered the same issue.
I'll keep digging when I have time, but hopefully that helps someone smarter than me to narrow down what the problem could be.
Cloning the repo, replacing said call with the recommended css.postCSS has fixed the issue for me.
Thanks for investigating. I bumped the minimum Hugo version to 0.128.0. That's the version where resources.PostCSS
was deprecated in favor of css.PostCSS
. I changed the code accordingly as per your suggestion.
Maybe you could give it another try since I can't reproduce the issue.
I host my blog at a sub-directory of my overall site, but sadly the theme seems to have misconfigured paths, as adding a subfolder to my baseURL causes the build process to fail thusly:
I assume this is caused by using the absolute path rather than the relative path to load the plugins. Removing the /blog from my baseURL causes the build to go without a hitch, but this of course breaks all links since they now missing the sub-directory.