From 81726ef396d72c99a8ecb3e4e20006abf70710e3 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 9 May 2020 02:33:36 +0100 Subject: [PATCH] Add and enable pathauto Fixes #25 --- composer.json | 1 + composer.lock | 160 +++++++++++++++++- config/default/core.extension.yml | 2 + .../default/pathauto.pattern.blog_posts.yml | 22 +++ config/default/pathauto.pattern.page.yml | 22 +++ config/default/pathauto.pattern.talks.yml | 22 +++ config/default/pathauto.settings.yml | 22 +++ ...stem.action.pathauto_update_alias_node.yml | 16 ++ ...stem.action.pathauto_update_alias_user.yml | 16 ++ 9 files changed, 282 insertions(+), 1 deletion(-) create mode 100644 config/default/pathauto.pattern.blog_posts.yml create mode 100644 config/default/pathauto.pattern.page.yml create mode 100644 config/default/pathauto.pattern.talks.yml create mode 100644 config/default/pathauto.settings.yml create mode 100644 config/default/system.action.pathauto_update_alias_node.yml create mode 100644 config/default/system.action.pathauto_update_alias_user.yml diff --git a/composer.json b/composer.json index cf0d2ee..bdd1d70 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,7 @@ "drupal/migrate_source_yaml": "^1.2", "drupal/migrate_tools": "^4.5", "drupal/paragraphs": "^1.10", + "drupal/pathauto": "^1.8", "drupal/redirect": "^1.5", "drupal/speakerdeck_field": "^1.0", "drupal/xmlsitemap": "^1.0", diff --git a/composer.lock b/composer.lock index 60a52f6..6c458eb 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": "2800d415e7b235b84c6922ceaa045ed8", + "content-hash": "89691b515b3a79b86272092c47301edd", "packages": [ { "name": "asm89/stack-cors", @@ -2115,6 +2115,96 @@ "description": "Locked core dependencies; require this project INSTEAD OF drupal/core.", "time": "2020-04-02T19:01:19+00:00" }, + { + "name": "drupal/ctools", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/ctools.git", + "reference": "8.x-3.4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/ctools-8.x-3.4.zip", + "reference": "8.x-3.4", + "shasum": "016ca5abb7ac4ca720352a72e8989f3ef0e20539" + }, + "require": { + "drupal/core": "^8.7.7 || ^9" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-3.4", + "datestamp": "1585763383", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "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/entity_reference_revisions", "version": "1.8.0", @@ -2669,6 +2759,74 @@ "source": "https://git.drupalcode.org/project/paragraphs" } }, + { + "name": "drupal/pathauto", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/pathauto.git", + "reference": "8.x-1.8" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/pathauto-8.x-1.8.zip", + "reference": "8.x-1.8", + "shasum": "ede3216abb9c4f77709338d9147334c595046329" + }, + "require": { + "drupal/core": "^8.8 || ^9", + "drupal/ctools": "*", + "drupal/token": "*" + }, + "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.8", + "datestamp": "1588103046", + "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/redirect", "version": "1.5.0", diff --git a/config/default/core.extension.yml b/config/default/core.extension.yml index bc6331c..f236387 100644 --- a/config/default/core.extension.yml +++ b/config/default/core.extension.yml @@ -8,6 +8,7 @@ module: config: 0 config_filter: 0 config_ignore: 0 + ctools: 0 custom: 0 datetime: 0 dblog: 0 @@ -40,6 +41,7 @@ module: update: 0 user: 0 views_ui: 0 + pathauto: 1 xmlsitemap: 1 views: 10 paragraphs: 11 diff --git a/config/default/pathauto.pattern.blog_posts.yml b/config/default/pathauto.pattern.blog_posts.yml new file mode 100644 index 0000000..ad1c2ca --- /dev/null +++ b/config/default/pathauto.pattern.blog_posts.yml @@ -0,0 +1,22 @@ +uuid: 1040f0ad-2e4a-4d3d-8d96-0ff42a36338d +langcode: en +status: true +dependencies: + module: + - node +id: blog_posts +label: 'Blog posts' +type: 'canonical_entities:node' +pattern: 'articles/[node:title]' +selection_criteria: + 2b058943-84af-4ecc-ad48-37b8f407fff3: + id: node_type + bundles: + post: post + negate: false + context_mapping: + node: node + uuid: 2b058943-84af-4ecc-ad48-37b8f407fff3 +selection_logic: and +weight: -5 +relationships: { } diff --git a/config/default/pathauto.pattern.page.yml b/config/default/pathauto.pattern.page.yml new file mode 100644 index 0000000..08f552a --- /dev/null +++ b/config/default/pathauto.pattern.page.yml @@ -0,0 +1,22 @@ +uuid: 11734262-9701-46b5-81e8-a1b83e6d0e09 +langcode: en +status: true +dependencies: + module: + - node +id: page +label: Page +type: 'canonical_entities:node' +pattern: '[node:title]' +selection_criteria: + 894873ef-43c4-414b-8a9b-6572b32423ff: + id: node_type + bundles: + page: page + negate: false + context_mapping: + node: node + uuid: 894873ef-43c4-414b-8a9b-6572b32423ff +selection_logic: and +weight: -5 +relationships: { } diff --git a/config/default/pathauto.pattern.talks.yml b/config/default/pathauto.pattern.talks.yml new file mode 100644 index 0000000..c9610f0 --- /dev/null +++ b/config/default/pathauto.pattern.talks.yml @@ -0,0 +1,22 @@ +uuid: abde9c0e-bcd2-4803-a8fd-0b590ae9decb +langcode: en +status: true +dependencies: + module: + - node +id: talks +label: Talks +type: 'canonical_entities:node' +pattern: 'talks/[node:title]' +selection_criteria: + bf4513ca-ac62-4d81-9288-429f16aabcc1: + id: node_type + bundles: + talk: talk + negate: false + context_mapping: + node: node + uuid: bf4513ca-ac62-4d81-9288-429f16aabcc1 +selection_logic: and +weight: -5 +relationships: { } diff --git a/config/default/pathauto.settings.yml b/config/default/pathauto.settings.yml new file mode 100644 index 0000000..01eddea --- /dev/null +++ b/config/default/pathauto.settings.yml @@ -0,0 +1,22 @@ +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 +_core: + default_config_hash: SwvLp8snyPEExF41CaJJYdPUVomofLqtXvwciHc4cPg diff --git a/config/default/system.action.pathauto_update_alias_node.yml b/config/default/system.action.pathauto_update_alias_node.yml new file mode 100644 index 0000000..6ef204f --- /dev/null +++ b/config/default/system.action.pathauto_update_alias_node.yml @@ -0,0 +1,16 @@ +uuid: 4c2dac5c-7163-4342-9bfe-1e5597358522 +langcode: en +status: true +dependencies: + enforced: + module: + - node + module: + - pathauto +_core: + default_config_hash: lno8QThS348UX-kaUsagJtCnuPHKLXYnTQiF_9HSDWA +id: pathauto_update_alias_node +label: 'Update URL alias' +type: node +plugin: pathauto_update_alias +configuration: { } diff --git a/config/default/system.action.pathauto_update_alias_user.yml b/config/default/system.action.pathauto_update_alias_user.yml new file mode 100644 index 0000000..459ca16 --- /dev/null +++ b/config/default/system.action.pathauto_update_alias_user.yml @@ -0,0 +1,16 @@ +uuid: 3fbbd57c-139b-4601-b659-dbea74c76b14 +langcode: en +status: true +dependencies: + enforced: + module: + - user + module: + - pathauto +_core: + default_config_hash: x_ok_ZsfA4Xk4B_hVW3O4-3PcNoK57nXLz_Dlletidg +id: pathauto_update_alias_user +label: 'Update URL alias' +type: user +plugin: pathauto_update_alias +configuration: { }