Nickel Palladium Manganese
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

metalsmith-request

3.0.0 • Public • Published

Meatsmith Request

License version Build Status

Metalsmith plugin to grab content from the web and expose the results to metadata.

uses got under the hood to make HTTP calls.

Install

npm install metalsmith-request

API

Pass targets to the plugin with the use method:

const metalsmith = new Metalsmith(__dirname)
  .use(request({
    foo: 'http://domain.com/foo'
  }))

You can also pass options as the second argument to use with the got module

const metalsmith = new Metalsmith(__dirname)
  .use(request(
    {
      foo: 'http://domain.com/foo.json'
    },
    {
      json: true
    }
  ))

CLI

You can also use the plugin with the Metalsmith CLI by adding a key to your metalsmith.json file:

{
  "plugins": {
    "metalsmith-request": {
      "foo": "http://domain.com/foo.json"
    }
  }
}

Author: Ahmad Nassri • Github: @ahmadnassri • Twitter: @AhmadNassri

install

npm i metalsmith-request

Downloadsweekly downloads

1

version

3.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability