mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-28 07:14:05 -06:00
This commit adds a new "options" parameter into components/Head.tsx. Its design is inspired from the components/Footer.tsx. This allows us to: - Specify multiple icons. - Change the location of the icon's storage. - Signal the correct MIME type and, optionally, upload non-PNG files. This otherwise requires manual customization of components/Head.tsx. An example of configuration with this new parameter is in quartz.layout.ts.
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import { PageLayout, SharedLayout } from "./quartz/cfg"
|
|
import * as Component from "./quartz/components"
|
|
|
|
// components shared across all pages
|
|
export const sharedPageComponents: SharedLayout = {
|
|
head: Component.Head({
|
|
favicons: [
|
|
{ path: "static/icon.png", size: "200x200", mime: "image/png" }
|
|
]
|
|
}),
|
|
header: [],
|
|
afterBody: [],
|
|
footer: Component.Footer({
|
|
links: {
|
|
GitHub: "https://github.com/jackyzha0/quartz",
|
|
"Discord Community": "https://discord.gg/cRFFHYye7t",
|
|
},
|
|
}),
|
|
}
|
|
|
|
// 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()),
|
|
],
|
|
right: [
|
|
Component.Graph(),
|
|
Component.DesktopOnly(Component.TableOfContents()),
|
|
Component.Backlinks(),
|
|
],
|
|
}
|
|
|
|
// components for pages that display lists of pages (e.g. tags or folders)
|
|
export const defaultListPageLayout: PageLayout = {
|
|
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
|
|
left: [
|
|
Component.PageTitle(),
|
|
Component.MobileOnly(Component.Spacer()),
|
|
Component.Search(),
|
|
Component.Darkmode(),
|
|
Component.DesktopOnly(Component.Explorer()),
|
|
],
|
|
right: [],
|
|
}
|