I run a PT-BR Ghost blog and I am using the Edge template. I got tired of the infinite scroll pagination and decided to copy a basic pagination from the Liebling template and everything is working alright.
The only problem is that the paged page always renders with the meta-title/title as “(Page %)” in it like “MyBlog (Page 3)”.
I’ve checked and this is coming from the title.js file located on core/frontend/meta/title.js.
How can I update this text or remove entirely only leaving my website meta-title? As the blog is PT-BR it looks wrong to have a EN string “Page” in the title.
I would prefer something more universal like “#2” or even not displaying it at all.
Can somebody help? The best would be a solution that is upgrade-safe.
“MyBlog (Page 3)” is being output by the {{meta_title}} helper in your theme. You can replace that in your theme to get the title you want. You’ll need to update each page in your template (or wherever meta_title occurs).
Updating the title tag is a little trickier because you need to pass data around your theme. Check out the block/contentFor helper to see how you can get your result.
Yes, but you’ll need to build a custom title helper using contentFor and block for the title tag and then update your h1s as needed, as I mentioned in the last post. You don’t want to edit title.js because that’s part of Ghost’s codebase (and not your theme).
As a jumping off point, for a collection page, for example, you could do: