Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tags to blog posts #1

Open
bellons91 opened this issue Feb 24, 2023 · 2 comments
Open

Add tags to blog posts #1

bellons91 opened this issue Feb 24, 2023 · 2 comments

Comments

@bellons91
Copy link

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)

@chrisnmorrison
Copy link
Owner

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?

@bellons91
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants