From 3401ad19a4643b0782e1ef02a18db5f2dd0e9f3d Mon Sep 17 00:00:00 2001 From: grassblock Date: Tue, 22 Jul 2025 11:01:13 +0800 Subject: [PATCH] feat: add option to open navbar links in new tab --- src/components/Navbar.astro | 2 +- src/config.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 7bcb4bc..0780ee9 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -5,5 +5,5 @@ const navBarItems = siteConfig.navBarItems \ No newline at end of file diff --git a/src/config.ts b/src/config.ts index 666a0bd..7184d62 100644 --- a/src/config.ts +++ b/src/config.ts @@ -20,9 +20,9 @@ export const siteConfig = { navBarItems: [ // additional items in the navbar // the order of the items will be the same as the order in the array - // format is { text: string, link: string } - { text: "RSS", link: "/rss.xml" }, - { text: "GitHub", link: "https://github.com/GrassBlock1/mercury" }, + // format is { text: string, link: string, openInNewTab?: boolean (default: true) } + { text: "RSS", link: "/rss.xml", openInNewTab: true }, + { text: "GitHub", link: "https://github.com/GrassBlock1/mercury", openInNewTab: false }, ], // search // This only works when noClientJavaScript is enabled