2017 © Pedro Peláez
 

library kurenai

Markdown document parser with metadata.

image

laravie/kurenai

Markdown document parser with metadata.

  • Sunday, May 6, 2018
  • by crynobone
  • Repository
  • 1 Watchers
  • 3 Stars
  • 399 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 1 % Grown

The README.md

Kurenai

Kurenai is a Markdown document parser which allows for extra metadata to be associated with the document., (*1)

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Coverage Status, (*2)

Introduction

Confused? Let's take a look at how it works., (*3)

This is what your documents might look like:, (*4)

title: This is my document title.
slug: this-is-the-slug
date: 12th December 1984
-------
This is my **markdown** content!

and here is how you will parse it with Kurenai :, (*5)

<?php

// Use the Kurenai document parser.
use Kurenai\Document;
use Kurenai\DocumentParser;
use Kurenai\Parser\Parsedown;

// Load our document source.
$source = file_get_contents('my_document.md');

// Create a new document parser
$parser = new DocumentParser(new Document(new Parsedown));

// Parse the loaded source.
$document = $parser->parse($source);

// To get the document content in raw markdown format..
// This is my **markdown** content!
$rawMarkdown = $document->getContent();

// To get the converted HTML content..
// 

This is my markdown content!, (*6)

$html = $document->getHtmlContent(); // To access the full array of metadata // array( // 'title' => 'This is my document title.', // 'slug' => 'this-is-the-slug', // 'date' => '12th December 1984' // ); $metadata = $document->get(); // To access a piece of metadata by key (default: null).. // this-is-the-slug $slug = $document->get('slug');

Origin

Kurenai is a forked project from daylerees/kurenai., (*7)

The Versions

06/05 2018

dev-master

9999999-dev

Markdown document parser with metadata.

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown metadata document kurenai

06/05 2018

v2.0.0

2.0.0.0

Markdown document parser with metadata.

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown metadata document kurenai

20/11 2015

v1.0.0

1.0.0.0

Markdown document parser with metadata.

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown metadata document kurenai

28/10 2015

v0.3.0

0.3.0.0

Markdown document parser with metadata.

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown metadata document kurenai

07/09 2015

v0.2.0

0.2.0.0

Markdown document parser with metadata.

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown metadata document kurenai

06/09 2015

v0.1.0

0.1.0.0

Markdown document parser with metadata.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

markdown metadata document kurenai