How to change the front page title programmatically in Drupal 8/9

In Drupal 8/9 by default, the Frontpage view's Title is "none", change the default Frontpage view title by editing it at admin/structure/views/view/frontpage/edit.

Change the title of the Frontpage view in Drupal 8/9 using the themename_preprocess_html() hook by checking if it is the front page and updating the head_title variable.



Read Next