Jekyll:找不到错误文件

时间:2017-04-13 20:52:30

标签: jekyll

我只是为github页面设置了一个本地jekyll实例。按照GitHub上的所有说明并将所有文件放入本地存储库后,我运行了jekyll(sudo bundle exec jekyll serve)。

我收到以下错误:

^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.

我已经检查过,所有文件都在那里。

我该如何解决这个问题?

2 个答案:

答案 0 :(得分:1)

Prob因为Jekyll不了解它们,所以他们没有编译到构建文件夹file?。请尝试在var line = $(/*your highlighted line*/); var offset = line.offset(); window.scrollTo(offset.left, offset.top); 文件中添加:

_site

如果这不起作用,只需删除下划线,Jekyll将自动包含在构建中。无论如何,这是最好的方法。

答案 1 :(得分:0)

除了@keruilin的答案外,还出现了诸如以下的Jekyll错误

ERROR `/resources/biokdd-review-nlp.htm' not found.
有时

仅仅是由于网址格式错误,在浏览器中打开的一个网站页面中。检查打开的网页,然后重新加载。

例如,如果我打开格式错误的URL,

127.0.0.1:4000/resources/biokdd-review-nlp. html

(请注意.html之前的空格,直到我更正URL并重新加载页面之前,我都收到了Jekyll错误。