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 sidebar highlighting when path contains non-ASCII characters #1069

Merged
merged 4 commits into from
Nov 17, 2023

Conversation

Genteure
Copy link
Contributor

What kind of changes does this PR include?

  • Changes to Starlight code

Description

currentPathname comes from Astro.url in index.astro, which is

A full URL object of the request URL. Equivalent to: new URL(Astro.request.url)

Before After
image image

Copy link

changeset-bot bot commented Nov 15, 2023

🦋 Changeset detected

Latest commit: ba6e87b

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

Copy link

vercel bot commented Nov 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Nov 16, 2023 11:43pm

@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Nov 15, 2023
@Genteure Genteure changed the title Fix sidebar and navigation when path contains non-ASCII characters Fix sidebar and navigation buttons when path contains non-ASCII characters Nov 15, 2023
Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com>
@kevinzunigacuellar
Copy link
Sponsor Member

Perhaps we can re-use a test suite. I was looking around and I think it could be a good fit for basics/navigation -> getSidebar(). What do you think?

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @Genteure!

@delucis delucis changed the title Fix sidebar and navigation buttons when path contains non-ASCII characters Fix sidebar highlighting when path contains non-ASCII characters Nov 17, 2023
@delucis delucis merged commit b86f360 into withastro:main Nov 17, 2023
6 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sidebar highlighting and navigation buttons not working in pages with non-ascii in path
4 participants