From f3c35423cfcc72fdddab16efb8d1802b360003b8 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 11 May 2025 10:47:19 +0100 Subject: [PATCH] Add Pathauto for daily email nodes --- composer.json | 1 + composer.lock | 166 +++++++++++++++++- config/sync/core.extension.yml | 1 + .../pathauto.pattern.daily_email_nodes.yml | 22 +++ config/sync/pathauto.settings.yml | 22 +++ ...stem.action.pathauto_update_alias_node.yml | 16 ++ ...stem.action.pathauto_update_alias_user.yml | 16 ++ 7 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 config/sync/pathauto.pattern.daily_email_nodes.yml create mode 100644 config/sync/pathauto.settings.yml create mode 100644 config/sync/system.action.pathauto_update_alias_node.yml create mode 100644 config/sync/system.action.pathauto_update_alias_user.yml diff --git a/composer.json b/composer.json index 51713ea66..230b53a81 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,7 @@ "drupal/drupal_cms_seo_tools": "^1.1", "drupal/feeds": "^3.0", "drupal/paragraphs": "^1.19", + "drupal/pathauto": "^1.13", "drupal/tome": "^1.13", "drush/drush": "^13.5" }, diff --git a/composer.lock b/composer.lock index 317d1ea6a..2651948ac 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": "873bf2ba2f41413579faa35d19f84c93", + "content-hash": "2fdd1fcf491505de043f0479bd8a12fa", "packages": [ { "name": "asm89/stack-cors", @@ -1671,6 +1671,99 @@ "issues": "https://www.drupal.org/project/issues/crop" } }, + { + "name": "drupal/ctools", + "version": "4.1.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/ctools.git", + "reference": "4.1.0" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/ctools-4.1.0.zip", + "reference": "4.1.0", + "shasum": "69f5889cf557df9e55519390e6a95cfa31b67874" + }, + "require": { + "drupal/core": "^9.5 || ^10 || ^11" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "4.1.0", + "datestamp": "1718144949", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + }, + "branch-alias": { + "dev-8.x-3.x": "3.x-dev" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Kris Vanderwater (EclipseGc)", + "homepage": "https://www.drupal.org/u/eclipsegc", + "role": "Maintainer" + }, + { + "name": "Jakob Perry (japerry)", + "homepage": "https://www.drupal.org/u/japerry", + "role": "Maintainer" + }, + { + "name": "Tim Plunkett (tim.plunkett)", + "homepage": "https://www.drupal.org/u/timplunkett", + "role": "Maintainer" + }, + { + "name": "James Gilliland (neclimdul)", + "homepage": "https://www.drupal.org/u/neclimdul", + "role": "Maintainer" + }, + { + "name": "Daniel Wehner (dawehner)", + "homepage": "https://www.drupal.org/u/dawehner", + "role": "Maintainer" + }, + { + "name": "joelpittet", + "homepage": "https://www.drupal.org/user/160302" + }, + { + "name": "merlinofchaos", + "homepage": "https://www.drupal.org/user/26979" + }, + { + "name": "neclimdul", + "homepage": "https://www.drupal.org/user/48673" + }, + { + "name": "sdboyer", + "homepage": "https://www.drupal.org/user/146719" + }, + { + "name": "sun", + "homepage": "https://www.drupal.org/user/54136" + }, + { + "name": "tim.plunkett", + "homepage": "https://www.drupal.org/user/241634" + } + ], + "description": "Provides a number of utility and helper APIs for Drupal developers and site builders.", + "homepage": "https://www.drupal.org/project/ctools", + "support": { + "source": "https://git.drupalcode.org/project/ctools", + "issues": "https://www.drupal.org/project/issues/ctools" + } + }, { "name": "drupal/drupal_cms_seo_tools", "version": "1.1.0", @@ -2323,6 +2416,77 @@ "source": "https://git.drupalcode.org/project/paragraphs" } }, + { + "name": "drupal/pathauto", + "version": "1.13.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/pathauto.git", + "reference": "8.x-1.13" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/pathauto-8.x-1.13.zip", + "reference": "8.x-1.13", + "shasum": "e64b5a82cf1b8ab48bce400b21ae6fc99c8078fd" + }, + "require": { + "drupal/core": "^9.4 || ^10 || ^11", + "drupal/ctools": "*", + "drupal/token": "*" + }, + "require-dev": { + "drupal/forum": "*" + }, + "suggest": { + "drupal/redirect": "When installed Pathauto will provide a new \"Update Action\" in case your URLs change. This is the recommended update action and is considered the best practice for SEO and usability." + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-1.13", + "datestamp": "1739552840", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + }, + "drush": { + "services": { + "drush.services.yml": "^9 || ^10" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "berdir", + "homepage": "https://www.drupal.org/user/214652" + }, + { + "name": "dave reid", + "homepage": "https://www.drupal.org/user/53892" + }, + { + "name": "Freso", + "homepage": "https://www.drupal.org/user/27504" + }, + { + "name": "greggles", + "homepage": "https://www.drupal.org/user/36762" + } + ], + "description": "Provides a mechanism for modules to automatically generate aliases for the content they manage.", + "homepage": "https://www.drupal.org/project/pathauto", + "support": { + "source": "https://cgit.drupalcode.org/pathauto", + "issues": "https://www.drupal.org/project/issues/pathauto", + "documentation": "https://www.drupal.org/docs/8/modules/pathauto" + } + }, { "name": "drupal/robotstxt", "version": "1.6.0", diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 1cb2c0cc5..b522e0c72 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -72,6 +72,7 @@ module: user: 0 views_ui: 0 yoast_seo: 0 + pathauto: 1 views: 10 paragraphs: 11 standard: 1000 diff --git a/config/sync/pathauto.pattern.daily_email_nodes.yml b/config/sync/pathauto.pattern.daily_email_nodes.yml new file mode 100644 index 000000000..f7ce5e870 --- /dev/null +++ b/config/sync/pathauto.pattern.daily_email_nodes.yml @@ -0,0 +1,22 @@ +uuid: 19727077-00aa-40f5-9bcc-152de6b69ecf +langcode: en +status: true +dependencies: + module: + - node +id: daily_email_nodes +label: 'Daily email nodes' +type: 'canonical_entities:node' +pattern: 'daily/[node:created:custom:Y]/[node:created:custom:m]/[node:created:custom:d]/[node:title]' +selection_criteria: + b72f0ab5-74b3-4eaf-80ed-d3c3c7241b00: + id: 'entity_bundle:node' + negate: false + uuid: b72f0ab5-74b3-4eaf-80ed-d3c3c7241b00 + context_mapping: + node: node + bundles: + daily_email: daily_email +selection_logic: and +weight: -5 +relationships: { } diff --git a/config/sync/pathauto.settings.yml b/config/sync/pathauto.settings.yml new file mode 100644 index 000000000..acfd94397 --- /dev/null +++ b/config/sync/pathauto.settings.yml @@ -0,0 +1,22 @@ +_core: + default_config_hash: SwvLp8snyPEExF41CaJJYdPUVomofLqtXvwciHc4cPg +enabled_entity_types: + - user +punctuation: + hyphen: 1 +verbose: false +separator: '-' +max_length: 100 +max_component_length: 100 +transliterate: true +reduce_ascii: false +case: true +ignore_words: 'a, an, as, at, before, but, by, for, from, is, in, into, like, of, off, on, onto, per, since, than, the, this, that, to, up, via, with' +update_action: 2 +safe_tokens: + - alias + - path + - join-path + - login-url + - url + - url-brief diff --git a/config/sync/system.action.pathauto_update_alias_node.yml b/config/sync/system.action.pathauto_update_alias_node.yml new file mode 100644 index 000000000..2a13e8549 --- /dev/null +++ b/config/sync/system.action.pathauto_update_alias_node.yml @@ -0,0 +1,16 @@ +uuid: c54e0bed-d2ef-4cdb-87ed-ba10a1860d9a +langcode: en +status: true +dependencies: + module: + - pathauto + enforced: + module: + - node +_core: + default_config_hash: Cr0CsPUSuio4ClP7bOTqHBefJOLtN5KPyKyYj9E4qvQ +id: pathauto_update_alias_node +label: 'Update URL alias' +type: node +plugin: pathauto_update_alias +configuration: { } diff --git a/config/sync/system.action.pathauto_update_alias_user.yml b/config/sync/system.action.pathauto_update_alias_user.yml new file mode 100644 index 000000000..d2652bfa0 --- /dev/null +++ b/config/sync/system.action.pathauto_update_alias_user.yml @@ -0,0 +1,16 @@ +uuid: 2de04176-3ca1-4afd-b8ac-2ec983a31e4e +langcode: en +status: true +dependencies: + module: + - pathauto + enforced: + module: + - user +_core: + default_config_hash: 6eiNWATGTd3lUEKuxNPNyDRDVMsUlM0HS90_R6JJLUI +id: pathauto_update_alias_user +label: 'Update URL alias' +type: user +plugin: pathauto_update_alias +configuration: { }