generated from jackyzha0/quartz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
quartz.config.ts
169 lines (166 loc) · 4.7 KB
/
quartz.config.ts
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
import { GlobalConfiguration, QuartzConfig } from "./quartz/cfg"
import { byDateAndAlphabetical } from "./quartz/components/PageList"
import * as Plugin from "./quartz/plugins"
import * as Component from "./quartz/components/"
import { QuartzPluginData } from "./quartz/plugins/vfile"
/**
* Quartz 4.0 Configuration
*
* See https://quartz.jzhao.xyz/configuration for more information.
*/
const config: QuartzConfig = {
configuration: {
pageTitle: "Aaron's notes",
enableSPA: true,
enablePopovers: true,
generateSocialImages: true,
analytics: {
provider: "plausible",
},
locale: "fr-FR",
baseUrl: "aarnphm.xyz",
ignorePatterns: [
"private",
"templates",
".obsidian",
"**.adoc",
"**.zip",
"**.lvbitx",
"**.so",
"400232791",
"__pycache__",
],
defaultDateType: "created",
theme: {
cdnCaching: true,
fontOrigin: "googleFonts",
typography: {
header: "EB Garamond",
body: "EB Garamond",
code: "JetBrains Mono",
},
colors: {
lightMode: {
light: "#fffaf3",
lightgray: "#f2e9e1",
gray: "#9893a5",
darkgray: "#797593",
dark: "#575279",
secondary: "#d7827e",
tertiary: "#b4637a",
highlight: "rgba(143, 159, 169, 0.15)",
textHighlight: "rgba(246, 193, 119, 0.28)",
},
darkMode: {
light: "#1f1d30",
lightgray: "#26233a",
gray: "#6e6a86",
darkgray: "#908caa",
dark: "#e0def4",
secondary: "#ebbcba",
tertiary: "#eb6f92",
highlight: "rgba(143, 159, 169, 0.15)",
textHighlight: "#b3aa0288",
},
},
},
},
plugins: {
transformers: [
Plugin.FrontMatter(),
Plugin.CreatedModifiedDate({ priority: ["frontmatter", "filesystem"] }),
Plugin.Pseudocode(),
Plugin.TikzJax(),
Plugin.Poetry(),
Plugin.Signature(),
Plugin.TelescopicText(),
// FIXME: implement this
// Plugin.Recipe(),
// Plugin.Embeddings(),
Plugin.Twitter(),
Plugin.SyntaxHighlighting({
theme: {
light: "rose-pine-dawn",
dark: "rose-pine",
},
keepBackground: true,
}),
Plugin.Citations({
bibliographyFile: "./content/References.bib",
linkCitations: true,
}),
Plugin.ObsidianFlavoredMarkdown(),
Plugin.GitHubFlavoredMarkdown(),
Plugin.CrawlLinks({
markdownLinkResolution: "absolute",
externalLinkIcon: true,
lazyLoad: true,
enableArxivEmbed: true,
enableRawEmbed: true,
}),
Plugin.Description(),
Plugin.Latex({
renderEngine: "katex",
customMacros: {
"\\argmin": "\\mathop{\\operatorname{arg\\,min}}\\limits",
"\\argmax": "\\mathop{\\operatorname{arg\\,max}}\\limits",
"\\upgamma": "\\mathit{\\gamma}",
"\\upphi": "\\mathit{\\phi}",
"\\upbeta": "\\mathit{\\beta}",
"\\upalpha": "\\mathit{\\alpha}",
"\\uptheta": "\\mathit{\\theta}",
},
katexOptions: { strict: false },
}),
Plugin.GitHub(),
Plugin.TableOfContents({ maxDepth: 5 }),
],
filters: [Plugin.RemoveDrafts()],
emitters: [
Plugin.AliasRedirects(),
Plugin.ComponentResources(),
Plugin.ContentPage(),
Plugin.LLM(),
Plugin.FolderPage({
pageBody: Component.FolderContent({
sort: (a: QuartzPluginData, b: QuartzPluginData): number => {
// Check if either file has a folder tag
const aHasFolder = a.frontmatter?.tags?.includes("folder") ?? false
const bHasFolder = b.frontmatter?.tags?.includes("folder") ?? false
// If one has folder tag and other doesn't, prioritize the one with folder tag
if (aHasFolder && !bHasFolder) return -1
else if (!aHasFolder && bHasFolder) return 1
else {
return byDateAndAlphabetical({ defaultDateType: "created" } as GlobalConfiguration)(
a,
b,
)
}
},
include: [
".pdf",
".py",
".go",
".c",
".m",
".cu",
".java",
".sql",
".js",
".ipynb",
".json",
],
exclude: [/\.(ignore\.pdf)$/, /400232791/],
}),
}),
Plugin.TagPage(),
Plugin.NotebookViewer(),
// Plugin.InfinitePoemPage(),
Plugin.ContentIndex({ rssLimit: 40 }),
Plugin.Assets(),
Plugin.Static(),
Plugin.NotFoundPage(),
],
},
}
export default config