Jekyll沒有正確解析帖子,我找不到錯誤; YAML的前沿問題與我們其他職位相同。以下是兩個區別:Jekyll將YAML連字符當作破折號
(1)由於某些原因,Jekyll將YAML前端底部的三個破折號渲染爲一條短線:category: German — Doch is a modal particle,
。我嘗試刪除這些連字符並重新輸入它們,但這並沒有解決問題。
(2)我們正在嘗試創建一個名爲「German」的新文章。 Jekyll自動從其他帖子創建我們的類別,但在這種情況下,它不會創建「德語」類別,而是將帖子置於其自己的文件夾中。
當我在瀏覽器中打開網頁,我看到這個頂部:
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.
這裏是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
文件的編碼與正常工作的文章不同嗎? – RobertKenny
請務必使用不含BOM的utf-8編碼保存文件。 –
謝謝你們兩位;我認爲這可能是問題所在,並在Emacs中重新編碼爲utf-8(原始版本是在Atom的Windows PC上起草的),但顯然這並沒有刪除BOM(並且BOM在空白模式下不可見)。然後,我切換到Sublime Text並嘗試以UTF-8格式打開它並將其保存爲UTF-8,並且工作正常。謝謝! – WordBrewery