Theme working on localhost, but not in GitHub pages

Hi,
I’m facing an issue with my Hugo site deployment on GitHub Pages. While the site works perfectly on localhost, the theme (hello-friend-ng) isn’t loading when deployed. I’ve noticed this issue with my Hugo site is likely due to my own misconfiguration, and while I’ve tried all solutions I could find in the forum and elsewhere online, I haven’t been able to resolve it - hence why I’m reaching out here for help.

Console shows these 404 errors:

GET https://vitor-mafra.github.io/about_me/about_me/main.min.244183cde1a38e0b08f82c11791181288f9aac1cc9618cd6f4e9e7710c5768ba.css net::ERR_ABORTED 404 (Not Found)

GET https://vitor-mafra.github.io/about_me/about_me/bundle.min.e89fda0f29b95d33f6f4224dd9e5cf69d84aff3818be2b0d73e731689cc374261b016d17d46f8381962fb4a1577ba3017b1f23509d894f6e66431f988c00889e.js net::ERR_ABORTED 404 (Not Found)

Setup details:

I’ve noticed this is a common issue, as seen in several other forum posts. I’ve tried all solutions proposed in previous discussions, including:

  • Adjusting base URL configurations
  • Verifying theme installation and submodule
  • Checking GitHub Actions workflow
  • Solutions from similar threads on the forum

However, none of the common solutions have resolved the issue :confused: . Any additional help or fresh perspectives would be greatly appreciated!

Set the baseURL in your site configuration to the URL of your production site.

baseURL = 'https://vitor-mafra.github.io/about_me/'

Remove these:

canonifyURLs = true       # see docs: https://gohugo.io/content-management/urls/#canonical-urls
relativeURLs = true       # see docs: https://gohugo.io/content-management/urls/#relative-urls
PygmentsCodeFences = true # this is superfluous; it is the same as the default value
PygmentsStyle = "monokai" # this is superfluous; it is the same as the default value
paginate = 10             # this is superfluous; it is the same as the default value

Add this:

[markup.goldmark.renderHooks.image]
enableDefault = true

[markup.goldmark.renderHooks.link]
enableDefault = true

See https://discourse.gohugo.io/t/markdown-style-images-with-full-path-when-baseurl-includes-subdirectory/52487/2

1 Like

You are an absolut legend. Wow, thank you so much for your (really fast) help!

1 Like

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