gatsby-source-tilda
v3.0.2
Published
Gatsby source plugin for building websites using the tilda.cc CMS as a data source
Downloads
195
Maintainers
Readme
gatsby-source-tilda
Source plugin for pulling pages and and assets into Gatsby from tilda.cc project (API available for Bussiness Plan only).
Install
npm install --save gatsby-source-tilda
How to use
// In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: 'gatsby-source-tilda',
options: {
publicKey: process.env.TILDA_PUBLIC_KEY, # tilda API public key
secret: process.env.TILDA_SECRET_KEY, # tilda API secret key
projectId: process.env.TILDA_PROJECT_ID, # tilda project Id to sync
skip: true / false, # skip tilda sync
exclude: [], # pages to exclude e.g. ['faq', 'folder/subfolder/blog-post-url']
},
},
],
}
How to query
Query pages
{
allTildaPage {
nodes {
id
pageId
featureimg
date
projectid
published
alias
initScripts
title
descr
img
css {
from
to
}
js {
from
to
}
images {
from
to
}
html
}
}
}
Query for assets
{
allTildaAsset {
nodes {
from
to
localFile {
publicURL
}
}
}
}