Skip to content

Render Drupal blocks and block regions in Nuxt with the druxt-blocks components, themed through the Druxt component suggestion system.

DruxtBlocksNuxtModule

View source on GitHub

DruxtBlocksNuxtModule(moduleOptions)

The Nuxt.js module function.

  • Adds the Vue.js components to the Nuxt.js frontend.

The module function should not be used directly, but rather installed via your Nuxt.js configuration file.

Options are set on the root level druxt Nuxt.js config object.

Kind: global function

ParamTypeDescription
moduleOptionsobjectNuxt.js module options object.

Example

// `nuxt.config.js`
module.exports = {
  modules: [
    'druxt-blocks'
  ],
  druxt: {
    baseUrl: 'https://demo-api.druxtjs.org'
  }
}