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


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

categories  = ["Tags"]
title       = "Index"
description = "Index - all used tags"
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?


You can do:

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

searched the doc :frowning:

1 Like