SCSS broken after 0.123

My SCSS worked in 0.122 (since at least 0.110) but is not working in 0.123 or 0.124

I’m using code almost verbatim from: Hugo Pipes | Hugo

{{ $style := resources.Get "scss/lol.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />

My code for comparison: utilitarianism.net/layouts/partials/head-extra.html at main · whyboris/utilitarianism.net · GitHub

In version 0.123 or 0.124 when I boot up the website the styles work, until I change anything (e.g. 10px → 20px) and then I get (Chrome Dev Tools Network tab):

404 Not Found for resource:

http://localhost:1313/scss/lol.min.b2c5938cd31cba6853a8f544e7d3f58e8dcc3d18e1a1f99a69ce61df9774ca72.css

I tried removing Fingerprint, Minify, and I still get 404 It’s really mind-blowing :exploding_head:

Public website built with 0.122: https://www.utilitarianism.net/
Public repository: GitHub - whyboris/utilitarianism.net: Official repository for utilitarianism.net

I would really appreciate if anyone can figure out what is going wrong :man_bowing:

This is happening because Hugo v0.123.0+ is confused. It thinks your site is both monolingual and multihost… which is obviously impossible.

The problem goes away if you either:

  1. Enable all languages
  2. Comment out the baseURL setting under each language table, and set one in the root table.

See https://github.com/gohugoio/hugo/issues/12288.

2 Likes
1 Like

:bowing_man: thank you @jmooring :man_bowing: - I enabled all languages and everything seems to work great.

I now see that I can build all websites and simply go to public/en for English (full working website) and public/de for German - and everything seems to work :partying_face:

I’ll adjust my build script to handle the multiple folders :ok_hand:

:man_bowing: thank you @bep :man_bowing: for creating the (bug report) issue on GitHub

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.