I have two custom taxonomies and have enabled JSON and HTML output for both taxonomy and term.
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
_build options, but cannot accomplish my goal.
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
_build options for each taxonomy (and all terms within)?
First, it would help to see your repo as per asking for help
Second, please clarify what you mean by “doesn’t work”. What are the results you get vs the results you wanted?
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
_build options for the terms within each taxonomy? I can do this for each taxonomy by creating
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).
You can also set
cascade in your
That may help. When using the config file cascade, using a
_target path is likely useful for you as well.
@cshoredaniel Kind sir, you just made my week! Thank you.
I did not know about
_target. Using that in the main config worked.
For those interested, here is my config:
home = ['HTML']
section = ['HTML']
page = ['HTML']
taxonomy = ['HTML','JSON']
term = ['HTML', 'JSON']
path = '/tags/**'
outputs = ['HTML']
path = '/categories/**'
outputs = ['JSON']
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.