{{ $limit := .Site.Params.localSearch.limit | default 1000 }}
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<search>
  {{range where .Site.RegularPages "Kind" "page"}}
  <entry>
    <title>{{ .Title }}</title>
    <url>{{ .RelPermalink | relLangURL }}</url>
    <categories>
      {{ range .Params.categories }}<category>{{ . }}</category>{{ end }}
    </categories>
    <tags>
      {{ range .Params.tags }}
      <tag>{{ . }}</tag>
      {{ end }}
    </tags>
    <content type="html"><![CDATA[ {{ if gt .WordCount $limit }} {{ .Plain | truncate $limit }} {{ else }} {{ .Plain }} {{ end }} ]]></content>
  </entry>
  {{ end }}
</search>