You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-17Lines changed: 39 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,18 @@
6
6
[![codecov][codecov-src]][codecov-href]
7
7
[![License][license-src]][license-href]
8
8
9
-
> Connects Nuxt.js with Drupal via the [Lupus Custom Elements Renderer](https://www.drupal.org/project/lupus_ce_renderer)
9
+
> Connects Nuxt v3 with Drupal via the [Lupus Custom Elements Renderer](https://www.drupal.org/project/lupus_ce_renderer)
10
10
11
-
Please refer to https://stack.lupus.digital for more info.
11
+
Please refer to https://www.drupal.org/project/lupus_decoupled for more info.
12
+
13
+
The 2.x version of the module is compatible with Nuxt 3. For a Nuxt 2 compatible version, please checkout the [1.x version](https://github.com/drunomics/nuxtjs-drupal-ce/tree/1.x)
12
14
13
-
[📖 **Release Notes**](./CHANGELOG.md)
14
15
15
16
## Pre-requisites
16
17
17
18
* A [Drupal](https://drupal.org) backend with the
18
19
[Lupus Custom Elements Renderer](https://www.drupal.org/project/lupus_ce_renderer)
19
-
module installed.
20
+
module or [Lupus Decoupled Drupal](https://www.drupal.org/project/lupus_decoupled)installed.
The module defaults work well with [Lupus Decoupled Drupal](https://www.drupal.org/project/lupus_decoupled), so setting the `baseURL` is usually enough.
45
+
46
+
47
+
## Features
48
+
49
+
* Fetches pages via the custom elements API provided by the [Lupus Custom Elements Renderer](https://www.drupal.org/project/lupus_ce_renderer)
50
+
* Provides a Nuxt-wildcard route, so all Drupal pages can be rendered via Nuxt.js and vue-router.
51
+
* Integrates page metadata and the page title with Nuxt.
52
+
* Supports breadcrumbs and local tasks ("Tabs")
53
+
* Supports authenticated requests. Cookies are passed through to Drupal by default.
54
+
* Supports display of Drupal messages in the frontend.
55
+
* Provides unstyled skeleton components for getting started quickly.
56
+
* Supports fetching and display of Drupal menus via the [Rest menu items](https://www.drupal.org/project/rest_menu_items) module.
57
+
43
58
## Options
44
59
45
60
-`baseURL`: The Drupal base URL. Defaults to the `DRUPAL_BASE_URL`
46
61
environment variable if provided, otherwise to `http://localhost:8888`.
47
62
63
+
-`fetchOptions`: The default [fetchOptions](https://nuxt.com/docs/api/composables/use-fetch#params)
64
+
to apply when fetching from the Drupal. Defaults to `{ credentials: 'include' }`.
65
+
66
+
-`fetchProxyHeaders`: The HTTP request headers to pass through to Drupal, via [useRequestHeaders](https://nuxt.com/docs/api/composables/use-request-headers#userequestheaders). Defaults to `['cookie']`.
67
+
48
68
-`menuEndpoint`: The menu endpoint pattern used for fetching menus. Defaults to 'api/menu_items/$$$NAME$$$' as fitting
49
69
to the API provided by the [Rest menu items](https://www.drupal.org/project/rest_menu_items) Drupal module.
50
70
`$$$NAME$$$` is replaced by the menu name being fetched.
pages are shown instead, such that the pages can be customized with Nuxt. Defaults to `false`.
58
78
59
79
60
-
## TODO list of options (not yet implemented)
80
+
## TODO - List of 1.x options not yet implemented
61
81
62
82
-`addRequestFormat`: If set to `true`, the `_format=custom_elements` URL parameter
63
83
is added automatically to requests. Defaults to `true`.
64
84
65
85
-`useLocalizedMenuEndpoint`: If enabled, the menu endpoint will use a language prefix as configured by [nuxtjs/i18n](https://i18n.nuxtjs.org) module. Defaults to `true`.
66
86
67
-
-`useProxy`: If set to `dev-only` and nuxt is in dev-mode, the module automatically
68
-
configures `/api` to the Drupal backend via
69
-
[@nuxtjs/proxy](https://github.com/nuxt-community/proxy-module) and uses it instead of
70
-
the Drupal backend, such that there are no CORS issues. Other values supported are
71
-
`always` or false.
72
-
Note: When using `always` the module must be added to the nuxt `modules` section instead
73
-
of the `buildModules` section.
74
-
75
87
-`pageErrorHandler`: The default page error handler can be overridden.
76
88
77
89
-`menuErrorHandler`: The default menu error handler can be overridden.
78
90
79
91
80
-
## Options not supported in 2.x version
92
+
## Previous options not supported in 2.x version
81
93
82
-
-`addVueCompiler`: This is necessary if you want to render custom elements markup on runtime.
83
-
If you need this, you may find a solution in this [GitHub issue](https://github.com/nuxt/nuxt/issues/13843).
94
+
The following options were support in 1.x but got dropped:
95
+
96
+
-`addVueCompiler`: This is necessary if you want to render custom elements markup on runtime;
97
+
i.e. use the 'markup' content format. If you need this, you may find a solution in this
0 commit comments