{"id":23124869,"url":"https://github.com/hutsoninc/gatsby-plugin-csv-feed","last_synced_at":"2025-08-17T03:32:18.652Z","repository":{"id":57244608,"uuid":"191994096","full_name":"hutsoninc/gatsby-plugin-csv-feed","owner":"hutsoninc","description":"Gatsby plugin for creating CSV data feeds.","archived":false,"fork":false,"pushed_at":"2021-11-11T22:20:14.000Z","size":293,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T06:07:57.732Z","etag":null,"topics":["ads","adwords","csv","data","feed","gatsby","gatsby-plugin","google","tsv"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hutsoninc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-14T19:13:12.000Z","updated_at":"2021-11-12T14:16:55.000Z","dependencies_parsed_at":"2022-09-01T06:30:25.726Z","dependency_job_id":null,"html_url":"https://github.com/hutsoninc/gatsby-plugin-csv-feed","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/hutsoninc/gatsby-plugin-csv-feed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hutsoninc%2Fgatsby-plugin-csv-feed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hutsoninc%2Fgatsby-plugin-csv-feed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hutsoninc%2Fgatsby-plugin-csv-feed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hutsoninc%2Fgatsby-plugin-csv-feed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hutsoninc","download_url":"https://codeload.github.com/hutsoninc/gatsby-plugin-csv-feed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hutsoninc%2Fgatsby-plugin-csv-feed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270802985,"owners_count":24648682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ads","adwords","csv","data","feed","gatsby","gatsby-plugin","google","tsv"],"created_at":"2024-12-17T08:11:44.177Z","updated_at":"2025-08-17T03:32:18.392Z","avatar_url":"https://github.com/hutsoninc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gatsby-plugin-csv-feed\n\n[![Current npm package version](https://img.shields.io/npm/v/gatsby-plugin-csv-feed.svg)](https://www.npmjs.com/package/gatsby-plugin-csv-feed) \n\nGatsby plugin for creating CSV feeds. Can be used for creating dynamic Google Data Feeds, Facebook Catalog Feeds, Page Feeds, and feeds for other integrations. Uses [`json2csv`](https://github.com/zemirco/json2csv) to generate CSVs.\n\n## Installing\n\n`npm install --save gatsby-plugin-csv-feed`\n\n## Usage\n\nHere's an example of how to create a [Custom Google Data Feed](https://support.google.com/google-ads/answer/6053288):\n\n```js\n// In your gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-plugin-csv-feed',\n      options: {\n        // Query to pass to all feed serializers (optional)\n        query: `\n          {\n            site {\n              siteMetadata {\n                siteUrl\n              }\n            }\n          }\n        `,\n        // Options to pass to `json2csv` parser for all feeds (optional)\n        parserOptions: {},\n        // Feeds\n        feeds: [\n          {\n            // Individual feed query\n            query: `\n              {\n                allMarkdownRemark {\n                  edges {\n                    node {\n                      frontmatter {\n                        id\n                        title\n                        description\n                        category\n                        keywords\n                        price\n                        image\n                      }\n                      fields {\n                        slug\n                      }\n                    }\n                  }\n                }\n              }\n            `,\n            serialize: ({ query: { site, allMarkdownRemark } }) =\u003e {\n              return allMarkdownRemark.edges.map(edge =\u003e {\n                const node = Object.assign({}, edge.node.frontmatter, edge.node.fields);\n                return {\n                  'ID': node.id,\n                  'Item title': node.title,\n                  'Item description': node.description,\n                  'Image URL': `${site.siteMetadata.siteUrl}${node.image}`,\n                  'Price': `${Number(node.price).toLocaleString('en-US')} USD`,\n                  'Item Category': node.category,\n                  'Contextual keywords': node.keywords.join(';'),\n                  'Final URL': `${site.siteMetadata.siteUrl}${node.slug}`,\n                };\n              });\n            },\n            // Output file\n            output: '/product-feed.csv',\n            // Options to pass to `json2csv` parser for this feed (optional)\n            parserOptions: {},\n          },\n        ],\n      },\n    },\n  ]\n}\n```\n\n### Passing parser options to `json2csv`\n\nAdditional options may be passed to `json2csv` via the `parserOptions` field. Pass `parserOptions` to all feeds by adding it to the plugin options object or to an individual feed by adding it to the feed object. Feed `parserOptions` take precedence over plugin `parserOptions`.\n\nTo see a list of available options, [view the `JavaScript Module` section of the `json2csv` package](https://github.com/zemirco/json2csv#javascript-module).\n\n## License\n\nMIT © [Hutson Inc](https://www.hutsoninc.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhutsoninc%2Fgatsby-plugin-csv-feed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhutsoninc%2Fgatsby-plugin-csv-feed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhutsoninc%2Fgatsby-plugin-csv-feed/lists"}