From ff305527486ff4114b11a90a3d7a676ffa3970d5 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Sun, 29 Dec 2019 20:08:34 +0100 Subject: [PATCH] Moved config search_tokenizer_separator -> search.tokenizer_separator --- 404.html | 2 +- _config.yml | 4 +--- assets/js/just-the-docs.js | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/404.html b/404.html index 56efce4..1e7a37e 100644 --- a/404.html +++ b/404.html @@ -8,4 +8,4 @@ search_exclude: true

Page not found

-

The page you requested could not be found. Try using the navigation {% if site.search_enabled %}or search {% endif %}to find what you're looking for or go to this site's home page.

+

The page you requested could not be found. Try using the navigation {% if site.search_enabled != false %}or search {% endif %}to find what you're looking for or go to this site's home page.

diff --git a/_config.yml b/_config.yml index c021b35..470fe5d 100644 --- a/_config.yml +++ b/_config.yml @@ -31,9 +31,7 @@ search: preview_words_before: 5 preview_words_after: 10 rel_url: false - -# Set the search token separator for hyphenated-word search: -search_tokenizer_separator: /[\s/]+/ + tokenizer_separator: /[\s/]+/ # Set the search token separator for hyphenated-word search # Enable or disable heading anchors heading_anchors: true diff --git a/assets/js/just-the-docs.js b/assets/js/just-the-docs.js index 0d2593b..e9b497c 100644 --- a/assets/js/just-the-docs.js +++ b/assets/js/just-the-docs.js @@ -75,7 +75,7 @@ function initSearch() { if (request.status >= 200 && request.status < 400) { var docs = JSON.parse(request.responseText); - lunr.tokenizer.separator = {{ site.search_tokenizer_separator | default: "/[\s\-/]+/" }} + lunr.tokenizer.separator = {{ site.search.tokenizer_separator | default: site.search_tokenizer_separator | default: "/[\s\-/]+/" }} var index = lunr(function(){ this.ref('id');