If I want to show the current node title in page.html.twig (by default it seems to only be available in node.html.twig) I have to create a preprocess function like so:
function theme_preprocess_page(&$variables, $hook) {
// Set our page title so we can access it in page.html.twig
if ($node = \Drupal::routeMatch()->getParameter('node')) {
$variables['my_node_title'] = $node->title->value;
}
}
And then I have to overwrite page-title.html.twig by copying it into my current theme folder and commenting out everything.
This doesn't seem "right". Is there a better way?