metalsmith-firebase
Load firebase data into metalsmith.
Installation
$ npm install metalsmith-firebase --save
Usage
CLI
Add metalsmith-firebase
to your metalsmith.json
plugins and specify your firebase options:
JS
Pass options
to the firebase plugin and pass it to Metalsmith with the use
method:
; metalsmith;
You can specify options to merge data into files. By including "collections", you can specify the references that will be used to create pages from a _key
property. For example, if I have _key: posts/2016-09-05-metalsmith-firebase
, a file will be created with that _key
, the property will be removed, and all the data will be assigned to that object, including contents which will be transformed to a buffer for other metalsmith plugins.
Access the data on the firebase
object within the template file.