forked from jackyzha0/quartz
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquartz.layout.ts
More file actions
86 lines (81 loc) · 2.34 KB
/
quartz.layout.ts
File metadata and controls
86 lines (81 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import { PageLayout, SharedLayout } from "./quartz/cfg"
import * as Component from "./quartz/components"
import { QuartzComponent } from "./quartz/components/types"
// components shared across all pages
export const sharedPageComponents: SharedLayout = {
head: Component.Head(),
header: [Component.LinksHeader()],
afterBody: [],
footer: Component.Footer({
links: {
"LinkedIn": "https://linkedin.com/in/estepankevich",
"GitHub": "https://github.com/estepankevich",
"LeetCode": "https://leetcode.com/u/estepankevich/",
"Scroll to top ↑": "#"
},
}),
}
export const recentPosts: QuartzComponent =
Component.DesktopOnly(Component.RecentNotes({
title: "Recent posts",
limit: 3,
showTags: false,
filter: (file) => {
return !!file.slug?.includes("🌍-Blog/");
}
}))
// 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(),
Component.TableOfContents()
],
left: [
Component.PageTitle(),
Component.DesktopOnly(Component.Explorer({
folderClickBehavior: "link"
})),
recentPosts
],
right: [
Component.Search(),
Component.Darkmode(),
Component.Graph({
localGraph: {
scale: 1.1,
repelForce: 0.5, // how much nodes should repel each other
centerForce: 0.8, // how much force to use when trying to center the nodes
linkDistance: 50, // how long should the links be by default?
fontSize: 0.8, // what size should the node labels be?
showTags: false, // whether to show tags in the graph
},
globalGraph: {
scale: 2,
repelForce: 0.08,
centerForce: 0.9,
linkDistance: 100,
fontSize: 0.4,
showTags: false,
},
}),
Component.BacklinksCustom()
]
}
// 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.DesktopOnly(Component.Explorer({
folderClickBehavior: "link"
})),
recentPosts
],
right: [
Component.Search(),
Component.Darkmode()
]
}