-
Notifications
You must be signed in to change notification settings - Fork 58
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
Banner background-image URLs are set to localhost:1313 rather than baseURL #28
Comments
Thanks @gordonthegopher. I can see where the problem comes from alpha-church/assets/scss/main.scss Line 1377 in 9a7ba29
Since it uses Part of the problem is this theme ships with a version of the resources folder generated by running However, I would have expected when you run Can you run |
I've just realised there is another problem for users who don't generate their own assets through the extended version of hugo - the css won't load banner image specified in Maybe we should revert back to loading the background image through an inline style - I'll have to look into why that was changed. |
Thanks for getting back to me!
Hugo Static Site Generator v0.63.2-934EE21F linux/amd64 BuildDate: 2020-01-27T12:13:19Z I installed this manually from the .deb on Ubuntu 18.04 (the version from the repos is really old - 0.40.1 and the Snap package doesn't play nicely with here I keep my files as it's outside /home)
Yup, I noticed this also, whatever I changed it to, it would still always reference "/img/banner.jpg"
I just issued "git submodule update --rebase --remote" in the root of my site folder, but the site generated still has the same issue. So, I installed the Extended version of 0.63.2 from the .deb manually and the banner now loads as expected. Should this be marked as closed now? It seems like my issue is related to not using the Extended version of Hugo specifically, right? |
Thanks @gordonthegopher. The issue is a mixture of (1) using I've just now pushed a commit - so if you rebase the theme now, you should get a version that you can make to work. And yes, you'll have to put your banner image at As you can see just above your latest post, I've asked a question for the person who contributed the PR with the code which caused you problems. I might get an idea of a better fix from there. |
came here from #15 Last time I touched a project based on your theme, was nearly a year ago... The main point of #15 was, that the inline-CSS attribute Also there was no option to include additional google-fonts and users were basically limited to Source Sans Pro (I think). I wanted Playfair Display and Roboto, so I thought, it would make sense giving the options in the config. The problem that I see, is, that either you completely avoid inline-styles in HTML and therefore allow overloading via custom CSS or you use inline-styles in HTML but in that case you need to add all possible variations on these inline-styles in form of options in the toml-File, to allow users to change them. I'm not really fluent in the Hugo-syntax anymore and I'm not sure what you mean by "extended version". I'll look into it later again. I'm personally not using the controversial changes from #15 anymore, except the Font-Import. As long as there is an option to import fonts, I wouldn't mind reverting it. Edit: I just saw, that this is slightly related to #16, the other issue we discussed last year. Or am I missing something here? |
Thanks @Anaeijon, that's a very thoughtful response. To answer the simplest question: the Hugo binary is released in two versions, an extended and a non-extended version. I'm not sure why. But because of this, the Hugo themes team requires the I'm thinking that even though the current solution (somewhat) locks users of the non-extended version of Hugo to a particular filename for the banner, it's a sensible default. And even users of the non-extended version can work around this by including some customised CSS. The change to Finally, even if we were to change how the background image is loaded, there's no need to remove the method of customising fonts. |
When I test my site with "hugo server", the banner image comes up fine, but once I actually generate the site and upload the "public" folder, the banner doesn't work.
Looking at the Chrome console, it looks like for some reason the #banner CSS property is set to "url(http://localhost:1313/img/overlay.png),url(http://localhost:1313/img/banner.jpg)".
You can see this is the case by looking at the example site:
https://themes.gohugo.io/theme/alpha-church/
If you have a local Hugo server running, whatever you have as overlay.png and banner.jpg in your local public folder will show up on the example site! (as the images are being served from localhost:1313). As soon as you kill your local Hugo server, they go missing again.
It seems like, for some reason, the baseURL isn't being honoured when the site is generated, and the URL is somehow hard coded to http://localhost:1313 instead?
The text was updated successfully, but these errors were encountered: