1.1.0 • Published 3 years ago

gatsby-source-lbry v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Gatsby LBRY source

This is a source plugin for Gatsby that uses LBRY to get your posts.

It downloads all markdown posts in a channel.

Usage

LBRY

Make sure you have the LBRY daemon running on port 5279.

Gatsby config

npm install gatsby-source-lbry

Add to your gatsby-config.js, setting @your-channel-name to your actual channel name

module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-lbry`,
      options: {
        channel: `@your-channel-name`,
      },
    },
  ]
}

You may also need to add this to onCreateNode() in your project's gatsby-node.js to make it play nice with themes that expect a slug

if (node.internal.type === `MarkdownRemark` && node.parent) {
    const parent = getNode(node.parent)
    if (parent.internal.type === "LbryPost") {
        createNodeField({ name: `slug`, node: node, value: `/` + parent.name })
        return
    }
}
1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago