[solved] Hugo theme not showing on github pages

Hi all, I’m new to Hugo and have just created some content. The webpage looks fine in http://localhost:1313/, but when I browse khaal.github.io, I only get the index file without the theme nor the menu.

After each file, I run the following command to ensure everything is pushed from the projects root directory:

hugo && git add --all && git commit -m "commit" && git push -u origin main

Repo is at:

Things I’ve done:

  • I have already checked baseurl value: baseurl=“https://khaal.github.io” (tried with and without forward slash at the end).
  • Web-broser console dosen’t show any errors (except for favicon.ico - WIP).
  • Made sure that Github actions finishes successfully.
  • I’ve tried with different themes, to no avail (themes has been added via git submodule add command to /themes/ folder)

Thank you in advance!

Edit: I assume the baseURL part is irrelevant since .github/workflows/hugo.yaml has its own configuration for it:
run: |
hugo
–gc
–minify
–baseURL “${{ steps.pages.outputs.base_url }}/”
(source: gohugo io /hosting-and-deployment/hosting-on-github/)

Start by deleting all the files you by mistake added in this commit:

The site that Hugo builds end up inside the “public” dir. You have added a bunch of HTML etc. files to the repo root that confuses GitHub Pages.

Thank you very much. Deleting the files, and doing a git pull locally to keep things synced, worked! Now my page on github is displayed correctly :smiley:

1 Like

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