Skip to content

fix(astro): rename slug to ref to fix Starlight routing#8092

Merged
h0lybyte merged 3 commits intodevfrom
trunk/slug-to-ref-1773653119
Mar 16, 2026
Merged

fix(astro): rename slug to ref to fix Starlight routing#8092
h0lybyte merged 3 commits intodevfrom
trunk/slug-to-ref-1773653119

Conversation

@h0lybyte
Copy link
Member

Summary

  • Starlight hijacks frontmatter slug as a route override, causing items to render at /<name>/ instead of /itemdb/<name>/
  • Rename proto field slug -> ref across the full chain:
    • 4 proto files (itemdb, npcdb, questdb, mapdb)
    • 4 generated Zod schemas
    • 153 MDX frontmatter entries (99 itemdb + 28 mapdb + 24 npcdb + 2 questdb)
    • 8 Astro API routes and components
    • discordsh itemdb.json data file
  • OSRS slug fields unchanged (separate system)

Test plan

  • Verify https://kbve.com/itemdb/alchemist-stardust/ resolves correctly
  • Verify https://kbve.com/alchemist-stardust/ no longer exists (404)
  • Spot-check mapdb, npcdb, questdb routes
  • Verify /api/itemdb.json returns ref instead of slug

…ht routing

Starlight hijacks the frontmatter `slug` field as a route override,
causing items like /alchemist-stardust/ instead of /itemdb/alchemist-stardust/.
Rename the proto field to `ref` throughout the chain: proto definitions,
generated Zod schemas, all 153 MDX frontmatter entries, API route handlers,
content config validation, and the discordsh itemdb data file.

OSRS slug fields are unchanged (separate system).
@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Update prost-generated proto structs (Item, Npc, Quest, QuestChain,
Zone, Region, WorldObjectDef, PointOfInterest) and all registry/json
code that accesses the field. Methods renamed: from_slug->from_ref,
get_by_slug->get_by_ref, id_for_slug->id_for_ref. Also update
axum-kbve profile.rs JSON key fallback.
@h0lybyte h0lybyte merged commit 2154d51 into dev Mar 16, 2026
4 checks passed
@h0lybyte h0lybyte deleted the trunk/slug-to-ref-1773653119 branch March 16, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant