Package Exports
- gatsby-source-subsocial
- gatsby-source-subsocial/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gatsby-source-subsocial) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
How to use in gatsby
Step1: Create a gatsby project or use in a template
You can use the plugin in a template or new project, only must be a gatsby project.
Step1: Setup gatsby-config.js
Setup the file with these params:
- substrateNodeUrl: subsocial websocket
- ipfsNodeUrl : ipfs url
- recommendedSpaceIds : Array of spaces you want to show
- addressAccount : posts from address you want to show
For example
{
resolve: `gatsby-source-subsocial`,
options: {
substrateNodeUrl: `wss://para.f3joule.space`,
ipfsNodeUrl: `https://crustwebsites.net`,
spaceIds: ["10497"],
addressAccount: "3qrRD1nbHj5u8cRsJBd1mEm9JGM9jwfzKGQgQwx1vvuigZub",
},
},
Step2: GraphQl requests in components
You have to build your query and make graphql requests according your render requirements
For example:
...
export const query = graphql`
query {
allSpacesSubsocial {
edges {
node {
id
content {
name
tags
about
email
image
links
summary
isShowMore
}
}
}
}
}
`
Step3: Render your data
According query, render the posts