1.0.1 • Published 6 years ago
gridsome-source-starwars v1.0.1
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-starwarsnpm install gridsome-source-starwarsHow 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/
}
}
],
}