2017 © Pedro Peláez
 

library kurenai

Markdown document parser with metadata.

image

orchestra/kurenai

Markdown document parser with metadata.

  • Wednesday, August 19, 2015
  • by crynobone
  • Repository
  • 1 Watchers
  • 2 Stars
  • 334 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Kurenai

Join the chat at https://gitter.im/orchestral/platform/components, (*1)

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

Latest Stable Version Total Downloads MIT License Build Status Coverage Status Scrutinizer Quality Score, (*3)

Introduction

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

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

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 :, (*6)

<?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!, (*7)

$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., (*8)

The Versions

19/08 2015

dev-master

9999999-dev

Markdown document parser with metadata.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

markdown metadata document kurenai

21/06 2015

v0.2.0

0.2.0.0

Markdown document parser with metadata.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

markdown metadata document kurenai

26/05 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