Github Pages shows 404, but site is fine on local server

Hello, I am trying to setup a new website using a HUGO theme.

I have followed the steps in the documentation to locally build and view the website. I am now trying to deploy it using Github Pages but for some reason after the actions get completed, I get a 404 on visiting my website. I don’t understand what the issue is.
Here is a link to my repository: GitHub - rdlynx19/rdlynx19.github.io: Portfolio website built using Hugo
Here is the URL I am trying to host it on: https://rdlynx19.github.io/

Under Settings > Pages I would expect to see something like this:

Until recently you were trying to build your Hugo site as if it were a Jekyll site, which ain’t gonna work.

thank you, I believe I was directly deploying from the branch, without actually using the workflow. It seems to work now

Also, your public directory should not be under source control. Add this to your .gitignore file:

.hugo_build.lock
node_modules/
public/
resources/

Then:

git rm -rf public
add -A
git commit -m "Remove public directory from source control"
git push

And the delete the deploy branch both locally and on GitHub.

1 Like

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