@botonic/plugin-contentful
Version:
Botonic Plugin Contentful is one of the **[available](https://github.com/hubtype/botonic/tree/master/packages)** plugins for Botonic. **[Contentful](http://www.contentful.com)** is a CMS (Content Management System) which manages contents of a great variet
23 lines (19 loc) • 537 B
text/typescript
import { Entry } from 'contentful'
import * as cms from '../../cms'
import { ContentWithNameFields } from '../delivery-utils'
export class SearchableByKeywordsDelivery {
static fromEntry(
entry: Entry<SearchableByKeywordsFields>
): cms.SearchableByKeywords {
const fields = entry.fields
return new cms.SearchableByKeywords(
fields.name,
fields.keywords,
fields.priority
)
}
}
export interface SearchableByKeywordsFields extends ContentWithNameFields {
keywords: string[]
priority: number
}