I have my customized bootstrap website which I push on github pages. Locally it works very fine, no problem at all, but when is online the style is messy and these messages appear on the console:
Failed to load resource: the server responded with a status of 404 (Not Found) https://nickname.github.io/repo/vendor/font-awesome/css/font-awesome.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
in my code, css is declared as follow:
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
why locally works and not remotely?
Thank you all. The problem was that recently Github updated to Jekyll v3.3, which ignores vendored files by default. As I was not using Jekyll for my Pages site, I had to add a .nojekyll file to the root of my repository to disable Jekyll from building my site. Once I did that, my site built with my vendored files without any problems.
It looks like you are using Jekyll for your GitHub page. As for the Jekyll 3.3 from Nov 2016, the vender folder is ignored.
Jekyll now ignores the vendor and node_modules directories by default.
You can either rename the vender
folder to some name like libs
and refer to the new path, or follow Jekyll's suggestion
If you need those directories included in your site, set exclude: [] in your site's configuration file.
Hope it helps:)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With