feat(search): preload search.json

This commit is contained in:
Jimmy Cai 2020-10-04 15:45:23 +02:00
parent c19780280e
commit 8aeb562bb3
No known key found for this signature in database
GPG key ID: 3EA408E527F37B18

View file

@ -1,4 +1,9 @@
{{ define "body-class" }}template-search{{ end }}
{{ define "head" }}
{{- with .OutputFormats.Get "json" -}}
<link rel="preload" href="{{ .Permalink }}" as="fetch" crossorigin="anonymous">
{{- end -}}
{{ end }}
{{ define "main" }}
<form action="{{ .Permalink }}" class="search-form"{{ with .OutputFormats.Get "json" -}} data-json="{{ .Permalink }}"{{- end }}>
<p>