URL keeps stacking on top of itself when navigating around Hugo/Github Pages website

I used the Hugo instructions for a user page here to build and deploy the Hugo website I had locally.

The website exists at a url that looks like When I navigate to a blog post, the url starts stacking on itself, ie it becomes

The main issue with this is that if I want to click the blog title link which helps me get back to the homepage, I get a 404 error because the url ends up being Not only is it long and clunky, but it should be which is the homepage url and is the given <a href> url in the code.

What can I change so the url doesn’t stack on itself?

Can you post your repository so we can have a look into it? It’s either an issue in a template or the baseURL in your config.toml has a weird value.

1 Like

Thanks for the reply. I left my baseURL in the config.toml blank. There could be something weird going on with the template.

As for posting the repo, would it be possible to do so over dm as it needs to be private? I can’t dm anyone myself since I’m a new member, but I can reply to a dm with it.

Try to set it to

You can add @davidsneighbour to the repo (if it’s on Github, if not, ehm, don’t know). But try setting the baseURL first. Remember to add the slash at the end.

I’m sorry in the delay in replying. Thanks for the baseURL change suggestion. The baseURL in the config.toml was already set to but it needed be to set to exactly for the url to not repeat itself while navigating the website.

Thanks for your help!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.