All Projects → drunomics → nuxtjs-drupal-ce

drunomics / nuxtjs-drupal-ce

Licence: MIT license
A Nuxt.js module to easily connect Drupal via custom elements.

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects

Projects that are alternatives of or similar to nuxtjs-drupal-ce

nuxt-rollbar-module
Nuxt.js module for Rollbar
Stars: ✭ 34 (+142.86%)
Mutual labels:  nuxt-module
shila-drupal-theme
Atomic design and Pattern Lab friendly, component-based, fairly unopinionated starting point for new Drupal themes
Stars: ✭ 81 (+478.57%)
Mutual labels:  drupal
cli
Acquia CLI
Stars: ✭ 30 (+114.29%)
Mutual labels:  drupal
nuxt-humans-txt
🧑🏻👩🏻 "We are people, not machines" - An initiative to know the creators of a website. Contains the information about humans to the web building - A Nuxt Module to statically integrate and generate a humans.txt author file - Based on the HumansTxt Project.
Stars: ✭ 27 (+92.86%)
Mutual labels:  nuxt-module
jDrupal
A JavaScript Library and API for Drupal Applications
Stars: ✭ 77 (+450%)
Mutual labels:  drupal
nuxt-stripejs
💳 NuxtJS module for Stripe.js which loads only when required and w/ retry mechanism
Stars: ✭ 17 (+21.43%)
Mutual labels:  nuxt-module
drupal-dev-docker
An opinionated Drupal development environment based on Docker.
Stars: ✭ 22 (+57.14%)
Mutual labels:  drupal
nuxt-stencil
Easy Stencil.js component library integration with Nuxt.js.
Stars: ✭ 16 (+14.29%)
Mutual labels:  nuxt-module
supabase
An easy way to integrate Supabase with NuxtJS
Stars: ✭ 39 (+178.57%)
Mutual labels:  nuxt-module
drupal-pi
Drupal on Docker on a Raspberry Pi. Pi Dramble's little brother.
Stars: ✭ 92 (+557.14%)
Mutual labels:  drupal
drupal-php
PHP docker container image for Drupal
Stars: ✭ 56 (+300%)
Mutual labels:  drupal
webapp-wordlists
This repository contains wordlists for each versions of common web applications and content management systems (CMS). Each version contains a wordlist of all the files directories for this version.
Stars: ✭ 306 (+2085.71%)
Mutual labels:  drupal
nuxt-sanity
Easily integrate Sanity in your Nuxt.js project.
Stars: ✭ 14 (+0%)
Mutual labels:  nuxt-module
awesome-sysadmin-tools
Collection of links and resources for sysadmins and Drupal lovers
Stars: ✭ 17 (+21.43%)
Mutual labels:  drupal
drevops
💧 + 🐳 + ✓✓✓ + 🤖 + ❤️ Build, Test, Deploy scripts for Drupal using Docker and CI/CD
Stars: ✭ 55 (+292.86%)
Mutual labels:  drupal
drupal
Vanilla Drupal docker container image
Stars: ✭ 19 (+35.71%)
Mutual labels:  drupal
migrate source example
Example module for Drupal 8 that provides migrations of users, terms, files and nodes from database, JSON resources, CSV and XML files. #migrate
Stars: ✭ 39 (+178.57%)
Mutual labels:  drupal
dockerized-drupal-starter
End-to-end (CI + CD) dockerized Drupal 8 starting point.
Stars: ✭ 27 (+92.86%)
Mutual labels:  drupal
WunderTools
Project reference configuration for use with Ansible & Vagrant
Stars: ✭ 18 (+28.57%)
Mutual labels:  drupal
nuxt-jsonld
A Nuxt.js module to manage JSON-LD in Vue component.
Stars: ✭ 198 (+1314.29%)
Mutual labels:  nuxt-module

nuxtjs-drupal-ce - Nuxt.js Drupal Custom Elements Connector

npm version npm downloads ci codecov License

Connects Nuxt.js with Drupal via the Lupus Custom Elements Renderer

Please refer to https://stack.lupus.digital for more info.

📖 Release Notes

Pre-requisites

Setup

  1. Add nuxtjs-drupal-ce dependency to your Nuxt.js project
yarn add nuxtjs-drupal-ce # or npm install nuxtjs-drupal-ce
  1. Add nuxtjs-drupal-ce to the modules section of nuxt.config.js
{
  buildModules: [
    'nuxtjs-drupal-ce',
  ],
  'drupal-ce', {
    baseURL: 'https://your-drupal.example.com',
    // more options...
  }
}
  1. Get started quickly by scaffolding initial files:
rm -f layouts/default.vue && $(npm bin)/nuxt-drupal-ce-init

You may also take a look at the example project.

Options

  • baseURL: The Drupal base URL. Defaults to the DRUPAL_BASE_URL environment variable if provided, otherwise to http://localhost:8888.

  • addRequestFormat: If set to true, the _format=custom_elements URL parameter is added automatically to requests. Defaults to true.

  • addRequestContentFormat: If specified, the given value is added as _content_format URL parameter to requests. Disabled by default.

  • addVueCompiler: If enabled, the Vue compiler is added to the runtime build. This is necessary if you want to render custom elements markup on runtime. Defaults to true.

  • menuEndpoint: The menu endpoint pattern used for fetching menus. Defaults to 'api/menu_items/$$$NAME$$$' as fitting to the API provided by the Rest menu items Drupal module. $$$NAME$$$ is replaced by the menu name being fetched. To enable menu fetching, un-comment the nuxtServerInit action in store/init.js.

  • useProxy: If set to dev-only and nuxt is in dev-mode, the module automatically configures /api to the Drupal backend via @nuxtjs/proxy and uses it instead of the Drupal backend, such that there are no CORS issues. Other values supported are always or false. Note: When using always the module must be added to the nuxt modules section instead of the buildModules section.

  • axios: Options to pass-through to the drupal-ce axios instance.

  • customErrorPages: By default, error pages provided by Drupal (e.g. 403, 404 page) are shown, while keeping the right status code. By enabling customErrorPages, the regular Nuxt error pages are shown instead, such that the pages can be customized with Nuxt. Defaults to false.

Known issues

Decoding HTML entities in plain-text strings

Vue2 has known problem when decoding HTML entities of plain-text strings that are delivered as custom element attributes. While it correctly decodes some HTML-encoded characters, it does not handle all of them.

The problem has been fixed in Vue3.

Filter "decodeSpecialChars"

For Vue2, this nuxt-module provides a Vue filter that can be used to work-a-round the issue. Consider "teaser-text" being a prop containing a plain-text string. In that case, it's recommended to use the provided filter:

{{ teaserText | decodeSpecialChars }}

Development

  1. Clone this repository
  2. Install dependencies using yarn install or npm install
  3. Start development server using npm run dev

Testing

Run npm run test or yarn test.

License

MIT License

Credits

Development sponsored by drunomics [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].