{{- if and .Site.Params.search.enable (eq .Site.Params.search.type "pagefind") .IsPage -}}
  {{- $pageDate := (.PublishDate | default .Date) -}}
  {{- $dateLabel := $pageDate | dateFormat (.Site.Params.date_format | default "2006-01-02") -}}
  <meta data-pagefind-filter="hidden:{{ string (.Param `hidden_from_search`) }}">
  <meta data-pagefind-filter="encrypted:{{ string (.Params.password | not | not) }}">
  <meta data-pagefind-sort="date:{{ $pageDate.Unix }}">
  <meta data-pagefind-sort="title:{{ .Title }}">
  <meta data-pagefind-meta="date:{{ $dateLabel }}">
  {{- with .Params.tags }}<meta data-pagefind-meta="tags:{{ delimit . "," }}">{{ end -}}
  {{- with .Params.categories }}<meta data-pagefind-meta="categories:{{ delimit . "," }}">{{ end -}}
  {{- with .Params.collections }}<meta data-pagefind-meta="collections:{{ delimit . "," }}">{{ end -}}
{{- end -}}
