Skip to content

Commit b5b2b8f

Browse files
authored
Merge pull request #3100 from XRPLF/update-site-search
Fix site search: Replace Algolia with Redocly's inbuilt search.
2 parents de7d07a + 6004b59 commit b5b2b8f

File tree

10 files changed

+33
-26
lines changed

10 files changed

+33
-26
lines changed

@theme/components/Navbar/AlgoliaSearch.tsx

Lines changed: 0 additions & 17 deletions
This file was deleted.

@theme/components/Navbar/Navbar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { LanguagePicker } from "@redocly/theme/components/LanguagePicker/Languag
44
import { slugify } from "../../helpers";
55
import { Link } from "@redocly/theme/components/Link/Link";
66
import { ColorModeSwitcher } from "@redocly/theme/components/ColorModeSwitcher/ColorModeSwitcher";
7-
import { AlgoliaSearch } from "./AlgoliaSearch";
7+
import { Search } from "@redocly/theme/components/Search/Search";
88
import arrowUpRight from "../../../static/img/icons/arrow-up-right-custom.svg";
99

1010
// @ts-ignore
@@ -139,7 +139,7 @@ export function Navbar(props) {
139139
<NavItems>
140140
{navItems}
141141
<div id="topnav-search" className="nav-item search">
142-
<AlgoliaSearch />
142+
<Search className="topnav-search"/>
143143
</div>
144144
<div id="topnav-language" className="nav-item">
145145
<LanguagePicker

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"dependencies": {
1515
"@codemirror/state": "6.5.2",
1616
"@codemirror/view": "^6.22.2",
17-
"@docsearch/react": "^3.8.0",
1817
"@lezer/highlight": "^1.2.0",
1918
"@redocly/realm": "0.120.2",
2019
"@uiw/codemirror-themes": "4.21.21",

redocly.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@ responseHeaders:
2323
'/@l10n/es-ES/**':
2424
- name: X-Robots-Tag
2525
value: noindex
26+
search:
27+
engine: typesense
28+
ai:
29+
hide: true
30+
filters:
31+
hide: true
32+
metadataGlobs:
33+
'docs/**':
34+
redocly_category: Documentation
35+
'blog/**':
36+
redocly_category: Blog
37+
'resources/**':
38+
redocly_category: Resources
39+
'community/**':
40+
redocly_category: Community
2641
seo:
2742
siteUrl: https://xrpl.org/
2843
rbac:
@@ -62,8 +77,6 @@ links:
6277
rel: stylesheet
6378
- href: https://www.unpkg.com/@xrpl/ai-css/xrplai.css
6479
rel: stylesheet
65-
- href: https://cdn.jsdelivr.net/npm/@docsearch/css@3
66-
rel: stylesheet
6780

6881
logo:
6982
srcSet: ./static/img/XRPLedger_DevPortal-black.svg light ./static/img/XRPLedger_DevPortal-white.svg dark

static/css/devportal2024-v1.css

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

styles/_forms.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@
3030
z-index: 1100 !important;
3131
}
3232

33+
.xrp-ledger-dev-portal {
34+
.DocSearch-Modal {
35+
top: 85px;
36+
background-color: #232325;
37+
box-shadow: none;
38+
}
39+
}
3340
// Algolia Search results --------------------------------------------------
3441
html {
3542
// The extra specificity makes this override the default Algolia styles.

styles/_top-banner.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
background: #32E685 !important;
77
padding: 7px 35px;
88
font-family: "Space Grotesk";
9-
z-index: 9999;
9+
z-index: 10;
1010
cursor: pointer;
1111

1212
&:hover {

styles/_top-nav.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ $banner-height: 52px; // Apex 2025 banner is 52px. 0 for no pencil banner.
144144
}
145145

146146
#topnav-search {
147+
flex-grow: 1;
147148
.input-group {
148149
flex-grow: 1;
149150
flex-wrap: nowrap; // Fix search bar splitting into two lines on iPhone 5
@@ -315,7 +316,7 @@ $banner-height: 52px; // Apex 2025 banner is 52px. 0 for no pencil banner.
315316

316317
@include media-breakpoint-up(xl) {
317318
#topnav-search {
318-
margin-left: auto;
319+
margin-left: 3.5rem;
319320
margin-right: 0.5rem;
320321
}
321322
#topnav-language {

styles/_xrplai.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ html.light .MarkpromptContentDialog h3:not(.chip) {
2727
.MarkpromptOverlay {
2828
z-index: 20;
2929
}
30+
.MarkpromptContentDialog{
31+
z-index: 10000;
32+
}

styles/light/_light-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ main article .card-grid {
13401340
}
13411341
}
13421342

1343-
/* Search styles */
1343+
/* Algolia Search styles
13441344
13451345
.algolia-autocomplete .ds-dropdown-menu::before {
13461346
background-color: $gray-100;
@@ -1352,3 +1352,4 @@ main article .card-grid {
13521352
.DocSearch-Modal {
13531353
box-shadow: $light-box-shadow;
13541354
}
1355+
*/

0 commit comments

Comments
 (0)