Hi all,
Everytime I run my hugo server for development, some pages are not loaded properly, causing the CSS is not loaded (the UI become ugly).
When I debug from the browser console, it shows error like below:
GET http://localhost:1313/notes/2025/07/some-post-title-name/__h_pp_l1_144_RelPermalink__e= net::ERR_ABORTED 404 (Not Found)
When I checked the error location in the code, it’s actually related to my CSS loading syntax is not using actual name, causing the page style is becoming ugly (because the CSS is not loaded).
<link
rel="stylesheet"
href="__h_pp_l1_144_RelPermalink__e="
integrity="__h_pp_l1_144_Data.Integrity__e="
type="text/css"
/>
And below are my hugo pipeline syntax to load the CSS:
<!-- Hugo Pipes for CSS -->
{{- $css := resources.Get "css/style.css" -}}
{{- if $css -}}
{{- if hugo.IsServer -}}
{{- $css = $css | resources.ExecuteAsTemplate (printf "css/styles.dev.%v.css" now.UnixMilli) . -}}
{{- end -}}
{{- $css = $css | resources.Minify | resources.Fingerprint | resources.PostProcess -}}
<link
rel="stylesheet"
href="{{ $css.RelPermalink }}"
integrity="{{ $css.Data.Integrity }}"
type="text/css"
/>
{{- end -}}
And this is how I run my hugo dev server:
hugo server --environment=development --buildDrafts --watch --ignoreCache --noHTTPCache --navigateToChanged --poll 1s --logLevel 'debug' --port 1313 --forceSyncStatic --templateMetrics --templateMetricsHints
Does anyone had experience the same problem in the past?
I’m using Hugo version v0.148.1
please help. Thanks in advance!