4.0.3 • Published 1 year ago

metalsmith-request v4.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
1 year ago

Metalsmith Request

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

license release semantic

uses got under the hood to make HTTP calls.

Install

npm install metalsmith-request

API

Pass targets to the plugin with the use method:

metalsmith.use(request({ target: 'http://domain.com/foo' }))

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

const targets = { 
  foo: 'http://domain.com/foo.json'
}

const options = {
  responseType: true
}

metalsmith.use(request(targets, options))

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  Twitter: @AhmadNassri

4.0.3

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago

4.0.2

1 year ago

3.0.0

6 years ago

2.0.0

7 years ago

1.0.0

9 years ago