0.1.5 • Published 6 years ago
scully-plugin-contentful v0.1.5
scully-plugin-contentful
contentful plugin for scully
Getting Started
# install in your existing scully project
npm i -S scully-plugin-contentful/**
 * scully.scully-example-contentful.config.js
 */
require('scully-plugin-contentful');
require('dotenv').config();
exports.config = {
  projectRoot: './src',
  projectName: 'scully-example-contentful',
  outDir: './dist/static',
  routes: {
    '/article/:articleId': {
      type: 'contentful',
      config: {
        spaceId: process.env.SPACE_ID,
        accessToken: process.env.ACCESS_TOKEN,
        contentType: 'article',
      }
    },
  }
};Configuration
Required
| Name | Type | Description |
|---|---|---|
| spaceId | string | your contentful space id |
| accessToken | string | your contentful access token (note: this can be either production or preview key) |
| contentType | string | the contentful content type id |
Optional
| Name | Type | Description |
|---|---|---|
| host | string | contentful host URL. To use Preview API use 'preview.contentful.com' |
| environment | string | your contentful environment |
Community Support
Scully on GitHub
Scully on Gitter
Upstate Interactive on Twitter