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?
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 .
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.