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) (#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 <21834+fk@users.noreply.github.com>
  • Loading branch information
gatsbybot and fk committed Oct 9, 2023
1 parent aff105b commit 4dc464b
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 4dc464b

Please sign in to comment.