My gh-page works well in Local but gets 404 error when published.

Hi, I’m new to gh-pages.

I was trying to post my page with Jekyll(Theme : Jasper2) but had some problems.

My problem is that “My page works excellent in local, but not inmy gh-page”.

I’ve been searching for several methods to figure it out, and here is what i’ve tried for.

  • It might be the secure problem which makes the difference between local and github. So you must push the output folder “_site” either when pushing your pages.

  – I’ve made static html files by “bundle exec jekyll build JEKYLL_ENV=production” into _site folder and pushed it to my git repo. But, the 404 error appeared in my tags.

Besides I found out my navigation not working on my “Static Files” which I made by command.

I don’t know why it is happening, how to figure it out.

Thanks.

Figured it out!

What I’ve done is simple.

**Just push the _sites folder to your git repo(example.github.io)**