You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not possible to serve the root page (e.g. index.md) from a content collection:
404: Not found
Path: /
Setting slug in front matter to '/' (slash) or '' (empty string) does not work.
npm run dev
> project@0.0.1 dev
> astro dev
🚀 astro v2.4.2 started in 388ms
┃ Local http://localhost:3000/
┃ Network use --host to expose
07:33:44 PM [content] Watching src/content/ for changes
07:33:44 PM [content] Types generated
07:33:44 PM [astro] update /.astro/types.d.ts
07:33:54 PM [getStaticPaths] A `getStaticPaths()` route pattern was matched, but no matching static path was found for requested path `/`.
Possible dynamic routes being matched: src/pages/[...slug].astro.
07:33:54 PM [serve] 404 /
07:34:18 PM [astro] reload /src/content/pages/index.md
07:34:18 PM [astro] update /.idea/sonarlint/issuestore/index.pb
07:34:18 PM [astro] update /.idea/sonarlint/securityhotspotstore/index.pb
07:34:18 PM [astro] update /.astro/types.d.ts
07:34:28 PM [getStaticPaths] invalid path param: slug. `undefined` expected for an optional param, but got empty string.
07:34:28 PM [getStaticPaths] A `getStaticPaths()` route pattern was matched, but no matching static path was found for requested path `/`.
Possible dynamic routes being matched: src/pages/[...slug].astro.
07:34:28 PM [serve] 404 /
07:34:48 PM [astro] update /.idea/sonarlint/securityhotspotstore/index.pb
07:34:48 PM [astro] update /.idea/sonarlint/issuestore/index.pb
07:34:50 PM [astro] reload /src/content/pages/index.md
07:34:50 PM [astro] update /.astro/types.d.ts
07:47:31 PM [getStaticPaths] A `getStaticPaths()` route pattern was matched, but no matching static path was found for requested path `/`.
What version of
astro
are you using?2.4.2
Are you using an SSR adapter? If so, which one?
none
What package manager are you using?
npm
What operating system are you using?
Mac
What browser are you using?
any
Describe the Bug
It's not possible to serve the root page (e.g. index.md) from a content collection:
Setting slug in front matter to '/' (slash) or '' (empty string) does not work.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-z4igp1-mwgqtc
Participation
The text was updated successfully, but these errors were encountered: