Normally in jekyll we can add custom meta title/ description conditionally for the pages, posts but for the category / tag specially built with autopages ( paginate-v2 ) plugins. Is there any good option to put custom meta title, description for each tag / category?
Yes. For example, dfdsfsdf that is a tag page. But we can’t set a custom title and description for that page, because its generated by auto pages and if we apply a title it will applicable in all tag page. which is not SEO friendly.
Yes. For example, dfdsfsdf that is a tag page. But we can’t set a custom title and description for that page, because its generated by auto pages and if we apply a title it will applicable in all tag page. which is not SEO friendly.
What, if you use categories instead of tags? Then write Front Matter for category pages to display custom Titles, Descriptions etc? Will it work right for you?
Now i am using the following code the post purpose. There tags and categories are different and the same post associating with many tags. It’s really hard to manage tag pages individually as static when writing a post.
Actually some people make data collection folder for the category, tag, author etc manually. It could help but i don’t think its an idea way. But may be only the way it is. Let’s see what’s the other creative peoples thinking about it.
For jekyll-paginate-v2 using the Autopages method you’re somewhat limited since it’s using the values found in site.categories and site.tags and all you have is the slug and title for each category and tag.
What I did was create a YAML file and placed that in _data which I then add descriptions and alternate titles for various tags. By using a simple key/pair mapping you can access these values as Autopages generates each taxonomy page. This method would also work for the jekyll-archives plugin.
In my YAML file I do something like this for each tag I want a special description or title for:
# _data/taxonomy.yml
jekyll:
title: "Jekyll"
description: "An archive of posts related to Jekyll --- a Ruby Gem that transforms plain text into static websites and blogs."
Then in my Autopages tag layout I do something like this:
Where things get tricky is if you use jekyll-seo-tag. I don’t think there’s an easy way to push these custom descriptions and titles to that without monkey patching that plugin.