private function parse()
    {
        if (isset($this->template, $this->frontMatter)) {
            return $this;
        }

        $source = $this->readSourceFile();

        $parts = preg_split('/[\n]*[-]{3}[\n]/', $source, 2);
        if (count($parts) === 2) {
            $this->frontMatter = Yaml::parse($parts[0]);
            $this->template = trim($parts[1]);
        } else {
            $this->frontMatter = array();
            $this->template = trim($source);
        }

        return $this;
    }