diff --git a/TODO.md b/TODO.md index 4ca19e2..2e40e7d 100644 --- a/TODO.md +++ b/TODO.md @@ -3,7 +3,6 @@ ## Short term - [Payload] Fix SDK endpoint not working in prod -- [Folder] Add parent pages - Add hover/active styling for settings options in topbar + language override - Highlight currently selected language option in language override tooltip - Save cookies for longer than just the session @@ -28,6 +27,7 @@ - Contact page - About us page - Global search function + - Consider official search plugin for payload https://payloadcms.com/docs/plugins/search - Convert Rich text to simple text for indexing and open graph purposes - Anonymous comments diff --git a/src/pages/[locale]/folders/[slug].astro b/src/pages/[locale]/folders/[slug].astro index c1ac762..1942506 100644 --- a/src/pages/[locale]/folders/[slug].astro +++ b/src/pages/[locale]/folders/[slug].astro @@ -28,7 +28,8 @@ const meta = getLocalizedMatch(folder.translations); openGraph={{ title: meta.name, description: meta.description && formatRichTextToString(meta.description), - }}> + }} + parentPages={folder.parentPages}> { meta.description && (
diff --git a/src/shared/payload/payload-sdk.ts b/src/shared/payload/payload-sdk.ts index 38ab7de..563197c 100644 --- a/src/shared/payload/payload-sdk.ts +++ b/src/shared/payload/payload-sdk.ts @@ -290,6 +290,7 @@ export interface Folder { id: string; slug: string; icon?: string | null; + parentFolders?: (string | Folder)[] | null; translations: { language: string | Language; name: string; @@ -1276,6 +1277,7 @@ export type EndpointFolder = EndpointFolderPreview & { value: EndpointPagePreview; } )[]; + parentPages: ParentPage[]; }; export type EndpointHomeFolder = EndpointFolderPreview & { @@ -1353,7 +1355,6 @@ export type ParentPage = { slug: string; collection: Collections; translations: { language: string; name: string }[]; - tag: string; }; export type EndpointCollectiblePreview = {