# Why "git-hub pages" are blank when using my local babylon project

**URL:** <https://forum.babylonjs.com/t/why-git-hub-pages-are-blank-when-using-my-local-babylon-project/17558>\
**Category:** Questions\
**Created:** [January 17, 2021, 2:31pm UTC](https://forum.babylonjs.com/t/why-git-hub-pages-are-blank-when-using-my-local-babylon-project/17558 "2021-01-17T14:31:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eco\_Editor](https://avatars.discourse-cdn.com/v4/letter/e/a5b964/32.png) [@Eco\_Editor](https://forum.babylonjs.com/u/Eco_Editor)\
**Post date:** [January 17, 2021, 2:31pm UTC](https://forum.babylonjs.com/t/why-git-hub-pages-are-blank-when-using-my-local-babylon-project/17558/1 "2021-01-17T14:31:49Z")

</div>

Hello all,

I found this tutorial: [Introduction To Creating Games | Babylon.js Documentation](https://doc.babylonjs.com/guidedLearning/createAGame)  
and this Git repository of the game: [GitHub - BabylonJS/SummerFestival: Source code for game tutorial written by capucat](https://github.com/BabylonJS/SummerFestival)  
Inside the games’ repository, in the readme file, there’s a link to the game, the game is played using [github.io](http://github.io) - this means the game is hosted with github pages (please correct me if I’m wrong).  
And I think it is possible to host the local babylon.js projects with GitHub Pages, right?

What I’ve done so far:  
Based in the project above, I’ve created a public repository for testing: [GitHub - EcoEditor/pages\_test](https://github.com/EcoEditor/pages_test)  
[Made sure the “main” branch is called master](https://stackoverflow.com/questions/20895543/my-new-github-page-isnt-showing-up#:~:text=Try%20to%20push%20an%20empty,It%20should%20work.&text=Name%20your%20repository%20correctly%2C%20as,or%20organization%20name)%20on%20GitHub.),  
Renamed the “public” folder to “docs” - as the github pages [can reference root or docs directories](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site).  
Added theme from the Settings/Github pages, and \_config.yml file was added to the docs folder.  
pushed to the master, and clicked on the link: [Particle system test | pages\_test](https://ecoeditor.github.io/pages_test/)

and one of two things would happen:

1. the webpage would display the ReadMe file
2. the webpage would be blank

I looked at the console in dev tools, and there were no errors, no 404 or anything - not even the log I’ve added to the app.ts.  
I opened the test project of mine in the local host, and the project loaded correctly.

I tested with another index.html file I’ve created based on simple web page tutorial I did, (with the content being inside the .html file), and it worked - the content I’ve added to the .html (such as header and etc…) were displayed and hosted with github pages.

Another question I have, how come the game tutorial is using github pages but didn’t rename their “public” folder to “docs”, and it is still working?

I heard people use [jekyll](https://docs.github.com/en/github/working-with-github-pages/about-github-pages-and-jekyll) to upload their projects to github pages.  
Is that the solution you’d recommend in such case?  
How do you upload your local babylon projects to github pages?

Thank you

---

<div class="post-metadata">

**Author:** ![atmin](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/atmin/32/7756_2.png) [@atmin](https://forum.babylonjs.com/u/atmin)\
**Post date:** [January 17, 2021, 6:17pm UTC](https://forum.babylonjs.com/t/why-git-hub-pages-are-blank-when-using-my-local-babylon-project/17558/2 "2021-01-17T18:17:29Z")

</div>

The page won’t render in Github, because the [entry file](https://github.com/EcoEditor/pages_test/blob/master/docs/index.html) does not reference a compiled version of the appication (which lives in /src).

When you run `npm start`, Webpack runs a webserver, complies your application and puts a script file to it in the index.html served (because it is instructed so in `webpack.config.js`, the `inject: true` part). It also recompiles the application on each file change.

Check View Page Source of Github version and local version and you’ll notice the difference.

I don’t think this tutorial covers publishing of the game, it focuses on the creation part.

If you want to publish it, an easy way is to run `npm run build`, copy the contents of `/build` directory in `/docs` and push the resulting `/docs` to Github. This is not considered a good practice since it requires putting the build artifacts in git thus muddying the version history, but that certainly should not stop you from seeing your application published on the Internet 🙂

---

<div class="post-metadata">

**Author:** ![Eco\_Editor](https://avatars.discourse-cdn.com/v4/letter/e/a5b964/32.png) [@Eco\_Editor](https://forum.babylonjs.com/u/Eco_Editor)\
**Post date:** [January 17, 2021, 8:01pm UTC](https://forum.babylonjs.com/t/why-git-hub-pages-are-blank-when-using-my-local-babylon-project/17558/3 "2021-01-17T20:01:38Z")

</div>

Thank you! it worked.
