Skip to content

druxt/druxt_drupal

Repository files navigation

DruxtJS

CircleCI

A bridge between frameworks, Drupal in the back, Nuxt.js in the front.

Features

  • A single permission for read-only access to all JSON:API resources required by DruxtJS.
  • Support for Views routes via the JSON:API Views and Decoupled Router modules.
  • Support for Contact form routes via the Decoupled Router module.
  • Improved support for Menu items via the JSON:API Menu Items module.
  • Condition plugin bypass for Block resources.
  • Enables Cross-Origin Resource Sharing (CORS) support.
  • Ensures EntityViewDisplay configuration available for DruxtSchema module.

Installation

DruxtJS requires a Nuxt.js frontend and a Drupal JSON:API backend:

Drupal

  1. Install Drupal

  2. Download the Drupal DruxtJS module:

    composer require drupal/druxt
  3. Install the DruxtJS module.

  4. Add the "access druxt resources" permission to a user/role.

Nuxt.js

  1. Install Nuxt.js

  2. Install the Nuxt.js DruxtJS Site module:

    npm i druxt-site
  3. Add the module and configuration to nuxt.config.js:

    module.exports = {
      modules: [
        'druxt-site'
      ],
      druxt: {
        baseUrl: 'https://demo-api.druxtjs.org'
      }
    }