1.0.1 • Published 5 years ago

gridsome-source-starwars v1.0.1

Weekly downloads
3
License
-
Repository
gitlab
Last release
5 years ago

gridsome-source-starwars

Fetches and exposes Starwars data for creating example applications

Install

Install by using your favorite package manager to install the package

yarn add gridsome-source-starwars
npm install gridsome-source-starwars

How to use

Add the package to the plugin array in your gridsome.config.js file

module.exports = {
  siteName: 'My site',
  plugins: [
    {
      use: 'gridsome-starwars-source'
    }
  ],
}

Options

You can change the prefix of the data types by using the typeName option, and if you selfhost the Starwars API you can also change the endpoint by setting the endpoint option.

module.exports = {
  siteName: 'My site',
  plugins: [
    {
      use: 'gridsome-starwars-source',
      options: {
        typeName: 'SW', // Default: Starwars
        endpoint: 'https://localhost:3000' // Default: https://swapi.co/api/
      }       
    }
  ],
}
1.0.1

5 years ago

1.0.0

5 years ago