See what's launched

The next gen Gatsby is here Performance, developer velocity, and scaling to meet Enterprise needs - See what’s launched

Sign Up for Free
Community Plugin
View plugin on GitHub

Gatsby source menus strapi plugin

The package helps you to fetch data from strapi plugin menus into GatsbyJs as graphql nodes.

Install

yarn add gatsby-source-menus-strapi-plugin

How to use

gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-menus-strapi-plugin`,
      options: {
        apiURL: `http://localhost:1337`,
        menusEndpoint: `menus`,
        nested: true, // default to false
      },
    },
  ],
}

Strapi plugin menus example

Top level menus

strapi plugin menus - menu manager

Nested menus

strapi plugin menus - nested menus

Gatsby GraphiQl example

strapi plugin menus - nested menus

© 2022 Gatsby, Inc.