Spyral.Metadata(config) → {Spyral.Metadata}

A class for storing Notebook metadata

new Metadata(config) → {Spyral.Metadata}

The metadata constructor.

Parameters:
Name Type Description
config Object

The metadata config object

Properties
Name Type Description
title String

The title of the Notebook

userId String

The user ID of the author of the Notebook

author String

The name of the author of the Notebook

catalogue Boolean

Whether to include the Notebook in the Catalogue

description String

The description of the Notebook

keywords Array

The keywords for the Notebook

created String

When the Notebook was created

language String

The language of the Notebook

license String

The license for the Notebook

Returns:
Spyral.Metadata

Methods

clone() → {Spyral.Metadata}

Returns a clone of this Metadata

Returns:
Spyral.Metadata

getHeaders() → {String}

Gets the fields as a set of HTML meta tags.

Returns:
String

set(config)

Set metadata properties.

Parameters:
Name Type Description
config Object

A config object

setDateNow(field)

Sets the specified field to the current date and time.

Parameters:
Name Type Description
field String

shortDate(field) → {String|undefined}

Gets the specified field as a short date.

Parameters:
Name Type Description
field String
Returns:
String | undefined