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 support #4

Open
Charca opened this issue Jan 11, 2020 · 1 comment
Open

Add tags support #4

Charca opened this issue Jan 11, 2020 · 1 comment

Comments

@Charca
Copy link
Owner

Charca commented Jan 11, 2020

I'm thinking we could add a new tags front-matter variable to filter posts by tag, something like:

---
title: Hello World 👋
date: "2019-06-11T08:38:00.000Z"
tags: design, random
---

And then create a new route, similar to blog/index, but to filter posts by tag:

/blog/tag/[slug].svelte
/blog/tag/[slug].json.js
@JHethDev
Copy link

To output the tags as an array from the front matter you should format like this:

---
title: Hello World 👋
date: "2019-06-11T08:38:00.000Z"
tags:
  - design
  - random
---

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