diff --git a/reproducibility/site/public/_redirects b/reproducibility/site/public/_redirects index d375bd3..19a8dd2 100644 --- a/reproducibility/site/public/_redirects +++ b/reproducibility/site/public/_redirects @@ -2,3 +2,7 @@ # leaderboard.querygym.com. /leaderboard / 301 /index.html / 301 + +# Alias /sitemap.xml -> /sitemap-index.xml (200 = rewrite, not redirect). +# GSC and other crawlers default to probing /sitemap.xml. +/sitemap.xml /sitemap-index.xml 200 diff --git a/reproducibility/site/src/layouts/Default.astro b/reproducibility/site/src/layouts/Default.astro index 3a001a9..0ba8afa 100644 --- a/reproducibility/site/src/layouts/Default.astro +++ b/reproducibility/site/src/layouts/Default.astro @@ -11,13 +11,14 @@ interface Props { const { title, description } = Astro.props; -// External links render the linkout icon and open in the current tab. +// Top-menu linkout items (external: true) open in a new tab so the user +// keeps their place on the leaderboard when they cross to a sibling site. const navLinks = [ { label: "Datasets", href: "/datasets/" }, { label: "Methods", href: "/methods/" }, { label: "Models", href: "/models/" }, { label: "About", href: "/about" }, - { label: "Toolkit", href: "https://querygym.com", external: true }, + { label: "Toolkit", href: "https://querygym.com", external: true, newTab: true }, ]; --- diff --git a/web/site/public/_redirects b/web/site/public/_redirects index 8314cd8..f390ca8 100644 --- a/web/site/public/_redirects +++ b/web/site/public/_redirects @@ -6,3 +6,10 @@ /leaderboard https://leaderboard.querygym.com/ 301 /leaderboard.html https://leaderboard.querygym.com/ 301 /QueryGym/* https://querygym.com/:splat 301 + +# Alias the canonical /sitemap.xml path to the @astrojs/sitemap-generated +# index. Google Search Console's "Add a sitemap" form auto-suggests +# /sitemap.xml; tools like Bing/Yandex/IndexNow probe it; humans type it. +# The 200 status is a rewrite (URL stays the same in the browser), not a +# redirect — keeps the canonical URL for crawlers stable. +/sitemap.xml /sitemap-index.xml 200 diff --git a/web/site/src/layouts/Default.astro b/web/site/src/layouts/Default.astro index 18779c4..9d06fd2 100644 --- a/web/site/src/layouts/Default.astro +++ b/web/site/src/layouts/Default.astro @@ -33,17 +33,18 @@ const SITE = "https://querygym.com"; const canonical = new URL(Astro.url.pathname, SITE).toString(); const ogImageAbsolute = new URL(ogImage, SITE).toString(); -// External links use `external: true` (renders the linkout icon) and open in -// the *current* tab — opening a new tab silently is a worse UX than letting -// the user middle-click / cmd-click when they want a tab. +// Top-menu linkout items (external: true) open in a new tab so the user +// keeps their place on querygym.com when they leave to a sibling site. +// Everywhere else on the page (footer, hero CTAs, ecosystem cards, in-page +// citations) stays same-tab unless explicitly noted. const navLinks = [ { label: "Install", href: "/install" }, { label: "Methods", href: "/methods" }, { label: "Reproducibility", href: "/reproducibility" }, { label: "Cite", href: "/cite" }, - { label: "Docs", href: "https://querygym.readthedocs.io", external: true }, - { label: "Leaderboard", href: "https://leaderboard.querygym.com", external: true }, - { label: "Dashboard", href: "https://dashboard.querygym.com", external: true }, + { label: "Docs", href: "https://querygym.readthedocs.io", external: true, newTab: true }, + { label: "Leaderboard", href: "https://leaderboard.querygym.com", external: true, newTab: true }, + { label: "Dashboard", href: "https://dashboard.querygym.com", external: true, newTab: true }, ]; const fullTitle = `${title} — QueryGym`;