Please change the default baseURL
Please change this to something like https://example.org/. In the Hugo forums we get large number of new users that get in to trouble because they keep this example setting.
https://github.com/Vimux/Mainroad/blob/ed54a7cc8741349140d415943eaf1381e55507c3/exampleSite/config.toml#L1
https://github.com/Vimux/Mainroad/blob/ed54a7cc8741349140d415943eaf1381e55507c3/README.md?plain=1#L54
I don't see WHY replacing one with the other will make a difference. The end user can set this field correctly, not us. If not, side-effects occur in both cases. So I'd like arguments for the change.
Thanks for responding!
I think baseurl = "https://example.org/" makes it more obvious that you are supposed to change the value. If users still do not change the value it will also fail more obviously.
With baseurl = "/" the site will more or less work and users come to the forums frustrated why their site is misbehaving.
These are some of the problems you get with using baseurl = "/":
- The
hugo servercommand will outputWeb Server is available at //localhost:1313/ (bind address 127.0.0.1). See the schema less address for the dev server. - No full URLs can be created,
<link rel="canonical" href="/">is e.g. not correct for the front page. It should be<link rel="canonical" href="https://example.org/">. - When you deploy the site to be served in a sub dir, e.g.
https://example.org/docs/no resources, i.e. css/js/images/, will be loaded. - Things like image in the RSS feed will have incorrect URLs.
( I have posted the same issue to a number of other popular Hugo themes.)