{"_id":"amphora-apple-news","_rev":"41-6d990fe144e01325007112af8e2eaebb","name":"amphora-apple-news","dist-tags":{"beta":"0.5.0-beta.0","dev":"1.0.0-0","latest":"1.0.0"},"versions":{"0.1.0":{"name":"amphora-apple-news","version":"0.1.0","author":{"name":"New York Media"},"license":"MIT","_id":"amphora-apple-news@0.1.0","maintainers":[{"name":"zonika","email":"zoe.chodosh@nymag.com"}],"homepage":"https://github.com/clay/amphora-apple-news#readme","bugs":{"url":"https://github.com/clay/amphora-apple-news/issues"},"dist":{"shasum":"ec725f7e4636ae9a956441d4b70267c06bbff395","tarball":"https://registry.npmjs.org/amphora-apple-news/-/amphora-apple-news-0.1.0.tgz","fileCount":13,"integrity":"sha512-P04HOQa0LE1/BLVy++mYXU84WcOb2O8kRrmRoXhc3pvaBXMQha9wUbrVcYiqb7usAOeBXAM+JX6VDrHDFIaDRQ==","signatures":[{"sig":"MEYCIQD3QI5kfgaOM9RG3wPHbooaXDlYKtiapGE4yP+zBFbkMwIhAJILJf27YKmlpaeZ25kkOWzVURSvvPfWuaa5qRPDDRxN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20688},"main":"index.js","gitHead":"1c61e9114c1fd7fb0b2a5d9f67fddbfca648baf2","scripts":{"test":"npm run eslint && npm run mocha","mocha":"istanbul cover _mocha","eslint":"eslint --max-warnings 0 lib test"},"_npmUser":{"name":"zonika","email":"zchodosh@gmail.com"},"repository":{"url":"git+https://github.com/clay/amphora-apple-news.git","type":"git"},"_npmVersion":"5.6.0","description":"An Amphora renderer for Apple News Format","directories":{},"_nodeVersion":"8.9.0","dependencies":{"lodash":"^4.17.4","js-yaml":"^3.10.0","clay-log":"^1.2.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.0","sinon":"^4.2.1","eslint":"^4.16.0","istanbul":"^0.4.5","coveralls":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/amphora-apple-news_0.1.0_1518031086637_0.2704061397505093","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"amphora-apple-news","version":"0.2.0","author":{"name":"New York Media"},"license":"MIT","_id":"amphora-apple-news@0.2.0","maintainers":[{"name":"jonwinton","email":"winton.jon@gmail.com"},{"name":"zonika","email":"zoe.chodosh@nymag.com"}],"homepage":"https://github.com/clay/amphora-apple-news#readme","bugs":{"url":"https://github.com/clay/amphora-apple-news/issues"},"dist":{"shasum":"daaa9408ae11ff84bf2f5bae9cdbea9ecefe69af","tarball":"https://registry.npmjs.org/amphora-apple-news/-/amphora-apple-news-0.2.0.tgz","fileCount":13,"integrity":"sha512-yLT7Nw/NErTVop34zE/ez6xHD79un3gbu70Ru7E5PPCugti+Okjkn2NSwyXQnHXXxFQM0ZzJIfxXAZ2Ab4LMnA==","signatures":[{"sig":"MEYCIQCgTqODj5wNIfKeGov8202jS2gA8V2t2KZFGnQ/7ItQOgIhAJtQozqqZbKtUmc6qAmGCZ5f1NOBpuHP87LUUGp3DJoa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21031},"main":"index.js","gitHead":"d40667486b68634afadc4309f96c1e9ce5220aee","scripts":{"test":"npm run eslint && npm run mocha","mocha":"istanbul cover _mocha","eslint":"eslint --max-warnings 0 lib test"},"_npmUser":{"name":"zonika","email":"zoe.chodosh@nymag.com"},"repository":{"url":"git+https://github.com/clay/amphora-apple-news.git","type":"git"},"_npmVersion":"5.6.0","description":"An Amphora renderer for Apple News Format","directories":{},"_nodeVersion":"8.9.0","dependencies":{"lodash":"^4.17.4","js-yaml":"^3.10.0","clay-log":"^1.2.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.0","sinon":"^4.2.1","eslint":"^4.16.0","istanbul":"^0.4.5","coveralls":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/amphora-apple-news_0.2.0_1518627480745_0.7851524099339757","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"amphora-apple-news","version":"0.3.0","author":{"name":"New York Media"},"license":"MIT","_id":"amphora-apple-news@0.3.0","maintainers":[{"name":"jonwinton","email":"winton.jon@gmail.com"},{"name":"zonika","email":"zoe.chodosh@nymag.com"}],"homepage":"https://github.com/clay/amphora-apple-news#readme","bugs":{"url":"https://github.com/clay/amphora-apple-news/issues"},"dist":{"shasum":"bb56cf707972202ef6fc4065ac2080f790ce4cff","tarball":"https://registry.npmjs.org/amphora-apple-news/-/amphora-apple-news-0.3.0.tgz","fileCount":13,"integrity":"sha512-lTBLeiYklU8QRjhFaiJdVy9vBf+SYTpMXW2RYthRKNXVTjrr82Mad9WB9SfWnGNc4GDeajBjEAH6l1e4ntgBcA==","signatures":[{"sig":"MEQCIAZA7GH+94UyRdsOE2PZhGDVM9We2zVISprqwmRsxXUrAiBm47IfhWCdAVM6HPmTupZMY8IxWQu5GoJeh7iNeuswmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21539},"main":"index.js","gitHead":"9841c20757c736a67a0f1fcefe6c9b0f66f0880c","scripts":{"test":"npm run eslint && npm run mocha","mocha":"istanbul cover _mocha","eslint":"eslint --max-warnings 0 lib test"},"_npmUser":{"name":"zonika","email":"zoe.chodosh@nymag.com"},"repository":{"url":"git+https://github.com/clay/amphora-apple-news.git","type":"git"},"_npmVersion":"5.6.0","description":"An Amphora renderer for Apple News Format","directories":{},"_nodeVersion":"8.9.0","dependencies":{"lodash":"^4.17.4","js-yaml":"^3.10.0","clay-log":"^1.2.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.0","sinon":"^4.2.1","eslint":"^4.16.0","istanbul":"^0.4.5","coveralls":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/amphora-apple-news_0.3.0_1519147478916_0.760236601659964","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"amphora-apple-news","version":"0.3.1","author":{"name":"New York Media"},"license":"MIT","_id":"amphora-apple-news@0.3.1","maintainers":[{"name":"jonwinton","email":"winton.jon@gmail.com"},{"name":"zonika","email":"zoe.chodosh@nymag.com"}],"homepage":"https://github.com/clay/amphora-apple-news#readme","bugs":{"url":"https://github.com/clay/amphora-apple-news/issues"},"dist":{"shasum":"e2fb4f88d4d09f168817c3393d1e64b8c41f0cfa","tarball":"https://registry.npmjs.org/amphora-apple-news/-/amphora-apple-news-0.3.1.tgz","fileCount":13,"integrity":"sha512-pBqdp1MQB8z+Qmbltm1NWg/0ECqBpdSC32EdLRn7vYJif6uZ2YoBf6nAIuARzIQ9Or+tFwr5P8bYdpzztwx3/w==","signatures":[{"sig":"MEUCIHUhRktC8qdB0cCv/seDMw8Mv7uaQ7Ic5pajwbAEudzuAiEAjC8IJeiSoQOrtQRqS2ba2jiB0xtQV5gNDMcP1JL+3YI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21631},"main":"index.js","gitHead":"9959537ec202cbe71d843d19b14043ab78a9be8a","scripts":{"test":"npm run eslint && npm run mocha","mocha":"istanbul cover _mocha","eslint":"eslint --max-warnings 0 lib test"},"_npmUser":{"name":"jonwinton","email":"winton.jon@gmail.com"},"repository":{"url":"git+https://github.com/clay/amphora-apple-news.git","type":"git"},"_npmVersion":"5.5.1","description":"An Amphora renderer for Apple News Format","directories":{},"_nodeVersion":"8.9.0","dependencies":{"lodash":"^4.17.4","js-yaml":"^3.10.0","clay-log":"^1.2.1","clayutils":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.0","sinon":"^4.2.1","eslint":"^4.16.0","istanbul":"^0.4.5","coveralls":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/amphora-apple-news_0.3.1_1520871090833_0.5081310850796141","host":"s3://npm-registry-packages"}},"0.3.2":{"name":"amphora-apple-news","version":"0.3.2","author":{"name":"New York Media"},"license":"MIT","_id":"amphora-apple-news@0.3.2","maintainers":[{"name":"jonwinton","email":"winton.jon@gmail.com"},{"name":"zonika","email":"zoe.chodosh@nymag.com"}],"homepage":"https://github.com/clay/amphora-apple-news#readme","bugs":{"url":"https://github.com/clay/amphora-apple-news/issues"},"dist":{"shasum":"9e61aedc2d7446270d24bea327bb33cd2c6ed56c","tarball":"https://registry.npmjs.org/amphora-apple-news/-/amphora-apple-news-0.3.2.tgz","fileCount":13,"integrity":"sha512-ZFJf31Y6PJBiVw8NAXY9blbpv4K6ghE9ppirYhm5yTK31z5l2nUOQ/SHAzG+m+S8mezynaQY+NVP+xhNMBYamw==","signatures":[{"sig":"MEUCIQDueTEWVC65sntmFAOpWunLveRlZ5h4vBs7UdyGWKLsHwIgGj21fzEsL2Lc35CIgn/aJw7kMov0NQd/gFGTr42Kl/E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21635},"main":"index.js","gitHead":"efe63396dc4155f155b186482b989a1be7d38c13","scripts":{"test":"npm run eslint && npm run mocha","mocha":"istanbul cover _mocha","eslint":"eslint --max-warnings 0 lib test"},"_npmUser":{"name":"jonwinton","email":"winton.jon@gmail.com"},"repository":{"url":"git+https://github.com/clay/amphora-apple-news.git","type":"git"},"_npmVersion":"5.5.1","description":"An Amphora renderer for Apple News Format","directories":{},"_nodeVersion":"8.9.0","dependencies":{"lodash":"^4.17.4","js-yaml":"^3.10.0","clay-log":"^1.2.1","clayutils":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.0","sinon":"^4.2.1","eslint":"^4.16.0","istanbul":"^0.4.5","coveralls":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/amphora-apple-news_0.3.2_1520889305779_0.5483814722107558","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"amphora-apple-news","version":"0.4.0","author":{"name":"New York Media"},"license":"MIT","_id":"amphora-apple-news@0.4.0","maintainers":[{"name":"jonwinton","email":"winton.jon@gmail.com"},{"name":"zonika","email":"zoe.chodosh@nymag.com"}],"homepage":"https://github.com/clay/amphora-apple-news#readme","bugs":{"url":"https://github.com/clay/amphora-apple-news/issues"},"dist":{"shasum":"a733253f432d5c80e9bbb9cef6aeecdab18789e4","tarball":"https://registry.npmjs.org/amphora-apple-news/-/amphora-apple-news-0.4.0.tgz","fileCount":13,"integrity":"sha512-ug1lMR2Z3vrgYn00//r0q7S6uiJD4zOrW0XjkMDVgEeEMzricvKvlXiBlHQ1mR2u5aMLl+Sl0l+qgJxwY6mMVQ==","signatures":[{"sig":"MEUCIHGWxCAbMDFl7AdmgO6QCj0CMF1yMBceUIOQ1bovHAAzAiEA8fTj3EOh15Ftf8QrN8zSyKLDSQ7bwmtdH+47r+wS6E4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21939},"main":"index.js","gitHead":"61efde1ffd039da7e95c8934679723104def984b","scripts":{"test":"npm run eslint && npm run mocha","mocha":"istanbul cover _mocha","eslint":"eslint --max-warnings 0 lib test"},"_npmUser":{"name":"jonwinton","email":"winton.jon@gmail.com"},"repository":{"url":"git+https://github.com/clay/amphora-apple-news.git","type":"git"},"_npmVersion":"5.5.1","description":"An Amphora renderer for Apple News Format","directories":{},"_nodeVersion":"8.9.0","dependencies":{"lodash":"^4.17.4","js-yaml":"^3.10.0","clay-log":"^1.2.1","clayutils":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.0","sinon":"^4.2.1","eslint":"^4.16.0","istanbul":"^0.4.5","coveralls":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/amphora-apple-news_0.4.0_1522165235293_0.6373955498598451","host":"s3://npm-registry-packages"}},"0.5.0-beta.0":{"name":"amphora-apple-news","version":"0.5.0-beta.0","author":{"name":"New York Media"},"license":"MIT","_id":"amphora-apple-news@0.5.0-beta.0","maintainers":[{"name":"jonwinton","email":"winton.jon@gmail.com"},{"name":"lchevres","email":"larry.chevres@nymag.com"},{"name":"manuelurenah","email":"manuel.ureh@hotmail.com"},{"name":"prosario","email":"pedrorosario.estrella@hotmail.com"},{"name":"scottnash","email":"scottmichaelnash@gmail.com"},{"name":"shilario","email":"hilariostephannie@gmail.com"},{"name":"yuliyv","email":"yuliy.vigdorchik@nymag.com"},{"name":"zonika","email":"zoe.chodosh@nymag.com"}],"homepage":"https://github.com/clay/amphora-apple-news#readme","bugs":{"url":"https://github.com/clay/amphora-apple-news/issues"},"dist":{"shasum":"8b707cd5680f8bc0b7258f5d8c9a26f43a7c5f5a","tarball":"https://registry.npmjs.org/amphora-apple-news/-/amphora-apple-news-0.5.0-beta.0.tgz","fileCount":14,"integrity":"sha512-ZtzW7xId1BukB/Gy0SwBattyeizRikZKkfy0c61klEdVRGXep7Ow1RJ3WGVAVotj6nWQWnQt4rnYhClmLUtsdw==","signatures":[{"sig":"MEQCIH1KpfpHI7kZoX85EUlFl24cbuHMJdjP+QEmXGTyF8QgAiBE/VXqZgDP2QdGGGwKWwQ/LVZddDxbV7X73h3MFWtA1Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcj+ufCRA9TVsSAnZWagAA1bQP/iD/JFV5GPsnTLOe7NSX\nK0EPCIJ0OJYxFtNR4G7WGHiGAGnyfdKzK99jal4GFw/hYDSDDwEosR6Dy0+t\nNDPuoA441gEufyP2EbjNwGzzqHn7kLOn2BNa69SkBAxfAiU5mUbVj8gapah4\n8wUOTcqvrKQo5brPQYaabciAr7wWJezKA4zHqJ18oCsNr/fVyRnX6XpV6+4n\nFnaeCht7rdT4chLuw/6EpMzEcV0krZGlnZmab3k2wpNjWyc1O903+PhLO3tB\nCAiPfvo+IRU029vZkK2D+h8BTDYBU0Bq2OlXxrrnT9pc2jK7RNCh2kDcBnTz\nIAMjRsUTf8/0rw0Z959wOihEE+RBDyN2Xb1qDHZMo4YCIjU/iJxdK0szh7yU\nYP67pQb6g8wsz4pINQPMblFdjXEna73dSnJ4Ogs/5P2qD6519Bojm2sEaJns\nukd7WX0+wEbbXnNVGdPndloktE85r/KMhGPYdo5dLJvj3Au8l6Z9p/FWW1FK\ngike9F/WLyLhQmtJubel2bZYf+JiOPYg4bistmtMRv+SJZuRipm97kv/jtdi\nw2d8dlGVSASDAbJ0pXpmejVhwUnJCWXBBofb7lqqlkifctf3RcRYlUAWg1OB\nw2MIUgr/hb9W06d/AQ7dYuIGii8e/E/FVy30CC1azX5cLqus79Vb0lqLDkGr\n9cHA\r\n=3krY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# Amphora Apple News\n\n[![Coverage Status](https://coveralls.io/repos/github/clay/amphora-apple-news/badge.svg)](https://coveralls.io/github/clay/amphora-apple-news) [![CircleCI](https://circleci.com/gh/clay/amphora-apple-news.svg?style=svg)](https://circleci.com/gh/clay/amphora-apple-news)\n\nThe [Apple News Format](https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/index.html#//apple_ref/doc/uid/TP40015408-CH79-SW1) renderer for Clay components.\n\n## Install\n`$ npm install --save amphora-apple-news`\n\n## Integration\n\n### Basic Configuration\n\nFirst, ensure that you have a compatible version of Amphora installed (v3.x or greater) and require `amphora-apple-news` from wherever you are running Amphora.\n\n```javascript\nconst amphoraAppleNews = require('amphora-apple-news');\n```\n\nNext, you'll need to register the Apple News renderer with your Amphora instance. This will tell Amphora to use the Apple News renderer whenever a component or page is requested with the `.anf` (Apple News Format) extension.\n\n```javascript\nreturn amphora({\n  app: app,\n  renderers: {\n    anf: amphoraAppleNews,\n    html: amphoraHtml,\n    default: 'html'\n  },\n  providers: ['apikey', amphoraProvider],\n  sessionStore: redisStore,\n  plugins: [\n    amphoraSearch\n  ]\n});\n```\n\n### Component Rendering\n\nTo make a Clay component renderable for Apple News Format, add a `anf.model.js` file to your component's directory. This file's default export should be a function that returns a javascript object that Apple News can ingest. All Apple News-specific data transforms should happen in this file. The exported function's signature should be the same as any other model.js render function, it will be called by Amphora with the component's `ref`, `data`, and the site's `locals`. Refer to the [Apple News Format Component Documentation](https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/Component.html#//apple_ref/doc/uid/TP40015408-CH5-SW1) for more information on the structuring of Apple News components.\n\nHere is an example of a simple `anf.model.js` file for the `clay-paragraph` component. This file transforms the `clay-paragraph` component into an [Apple News Format Body component](https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/Body.html#//apple_ref/doc/uid/TP40015408-CH9-SW1).\n\n```javascript\nmodule.exports = function (ref, data, locals) {\n  return {\n    role: 'body',\n    text: data.text,\n    format: 'html'\n  };\n};\n```\n\nAll Apple News components must include a `role` property, which tells Apple News what type of component to render. The Amphora Apple News Renderer will not render a component without a `role` property.\n\n### Site-Specific Configuration\n\nIf the request to Amphora Apple News contains the query param `config=true`, the renderer will look for an `anf.yml` file in your site's directory that should include all of the applicable [Top-Level Properties](https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/Properties.html#//apple_ref/doc/uid/TP40015408-CH2-SW1) needed to render a page in Apple News Format. This should include component styles, layouts, metadata, etc. Amphora Apple News will transform the YML in this file to a javascript object and assign it to the top level of its output. An example anf.yml file should look like this:\n\n```yml\nversion: '1.5'\nlanguage: en\nlayout:\n  columns: 10\n  width: 1024\n  margin: 85\n  gutter: 20\ncomponentTextStyles:\n  default:\n    fontName: Georgia\n    textColor: '#111'\n    linkStyle:\n      textColor: '#1782a9'\n  default-body:\n    fontSize: 17\n    lineHeight: 27\n  bigRedTextStyle:\n    fontSize: 72\n    textColor: '#FF0000'\ncomponentLayouts:\n  bodyContentLayout:\n    columnStart: 0\n    columnSpan: 7\n    margin:\n      bottom: 20\n```\n\nLayout and style names should be specified in the component they're meant to affect. This means that a Clay component that you'd like to have the `bigRedTextStyle` styles should be exported from its anf.model.js file like this:\n\n```javascript\nmodule.exports = function (ref, data, locals) {\n  return {\n    role: 'heading1',\n    text: data.text,\n    format: 'html',\n    textStyle: 'bigRedTextStyle'\n  };\n};\n```\n\n## Contributing\nWant a feature or find a bug? Create an issue or a PR and someone will get on it.\n","gitHead":"8279a5d6ceba2f13a3f8c8c0e7cbefa59909d6d8","scripts":{"test":"npm run eslint && npm run mocha","mocha":"istanbul cover _mocha","eslint":"eslint --max-warnings 0 *.js"},"_npmUser":{"name":"manuelurenah","email":"manuel.ureh@hotmail.com"},"repository":{"url":"git+https://github.com/clay/amphora-apple-news.git","type":"git"},"_npmVersion":"6.5.0","description":"An Amphora renderer for Apple News Format","directories":{},"_nodeVersion":"8.15.0","dependencies":{"lodash":"^4.17.4","js-yaml":"^3.10.0","clay-log":"^1.2.1","clayutils":"^2.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.1.2","mocha":"^5.0.0","sinon":"^4.2.1","eslint":"^4.16.0","istanbul":"^0.4.5","coveralls":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/amphora-apple-news_0.5.0-beta.0_1552935838841_0.5195566826939251","host":"s3://npm-registry-packages"}},"1.0.0-0":{"name":"amphora-apple-news","version":"1.0.0-0","author":{"name":"New York Media"},"license":"MIT","_id":"amphora-apple-news@1.0.0-0","maintainers":[{"name":"shilario","email":"hilariostephannie@gmail.com"},{"name":"prosario","email":"pedrorosario.estrella@hotmail.com"},{"name":"nymagwebops","email":"webops@nymag.com"},{"name":"jeffreypo","email":"jpopeufl@gmail.com"},{"name":"james_owen","email":"james@jamesowen.io"},{"name":"mariafdezj","email":"mariatfj@gmail.com"},{"name":"mariamera","email":"mmera@intellisys.com.do"},{"name":"jonwinton","email":"winton.jon@gmail.com"},{"name":"zonika","email":"zoe.chodosh@nymag.com"}],"homepage":"https://github.com/clay/amphora-apple-news#readme","bugs":{"url":"https://github.com/clay/amphora-apple-news/issues"},"dist":{"shasum":"78ed874e0a41a19613ab086f470e4fffb3ab123c","tarball":"https://registry.npmjs.org/amphora-apple-news/-/amphora-apple-news-1.0.0-0.tgz","fileCount":14,"integrity":"sha512-kznXuBOC0FA1vP6xHoB5jWEpG1ium9+TFuP2vy9HHz/oMYIYwGNrQK8FOCMhR5tVKkwJQ1xcu2zL2OKhEi4fag==","signatures":[{"sig":"MEUCIQDPqWikp8Zyt+cYemmfsDhFUQy0DlOrZQJ+3ExEYqvjdwIgNBhpajvKRibgIJWIXX2zocdZoWbqTkfIQa84Z1H9I0w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLUakCRA9TVsSAnZWagAAMU0P/AzClu5Wr6EB11IcU1aT\n9FNZbcCxaR+7Oj+s017F5jyXqvYq9sCMvmKtt4R+zSlInw4wlQWTZWIG9MDL\n1zfJZKBcMfTJqk7io5vhlXhGmo5b9sQjpD6f2CrrR6fmqCQG9BNcXKmLyWbi\nW/g01xmyJleHWbVQvPFzOU1MCy0SOFc+a1e0bW7kWJnaIIRli2BD/Wc8VVST\nBA6u2fBCwQl41fPZ0Ut0vM970Szth/fbDvTstdvNzAoaSQJBTJWHcnVqvDPc\nr+IuQ0vhsNjuYlLPbt3RbqVBGz2BhfbhhbYVvN84HOtvszr4L0X1o5Ov838w\ndohWZ4mABQx0uXcz3dq8lABoqcrLBALG+P5RusfF9qvahOOJfJnefOvN3Cse\nH8VOKeW5gIR0YRwj8JRQDXOK8XeEyNv+BeOIWFUDbrP3Tf2WNQtJfWjUl/bg\nYrarV3bjlLkJ16dOV1qy/PrQ5swhmquEoZu32qGy/Fnqb+uaBJXgU2Iv6xHf\nnuDHok7PcYSVEOEv0GitJBM/15escSl5BUyRX+hqY2hlY63fPPS5x/g4EUry\ns6cObEuadCvGlCveoJMXlsoTFHozorvNdPtEC9236jztxadgq4zWG2JN/wRT\n6N8nkTXZzmumbBQPaLHYMcj8cnlEACbetitSMbJwrLOqYNgZweID10UYJga1\ndvqw\r\n=VIzg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# Amphora Apple News\n\n[![Coverage Status](https://coveralls.io/repos/github/clay/amphora-apple-news/badge.svg)](https://coveralls.io/github/clay/amphora-apple-news) [![CircleCI](https://circleci.com/gh/clay/amphora-apple-news.svg?style=svg)](https://circleci.com/gh/clay/amphora-apple-news)\n\nThe [Apple News Format](https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/index.html#//apple_ref/doc/uid/TP40015408-CH79-SW1) renderer for Clay components.\n\n## Install\n`$ npm install --save amphora-apple-news`\n\n## Integration\n\n### Basic Configuration\n\nFirst, ensure that you have a compatible version of Amphora installed (v3.x or greater) and require `amphora-apple-news` from wherever you are running Amphora.\n\n```javascript\nconst amphoraAppleNews = require('amphora-apple-news');\n```\n\nNext, you'll need to register the Apple News renderer with your Amphora instance. This will tell Amphora to use the Apple News renderer whenever a component or page is requested with the `.anf` (Apple News Format) extension.\n\n```javascript\nreturn amphora({\n  app: app,\n  renderers: {\n    anf: amphoraAppleNews,\n    html: amphoraHtml,\n    default: 'html'\n  },\n  providers: ['apikey', amphoraProvider],\n  sessionStore: redisStore,\n  plugins: [\n    amphoraSearch\n  ]\n});\n```\n\n### Component Rendering\n\nTo make a Clay component renderable for Apple News Format, add a `anf.model.js` file to your component's directory. This file's default export should be a function that returns a javascript object that Apple News can ingest. All Apple News-specific data transforms should happen in this file. The exported function's signature should be the same as any other model.js render function, it will be called by Amphora with the component's `ref`, `data`, and the site's `locals`. Refer to the [Apple News Format Component Documentation](https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/Component.html#//apple_ref/doc/uid/TP40015408-CH5-SW1) for more information on the structuring of Apple News components.\n\nHere is an example of a simple `anf.model.js` file for the `clay-paragraph` component. This file transforms the `clay-paragraph` component into an [Apple News Format Body component](https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/Body.html#//apple_ref/doc/uid/TP40015408-CH9-SW1).\n\n```javascript\nmodule.exports = function (ref, data, locals) {\n  return {\n    role: 'body',\n    text: data.text,\n    format: 'html'\n  };\n};\n```\n\nAll Apple News components must include a `role` property, which tells Apple News what type of component to render. The Amphora Apple News Renderer will not render a component without a `role` property.\n\n### Site-Specific Configuration\n\nIf the request to Amphora Apple News contains the query param `config=true`, the renderer will look for an `anf.yml` file in your site's directory that should include all of the applicable [Top-Level Properties](https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/Properties.html#//apple_ref/doc/uid/TP40015408-CH2-SW1) needed to render a page in Apple News Format. This should include component styles, layouts, metadata, etc. Amphora Apple News will transform the YML in this file to a javascript object and assign it to the top level of its output. An example anf.yml file should look like this:\n\n```yml\nversion: '1.5'\nlanguage: en\nlayout:\n  columns: 10\n  width: 1024\n  margin: 85\n  gutter: 20\ncomponentTextStyles:\n  default:\n    fontName: Georgia\n    textColor: '#111'\n    linkStyle:\n      textColor: '#1782a9'\n  default-body:\n    fontSize: 17\n    lineHeight: 27\n  bigRedTextStyle:\n    fontSize: 72\n    textColor: '#FF0000'\ncomponentLayouts:\n  bodyContentLayout:\n    columnStart: 0\n    columnSpan: 7\n    margin:\n      bottom: 20\n```\n\nLayout and style names should be specified in the component they're meant to affect. This means that a Clay component that you'd like to have the `bigRedTextStyle` styles should be exported from its anf.model.js file like this:\n\n```javascript\nmodule.exports = function (ref, data, locals) {\n  return {\n    role: 'heading1',\n    text: data.text,\n    format: 'html',\n    textStyle: 'bigRedTextStyle'\n  };\n};\n```\n\n## Contributing\nWant a feature or find a bug? Create an issue or a PR and someone will get on it.\n","gitHead":"6af33e9f19e426e7e52abd482f8f6282686468f1","scripts":{"test":"npm run eslint && npm run mocha","mocha":"istanbul cover _mocha","eslint":"eslint --max-warnings 0 *.js"},"_npmUser":{"name":"james_owen","email":"james@jamesowen.io"},"repository":{"url":"git+https://github.com/clay/amphora-apple-news.git","type":"git"},"_npmVersion":"6.14.8","description":"An Amphora renderer for Apple News Format","directories":{},"_nodeVersion":"14.9.0","dependencies":{"lodash":"^4.17.4","js-yaml":"^3.10.0","clay-log":"^1.2.1","clayutils":"^3.0.0-0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.1.2","mocha":"^5.0.0","sinon":"^4.2.1","eslint":"^4.16.0","istanbul":"^0.4.5","coveralls":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/amphora-apple-news_1.0.0-0_1613579939783_0.983635593131535","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"amphora-apple-news","version":"1.0.0","author":{"name":"New York Media"},"license":"MIT","_id":"amphora-apple-news@1.0.0","maintainers":[{"name":"shilario","email":"hilariostephannie@gmail.com"},{"name":"prosario","email":"pedrorosario.estrella@hotmail.com"},{"name":"nymagwebops","email":"webops@nymag.com"},{"name":"jeffreypo","email":"jpopeufl@gmail.com"},{"name":"james_owen","email":"james@jamesowen.io"},{"name":"mariafdezj","email":"mariatfj@gmail.com"},{"name":"mariamera","email":"mmera@intellisys.com.do"},{"name":"jonwinton","email":"winton.jon@gmail.com"},{"name":"zonika","email":"zoe.chodosh@nymag.com"}],"homepage":"https://github.com/clay/amphora-apple-news#readme","bugs":{"url":"https://github.com/clay/amphora-apple-news/issues"},"dist":{"shasum":"e22eb2542df714ec5252e6ff469c5a6e49af3b50","tarball":"https://registry.npmjs.org/amphora-apple-news/-/amphora-apple-news-1.0.0.tgz","fileCount":14,"integrity":"sha512-zjahNsumb95yCOr2RrYBxAFmEYx1ga1Zg3vfLykf9We8YRnaHyaa0t7hLe9H41434gHZuP219p5OuW2nT+4Mog==","signatures":[{"sig":"MEQCIEzOVTBaSl/37nzjhHGmpAJ4k8mqk6BGbpdtIhuF3ZvrAiBSORpsMBRCU79rfTApSFFgOZUKa0KWhAAqzo01y8aJ2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUl0HCRA9TVsSAnZWagAA1FsQAJXBgn4gp9vgCKGAIRRY\nuq+RrcGNh7jTRPI2anIvEwKfDNMQJvX/NXMeJwzk9CQ0KuMU/m6Pe4kR7HvE\n7yJg5DNZkrnoaFEbGzHgH6YCUc1Z7WxPLnicUA2T8LjO1wotWz7A24visuKl\n6rpHWXc/MmKA2ix5E4GHNEJII7fBMAzpf0ysKBKTPNcb+S0r0Anh57rHd7tK\nXxf7R43mzWt++vDBRo6IrQUsBL//CtOF58kbXkYLkagI7CMviXcBLntFZa28\n/1NMMyfTg5Zz9Y2RwqkFCUyJ7jFFjv2NnNy56Y7tPZLxnxUYsVESLCwFBbuO\nvhwjqZqozMw4XV2OX11MiWb2fZd6qvJkTALDdzfvz4u97y/4N+Z+k54Vsc+5\nyR5xtvmvzfeUX2oNPolTzfhl7EMGA8h7TruGQCKsSVw+mDF0BMRfJkbAMB7a\n+5THpdbb4mQLGXvPNY/gyU/pRiOw4a4cY8GiwSAKsLLre7dNmFt/u1/zs6WW\n1RoRSFv0QHAZk8Zy+A4Kg+7MKZftApOeBXH8RP71bxBTAs/BzNKWsVrJSyzg\ngr7DNaxOVnW1gSq/TEc9BQfmwagAqtow2WzqSRDSDf5eAJMwgk5FGQMx9gSZ\nZKJ3TJO7etg3j6MTEauitT0fnYX/gFMPSRTcJK2J7c16caw1a9elKAY+ZASk\nsIOK\r\n=LPVZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"7fbc9dd7907b4a37a4db5457f4e028589b88a445","scripts":{"test":"npm run eslint && npm run mocha","mocha":"istanbul cover _mocha","eslint":"eslint --max-warnings 0 *.js"},"_npmUser":{"name":"james_owen","email":"james@jamesowen.io"},"repository":{"url":"git+https://github.com/clay/amphora-apple-news.git","type":"git"},"_npmVersion":"6.14.8","description":"An Amphora renderer for Apple News Format","directories":{},"_nodeVersion":"14.9.0","dependencies":{"lodash":"^4.17.4","js-yaml":"^3.10.0","clay-log":"^1.2.1","clayutils":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.0","sinon":"^4.2.1","eslint":"^4.16.0","istanbul":"^0.4.5","coveralls":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/amphora-apple-news_1.0.0_1616010502666_0.7770738707620795","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-02-07T19:18:06.636Z","modified":"2026-09-22T21:37:39.441Z","0.1.0":"2018-02-07T19:18:07.369Z","0.2.0":"2018-02-14T16:58:01.453Z","0.3.0":"2018-02-20T17:24:39.048Z","0.3.1":"2018-03-12T16:11:30.887Z","0.3.2":"2018-03-12T21:15:05.821Z","0.4.0":"2018-03-27T15:40:35.365Z","0.5.0-beta.0":"2019-03-18T19:03:58.958Z","1.0.0-0":"2021-02-17T16:38:59.965Z","1.0.0":"2021-03-17T19:48:22.833Z"},"bugs":{"url":"https://github.com/clay/amphora-apple-news/issues"},"author":{"name":"New York Media"},"license":"MIT","homepage":"https://github.com/clay/amphora-apple-news#readme","repository":{"url":"git+https://github.com/clay/amphora-apple-news.git","type":"git"},"description":"An Amphora renderer for Apple News Format","maintainers":[{"email":"hilariostephannie@gmail.com","name":"shilario"},{"email":"webops@nymag.com","name":"nymagwebops"},{"email":"jordanp9312@gmail.com","name":"jordanp9312"},{"email":"keren.lerner@voxmedia.com","name":"kerenzo"},{"email":"james@jamesowen.io","name":"james_owen"},{"email":"sakai.stanley@gmail.com","name":"stanographer"},{"email":"reuben.son@nymag.com","name":"reubenson"},{"email":"wendy.ramirez@voxmedia.com","name":"wramirez92"},{"email":"jesscastillo28@hotmail.com","name":"jess2896"},{"email":"ealcantara22@gmail.com","name":"ealcantara22"},{"email":"winton.jon@gmail.com","name":"jonwinton"},{"email":"zoe.chodosh@nymag.com","name":"zonika"}],"readme":"# Amphora Apple News\n\n[![Coverage Status](https://coveralls.io/repos/github/clay/amphora-apple-news/badge.svg)](https://coveralls.io/github/clay/amphora-apple-news) [![CircleCI](https://circleci.com/gh/clay/amphora-apple-news.svg?style=svg)](https://circleci.com/gh/clay/amphora-apple-news)\n\nThe [Apple News Format](https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/index.html#//apple_ref/doc/uid/TP40015408-CH79-SW1) renderer for Clay components.\n\n## Install\n`$ npm install --save amphora-apple-news`\n\n## Integration\n\n### Basic Configuration\n\nFirst, ensure that you have a compatible version of Amphora installed (v3.x or greater) and require `amphora-apple-news` from wherever you are running Amphora.\n\n```javascript\nconst amphoraAppleNews = require('amphora-apple-news');\n```\n\nNext, you'll need to register the Apple News renderer with your Amphora instance. This will tell Amphora to use the Apple News renderer whenever a component or page is requested with the `.anf` (Apple News Format) extension.\n\n```javascript\nreturn amphora({\n  app: app,\n  renderers: {\n    anf: amphoraAppleNews,\n    html: amphoraHtml,\n    default: 'html'\n  },\n  providers: ['apikey', amphoraProvider],\n  sessionStore: redisStore,\n  plugins: [\n    amphoraSearch\n  ]\n});\n```\n\n### Component Rendering\n\nTo make a Clay component renderable for Apple News Format, add a `anf.model.js` file to your component's directory. This file's default export should be a function that returns a javascript object that Apple News can ingest. All Apple News-specific data transforms should happen in this file. The exported function's signature should be the same as any other model.js render function, it will be called by Amphora with the component's `ref`, `data`, and the site's `locals`. Refer to the [Apple News Format Component Documentation](https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/Component.html#//apple_ref/doc/uid/TP40015408-CH5-SW1) for more information on the structuring of Apple News components.\n\nHere is an example of a simple `anf.model.js` file for the `clay-paragraph` component. This file transforms the `clay-paragraph` component into an [Apple News Format Body component](https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/Body.html#//apple_ref/doc/uid/TP40015408-CH9-SW1).\n\n```javascript\nmodule.exports = function (ref, data, locals) {\n  return {\n    role: 'body',\n    text: data.text,\n    format: 'html'\n  };\n};\n```\n\nAll Apple News components must include a `role` property, which tells Apple News what type of component to render. The Amphora Apple News Renderer will not render a component without a `role` property.\n\n### Site-Specific Configuration\n\nIf the request to Amphora Apple News contains the query param `config=true`, the renderer will look for an `anf.yml` file in your site's directory that should include all of the applicable [Top-Level Properties](https://developer.apple.com/library/content/documentation/General/Conceptual/Apple_News_Format_Ref/Properties.html#//apple_ref/doc/uid/TP40015408-CH2-SW1) needed to render a page in Apple News Format. This should include component styles, layouts, metadata, etc. Amphora Apple News will transform the YML in this file to a javascript object and assign it to the top level of its output. An example anf.yml file should look like this:\n\n```yml\nversion: '1.5'\nlanguage: en\nlayout:\n  columns: 10\n  width: 1024\n  margin: 85\n  gutter: 20\ncomponentTextStyles:\n  default:\n    fontName: Georgia\n    textColor: '#111'\n    linkStyle:\n      textColor: '#1782a9'\n  default-body:\n    fontSize: 17\n    lineHeight: 27\n  bigRedTextStyle:\n    fontSize: 72\n    textColor: '#FF0000'\ncomponentLayouts:\n  bodyContentLayout:\n    columnStart: 0\n    columnSpan: 7\n    margin:\n      bottom: 20\n```\n\nLayout and style names should be specified in the component they're meant to affect. This means that a Clay component that you'd like to have the `bigRedTextStyle` styles should be exported from its anf.model.js file like this:\n\n```javascript\nmodule.exports = function (ref, data, locals) {\n  return {\n    role: 'heading1',\n    text: data.text,\n    format: 'html',\n    textStyle: 'bigRedTextStyle'\n  };\n};\n```\n\n## Contributing\nWant a feature or find a bug? Create an issue or a PR and someone will get on it.\n","readmeFilename":"README.md"}