🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

contentful-blog-importer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contentful-blog-importer

Generic data importer for blogs on Contentful

1.1.0
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

contentful-blog-importer

Generic data importer for blogs on Contentful.

Usage

import ContentfulBlogImporter from 'contentful-blog-importer';

new ContentfulBlogImporter(spaceId, cmaToken, options).run(data);

Options

| Name | Description                                 | Default            | Example                                |
|------|---------------------------------------------|--------------------|----------------------------------------|
| host | The host you want to run the import against | api.contentful.com | { host: 'my-test-stub.localhost.com' } |

Data format

let data = {
  authors: [
    {
      name: 'John Doe',
      slug: 'john-doe', // Falls back to an auto-generated slug based on the name.
      email: 'john@doe.com',
      image: 'TBD.jpg'
    }
  ],

  tags: [
    {
      name: 'General',
      slug: 'general'  // Falls back to an auto-generated slug based on the name.
    }
  ],

  posts: [
    {
      title: 'A generic data importer for blogs',
      slug: 'a-generic-data-importer-for-blogs',
      body: '**Various** information about the *importer*',
      publishedAt: '2014-08-19T22:00:00+02:00',
      metaTitle: 'Title for contentful-blog-importer post',
      metaDescription: 'Description for contentful-blog-importer post',
      author: 'slug-of-an-author',
      tags: [ 'slug-of-a-tag', 'slug-of-another-tag' ]
    }
  ]
};

Keywords

contentful

FAQs

Package last updated on 01 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts