Change the title of a View to show a name based on its numeric contextual filter

This is how NOT to do it.

 * Implements hook_preprocess_page_title();
 * @param $variables
function geofresco_preprocess_page_title(&$variables) {
  if (!isset($variables['title']) || !is_array($variables['title'])) {
    // The pages we're interested in have title as markup, so bail if it's not.
  $string = isset($variables['title']['#markup']) ? $variables['title']['#markup'] : FALSE;
  if ($string && $pos = strpos($string, "'s blog", -7)) {
    $uid = substr($string, 0, $pos);
    if (is_numeric($uid) && $account = \Drupal\user\Entity\User::load($uid)) {
      $variables['title'] = [
        '#markup' => t("@username's blog",
          ['@username' => $account->getDisplayName()])

The approach in the answer here is what we’re doing, the path having the username is handled with an alias. But that doesn’t solve autocreating aliases (which we still need to solve) and it doesn’t solve the title of the view.

Just realizing that the html_page_title will still be wrong… will fix that later, and this abomination of a function will also be gone