杰基尔& Github Pages:SyntaxError:意外的令牌:运算符(>)

时间:2017-12-10 04:08:06

标签: syntax-error jekyll github-pages

我正在开发一个Jekyll项目,它可以正常构建/提供服务。当我将github-pages添加为gem时,我运行bundle update,因为它需要解析依赖关系。执行此操作后,我尝试构建和/或提供服务,并在生成静态站点时返回以下错误:

jekyll 3.6.2 | Error:  SyntaxError: Unexpected token: operator (>)

这是我的Gemfile:

source "https://rubygems.org"

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 3.6.2"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
# gem "minima", "~> 2.0"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.6"
  gem "jekyll-assets"
  gem "jekyll-minifier"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

以下是运行build时的完整输出:

    $ be jekyll build
Configuration file: /Users/fong/dev/Projects/Portfolio/jekyll_portfolio/portfolio/_config.yml
            Source: /Users/fong/dev/Projects/Portfolio/jekyll_portfolio/portfolio
       Destination: /Users/fong/dev/Projects/Portfolio/jekyll_portfolio/portfolio/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
jekyll 3.6.2 | Error:  SyntaxError: Unexpected token: operator (>)

有谁知道为什么会这样?

我已经在github-pages宝石上缩小了作为问题的原因,但我不确定根本原因是什么以及如何解决问题。

1 个答案:

答案 0 :(得分:0)

我需要将theme: minima添加回我的配置中。这似乎解决了构建问题。