gatsby-source-tilda
Version:
Gatsby source plugin for building websites using the tilda.cc CMS as a data source
39 lines (38 loc) • 1.16 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSchemaCustomization = exports.sourceNodes = void 0;
var source_nodes_1 = require("./source-nodes");
Object.defineProperty(exports, "sourceNodes", { enumerable: true, get: function () { return source_nodes_1.sourceNodes; } });
const createSchemaCustomization = ({ actions }) => {
const { createTypes } = actions;
createTypes(`
type TildaPageAsset {
from: String,
to: String
}
type TildaAsset implements Node {
from: String,
to: String,
pageId: String,
localFile: File @link(from: "fields.localFile")
}
type TildaPage implements Node {
alias: String,
pageId: String,
featureimg: String!,
descr: String!,
date: Date,
export_imgpath: String,
projectid: String,
published: String,
title: String,
img: String,
filename: String,
html: String,
initScripts: [String],
js: [TildaPageAsset],
css: [TildaPageAsset],
images: [TildaPageAsset]
}`);
};
exports.createSchemaCustomization = createSchemaCustomization;