@seidhr/sanity-plugin-muna-schemas
Version:
Muna or ᛗᚢᚾᚨ means remember in norse. Muna is a schema for the Sanity Studio that enables detailed descriptions of cultural heritage objects and knowledge about their contexts as well as pages about them (or anything else really.)
59 lines (56 loc) • 1.52 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _default = {
name: 'OpenGraph',
type: 'object',
title: 'Open Graph',
fields: [{
name: 'label',
title: 'Tittel',
titleEN: 'Title',
description: 'Advarsel! Dette vil overstyre sidens tittel.',
descriptionEN: 'Heads up! This will override the page title.',
type: 'string',
validation: Rule => Rule.max(60).warning('Should be under 60 characters')
}, {
name: 'description',
title: 'Beskrivelse',
titleEN: 'Description',
type: 'text',
validation: Rule => Rule.max(155).warning('Should be under 155 characters')
}, {
name: 'image',
title: 'Bilde',
titleEN: 'Image',
description: 'Facebook anbefaler 1200x630 (størrelsen blir endret automatisk)',
descriptionEN: 'Facebook recommends 1200x630 (will be auto resized)',
type: 'DigitalObjectImage',
options: {
semanticSanity: {
'@type': '@json'
}
}
}],
preview: {
select: {
title: 'label',
route: 'route.slug.current',
link: 'link'
},
prepare(_ref) {
var title = _ref.title,
route = _ref.route,
link = _ref.link;
return {
title,
// eslint-disable-next-line no-nested-ternary
subtitle: route ? "Route: /".concat(route, "/") : link ? "External link: ".concat(link) : 'Not set'
};
}
}
};
exports.default = _default;
//# sourceMappingURL=OpenGraph.js.map