From e6e6992cffa95c993db10b0af9faa0423a4dd71d Mon Sep 17 00:00:00 2001 From: Florian Kissling <21834+fk@users.noreply.github.com> Date: Mon, 9 Oct 2023 10:24:25 +0200 Subject: [PATCH] chore(source-npm-package-search): bespoke treatment for `plugin-gatsby-cloud` and `source-contentful` (#38619) Adjust `source-npm-package-search` to pick up READMEs for - `gatsby-plugin-gatsby-cloud` - `gatsby-source-contentful` from unpkg.com instead of Algolia's outdated `npm-search` to make information from - https://github.com/gatsbyjs/gatsby/pull/38480 - https://github.com/gatsbyjs/gatsby/pull/38479 accessible to gatsbyjs.com users. (cherry picked from commit d44ada77c1a37ddc37410ba20d1dd351a2623482) --- .../gatsby-source-npm-package-search/src/gatsby-node.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/gatsby-source-npm-package-search/src/gatsby-node.js b/packages/gatsby-source-npm-package-search/src/gatsby-node.js index cbd9219491b98..7d1e7e879dae5 100644 --- a/packages/gatsby-source-npm-package-search/src/gatsby-node.js +++ b/packages/gatsby-source-npm-package-search/src/gatsby-node.js @@ -89,7 +89,11 @@ exports.sourceNodes = async ( hits.map(async hit => { const parentId = createNodeId(`plugin ${hit.objectID}`) - if (!hit.readme) { + if ( + !hit.readme || + hit.objectID === `gatsby-plugin-gatsby-cloud` || + hit.objectID === `gatsby-source-contentful` + ) { try { hit.readme = ( await got.get(