mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-02-06 20:03:31 +08:00
feat(search): preload search.json
This commit is contained in:
parent
c19780280e
commit
8aeb562bb3
@ -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…
Reference in New Issue
Block a user