I’m not sure what the answer is, but here’s a few things to try which may point you in the right direction.
The Story theme uses .URL to build the Menu. This is deprecated in the latest versions of Hugo. You might like to raise an issue on the theme and ask the developer to update the theme to work with Hugo > 0.55, or fork it yourself.
Try setting relativeURLS=false in your config.toml file, and then define urls like /blog/about/ for your menu??
I’ve seen some threads here where setting baseURL = "/" and having relativeURLS=false (I think) seems to work where a site is hosted in a subdirectory.
I solved it using my custom subdomain blog.rootkea.me for baseurl. Oh and yes, I originally forgot to state that I have relativeURLs = true and I don’t want to change it.
Alright, so I finally fixed it using relative path for the image and now I can browse website at both the urls without any issue.
But now, I’m wondering what changes/precautions one needs to take to make hugo website available at https://foo.bar.com and https://foo.gitlab.io/bar/ without losing relativeURLs = true.
Closing this issue and filling a new one for the same.