首页 文章

node_modules文件夹上的Github页面404

提问于
浏览
4

我正在尝试使用GitHub页面使用JavaScript在Publisher-Subscriber模块上呈现我的GitHub存储库 . gh-pages 分支看起来很好 . 但是,胡子代码不会在GitHub页面上的项目中呈现 . 它看起来像这样:

enter image description here

GitHub存储库:https://github.com/ajhalthor/pubsub-application

Github Pages Repo for this project:https://ajhalthor.github.io/pubsub-application/

GitHub存储库也有 node_modules 文件夹,所以它应该是自给自足的 . 此文件夹中包含Mustache,jQuery和Bootstrap,因此没有外部链接或CDN .

Main Question :为什么不是't mustache rendering even though all paths are specified relative to the project'的主文件夹?

1 回答

  • 6

    Github页面使用默认情况下忽略 node_modules 文件夹的Jekyll版本 .

    据此blog article . 您可以执行以下操作:

    在gh-pages分支的根目录中创建一个空的.nojekyll文本文件 .

    您还可以参考此announcement by github,其中讨论了导致此行为的更新 .

相关问题