Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github Pages: Scripts from vendor directory are not getting loaded

Tags:

git

github

I am trying to create a blog on github for learning. My repo is hk-skit.github.io. I have added angular and ui-router scripts in my vendor directory. This is how I am including these in my index.html.

<script src="vendor/angular.min.js"></script>
<script src="vendor/angular-ui-router.min.js"></script>
<script src="js/app.js"></script>

This is my directory structure:

enter image description here

On my local, things are working fine. But when I pushed my changes to github. I don't know why it's saying 404 for angularjs and ui-router. Here's the link: http://hk-skit.github.io/. Can anyone please help me on this? Thanks.

like image 336
Hitesh Kumar Avatar asked Jul 13 '26 11:07

Hitesh Kumar


1 Answers

here is the detailed cause of this problem: https://www.bennadel.com/blog/3181-including-node-modules-and-vendors-folders-in-your-github-pages-site.htm

In short, simply create an empty .nojekyll file at the root of the gh-pages and you will be fine.

like image 153
mingyuan-xia Avatar answered Jul 15 '26 07:07

mingyuan-xia



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!