Front Matter Meta NoIndex


I am looking to include <meta name="robots" content="noindex"> in some of my pages. I would like to do this in my content’s markdown files.

I think something like this in my markdown file: searchEngines: false and then in the head for that particular page it would output <meta name="robots" content="noindex">.

Can anyone help me achieve this please?

I figured it out:

<meta name="robots" content="{{ if eq .Params.robots "" }}{{ .Site.Params.robots }}{{ else }}{{ .Params.robots }}{{ end }}">

<meta name="robots" content="{{ with .Params.robots }}{{ . }}{{ else }}{{ .Site.Params.robots }}{{ end }}">