#pagefind with i18n routing and redirects?
1 messages · Page 1 of 1 (latest)
Hi @thorny saddle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
I understand you're having issues with Pagefind and Astro's i18n routing, particularly with redirects affecting your search indexing.
The knowledge sources provided don't contain specific information about integrating Pagefind with Astro's i18n routing. While Astro has robust internationalization features, including various routing strategies like prefixDefaultLocale, redirectToDefaultLocale, and fallback options, there's no direct mention of how these interact with Pagefind specifically.
You mentioned Starlight, which is Astro's documentation theme that does include i18n support. Starlight's approach to i18n involves creating language-specific directories for content, but the knowledge sources don't detail how it handles Pagefind integration specifically.
For your issue with redirects affecting Pagefind indexing, you might want to consider:
- Using Astro's
routingconfiguration options to control how your i18n URLs are structured - Exploring the
manualrouting option (added in Astro 4.6.0) which gives you complete control over i18n routing logic
// Example of manual routing configuration
export default defineConfig({
i18n: {
locales: ["es", "en", "fr"],
defaultLocale: "en",
routing: "manual"
}
})