Public Folder ~ Different from how site shows on server


I have an issue I have been trying to wrap my head around.
So I created a website and I want to deploy and push online but got into some issues.
Here is what I did.

My website runs perfectly on my local machine ( using hugo server -D).

  • I used hugo to create the public folder.
  • Noticed the public folder is so different. Opened the index.html in public to see how my website shows up but noticed my javascript animations don’t work on Chrome and Firefox. Only works on internet explorer.
  • The links to other pages doesn’t work.

Kindly help. .
I have draft removed from all md files but same issue.

This may be a case of hugo server vs browsing from local disk. There was a recent thread about this. See Static pages don't pick up styling

1 Like

Thank you for your reply.

I just went through the link you posted.
I tried pushing online to see if it will render properly on github or netlify. Same issue.

Thank you. I have been able to find a way around it.

Am curious. What did you do?

1 Like
  • Upgraded Hugo to the latest. I was running on 0.46.
  • Deleted the Public folder. Uploaded what I had on my local machine to github.
  • On netlify: Had build command as hugo --gc --minify
    : Publish Directory: Public
1 Like