yassinedoghri / astro-i18next

An astro integration of i18next + some utility components to help you translate your astro websites!
https://astro-i18next.yassinedoghri.com
MIT License
473 stars 33 forks source link

Is there any way to ignore specific page being generated? #181

Open cotton123236 opened 9 months ago

cotton123236 commented 9 months ago

Thanks for this great astro Integration! I'm using MDX to build a documentation site. I added locale folders in the content folder and use dynamic page [...slug].astro to get those MDX files. When I run npx astro-i18next generate, it will generate a [...slug].astro in each locale folder in pages, but I don't need it actually.

Currently, I set [...slug] as 'index' in astro-i18next.config.ts, because I already got a index.astro in pages folder so it won't generate again.

export default {
  // ...
  routes: {
    twfr {
      '[...slug]': 'index'
    }
  }
}

But it seems not a great solution for my situation, so I was wondering is there any way to ignore [...slug].astro being generated?