2.2.1 • Published 8 years ago

ft-n-content-model v2.2.1

Weekly downloads
69
License
-
Repository
-
Last release
8 years ago

Coverage Status

#n-content-model

#v2

Transforms content sourced either directly from the next Elastic Search cluster, or via the next-graphql-api, into summarised form for use in rendering content cards.

##Options supported;

###Use cases;

useCase: 'article-card' compatible with n-section card usage

useCase: 'stream-list-card' used for card in stream list on stream page.

###Excluded Taxonomies

excludeTaxonomies: true prevents specific taxonomies (organisations, regions, people) from appearing in the tag that is returned.

##Example usage

###With an array of content items

const contentModel = require('ft-n-content-model');

const transformedContentArray = contentArray.map(content => {
  contentModel(content, {options});
});

##Key changes from v1

  • no-image variant for article card not supported - recommend either remove image from content or don't provide image options when configuring content for n-section

#v1

Transforms content from Elastic Search into summarised form for specified use-cases.

Use cases supported;

article-card : compatible with n-section usage

article-card-no-image : as article card, but with main image removed

stream-list-card : used for card in stream list on stream page.

Example usage

With an array of content items

const contentModel = require('ft-n-content-model');

const transformedContentArray = contentArray.map(content => {
  contentModel(content, 'use-case');
});
2.2.1

8 years ago

2.2.0

8 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.9

8 years ago

2.0.8

8 years ago

2.0.7

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.0.1

8 years ago