2.2.1 • Published 9 years ago

ft-n-content-model v2.2.1

Weekly downloads
69
License
-
Repository
-
Last release
9 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

9 years ago

2.2.0

9 years ago

2.1.2

9 years ago

2.1.1

9 years ago

2.1.0

9 years ago

2.0.9

9 years ago

2.0.8

9 years ago

2.0.7

10 years ago

2.0.6

10 years ago

2.0.5

10 years ago

2.0.4

10 years ago

2.0.3

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.0.1

10 years ago