diff --git a/docs/02_Examples/Hello_World_de.md b/docs/02_Examples/Hello_World_de.md index 96304e2..f65a151 100644 --- a/docs/02_Examples/Hello_World_de.md +++ b/docs/02_Examples/Hello_World_de.md @@ -1,4 +1,4 @@ ---- +--- title: Hallo Welt date: 12th December 1984 --- diff --git a/libs/Tree/Content.php b/libs/Tree/Content.php index f40e303..9822750 100644 --- a/libs/Tree/Content.php +++ b/libs/Tree/Content.php @@ -103,7 +103,12 @@ class Content extends Entry $frontMatter = new FrontMatter(); - $document = $frontMatter->parse($this->getContent()); + $content = $this->getContent(); + if (substr($content, 0, 3) == "\xef\xbb\xbf") { + $content = substr($content, 3); + } + + $document = $frontMatter->parse($content); $this->attributes = array_replace_recursive($this->attributes, $document->getData()); $this->setContent($document->getContent());