Skip to content

Commit 0181ec5

Browse files
committed
fix canonical url and add json-ld support to meta
1 parent b8b9fd8 commit 0181ec5

1 file changed

Lines changed: 30 additions & 18 deletions

File tree

‎src/components/layout/Meta.svelte‎

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,65 @@
11
<script>
2-
export let title = "FormulaCode";
2+
export let title =
3+
"FormulaCode: LLM Agent Benchmark for Python Code Optimization";
34
export let description =
4-
"FormulaCode is the first large-scale analysis of the holistic ability of LLM agents to optimize codebases.";
5+
"FormulaCode is a continually updated benchmark evaluating LLM coding agents on real-world Python code optimization. 957 performance bottlenecks from 70+ scientific Python repositories, each paired with expert patches and community-maintained performance workloads.";
56
export let url = "https://formulacode.org/";
67
export let keywords =
7-
"Code Optimization, Large Language Models, LLMs, AI Agents, Software Performance, Machine Learning, AI Research";
8+
"code optimization benchmark, LLM agent benchmark, Python performance benchmark, AI coding agents, code performance dataset, agentic optimization, LLM evaluation, software engineering benchmark, code optimization dataset, FormulaCode";
9+
export let ogType = "website";
810
export let preloadFont = [];
11+
12+
// JSON-LD structured data: pass an array of plain JS objects. Each is
13+
// serialized into its own <script type="application/ld+json"> tag.
14+
export let jsonLd = [];
15+
16+
// Strip trailing slash so we don't render "https://formulacode.org//" in
17+
// canonical / og:url. SvelteKit's trailingSlash: "always" guarantees the
18+
// trailing slash on the input.
19+
$: canonicalUrl = (url || "https://formulacode.org/").replace(/\/+$/, "/");
20+
$: ogImage = "https://formulacode.org/assets/images/formula-code-banner.png";
921
</script>
1022

1123
<svelte:head>
1224
<title>{title}</title>
1325
<meta name="description" content={description} />
1426
<meta name="author" content="Atharva Sehgal" />
27+
<meta name="keywords" content={keywords} />
1528
<meta name="news_keywords" content={keywords} />
1629

1730
<meta property="og:title" content={title} />
1831
<meta property="og:site_name" content="FormulaCode" />
19-
<meta property="og:url" content={url} />
32+
<meta property="og:url" content={canonicalUrl} />
2033
<meta property="og:description" content={description} />
21-
<meta property="og:type" content="article" />
34+
<meta property="og:type" content={ogType} />
2235
<meta property="og:locale" content="en_US" />
2336

24-
<meta
25-
property="og:image"
26-
content="{url}assets/images/formula-code-banner.png"
27-
/>
37+
<meta property="og:image" content={ogImage} />
2838
<meta
2939
property="og:image:alt"
30-
content="FormulaCode Data Analysis Logo and Banner"
40+
content="FormulaCode benchmark — agentic optimization on large codebases"
3141
/>
3242
<meta property="og:image:type" content="image/png" />
3343
<meta property="og:image:width" content="1200" />
3444
<meta property="og:image:height" content="630" />
3545

3646
<meta name="twitter:card" content="summary_large_image" />
37-
<meta name="twitter:site" content="https://formulacode.org/" />
47+
<meta name="twitter:site" content="@atharvas" />
3848
<meta name="twitter:creator" content="@atharvas" />
3949
<meta name="twitter:title" content={title} />
4050
<meta name="twitter:description" content={description} />
41-
<meta
42-
name="twitter:image:src"
43-
content="{url}assets/images/formula-code-banner.png"
44-
/>
51+
<meta name="twitter:image" content={ogImage} />
4552
<meta
4653
name="twitter:image:alt"
47-
content="FormulaCode Data Analysis Logo and Banner"
54+
content="FormulaCode benchmark — agentic optimization on large codebases"
4855
/>
4956

50-
<meta name="robots" content="max-image-preview:large" />
57+
<meta name="robots" content="index,follow,max-image-preview:large" />
58+
<meta name="googlebot" content="index,follow,max-image-preview:large" />
5159
<meta name="theme-color" content="#ffffff" />
5260
<meta name="color-scheme" content="light" />
5361

54-
<link rel="canonical" href="{url}/" />
62+
<link rel="canonical" href={canonicalUrl} />
5563

5664
<!-- Google Fonts preconnect (the actual font CSS is imported from
5765
variables.css; Lexend + Lexend Deca + Roboto Mono). -->
@@ -61,4 +69,8 @@
6169
{#each preloadFont as href}
6270
<link rel="preload" {href} as="font" type="font/woff2" crossorigin />
6371
{/each}
72+
73+
{#each jsonLd as item}
74+
{@html `<script type="application/ld+json">${JSON.stringify(item)}<\/script>`}
75+
{/each}
6476
</svelte:head>

0 commit comments

Comments
 (0)