Skip to content

getDocsStaticPaths should use the same root index route convention as entryRouteUrl #102

Description

@sansynx

I found inconsistent route handling for the root docs entry

getDocsStaticPaths currently passes entry.id directly as the catch-all slug. For src/content/docs/index.mdx, that yields slug: index, and Astro builds the page at /index

Elsewhere Nimbus treats the same entry as the site root. entryRouteUrl("", "index") returns /, and the indexed entry, sidebar, and markdown helpers use that canonical URL

The current apps/www catch-all route works around this by translating slug: index to undefined, but packages/nimbus-starter-source/src/pages/[...slug].astro assigns getDocsStaticPaths directly and does not include that normalization

Could Nimbus choose one root-index contract and apply it consistently, preferably by normalizing the root entry in getDocsStaticPaths or by updating all helpers and templates to use /index? A small regression test for the starter template would make the expected route clear

Relevant code:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions