Hi guys,
I have a terrible issue that probably some expert here just laughs about:
I want have built this website with the Hugo academic template (almost in standard configuration): www.fabianfalck.com
If you click on the “website” icon under “accepted papers”, I get redirected to “http://fabianfalck.com/http:/www.politicalcompass.de”. This path should obviously be without the prefix of my website (since it points to another website). However, this does not happen e.g. for the soundcloud link icon in the top left of the page.
I think this problem is related to the relativeURLs parameter in the config.toml file which I set to true. If I don’t do that, the documents in the /static/ folder would not work. The weird thing is everything works properly in both cases when I use “hugo server”, but not when I put it on my website.
Can someone tell me how to properly configure this?
It is set to a couple of combinations: "http://fabianfalck.com/", "./" and various other suspects. The problem is I think related to that, but it wasn’t the obvious suspects.
ok. I now have baseurl set as you said and relativeURLs=true .
Everything works except that the links to external sites are still incorrect having the prefix of my website that they should not have. Anyone knowing what to do?
It’s difficult to troubleshoot further without seeing your code. Is your site in a git repo? If so, post a link to it here. If you can’t do that for some reason, at least show us your full config.toml file.
That’s correct. Basically I push the website via FTP to my website. I don’t use gitlab.io or anything similar.
That’s the weird thing that it works with hugo server, but I think people reported that before and had similar issues, but the google hits did not solve my problem (I searched quite extensively)…
It’d be worth checking that the HTML created by Hugo is the same as what is being served out onto the web.
My guess is that since you’re not using a subdirectory for your site, you shouldn’t need to have relativeURLs set true, and then you’ve got to work out why images/css isn’t being loaded correctly. It could be to do with making sure you start references to files (css/images) with / in the appropriate places (and not, when you shouldn’t!).
If you were able to put your whole site on github it would be a big help as we could clone your site and have a full look.