Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Apr 29, 2025

Fix search indexing configuration (ENG-791)

Changes

  • Updated Nextra configuration to use contentDirBasePath: '/content' to match getPageMap('/content') in layout.tsx
  • Simplified Nextra search configuration to avoid conflicts with Pagefind
  • Enabled static HTML export in Next.js configuration to generate HTML files for all routes
  • Enhanced Pagefind configuration to target the correct directories and improve content indexing:
    • Updated site path to target static export files in 'out' directory
    • Added --glob "**/*.html" to target all HTML files
    • Added --exclude-selectors "nav, footer, [data-nextra-hide]" to exclude navigation elements
    • Added --force-language "en" to ensure proper language detection

Problem

The docs site's search was only indexing a tiny fraction of content (3 pages, 11 words) despite having 109 MDX files available.

Approach

The key issue was that Next.js wasn't generating enough static HTML files for Pagefind to index. Our solution:

  1. Enable static HTML export with output: 'export' in next.config.mjs to generate HTML files for all routes
  2. Update Pagefind to target the 'out' directory where static exports are generated
  3. Align contentDirBasePath with the actual content location used in layout.tsx
  4. Enhance Pagefind configuration with additional parameters for better indexing

These changes should ensure Pagefind properly indexes all relevant content by targeting the static HTML files generated during the build process.

Testing

Link to Devin run: https://app.devin.ai/sessions/938cae89a83f4f18a9f44c05229b6d64
User: Nathan Clevenger (nateclev@gmail.com)

…NG-791)

Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
@linear
Copy link

linear bot commented Apr 29, 2025

@vercel
Copy link

vercel bot commented Apr 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ❌ Failed (Inspect) Apr 29, 2025 2:22pm

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Contributor

📦 Next.js Bundle Analysis for do

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

devin-ai-integration bot and others added 4 commits April 29, 2025 09:27
… indexing (ENG-791)

Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
…ndexing (ENG-791)

Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
…G-791)

Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
…ts (ENG-791)

Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
@devin-ai-integration devin-ai-integration bot changed the base branch from main to next April 29, 2025 12:49
@devin-ai-integration
Copy link
Contributor Author

Closing due to inactivity for more than 7 days.

@devin-ai-integration
Copy link
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants