Any short way to check partial is used in section or taxonomy?

Hi,

as basis the top used partial in section or taxonomy is _default/list.html (if yo don’t roll your own).

I looked for something like .isTaxonomy etc … bc. all my list templates use a “meta.html” partial.

For taxonomy list I would like to add <meta name=robots content="noindex,nofollow" />

my current solution is in the top _index.md

+++
categories  = ["Tags"]
title       = "Index"
description = "Index - all used tags"
[[cascade]]
isTaxonomy  = true
+++

and in my meta.html

{{ $tax := .Params.isTaxonomy | default false }} {{if $tax }}<meta name=robots content="noindex,nofollow" />{{end}}

any better solution for this?

Thanks

You can do:

{{ if eq .Kind "taxonomy" }}
1 Like

Thanks
searched the doc :frowning:

1 Like