They are all Image fields.
// This is Blog Post API Custom Type
{
"Main": {
"title": {
"type": "Text",
"config": {
"label": "Title"
}
},
"slug": {
"type": "Text",
"config": {
"label": "slug"
}
},
"meta_title": {
"type": "Text",
"config": {
"label": "Meta Title"
}
},
"meta_description": {
"type": "Text",
"config": {
"label": "Meta Description"
}
},
"meta_keywords": {
"type": "Text",
"config": {
"label": "Meta Keywords"
}
},
"flag_page": {
"type": "Boolean",
"config": {
"placeholder_false": "include",
"placeholder_true": "exclude",
"default_value": false,
"label": "Flag Page"
}
},
"thumbnail": {
"type": "Image",
"config": {
"constraint": {},
"thumbnails": [],
"label": "Thumbnail"
}
},
"cover_image": {
"type": "Image",
"config": {
"constraint": {},
"thumbnails": [],
"label": "Cover Image"
}
},
"summary": {
"type": "Text",
"config": {
"label": "Summary"
}
},
"content": {
"type": "StructuredText",
"config": {
"multi": "paragraph,preformatted,heading1,heading2,heading3,heading4,heading5,heading6,strong,em,hyperlink,image,embed,list-item,o-list-item,rtl",
"label": "Content"
}
},
"category": {
"type": "Link",
"config": {
"select": "document",
"customtypes": ["blog_category"],
"label": "Category"
}
},
"featured": {
"type": "Boolean",
"config": {
"default_value": false,
"label": "Featured"
}
},
"trending": {
"type": "Boolean",
"config": {
"default_value": false,
"label": "Trending"
}
},
"date": {
"type": "Date",
"config": {
"label": "Date"
}
},
"banner": {
"type": "Boolean",
"config": {
"default_value": false,
"label": "Banner"
}
},
"homepage": {
"type": "Boolean",
"config": {
"default_value": false,
"label": "Homepage"
}
}
}
}
// gatsby-config.js
const path = require("path")
const linkResolver = require("./src/utils/linkResovler")
const siteUrl = `https://altrady.netlify.app/`
module.exports = {
/* Your site config here */
siteMetadata: {
title: `Trade Bitcoin`,
description: `Trade Bitcoin, Altcoins and Etherum with Altrady - All-In-One Multi-Exchange Cryptocurrency Trading Platform.Crypto Community Help. Crypto Trading Software Made Fast and Simple!`,
keywords: `altrady, bitcoin, website, crypto, trading, cryptocurrency, exchange, platform`,
siteUrl: siteUrl,
},
plugins: [
`gatsby-plugin-sass`,
`gatsby-plugin-react-helmet`,
{
resolve: "gatsby-source-prismic",
options: {
repositoryName: "altrady",
lang: "*",
schemas: {
exchanges: require("./custom_types/exchanges.json"),
features: require("./custom_types/features.json"),
partners: require("./custom_types/partners.json"),
blogPost: require("./custom_types/blog_post.json"),
blogCategory: require("./custom_types/blog_category.json"),
courseCategory: require("./custom_types/course_category.json"),
tutorial: require("./custom_types/tutorial.json"),
roadmap: require("./custom_types/roadmap.json"),
},
linkResolver: () => doc => linkResolver(doc),
},
},
{
resolve: "gatsby-plugin-sitemap",
options: {
query: `
{
allPrismicBlogPostApi {
nodes {
data {
slug
}
last_publication_date
}
}
allSitePage {
nodes {
path
context {
blogDetail {
data {
slug
flag_page
}
}
exchange {
data {
flag_page
}
}
course {
data {
flag_page
}
}
feature {
data {
flag_page
}
}
tutorial {
data {
flag_page
}
}
}
}
}
}
`,
output: `/`,
resolveSiteUrl: () => siteUrl,
resolvePages: ({
allPrismicBlogPostApi: { nodes: allBlogs },
allSitePage: { nodes: allPages },
}) => {
return allPages
.filter(
page =>
(page.context &&
page.context.blogDetail &&
page.context.blogDetail.data.flag_page !== true) ||
(page.context &&
page.context.exchange &&
page.context.exchange.data.flag_page !== true) ||
(page.context &&
page.context.feature &&
page.context.feature.data.flag_page !== true) ||
(page.context &&
page.context.course &&
page.context.course.data.flag_page !== true) ||
(page.context &&
page.context.tutorial &&
page.context.tutorial.data.flag_page !== true)
)
.map(page => {
let blog = allBlogs.filter(item => {
return page.path === "/blog/" + item.data.slug
})
if (blog.length > 0) return { ...page, ...blog[0] }
else
return {
...page,
last_publication_date: new Date(),
}
})
},
serialize: ({ path, last_publication_date }) => {
return {
url: path,
lastmod: last_publication_date,
}
},
},
},
{
resolve: "gatsby-plugin-google-tagmanager",
options: {
id: "GTM-N6R3CC2",
includeInDevelopment: false,
defaultDataLayer: { platform: "gatsby" },
enableWebVitalsTracking: true,
},
},
{
resolve: "gatsby-plugin-robots-txt",
options: {
host: "https://altrady.netlify.app/",
sitemap: "https://altrady.netlify.app/sitemap-0.xml",
policy: [{ userAgent: "*", allow: "/" }],
},
},
{
resolve: `gatsby-plugin-resolve-src`,
oprions: {
src: path.resolve(__dirname, "src"),
utils: path.resolve(__dirname, "utils"),
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: "Altrady",
short_name: "Altrady",
start_url: "/",
background_color: "#f7f0eb",
theme_color: "#a2466c",
display: "standalone",
icon: "src/assets/imgs/favicon.svg",
},
},
{
resolve: `gatsby-plugin-canonical-urls`,
options: {
siteUrl: `https://altrady.netlify.app/`,
stripQueryString: true,
},
},
{
resolve: `gatsby-plugin-sharp`,
options: {
defaults: {
formats: [`auto`, `webp`],
placeholder: `blurred`,
quality: 70,
breakpoints: [480, 750, 1080, 1366, 1920],
backgroundColor: `transparent`,
tracedSVGOptions: {},
blurredOptions: {},
jpgOptions: {},
pngOptions: {},
webpOptions: {},
avifOptions: {},
},
},
},
`gatsby-plugin-image`,
`gatsby-transformer-sharp`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `blogs`,
path: `${__dirname}/src/assets/imgs`,
},
},
],
}