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
151 changes: 0 additions & 151 deletions content/manifesto/index.md

This file was deleted.

2 changes: 0 additions & 2 deletions react-router.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type { Config } from "@react-router/dev/config";
import { STATIC_PRERENDER_PATHS } from "./src/lib/site";

/** R2-backed pages are served by the Worker, never prerendered at build time. */
export default {
ssr: true,
appDirectory: "src",
prerender: [...STATIC_PRERENDER_PATHS],
} satisfies Config;
6 changes: 0 additions & 6 deletions source.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,3 @@ export const { docs, meta } = defineDocs({
dir: "content/docs",
...CONTENT_DOCS_OPTIONS,
});

export const { docs: manifestoDocs } = defineDocs({
// Fumadocs requires a literal; keep it aligned with docs-config.json.
dir: "content/manifesto",
...CONTENT_DOCS_OPTIONS,
});
2 changes: 1 addition & 1 deletion src/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const COLUMNS: { title: string; links: FooterLink[] }[] = [
{ label: "Notes", href: COMPANY_LINKS.notes, external: true },
{ label: "Changelog", href: COMPANY_LINKS.changelog, external: true },
{ label: "The Dispatch", href: `${SITE.companyUrl}/dispatch`, external: true },
{ label: "MemoFS Manifesto", href: ROUTES.manifesto },
{ label: "MemoFS Manifesto", href: `${SITE.companyUrl}/products/memofs/manifesto`, external: true },
{ label: "llms.txt", href: ROUTES.llms },
{ label: "Sitemap", href: ROUTES.sitemap },
],
Expand Down
1 change: 0 additions & 1 deletion src/lib/docs-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"docsContentDir": "content/docs",
"manifestoContentDir": "content/manifesto",
"docsImageRoute": "/og/docs"
}
9 changes: 0 additions & 9 deletions src/lib/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,3 @@ export const docs = defineDocs({
postprocess: { includeProcessedMarkdown: true },
},
});

export const manifestoDocs = defineDocs({
// Fumadocs requires a literal; keep it aligned with docs-config.json.
dir: "content/manifesto",
docs: {
async: true,
postprocess: { includeProcessedMarkdown: true },
},
});
7 changes: 1 addition & 6 deletions src/lib/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const SITE = {
/** Canonical content locations shared by the source loader and route tooling. */
export const CONTENT_DIRS = {
docs: docsConfig.docsContentDir,
manifesto: docsConfig.manifestoContentDir,
} as const;

/** Outbound company pages shared by the header and footer. */
Expand All @@ -60,6 +59,7 @@ export const ROUTES = {
docs: "/docs",
/** Default product shown when navigating to /docs. */
docsDefault: "/docs",
/** Legacy path. Redirected permanently to the canonical company-site manifesto. */
manifesto: "/manifesto",
docsOg: docsConfig.docsImageRoute,
llms: "/llms.txt",
Expand All @@ -69,11 +69,6 @@ export const ROUTES = {
searchIndex: "/search-index.json",
} as const;

/** Static application pages in addition to documentation pages discovered from MDX. */
export const STATIC_PRERENDER_PATHS = [
ROUTES.manifesto,
] as const;

/** Primary navigation rendered by the Fumadocs layouts. */
export const PRIMARY_NAVIGATION = [
{
Expand Down
4 changes: 2 additions & 2 deletions src/lib/source.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { loader } from "fumadocs-core/source";
import { lucideIconsPlugin } from "fumadocs-core/source/plugins/lucide-icons";
import { docs, manifestoDocs } from "./docs";
import { docs } from "./docs";
import { ROUTES } from "./site";

export { docs, manifestoDocs };
export { docs };

/**
* Server-side page-tree loader.
Expand Down
64 changes: 5 additions & 59 deletions src/routes/manifesto.tsx
Original file line number Diff line number Diff line change
@@ -1,61 +1,7 @@
import { DocsBody } from "fumadocs-ui/layouts/docs/page";
import { HomeLayout } from "fumadocs-ui/layouts/home";
import { Footer } from "../components/footer";
import { getMDXComponents } from "../components/mdx";
import { baseOptions } from "../lib/layout.shared";
import { createPageMeta } from "../lib/meta";
import { createRelativeLink } from "../lib/relative-link";
import { ROUTES } from "../lib/site";
import { manifestoDocs } from "../lib/docs";
import type { Route } from "./+types/manifesto";
import { redirect } from "react-router";
import { SITE } from "../lib/site";

export const meta: Route.MetaFunction = ({ loaderData }) => {
const data = loaderData
return createPageMeta({
title: data.title,
description: data?.description ?? "The MemoFS Manifesto.",
path: ROUTES.manifesto,
});
};

// Module scope: identical on every render (pure object spread, no hooks).
const manifestoComponents = getMDXComponents({
a: createRelativeLink({ url: ROUTES.manifesto }),
});

export async function loader() {
const entry = manifestoDocs.getPage("index.md");
if (!entry) {
throw new Response("Manifesto document not found", { status: 404 });
}

return {
docPath: "index.md",
title: entry.title,
description: entry.description,
};
}

export default function ManifestoPage({
loaderData: _loaderData,
}: Route.ComponentProps) {
const entry = manifestoDocs.getPage("index.md");
if (!entry) {
throw new Response("Manifesto document not found", { status: 404 });
}
const Mdx = entry.body;

return (
<HomeLayout {...baseOptions()}>
<div className="relative w-full bg-background text-foreground">
<main className="mx-auto max-w-3xl px-4 pb-16 sm:px-6 sm:py-12 lg:px-8">
<DocsBody className="max-w-none">
<Mdx components={manifestoComponents} />
</DocsBody>
</main>

<Footer />
</div>
</HomeLayout>
);
/** Preserve external bookmarks while the manifesto moves to the 0xBUFF site. */
export function loader() {
return redirect(`${SITE.companyUrl}/products/memofs/manifesto`, 301);
}
5 changes: 0 additions & 5 deletions src/routes/sitemap[.]xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ export async function loader({ context }: Route.LoaderArgs) {
const urls = [
{ loc: toSiteUrl(ROUTES.home), changefreq: "daily", priority: "1.0" },
...(products.length ? [{ loc: toSiteUrl(ROUTES.docs), changefreq: "daily", priority: "0.9" }] : []),
{
loc: toSiteUrl(ROUTES.manifesto),
changefreq: "monthly",
priority: "0.9",
},
{ loc: toSiteUrl(ROUTES.llms), changefreq: "weekly", priority: "0.6" },
{ loc: toSiteUrl(ROUTES.llmsFull), changefreq: "weekly", priority: "0.6" },
...pages
Expand Down
Loading