diff --git a/docs/.vitepress/nav.ts b/docs/.vitepress/nav.ts index b96449dd..11ef9b64 100644 --- a/docs/.vitepress/nav.ts +++ b/docs/.vitepress/nav.ts @@ -19,9 +19,15 @@ export const navbar: DefaultTheme.NavItem[] = [ text: IS_NEXT ? PROJECT_VARS.VERSION_SNAPSHOT : PROJECT_VARS.VERSION, items: [ // Absolute, since each channel is a site of its own, with its own base. - IS_NEXT - ? { text: `Latest release (${PROJECT_VARS.VERSION})`, link: SITE_URL } - : { text: 'Unreleased (main)', link: new URL(NEXT_BASE, SITE_URL).href }, + // VitePress opens absolute links in a new tab; the other channel is + // the same site to the reader, so it opens in place. + { + ...(IS_NEXT + ? { text: `Latest release (${PROJECT_VARS.VERSION})`, link: SITE_URL } + : { text: 'Unreleased (main)', link: new URL(NEXT_BASE, SITE_URL).href }), + target: '_self', + noIcon: true, + }, { text: 'Changelog', link: 'https://github.com/devopvoid/webrtc-java/blob/main/CHANGELOG.md' diff --git a/docs/.vitepress/theme/NextBanner.vue b/docs/.vitepress/theme/NextBanner.vue index d1fcee9d..928198c4 100644 --- a/docs/.vitepress/theme/NextBanner.vue +++ b/docs/.vitepress/theme/NextBanner.vue @@ -9,9 +9,11 @@ const isNext = computed(() => site.value.base === NEXT_BASE)