diff --git a/scripts/build-with-pagefind.cjs b/scripts/build-with-pagefind.cjs index 7baa70c..fabd54f 100644 --- a/scripts/build-with-pagefind.cjs +++ b/scripts/build-with-pagefind.cjs @@ -19,12 +19,12 @@ function detectPlatform() { if (process.env.GITHUB_ACTIONS) { return 'github'; } - + // Check if specific directories exist if (existsSync('.vercel')) { return 'vercel'; } - + // Default to standard dist directory return 'default'; } @@ -38,7 +38,7 @@ function getPagefindOutputDir(platform) { github: 'dist', default: 'dist' }; - + return outputDirs[platform] || 'dist'; } @@ -46,34 +46,34 @@ function getPagefindOutputDir(platform) { function main() { const platform = detectPlatform(); const outputDir = getPagefindOutputDir(platform); - + console.log(`🚀 Detected deployment platform: ${platform}`); console.log(`📁 Pagefind output directory: ${outputDir}`); - + try { // Run Astro build console.log('🔨 Running Astro build...'); - execSync(`npx astro build`.trim(), { + execSync(`npx astro build`.trim(), { stdio: 'inherit', cwd: process.cwd() // Ensure in the correct directory }); - + // Check if output directory exists if (!existsSync(outputDir)) { console.error(`❌ Output directory does not exist: ${outputDir}`); process.exit(1); } - + // Run Pagefind console.log(`🔍 Running Pagefind search index generation...`); execSync(`npx pagefind --site ${outputDir}`, { stdio: 'inherit', cwd: process.cwd() // Ensure in the correct directory }); - + console.log('✅ Build completed!'); console.log(`📊 Search index generated at: ${outputDir}/pagefind/`); - + } catch (error) { console.error('❌ Build failed:', error.message); process.exit(1); diff --git a/src/components/navbar.astro b/src/components/navbar.astro index ca5dd00..c974215 100644 --- a/src/components/navbar.astro +++ b/src/components/navbar.astro @@ -51,11 +51,11 @@ let links: NavbarLink[] = navbarConfig.links.map( })}