Skip to content

Out-of-the-box decoupled Drupal sites with DruxtSite, wiring layout, blocks, menus and content together from one Nuxt module.

CI Known Vulnerabilities codecov npm

DruxtSite is the whole framework in one module. Install it and you get routing, entities, blocks, menus, views and breadcrumbs preconfigured: the DruxtSite component renders your Drupal theme's regions and content using Drupal's own display configuration. Start here if you want a decoupled Drupal site rather than individual building blocks.

Drupal Umami Parity demo

Features

  • Router with path alias and redirect support for Entity and Views pages.
  • Vuex based, on-demand JSON:API resource loading.
  • Entity / Field render system powered by Drupal display modes.
  • Block region and Content block component rendering.
  • Views and Views blocks via the Drupal JSON:API Views module.
  • Breadcrumb, Menus and more.
  • File Proxy enabled by default, and support for API proxying.

Installation

  1. Install the package:

    npm i druxt-site
    
  2. Add the module to nuxt.config.js:

    export default {
      modules: ['druxt-site'],
    };
    

Options

  • druxt.site.layout

    Type: boolean
    Default: true

    Adds a default layout if no default layout has been provided.

  • druxt.site.theme

    Type: string

    Sets the default theme to be used by the DruxtSite component. Theme can be overridden by the theme property on the component.
    If no value is provided, a fallback value will be determined from the JSON:API.


Vue.js components

DruxtSite

Renders all available block regions based on the specified theme.

<DruxtSite :theme="theme" />

Options

Base Druxt options

These options are available to all Druxt modules.

OptionTypeRequiredDefaultDescription
axiosobjectNo{}Axios instance settings.
baseUrlstringYesnullBase URL for the Drupal installation.
endpointstringNo/jsonapiJSON:API Endpoint of the Drupal installation.

Note: The contents of this file were automatically generated from the packages/site/README.md.