Preprocess function for targeting the home page What's the preprocess function for targeting the home page in a Drupal 8 site? Can I use a preprocess function that is called only for the home page?
To target the front page in a preprocess function you need a condition, because for preprocess you can't use name suggestions: 

function mytheme_preprocess_page(&amp;$variables) {
  if ($variables['is_front']) {
    // your code
  }
}