2017 © Pedro Peláez
 

library phrontmatter

Front Matter parser for PHP, with support for YAML, JSON and TOML.

image

bluebaytravel/phrontmatter

Front Matter parser for PHP, with support for YAML, JSON and TOML.

  • Tuesday, January 2, 2018
  • by jbrooksuk
  • Repository
  • 4 Watchers
  • 15 Stars
  • 2,579 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Phrontmatter

StyleCI Build Status, (*1)

// Parse a document.
Phrontmatter::parse("---\nfoo: bar---\nThis is actual content!")->foo;

// Dependency injection example.
$phrontmatter->parse("---\nfoo: bar---\nThis is actual content!")->getContent();

// Parse a document with JSON meta data.
$phrontmatter->parse("---\n{\"foo\":\"bar\"}\n---\nThis is a document with JSON!", Phrontmatter::JSON)->getData();
````

For more information on Front Matter, see the [Jekyll documentation](http://jekyllrb.com/docs/frontmatter/).

## Installation

Require this package, with [Composer](https://getcomposer.org/), in the root directory of your project.

```bash
composer require bluebaytravel/phrontmatter

Laravel Installation

Add the service provider to config/app.php in the providers array., (*2)

BlueBayTravel\Phrontmatter\PhrontmatterServiceProvider::class

If you want you can use the facade. Add the reference in config/app.php to your aliases array., (*3)

'Phrontmatter' => BlueBayTravel\Phrontmatter\Facades\Phrontmatter::class

Supported Formatters

Phrontmatter supports the following formatters:, (*4)

  • YAML (default)
  • TOML
  • JSON

License

Blue Bay Travel Phrontmatter is licensed under The MIT License (MIT)., (*5)

The Versions

02/01 2018
15/06 2017
29/09 2016

v1.3.3

1.3.3.0

Front Matter parser for PHP, with support for YAML, JSON and TOML.

  Sources   Download

MIT

The Requires

 

The Development Requires

05/09 2016

v1.3.2

1.3.2.0

Front Matter parser for PHP, with support for YAML, JSON and TOML.

  Sources   Download

MIT

The Requires

 

The Development Requires

19/04 2016

v1.3.1

1.3.1.0

Front Matter parser for PHP, with support for YAML, JSON and TOML.

  Sources   Download

MIT

The Requires

 

The Development Requires