diff --git a/layouts/partials/search.html b/layouts/partials/search.html index 4605958e7a..1813289f6f 100644 --- a/layouts/partials/search.html +++ b/layouts/partials/search.html @@ -1,6 +1,8 @@ {{- $link := "" }} - {{- with .Site.Home.OutputFormats.Get "SEARCHPAGE" }} - {{- $link = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }} + {{- if or (.Site.Home.OutputFormats.Get "JSON") (.Site.Home.OutputFormats.Get "SEARCH") }} + {{- with .Site.Home.OutputFormats.Get "SEARCHPAGE" }} + {{- $link = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }} + {{- end }} {{- end }} {{- $c:="" }} {{ if $link }}