Localhost & github pages mismatch

The hugo page in this repository looks just fine on localhost: GitHub - pa20bm/HugoSite

(It’s using the Eureka theme).

Something is going wrong when the hugo command produces the site for github pages, however. The baseURL and title in the config file do not appear as they do on localhost.

I’ve tried deleting the /docs folder and rebuilding the site from scratch, but it doesn’t seem to solve the problem.

Any ideas?

May need to add a backslash to the base URL?


When following the ‘posts’ link in your navigation the url provided is:

Your baseURL is set to:

So perhaps setting the baseURL to this would work?
1 Like

I realised looking again at your site that main menu is working correctly and therefore your baseURL is correct.

I have come across this though, and wonder if it might offer a solution:

It suggests that following the ‘correct’ procedure when defining your menu items results in the duplication of the site folder in urls. They suggest removing the first forward slash as in the example below…

    name = "Projects"
    url = "/projects/"


    name = "Projects"
    url = "projects/"

This worked. Thanks so much Andy (and Henry).

1 Like

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