Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

gatsby-source-wikipedia

Source plugin for pulling articles from any wiki api. Based off gatsby-source-wikipedia

Install

npm install gatsby-source-wikipedia

How to use

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: "gatsby-source-wiki",
      options: {
        // For each query, the plugin will go to Wikipedia's API and search for the query
        // and fetch the top articles to the specified limit.
        apiUrl: 'minecraft.gamepedia.com',
        queries: [
          {
            query: `steve`,
            limit: 5,
          },
          {
            query: `melon`,
            limit: 10,
          },
          {
            query: `dirt`,
            limit: 10,
          },
        ],
      },
    },
  ],
}
© 2024 Gatsby, Inc.