PHP code example of bulldog / front-matter
1. Go to this page and download the library: Download bulldog/front-matter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bulldog / front-matter example snippets
Bulldog\FrontMatter::load('file.yaml');
var_dump($fm->config());
// Output
/*
array(1) {
'title' =>
string(11) "Hello World"
}
*/
var_dump($fm->html());
// Output
/*
string(85) "<h1>Hello World</h1><p>It is i, levi.</p><p><a href="https://google.com">test</a></p>"
*/