API Documentation

MarkdownDocument
in package
implements MarkdownDocumentContract, Stringable uses InteractsWithFrontMatter

A MarkdownDocument is a simpler alternative to a MarkdownPage.

It's an object that contains a parsed FrontMatter split from the body of the Markdown file.

Table of Contents

Interfaces

MarkdownDocumentContract
Stringable

Properties

$markdown  : Markdown
$matter  : FrontMatter

Methods

__construct()  : mixed
__toString()  : string
data()  : FrontMatter|mixed
Get a value from the computed page data, or fallback to the page's front matter, then to the default value.
has()  : bool
See if a value exists in the computed page data or the front matter.
markdown()  : Markdown
Return the document's Markdown object.
matter()  : FrontMatter|mixed
Get the front matter object, or a value from within.
parse()  : static

Properties

Methods

data()

Get a value from the computed page data, or fallback to the page's front matter, then to the default value.

public data([string $key = null ][, mixed $default = null ]) : FrontMatter|mixed
Parameters
$key : string = null
$default : mixed = null
Return values
FrontMatter|mixed

has()

See if a value exists in the computed page data or the front matter.

public has(string $key) : bool
Parameters
$key : string
Return values
bool

matter()

Get the front matter object, or a value from within.

public matter([string $key = null ][, mixed $default = null ]) : FrontMatter|mixed
Parameters
$key : string = null
$default : mixed = null
Return values
FrontMatter|mixed

parse()

public static parse(string $path) : static
Parameters
$path : string
Return values
static

        
On this page

Search results