Jekyll 将 YAML 连字符视为破折号

Jekyll treating YAML hyphens as dashes

Jekyll 没有正确解析 post,我找不到错误; YAML 前面的内容与我们其他 post 中的相同。这是两个不同之处:

(1) 出于某种原因,Jekyll 将 YAML 前端内容底部的三个破折号渲染为一个破折号:category: German — Doch is a modal particle,。我已经尝试删除这些连字符并重新输入它们,但并没有解决问题。

(2) 我们正在尝试用这个 post 创建一个名为 "German." 的新类别 Jekyll 已经自动从其他 post 创建了我们的类别,但在这个例子中,它没有创建 "German" 类别,而是将 post 放在它自己的文件夹中。

当我在浏览器中打开页面时,我在顶部看到这个:

layout: post author: WordBrewery title: “How to use the German doch” description: “How to use and understand the German modal particle doch.” image: hohenschwangau.jpg featured: true published: true category: German — Doch is a modal particle, a word used to indicate attitude, tone or the focus of a sentence.

这是 post 的 YAML 前言和第一行:

---
layout: post
author: WordBrewery
title: "How to use the German doch"
description: "How to use and understand the German modal particle doch."
image: hohenschwangau.jpg
featured: true
published: true
category: German
---
*Doch* is a [modal particle](https://en.m.wikipedia.org/wiki/German_modal_particle), a word used to indicate attitude, tone or the 

如有任何帮助,我将不胜感激。

Appearance of the unparsed post

(从评论转移到回答)

您需要确保markdown文件编码正确(utf8无BOM)。 Jekyll 前端的 BOM 有问题http://jekyllrb.com/docs/frontmatter/