CSS issue when baseURL set to /

Hi all,
Need some help if you don’t mind/

I want to change in config.toml a baseURL from
baseURL = "https://dariusz.wieckiewicz.org/"
to just
baseURL = "/"

However when done that and deploy to Netlify my CSS is not loaded.
There is a CloudFlare middleman in between netlify and my site.

CSS is loaded using
{{ $style := resources.Get "css/style.css" | minify | fingerprint }}

and is style.css is located in themes\my-theme\assets\css\

When using full URL in baceURL working well I notice in thumbnail of my website on Netlify showing incorrectly, this is why I want to fo into just / in baseURL to fix that, but then on the main website is not loaded.

I am fine to stay with the full URL in baseURL, but prefer to just use /.

The difference between / in baseURL and the full address is when building site on Netlify.

Thumbnails not loading, when clicking preview ( in … netlify.app domain) CSS not loading

and during the build, there is no CSS / JS minification available after the page is processed.

9:26:21 AM: Post processing - HTML 9:26:21 AM: Minifying js bundle 9:26:22 AM: Minifying js bundle 9:26:22 AM: Minifying js bundle 9:26:23 AM: Minifying css bundle 9:26:23 AM: Minifying css bundle

Not a big issue, but still want to solve it.

Any help?

That is not a valid baseURL value.

How are you calling the CSS in the templates?

Calling as above
{{ $style := resources.Get "css/style.css" | minify | fingerprint }}

Thought baseURL = "/" was recommended but may be wrong, hence my main setting is correct, but wonder why in that case Netlify when generating thumbnail after build got issue displaying, see here.

Diffiucult to say without seeing the source of that page but look into the following:

  1. Inspect the source. Why is the CSS 404? Where does the source look for it?
  2. Are you deploying to a subdomain? If yes, any asset that is referenced with a forward slash / in the beginning will point to the host root and will be 404 in a subdomain setting.
  3. Avoid hardcoded URLs in templates use the absURL or relURL functions when referencing assets.

Ok, think I get that now.
So, my initial settings are fine.

When using ‘/’ are baseURL, HTML is rendered with Netlify HTML.
Will leave it like that and reach Netlify in relation to their thumbnail generation issue.