Skip to content

Commit

Permalink
chore(source-npm-package-search): bespoke treatment for `plugin-gatsb…
Browse files Browse the repository at this point in the history
…y-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

- #38480
- #38479

accessible to gatsbyjs.com users.

(cherry picked from commit d44ada7)
  • Loading branch information
fk authored and pieh committed Oct 9, 2023
1 parent aff105b commit e6e6992
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/gatsby-source-npm-package-search/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e6e6992

Please sign in to comment.