How to reduce the length of the site stylesheet filename?

A very interesting thing that no one else seemed to catch—probably because my question wasn’t to the point (lesson learned).

Nearly every example I’ve seen uses relPermalink for the style sheet, with 1-2 exceptions. And everyone uses CanonifyURL = false (or nothing because that’s the default per Bep for a long time now).

The theme I am using has been around or a while—Casper3—and used Permalink for the style sheet and canonifyURL = true.

So, I’ve changed both and eager to see what happens.

So first you are using a security hash build from the content of your file to make a unique filename and then you are using some canonification to … ehm … whatever might happen?..

Please choose a solution so this topic closes soon.

There is still no solution because of the bug at CloudFlare Pages. I am trying to find a Hugo-based work around. There might not be one.

You’ve been very helpful. You are not obligated to follow this any further.

It turns out that canonifyURL true or false makes no difference. As Bep says… …it’s a holdover in older themes to use true and we shouldn’t.

RelPermalink with baseURL = “/” is very important. This helped move the problem forward: now the url of the stylesheet matches the URL of the dev site—without Hugo being able to know at build time what the URL will be. So, this is a step forward.

OK.

CloudFlare has officially acknowledged that changing the mime type is a bug and they are looking into it before GA (final outcome still TBD of course…).

I learned that it is better to use RelPermalink for the style sheet. And that CanonifyURL ought to be false. That makes the style sheet match the url of the dev builds with generated url strings even when the builder doesn’t use the -b option correctly (another bug…).

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