2023-07-10 05:32:24 +03:00
|
|
|
import { GlobalConfiguration, PageLayout, QuartzConfig } from "./quartz/cfg"
|
2023-06-10 09:06:02 +03:00
|
|
|
import * as Component from "./quartz/components"
|
|
|
|
import * as Plugin from "./quartz/plugins"
|
2023-05-30 18:02:20 +03:00
|
|
|
|
2023-07-10 05:32:24 +03:00
|
|
|
const generalConfiguration: GlobalConfiguration = {
|
|
|
|
pageTitle: "🪴 Quartz 4.0",
|
|
|
|
enableSPA: true,
|
|
|
|
enablePopovers: true,
|
|
|
|
analytics: {
|
2023-07-23 03:27:41 +03:00
|
|
|
provider: "plausible",
|
2023-07-10 05:32:24 +03:00
|
|
|
},
|
2023-07-13 10:19:35 +03:00
|
|
|
baseUrl: "quartz.jzhao.xyz",
|
2023-07-10 05:32:24 +03:00
|
|
|
ignorePatterns: ["private", "templates"],
|
|
|
|
theme: {
|
|
|
|
typography: {
|
|
|
|
header: "Schibsted Grotesk",
|
|
|
|
body: "Source Sans Pro",
|
|
|
|
code: "IBM Plex Mono",
|
|
|
|
},
|
|
|
|
colors: {
|
|
|
|
lightMode: {
|
2023-07-23 03:27:41 +03:00
|
|
|
light: "#faf8f8",
|
|
|
|
lightgray: "#e5e5e5",
|
|
|
|
gray: "#b8b8b8",
|
|
|
|
darkgray: "#4e4e4e",
|
|
|
|
dark: "#2b2b2b",
|
|
|
|
secondary: "#284b63",
|
|
|
|
tertiary: "#84a59d",
|
|
|
|
highlight: "rgba(143, 159, 169, 0.15)",
|
2023-07-10 05:32:24 +03:00
|
|
|
},
|
|
|
|
darkMode: {
|
2023-07-23 03:27:41 +03:00
|
|
|
light: "#161618",
|
|
|
|
lightgray: "#393639",
|
|
|
|
gray: "#646464",
|
|
|
|
darkgray: "#d4d4d4",
|
|
|
|
dark: "#ebebec",
|
|
|
|
secondary: "#7b97aa",
|
|
|
|
tertiary: "#84a59d",
|
|
|
|
highlight: "rgba(143, 159, 169, 0.15)",
|
2023-07-10 05:32:24 +03:00
|
|
|
},
|
2023-07-23 03:27:41 +03:00
|
|
|
},
|
|
|
|
},
|
2023-07-10 05:32:24 +03:00
|
|
|
}
|
|
|
|
|
2023-07-01 10:03:01 +03:00
|
|
|
const sharedPageComponents = {
|
|
|
|
head: Component.Head(),
|
2023-07-02 23:08:29 +03:00
|
|
|
header: [],
|
2023-07-01 10:03:01 +03:00
|
|
|
footer: Component.Footer({
|
|
|
|
links: {
|
2023-07-23 03:27:41 +03:00
|
|
|
GitHub: "https://github.com/jackyzha0/quartz",
|
|
|
|
"Discord Community": "https://discord.gg/cRFFHYye7t",
|
|
|
|
},
|
|
|
|
}),
|
2023-07-01 10:03:01 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
const contentPageLayout: PageLayout = {
|
2023-07-23 03:27:41 +03:00
|
|
|
beforeBody: [Component.ArticleTitle(), Component.ReadingTime(), Component.TagList()],
|
2023-07-02 23:08:29 +03:00
|
|
|
left: [
|
|
|
|
Component.PageTitle(),
|
2023-07-05 02:48:36 +03:00
|
|
|
Component.MobileOnly(Component.Spacer()),
|
2023-07-02 23:08:29 +03:00
|
|
|
Component.Search(),
|
2023-07-04 20:08:32 +03:00
|
|
|
Component.Darkmode(),
|
|
|
|
Component.DesktopOnly(Component.TableOfContents()),
|
2023-07-02 23:08:29 +03:00
|
|
|
],
|
2023-07-23 03:27:41 +03:00
|
|
|
right: [Component.Graph(), Component.Backlinks()],
|
2023-07-01 10:03:01 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
const listPageLayout: PageLayout = {
|
2023-07-23 03:27:41 +03:00
|
|
|
beforeBody: [Component.ArticleTitle()],
|
2023-07-02 23:08:29 +03:00
|
|
|
left: [
|
|
|
|
Component.PageTitle(),
|
2023-07-05 02:48:36 +03:00
|
|
|
Component.MobileOnly(Component.Spacer()),
|
2023-07-02 23:08:29 +03:00
|
|
|
Component.Search(),
|
2023-07-23 03:27:41 +03:00
|
|
|
Component.Darkmode(),
|
2023-07-02 23:08:29 +03:00
|
|
|
],
|
2023-07-01 10:03:01 +03:00
|
|
|
right: [],
|
|
|
|
}
|
|
|
|
|
2023-06-04 19:35:45 +03:00
|
|
|
const config: QuartzConfig = {
|
2023-07-10 05:32:24 +03:00
|
|
|
configuration: generalConfiguration,
|
2023-05-30 18:02:20 +03:00
|
|
|
plugins: {
|
|
|
|
transformers: [
|
2023-06-12 09:26:43 +03:00
|
|
|
Plugin.FrontMatter(),
|
2023-06-17 05:41:59 +03:00
|
|
|
Plugin.TableOfContents(),
|
2023-06-12 09:26:43 +03:00
|
|
|
Plugin.CreatedModifiedDate({
|
2023-07-23 03:27:41 +03:00
|
|
|
priority: ["frontmatter", "filesystem"], // you can add 'git' here for last modified from Git but this makes the build slower
|
2023-06-01 00:01:23 +03:00
|
|
|
}),
|
2023-07-10 05:32:24 +03:00
|
|
|
Plugin.SyntaxHighlighting(),
|
2023-06-12 09:26:43 +03:00
|
|
|
Plugin.ObsidianFlavoredMarkdown(),
|
2023-06-20 06:37:45 +03:00
|
|
|
Plugin.GitHubFlavoredMarkdown(),
|
2023-07-23 03:27:41 +03:00
|
|
|
Plugin.CrawlLinks({ markdownLinkResolution: "shortest" }),
|
|
|
|
Plugin.Latex({ renderEngine: "katex" }),
|
2023-06-20 06:37:45 +03:00
|
|
|
Plugin.Description(),
|
2023-05-30 18:02:20 +03:00
|
|
|
],
|
2023-07-23 03:27:41 +03:00
|
|
|
filters: [Plugin.RemoveDrafts()],
|
2023-05-30 18:02:20 +03:00
|
|
|
emitters: [
|
2023-06-17 05:41:59 +03:00
|
|
|
Plugin.AliasRedirects(),
|
2023-06-12 09:26:43 +03:00
|
|
|
Plugin.ContentPage({
|
2023-07-01 10:03:01 +03:00
|
|
|
...sharedPageComponents,
|
|
|
|
...contentPageLayout,
|
|
|
|
pageBody: Component.Content(),
|
|
|
|
}),
|
2023-07-02 23:08:29 +03:00
|
|
|
Plugin.FolderPage({
|
2023-07-01 10:03:01 +03:00
|
|
|
...sharedPageComponents,
|
|
|
|
...listPageLayout,
|
2023-07-02 23:08:29 +03:00
|
|
|
pageBody: Component.FolderContent(),
|
2023-07-01 10:03:01 +03:00
|
|
|
}),
|
2023-07-02 23:08:29 +03:00
|
|
|
Plugin.TagPage({
|
2023-07-01 10:03:01 +03:00
|
|
|
...sharedPageComponents,
|
|
|
|
...listPageLayout,
|
2023-07-02 23:08:29 +03:00
|
|
|
pageBody: Component.TagContent(),
|
2023-06-17 05:41:59 +03:00
|
|
|
}),
|
2023-07-01 23:35:27 +03:00
|
|
|
Plugin.ContentIndex({
|
|
|
|
enableSiteMap: true,
|
|
|
|
enableRSS: true,
|
|
|
|
}),
|
2023-07-23 03:27:41 +03:00
|
|
|
],
|
2023-05-30 18:02:20 +03:00
|
|
|
},
|
2023-06-04 19:35:45 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export default config
|