Skip to content

Commit e3fc194

Browse files
committed
Include the search language in site config
1 parent 8ebe7b7 commit e3fc194

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

Diff for: _config.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ url: "https://quarkus.io" # the base hostname & protocol for your site, e.g. htt
2222
twitter_username: quarkusio
2323
github_username: quarkusio
2424
github_fork_url: "https://github.com/quarkusio/quarkus"
25+
# The language code for this website, used in particular for search.quarkus.io.
26+
# See https://github.com/quarkusio/search.quarkus.io/blob/main/src/main/java/io/quarkus/search/app/entity/Language.java
27+
language: en
2528
search:
26-
# The minimum number of characters before we run a full search.
27-
# Below this:
28-
# - if another filter is selected (e.g. categories), we run Javascript search
29-
# - otherwise, we don't run search and just display all guides
30-
min-chars: 2
3129
# The URL of the remote search service
3230
url: "https://search.quarkus.io/"
3331
# The amount of time before we give up on a pending remote search and fall back to Javascript search.
@@ -44,6 +42,11 @@ search:
4442
# while the user is reading through it!
4543
# This we set a higher timeout value, to make timeouts less likely.
4644
more-timeout: 2500
45+
# The minimum number of characters before we run a full search.
46+
# Below this:
47+
# - if another filter is selected (e.g. categories), we run Javascript search
48+
# - otherwise, we don't run search and just display all guides
49+
min-chars: 2
4750

4851
# Build settings
4952
error_mode: strict

Diff for: _includes/index-docs.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
<div id="guides-app"
88
data-search-api-server="{{ site.search.url }}"
9+
data-quarkus-version="{{ docversion }}"
10+
data-language="{{ site.language }}"
911
data-initial-timeout="{{ site.search.initial-timeout }}"
1012
data-more-timeout="{{ site.search.more-timeout }}"
11-
data-min-chars="{{ site.search.min-chars }}"
12-
data-quarkus-version="{{ docversion }}">
13+
data-min-chars="{{ site.search.min-chars }}">
1314
<section class="full-width-version-bg flexfilterbar">
1415
<div class="flexcontainer">
1516
<div class="flexlabel">

Diff for: _includes/index-guides.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33

44
<div id="guides-app"
55
data-search-api-server="{{ site.search.url }}"
6+
data-quarkus-version="{{ docversion }}"
7+
data-language="{{ site.language }}"
68
data-initial-timeout="{{ site.search.initial-timeout }}"
79
data-more-timeout="{{ site.search.more-timeout }}"
8-
data-min-chars="{{ site.search.min-chars }}"
9-
data-quarkus-version="{{ docversion }}">
10+
data-min-chars="{{ site.search.min-chars }}">
1011
<section class="full-width-version-bg flexfilterbar">
1112
<div class="flexcontainer">
1213
<div class="search">

Diff for: assets/javascript/guides-app.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ const appElement = document.querySelector(appSelector);
2020
const app = createApp({
2121
props: {
2222
searchApiServer: String,
23+
quarkusVersion: String,
24+
language: String,
2325
initialTimeout: Number,
2426
moreTimeout: Number,
25-
minChars: Number,
26-
quarkusVersion: String
27+
minChars: Number
2728
},
2829
data() {
2930
return {
@@ -188,6 +189,7 @@ const app = createApp({
188189
const queryParams = {
189190
page: this.search.page,
190191
version: this.quarkusVersion,
192+
language: this.language,
191193
contentSnippets: 2,
192194
contentSnippetsLength: 120,
193195
highlightCssClass: 'highlighted'

0 commit comments

Comments
 (0)