Socket
Book a DemoInstallSign in
Socket

@letterdropcom/gatsby-source-letterdrop

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@letterdropcom/gatsby-source-letterdrop

Gatsby source plugin for building websites using Letterdrop as a data source

1.0.26
latest
npmnpm
Version published
Maintainers
2
Created
Source

Letterdrop Gatsby

Letterdrop Gatsby Source Plugin

Source plugin for sourcing data from Letterdrop Posts data.


Install

npm i @letterdropcom/gatsby-source-letterdrop


How to use

The plugin requires your publication api-key from Letterdrop. Check here to know how to generate and use an API key.

Once you got your api-key use the following configuration in your Gatsby Site.

# In your gatsby-config.js
plugins: [
    {
        resolve: "@letterdropcom/gatsby-source-letterdrop",
        options: {
            apikey: "<your-api-key>",
            version: "v1" # default version
        }
    }
]

How to query

Upon querying the plugin, it return a single / list of Post nodes. Check the response for the full set of fields made available from Letterdrop Get Post API

Example post query

{
  allLetterdropPosts {
    nodes {
      url
      title
      ...
      coverImage {
        url
        extension
        ...
      }
      publication {
        customDomain {
          domain
          ...
        }
        _id
        domain
      }
      postAuthor {
        _id
        name
      }
    }
  }
}

Example post query with filter

Assume you need to query post url adapt-your-writing from allLetterdropPosts, specify the filter like below

{
  allLetterdropPosts(filter: {url: {eq: "adapt-your-writing"}}) {
    nodes {
      url
      title
      ...
      coverImage {
        url
        extension
        ...
      }
      publication {
        customDomain {
          domain
          ...
        }
        _id
        domain
      }
      postAuthor {
        _id
        name
      }
    }
  }
}



Copyright © 2021 Letterdrop

Keywords

gatsby

FAQs

Package last updated on 02 Sep 2021

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.