Github页面,远程引导css:无法加载资源:服务器响应状态为404(未找到)

Col*_*let 5 css twitter-bootstrap github-pages

我有自定义的引导程序网站,我推送github页面.本地它工作得非常好,完全没问题,但是在线时样式很乱,这些消息出现在控制台上:

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)
Run Code Online (Sandbox Code Playgroud)

在我的代码中,css声明如下:

<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
Run Code Online (Sandbox Code Playgroud)

为什么本地工作而不是远程?

hac*_*tsu 2

看起来您的 GitHub 页面正在使用 Jekyll。对于 2016 年 11 月起的 Jekyll 3.3,vender 文件夹将被忽略

Jekyll 现在默认忽略vendor 和node_modules 目录。

您可以将vender文件夹重命名为某个名称,例如libs并引用新路径,或者遵循 Jekyll 的建议

如果您需要将这些目录包含在站点中,请在站点的配置文件中设置排除:[]。

希望能帮助到你:)