Skip to content

Commit 4dc464b

Browse files
gatsbybotfk
andauthored
chore(source-npm-package-search): bespoke treatment for plugin-gatsby-cloud and source-contentful (#38619) (#38622)
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 - #38480 - #38479 accessible to gatsbyjs.com users. (cherry picked from commit d44ada7) Co-authored-by: Florian Kissling <[email protected]>
1 parent aff105b commit 4dc464b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/gatsby-source-npm-package-search/src/gatsby-node.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ exports.sourceNodes = async (
8989
hits.map(async hit => {
9090
const parentId = createNodeId(`plugin ${hit.objectID}`)
9191

92-
if (!hit.readme) {
92+
if (
93+
!hit.readme ||
94+
hit.objectID === `gatsby-plugin-gatsby-cloud` ||
95+
hit.objectID === `gatsby-source-contentful`
96+
) {
9397
try {
9498
hit.readme = (
9599
await got.get(

0 commit comments

Comments
 (0)