Skip to content

Commit 530d184

Browse files
Copilotriccardobl
andcommitted
Replace search with pagefind
Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
1 parent cb8e4b2 commit 530d184

File tree

10 files changed

+174
-581
lines changed

10 files changed

+174
-581
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
strategy:
3636
matrix:
3737
#Static version is used to maintain stability.
38-
node-version: [12.17.0]
38+
node-version: [20.x]
3939

4040
env:
4141
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
@@ -49,9 +49,10 @@ jobs:
4949
fetch-depth: 1
5050

5151
- name: Use Node.js ${{ matrix.node-version }}
52-
uses: actions/setup-node@v1
52+
uses: actions/setup-node@v4
5353
with:
5454
node-version: ${{ matrix.node-version }}
55+
cache: npm
5556

5657
# Display the sha of the build triggering the repository_dispatch event.
5758
- name: wiki-ui-build

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

package-lock.json

Lines changed: 146 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@
88
"lib": "lib"
99
},
1010
"scripts": {
11-
"buildDocs": "npx antora --stacktrace wiki-playbook.yml"
11+
"buildDocs": "npx antora --stacktrace wiki-playbook.yml && npx pagefind --site build/site"
1212
},
1313
"private": true,
14+
"engines": {
15+
"node": ">=20"
16+
},
1417
"repository": {
1518
"type": "git",
1619
"url": "git+https://github.com/jMonkeyEngine/wiki.git"
@@ -24,6 +27,7 @@
2427
"homepage": "https://github.com/jMonkeyEngine/wiki#readme",
2528
"dependencies": {
2629
"@antora/cli": "^3.0.1",
30+
"pagefind": "^1.4.0",
2731
"@antora/site-generator": "^3.0.1",
2832
"asciidoctor-emoji": "^0.3.4"
2933
}

supplemental-ui/css/site-extra.css

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,11 @@
77
justify-content: flex-end;
88
}
99

10-
.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] {
11-
max-height: calc(100vh - 3.25rem);
12-
}
13-
1410
@media screen and (max-width: 768px) {
1511
.navbar-brand .navbar-item + .navbar-item {
1612
padding-left: 0;
1713
padding-right: 0;
1814
}
19-
20-
.algolia-autocomplete .ds-dropdown-menu {
21-
min-width: calc(100vw - 2.75rem) !important;
22-
}
2315
}
2416

2517
@media screen and (min-width: 1024px) {
@@ -36,20 +28,25 @@
3628
}
3729
}
3830

39-
#search-input {
31+
/* Pagefind search widget in navbar */
32+
#search {
33+
width: 200px;
34+
}
35+
36+
#search .pagefind-ui__search-input {
4037
color: #333;
4138
font-family: inherit;
4239
font-size: 0.95rem;
43-
width: 100px;
40+
width: 100%;
4441
border: 1px solid #dbdbdb;
4542
border-radius: 0.1em;
4643
line-height: 1.5;
4744
padding: 0 0.25em;
4845
}
4946

50-
@media screen and (min-width: 769px) {
51-
#search-input {
52-
width: 200px;
47+
@media screen and (max-width: 768px) {
48+
#search {
49+
width: 100px;
5350
}
5451
}
5552

0 commit comments

Comments
 (0)