feat(web): real /about and /docs pages (unique crawlable content)

Addresses the top cross-engine AEO finding — every route previously served
the homepage SPA. /about and /docs are now distinct routes with their own
server-rendered content and titles.

- /about: substantive about page (what LogicSRC is, the standards surface,
  CommandBoard.run reference impl, GitHub, hire-us) — derived from public
  positioning, no fabricated team.
- /docs + /docs/[slug]: render the repo's docs/*.md (curated public set) via
  marked, statically generated at build (no runtime fs dependency).
- Drop about/docs from the catch-all; add doc URLs to the sitemap.

Verified in a running build: /about and /docs serve unique content with
distinct titles; /docs/[slug] renders each markdown doc.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-06-08 12:43:42 +00:00
parent 6518dfb4a9
commit fb20fd2e99
8 changed files with 291 additions and 9 deletions

View file

@ -0,0 +1,58 @@
import Link from "next/link";
import { notFound } from "next/navigation";
import type { ReactNode } from "react";
import type { Metadata } from "next";
import { marked } from "marked";
import { DOC_SLUGS, docExcerpt, docTitle, readDoc } from "@/lib/docs";
import { SiteShell } from "@/components/site-shell";
// Statically generate one page per curated doc at build time.
export function generateStaticParams(): Array<{ slug: string }> {
return DOC_SLUGS.map((slug) => ({ slug }));
}
export const dynamicParams = false;
export async function generateMetadata({
params,
}: {
params: Promise<{ slug: string }>;
}): Promise<Metadata> {
const { slug } = await params;
const md = readDoc(slug);
if (!md) return { title: "Not found · LogicSRC" };
return {
title: `${docTitle(md, slug)} · LogicSRC Docs`,
description: docExcerpt(md) || undefined,
alternates: { canonical: `/docs/${slug}` },
};
}
export default async function DocPage({
params,
}: {
params: Promise<{ slug: string }>;
}): Promise<ReactNode> {
const { slug } = await params;
const md = readDoc(slug);
if (!md) notFound();
const html = await marked.parse(md);
return (
<SiteShell active="Docs">
<article className="band" style={{ maxWidth: "48rem" }}>
<p style={{ marginBottom: "1.5rem" }}>
<Link href="/docs" style={{ color: "#5b6b7a", textDecoration: "none" }}>
← Docs
</Link>
</p>
<div
className="blog-content"
style={{ lineHeight: 1.7 }}
dangerouslySetInnerHTML={{ __html: html }}
/>
</article>
</SiteShell>
);
}

View file

@ -0,0 +1,53 @@
import Link from "next/link";
import type { ReactNode } from "react";
import type { Metadata } from "next";
import { listDocs } from "@/lib/docs";
import { SiteShell } from "@/components/site-shell";
export const metadata: Metadata = {
title: "Docs · LogicSRC",
description:
"LogicSRC specification guides — data model, CLI/TUI conventions, config, permission scopes, plugins, credential sharing, and the OpenSpec.dev comparison.",
alternates: { canonical: "/docs" },
};
export default function DocsIndex(): ReactNode {
const docs = listDocs();
return (
<SiteShell active="Docs">
<div className="band">
<div className="section-head">
<h2>Docs</h2>
<p>
Specification guides and conventions for the LogicSRC coordination
standard. Source lives in the{" "}
<a href="https://github.com/profullstack/logicsrc" rel="noreferrer">
profullstack/logicsrc
</a>{" "}
repository.
</p>
</div>
<ul style={{ listStyle: "none", margin: 0, padding: 0 }}>
{docs.map((doc) => (
<li
key={doc.slug}
style={{ padding: "1.25rem 0", borderTop: "1px solid #e3e6e0" }}
>
<Link
href={`/docs/${doc.slug}`}
style={{ color: "inherit", textDecoration: "none" }}
>
<h3 style={{ margin: "0 0 0.35rem", fontSize: "1.2rem", color: "#101418" }}>
{doc.title}
</h3>
</Link>
{doc.excerpt ? (
<p style={{ color: "#41505d", margin: 0 }}>{doc.excerpt}</p>
) : null}
</li>
))}
</ul>
</div>
</SiteShell>
);
}