I’m trying to publish my hugo site but non of the images show when I check the static file from public folder. I traced the sources in the index.html and I notice that hugo adds ’ / ’ before the source URL which is a wrong path.
For example:
The following code should start without slash as “images/logo.png”. But hugo made it like this:
Where is the “backslash” you mention in the title? Also, you’re more likely to receive speedy and accurate help if you show your code, e.g. by posting a link to your repository.
By default, Hugo generates files that must be served by a web server. Opening a published file directly from the file system doesn’t do what you think it does.
If you want to preview your site, run hugo server.