I recently generated my website using hugo. When I preview it with the “hugo server” command at localhost:, everything works as expected. But when I upload it (after changing the baseurl), the urls for the tags stop working. I mean, I can’t access the url “https://domain.com/tags/tag”. I get a 404 error.
EDITED TO ADD: Also, I noticed that the pictures do not load when uploaded to the server, but they work when viewing localhost. I only get the alt text where the pic should be.
I’m assuming that the baseURL in the config file you linked to isn’t what you’re really using? If you don’t use the real domain (and subdirectory) then your site is unlikely to work after you upload it.
If the root of your site is a subdirectory, then you’ve got to be careful about how Hugo builds URLs in the HTML files. Have a good read of page in the docs about URL management, and search this forum for similar problems (it comes up fairly often).
Thanks for your reply, but I’m sorry, I am still confused. The baseURL in my config is correct, I just redacted it from the pastebin. And the site works except the tags and pics.
OK, now it works. For some reason, the entire /public wasn’t rsynced to the server. For example, /tags was missing. I have no ideawhy that happened, but I should have checked that in the first place.