mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-28 09:43:02 +02:00
feat(search): preload search.json
This commit is contained in:
parent
c19780280e
commit
8aeb562bb3
1 changed files with 5 additions and 0 deletions
|
@ -1,4 +1,9 @@
|
||||||
{{ define "body-class" }}template-search{{ end }}
|
{{ 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" }}
|
{{ define "main" }}
|
||||||
<form action="{{ .Permalink }}" class="search-form"{{ with .OutputFormats.Get "json" -}} data-json="{{ .Permalink }}"{{- end }}>
|
<form action="{{ .Permalink }}" class="search-form"{{ with .OutputFormats.Get "json" -}} data-json="{{ .Permalink }}"{{- end }}>
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Add table
Reference in a new issue