gatsby-source-blogger-posts

0.0.1 • Public • Published

gatsby-source-blogger-posts

A Gatsby source plugin that fetches blogposts from Blogger.

Basic usage

// In your gatsby-config.js
plugins: [
  {
    resolve: 'gatsby-source-blogger-posts',
    options: {
      apiKey: "YOUR-API-KEY",
      blogId: "BLOG-ID"
      maxResults: 10, // Maximum number of blogposts
      downloadImages: false, // Whether images are downloaded or not
      nodeType: "BlogPost" // name of node 
    }
  }
  //...
]

Then you can query blogposts as

query MyQuery {
  allBlogPost {
    nodes {
      html # Clean html with tables/images removed
      images 
      imageUrls {
        src # source to external images
      }
      rawHtml # original html
      title
      updated
      # and more...
    }
  }
}

License

MIT License, Copyright (c) 2023 Bas Cornelissen

Package Sidebar

Install

npm i gatsby-source-blogger-posts

Weekly Downloads

3

Version

0.0.1

License

MIT

Unpacked Size

7.32 kB

Total Files

7

Last publish

Collaborators

  • bacor