Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ echo ""
# Clean and build for production with explicit baseURL
hugo --cleanDestinationDir --minify --baseURL="https://blog.nischalskanda.tech/"

# Build Pagefind search index
echo ""
echo "🔍 Building search index with Pagefind..."
npx --yes pagefind@latest --site public

Comment on lines +13 to +17
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Pagefind search index build step is unnecessary and conflicts with the actual search implementation. The search functionality in assets/js/search.js uses a custom JSON-based index generated by layouts/_default/index.json, not Pagefind.

Running npx pagefind here will:

  1. Install Pagefind unnecessarily, slowing down builds
  2. Create Pagefind index files that are never used by the application
  3. Add unused files to the deployment

Either:

  • Remove these lines (13-16) if using the JSON-based search, OR
  • Update assets/js/search.js to actually use Pagefind's JavaScript API instead of the custom implementation

Based on the current codebase, these lines should be removed.

Suggested change
# Build Pagefind search index
echo ""
echo "🔍 Building search index with Pagefind..."
npx --yes pagefind@latest --site public

Copilot uses AI. Check for mistakes.
echo ""
echo "✅ Production build complete!"
echo "📁 Files are ready in ./public/ directory"
Expand Down
Loading