feat(cms): add storage based website content management
This commit is contained in:
parent
7d5689cfa4
commit
12d31f5468
31 changed files with 1347 additions and 158 deletions
128
lib/content/types.ts
Normal file
128
lib/content/types.ts
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
export type SeoContent = {
|
||||
metaTitle: string;
|
||||
metaDescription: string;
|
||||
keywords: string;
|
||||
openGraphTitle: string;
|
||||
openGraphDescription: string;
|
||||
socialImage: string;
|
||||
canonicalUrl: string;
|
||||
};
|
||||
|
||||
export type LinkContent = {
|
||||
label: string;
|
||||
href: string;
|
||||
};
|
||||
|
||||
export type TextBlockContent = {
|
||||
title: string;
|
||||
text: string;
|
||||
};
|
||||
|
||||
export type FaqContent = {
|
||||
question: string;
|
||||
answer: string;
|
||||
};
|
||||
|
||||
export type ServiceContent = {
|
||||
title: string;
|
||||
description: string;
|
||||
icon: string;
|
||||
sortOrder: number;
|
||||
visible: boolean;
|
||||
};
|
||||
|
||||
export type PageContent = {
|
||||
eyebrow: string;
|
||||
title: string;
|
||||
subtitle: string;
|
||||
heroText: string;
|
||||
intro: string;
|
||||
paragraphs: TextBlockContent[];
|
||||
cta: {
|
||||
text: string;
|
||||
primary: LinkContent;
|
||||
secondary: LinkContent;
|
||||
};
|
||||
listTitle: string;
|
||||
list: string[];
|
||||
faq: FaqContent[];
|
||||
seo: SeoContent;
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
export type HomeContent = PageContent & {
|
||||
badges: string[];
|
||||
features: TextBlockContent[];
|
||||
services: TextBlockContent[];
|
||||
promise: {
|
||||
eyebrow: string;
|
||||
title: string;
|
||||
text: string;
|
||||
bullets: string[];
|
||||
button: LinkContent;
|
||||
};
|
||||
footerText: string;
|
||||
};
|
||||
|
||||
export type ServicesContent = PageContent & {
|
||||
services: ServiceContent[];
|
||||
};
|
||||
|
||||
export type RadioServiceContent = PageContent & {
|
||||
brands: string[];
|
||||
symptoms: string[];
|
||||
workflow: string[];
|
||||
measurements: string[];
|
||||
alignment: string;
|
||||
repair: string;
|
||||
};
|
||||
|
||||
export type AboutContent = PageContent & {
|
||||
companyDescription: string;
|
||||
workshopDescription: string;
|
||||
philosophy: string;
|
||||
};
|
||||
|
||||
export type ContactContent = PageContent & {
|
||||
phone: string;
|
||||
email: string;
|
||||
address: string;
|
||||
openingHours: string;
|
||||
googleMapsLink: string;
|
||||
socialMedia: LinkContent[];
|
||||
};
|
||||
|
||||
export type SettingsContent = {
|
||||
siteName: string;
|
||||
logoUrl: string;
|
||||
footerShortText: string;
|
||||
copyright: string;
|
||||
footerLinks: LinkContent[];
|
||||
legalLinks: LinkContent[];
|
||||
headerCta: LinkContent;
|
||||
seo: SeoContent;
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
export type ContentDocuments = {
|
||||
home: HomeContent;
|
||||
services: ServicesContent;
|
||||
"radio-service": RadioServiceContent;
|
||||
about: AboutContent;
|
||||
contact: ContactContent;
|
||||
settings: SettingsContent;
|
||||
};
|
||||
|
||||
export type ContentKey = keyof ContentDocuments;
|
||||
|
||||
export type ContentSummary = {
|
||||
version: string;
|
||||
lastModified: string | null;
|
||||
pageCount: number;
|
||||
documents: Array<{
|
||||
key: ContentKey;
|
||||
fileName: string;
|
||||
title: string;
|
||||
updatedAt: string;
|
||||
}>;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue