Out-of-the-box decoupled Drupal sites with DruxtSite, wiring layout, blocks, menus and content together from one Nuxt module.
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.

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
-
Install the package:
npm i druxt-site -
Add the module to
nuxt.config.js:export default { modules: ['druxt-site'], };
Options
-
druxt.site.layoutType:
boolean
Default:trueAdds a default layout if no default layout has been provided.
-
druxt.site.themeType:
stringSets the default theme to be used by the DruxtSite component. Theme can be overridden by the
themeproperty 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" />
- For more details, refer to the DruxtSite API documentation.
Options
Base Druxt options
These options are available to all Druxt modules.
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
axios | object | No | {} | Axios instance settings. |
baseUrl | string | Yes | null | Base URL for the Drupal installation. |
endpoint | string | No | /jsonapi | JSON:API Endpoint of the Drupal installation. |
Note: The contents of this file were automatically generated from the packages/site/README.md.