diff --git a/quartz/cfg.ts b/quartz/cfg.ts index 9b8dc55e9..dba21e409 100644 --- a/quartz/cfg.ts +++ b/quartz/cfg.ts @@ -95,4 +95,7 @@ export interface FullPageLayout { } export type PageLayout = Pick -export type SharedLayout = Pick +export type SharedLayout = Pick< + FullPageLayout, + "head" | "navbar" | "header" | "footer" | "afterBody" +> diff --git a/quartz/components/Navbar.tsx b/quartz/components/Navbar.tsx index 7abb2389c..6e48dfbcf 100644 --- a/quartz/components/Navbar.tsx +++ b/quartz/components/Navbar.tsx @@ -9,8 +9,8 @@ const Navbar: QuartzComponent = ({ children }: QuartzComponentProps) => { ))} - ) : null; -}; + ) : null +} Navbar.css = ` nav { diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx index 7767477a9..e94188e8a 100644 --- a/quartz/components/renderPage.tsx +++ b/quartz/components/renderPage.tsx @@ -2,7 +2,7 @@ import { render } from "preact-render-to-string" import { QuartzComponent, QuartzComponentProps } from "./types" import HeaderConstructor from "./Header" import BodyConstructor from "./Body" -import NavbarContructor from "./Navbar"; +import NavbarContructor from "./Navbar" import { JSResourceToScriptElement, StaticResources } from "../util/resources" import { clone, FullSlug, RelativeURL, joinSegments, normalizeHastElement } from "../util/path" import { visit } from "unist-util-visit" diff --git a/quartz/plugins/emitters/contentPage.tsx b/quartz/plugins/emitters/contentPage.tsx index bfd2bb8a3..736b31436 100644 --- a/quartz/plugins/emitters/contentPage.tsx +++ b/quartz/plugins/emitters/contentPage.tsx @@ -6,7 +6,7 @@ import { QuartzEmitterPlugin } from "../types" import { QuartzComponentProps } from "../../components/types" import HeaderConstructor from "../../components/Header" import BodyConstructor from "../../components/Body" -import NavbarContructor from "../../components/Navbar"; +import NavbarContructor from "../../components/Navbar" import { pageResources, renderPage } from "../../components/renderPage" import { FullPageLayout } from "../../cfg" import { Argv } from "../../util/ctx" @@ -60,7 +60,17 @@ export const ContentPage: QuartzEmitterPlugin> = (userOp ...userOpts, } - const { head: Head, navbar, header, beforeBody, pageBody, afterBody, left, right, footer: Footer } = opts + const { + head: Head, + navbar, + header, + beforeBody, + pageBody, + afterBody, + left, + right, + footer: Footer, + } = opts const Header = HeaderConstructor() const Body = BodyConstructor() const Navbar = NavbarContructor() diff --git a/quartz/plugins/emitters/folderPage.tsx b/quartz/plugins/emitters/folderPage.tsx index 032cd5ee2..af5e56536 100644 --- a/quartz/plugins/emitters/folderPage.tsx +++ b/quartz/plugins/emitters/folderPage.tsx @@ -34,7 +34,17 @@ export const FolderPage: QuartzEmitterPlugin> = (user ...userOpts, } - const { head: Head, navbar, header, beforeBody, pageBody, afterBody, left, right, footer: Footer } = opts + const { + head: Head, + navbar, + header, + beforeBody, + pageBody, + afterBody, + left, + right, + footer: Footer, + } = opts const Header = HeaderConstructor() const Body = BodyConstructor() const Navbar = NavbarContructor() diff --git a/quartz/plugins/emitters/tagPage.tsx b/quartz/plugins/emitters/tagPage.tsx index d97409fbc..86e1db4b6 100644 --- a/quartz/plugins/emitters/tagPage.tsx +++ b/quartz/plugins/emitters/tagPage.tsx @@ -31,7 +31,17 @@ export const TagPage: QuartzEmitterPlugin> = (userOpts) ...userOpts, } - const { head: Head, navbar, header, beforeBody, pageBody, afterBody, left, right, footer: Footer } = opts + const { + head: Head, + navbar, + header, + beforeBody, + pageBody, + afterBody, + left, + right, + footer: Footer, + } = opts const Header = HeaderConstructor() const Body = BodyConstructor() const Navbar = NavbarContructor()