From 5ac2552e7c5f8cff0bf0f34c9cbc42bf8d344f45 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Fri, 1 Jan 2021 13:12:23 +0100 Subject: [PATCH] fix(widget/search): remove hardcoded form action --- layouts/partials/widget/search.html | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/layouts/partials/widget/search.html b/layouts/partials/widget/search.html index 2275eb9..833f740 100644 --- a/layouts/partials/widget/search.html +++ b/layouts/partials/widget/search.html @@ -1,10 +1,16 @@ -
-

- - - - -

-
\ No newline at end of file +{{- $query := first 1 (where .Site.Pages "Layout" "==" "search") -}} +{{- if $query -}} + {{- $searchPage := index $query 0 -}} +
+

+ + + + +

+
+{{- else -}} + {{- warnf "Search page not found. Create a page with layout: search." -}} +{{- end -}} \ No newline at end of file