From ace03769697ac9af1f51488743bfb891f5b49392 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 14 Apr 2024 00:47:11 +0100 Subject: [PATCH] Add metatag module --- composer.json | 1 + composer.lock | 69 ++++++++++++++++++- ....entity_form_display.node.page.default.yml | 15 ++++ ....entity_view_display.node.page.default.yml | 29 +++++++- ...e.entity_view_display.node.page.teaser.yml | 2 + config/sync/core.extension.yml | 2 + .../field.field.node.page.field_meta_tags.yml | 21 ++++++ .../field.storage.node.field_meta_tags.yml | 19 +++++ config/sync/metatag.metatag_defaults.403.yml | 12 ++++ config/sync/metatag.metatag_defaults.404.yml | 11 +++ .../sync/metatag.metatag_defaults.front.yml | 11 +++ .../sync/metatag.metatag_defaults.global.yml | 11 +++ config/sync/metatag.metatag_defaults.node.yml | 12 ++++ ...metatag.metatag_defaults.taxonomy_term.yml | 12 ++++ config/sync/metatag.metatag_defaults.user.yml | 12 ++++ config/sync/metatag.settings.yml | 8 +++ 16 files changed, 245 insertions(+), 2 deletions(-) create mode 100644 config/sync/field.field.node.page.field_meta_tags.yml create mode 100644 config/sync/field.storage.node.field_meta_tags.yml create mode 100644 config/sync/metatag.metatag_defaults.403.yml create mode 100644 config/sync/metatag.metatag_defaults.404.yml create mode 100644 config/sync/metatag.metatag_defaults.front.yml create mode 100644 config/sync/metatag.metatag_defaults.global.yml create mode 100644 config/sync/metatag.metatag_defaults.node.yml create mode 100644 config/sync/metatag.metatag_defaults.taxonomy_term.yml create mode 100644 config/sync/metatag.metatag_defaults.user.yml create mode 100644 config/sync/metatag.settings.yml diff --git a/composer.json b/composer.json index 95879b5..159d6d8 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,7 @@ "drupal/inline_entity_form": "^3.0@RC", "drupal/layout_builder_modal": "^1.2", "drupal/markdown": "^3.0", + "drupal/metatag": "^2.0", "drupal/paragraphs": "^1.17", "drupal/pathauto": "^1.12", "drupal/plausible": "^2.1", diff --git a/composer.lock b/composer.lock index f2b7df3..5889665 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1826609e28003243062028a9dbbb43bf", + "content-hash": "5c895fe7237c9b57c482ea50847e0bc8", "packages": [ { "name": "asm89/stack-cors", @@ -2126,6 +2126,73 @@ "issues": "https://www.drupal.org/project/markdown" } }, + { + "name": "drupal/metatag", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/metatag.git", + "reference": "2.0.0" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/metatag-2.0.0.zip", + "reference": "2.0.0", + "shasum": "2966c854d982b7069b1c0111519427990ebbad40" + }, + "require": { + "drupal/core": "^9.4 || ^10", + "drupal/token": "^1.0", + "php": ">=8.0" + }, + "require-dev": { + "drupal/devel": "^4.0 || ^5.0", + "drupal/hal": "^9 || ^1 || ^2", + "drupal/metatag_dc": "*", + "drupal/metatag_open_graph": "*", + "drupal/page_manager": "^4.0", + "drupal/redirect": "^1.0", + "drupal/webprofiler": "^9 || ^10", + "mpyw/phpunit-patch-serializable-comparison": "*" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "2.0.0", + "datestamp": "1692368265", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "See contributors", + "homepage": "https://www.drupal.org/node/640498/committers", + "role": "Developer" + }, + { + "name": "Dave Reid", + "homepage": "https://www.drupal.org/user/53892" + } + ], + "description": "Manage meta tags for all entities.", + "homepage": "https://www.drupal.org/project/metatag", + "keywords": [ + "Drupal", + "seo" + ], + "support": { + "source": "https://git.drupalcode.org/project/metatag", + "issues": "https://www.drupal.org/project/issues/metatag", + "docs": "https://www.drupal.org/docs/8/modules/metatag" + } + }, { "name": "drupal/paragraphs", "version": "1.17.0", diff --git a/config/sync/core.entity_form_display.node.page.default.yml b/config/sync/core.entity_form_display.node.page.default.yml index ebf8c7d..112d37f 100644 --- a/config/sync/core.entity_form_display.node.page.default.yml +++ b/config/sync/core.entity_form_display.node.page.default.yml @@ -4,9 +4,11 @@ status: true dependencies: config: - field.field.node.page.body + - field.field.node.page.field_meta_tags - field.field.node.page.layout_builder__layout - node.type.page module: + - metatag - path - text _core: @@ -32,6 +34,14 @@ content: region: content settings: { } third_party_settings: { } + field_meta_tags: + type: metatag_firehose + weight: 121 + region: content + settings: + sidebar: true + use_details: true + third_party_settings: { } path: type: path weight: 30 @@ -77,5 +87,10 @@ content: size: 60 placeholder: '' third_party_settings: { } + url_redirects: + weight: 50 + region: content + settings: { } + third_party_settings: { } hidden: layout_builder__layout: true diff --git a/config/sync/core.entity_view_display.node.page.default.yml b/config/sync/core.entity_view_display.node.page.default.yml index 3cda7bf..73333d3 100644 --- a/config/sync/core.entity_view_display.node.page.default.yml +++ b/config/sync/core.entity_view_display.node.page.default.yml @@ -4,9 +4,13 @@ status: true dependencies: config: - field.field.node.page.body + - field.field.node.page.field_meta_tags + - field.field.node.page.layout_builder__layout - node.type.page module: - layout_builder + - layout_discovery + - metatag - text - user third_party_settings: @@ -44,6 +48,21 @@ third_party_settings: entity: layout_builder.entity weight: 1 additional: { } + cd7c5e71-904a-48c1-bef1-d34d622c2c60: + uuid: cd7c5e71-904a-48c1-bef1-d34d622c2c60 + region: content + configuration: + id: 'field_block:node:page:field_meta_tags' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: metatag_empty_formatter + label: above + settings: { } + third_party_settings: { } + weight: 2 + additional: { } third_party_settings: { } _core: default_config_hash: M_Y8L5tfmhx7DR143E05YyZSpvgil6VFvqcfBWykalg @@ -59,9 +78,17 @@ content: third_party_settings: { } weight: 100 region: content + field_meta_tags: + type: metatag_empty_formatter + label: above + settings: { } + third_party_settings: { } + weight: 102 + region: content links: settings: { } third_party_settings: { } weight: 101 region: content -hidden: { } +hidden: + layout_builder__layout: true diff --git a/config/sync/core.entity_view_display.node.page.teaser.yml b/config/sync/core.entity_view_display.node.page.teaser.yml index d20fafe..3d2df9a 100644 --- a/config/sync/core.entity_view_display.node.page.teaser.yml +++ b/config/sync/core.entity_view_display.node.page.teaser.yml @@ -5,6 +5,7 @@ dependencies: config: - core.entity_view_mode.node.teaser - field.field.node.page.body + - field.field.node.page.field_meta_tags - field.field.node.page.layout_builder__layout - node.type.page module: @@ -29,4 +30,5 @@ content: weight: 101 region: content hidden: + field_meta_tags: true layout_builder__layout: true diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index e873b82..dfa6e7f 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -35,6 +35,8 @@ module: link: 0 menu_link_content: 0 menu_ui: 0 + metatag: 0 + metatag_open_graph: 0 mysql: 0 node: 0 opdavies_talks: 0 diff --git a/config/sync/field.field.node.page.field_meta_tags.yml b/config/sync/field.field.node.page.field_meta_tags.yml new file mode 100644 index 0000000..ccea396 --- /dev/null +++ b/config/sync/field.field.node.page.field_meta_tags.yml @@ -0,0 +1,21 @@ +uuid: 011fa2d8-4b26-4d35-aae9-5dd8ed67c581 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_meta_tags + - node.type.page + module: + - metatag +id: node.page.field_meta_tags +field_name: field_meta_tags +entity_type: node +bundle: page +label: 'Meta tags' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: metatag diff --git a/config/sync/field.storage.node.field_meta_tags.yml b/config/sync/field.storage.node.field_meta_tags.yml new file mode 100644 index 0000000..cec58f5 --- /dev/null +++ b/config/sync/field.storage.node.field_meta_tags.yml @@ -0,0 +1,19 @@ +uuid: 92a28821-a06f-4618-86c8-285786913470 +langcode: en +status: true +dependencies: + module: + - metatag + - node +id: node.field_meta_tags +field_name: field_meta_tags +entity_type: node +type: metatag +settings: { } +module: metatag +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/metatag.metatag_defaults.403.yml b/config/sync/metatag.metatag_defaults.403.yml new file mode 100644 index 0000000..f3808f6 --- /dev/null +++ b/config/sync/metatag.metatag_defaults.403.yml @@ -0,0 +1,12 @@ +uuid: 3f5d127c-db0b-476a-b372-fd1752d1bf60 +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: RDCkFL0NDt75Gwioooxo1iuA1S50xTVsBOgX__c6wTw +id: '403' +label: '403 access denied' +tags: + robots: noindex + canonical_url: '[site:url]' + shortlink: '[site:url]' diff --git a/config/sync/metatag.metatag_defaults.404.yml b/config/sync/metatag.metatag_defaults.404.yml new file mode 100644 index 0000000..0ead1bf --- /dev/null +++ b/config/sync/metatag.metatag_defaults.404.yml @@ -0,0 +1,11 @@ +uuid: 3296608f-4b6e-46f7-a603-ae1ea326bdf7 +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: puBstSLDz8mbaWU357zaqQDBGMGsJzG0j-TQNQkjg20 +id: '404' +label: '404 page not found' +tags: + canonical_url: '[site:url]' + shortlink: '[site:url]' diff --git a/config/sync/metatag.metatag_defaults.front.yml b/config/sync/metatag.metatag_defaults.front.yml new file mode 100644 index 0000000..9cbfe71 --- /dev/null +++ b/config/sync/metatag.metatag_defaults.front.yml @@ -0,0 +1,11 @@ +uuid: 4039a8fb-2bc5-4446-b100-0f065f8a2d63 +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: 1noCXlegCr5HFehQRF1ViXy1jhU1jZ_sNN99a8Sj5jo +id: front +label: 'Front page' +tags: + canonical_url: '[site:url]' + shortlink: '[site:url]' diff --git a/config/sync/metatag.metatag_defaults.global.yml b/config/sync/metatag.metatag_defaults.global.yml new file mode 100644 index 0000000..e5fd763 --- /dev/null +++ b/config/sync/metatag.metatag_defaults.global.yml @@ -0,0 +1,11 @@ +uuid: 7b9bd639-87d5-453d-b0f2-289bc6659c6f +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: sL588ui1E_8-2c_UupwyYxcqX2OVyMFp3HTLbbFqvPc +id: global +label: Global +tags: + canonical_url: '[current-page:url]' + title: '[current-page:title] | [site:name]' diff --git a/config/sync/metatag.metatag_defaults.node.yml b/config/sync/metatag.metatag_defaults.node.yml new file mode 100644 index 0000000..1a4f618 --- /dev/null +++ b/config/sync/metatag.metatag_defaults.node.yml @@ -0,0 +1,12 @@ +uuid: e71d7087-b67b-4a64-a123-470d8dabb607 +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: rpwvgyEURXLz_JjgMCrkS1rUv-0k3L79BpO-ReN7fDI +id: node +label: Content +tags: + title: '[node:title] | [site:name]' + description: '[node:summary]' + canonical_url: '[node:url]' diff --git a/config/sync/metatag.metatag_defaults.taxonomy_term.yml b/config/sync/metatag.metatag_defaults.taxonomy_term.yml new file mode 100644 index 0000000..e8287da --- /dev/null +++ b/config/sync/metatag.metatag_defaults.taxonomy_term.yml @@ -0,0 +1,12 @@ +uuid: d31c0f74-e5e9-4c6f-9660-ac0f34f85dfe +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: 92bXZdyYJ5xqukdfmGRr_CYcwm1vfuS8b8aJ7X_G7E0 +id: taxonomy_term +label: 'Taxonomy term' +tags: + canonical_url: '[term:url]' + description: '[term:description]' + title: '[term:name] | [site:name]' diff --git a/config/sync/metatag.metatag_defaults.user.yml b/config/sync/metatag.metatag_defaults.user.yml new file mode 100644 index 0000000..dc29aec --- /dev/null +++ b/config/sync/metatag.metatag_defaults.user.yml @@ -0,0 +1,12 @@ +uuid: 534dcc7b-a5c0-432b-8793-220cd63c0289 +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: MvQPTbQx0Vxwy0ordSHyixdZmLCMpvMdLD69dlwkrKc +id: user +label: User +tags: + canonical_url: '[user:url]' + description: '[site:name]' + title: '[user:display-name] | [site:name]' diff --git a/config/sync/metatag.settings.yml b/config/sync/metatag.settings.yml new file mode 100644 index 0000000..3f1fe5f --- /dev/null +++ b/config/sync/metatag.settings.yml @@ -0,0 +1,8 @@ +_core: + default_config_hash: tKLBW2GXZVLFXqS9QgLyfTuxCLc1u_quKPQLtCia-Bw +entity_type_groups: { } +separator: '' +tag_trim_method: beforeValue +tag_trim_maxlength: { } +tag_scroll_max_height: '' +use_maxlength: true