From b39a5a7d4503ba60c65152fa1c4b066cdc367a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Wed, 20 Dec 2023 14:26:28 +0100 Subject: [PATCH] Include the search language in site config --- _config.yml | 13 ++++++++----- _includes/index-docs.html | 5 +++-- _includes/index-guides.html | 5 +++-- assets/javascript/guides-app.js | 6 ++++-- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/_config.yml b/_config.yml index c676148a508..7f887a2123f 100755 --- a/_config.yml +++ b/_config.yml @@ -22,12 +22,10 @@ url: "https://quarkus.io" # the base hostname & protocol for your site, e.g. htt twitter_username: quarkusio github_username: quarkusio github_fork_url: "https://github.com/quarkusio/quarkus" +# The language code for this website, used in particular for search.quarkus.io. +# See https://github.com/quarkusio/search.quarkus.io/blob/main/src/main/java/io/quarkus/search/app/entity/Language.java +language: en search: - # The minimum number of characters before we run a full search. - # Below this: - # - if another filter is selected (e.g. categories), we run Javascript search - # - otherwise, we don't run search and just display all guides - min-chars: 2 # The URL of the remote search service url: "https://search.quarkus.io/" # The amount of time before we give up on a pending remote search and fall back to Javascript search. @@ -44,6 +42,11 @@ search: # while the user is reading through it! # This we set a higher timeout value, to make timeouts less likely. more-timeout: 2500 + # The minimum number of characters before we run a full search. + # Below this: + # - if another filter is selected (e.g. categories), we run Javascript search + # - otherwise, we don't run search and just display all guides + min-chars: 2 # Build settings error_mode: strict diff --git a/_includes/index-docs.html b/_includes/index-docs.html index d97efe4c5c5..9201787f8f6 100644 --- a/_includes/index-docs.html +++ b/_includes/index-docs.html @@ -6,10 +6,11 @@
+ data-min-chars="{{ site.search.min-chars }}">
diff --git a/_includes/index-guides.html b/_includes/index-guides.html index 905fb651cea..40306dd5764 100644 --- a/_includes/index-guides.html +++ b/_includes/index-guides.html @@ -3,10 +3,11 @@
+ data-min-chars="{{ site.search.min-chars }}">