gatsby-source-drupal-menu-links

Integrates Drupal's jsonapi_menu_items module with Gatsby

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
gatsby-source-drupal-menu-links
133.0.1a year ago3 years agoMinified + gzip package size for gatsby-source-drupal-menu-links in KB

Readme

Gatsby source Drupal menu-links

Overview

Provides gatsby integration for the Drupal JSON:API menu items module

Install

npm install --save gatsby-source-drupal-menu-links

Setup

In Drupal land 💧

  • Enable jsonapi module from core.
  • Add and enable jsonapimenuitems module
composer require "drupal/jsonapi_menu_items"
drush en -y jsonapi_menu_items

In Gatsby land 🟣

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-drupal-menu-links`,
      options: {
        baseUrl: `https://live-contentacms.pantheonsite.io/`,
        apiBase: `api`, // optional, defaults to `jsonapi`
        menus: ["main", "account"], // Which menus to fetch, there are the menu IDs.
      },
    },
  ],
}