# Do taxonomies support front-matter: cascade, outputs, and \_build options?

**URL:** <https://discourse.gohugo.io/t/do-taxonomies-support-front-matter-cascade-outputs-and-build-options/43372>\
**Category:** support\
**Tags:** taxonomy\
**Created:** [March 9, 2023, 11:40pm UTC](https://discourse.gohugo.io/t/do-taxonomies-support-front-matter-cascade-outputs-and-build-options/43372 "2023-03-09T23:40:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrmanfitz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mrmanfitz/32/9177_2.png) [@mrmanfitz](https://discourse.gohugo.io/u/mrmanfitz)\
**Post date:** [March 9, 2023, 11:40pm UTC](https://discourse.gohugo.io/t/do-taxonomies-support-front-matter-cascade-outputs-and-build-options/43372/1 "2023-03-09T23:40:09Z")

</div>

I have two custom taxonomies and have enabled JSON and HTML output for both taxonomy and term.

config.toml

```auto
[outputs]
    home = ["html"]
    section = ["html"]
    page = ["html"]
    taxonomy = ["html","json"]
    term = ["html","json"]

```

For taxonomy-A, I want to disable the JSON output and not render the taxonomy list page.  
For taxonomy-B, I want to disable HTML output.

I have tried every combination (seemingly) of `outputs` and `_build` options, but cannot accomplish my goal.

In `taxonomy-A/_index.md`:

```auto
---
title: Taxonomy-A
cascade:
  outputs:
    taxonomy: [html]
    term: [html]
_build:
    list: never
    render: never
---

```

In `taxonomy-B/_index.md`:

```auto
---
title: Taxonomy-B
outputs:
  section: [json]
  page: [json]
  taxonomy: [json]
  term: [json]
cascade:
  outputs:
    section: [json]
    page: [json]
    taxonomy: [json]
    term: [json]
---

```

This doesn’t seem to work. I realize that the `cascade` might not have an effect because the term pages are generated dynamically.

How can I set different `outputs` and `_build` options for each taxonomy (and all terms within)?

---

<div class="post-metadata">

**Author:** ![cshoredaniel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/cshoredaniel/32/19684_2.png) [@cshoredaniel](https://discourse.gohugo.io/u/cshoredaniel)\
**Post date:** [March 12, 2023, 7:11pm UTC](https://discourse.gohugo.io/t/do-taxonomies-support-front-matter-cascade-outputs-and-build-options/43372/2 "2023-03-12T19:11:37Z")

</div>

First, it would help to see your repo as per [asking for help](https://discourse.gohugo.io/t/requesting-help/9132/2)

Second, please clarify what you mean by “doesn’t work”. What are the results you get vs the results you wanted?

---

<div class="post-metadata">

**Author:** ![mrmanfitz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mrmanfitz/32/9177_2.png) [@mrmanfitz](https://discourse.gohugo.io/u/mrmanfitz)\
**Post date:** [March 13, 2023, 12:00am UTC](https://discourse.gohugo.io/t/do-taxonomies-support-front-matter-cascade-outputs-and-build-options/43372/3 "2023-03-13T00:00:39Z")

</div>

Yes, I reviewed the guide for asking for help. I’ve read the docs thoroughly and delved deep into the forum posts to clarify my answer and have not been able. I’m not asking for help to troubleshoot my repo (which is private)–I’m asking for someone to clarify a feature that I’m using in a way that might be unconventional.

Specifically my question is: Is it possible to set different `outputs` and `_build` options for the terms within each taxonomy? I can do this for each taxonomy by creating `taxonomyA/_index.md` and `taxonomyB/_index.md`, but it’s not clear to me how to do this for the taxonomy terms (without creating a stub file for every taxonomy term I use).

---

<div class="post-metadata">

**Author:** ![cshoredaniel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/cshoredaniel/32/19684_2.png) [@cshoredaniel](https://discourse.gohugo.io/u/cshoredaniel)\
**Post date:** [March 13, 2023, 12:05am UTC](https://discourse.gohugo.io/t/do-taxonomies-support-front-matter-cascade-outputs-and-build-options/43372/4 "2023-03-13T00:05:30Z")

</div>

You can also set `cascade` in your `config.toml` or `config.yaml`:

> **[Configure Hugo](https://gohugo.io/getting-started/configuration/#cascade)**
>
> How to configure your Hugo site.

That may help. When using the config file cascade, using a `_target` path is likely useful for you as well.

---

<div class="post-metadata">

**Author:** ![mrmanfitz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mrmanfitz/32/9177_2.png) [@mrmanfitz](https://discourse.gohugo.io/u/mrmanfitz)\
**Post date:** [March 13, 2023, 12:20am UTC](https://discourse.gohugo.io/t/do-taxonomies-support-front-matter-cascade-outputs-and-build-options/43372/5 "2023-03-13T00:20:06Z")

</div>

@cshoredaniel Kind sir, you just made my week! Thank you.

I did not know about [`_target`](https://gohugo.io/content-management/front-matter/#target-specific-pages). Using that in the main config worked.

For those interested, here is my config:

```auto
[outputs]
    home = ['HTML']
    section = ['HTML']
    page = ['HTML']
    taxonomy = ['HTML','JSON']
    term = ['HTML', 'JSON']

[[cascade]]
[cascade._target]
    path = '/tags/**'
    [[cascade]]
        outputs = ['HTML']
[cascade._target]
    path = '/categories/**'
    [[cascade]]
        outputs = ['JSON']

```

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [March 15, 2023, 12:20am UTC](https://discourse.gohugo.io/t/do-taxonomies-support-front-matter-cascade-outputs-and-build-options/43372/6 "2023-03-15T00:20:58Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
