Moved config search_tokenizer_separator -> search.tokenizer_separator

This commit is contained in:
Silvio Giebl 2019-12-29 20:08:34 +01:00
parent 7f5b1f14f1
commit ff30552748
3 changed files with 3 additions and 5 deletions

View File

@ -8,4 +8,4 @@ search_exclude: true
<h1>Page not found</h1>
<p>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 <a href="{{ site.url }}{{ site.baseurl }}">site's home page</a>.</p>
<p>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 <a href="{{ '/' | absolute_url }}">site's home page</a>.</p>

View File

@ -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

View File

@ -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');