Subsocial Ghost/Gatsby
https://github.com/huascarmm/subsocial-gatsby
This is a plugin to get data from sub social and implement in gatsby and ghost
Huáscar Miranda. - [email protected] - https://github.com/huascarmm
Subsocial Plugin for Ghost/Gatsby
Need of a plugin for gatsby/ghost to get data
Setup the file with these params:
- substrateNodeUrl: subsocial websocket
- ipfsNodeUrl : ipfs url
- recommendedSpaceIds : Array of spaces
- addressAccount : subsocial address
For example
{
resolve: `gatsby-source-subsocial`,
options: {
phraseSecret: 'hello world',
substrateNodeUrl: `wss://para.subsocial.network`,
ipfsNodeUrl: `https://app.subsocial.network/ipfs`,
recommendedSpaceIds: ["1", "1001", "1002", "10316"],
addressAccount: "3sD7b8HxT2rg8SNhgZZcgG3bSffVLq5drAvDqDfM8CJ6SU6x"
},
},
You have to build your query and make graphql requests according your software arquitecture
For example:
...
export const query = graphql`
query {
allSpacesSubsocial {
edges {
node {
id
content {
name
tags
about
email
image
links
summary
isShowMore
}
}
}
}
}
`
Setup Ghost credentials in gatsby-config.js
- apiUrl : your ghost page url
- contentApiKey : apikey generated from ghost
- version : by default
v5.0
For example:
{
apiUrl: `https://subsocial.ghost.io`,
contentApiKey: `xxxxxxxxxx`,
version: `v5.0`
}
We are implementing a plugin in npm for gatsby. Using javascript, react, gatsby.
Link NPM: https://www.npmjs.com/package/gatsby-source-subsocial