# Hugo site not rendering on github pages

**URL:** <https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585>\
**Category:** support\
**Created:** [March 23, 2023, 12:09pm UTC](https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585 "2023-03-23T12:09:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![azioba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/azioba/32/19081_2.png) [@azioba](https://discourse.gohugo.io/u/azioba)\
**Post date:** [March 23, 2023, 12:09pm UTC](https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585/1 "2023-03-23T12:09:46Z")

</div>

Hi!  
I have created a portfolio using Hugo and deploy it on github pages. The portfolio is rendering properly localy, every thing is fine. baseURL = “[name.github.io/](http://name.github.io/)” I build it over “ananke” theme.

Drop it on github pages But when i open the site it’s not rendering properly, images are missing, links are broken. Seems like a css problem, checked that there is a main.min.css file in the public folder generated after conversion.

If anyone can help pls.

- Added the statement: canonifyURLs = true
- Added the “/” at the end of the baseURL name
- Converted it to html using ./hugo -D
- Tried all i can find internet and decided to open an issue.

the link to the repo is [repository](https://github.com/azioba/azioba.github.io)

---

<div class="post-metadata">

**Author:** ![antoinentl](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/antoinentl/32/12914_2.png) [@antoinentl](https://discourse.gohugo.io/u/antoinentl)\
**Post date:** [March 23, 2023, 12:54pm UTC](https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585/2 "2023-03-23T12:54:32Z")

</div>

Sorry if I’m off topic but you’re versioning the HTML produced by Hugo, I’m not sure it’s a good idea.  
By the way if you share the source of your code it will be easiest to help you. Your config seems good but if we can try it, it will be better!

---

<div class="post-metadata">

**Author:** ![andrewd72](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/andrewd72/32/18371_2.png) [@andrewd72](https://discourse.gohugo.io/u/andrewd72)\
**Post date:** [March 23, 2023, 1:08pm UTC](https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585/3 "2023-03-23T13:08:22Z")

</div>

![Screenshot 2023-03-23 130343](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/0/9/09ec88571b2289d6001b5f7f7f9136da4be295b9.jpeg)

It is an easy fix, your images and css are not resolving as either absolute or relative links.  
So for the first image you want  
src=“/images/data.jpg” or “[https://yourname.github.io/images/data.jpg](https://yourname.github.io/images/data.jpg)”  
What you have at the moment is “[yourname.github.io/images/data.jpg](http://yourname.github.io/images/data.jpg)”

---

<div class="post-metadata">

**Author:** ![azioba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/azioba/32/19081_2.png) [@azioba](https://discourse.gohugo.io/u/azioba)\
**Post date:** [March 23, 2023, 1:17pm UTC](https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585/4 "2023-03-23T13:17:59Z")

</div>

i have putted the github repo in the issue, u can access to the code.  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![antoinentl](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/antoinentl/32/12914_2.png) [@antoinentl](https://discourse.gohugo.io/u/antoinentl)\
**Post date:** [March 23, 2023, 1:26pm UTC](https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585/5 "2023-03-23T13:26:22Z")

</div>

Again, your repository contains the HTML produced by Hugo, but not the source code: your Hugo’s config, the templates/layouts, the Markdown files, etc. I can’t help you.  
If you just want to correct the HTML, @andrewd72 is correct.

---

<div class="post-metadata">

**Author:** ![azioba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/azioba/32/19081_2.png) [@azioba](https://discourse.gohugo.io/u/azioba)\
**Post date:** [March 23, 2023, 1:32pm UTC](https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585/6 "2023-03-23T13:32:28Z")

</div>

Ah sorry for the misunderstanding…  
I am trying to fix the html according to @andrewd72 solution, but i want to fix the issue in the source code too so next time i will be ready to go.  
Just pushed the source code on the link : [https://github.com/azioba/exampleSite\_source-code](https://github.com/azioba/exampleSite_source-code)

Thanks

---

<div class="post-metadata">

**Author:** ![azioba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/azioba/32/19081_2.png) [@azioba](https://discourse.gohugo.io/u/azioba)\
**Post date:** [March 23, 2023, 1:35pm UTC](https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585/7 "2023-03-23T13:35:02Z")

</div>

Thanks for the reply and the solution. Going to try that , and i will edit this answer to let you know that i fixed it and close the issue

Realy appreciate the help

---

<div class="post-metadata">

**Author:** ![antoinentl](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/antoinentl/32/12914_2.png) [@antoinentl](https://discourse.gohugo.io/u/antoinentl)\
**Post date:** [March 23, 2023, 1:42pm UTC](https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585/8 "2023-03-23T13:42:02Z")

</div>

As @andrewd72 said, your URLs have problem, you can correct that in your `config.toml` file: `baseURL = "https://azioba.github.io/"`  
Try that in first.

---

<div class="post-metadata">

**Author:** ![andrewd72](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/andrewd72/32/18371_2.png) [@andrewd72](https://discourse.gohugo.io/u/andrewd72)\
**Post date:** [March 23, 2023, 1:42pm UTC](https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585/9 "2023-03-23T13:42:29Z")

</div>

I wasn’t suggesting you fix the output html, just showing where the problem was so that you know where to look to fix the templates and/or config.

---

<div class="post-metadata">

**Author:** ![azioba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/azioba/32/19081_2.png) [@azioba](https://discourse.gohugo.io/u/azioba)\
**Post date:** [March 23, 2023, 2:03pm UTC](https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585/10 "2023-03-23T14:03:55Z")

</div>

@antoinentl@andrewd72 Thanks , it’s working , really easy fix, just added https in the config file.

Thanks a lot , really appreciate the 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:** [March 25, 2023, 2:04pm UTC](https://discourse.gohugo.io/t/hugo-site-not-rendering-on-github-pages/43585/11 "2023-03-25T14:04:31Z")

</div>

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