2017-04-13 69 views
0

我刚刚为github页面设置了一个本地jekyll实例。按照GitHub上的所有说明并获取所有文件到本地存储库后,我运行了jekyll(sudo bundle exec jekyll serve)。Jekyll:找不到ERROR文件

我收到以下错误:

^CSeans-MacBook-Air:docs-gh-pages seanmcintyre$ sudo bundle exec jekyll serve 
Password: 
Configuration file: none 
Configuration file: none 
      Source: /Users/SnapRouteDocs/docs-gh-pages 
     Destination: /Users/SnapRouteDocs/docs-gh-pages/_site 
Incremental build: disabled. Enable with --incremental 
     Generating... 
        done in 0.82 seconds. 
Auto-regeneration: enabled for '/Users/SnapRouteDocs/docs-gh-pages' 
Configuration file: none 
    Server address: http://127.0.0.1:4000/ 
    Server running... press ctrl-c to stop. 
[2017-04-13 13:35:12] ERROR `/_static/js/modernizr.min.js' not found. 
[2017-04-13 13:35:12] ERROR `/_static/js/theme.js' not found. 
[2017-04-13 13:35:12] ERROR `/_static/doctools.js' not found. 
[2017-04-13 13:35:12] ERROR `/_static/jquery.js' not found. 
[2017-04-13 13:35:12] ERROR `/_static/underscore.js' not found. 
[2017-04-13 13:35:17] ERROR `/_static/css/theme.css' not found. 
[2017-04-13 13:35:17] ERROR `/_static/jquery.js' not found. 
[2017-04-13 13:35:17] ERROR `/_static/underscore.js' not found. 
[2017-04-13 13:35:17] ERROR `/_static/doctools.js' not found. 
[2017-04-13 13:35:17] ERROR `/_static/js/theme.js' not found. 

我检查了所有的文件实际上存在。

我该如何解决这个问题?

回答

0

问题因为Jekyll不知道他们,所以他们没有编译到生成文件夹_site。尝试在_config.yml文件中添加此:

include: 
    - _static 

如果不工作,只是删除下划线和哲基尔将自动包括在构建。无论如何,这是最好的方法。