Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-source-ghost

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-source-ghost

Source plugin for pulling data into Gatsby from Ghost

  • 1.1.0
  • npm
  • Socket score

Version published
Weekly downloads
313
decreased by-74.94%
Maintainers
1
Weekly downloads
 
Created
Source

gatsby-source-ghost

Source plugin for pulling data into Gatsby from Ghost.

Install

yarn add gatsby-source-ghost or npm i --save gatsby-source-ghost

Usage

// In your gatsby-config.js
plugins: [
  {
    resolve: 'gatsby-source-ghost'
    options: {
      url: 'http://localhost:2368', // Required. URL to the Ghost instance, including the protocol
      clientId: 'ghost-frontend', // Optional, defaults to 'ghost-frontend'
      clientSecret: 'secret123', // Required, see Ghost API docs for where to find that value
      posts: {
        component: require('path').resolve('./src/pages/blog/post.js'), // Optional, if not set no post pages will be generated
        path: 'blog' // Optional, specifies the URL prefix for the blog posts. Defaults to 'blog'
      }
    }
  }
]

Querying data

You can query nodes created from Wordpress using GraphQL like the following: Note: Learn to use the GraphQL tool and Ctrl+Spacebar at <ghostUrl/___graphiql> to discover the types and properties of your GraphQL model.

Query posts

{
  allGhostBlogPost {
    edges {
      node {
        id
        uuid
        title
        slug
        mobiledoc
        html
        plaintext
        amp
        feature_image
        featured
        page
        status
        locale
        visibility
        meta_title
        meta_description
        author_id
        created_at
        created_by
        updated_at
        updated_by
        published_at
        published_by
        custom_excerpt
        codeinjection_head
        codeinjection_foot
        og_image
        og_title
        og_description
        twitter_image
        twitter_title
        twitter_description
        authors {
          id
          name
          slug
          profile_image
          cover_image
          bio
          website
          location
          facebook
          twitter
          accessibility
          locale
          visibility
          meta_title
          meta_description
          tour
        }
        tags {
          id
          name
          slug
          description
          feature_image
          visibility
          meta_title
          meta_description
          created_at
          created_by
          updated_at
          updated_by
          parent
        }
      }
    }
  }
}

Contributing

Issues and PRs are welcome :)

Keywords

FAQs

Package last updated on 12 Aug 2018

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc