#Redirect URL in Starlight Sidebar
1 messages · Page 1 of 1 (latest)
how to make the link on sidebar redirect to another website in starlight i tried in slug and it doesnt work
In your astro.config.mjs, you can add externals links in integrations.sidebar like :
items: [
{
label: 'Site web ↗',
link: 'https://mrrobot.app',
attrs: {target: '_blank', rel: "noreferrer noopener"},
translations: {
en: 'Website ↗',
}
},
]
oh okay thinks i was using slug not link
Or if you want directly put a link to a redirect link, you can do that in astro.config.mjs with :
redirects: {
'/myurl': 'https://example.com/'
}
Redirect URL in Starlight Sidebar
If your issue is resolved, please help by doing the following two steps:
- From the ellipses (3-dot menu) in the top-right corner of the post (not the first message), edit the tags to include the Solved tag.
- From the same ellipses, select Close Post.
Your post will still be available to search and can be re-opened simply by replying in it. Closing a post moves it down with older posts, so we can more easily focus on issues that still need to be resolved.
Thank you for your help!
