Closed teinett closed 1 year ago
The [getStaticPaths] getStaticPaths() is ignored when "output: server" is set.
error is directing to the src/pages[lang]/index.astro
file, not src/pages/[lang]/[…slug].astro
. I guess it would be nice if the error message tells which route file is causing the issue.
What version of
astro
are you using?2.4.2
Are you using an SSR adapter? If so, which one?
node
What package manager are you using?
npm
What operating system are you using?
mac
What browser are you using?
all browsers
Describe the Bug
Connected with #6768.
I have Astro website with content collections in different languages.
My file
/src/pages/[lang]/[…slug].astro
- I use SSG:Function
getStaticPaths()
is obligatory for content collections. So I have it.Also I have the page for redirect
/src/pages/index.astro
- so I use SSR:Redirect requires changes in
astro.config.mjs
:I start my development server.
Problem: I receive warning in console:
OK, I delete function
getStaticPaths()
in/src/pages/[lang]/[…slug].astro
. After that I have another problem: error in console:I used recipe about i18n and the code of website docs.astro.build (it has i18n too).
What is the correct way to have redirects and content collections at the same time, but without warnings or errors?
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-dkjujg?file=README.md
Participation