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 * as Component from "./quartz/components"
|
||||||
|
import { SimpleSlug } from "./quartz/util/path"
|
||||||
|
|
||||||
// components shared across all pages
|
// components shared across all pages
|
||||||
export const sharedPageComponents: SharedLayout = {
|
export const sharedPageComponents: SharedLayout = {
|
||||||
head: Component.Head(),
|
head: Component.Head(),
|
||||||
header: [],
|
header: [],
|
||||||
afterBody: [],
|
afterBody: [],
|
||||||
footer: Component.Footer({
|
footer: Component.Footer({
|
||||||
links: {
|
links: {
|
||||||
GitHub: "https://github.com/jackyzha0/quartz",
|
RSS: "https://enneaaa.netlify.app/feed.xml",
|
||||||
"Discord Community": "https://discord.gg/cRFFHYye7t",
|
"Scroll to top ↑": "#",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
// components for pages that display a single page (e.g. a single note)
|
// components for pages that display a single page (e.g. a single note)
|
||||||
export const defaultContentPageLayout: PageLayout = {
|
export const defaultContentPageLayout: PageLayout = {
|
||||||
beforeBody: [
|
beforeBody: [
|
||||||
Component.Breadcrumbs(),
|
// Component.Breadcrumbs(),
|
||||||
Component.ArticleTitle(),
|
Component.ArticleTitle(),
|
||||||
Component.ContentMeta(),
|
Component.ContentMeta(),
|
||||||
Component.TagList(),
|
|
||||||
],
|
],
|
||||||
left: [
|
left: [
|
||||||
Component.PageTitle(),
|
Component.PageTitle(),
|
||||||
Component.MobileOnly(Component.Spacer()),
|
Component.MobileOnly(Component.Spacer()),
|
||||||
Component.Flex({
|
Component.Flex({
|
||||||
components: [
|
components: [
|
||||||
{
|
{
|
||||||
Component: Component.Search(),
|
Component: Component.Search(),
|
||||||
grow: true,
|
grow: true,
|
||||||
},
|
},
|
||||||
{ Component: Component.Darkmode() },
|
{ Component: Component.Darkmode() },
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
Component.Explorer(),
|
Component.DesktopOnly(Component.RecentNotes({
|
||||||
|
title: "最近更新",
|
||||||
|
showTags: false,
|
||||||
|
limit: 5,
|
||||||
|
linkToMore: "pages",
|
||||||
|
})),
|
||||||
|
// Component.Explorer(),
|
||||||
],
|
],
|
||||||
right: [
|
right: [
|
||||||
Component.Graph(),
|
Component.DesktopOnly(Component.TagList()),
|
||||||
Component.DesktopOnly(Component.TableOfContents()),
|
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)
|
// components for pages that display lists of pages (e.g. tags or folders)
|
||||||
export const defaultListPageLayout: PageLayout = {
|
export const defaultListPageLayout: PageLayout = {
|
||||||
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
|
beforeBody: [
|
||||||
|
// Component.Breadcrumbs(),
|
||||||
|
Component.ArticleTitle(),
|
||||||
|
Component.ContentMeta()],
|
||||||
left: [
|
left: [
|
||||||
Component.PageTitle(),
|
Component.PageTitle(),
|
||||||
Component.MobileOnly(Component.Spacer()),
|
Component.MobileOnly(Component.Spacer()),
|
||||||
@ -58,7 +94,22 @@ export const defaultListPageLayout: PageLayout = {
|
|||||||
{ Component: Component.Darkmode() },
|
{ Component: Component.Darkmode() },
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
Component.Explorer(),
|
Component.DesktopOnly(Component.RecentNotes({
|
||||||
|
title: "最近更新",
|
||||||
|
showTags: false,
|
||||||
|
limit: 5,
|
||||||
|
linkToMore: "pages",
|
||||||
|
})),
|
||||||
|
// Component.Explorer(),
|
||||||
],
|
],
|
||||||
right: [],
|
right: [],
|
||||||
|
afterBody: [
|
||||||
|
Component.Backlinks(),
|
||||||
|
Component.MobileOnly(Component.RecentNotes({
|
||||||
|
title: "最近更新",
|
||||||
|
showTags: false,
|
||||||
|
limit: 5,
|
||||||
|
linkToMore: "pages",
|
||||||
|
})),
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user