New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

metalsmith-firebase

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-firebase

Load firebase data into metalsmith.

  • 0.6.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

metalsmith-firebase npm Travis Codecov

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:

{
  "plugins": {
    "metalsmith-firebase": {
      "url": "https://myfirebase.firebaseio.com",
      "options": {
        "collections": [
          "pages",
          "posts"
        ]
      }
    }
  }
}
JS

Pass options to the firebase plugin and pass it to Metalsmith with the use method:

import firebase from 'metalsmith-firebase';

metalsmith.use(firebase({
  url: 'https://myfirebase.firebaseio.com',
  options: {
    collections: [
      "pages",
      "posts"
    ]
  }
}));

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.

License

MIT

FAQs

Package last updated on 03 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc