# How to add tag and category

**URL:** <https://discourse.gohugo.io/t/how-to-add-tag-and-category/3202>\
**Category:** support\
**Created:** [April 26, 2016, 9:37am UTC](https://discourse.gohugo.io/t/how-to-add-tag-and-category/3202 "2016-04-26T09:37:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![eleanorTFang](https://avatars.discourse-cdn.com/v4/letter/e/3e96dc/32.png) [@eleanorTFang](https://discourse.gohugo.io/u/eleanorTFang)\
**Post date:** [April 26, 2016, 9:37am UTC](https://discourse.gohugo.io/t/how-to-add-tag-and-category/3202/1 "2016-04-26T09:37:24Z")

</div>

Ask for help again.  
This time I want to add tag and category in my site.  
After reading some documents in gohugo, I think I just need to add tag and category in my front matter.

+++  
date = "2016-04-20T19:23:51+08:00"  
draft = false  
title = "Naive Bayesian"  
tag = [“bayes”]  
category = [“machine learning”]  
slug = “naive-bayesian”  
+++

But I couldn’t see any difference in my page.  
There is nothing under the Tag and Category.  
What else should I do?

---

<div class="post-metadata">

**Author:** ![AnneTheAgile](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/annetheagile/32/1381_2.png) [@AnneTheAgile](https://discourse.gohugo.io/u/AnneTheAgile)\
**Post date:** [April 26, 2016, 11:53am UTC](https://discourse.gohugo.io/t/how-to-add-tag-and-category/3202/2 "2016-04-26T11:53:23Z")

</div>

I have this question too!

---

<div class="post-metadata">

**Author:** ![digitalcraftsman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/digitalcraftsman/32/4142_2.png) [@digitalcraftsman](https://discourse.gohugo.io/u/digitalcraftsman)\
**Post date:** [April 26, 2016, 12:03pm UTC](https://discourse.gohugo.io/t/how-to-add-tag-and-category/3202/3 "2016-04-26T12:03:21Z")

</div>

You have to name the frontmatter variables `tags` and `categories`. You use their non-existing singular form.

---

<div class="post-metadata">

**Author:** ![eleanorTFang](https://avatars.discourse-cdn.com/v4/letter/e/3e96dc/32.png) [@eleanorTFang](https://discourse.gohugo.io/u/eleanorTFang)\
**Post date:** [April 26, 2016, 12:16pm UTC](https://discourse.gohugo.io/t/how-to-add-tag-and-category/3202/4 "2016-04-26T12:16:45Z")

</div>

okay. I went back to the document of Taxonomies and got what you mean. It works now. Thanks a lot.

---

<div class="post-metadata">

**Author:** ![eleanorTFang](https://avatars.discourse-cdn.com/v4/letter/e/3e96dc/32.png) [@eleanorTFang](https://discourse.gohugo.io/u/eleanorTFang)\
**Post date:** [April 26, 2016, 12:18pm UTC](https://discourse.gohugo.io/t/how-to-add-tag-and-category/3202/5 "2016-04-26T12:18:33Z")

</div>

I hope you get the answer now.  
you can refer to [use of taxonomies](https://gohugo.io/taxonomies/usage/)

---

<div class="post-metadata">

**Author:** ![rdwatters](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rdwatters/32/2848_2.png) [@rdwatters](https://discourse.gohugo.io/u/rdwatters)\
**Post date:** [April 28, 2016, 2:21am UTC](https://discourse.gohugo.io/t/how-to-add-tag-and-category/3202/6 "2016-04-28T02:21:11Z")

</div>

@eleanorTFang

Tags and categories are supported out of the box, I believe, but if you wanted to add them to your config, the following gives you an idea of how you can add your taxonomies and then leverage them in individual front matter in individual markdown files.

In your `config.toml` =

```auto
[taxonomies]
   tag = "tags"
   category = "categories"

```

Then in the yaml front matter for `content/blog/examplepost.md`:

```auto
title: My Blog Post
categories: [development, publishing]
tags: [hugo,content,static site generator]

```

Cheers.

---

<div class="post-metadata">

**Author:** ![eleanorTFang](https://avatars.discourse-cdn.com/v4/letter/e/3e96dc/32.png) [@eleanorTFang](https://discourse.gohugo.io/u/eleanorTFang)\
**Post date:** [April 28, 2016, 8:00am UTC](https://discourse.gohugo.io/t/how-to-add-tag-and-category/3202/7 "2016-04-28T08:00:58Z")

</div>

Yeah. You guys really help me a lot.
