Open cderv opened 3 years ago
Here is the diff of my changes so that it works ok https://github.com/jbub/ghostwriter/compare/master...cderv:fix-url
Thanks for this, @cderv. I had the exact same issue and pointing to your branch does fix the issue.
However, it does break the workflow for local builds. I now need to pass the base url manually:
hugo -b file:///path/to/my/hugo/project
.
hugo serve
still seems to work fine
When I deploy a branch preview on Netlify, the site using this theme does not look right because the CSS and JS resources from the theme are not found.
I believe this is because
{{.Site.BaseURL}}
is used, and it does not add missing trailing slash. I have one in mybaseURL
config but Netlify sets none when changing the base URL.https://github.com/jbub/ghostwriter/blob/2dd435c21fcdcb1af253814b1198dc075553542d/layouts/partials/header.html#L14-L15
However, it seems that loading resource this way is not advice. See https://github.com/gohugoio/hugo/issues/3262#issuecomment-290991303 where the maintainer of hugo advice the following
Using
relURL
orabsURL
would be better I believe.This fix the issue I encounter if I tweak the theme. But there are a lot of occurrences in the theme of this. I think this should be fixed as the theme level.
Does this cause any issue with anyone in the past ?