0.0.1 • Published 1 year ago

gatsby-source-blogger-posts v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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