From 7957643fd1db77139eca802398c22ce8fe23ea54 Mon Sep 17 00:00:00 2001 From: Florian Kissling Date: Fri, 6 Oct 2023 21:38:09 +0200 Subject: [PATCH] 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. --- .../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(