From c980fd4a64daea73c6b7c6f622e7e88f0feb7a01 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Mon, 4 Jul 2022 12:25:21 -0700 Subject: [PATCH] feat: adds search placeholder configuration (#613) * implements search placeholder configuration * changes implementation approach to use search_placeholder_custom Thanks to @pdmosses for the suggestion! * strips whitespace and HTML for both placeholder and aria-label --- _includes/search_placeholder_custom.html | 1 + _layouts/default.html | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 _includes/search_placeholder_custom.html diff --git a/_includes/search_placeholder_custom.html b/_includes/search_placeholder_custom.html new file mode 100644 index 0000000..2885058 --- /dev/null +++ b/_includes/search_placeholder_custom.html @@ -0,0 +1 @@ +Search {{site.title}} diff --git a/_layouts/default.html b/_layouts/default.html index 33b31ff..0563275 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -92,9 +92,12 @@ layout: table_wrappers
{% if site.search_enabled != false %} + + {% capture search_placeholder %}{% include search_placeholder_custom.html %}{% endcapture %} +