Github Pages 404 on node_modules folder

谁说我不能喝 提交于 2020-07-14 01:39:49

问题


I am trying to render my GitHub repo on the Publisher-Subscriber module with JavaScript using GitHub pages. The gh-pages branch looks fine. However, the mustache code does not render on my project on GitHub Pages. It looks like this :

GitHub Repository : https://github.com/ajhalthor/pubsub-application

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

The GitHub Repository also has the node_modules folder, so it should be self sufficient. Mustache, jQuery & Bootstrap are included in this folder, so there are no external links or CDNs.

Main Question : Why isn't mustache rendering even though all paths are specified relative to the project's main folder?


回答1:


Github pages uses a version of Jekyll that ignores node_modules folder by default.

According to this blog article. You can do the following:

Create an empty .nojekyll text file in the root of the gh-pages branch.

You can also refer to this announcement by github which talks about the update that is responsible for this behavior.



来源:https://stackoverflow.com/questions/43481269/github-pages-404-on-node-modules-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!