From d910f3321b4ae99459d54993c9604e485f95dd16 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Wed, 3 Jan 2018 19:02:14 -0500 Subject: [PATCH] Only load Lunr languages that exist in theme ref https://github.com/mmistakes/minimal-mistakes/pull/1445#issuecomment-355153434 --- _includes/scripts.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/_includes/scripts.html b/_includes/scripts.html index 7b27d81f..a242f8e1 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -11,8 +11,14 @@ {% endif %} -{% if site.search == true or page.layout == 'search' %} +{% if site.search == true or page.layout == "search" %} {% assign lang = site.locale | slice: 0,2 | default: "en" %} + {% case lang %} + {% when "gr" %} + {% assign lang = "gr" %} + {% else %} + {% assign lang = "en" %} + {% endcase %} {% endif %}