https://github.com/bulldogcreative/front-matter
YAML and Markdown parser. Useful for creating static HTML from files.
https://github.com/bulldogcreative/front-matter
front-matter front-matter-parser markdown php yaml
Last synced: about 1 month ago
JSON representation
YAML and Markdown parser. Useful for creating static HTML from files.
- Host: GitHub
- URL: https://github.com/bulldogcreative/front-matter
- Owner: bulldogcreative
- Created: 2018-09-11T00:34:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-11T13:29:08.000Z (over 7 years ago)
- Last Synced: 2025-05-23T14:47:53.744Z (8 months ago)
- Topics: front-matter, front-matter-parser, markdown, php, yaml
- Language: PHP
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Front Matter
[](https://travis-ci.org/bulldogcreative/front-matter)
[](https://coveralls.io/github/bulldogcreative/front-matter?branch=master)
This uses [Parsedown](http://parsedown.org/) and
[Symfony/Yaml](https://symfony.com/doc/current/components/yaml.html).
## Example
This is an example source file. It has YAML at the top and Markdown under that.
```yaml
---
title: Hello World
---
# Hello World
It is i, levi.
[test](https://google.com)
```
Then we use the following PHP to read the config and the HTML.
```php
config());
// Output
/*
array(1) {
'title' =>
string(11) "Hello World"
}
*/
var_dump($fm->html());
// Output
/*
string(85) "
Hello World
It is i, levi.
"
*/
```