Describe the bug
I’m currently building a site with netlify cms and gatsby. I’m using gastby-plugin-netlify-cms@5.11.0 and netlify-cms-app@2.15.38.
However when I’m trying to register a preview template it is ignored. I’m developing as close to gatsby-starter-netlify-cms as possible, because it was working there.
This is my cms.js file:
import CMS from 'netlify-cms-app'
import uploadcare from 'netlify-cms-media-library-uploadcare'
import cloudinary from 'netlify-cms-media-library-cloudinary'
import JammerfastenDayPagePreview from "./preview-templates/JammerfastenDayPagePreview";
import OptInPagePreview from "./preview-templates/OptInPagePreview";
import SharingPagePreview from "./preview-templates/SharingPagePreview";
import ThankYouPagePreview from "./preview-templates/ThankYouPagePreview";
import UpsellPagePreview from "./preview-templates/UpsellPagePreview";
import VideoPagePreview from "./preview-templates/VideoPagePreview";
import BlogPostPreview from './preview-templates/BlogPostPreview'
// import { de } from "netlify-cms-locales";
CMS.registerMediaLibrary(uploadcare)
CMS.registerMediaLibrary(cloudinary)
// CMS.registerLocale("de", de);
CMS.registerPreviewTemplate("dayPages", JammerfastenDayPagePreview);
CMS.registerPreviewTemplate("optInPages", OptInPagePreview);
CMS.registerPreviewTemplate("sharingPages", SharingPagePreview);
CMS.registerPreviewTemplate("thankYouPages", ThankYouPagePreview);
CMS.registerPreviewTemplate("upsellPages", UpsellPagePreview);
CMS.registerPreviewTemplate("videoPages", VideoPagePreview);
CMS.registerPreviewTemplate('blog', BlogPostPreview)
This is one of the preview files. (the console.logs are not shown in the console thats why im thinking the preview templates aren’t registered):
Describe the bug I’m currently building a site with netlify cms and gatsby. I’m using gastby-plugin-netlify-cms@5.11.0 and netlify-cms-app@2.15.38.
However when I’m trying to register a preview template it is ignored. I’m developing as close to gatsby-starter-netlify-cms as possible, because it was working there.
This is my cms.js file:
This is one of the preview files. (the console.logs are not shown in the console thats why im thinking the preview templates aren’t registered):
this is the corresponding template file:
My preview template names are exactly as they are in the config.yml file.
I’m pretty much out of ideas where the error could be so I’d appreciate any input.
Thank you in advance.
To Reproduce You can use the code above plus the config.yml below to reproduce the issue.
Expected behavior The preview template is registered correctly
Applicable Versions:
CMS configuration