Update metatags default

Created on 14 June 2023, about 1 year ago
Updated 16 May 2024, about 1 month ago

Problem/Motivation

ATM the defaults contain overwrites for each content type compared to the main content metatag config. This is kinda pointless, since as soon as something is set on global or content level, lower-level overrides actually inherit everything that is not overridden. The overrides per content types can be gone for most.

Also content by default contains schema.org article, which is not correct, that should only be there for news. Events don't have default schema.org config.

We also show all metatag groups for all content types, which should not be done, if we want stuff easier out of the box. So e.g. events should not have most schema.org stuff, besides schema.org event then.

Proposed resolution

* Front page

- Enable the overrides.
- Add the following tags:

description: '[node:field_description]'
abstract: '[node:field_description]'
og_description: '[node:field_description]'
twitter_cards_type: summary_large_image

* Global

- Add the following tags

schema_web_page_type: WebPage
schema_web_page_breadcrumb: 'Yes'
og_image_width: '600'
og_image_height: '315'

* Node

- Remove Content: Page overrides (metatag.metatag_defaults.node__page.yml)
- Replace og_image_url with og_image
- Add the following tags

og_image_width: '[node:field_media_canonical_image:entity:field_media_image:social_large:width]'
og_image: '[node:field_media_canonical_image:entity:field_media_image:social_large:url]'
og_image_height: '[node:field_media_canonical_image:entity:field_media_image:social_large:height]'
og_image_alt: '[node:field_media_canonical_image:entity:field_media_image:0:alt]'
schema_article_type: Article
πŸ“Œ Task
Status

Needs review

Version

6.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium ducktape

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024