无法在 jekyll 中找到错误... "did not find expected key while parsing a block mapping"

cant find the error in jekyll... "did not find expected key while parsing a block mapping"

我是 jekyll 和 liquid 的新手。我有这个 运行 不久前,但不知何故把它搞砸了,没有备份。当找到某些东西时,错误只是转移到其他地方......请看一看。

这是我的代码:

---
title: Gallery
layout: gallery
heroimage: /img/hero-image-gallery.jpg
imgsize: small
masonry:
itemsize: 33.333%
categories:
- Objects
- People
- Places
images:
- title: one
  thumb: img/gallery-image-one.jpg
  big: img/gallery-image-one.jpg
  categories:
    - People
    - Places
- title: two
  thumb: img/gallery-image-two.jpg
  big: img/gallery-image-two.jpg
  categories:
    - Objects
    - Places
- title: three
  thumb: img/gallery-image-three.jpg
  big: img/gallery-image-three.jpg
  categories:
    - People
- title: four
  thumb: img/gallery-image-four.jpg
  big: img/gallery-image-four.jpg
  categories:
    - Objects
    - Places
- title: five
  thumb: img/gallery-image-five.jpg
  big: img/gallery-image-five.jpg
  categories:
    - Objects
- title: eight
  thumb: img/gallery-image-eight.jpg
  big: img/gallery-image-eight.jpg
  categories:
    - Places
- title: seven
  thumb: img/gallery-image-seven.jpg
  big: img/gallery-image-seven.jpg
  categories:
    - Places
- title: six
  thumb: img/gallery-image-six.jpg
  big: img/gallery-image-six.jpg
  categories:
    - Objects
    - People
 - title: bla
  thumb: img/gallery-image-six.jpg
  big: img/gallery-image-six.jpg
  categories:
    - Objects
    - People
---
<div class="portfolioFilter">

    <a href="#" data-filter="*" class="current">Alle</a>
    {% for cat in page.categories %}
        <a href="#" data-filter=".{{ cat | slugify }}">{{cat}}</a>
    {% endfor %}

</div><br>
<div class="grid">
  <div class="grid-sizer"></div>
  {% for item in page.images %}
  <div class="grid-item{% for cat in item.categories %} {{cat | slugify}}{% endfor %}">
    <a class="example-image-link" href="{{item.big}}" data-lightbox="example-set" ><img src="{{item.thumb}}"/></a>
  </div>
  {% endfor %}
</div>

这是我遇到的错误:

Error reading file /Users/maxborm/Desktop/lukawebsite/gallery.html: (<unknown>): did not find expected key while parsing a block mapping at line 2 column 1 

提前致谢。

缩进在 Liquid 中非常重要,您必须确保在声明集合时有正确数量的 spaces。

在你的情况下,你在 - title: bla 之前有一个额外的 space 导致错误。

即你有:

 - title: bla

你应该在什么时候:

- title: bla