Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Locally building and pushing jekyll site to github pages

I am using the gem "jekyll-assets" on my site and it fails when pushing to github pages. I have read that a way around this is to build the site locally, which builds just fine, and then push it to github pages. The examples of people doing this, however, are using a project repository and they are pushing the site to a "gh-pages" branch. I am doing this site for myself and the setup for this suggests using the master branch under the repo .github.io. How do I push a local jekyl build to a site with this setup?

like image 676
npresco Avatar asked Sep 19 '25 09:09

npresco


1 Answers

You need to push only the content of the _site folder. Nothing else, nor the folder itself.

If you are setting up a project site, push the content to the gh-pages branch. If it's your user website, the repo must be named username.github.io and your site root needs to be the master branch.

Let me know how it goes! :)

Hope to have helped!

like image 179
Virtua Creative Avatar answered Sep 21 '25 12:09

Virtua Creative