diff --git a/quartz.config.ts b/quartz.config.ts index eb63c2998..8544bd8dd 100644 --- a/quartz.config.ts +++ b/quartz.config.ts @@ -18,6 +18,7 @@ const config: QuartzConfig = { baseUrl: "ash-wiki.bluewitch.app", ignorePatterns: ["private", "templates", ".obsidian"], defaultDateType: "created", + displayDateType:["created","modified"], theme: { cdnCaching: true, typography: { diff --git a/quartz/cfg.ts b/quartz/cfg.ts index a477db057..39acd8670 100644 --- a/quartz/cfg.ts +++ b/quartz/cfg.ts @@ -35,6 +35,8 @@ export interface GlobalConfiguration { /** Base URL to use for CNAME files, sitemaps, and RSS feeds that require an absolute URL. * Quartz will avoid using this as much as possible and use relative URLs most of the time */ + /**Display Data Type options! */ + displayDateType: string[] baseUrl?: string theme: Theme /** diff --git a/quartz/components/ContentMeta.tsx b/quartz/components/ContentMeta.tsx index bcbe4285d..d543cd241 100644 --- a/quartz/components/ContentMeta.tsx +++ b/quartz/components/ContentMeta.tsx @@ -26,7 +26,11 @@ export default ((opts?: Partial) => { const segments: string[] = [] if (fileData.dates) { - segments.push(formatDate(getDate(cfg, fileData)!, cfg.locale)) + cfg.displayDateType.forEach((dateType) => { + let dateTypeLabel = (dateType == "created") ? "Created:" : "Modified:"; + segments.push(`${dateTypeLabel} ${formatDate(fileData.dates?.[dateType as keyof typeof fileData.dates]!, cfg.locale)}`) + }); + } // Display reading time if enabled