druxt.js icon indicating copy to clipboard operation
druxt.js copied to clipboard

Better support for Metatags

Open Decipher opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. The DruxtRouter module has an unresolved @TODO for better Metatags support.

Describe the solution you'd like

  1. Investigate standard options for Metatags data in Drupal.
  2. Investigate decoupled options for Metatags data in Drupal.
  3. Investigate standard options for Metatags data in Nuxt.

Describe alternatives you've considered N/A

Additional context Drupal:

  • https://www.drupal.org/project/metatag
  • https://www.drupal.org/project/decoupled_kit (has Metatag support)
  • https://www.drupal.org/project/jsonapi_hypermedia

Nuxt:

  • https://nuxtjs.org/docs/2.x/features/meta-tags-seo
  • https://github.com/AlekseyPleshkov/nuxt-social-meta

Druxt:

  • https://github.com/druxt/druxt-router/blob/develop/src/components/DruxtRouter.vue#L75-L77

Decipher avatar Jul 17 '21 23:07 Decipher

stack.lupus.digital handles metatags by grouping them into "backend" and "frontend" ones. The page API provides backend metatags which get added/removed when navigating changes, while the frontend metatags persist.

The metatags supported are simply fetched from metatag module, that has been fine so far.

fago avatar Aug 25 '21 20:08 fago

Metatag not being in Drupal core is my biggest holdup on this.

I don't think that the Metatag module should be a dependency of the Drupal module, but I think that maybe some contrib modules like druxt_metatag could exist to handle dependency management.

But it should be easy enough for the Router module to consume the metatags endpoint if it's present.

The other question is how best to allow the customisation of the metatags.

Decipher avatar Aug 26 '21 08:08 Decipher