feat: add privacy, terms, and cookies pages

Footer and login legal links were stubs. Point them at real marketing
pages that follow the Figma content-page template.
This commit is contained in:
adilallo
2026-08-17 11:15:04 -06:00
parent 99419915d7
commit 0167b03231
16 changed files with 634 additions and 9 deletions
+53
View File
@@ -0,0 +1,53 @@
import type { BlogPost } from "./content";
export type LegalDocumentSlug = "privacy" | "terms" | "cookies";
export type LegalDocumentSection = {
heading: string;
paragraphs: string[];
};
export type LegalDocumentMessages = {
banner: {
title: string;
description: string;
author: string;
date: string;
};
updated: string;
intro: string[];
sections: LegalDocumentSection[];
};
const PATH_BY_SLUG: Record<LegalDocumentSlug, string> = {
privacy: "/privacy",
terms: "/terms",
cookies: "/cookies",
};
export function legalPathForSlug(slug: LegalDocumentSlug): string {
return PATH_BY_SLUG[slug];
}
/**
* Builds a {@link BlogPost}-shaped object so legal pages can reuse
* `ContentBanner` (guide variant) without a markdown file.
*/
export function buildLegalSyntheticPost(
slug: LegalDocumentSlug,
page: LegalDocumentMessages,
): BlogPost {
return {
slug: `__legal__:${slug}`,
frontmatter: {
title: page.banner.title,
description: page.banner.description,
author: page.banner.author,
date: page.banner.date,
},
content: "",
htmlContent: "",
filePath: `messages/en/pages/${slug}.json`,
lastModified: new Date(page.banner.date),
};
}