Skip to content

Commit c0f5038

Browse files
committed
fix: nav contrast, TechArticle Rich Results fields, and llms-full.txt
Remove opacity-50 from disabled nav items to fix contrast. Add datePublished, dateModified, and image to TechArticle JSON-LD for Rich Results eligibility. Generate llms-full.txt at build time with complete documentation content for AI context windows.
1 parent 933e225 commit c0f5038

File tree

3 files changed

+75
-2
lines changed

3 files changed

+75
-2
lines changed

apps/web/public/llms.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
> The OOXML spec, explained by people who actually implemented it.
44

5+
> For full documentation content, see [/llms-full.txt](https://ooxml.dev/llms-full.txt)
6+
57
ooxml.dev is the interactive reference for ECMA-376 (Office Open XML) — the standard behind .docx, .xlsx, and .pptx files. Built by SuperDoc — DOCX editing and tooling (https://superdoc.dev) from experience implementing a full OOXML document engine.
68

79
Every page combines XML structure, live rendered previews, and implementation notes that tell you what the spec doesn't: where Word diverges from the standard, what will break your code, and what to do about it.

apps/web/scripts/prerender.ts

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ function buildHead(path: string): string {
180180
headline: seo.title.split(" | ")[0].split(" — ")[0],
181181
description: seo.description,
182182
url,
183+
image: `${SITE_URL}/og-image.png`,
184+
datePublished: "2025-03-15",
185+
dateModified: new Date().toISOString().split("T")[0],
183186
author: {
184187
"@type": "Organization",
185188
name: "SuperDoc — DOCX editing and tooling",
@@ -338,4 +341,72 @@ const sitemap = generateSitemap(paths);
338341
writeFileSync(resolve(DIST, "sitemap.xml"), sitemap);
339342
console.log(` ✓ /sitemap.xml`);
340343

341-
console.log(`\nPre-rendered ${count} pages + 404 + sitemap.`);
344+
// Generate llms-full.txt — full documentation content for AI context windows
345+
function generateLlmsFullTxt(): string {
346+
const lines: string[] = [
347+
"# ooxml.dev — Full Documentation",
348+
"",
349+
"> The OOXML spec, explained by people who actually implemented it.",
350+
"",
351+
"This file contains the complete documentation content for AI context windows.",
352+
"For a summary, see /llms.txt. For the interactive version, visit https://ooxml.dev",
353+
"",
354+
];
355+
356+
for (const [slug, page] of Object.entries(docs)) {
357+
const url = slug === "index" ? "https://ooxml.dev/docs/" : `https://ooxml.dev/docs/${slug}/`;
358+
const badge = page.badge ? ` (${page.badge})` : "";
359+
lines.push(`---`);
360+
lines.push("");
361+
lines.push(`## ${page.title}${badge}`);
362+
lines.push(`URL: ${url}`);
363+
if (page.description) lines.push(`${page.description}`);
364+
lines.push("");
365+
366+
for (const block of page.content) {
367+
switch (block.type) {
368+
case "heading":
369+
lines.push(`${"#".repeat(block.level + 1)} ${block.text}`);
370+
lines.push("");
371+
break;
372+
case "paragraph":
373+
lines.push(block.text);
374+
lines.push("");
375+
break;
376+
case "code":
377+
lines.push(`\`\`\`${block.language || "xml"}`);
378+
lines.push(block.code);
379+
lines.push("```");
380+
lines.push("");
381+
break;
382+
case "preview":
383+
lines.push("```xml");
384+
lines.push(block.xml);
385+
lines.push("```");
386+
lines.push("");
387+
break;
388+
case "note":
389+
lines.push(`> **${block.noteType.toUpperCase()}${block.app ? ` (${block.app})` : ""}**: ${block.title}`);
390+
lines.push(`> ${block.text}`);
391+
lines.push("");
392+
break;
393+
case "table":
394+
lines.push(`| ${block.headers.join(" | ")} |`);
395+
lines.push(`| ${block.headers.map(() => "---").join(" | ")} |`);
396+
for (const row of block.rows) {
397+
lines.push(`| ${row.join(" | ")} |`);
398+
}
399+
lines.push("");
400+
break;
401+
}
402+
}
403+
}
404+
405+
return lines.join("\n");
406+
}
407+
408+
const llmsFullTxt = generateLlmsFullTxt();
409+
writeFileSync(resolve(DIST, "llms-full.txt"), llmsFullTxt);
410+
console.log(` ✓ /llms-full.txt`);
411+
412+
console.log(`\nPre-rendered ${count} pages + 404 + sitemap + llms-full.txt.`);

apps/web/src/components/Navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function NavLink({
125125
const className = clsx(
126126
"rounded px-3 py-1.5 text-sm transition",
127127
disabled
128-
? "cursor-not-allowed text-[var(--color-text-muted)] opacity-50"
128+
? "cursor-not-allowed text-[var(--color-text-muted)]"
129129
: active
130130
? "font-medium text-[var(--color-accent)] bg-[var(--color-accent)]/10"
131131
: "text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]",

0 commit comments

Comments
 (0)