File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,17 @@ export default {
77 apiKey : '9d632dcd5f26ef42a4818fb0d536326b' ,
88 indexName : 'Aspire docs' ,
99 insights : true ,
10- searchParameters : {
11- // Exclude API reference pages — these have dedicated search on their own pages.
12- // Requires 'url' to be in attributesForFaceting in the Algolia index settings.
13- filters : 'NOT url_without_anchor_path:/reference/api/' ,
10+ transformItems ( items ) {
11+ return items . map ( ( item ) => {
12+ // Rewrite aspire.dev URLs to current host when running locally
13+ if ( typeof location !== 'undefined' && location . hostname === 'localhost' ) {
14+ const url = new URL ( item . url ) ;
15+ url . protocol = location . protocol ;
16+ url . host = location . host ;
17+ return { ...item , url : url . href } ;
18+ }
19+ return item ;
20+ } ) ;
1421 } ,
1522 resultsFooterComponent ( ) {
1623 return createElement (
You can’t perform that action at this time.
0 commit comments