We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ac315b commit 90269e8Copy full SHA for 90269e8
src/components/reo-script.tsx
@@ -18,7 +18,8 @@ const ReoScript = () => {
18
}
19
20
// Handle blog post filtering
21
- const blogPathMatch = pathname.match(/^\/[^/]+\/blog\/([^/]+)$/);
+ // Regex handles both URL formats: /blog/slug (default locale) and /locale/blog/slug (non-default locale)
22
+ const blogPathMatch = pathname.match(/^(?:\/[^/]+)?\/blog\/([^/]+)$/);
23
if (blogPathMatch) {
24
const slug = blogPathMatch[1];
25
// Use pre-generated mapping for instant lookup
0 commit comments