Templet works local but not in public

Hi
I´m new to Hugo - but so far I love it :slight_smile:

But I have a problem.
When I run it on my local pc it works and looks fine.

Then I use the command “hugo” to create a Public version.
The files in the Public folder is created - I have delete the folder before running the command.

But when I open the “index.html” file there is no design on the site - It look like the Theme not use.

What do I do wrong?

Best
Tue

Loading html pages directly in a browsers will only work if you have used relative URL:s throughout. Most Hugo themes/sites opt for absolute URL:s. These need a web server to work.

Hi
Thanks for your answer.
I have uploaded the public folder to my web host and it is the same problem

This is on the web server

I guess that there must be some kind of setting/path there are wrong.
But I cant find it.

Best
Tue

Dont forget to set the correct baseURL config of your site.

1 Like

Hi
Thanks for your answer.
I have my baseURL in config.toml set to:

baseURL = “https://www.officegeek.dk/

And officegeek.dk is the URL of the site.
I guess that this is ok?

https://www.officegeek.dk and https://officegeek.dk are different sites.
Since you are using the URL without www as your website, the basURL should also be set to the same

baseURL = "https://officegeek.dk"
1 Like

In your website, the link to blog posts is set to http://localhost:1313/posts/
I guess that you would like to update that as well.

Hi
Yes - Thanks that was the problem :slight_smile:

Thanks
Tue