Closed moomop closed 3 years ago
What do you think to do the same fix for css file?
I think the css looks ok:
<link rel="stylesheet" href="{{ "css/style-h6ccsoet3mzkbb0wngshlfbaweimexgqcxj0h5hu4h82olsdzz6wmqdkajm.min.css" | absURL }}" />
(in layouts/partials/head.html).
I wouldn't have run into any issue there though as I'm using a hugo pipeline to generate the css from the scss
You're correct. I checked too quickly haha
The URL generated for the javascript file is broken in the case that the baseURL has a path (e.g. https://www.example.com/my_blog)
The discussion at https://discourse.gohugo.io/t/absurl-function-strips-path-when-using-baseurl-flag/5925 suggests that when there is a '/' at the start of the input to absURL, the URL generated will be relative to the server/host (which I believe isn't what we want here).
This change works for me for URLs both with and without paths.