https://github.com/LeadCMS/gatsby.source.leadcms
Seamlessly pull AI-powered LeadCMS content into your Gatsby site in seconds.
https://github.com/LeadCMS/gatsby.source.leadcms
Last synced: 12 months ago
JSON representation
Seamlessly pull AI-powered LeadCMS content into your Gatsby site in seconds.
- Host: GitHub
- URL: https://github.com/LeadCMS/gatsby.source.leadcms
- Owner: LeadCMS
- License: mit
- Created: 2023-01-17T18:42:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-24T04:53:36.000Z (over 1 year ago)
- Last Synced: 2025-07-13T21:45:53.128Z (12 months ago)
- Language: JavaScript
- Homepage: https://leadcms.ai
- Size: 185 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gatsby-source-onlinesales
Downloads posts data from [OnlineSales backend](https://github.com/peterliapin/onlinesales.core) And saves them to be processed later with `gatsby-transformer-remark`
Thils plugin will create gatsby nodes with types:
- OnlineSalesPost - for entities with type "post"
- OnlineSalesPage - for entities with other types
- OnlineSalesImage - file node for an image extracted from entity markdown body
and additional attribues:
- id
- slug
- language
- images
Attributes can be used in page template filename:
blog/
{OnlineSalesPost.slug}.tsx
# Install
npm install gatsby-source-onlinesales
# How to setup
{
resolve: "gatsby-source-onlinesales",
options: {
prepareUrl: (url) => (url.startsWith("http") ? url : "${process.env.GATSBY_URL}${url}"),
url: "${process.env.GATSBY_API_POSTS}",
},
},
# Options
`postUrl` : url to query posts for example: `https://onlinesales.test/api/posts`
`prepareUrl`: method to process images link with
# Supported versions
| | ASCII |
| -------- | ----------- |
| Gatsby 5 | `Unknown` |
| Gatsby 4 | `Supported` |
| Gatsby 3 | `Unknown` |