Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix index.md slug issue in routing logic #55

Merged
merged 6 commits into from
May 16, 2023
Merged

Conversation

delucis
Copy link
Member

@delucis delucis commented May 16, 2023

Astro content collections generate a slug which we’re using for routing, but for index.md files, the behaviour varies. If the file is in the collection route (src/content/docs/index.md), the slug is index, but in nested directories, this is shortened to just the directory name (e.g. src/content/docs/lang/index.md has a slug of lang).

Existing routing logic wasn’t accounting for this causing some bugs and this PR fixes that.

@changeset-bot
Copy link

changeset-bot bot commented May 16, 2023

🦋 Changeset detected

Latest commit: 1b558f2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented May 16, 2023

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 1b558f2
🔍 Latest deploy log https://app.netlify.com/sites/astro-starlight/deploys/6463d645be13460008916157
😎 Deploy Preview https://deploy-preview-55--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link
Contributor

github-actions bot commented May 16, 2023

size-limit report 📦

Path Size
/index.html 10.55 KB (-0.45% 🔽)
/_astro/*.js 15.8 KB (0%)
/_astro/*.css 8.77 KB (0%)

@delucis delucis merged commit 8597b9c into main May 16, 2023
@delucis delucis deleted the chris/i18n-routing-fix branch May 16, 2023 19:25
@astrobot-houston astrobot-houston mentioned this pull request May 16, 2023
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