File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 11import type { Metadata } from "next" ;
2- import Script from "next/script" ;
32import "./globals.css" ;
43
54const basePath = process . env . NEXT_PUBLIC_BASE_PATH === 'true' ? '/implementation-catalog' : '' ;
@@ -26,12 +25,12 @@ export default function RootLayout({
2625} > ) {
2726 return (
2827 < html lang = "en" >
29- < head />
28+ < head >
29+ { /* Pagefind UI script - must be loaded for search to work */ }
30+ < script src = { `${ basePath } /_pagefind/pagefind-ui.js` } defer />
31+ </ head >
3032 < body className = "antialiased" >
3133 { children }
32- { /* Pagefind UI - loads after static build */ }
33- { /* Next.js automatically adds basePath from config, so just use relative path */ }
34- < Script src = "/_pagefind/pagefind-ui.js" strategy = "afterInteractive" />
3534 </ body >
3635 </ html >
3736 ) ;
You can’t perform that action at this time.
0 commit comments