# Add hugo to github.io page

**URL:** <https://discourse.gohugo.io/t/add-hugo-to-github-io-page/15241>\
**Category:** support\
**Created:** [November 11, 2018, 3:45pm UTC](https://discourse.gohugo.io/t/add-hugo-to-github-io-page/15241 "2018-11-11T15:45:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yukno](https://avatars.discourse-cdn.com/v4/letter/y/97f17d/32.png) [@yukno](https://discourse.gohugo.io/u/yukno)\
**Post date:** [November 11, 2018, 3:45pm UTC](https://discourse.gohugo.io/t/add-hugo-to-github-io-page/15241/1 "2018-11-11T15:45:35Z")

</div>

Hi!

I want to host hugo on my github io page. I added: baseURL = “[https://username.github.io](https://username.github.io)”  
with my username in config.toml file. Then I pushed the site, but it doesn’t work and gives me 404 not found. Anything else I need to do?

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [November 11, 2018, 5:01pm UTC](https://discourse.gohugo.io/t/add-hugo-to-github-io-page/15241/2 "2018-11-11T17:01:16Z")

</div>

Hi there – have you followed the hugo docs for [hosting on github pages](https://gohugo.io/hosting-and-deployment/hosting-on-github/)?

---

<div class="post-metadata">

**Author:** ![yukno](https://avatars.discourse-cdn.com/v4/letter/y/97f17d/32.png) [@yukno](https://discourse.gohugo.io/u/yukno)\
**Post date:** [November 11, 2018, 5:33pm UTC](https://discourse.gohugo.io/t/add-hugo-to-github-io-page/15241/3 "2018-11-11T17:33:06Z")

</div>

Nope I saw that one now. What I did was clone hugo into a folder and change everything there, it worked to run it locally. Then I cloned the [githu.io](http://githu.io) repo, moved all files from the other folder to the [github.io](http://github.io) folder, and I ran:  
git add .  
git commit -m “push new site”  
git push

But only some files was pushed so seems to be some problem. Is the easiest thing to redo it and follow the link you sent? Because I didn’t do anything with submodule, and it might be some problems when using git a lot for pulling down Hugo repo and then move files. Or could I fix the problem in any way?

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [November 11, 2018, 5:38pm UTC](https://discourse.gohugo.io/t/add-hugo-to-github-io-page/15241/4 "2018-11-11T17:38:56Z")

</div>

Doing it your manual way, I’m not familiar enough with GitHub pages to advise.

But I do know that following the steps in the docs works.

---

<div class="post-metadata">

**Author:** ![nfriedli](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/nfriedli/32/26027_2.png) [@nfriedli](https://discourse.gohugo.io/u/nfriedli)\
**Post date:** [November 12, 2018, 10:03am UTC](https://discourse.gohugo.io/t/add-hugo-to-github-io-page/15241/5 "2018-11-12T10:03:06Z")

</div>

For GitHub Pages, you can:

- use the master branch as website or
- use the docs folder of the master branche as website or
- use a gh-pages branch

My favorite solution is the docs folder. Please configure in your project Settings page.

 ![Capture%20du%202018-11-12%2010-59-42](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/2X/d/d5cf3e550203e0e4afa4391165301dc95d4794a2.png)
