import { PageLayout, SharedLayout, } from "./quartz/cfg" import * as Component from "./quartz/components" import { QuartzPluginData } from "./quartz/plugins/vfile"; // components shared across all pages export const sharedPageComponents: SharedLayout = { head: Component.Head(), header: [], footer: Component.Footer({ links: { "Home": "https://www.7wate.com", "Blog": "https://blog.7wate.com", GitHub: "https://github.com/7wate", }, }), } // components for pages that display a single page (e.g. a single note) export const defaultContentPageLayout: PageLayout = { beforeBody: [ Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta(), Component.TagList(), ], left: [ Component.PageTitle(), Component.MobileOnly(Component.Spacer()), Component.Search(), Component.Darkmode(), Component.DesktopOnly(Component.Explorer()), Component.DesktopOnly(Component.RecentNotes({ filter:(data: QuartzPluginData) => { // 是否以 'Blog/' 开头 // console.log('Current file path:', data.filePath); return data.filePath ? data.filePath.startsWith('content/Blog') : false; } } )), ], right: [ Component.Graph(), Component.DesktopOnly(Component.TableOfContents()), Component.Backlinks(), Component.MobileOnly(Component.Explorer()), ], } // components for pages that display lists of pages (e.g. tags or folders) export const defaultListPageLayout: PageLayout = { beforeBody: [Component.ArticleTitle()], left: [ Component.PageTitle(), Component.MobileOnly(Component.Spacer()), Component.Search(), Component.Darkmode(), ], right: [], }