Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
});
CMS.registerPreviewStyle(sheets.toString(), { raw: true });
}
render() {
// Wraps the input component in a container, without mutating it. Good!
return <template>;
}
}
return withRoot(StyledTemplate);
}
CMS.registerPreviewStyle(globalStyles);
CMS.registerPreviewTemplate('home', withPreviewStyles(HomePagePreview));
CMS.registerPreviewTemplate('about', withPreviewStyles(AboutPagePreview));
CMS.registerPreviewTemplate('blog', withPreviewStyles(BlogPostPreview));
</template>
import CMS from "netlify-cms"
import HomePagePreview from "./preview-templates/HomePagePreview"
import AboutPagePreview from "./preview-templates/AboutPagePreview"
import BlogPagePreview from "./preview-templates/BlogPagePreview"
CMS.registerPreviewTemplate("index-en", HomePagePreview)
CMS.registerPreviewTemplate("index-cn", HomePagePreview)
CMS.registerPreviewTemplate("about-en", AboutPagePreview)
CMS.registerPreviewTemplate("about-cn", AboutPagePreview)
CMS.registerPreviewTemplate("blog-en", BlogPagePreview)
CMS.registerPreviewTemplate("blog-cn", BlogPagePreview)
import React from 'react'
import CMS from 'netlify-cms'
import './cms-utils'
import { HomePageTemplate } from '../templates/HomePage'
import { AboutPageTemplate } from '../templates/AboutPage'
import { ContactPageTemplate } from '../templates/ContactPage'
import { DefaultPageTemplate } from '../templates/DefaultPage'
import { BlogIndexTemplate } from '../templates/BlogIndex'
import { SinglePostTemplate } from '../templates/SinglePost'
CMS.registerPreviewStyle('/styles.css')
CMS.registerPreviewTemplate('home-page', ({ entry }) => (
))
CMS.registerPreviewTemplate('about-page', ({ entry }) => (
))
CMS.registerPreviewTemplate('contact-page', ({ entry }) => (
))
CMS.registerPreviewTemplate('infoPages', ({ entry }) => (
))
CMS.registerPreviewTemplate('blog-page', ({ entry }) => (
))
CMS.registerPreviewTemplate('posts', ({ entry }) => (
// register editor components
CMS.registerEditorComponent(Code);
CMS.registerEditorComponent(Audio);
CMS.registerEditorComponent(Video);
CMS.registerEditorComponent(Image);
CMS.registerEditorComponent(Reveal);
CMS.registerEditorComponent(Calout);
CMS.registerEditorComponent(Divider);
CMS.registerEditorComponent(Gallery);
CMS.registerEditorComponent(Reference);
CMS.registerEditorComponent(Countdown);
CMS.registerEditorComponent(SectionHeading);
// register previews
CMS.registerPreviewTemplate('posts', PostsPreview);
);
const NotificationPreview = ({ entry }) =>
entry
.getIn(['data', 'notifications'])
.filter(notif => notif.get('published'))
.map((notif, idx) => (
{notif.get('message')}
));
CMS.registerPreviewTemplate('blog', withHighlight(BlogPostPreview));
CMS.registerPreviewTemplate('docs', withHighlight(DocsPreview));
CMS.registerPreviewTemplate('widget_docs', withHighlight(WidgetDocPreview));
CMS.registerPreviewTemplate('releases', ReleasePreview);
CMS.registerPreviewTemplate('notifications', NotificationPreview);
CMS.registerPreviewTemplate('community', CommunityPreview);
const NotificationPreview = ({ entry }) =>
entry
.getIn(['data', 'notifications'])
.filter(notif => notif.get('published'))
.map((notif, idx) => (
{notif.get('message')}
));
CMS.registerPreviewTemplate('blog', withHighlight(BlogPostPreview));
CMS.registerPreviewTemplate('docs', withHighlight(DocsPreview));
CMS.registerPreviewTemplate('widget_docs', withHighlight(WidgetDocPreview));
CMS.registerPreviewTemplate('releases', ReleasePreview);
CMS.registerPreviewTemplate('notifications', NotificationPreview);
CMS.registerPreviewTemplate('community', CommunityPreview);
import CMS from 'netlify-cms'
import IndexPagePreview from './preview-templates/IndexPagePreview'
import AboutPagePreview from './preview-templates/AboutPagePreview'
import BlogPostPreview from './preview-templates/BlogPostPreview'
import ExperiencePagePreview from './preview-templates/ExperiencePagePreview'
CMS.registerPreviewTemplate('homepage', IndexPagePreview)
CMS.registerPreviewTemplate('about', AboutPagePreview)
CMS.registerPreviewTemplate('experience', ExperiencePagePreview)
CMS.registerPreviewTemplate('blog', BlogPostPreview)