-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Broken style when deployed to sub-folder #74
Comments
I've generated the page now with the following:
And then started serving this with Python:
I can see from the server logs that the website is asking for icons at the wrong location - at the root, instead of at the baseURL.
|
I think one of the problems is here where we load svgs from the rootURL: https://github.com/onweru/compose/blob/master/assets/js/functions.js#L177
|
This seems to be the reason why search is not working either: https://github.com/onweru/compose/blob/master/assets/js/search.js#L196
https://github.com/onweru/compose/blob/master/assets/js/search.js#L112
|
And
|
I've tested an easy fix this works for me in
|
I've created a pull request with my proposal #75 |
Just wanted to add that I have a very easy workaround, I can override the PS: I am new to Hugo, just trying it the first time for documentation and needed a simple theme without dependencies that looks good, that's how I ended up using your theme. Thank you very much for creating this. |
The style is broken when the site is not deployed to the root path.
Reproducer:
After committing and starting
hugo server
everything works nicely on the code snippets page:Now try the same with a different baseURL:
And the worst is when you deploy this theme to a sub-folder in a GitLab pages project where it completely breaks the page with the syntax highlighting examples:
This happens on both Firefox and Chromium, not browser related. My OS is Linux (Fedora 34), not sure what GitLab Pages use.
Hugo version I use locally:
v0.80.0/extended
Hugo version in GitLab Pages:
hugo_extended:latest
My suspicion is that the theme has some
/
and points to an absolute path under the root for loading some assets, but haven't tracked it down yet.The text was updated successfully, but these errors were encountered: