Do you run hugo server in watch mode (aka “dev mode”)? There are some baseURL magic going on there. @spf13 knows more.
On a side note:
relativeURLs = true
canonifyURLs = true
relativeURLs = true will override whatever is in canonifyURLs. relativeURLs is a special little setting, mainly to support having Hugo sites just sitting there on the file system with no web server.
Yes, I do use -w mode, I also restarted it. I removed canonifyURLs but there is no difference.
I am testing the page on my local machine, and then Rsyncing it to the webserver, but as you see, there are hardcoded “localhost” links in the Rsynced version, which is why I am asking the question **how to get rid of them ** thanks
I think I just read this somewhere else. It was a big revelation for me! So now I know to always run hugo without any switches as a last step just before final git add/commit/push steps.