Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
druxt-entity
Advanced tools
The DruxtJS Entity module provides a Drupal Display Mode powered Entity and Field component system for your NuxtJS frontend.
$ npm install druxt-entity
Add module to nuxt.config.js
module.exports = {
modules: [
...
'druxt-entity',
'druxt-router'
],
druxt: {
baseUrl: 'https://demo-api.druxtjs.org',
entity: {
suggestions: []
}
}
}
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. |
These options are specific to this module.
Option | Type | Required | Default | Description |
---|---|---|---|---|
entity.suggestions | array | No | [] | Array of component suggestions. |
Both the <druxt-entity />
and <druxt-field />
components utilize a component suggestion system.
The first suggestion to match a registered Vue component will be used to render the relevant component.
You can provide additional suggestions via the below configuration options.
Option | Type | Required | Default | Description |
---|---|---|---|---|
entity.suggestions[n].type | string | No | null | Component type. E.g., entity , field |
entity.suggestions[n].value | function , string | No | null | A String or Function that returns a String containing a suggested Component to render. |
Example:
druxt: {
entity: {
suggestions: [
{
type: 'entity',
value: ctx => {
// If Homepage route and entity...
if (ctx.route.isHomePath && ctx.route.props.uuid === ctx.entity.id) {
// DruxtEntityHome
return ctx.tokens.prefix + 'Home'
}
}
}
]
}
}
FAQs
Drupal Display Mode powered Entity, Form and Field Druxt components.
We found that druxt-entity demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.