Skip to content

Commit 9f407f6

Browse files
committed
fix: add JSON-LD to /mcp and /spec, fix heading order and main landmark
Add WebPage JSON-LD structured data to /mcp and /spec pages. Add publisher url to Organization (required for Rich Results). Change note title from h4 to p to fix heading order skip. Add main landmark to /spec page.
1 parent 32b0723 commit 9f407f6

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

apps/web/scripts/prerender.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function buildHead(path: string): string {
185185
name: "SuperDoc — DOCX editing and tooling",
186186
url: "https://superdoc.dev",
187187
},
188-
publisher: { "@type": "Organization", name: "ooxml.dev" },
188+
publisher: { "@type": "Organization", name: "ooxml.dev", url: "https://ooxml.dev" },
189189
about: {
190190
"@type": "Thing",
191191
name: "Office Open XML",
@@ -207,6 +207,26 @@ function buildHead(path: string): string {
207207
},
208208
};
209209
meta.push(`<script type="application/ld+json">${JSON.stringify(jsonLd)}</script>`);
210+
} else if (path === "/mcp" || path === "/spec") {
211+
const jsonLd = {
212+
"@context": "https://schema.org",
213+
"@type": "WebPage",
214+
name: seo.title.split(" | ")[0].split(" — ")[0],
215+
description: seo.description,
216+
url,
217+
author: {
218+
"@type": "Organization",
219+
name: "SuperDoc — DOCX editing and tooling",
220+
url: "https://superdoc.dev",
221+
},
222+
publisher: { "@type": "Organization", name: "ooxml.dev", url: "https://ooxml.dev" },
223+
about: {
224+
"@type": "Thing",
225+
name: "Office Open XML",
226+
sameAs: "https://en.wikipedia.org/wiki/Office_Open_XML",
227+
},
228+
};
229+
meta.push(`<script type="application/ld+json">${JSON.stringify(jsonLd)}</script>`);
210230
}
211231

212232
return meta.join("\n ");

apps/web/src/components/ImplementationNote.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function ImplementationNote({
5353
</div>
5454
<div className="flex-1">
5555
<div className="flex items-center gap-2">
56-
<h4 className="font-semibold text-[var(--color-text-primary)]">{title}</h4>
56+
<p className="font-semibold text-[var(--color-text-primary)]">{title}</p>
5757
{app && (
5858
<span className="rounded bg-[var(--color-bg-tertiary)] px-2 py-0.5 text-xs text-[var(--color-text-muted)]">
5959
{app}

apps/web/src/pages/SpecExplorer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export function SpecExplorer() {
211211
<div className="flex h-screen flex-col overflow-hidden">
212212
<Navbar sticky />
213213

214-
<div className="grid min-h-0 flex-1 grid-cols-[380px_1fr]">
214+
<main className="grid min-h-0 flex-1 grid-cols-[380px_1fr]">
215215
{/* Search panel */}
216216
<div className="flex min-h-0 flex-col border-r border-[var(--color-border)]">
217217
{/* Search input */}
@@ -313,7 +313,7 @@ export function SpecExplorer() {
313313
onPageChange={handlePageChange}
314314
/>
315315
</div>
316-
</div>
316+
</main>
317317
</div>
318318
);
319319
}

0 commit comments

Comments
 (0)