{{ $robotsGenerate := false -}}
{{- if or (isset $.Params.robots "index") (isset $.Params.robots "follow") }}
{{- $robotsGenerate = true -}}
{{- else if or (isset $.Site.Params.robots "index") (isset $.Site.Params.robots "follow") -}}
{{- $robotsGenerate = true -}}
{{- end -}}
{{- if eq $robotsGenerate true -}}
{{- $robotsIndex := true -}}
{{- $robotsFollow := true -}}
{{- if isset $.Site.Params "robots" -}}
{{- if isset $.Site.Params.robots "index" -}}
{{- $robotsIndex = $.Site.Params.robots.index -}}
{{- end -}}
{{- if isset $.Site.Params.robots "follow" -}}
{{- $robotsFollow = $.Site.Params.robots.follow -}}
{{- end -}}
{{- end -}}
{{- if isset $.Params "robots" -}}
{{- if isset $.Params.robots "index" -}}
{{- $robotsIndex = $.Params.robots.index -}}
{{- end -}}
{{- if isset $.Params.robots "follow" -}}
{{- $robotsFollow = $.Params.robots.follow -}}
{{- end -}}
{{- end -}}
{{- if and (eq $robotsIndex true) (eq $robotsFollow true) }}
{{- else if and (eq $robotsIndex true) (eq $robotsFollow false) }}
{{- else if and (eq $robotsIndex false) (eq $robotsFollow true) }}
{{- else if and (eq $robotsIndex false) (eq $robotsFollow false) }}
{{- end -}}
{{- end -}}