From dc9d8d2220887ffd4daf01a8af200a2bbcbac74e Mon Sep 17 00:00:00 2001 From: Stuart Clark Date: Fri, 14 Oct 2022 00:26:11 +0000 Subject: [PATCH] chore: update druxt config --- nuxt/nuxt.config.js | 69 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/nuxt/nuxt.config.js b/nuxt/nuxt.config.js index 0cceeba..75e8f36 100644 --- a/nuxt/nuxt.config.js +++ b/nuxt/nuxt.config.js @@ -45,11 +45,72 @@ export default { // DruxtJS: https://druxtjs.org druxt: { + // The baseUrl of the Druxt enabled Drupal JSON:API server. baseUrl, - // Disable deprecated Entity fields. - entity: { components: { fields: false }}, - // Set the default theme to render Site regions. - site: { theme: 'olivero' }, + + // Set the JSON:API endpoint, `/jsonapi` by default. + // endpoint: '/jsonapi' + + // DruxtEntity module settings; https://druxtjs.org/modules/entity + entity: { + // Disable the deprecated DruxtField components. + components: { fields: false }, + + query: { + // Enable Drupal display mode schema based filtering of the JSON:API + // resource to reduce query size. + // schema: true, + }, + }, + + // DruxtMenu module settings; https://druxtjs.org/modules/menu + menu: { + // Disable JSON:API Menu Items support. Enabled by the DruxtSite module. + // jsonApiMenuItems: false + }, + + // Druxt proxy settings. + proxy: { + // Proxy the JSON:API request via the Nuxt proxy to prevent CORS issues. + api: true + + // Proxy the Drupal files system, using `sites/default/files` by default. + // Disable the proxy, or set a specific site to proxy. + // files: 'domain.tld' + }, + + // DruxtRouter module settings; https://druxtjs.org/modules/router + router: { + // Experimental; Disable the DruxtRouter page middleware, removing routing + // requests and server side redirects. Doing this allows Full Static + // builds without the need of a live Drupal backend. The Route is still + // is retrieved by the fetch hook instead. + middleware: false + + // Disable the wildcard router, which is enabled by default in the + // DruxtSite module. This allows more fine grained control over your + // routing. + // wildcard: false + }, + + // DruxtSite module settings; https://druxtjs.org/modules/site + site: { + // Disable the DruxtSite default layout. + // layout: false, + + // Set the backend theme for DruxtBlock layouts. + theme: 'olivero' + }, + + // DruxtViews module settings; https://druxtjs.org/modules/views + views: { + query: { + // Filter the View results using the Views bundle filter, if available. + // This reduces requests to just ID and type, and can be done manually + // if the bundle filter has not been set in Drupal. + bundleFilter: true, + } + } }, // Build Configuration: https://go.nuxtjs.dev/config-build