Can't Change "Home Page" Title Meta

Hello, I simply want to change “Home Page” to “Home”, but keep all the page title dynamic. Here’s what I’ve done so far:

I’ve already changed “Home Page” to “Home” in all my i18n files.

I see in head.js that we can change the title tag, but I want to preserve the dynamic titles. I just want the home page to be “Home”, not “Home Page”.

In router/index.js I added a title: 'Home' attribute to the home route, but that didn’t help.

I see {{{ meta.inject().title.text() }}} in the HTML template files, but it’s not clear where it is sucking the “Home Page” title from.

Please help. Thank you in advance.

Hi, you can do this by adding meta: {title: 'Home'} in your router definition file [theme]/router/index.js

let routes = [
  { name: 'home', path: '/', component: Home, alias: '/pwa.html', meta: {title: 'Home'} },
  ...
]
1 Like

Another way is to add a custom metaInfo function to your Home.vue component, which will override the core Home.js mixin

metaInfo () {
    return {
      title: 'Home',
      meta: 'Buy amazing products'
    }
  }

But really it should work just by changing the i18n files, as long as there is no custom metaInfo function and no meta: {title: ‘’} in your router file

Thank you @grimasod! Your comment helped me identify the problem. In my en-US.csv file, I changed both the key and the value to “Home”. That prevented the router logic in ./core/pages/Home.js from finding a correct match because it was still trying to find “Home Page” in my theme’s language file, but that string no longer existed.

After I changed the key back to “Home Page” in my theme’s language file, it then applied the “Home” value as expected. Now my meta title is correct.

Problem solved. Thank you!