2

My old website was simple jekyll code kept on master. Now, I revamped website and also started using jekyll-assets plugin. I just came to know that, github pages doesn't support custom plugins, so, I'm in trouble since I've used it at many places.

Now, I've found work around to create a gh-pages branch and push compiled version over there. Earlier, I was not doing it since, github pages was using master to compile jekyll code.

I've also include .nojekyll in my master to not compile jekyll code - that didn't help either, github pages is still pointed to master.

Is there any way I can change this pointing?

Maulik Suchak
  • 1,028
  • 1
  • 8
  • 23
  • possible duplicate of [How do I configure GitHub to use non-supported Jekyll site plugins?](http://stackoverflow.com/questions/28249255/how-do-i-configure-github-to-use-non-supported-jekyll-site-plugins) – David Jacquel Sep 25 '15 at 07:25
  • @DavidJacquel - yes it is similar. I found its not possible to do like that :) thanks though. – Maulik Suchak Sep 25 '15 at 07:57
  • @MaulikSuchak a suggestion, perhaps to automate the process you can have your source on a branch, then use travis-ci to actually build and push to master? Travis ci is used to test, but nothing is stopping from using it to push the generated static site to master. This might help: http://eshepelyuk.github.io/2014/10/28/automate-github-pages-travisci.html – matrixanomaly Sep 29 '15 at 18:24

2 Answers2

1

According to GitHub documentation if we've something like username.github.io it will point to master, it will NOT track gh-pages even if we want to, (so your jekyll code should be in the master in this case), for Projects repo, your published code has to be under gh-pages branch.

As of now I followed a great trick mentioned here.

Maulik Suchak
  • 1,028
  • 1
  • 8
  • 23
0

If your website is hosted in a User & Organization Page – that is in a dedicated repository named username.github.io – then GitHub Pages will always serve content from the master branch:

Content from the master branch will be used to build and publish your GitHub Pages site.

Since you can't force your GitHub Pages to build your site from another branch than master , I suggest you keep working on your new website in the gh-pages branch and merge it to master once you're done. Also, you should keep the .nojekyll file in your repository so GitHub Pages won't generate the site but instead serve your static files.

Enrico Campidoglio
  • 56,676
  • 12
  • 126
  • 154