0.2.0-dev.3 • Published 6 years ago
gatsby-source-sylius-rest v0.2.0-dev.3
gatsby-source-sylius-rest helps you source the data from Sylius e-Commerce framework.
Installation
// TODOSample configuration
You should add plugin configuration to your gatsby-config.js:
module.exports = {
plugins: [
// plugins
{
resolve: 'gatsby-source-sylius-rest',
options: {
locales: ['en', 'de'],
url: 'https://your-sylius-shop.com/shop-api',
pages: [
{
component: require.resolve('./src/templates/SyliusTaxonPage.tsx'),
type: 'taxon',
},
{
component: require.resolve('./src/templates/SyliusProductPage.tsx'),
type: 'product',
path: {
de: '/:locale/produkt/:slug',
en: '/:locale/product/:slug',
},
},
],
},
},
],
};Options
Plugin options
Please check SyliusSourcePluginOptionsInterface definition for TypeScript interface.
debug: boolean- Provides additional messages during build.locales: string[]- List of supported locales. They are required for retrieving data from Sylius API, sourcing GraphQL nodes and link building.pages: SyliusSourcePluginPageDefinition[]- Definitions of pages which should be created using Gatsby Node API (createPages). If empty,gatsby-source-sylius-restwill not create pages.url: string- URL to the Sylius shop API.
Pages definitions options
Please check SyliusSourcePluginPageDefinition definition for TypeScript interface.
component: string- Path to the component in your project.path?: SyliusSourcePluginPagePath- Path of page which will be created. It can be either string or object with locales as keys to retrieve localized path.type: SyliusSourcePluginPagesType- Type of page -taxonorproduct.
0.5.1
5 years ago
0.5.0
5 years ago
0.4.0
5 years ago
0.4.0-dev.4
5 years ago
0.4.0-dev.3
5 years ago
0.4.0-dev.2
5 years ago
0.4.0-dev.1
5 years ago
0.3.0
5 years ago
0.3.1
5 years ago
0.3.0-dev.0
6 years ago
0.2.3
6 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.2.0-dev.3
6 years ago
0.2.0-dev.2
6 years ago
0.2.0-dev.1
6 years ago
0.2.0-dev.0
6 years ago
0.1.6
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.5
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago