diff --git a/docs/advanced/making plugins.md b/docs/advanced/making plugins.md index b2bacf0aa..0ba29680c 100644 --- a/docs/advanced/making plugins.md +++ b/docs/advanced/making plugins.md @@ -260,11 +260,11 @@ export const ContentPage: QuartzEmitterPlugin = () => { ...defaultContentPageLayout, pageBody: Content(), } - const { head, header, beforeBody, pageBody, left, right, footer } = layout + const { head, header, beforeBody, pageBody, afterBody, left, right, footer } = layout return { name: "ContentPage", getQuartzComponents() { - return [head, ...header, ...beforeBody, pageBody, ...left, ...right, footer] + return [head, ...header, ...beforeBody, pageBody, ...afterBody, ...left, ...right, footer] }, async emit(ctx, content, resources, emit): Promise { const cfg = ctx.cfg.configuration diff --git a/docs/images/quartz layout.png b/docs/images/quartz layout.png index 03435f7d5..71ef3ac71 100644 Binary files a/docs/images/quartz layout.png and b/docs/images/quartz layout.png differ diff --git a/docs/layout.md b/docs/layout.md index 3fabeb79c..686b2f29f 100644 --- a/docs/layout.md +++ b/docs/layout.md @@ -12,6 +12,7 @@ export interface FullPageLayout { header: QuartzComponent[] // laid out horizontally beforeBody: QuartzComponent[] // laid out vertically pageBody: QuartzComponent // single component + afterBody: QuartzComponent[] // laid out vertically left: QuartzComponent[] // vertical on desktop, horizontal on mobile right: QuartzComponent[] // vertical on desktop, horizontal on mobile footer: QuartzComponent // single component diff --git a/quartz.layout.ts b/quartz.layout.ts index b5a1639eb..4a78256aa 100644 --- a/quartz.layout.ts +++ b/quartz.layout.ts @@ -5,6 +5,7 @@ import * as Component from "./quartz/components" export const sharedPageComponents: SharedLayout = { head: Component.Head(), header: [], + afterBody: [], footer: Component.Footer({ links: { GitHub: "https://github.com/jackyzha0/quartz", diff --git a/quartz/cfg.ts b/quartz/cfg.ts index 574ceb18a..0c344d33a 100644 --- a/quartz/cfg.ts +++ b/quartz/cfg.ts @@ -77,10 +77,11 @@ export interface FullPageLayout { header: QuartzComponent[] beforeBody: QuartzComponent[] pageBody: QuartzComponent + afterBody: QuartzComponent[] left: QuartzComponent[] right: QuartzComponent[] footer: QuartzComponent } export type PageLayout = Pick -export type SharedLayout = Pick +export type SharedLayout = Pick diff --git a/quartz/components/Footer.tsx b/quartz/components/Footer.tsx index 076c37874..cff28cbb9 100644 --- a/quartz/components/Footer.tsx +++ b/quartz/components/Footer.tsx @@ -13,7 +13,6 @@ export default ((opts?: Options) => { const links = opts?.links ?? [] return (