2017-04-13 78 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 

如果不工作,只是刪除下劃線和哲基爾將自動包括在構建。無論如何,這是最好的方法。