came across this bug today
so I created a blog tag
for some reason, I can’t change the meta title and when I tag more than 1 post with the blog tag the meta title will change
also, I tried making a new page with the same text I’m trying to use to see if the ’ was the issue it isnt.
February 10, 2021, 5:19pm
What is in your routes.yaml?
February 11, 2021, 5:11pm
There you go!
/blog/ is a collection page, not a tag page.
ok sorry I failed to mention …I’m using the collection page because I only want my posts tagged with the blog tag to appear on that page and nowhere else
is there any way for me to change the meta title on a collection page?
Here’s a couple of options for controlling the meta title of a page:
Best method is to use the
data key in your
routes.yaml to set page data against your custom collections page. That way you can use that page in Ghost to set all the SEO and other data points. More info can be found here:
Ghost Themes - Dynamic URLs & Routing
Second best is to use a block helper so you can control the title value per template, this is a bit more manual but keeps templating fairly dry. I’ve explained that method over here:
How to use functional helpers to select index, with custom routing? - #2 by DavidDarnes
Hope this helps!
I didn’t realize the “data line” was the missing link…got it working and tested it …can make changes on the tag settings page and it reflects as it should
No problem! Nice one working it out, thanks for sharing your code for others