A Metalsmith plugin to retrieve data stored in http://pooleapp.com/. PooleApp is a hosted data store dedicated to static website. Amongst others things, it can be used to store comments.
$ npm install metalsmith-pooleapp
var pooleApp = ;metalsmith
The function exported by the
metalsmith-pooleapp expects an object in
parameter with a
forms property. This property contains an object with an
arbitrary number of sub-objects. Each one describing a PooleApp form and how
the data will be available in Metalsmith:
commentsin this example) is used to register the data in the Metalsmith's metadata. Here, the collected data are available with:
identifieris filled (see below), this identifier is also used to register the collected data under the file.
secretis necessary to build the URL to fetch the data from PooleApp.com
identifieris optional, it holds a property name. The plugin compares the value of this property in the file object and in the remote object and if they match, the remote object is added to the array available under the key (
filteris optional, it allows to filter the PooleApp entries. It uses the filtrex expression engine.
If you use the metalsmith-permalink plugin, the
identifier can set to
By doing that and by adding the
path in an hidden form field, the collected
data are directly available in the file object where the form was filled.