diff --git a/quartz.layout.ts b/quartz.layout.ts index a1828a9c69a20..c02dae015e87a 100644 --- a/quartz.layout.ts +++ b/quartz.layout.ts @@ -16,8 +16,7 @@ export const sharedPageComponents: SharedLayout = { // components for pages that display a single page (e.g. a single note) export const defaultContentPageLayout: PageLayout = { - pageHeader: [], - beforeBody: [ + pageHeader: [ Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta(), @@ -39,8 +38,7 @@ export const defaultContentPageLayout: PageLayout = { // components for pages that display lists of pages (e.g. tags or folders) export const defaultListPageLayout: PageLayout = { - pageHeader: [], - beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()], + pageHeader: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()], left: [ Component.PageTitle(), Component.MobileOnly(Component.Spacer()), diff --git a/quartz/cfg.ts b/quartz/cfg.ts index 97a195b39ba37..efcae90218044 100644 --- a/quartz/cfg.ts +++ b/quartz/cfg.ts @@ -86,7 +86,6 @@ export interface FullPageLayout { head: QuartzComponent header: QuartzComponent[] pageHeader: QuartzComponent[] - beforeBody: QuartzComponent[] pageBody: QuartzComponent afterBody: QuartzComponent[] left: QuartzComponent[] @@ -94,5 +93,5 @@ export interface FullPageLayout { footer: QuartzComponent } -export type PageLayout = Pick<FullPageLayout, "pageHeader" | "beforeBody" | "left" | "right"> +export type PageLayout = Pick<FullPageLayout, "pageHeader" | "left" | "right"> export type SharedLayout = Pick<FullPageLayout, "head" | "header" | "footer" | "afterBody"> diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx index 99be1d07f45cf..4e03ce3e80bb7 100644 --- a/quartz/components/renderPage.tsx +++ b/quartz/components/renderPage.tsx @@ -13,7 +13,6 @@ interface RenderComponents { head: QuartzComponent header: QuartzComponent[] pageHeader: QuartzComponent[] - beforeBody: QuartzComponent[] pageBody: QuartzComponent afterBody: QuartzComponent[] left: QuartzComponent[] @@ -193,7 +192,6 @@ export function renderPage( head: Head, header, pageHeader, - beforeBody, pageBody: Content, afterBody, left, @@ -234,13 +232,8 @@ export function renderPage( {LeftComponent} <section class="center"> <div class="page-header"> - <Header {...componentData}> - {pageHeader.map((HeaderComponent) => ( - <HeaderComponent {...componentData} /> - ))} - </Header> <div class="popover-hint"> - {beforeBody.map((BodyComponent) => ( + {pageHeader.map((BodyComponent) => ( <BodyComponent {...componentData} /> ))} </div> diff --git a/quartz/plugins/emitters/404.tsx b/quartz/plugins/emitters/404.tsx index e76b793c9d556..b81d01196cee7 100644 --- a/quartz/plugins/emitters/404.tsx +++ b/quartz/plugins/emitters/404.tsx @@ -16,7 +16,6 @@ export const NotFoundPage: QuartzEmitterPlugin = () => { ...sharedPageComponents, pageBody: NotFound(), pageHeader: [], - beforeBody: [], left: [], right: [], } diff --git a/quartz/plugins/emitters/contentPage.tsx b/quartz/plugins/emitters/contentPage.tsx index 2ac132147358a..7fc5880fde75f 100644 --- a/quartz/plugins/emitters/contentPage.tsx +++ b/quartz/plugins/emitters/contentPage.tsx @@ -59,7 +59,7 @@ export const ContentPage: QuartzEmitterPlugin<Partial<FullPageLayout>> = (userOp ...userOpts, } - const { head: Head, header, beforeBody, pageBody, afterBody, left, right, footer: Footer } = opts + const { head: Head, header, pageHeader, pageBody, afterBody, left, right, footer: Footer } = opts const Header = HeaderConstructor() const Body = BodyConstructor() @@ -71,7 +71,7 @@ export const ContentPage: QuartzEmitterPlugin<Partial<FullPageLayout>> = (userOp Header, Body, ...header, - ...beforeBody, + ...pageHeader, pageBody, ...afterBody, ...left, diff --git a/quartz/plugins/emitters/folderPage.tsx b/quartz/plugins/emitters/folderPage.tsx index b6d860272b35a..28e797036c76d 100644 --- a/quartz/plugins/emitters/folderPage.tsx +++ b/quartz/plugins/emitters/folderPage.tsx @@ -33,7 +33,7 @@ export const FolderPage: QuartzEmitterPlugin<Partial<FolderPageOptions>> = (user ...userOpts, } - const { head: Head, header, beforeBody, pageBody, afterBody, left, right, footer: Footer } = opts + const { head: Head, header, pageHeader, pageBody, afterBody, left, right, footer: Footer } = opts const Header = HeaderConstructor() const Body = BodyConstructor() @@ -45,7 +45,7 @@ export const FolderPage: QuartzEmitterPlugin<Partial<FolderPageOptions>> = (user Header, Body, ...header, - ...beforeBody, + ...pageHeader, pageBody, ...afterBody, ...left, diff --git a/quartz/plugins/emitters/tagPage.tsx b/quartz/plugins/emitters/tagPage.tsx index 066d4ec2641bd..651bafa532d29 100644 --- a/quartz/plugins/emitters/tagPage.tsx +++ b/quartz/plugins/emitters/tagPage.tsx @@ -30,7 +30,7 @@ export const TagPage: QuartzEmitterPlugin<Partial<TagPageOptions>> = (userOpts) ...userOpts, } - const { head: Head, header, beforeBody, pageBody, afterBody, left, right, footer: Footer } = opts + const { head: Head, header, pageHeader, pageBody, afterBody, left, right, footer: Footer } = opts const Header = HeaderConstructor() const Body = BodyConstructor() @@ -42,7 +42,7 @@ export const TagPage: QuartzEmitterPlugin<Partial<TagPageOptions>> = (userOpts) Header, Body, ...header, - ...beforeBody, + ...pageHeader, pageBody, ...afterBody, ...left,