Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion reproducibility/site/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import solid from "@astrojs/solid-js";
import sitemap from "@astrojs/sitemap";

export default defineConfig({
site: "https://leaderboard.querygym.com",
output: "static",
integrations: [tailwind({ applyBaseStyles: false }), solid()],
integrations: [
tailwind({ applyBaseStyles: false }),
solid(),
sitemap({
changefreq: "weekly",
priority: 0.5,
lastmod: new Date(),
serialize(item) {
// Home page is the canonical entry point.
if (item.url === "https://leaderboard.querygym.com/") {
return { ...item, priority: 1.0, changefreq: "weekly" };
}
// Per-run detail pages are mostly internal-link targets — give them
// lower priority so search engines focus on the dataset/method/model
// index pages.
if (item.url.startsWith("https://leaderboard.querygym.com/runs/")) {
return { ...item, priority: 0.3, changefreq: "monthly" };
}
return item;
},
}),
],
vite: {
ssr: {
// Needed because we read CSV/YAML at build time from outside the project root.
Expand Down
21 changes: 11 additions & 10 deletions reproducibility/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,23 @@
"check": "astro check"
},
"dependencies": {
"@qg/shared": "workspace:*",
"astro": "^5.0.0",
"@astrojs/tailwind": "^5.1.5",
"@astrojs/sitemap": "^3.7.2",
"@astrojs/solid-js": "^5.0.0",
"solid-js": "^1.9.0",
"@astrojs/tailwind": "^5.1.5",
"@qg/shared": "workspace:*",
"@tanstack/solid-table": "^8.20.0",
"tailwindcss": "^3.4.0",
"astro": "^5.0.0",
"js-yaml": "^4.1.0",
"papaparse": "^5.4.1",
"js-yaml": "^4.1.0"
"solid-js": "^1.9.0",
"tailwindcss": "^3.4.0"
},
"devDependencies": {
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.0.0",
"@types/papaparse": "^5.3.15",
"tsx": "^4.19.0",
"typescript": "^5.6.0",
"wrangler": "^4.0.0",
"@types/papaparse": "^5.3.15",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.0.0"
"wrangler": "^4.0.0"
}
}
5 changes: 5 additions & 0 deletions reproducibility/site/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# leaderboard.querygym.com — open to all well-behaved crawlers.
User-agent: *
Allow: /

Sitemap: https://leaderboard.querygym.com/sitemap-index.xml
2 changes: 0 additions & 2 deletions reproducibility/site/src/components/EmptyState.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ const {
<a
href="https://querygym.readthedocs.io/en/latest/user-guide/reproducibility/"
class="mt-4 inline-block rounded-md bg-qg-accent px-4 py-2 text-sm font-medium text-white hover:opacity-90"
target="_blank"
rel="noopener noreferrer"
>
How to submit a result →
</a>
Expand Down
2 changes: 2 additions & 0 deletions reproducibility/site/src/layouts/Default.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ interface Props {

const { title, description } = Astro.props;

// External links render the linkout icon and open in the current tab.
const navLinks = [
{ label: "Datasets", href: "/datasets/" },
{ label: "Methods", href: "/methods/" },
Expand All @@ -28,6 +29,7 @@ const navLinks = [
<title>{title} — QueryGym Leaderboard</title>
{description && <meta name="description" content={description} />}
<link rel="icon" type="image/png" href="/querygym-logo.png" />
<link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap-index.xml" />

<GoogleAnalytics />
</head>
Expand Down
2 changes: 1 addition & 1 deletion web/shared/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const baseLinks: FooterLink[] = [
{
[...baseLinks, ...extraLinks].map((l) => (
<li>
<a class="hover:text-qg-fg" href={l.href} target="_blank" rel="noopener noreferrer">
<a class="hover:text-qg-fg" href={l.href}>
{l.label}
</a>
</li>
Expand Down
31 changes: 28 additions & 3 deletions web/shared/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@
interface NavLink {
label: string;
href: string;
/**
* Renders the external-link arrow icon next to the label so users can see
* at a glance that the link leaves the current site. Note: by default the
* link still opens in the *same* tab — set `newTab: true` for cross-site
* links you really want to open in a fresh tab.
*/
external?: boolean;
/** Open in a new tab. Adds rel="noopener noreferrer" automatically. */
newTab?: boolean;
}

interface Props {
Expand Down Expand Up @@ -44,11 +52,28 @@ const {
links.map((l) => (
<a
href={l.href}
class="rounded px-3 py-1.5 text-sm font-medium text-white/90 hover:bg-white/15 hover:text-white"
target={l.external ? "_blank" : undefined}
rel={l.external ? "noopener noreferrer" : undefined}
class="inline-flex items-center gap-1 rounded px-3 py-1.5 text-sm font-medium text-white/90 hover:bg-white/15 hover:text-white"
target={l.newTab ? "_blank" : undefined}
rel={l.newTab ? "noopener noreferrer" : undefined}
>
{l.label}
{l.external && (
<svg
aria-hidden="true"
width="11"
height="11"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="opacity-80"
>
<path d="M7 17 17 7" />
<path d="M8 7h9v9" />
</svg>
)}
</a>
))
}
Expand Down
2 changes: 0 additions & 2 deletions web/site/src/components/EcosystemMap.astro
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ const cards = [
cards.map((c) => (
<a
href={c.href}
target={c.href.startsWith("http") ? "_blank" : undefined}
rel={c.href.startsWith("http") ? "noopener noreferrer" : undefined}
class:list={[
"qg-card flex flex-col justify-between !p-5",
c.primary && "!border-qg-accent",
Expand Down
8 changes: 6 additions & 2 deletions web/site/src/layouts/Default.astro
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ 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.
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: "Dashboard ↗", href: "https://dashboard.querygym.com", external: true },
{ label: "Leaderboard", href: "https://leaderboard.querygym.com", external: true },
{ label: "Dashboard", href: "https://dashboard.querygym.com", external: true },
];

const fullTitle = `${title} — QueryGym`;
Expand Down Expand Up @@ -78,7 +82,7 @@ const metaDescription =
<meta name="twitter:image" content={ogImageAbsolute} />

<link rel="icon" type="image/png" href="/querygym-logo.png" />
<link rel="sitemap" href="/sitemap-index.xml" />
<link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap-index.xml" />

{jsonLd && <script type="application/ld+json" set:html={jsonLd} />}

Expand Down
Loading