Skip to content

duplicate-slug lowercases static page routes even though Astro preserves case #100

Description

@sansynx

I found a mismatch between Nimbus's duplicate-route preflight and Astro's actual static route handling

In packages/nimbus-docs/src/lint/site-model.ts, fileToRoute lowercases every static page segment before grouping routes. The comment says this matches Astro's joinSegments behavior, but Astro preserves segment casing

Reproduction

  1. Add src/pages/Guide.astro
  2. Run the site build and the Nimbus duplicate-route check

Astro 7.0.9 emits /Guide/index.html, while enumerateStaticPageRoutes reports /guide. With src/content/docs/guide.mdx present, Nimbus reports a collision even though Astro serves /Guide and /guide separately

A minimal check produced:

Astro build: /Guide/index.html
Nimbus route enumeration: /guide

Could the static route enumeration use Astro's case-preserving behavior, or document and test an intentional case-insensitive policy? A regression test around Guide.astro would help prevent this from drifting again

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