@financial-times/n-syndication

9.0.2 • Public • Published

n-syndication CircleCI

Troubleshooting

All troubleshooting information is gathered in the Syndication API Troubleshooting runbook.

What is n-syndication and how does it work

A client side library that displays icons next to headlines allowing syndication customers to download or save content for republishing.

See getting started on the authentication wiki page if you need to be added as a syndication subscriber.

You can develop with n-syndication without installing all of syndication. See instructions for local development and developing with a Next app.

If your app is failing locally as if you need the syndication API installed locally, you probably have some syndication port details in next-router's .env variables. Removing them should get the app to call the live production syndication API instead.

More information about the syndication system

Local Development

$ git clone git@github.com:Financial-Times/n-syndication.git
$ cd n-syndication
$ npm install

Run the (incomplete) test suite with

$ npm test

Verify that the Sass can compile by running

$ npx sass ./test/main.scss --load-path=./node_modules

And by running:

$ npx sass ./test/main.scss --load-path=./node_modules --load-path=./node_modules/@financial-times

Developing with a next app

Instruction for developing the library within a next app will be are in development (ACC-1156).

Deployment

Create a release tag in Github following the Semver convention and prefixing the release number with v. This will make this available as a NPM package at that version.

If you are wanting to deploy to FT.com, after creating the tag you will need to coordinate the release for these repos. You should create a pull request updating the package version in the repo's package.json.

This is just some javascript - is there other code elsewhere?

Yep - These links will probably be wrong pretty soon but will hopefully point you in the right direction:

n-teaser - https://github.com/Financial-Times/n-teaser/blob/main/src/presenters/teaser-presenter.js#L77 Here we add an additional modifier if syndication is available on this article

next-article - https://github.com/Financial-Times/next-article/blob/main/views/content.html#L20 Here a data attribute is added containing the syndication status of the article.

generic - add the following data attributes to your markup:

  • data-syndicatable-uuid – the uuid of the content to syndicate
  • data-syndicatable-title – the title of the content to syndicate
  • data-syndicatableyes / no / verify
  • data-syndicatable-target – the element to insert the syndication flag

Readme

Keywords

none

Package Sidebar

Install

npm i @financial-times/n-syndication

Weekly Downloads

90

Version

9.0.2

License

none

Unpacked Size

188 kB

Total Files

50

Last publish

Collaborators

  • robertboulton
  • seraph2000
  • hamza.samih
  • notlee
  • emmalewis
  • aendra
  • the-ft
  • rowanmanning
  • chee
  • alexwilson