public static function parse($yaml)
    {
        $options = null;
        if (function_exists('yaml_parse')) {
            $options = yaml_parse($yaml);
        } else {
            $options = spyc_load($yaml);
        }

        if ($options === null) {
            throw new YamlParseException('There was an error parsing your YAML front matter');
        }

        return $options;
    }