withastro / starlight

🌟 Build beautiful, accessible, high-performance documentation websites with Astro
https://starlight.astro.build
MIT License
5.05k stars 532 forks source link

Site title always links to `/` not to the current locale #56

Closed delucis closed 1 year ago

delucis commented 1 year ago

What version of starlight are you using?

0.0.7

What version of astro are you using?

2.4.3

What package manager are you using?

pnpm

What operating system are you using?

macOS

What browser are you using?

Firefox/Chrome/Safari

Describe the Bug

The site title/logo link (in the SiteTitle.astro component) currently always links to the website base.

This means for pages not in the root locale (like German in the current Starlight docs), clicking the title link takes you to a different language.

We should pass the current locale to the site title component and use it in the link so that users stay in their own language's part of the site when clicking it.

Link to Minimal Reproducible Example

https://starlight.astro.build/de/getting-started/

Participation

delucis commented 1 year ago

Done in #57 🎉