{"_id":"@clarityhub/gatsby-plugin-feed-generator","_rev":"4-6afa4e4a0e6c00bee658d37bb28e1b3e","name":"@clarityhub/gatsby-plugin-feed-generator","dist-tags":{"latest":"2.1.3"},"versions":{"2.1.0":{"name":"@clarityhub/gatsby-plugin-feed-generator","version":"2.1.0","description":"Generate RSS and JSON feeds for a Gatsby blog","scripts":{"build":"babel src --out-dir . ","watch":"babel -w src --out-dir . "},"author":{"name":"Mark Michon","email":"hello@markmichon.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/clarityhub/gatsby-plugin-feed-generator.git"},"keywords":["gatsby","gatsby-plugin","rss","atom","jsonfeed","feed"],"dependencies":{"@clarityhub/feed":"^4.1.0","pify":"^3.0.0","url-join":"^4.0.1"},"devDependencies":{"babel-cli":"^6.26.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.0"},"_id":"@clarityhub/gatsby-plugin-feed-generator@2.1.0","dist":{"shasum":"52d5b2080efcf20d1a49eab26c9cef3b2898ef4e","integrity":"sha512-zyPLreUzvz5Nmk9OxrR4PJLeDa2OLgoeAhB9F8BtjXDLX5yJvwui7lwYPlv3yiHZENwoTNFhD7a6xReNHRhMwA==","tarball":"https://registry.npmjs.org/@clarityhub/gatsby-plugin-feed-generator/-/gatsby-plugin-feed-generator-2.1.0.tgz","fileCount":8,"unpackedSize":6418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyeZyCRA9TVsSAnZWagAA1w4P/RwcHD9xRD5isrLL1YeC\n7ctepiiVE4mVDihN0DrIvBcaqzG/rUfsNFxLKWmD04nHlhcRjza+ZUaPU5qO\nVMswkkh9xhF5Z7Au9KhCF2nEtQj4R3ZZqxtB0KEiBzClwnVAgOfUb+X6Ma1N\nWVM46VCJKbkqlrVAi36QJUzs2YdBD6ETDE7MH1sBKCisF/rsKArTOfXhCZup\n/lOSMLTCMB0drAthYkisWGI0sH2bxGtY8vIzR616qhldFAWryhRpmhLw/6Fs\nccyyZQSsPU0xmF5mQvshHmoPHFh/8zaR6RDBgh7QDh07hCll8HOlD8tUgSXN\nvtl0Jrjd6QcQepDwPY0c2VJdJfjIIne0BqeuKgRbnRJWQH1xVouaxmli9nkG\nLCMMHQQel+9TQCo6Yndy4MHqvH7sA//lShaDKucnF5vBUG1estLXboavvUOD\n95gDX4KPNThp9icShfljixK5+YyuLpCBMAgfPFpoC410egt/tWx6Ou49cv9y\necss4E6XuUUWJVS93UC3x8Ci6eso6WsS+k7QznCB6nTCUzRPKaqS9ku0BWy4\nmeB99cV4JTUeThiE0yt/w72CKY2yc+FeVa9SwBMsgAwj0uetSW+U8iHhHzmF\ncYMESEplS8BAkqfVRzo8hVSZnzNiwqK1Ku2Gp4y+Rs7FVL6KlAiRfVEUrr2x\nGwD/\r\n=UX4r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIhhtsHxLUg13ij8jVXF8vRm52w4WzFe1kVnsEcgDP6AIgIVaZX0Q7Pu0lE2arUdoUD9hHNaJbbEAqvz4ct5nVRkI="}]},"maintainers":[{"name":"loukitzanna","email":"anna@clarityhub.io"},{"name":"idmontie","email":"idmontie@gmail.com"}],"_npmUser":{"name":"idmontie","email":"idmontie@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-plugin-feed-generator_2.1.0_1573512818488_0.07097963986836264"},"_hasShrinkwrap":false},"2.1.1":{"name":"@clarityhub/gatsby-plugin-feed-generator","version":"2.1.1","description":"Generate RSS and JSON feeds for a Gatsby blog","scripts":{"build":"babel src --out-dir . ","watch":"babel -w src --out-dir . "},"author":{"name":"Mark Michon","email":"hello@markmichon.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/clarityhub/gatsby-plugin-feed-generator.git"},"keywords":["gatsby","gatsby-plugin","rss","atom","jsonfeed","feed"],"dependencies":{"@clarityhub/feed":"^4.1.0","pify":"^3.0.0","url-join":"^4.0.1"},"devDependencies":{"babel-cli":"^6.26.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.0"},"_id":"@clarityhub/gatsby-plugin-feed-generator@2.1.1","dist":{"shasum":"4827a6d72e1591bc659d17e35f8993343d9de9c2","integrity":"sha512-mgGeGIk4reSvmO1m5QkFPoOYcixSuoNSxXXfZsMk3aubf3zUTq54PZAby38HKMnbs4HMkEm8dMN2jZXEt8N/ew==","tarball":"https://registry.npmjs.org/@clarityhub/gatsby-plugin-feed-generator/-/gatsby-plugin-feed-generator-2.1.1.tgz","fileCount":12,"unpackedSize":17374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyej2CRA9TVsSAnZWagAAqVAP/3KmIxeVYvqdXbibpOoe\np6acOQ1cBH5Ln8hAa78nl1m4NY9JHppqfxFgmm/5OU9S/ZVNlldSHPi7IIHM\nqhyn3L/PrEHaRiWNIYNpSJ4lFmCsTGKLcVwzmXZg1UB9t80gNMJha1tspo0M\n3gTyjhqSafrWcyxlXpQbfCu8k367szer2Ci824a6A/ZxYm4YxZ4xsL9rdyhy\nLSxT6SlQgO8gZpSOjrkk3KZX6XW2Hhizz6GT9X9lXFeb9Suqubnnp8wY+39z\nmal7sJgibDFAChtOg+5TmQV2qNsyKZgNryH0qI7mML7MyDlHHYI9tnm0iSTk\nFuj3z9jls+By82XNRJX1kffGg+/pAvugjksD+I1jOUnvb6U6yAs7HyXB0oAR\n2CYNywrMgtV7A3/GKyFwyq9Askit4cjakARtM0xzTIvcG32pjN8tufR/8WLN\nxkQX4VrR1wYYL9bU01+PgXTtHRcJVEGmXqhyU9gH3fRG4ka62vpqy0/ayF2q\nvFqbtdNO0jWUjzzyg+5r3cvOJvM60nI4d5ueiTmNquu9YmkFkJrkj4g+o+hN\n9pMqDK9Xs2Otn6LJzioqCc73Aq7FVy8tEVQvgBA51UG3mhhvkgl3DQB8dT8U\nHn5cLesLrqdXVG9CfQVCea/V6iZUs/2WkWB7kjSBX+4JjPov6U+6gz5+QF8b\nsdbD\r\n=9a7A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8Q0XUqj7wG/EZoLSg7cs/tRlbCzlVDSustNKFPkQaNAiBjdjGKTec5q04CrucZaLw02UFO+LFfSaywv4kC4I1IJg=="}]},"maintainers":[{"name":"idmontie","email":"idmontie@gmail.com"},{"name":"loukitzanna","email":"anna@clarityhub.io"}],"_npmUser":{"name":"idmontie","email":"idmontie@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-plugin-feed-generator_2.1.1_1573513461674_0.9947669006113975"},"_hasShrinkwrap":false},"2.1.2":{"name":"@clarityhub/gatsby-plugin-feed-generator","version":"2.1.2","description":"Generate RSS and JSON feeds for a Gatsby blog","scripts":{"build":"babel src --out-dir . ","watch":"babel -w src --out-dir . "},"author":{"name":"Mark Michon","email":"hello@markmichon.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/clarityhub/gatsby-plugin-feed-generator.git"},"keywords":["gatsby","gatsby-plugin","rss","atom","jsonfeed","feed"],"dependencies":{"@clarityhub/feed":"4.1.1","pify":"^3.0.0","url-join":"^4.0.1"},"devDependencies":{"babel-cli":"^6.26.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.0"},"_id":"@clarityhub/gatsby-plugin-feed-generator@2.1.2","dist":{"shasum":"0a7a05308e4f34d07924ad59a33a0c7951261337","integrity":"sha512-R+x/BFNjqA8STxGiNZ6aaHbDWvDigr1pEvvRhm71nmlOQ04chH9CM8Ktqef/rwLf2KNfxb8QEVqznOClgGTsGg==","tarball":"https://registry.npmjs.org/@clarityhub/gatsby-plugin-feed-generator/-/gatsby-plugin-feed-generator-2.1.2.tgz","fileCount":12,"unpackedSize":17373,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyellCRA9TVsSAnZWagAAy9kP/37pTJIU2xZ81n9A2t3v\n7UQvswyWnOMmSZqK5mKGT/KbZTYOo80ZIyWC1tVJokBHvrPAOrvWDJrJvhdv\nXngwiV5uVZLmgnbbJ2YptB5RcWgP89eL3vH9KvExIpEy1YDPbY1ycDVE8Nut\nYqp4APDKtfo2tXyF7mRW847rmGfJBe/Mizf6juWSDG1oQ6CA5EbEEADDXprc\n8DnzC9+aBwooTdlCSOrB0EoALQ9EnLzHsGhjNS7MYhqkRmHfYg6PC2tNskV+\nNb4E9KFsj+/5mAanLdslFRwu3Gegnb22vLsvusnktOog/xRBVvVY+zO5rZtc\nUDleUWNyX5IQmVtRuGDXCd07eAfXuhG+1Ld/5QC7vgBjaCEKZ/gJKsYZTQJ9\n/mxTGQMtYYSiN+uIxdJxInPSCu0ZArSFEulxxqvElOUQUVeHPXwiyKy8ZSuk\nPTs+hZbjbmy9WEOKX9j14ZwUllorEmNDtb6HVYoL1yXLFtJ8pmpF6dt6YyOc\nIKLzR15LpH5gsPjifwA2BIvP0HJoX5h8VB6o1TvM152+L5L0JBmuatRs7JC2\nzZ3qXclC+9A2FcelTE12XVCvZG2V9pMJvOh7njOgh4CaN7g/a8Fedfdz+oLx\nvSy17h1oJP3KB36tJUHbOBxycAJBK7FvN/pxlD4u4i7+GATo8hNyv1nYfZzm\nIbkx\r\n=kZ1x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDBp+QupQCwcG7eShapez1FBMmSyGEyJHT24TnJwjrAPAiB7yu3KKxBPcLaKNSmEqq5cAp/PODBtLdYrLIT/SXkBiA=="}]},"maintainers":[{"name":"idmontie","email":"idmontie@gmail.com"},{"name":"loukitzanna","email":"anna@clarityhub.io"}],"_npmUser":{"name":"idmontie","email":"idmontie@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-plugin-feed-generator_2.1.2_1573513573622_0.23483417885212154"},"_hasShrinkwrap":false},"2.1.3":{"name":"@clarityhub/gatsby-plugin-feed-generator","version":"2.1.3","description":"Generate RSS and JSON feeds for a Gatsby blog","scripts":{"build":"babel src --out-dir . ","watch":"babel -w src --out-dir . "},"author":{"name":"Mark Michon","email":"hello@markmichon.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/clarityhub/gatsby-plugin-feed-generator.git"},"keywords":["gatsby","gatsby-plugin","rss","atom","jsonfeed","feed"],"dependencies":{"@clarityhub/feed":"4.1.2","pify":"^3.0.0","url-join":"^4.0.1"},"devDependencies":{"babel-cli":"^6.26.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.0"},"_id":"@clarityhub/gatsby-plugin-feed-generator@2.1.3","dist":{"shasum":"d69abf99f4781aa0f7db73f69f0ede8563180a20","integrity":"sha512-PoUOILsymnvi0H1A/WEcE4DeZn1jQGh+gsmx40CPqK9Azx+jkBKO6D6IXzmMXd8glvWo7tY2rwFVsD5OTLtP+A==","tarball":"https://registry.npmjs.org/@clarityhub/gatsby-plugin-feed-generator/-/gatsby-plugin-feed-generator-2.1.3.tgz","fileCount":12,"unpackedSize":17373,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyernCRA9TVsSAnZWagAAmiEP/A2O+bxYZnZDDc1RIKcP\n2xF6eNzkUxoE6JffMhU509/L4U4pjShgBhEhKo5TS83fm0VbpoRc7cZS8S50\nDy76W/MKs+5xQ3vDV2FEh0pSlWr3ioRSpZlsDm1g0d9Ic8p/gWnXs1Ii5nH2\nIW0pykdq4O8puTGpqsGvwcOrUhRBh04Hv3X0NFXmdMtH0lwd1rLU9JBH6zvf\nlCxxt+PUZMysEN18NmMWp9WWgT+KknbKblitGX47M1Z8oTCBcTvpibs0bTIZ\nkAde9WcsS9bcE1RWZF/7vmX74oLj6J6XpEicjYRKu6Dleq9CfXZaQXqPEQ02\nAZb9nhumbx42VoXElHGVijTE1awvGzI1NwAVk0dmaGuJToaFzbKNJICa/8sY\nZsmL5moLoLrsQc1RKtob4/4lpqqWKz57aWJ3wyB3pJ95uo/bI4R4+9BmQNLo\nHh9ldckNP6hdQW6ATKFvckNABNemd3e4rbMIbC6R33ke7+6BKu8Ho1tdM/L9\n5xa4gWt8y7yM5nTS+bpyZaURzOqSZ8GuyxszzlSw04tXtUu0DiICE7Fg1XF/\nXCOIYl/P2xZ/CjB8PjaBwkUwFWsxKEXwF502aWVUxvd2pIKk9W/knL5XxAad\nVv3rBID1iUVEK8n//2ioFiWU56ItDKZo1LeGq54bzRde3ly3ojFPTdA/ocbi\nYdka\r\n=RuHV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBkp4ktatpQB2BYebjqhXZMSTXlQ/LpPcWEMFIwnFYegAiEAwGiB7K3QVlaAkXLfoeeUAfle3uGLm4nQG4CZnqH3fpw="}]},"maintainers":[{"name":"idmontie","email":"idmontie@gmail.com"},{"name":"loukitzanna","email":"anna@clarityhub.io"}],"_npmUser":{"name":"idmontie","email":"idmontie@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-plugin-feed-generator_2.1.3_1573513958822_0.7924461195468147"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-11T22:53:38.298Z","2.1.0":"2019-11-11T22:53:38.634Z","modified":"2022-04-04T23:12:45.655Z","2.1.1":"2019-11-11T23:04:21.804Z","2.1.2":"2019-11-11T23:06:13.708Z","2.1.3":"2019-11-11T23:12:38.934Z"},"maintainers":[{"name":"idmontie","email":"idmontie@gmail.com"},{"name":"loukitzanna","email":"anna@clarityhub.io"}],"description":"Generate RSS and JSON feeds for a Gatsby blog","keywords":["gatsby","gatsby-plugin","rss","atom","jsonfeed","feed"],"repository":{"type":"git","url":"https://github.com/clarityhub/gatsby-plugin-feed-generator.git"},"author":{"name":"Mark Michon","email":"hello@markmichon.com"},"license":"MIT","readme":"# clarityhub/gatsby-plugin-feed-generator\n\nA [Gatsby](https://gatsbyjs.org) plugin to generate [JSON Feed](https://jsonfeed.org/) and RSS feeds for generated [Gatsby](https://gatsbyjs.org) sites.\n\n## Installation and Setup\n\nTo get started, install via yarn or npm:\n\n```bash\nyarn add @clarityhub/gatsby-plugin-feed-generator\n```\n\nBasic setup requires the following minimum siteMetaData located in your `gatsby-config.js` file:\n\n```js\nsiteMetadata {\n  title: 'Gatsby',\n  description: 'A static site generator',\n  siteUrl: 'https://gatsbyjs.org',\n  author: 'Author Name'\n},\n```\n\nTo activate and configure the plugin add it to the plugins array in the gatsby config as you would any other plugin.\n\n```js\nplugins: [\n  {\n    resolve: 'gatsby-plugin-feed-generator',\n    options: {\n      //...\n    },\n  },\n]\n```\n\nVersion 1 allowed for using the built-in config, but for version 2+ you'll need to provide a siteQuery, one or more feeds, and a normalize function for each feed. This tells the plugin how to map your data onto the feeds.\n\nHere is an example using `gatsby-transformer-remark`'s `allMarkdownRemark` as a source for your content:\n\n```javascript\n\n// gatsby-config.js\n\nsiteMetadata {\n  title: 'Gatsby',\n  description: 'A static site generator',\n  siteUrl: 'https://gatsbyjs.org',\n  author: 'Author Name'\n},\nplugins: [\n  {\n    resolve: 'gatsby-plugin-feed-generator',\n    options: {\n    generator: `GatsbyJS`,\n    rss: true, // Set to true to enable rss generation\n    json: true, // Set to true to enable json feed generation\n    siteQuery: `\n      {\n        site {\n          siteMetadata {\n            title\n            description\n            siteUrl\n            author\n          }\n        }\n      }\n    `,\n    feeds: [\n      {\n        name: 'feed', // This determines the name of your feed file => feed.json & feed.xml\n        query: `\n        {\n          allMarkdownRemark(\n            sort: {order: DESC, fields: [frontmatter___date]},\n            limit: 100,\n            ) {\n            edges {\n              node {\n                html\n                frontmatter {\n                  date\n                  path\n                  title\n                }\n              }\n            }\n          }\n        }\n        `,\n        normalize: ({ query: { site, allMarkdownRemark } }) => {\n          return allMarkdownRemark.edges.map(edge => {\n            return {\n              title: edge.node.frontmatter.title,\n              date: edge.node.frontmatter.date,\n              url: site.siteMetadata.siteUrl + edge.node.frontmatter.path,\n              html: edge.node.html,\n            }\n          })\n        },\n      },\n    ],\n  },\n```\n\nThe important takeaway from the normalize function is the mapping of your graphql data onto the title, date, url, and html fields. If you have a special way of building urls, this is the place to handle that transformation before sending it to the plugin.\n\n## Recipes\n\nAbove we saw markdown used, however other formats should work as well. Here's an example using MDX:\n\n```js\n\n//...\n\nfeeds: [\n          {\n            name: 'mdx-feed',\n            query: `\n            {\n              allMdx(\n                sort: {order: DESC, fields: [frontmatter___date]},\n                limit: 100,\n                ) {\n                edges {\n                  node {\n                    html\n                    frontmatter {\n                      date\n                      path\n                      title\n                    }\n                  }\n                }\n              }\n            }\n            `,\n            normalize: ({ query: { site, allMdx } }) => {\n              return allMdx.edges.map(edge => {\n                return {\n                  title: edge.node.frontmatter.title,\n                  date: edge.node.frontmatter.date,\n                  url: site.siteMetadata.siteUrl + edge.node.frontmatter.path,\n                  html: edge.node.html,\n                }\n              })\n            },\n          },\n        ],\n\n```\n\n## Inspiration and Similar Solutions\n\nIf you're looking for something more battle-tested and only need rss, check out the official [gatsby-plugin-feed](https://www.gatsbyjs.org/packages/gatsby-plugin-feed/).\n","readmeFilename":"readme.md"}