bespoke-meta-markdown
Prefix slides with YAML meta data, configure behaviour based on the meta data.
Usage
Simply drop it in as a replacement for bespoke-marked,
var markdown = ;bespoke;
Config
Default config:
var defaults = { slideclassList; };
To take advantage of this default behavior insert YAML data in a slide
--- <!--master: myClass--> # title of slide * bullet* list ---
To configure your own behavior, simply define methods on the configuration object
var markdown = ;bespoke;
To turn off default behaviour set master to null
var markdown = ;bespoke;
The this
context of each configuration method is
the bespoke deck
object, for cases where YAML configuration
could affect all slides:
var markdown = ;bespoke;
Package managers
npm
$ npm install bespoke-meta-markdown
Graceful Reloads
As of 1.3.x bespoke-meta-markdown supplies a reload
method which
allows slides loaded from markdown to be reloaded in place, instead
of a full refresh.
The reload
method is supplied on the function object returned
when the exported function is called.
=> function bespokePlugin(deck, ...) #reload function(file, LR)
The idea is to tie it into live reload
var markdown = ;var md = ;bespoke; LiveReload { thiswindow = window; thishost = host;} MarkdownPluginprototype { path = path; var file = pathpathlength-1; if file1 !== 'md' return false; md; //<-- using the bespoke-meta-markdown reload method return true;}
Credits
This plugin was built with generator-bespokeplugin.