chrisnmorrison/revista-gatsby-blog-magazine

Add tags to blog posts

bellons91 opened this issue · 2 comments

Many blog posts are about different topics (let's say "Sushi", "Vegan", "Rice") so we should be able to tag them with different values (afaik, we can only have 1 category per article).

This includes filtering by tag: if the users clicks "Vegan", they should be able to see only blog articles about that topic (ordered by date)

Great idea Davide. This is very doable with GraphQL and Markdown metadata. And when generating tag pages, can probably re-use the Category template file and setup in gatsby-node.js

I had a similar idea, but didn't get around to planning it. Where do you recommend these tags be displayed?

In my blog, I have some featured tags listed at the bottom of the homepage.

Then, there's a page dedicated to listing every tag (https://www.code4it.dev/tags).

Also, every blog post shows the related tags at the bottom of each article

image

and within the article card in the homepage

image

BUT...
My current blog theme does not support categories, so I use tags to categorize articles, which is not optimal.

In your theme, I would keep the categories at the beginning of the homepage:

image

But I would show the featured tags in a similar way as the categories

image