Skip to content

everythinginjs/gatsby-source-menus-strapi-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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
        menuID: '', // leave it empty string for all menu population ,otherwise add your menu id number
      },
    },
  ],
}

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

About

source the data of menus strapi plugin into Gatsby graphql.

Resources

Stars

Watchers

Forks

Packages

No packages published