Metatag

Override head title set by Metatag module in Drupal 8

Once Drupal's metatag module controls the head title, it is not apparent how to override it programmatically with a custom module or controller, because the Metatag module adds additions to a title like a [site:name], or anything that is set be default in its global settings. The article shows an example of overriding the head title programmatically without modifying theme files.