<?php
/**
* @file
*/
/**
* Implements hook_page_alter().
*/
function glue_page_alter(&$page) {
$page['content']['bartik.content']['content']['#markup'] = 'Hello Content!';
}
What wrong with this hook? It wont run (8.4.3). I've cleared the cache too
In Drupal 7, hook_page_alter was a convenient way to go when we needed to modify page elements that were added by other modules. Drupal 8 does away with this hook - hopefully for the better. To fill the void created by hook_page_alter’s dismissal, the following hooks have been introduced.
Source: https://cryptic.zone/blog/where-hook_page_alter-drupal-8