mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-20 11:24:05 -06:00
Update quartz.layout.ts
This commit is contained in:
parent
2aed6317f0
commit
19d2a83339
@ -1,51 +1,87 @@
|
||||
import { PageLayout, SharedLayout } from "./quartz/cfg"
|
||||
import { PageLayout, SharedLayout } from "./quartz/cfg"
|
||||
import * as Component from "./quartz/components"
|
||||
import { SimpleSlug } from "./quartz/util/path"
|
||||
|
||||
// components shared across all pages
|
||||
export const sharedPageComponents: SharedLayout = {
|
||||
export const sharedPageComponents: SharedLayout = {
|
||||
head: Component.Head(),
|
||||
header: [],
|
||||
afterBody: [],
|
||||
footer: Component.Footer({
|
||||
footer: Component.Footer({
|
||||
links: {
|
||||
GitHub: "https://github.com/jackyzha0/quartz",
|
||||
"Discord Community": "https://discord.gg/cRFFHYye7t",
|
||||
RSS: "https://enneaaa.netlify.app/feed.xml",
|
||||
"Scroll to top ↑": "#",
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
||||
// components for pages that display a single page (e.g. a single note)
|
||||
export const defaultContentPageLayout: PageLayout = {
|
||||
// components for pages that display a single page (e.g. a single note)
|
||||
export const defaultContentPageLayout: PageLayout = {
|
||||
beforeBody: [
|
||||
Component.Breadcrumbs(),
|
||||
// Component.Breadcrumbs(),
|
||||
Component.ArticleTitle(),
|
||||
Component.ContentMeta(),
|
||||
Component.TagList(),
|
||||
],
|
||||
left: [
|
||||
Component.PageTitle(),
|
||||
Component.MobileOnly(Component.Spacer()),
|
||||
Component.Flex({
|
||||
components: [
|
||||
Component.PageTitle(),
|
||||
Component.MobileOnly(Component.Spacer()),
|
||||
Component.Flex({
|
||||
components: [
|
||||
{
|
||||
Component: Component.Search(),
|
||||
grow: true,
|
||||
Component: Component.Search(),
|
||||
grow: true,
|
||||
},
|
||||
{ Component: Component.Darkmode() },
|
||||
{ Component: Component.Darkmode() },
|
||||
],
|
||||
}),
|
||||
Component.Explorer(),
|
||||
Component.DesktopOnly(Component.RecentNotes({
|
||||
title: "最近更新",
|
||||
showTags: false,
|
||||
limit: 5,
|
||||
linkToMore: "pages",
|
||||
})),
|
||||
// Component.Explorer(),
|
||||
],
|
||||
right: [
|
||||
Component.Graph(),
|
||||
Component.DesktopOnly(Component.TagList()),
|
||||
Component.DesktopOnly(Component.TableOfContents()),
|
||||
Component.Backlinks(),
|
||||
Component.DesktopOnly(Component.Graph()),
|
||||
],
|
||||
afterBody: [
|
||||
Component.Backlinks(),
|
||||
Component.Comments({
|
||||
provider: 'giscus',
|
||||
options: {
|
||||
// from data-repo
|
||||
repo: 'enneaa/giscus',
|
||||
// from data-repo-id
|
||||
repoId: 'R_kgDOOHb7aw',
|
||||
// from data-category
|
||||
category: 'Announcements',
|
||||
// from data-category-id
|
||||
categoryId: 'DIC_kwDOOHb7a84Cn6os',
|
||||
themeUrl: "https://enneaaa.netlify.app/static/giscus", // corresponds to quartz/static/giscus/
|
||||
lightTheme: "light-theme", // corresponds to light-theme.css in quartz/static/giscus/
|
||||
darkTheme: "dark-theme", // corresponds to dark-theme.css quartz/static/giscus/
|
||||
mapping: "title",
|
||||
inputPosition: "bottom",
|
||||
}
|
||||
}),
|
||||
Component.MobileOnly(Component.RecentNotes({
|
||||
title: "最近更新",
|
||||
showTags: false,
|
||||
limit: 5,
|
||||
linkToMore: "pages",
|
||||
})),
|
||||
],
|
||||
}
|
||||
|
||||
// components for pages that display lists of pages (e.g. tags or folders)
|
||||
export const defaultListPageLayout: PageLayout = {
|
||||
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
|
||||
beforeBody: [
|
||||
// Component.Breadcrumbs(),
|
||||
Component.ArticleTitle(),
|
||||
Component.ContentMeta()],
|
||||
left: [
|
||||
Component.PageTitle(),
|
||||
Component.MobileOnly(Component.Spacer()),
|
||||
@ -58,7 +94,22 @@ export const defaultListPageLayout: PageLayout = {
|
||||
{ Component: Component.Darkmode() },
|
||||
],
|
||||
}),
|
||||
Component.Explorer(),
|
||||
Component.DesktopOnly(Component.RecentNotes({
|
||||
title: "最近更新",
|
||||
showTags: false,
|
||||
limit: 5,
|
||||
linkToMore: "pages",
|
||||
})),
|
||||
// Component.Explorer(),
|
||||
],
|
||||
right: [],
|
||||
afterBody: [
|
||||
Component.Backlinks(),
|
||||
Component.MobileOnly(Component.RecentNotes({
|
||||
title: "最近更新",
|
||||
showTags: false,
|
||||
limit: 5,
|
||||
linkToMore: "pages",
|
||||
})),
|
||||
],
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user