Community Plugin
View plugin on GitHub

gatsby-source-strapi-plugin-navigation-v3

This plugin sources the strapi-plugin-navigation.

It support custom names and independent navigation types per navigation.

Install

yarn:

yarn add gatsby-source-strapi-plugin-navigation-v3

npm:

npm install gatsby-source-strapi-plugin-navigation-v3

How to use

// gatsby-config.js
 {
   resolve: "gatsby-source-strapi-plugin-navigation-v3",
   options: {
     apiURL: process.env.STRAPI_API_URL,
     navigations: [
       //  array of navigation end-points
       {
         name: "MainNavigation", // optional
         slugOrId: "navigation",
         type: "tree"
       },
     ],
     token: process.env.STRAPI_TOKEN,
    // Optional, useful when navigation subitems are optional 
     schemaForOptionalRelatedFields: `
              slug:  String
              title: String
            `
   },
 }

Credits

Edited plugin gatsby-source-strapi-plugin-navigation-v2 for own purposes.

© 2022 Gatsby, Inc.