vkbansal / frontmatter
Frontmatter allows page-specific variables to be included at the top of a template using the YAML,JSON or INI format.
Installs: 1 055
Dependents: 2
Suggesters: 0
Security: 0
Stars: 9
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=5.4.0
- symfony/yaml: 2.7.*
Requires (Dev)
- phpunit/phpunit: 4.7.*
README
use https://github.com/webuni/front-matter instead
#FrontMatter Frontmatter allows page-specific variables to be included at the top of a template using the YAML or JSON format.
##Requirements
- PHP >= 5.4
##Installation
Create or update your composer.json and run composer update
$ composer require vkbansal/frontmatter
##Supported Formats
- YAML
- JSON
- INI
Quick usage
<?php require '../vendor/autoload.php'; use VKBansal\FrontMatter\Parser; use VKBansal\FrontMatter\Document; //Parse a document $doc = Parser::parse(<<<EOF --- layout: custom my_list: - one - two - three --- Main Title ----- ### Subtitle Lorem ipsum...... EOF ); var_dump($doc->getConfig()); // ['layout' => 'custom', 'my_list' => ['one', 'two', 'three']] var_dump($doc->getContent()); /* Main Title ----- ### Subtitle Lorem ipsum..... */
For more detailed usage see website
##License MIT
##Changelog Changelog