Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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

About

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

Topics

Resources

License

Packages

No packages published
You can’t perform that action at this time.