2017 © Pedro Peláez
 

library frontmatter

Markdown including meta information parsing from frontmatters

image

hyn/frontmatter

Markdown including meta information parsing from frontmatters

  • Thursday, December 29, 2016
  • by Luceos
  • Repository
  • 1 Watchers
  • 6 Stars
  • 1,677 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 8 % Grown

The README.md

Frontmatter

GitHub license Latest Stable Version Build Status Total Downloads Donate, (*1)

An easy package to parse any markdown file that includes some kind of meta data (commonly known as frontmatter)., (*2)

Installation

composer require hyn/frontmatter

Usage

The easiest way is using inversion of control, but feel free to instantiate the class the way you see fit:, (*3)

$parser = new \Hyn\Frontmatter\Parser(new \cebe\markdown\Markdown);

// Uses json per default, but set specifically:
$parser->setFrontmatter(\Hyn\Frontmatter\Frontmatters\JsonFrontmatter::class);
// Use toml:
$parser->setFrontmatter(\Hyn\Frontmatter\Frontmatters\TomlFrontmatter::class);
// Or use yaml:
$parser->setFrontmatter(\Hyn\Frontmatter\Frontmatters\YamlFrontmatter::class);

// And parse the markdown file:
$contents = $parser->parse(file_get_contents('the-file.md'));
// Get meta
$meta = $parser->getMeta();

The Versions

29/12 2016

dev-master

9999999-dev

Markdown including meta information parsing from frontmatters

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniël `Luceos` Klabbers

14/12 2016

1.1.1

1.1.1.0

Markdown including meta information parsing from frontmatters

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniël `Luceos` Klabbers

14/12 2016

1.1

1.1.0.0

Markdown including meta information parsing from frontmatters

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniël `Luceos` Klabbers

10/12 2016

1.0

1.0.0.0

Markdown including meta information parsing from frontmatters

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniël `Luceos` Klabbers