Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
import metadataAttributes from "../_metadataAttributes";
const Blog = Scrivito.provideObjClass("Blog", {
attributes: {
title: "string",
navigationBackgroundImage: ["reference", { only: ["Image"] }],
body: ["widgetlist", { only: "SectionWidget" }],
...metadataAttributes,
},
});
registerTextExtract("Blog", [{ attribute: "body", type: "widgetlist" }]);
export default Blog;
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
import metadataAttributes from "../_metadataAttributes";
const Event = Scrivito.provideObjClass("Event", {
attributes: {
body: ["widgetlist", { only: "SectionWidget" }],
date: "date",
image: ["reference", { only: ["Image"] }],
locationName: "string",
locationStreetAddress: "string",
locationLocality: "string",
locationPostalCode: "string",
locationRegion: "string",
locationCountry: "string",
title: "string",
tags: "stringlist",
...metadataAttributes,
},
});
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
const Download = Scrivito.provideObjClass("Download", {
attributes: {
blob: "binary",
tags: "stringlist",
title: "string",
},
});
registerTextExtract("Download", [{ attribute: "text", type: "metadata" }]);
export default Download;
import * as Scrivito from "scrivito";
import metadataAttributes from "../_metadataAttributes";
const SearchResults = Scrivito.provideObjClass("SearchResults", {
attributes: {
title: "string",
navigationBackgroundImage: ["reference", { only: ["Image"] }],
...metadataAttributes,
},
});
export default SearchResults;
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
import metadataAttributes from "../_metadataAttributes";
import defaultPageAttributes from "../_defaultPageAttributes";
const Page = Scrivito.provideObjClass("Page", {
attributes: {
...defaultPageAttributes,
childOrder: "referencelist",
...metadataAttributes,
},
});
registerTextExtract("Page", [
{ attribute: "navigationSection", type: "widgetlist" },
{ attribute: "body", type: "widgetlist" },
]);
export default Page;
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
import metadataAttributes from "../_metadataAttributes";
const BlogPost = Scrivito.provideObjClass("BlogPost", {
attributes: {
author: ["reference", { only: "Author" }],
body: ["widgetlist", { only: "SectionWidget" }],
publishedAt: "date",
subtitle: "string",
tags: "stringlist",
title: "string",
titleImage: ["reference", { only: ["Image"] }],
...metadataAttributes,
},
});
registerTextExtract("BlogPost", [{ attribute: "body", type: "widgetlist" }]);
export default BlogPost;
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
import defaultPageAttributes from "../_defaultPageAttributes";
import metadataAttributes from "../_metadataAttributes";
const Homepage = Scrivito.provideObjClass("Homepage", {
attributes: {
...defaultPageAttributes,
showAsLandingPage: ["enum", { values: ["yes", "no"] }],
cookieConsentLink: "link",
childOrder: "referencelist",
footer: ["widgetlist", { only: "SectionWidget" }],
logoDark: ["reference", { only: ["Image"] }],
logoWhite: ["reference", { only: ["Image"] }],
dividerLogo: ["reference", { only: ["Image"] }],
facebookAppId: "string",
twitterSite: "string",
googleMapsApiKey: "string",
googleAnalyticsTrackingId: "string",
intercomAppId: "string",
...metadataAttributes,
},
import * as Scrivito from "scrivito";
const Video = Scrivito.provideObjClass("Video", {
attributes: {
blob: "binary",
tags: "stringlist",
},
});
export default Video;
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
import metadataAttributes from "../_metadataAttributes";
const Job = Scrivito.provideObjClass("Job", {
attributes: {
body: ["widgetlist", { only: "SectionWidget" }],
image: ["reference", { only: ["Image"] }],
title: "string",
datePosted: "date",
validThrough: "date",
hiringOrganizationName: "string",
hiringOrganizationWebsite: "string",
locationStreetAddress: "string",
locationLocality: "string",
locationRegion: "string",
locationPostalCode: "string",
locationCountry: "string",
import * as Scrivito from "scrivito";
const Redirect = Scrivito.provideObjClass("Redirect", {
attributes: {
title: "string",
link: "link",
},
});
export default Redirect;