# Theme working on localhost, but not in GitHub pages

**URL:** <https://discourse.gohugo.io/t/theme-working-on-localhost-but-not-in-github-pages/52897>\
**Category:** support\
**Created:** [December 26, 2024, 7:59pm UTC](https://discourse.gohugo.io/t/theme-working-on-localhost-but-not-in-github-pages/52897 "2024-12-26T19:59:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vitormafra](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/vitormafra/32/23610_2.png) [@vitormafra](https://discourse.gohugo.io/u/vitormafra)\
**Post date:** [December 26, 2024, 7:59pm UTC](https://discourse.gohugo.io/t/theme-working-on-localhost-but-not-in-github-pages/52897/1 "2024-12-26T19:59:25Z")

</div>

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:

```auto
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:

- Theme: hello-friend-ng (as Git submodule @ b4559bf)
- Repository: [GitHub - vitor-mafra/about\_me: My personal website](https://github.com/vitor-mafra/about_me)
- Base URL in hugo.toml: `baseurl = "/"`
- Using GitHub Actions for deployment

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 😕 . Any additional help or fresh perspectives would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [December 26, 2024, 8:51pm UTC](https://discourse.gohugo.io/t/theme-working-on-localhost-but-not-in-github-pages/52897/2 "2024-12-26T20:51:59Z")

</div>

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

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

```

Remove these:

```toml
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:

```toml
[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](https://discourse.gohugo.io/t/markdown-style-images-with-full-path-when-baseurl-includes-subdirectory/52487/2)

---

<div class="post-metadata">

**Author:** ![vitormafra](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/vitormafra/32/23610_2.png) [@vitormafra](https://discourse.gohugo.io/u/vitormafra)\
**Post date:** [December 26, 2024, 9:14pm UTC](https://discourse.gohugo.io/t/theme-working-on-localhost-but-not-in-github-pages/52897/3 "2024-12-26T21:14:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [December 28, 2024, 9:14pm UTC](https://discourse.gohugo.io/t/theme-working-on-localhost-but-not-in-github-pages/52897/4 "2024-12-28T21:14:23Z")

</div>

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