我刚迁移到另一台计算机并安装了Jekyll。现在我似乎无法让Jekyll生成我的网站。当我运行jekyll --no-server
时,我得到:
/Users/sb/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
Configuration from /Users/sb/Sites/drb/_config.yml
Building site: /Users/sb/Sites/drb -> ./_site
/Users/sb/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): did not find expected ',' or ']' while parsing a flow sequence at line 6 column 13 (Psych::SyntaxError)
from /Users/sb/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
from /Users/sb/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in `parse'
from /Users/sb/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:127:in `load'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/convertible.rb:33:in `read_yaml'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/post.rb:39:in `initialize'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:163:in `new'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:163:in `block in read_posts'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:161:in `each'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:161:in `read_posts'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:128:in `read_directories'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:98:in `read'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:38:in `process'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/bin/jekyll:250:in `<top (required)>'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/bin/jekyll:19:in `load'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/bin/jekyll:19:in `<main>'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/sb/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
Jekyll似乎工作正常,但_posts
中的markdown文件似乎没有转换为HTML,因为_site
中没有任何文件。删除_site
目录然后重新生成我的网站会创建一个新的_site
,但文件夹中没有内容。有人可以帮忙吗?感谢。
答案 0 :(得分:1)
解决。原来是在YAML前面使用问号。