$is_front is not available in all templates As far as I know $is_front is a global template variable in Drupal 7 and therefore the variable is available in all templates.

Now for Drupal 8 it seems that this is no longer true. I tried to call for $is_front in page-title.html.twig and realized that $is_front was not available here.

Using template_preprocess_page_title(&amp;$variables) I could add $is_front to the template.

*Why is Drupal 8 not providing $is_front in the same style as Drupal 7? And what would be the  way to check for frontpage in a template where $is_front is not available?**

It also seems that drupal_is_front_page() is not available anymore.

Should I go like:

  try {
$variables['is_front'] = \Drupal::service('path.matcher')-&gt;isFrontPage();


 }

      catch (Exception $e) {
        // If the database is not yet available, set default values for these
        // variables.
        $variables['is_front'] = FALSE;
        $variables['db_is_active'] = FALSE;
      }


(taken from template_preprocess_page)
You almost answered the question yourself, you can add the variable to all templates with this code:

function theme_preprocess(&amp;$variables, $hook) {
  try {
    $variables['is_front'] = \Drupal::service('path.matcher')-&gt;isFrontPage();
  }
  catch (Exception $e) {
    $variables['is_front'] = FALSE;
  }
  // Ensure the cache varies correctly (new in Drupal 8.3).
  $variables['#cache']['contexts'][] = 'url.path.is_front';
}


For performance reason you can make a condition on $hook to only add the variable to the templates you need, and to avoid that the code is run twice for page.

Edit:

New in Drupal 8.3: Cache context for determining the Front Page