| | |
| | | import { GlobalConfiguration, PageLayout, QuartzConfig } from "./quartz/cfg" |
| | | import * as Component from "./quartz/components" |
| | | import { QuartzConfig } from "./quartz/cfg" |
| | | import * as Plugin from "./quartz/plugins" |
| | | |
| | | const generalConfiguration: GlobalConfiguration = { |
| | | const config: QuartzConfig = { |
| | | configuration: { |
| | | pageTitle: "🪴 Quartz 4.0", |
| | | enableSPA: true, |
| | | enablePopovers: true, |
| | |
| | | }, |
| | | }, |
| | | }, |
| | | } |
| | | |
| | | const sharedPageComponents = { |
| | | head: Component.Head(), |
| | | header: [], |
| | | footer: Component.Footer({ |
| | | links: { |
| | | GitHub: "https://github.com/jackyzha0/quartz", |
| | | "Discord Community": "https://discord.gg/cRFFHYye7t", |
| | | }, |
| | | }), |
| | | } |
| | | |
| | | const contentPageLayout: PageLayout = { |
| | | beforeBody: [Component.ArticleTitle(), Component.ReadingTime(), Component.TagList()], |
| | | left: [ |
| | | Component.PageTitle(), |
| | | Component.MobileOnly(Component.Spacer()), |
| | | Component.Search(), |
| | | Component.Darkmode(), |
| | | Component.DesktopOnly(Component.TableOfContents()), |
| | | ], |
| | | right: [Component.Graph(), Component.Backlinks()], |
| | | } |
| | | |
| | | const listPageLayout: PageLayout = { |
| | | beforeBody: [Component.ArticleTitle()], |
| | | left: [ |
| | | Component.PageTitle(), |
| | | Component.MobileOnly(Component.Spacer()), |
| | | Component.Search(), |
| | | Component.Darkmode(), |
| | | ], |
| | | right: [], |
| | | } |
| | | |
| | | const config: QuartzConfig = { |
| | | configuration: generalConfiguration, |
| | | plugins: { |
| | | transformers: [ |
| | | Plugin.FrontMatter(), |
| | |
| | | emitters: [ |
| | | Plugin.AliasRedirects(), |
| | | Plugin.ComponentResources({ fontOrigin: "googleFonts" }), |
| | | Plugin.ContentPage({ |
| | | ...sharedPageComponents, |
| | | ...contentPageLayout, |
| | | pageBody: Component.Content(), |
| | | }), |
| | | Plugin.FolderPage({ |
| | | ...sharedPageComponents, |
| | | ...listPageLayout, |
| | | pageBody: Component.FolderContent(), |
| | | }), |
| | | Plugin.TagPage({ |
| | | ...sharedPageComponents, |
| | | ...listPageLayout, |
| | | pageBody: Component.TagContent(), |
| | | }), |
| | | Plugin.ContentPage(), |
| | | Plugin.FolderPage(), |
| | | Plugin.TagPage(), |
| | | Plugin.ContentIndex({ |
| | | enableSiteMap: true, |
| | | enableRSS: true, |