diff --git a/content/.obsidian/community-plugins.json b/content/.obsidian/community-plugins.json index 677548b3..02a26238 100644 --- a/content/.obsidian/community-plugins.json +++ b/content/.obsidian/community-plugins.json @@ -3,5 +3,6 @@ "obsidian-zotero-desktop-connector", "2hop-links-plus", "obsidian-auto-link-title", - "obsidian-pandoc-reference-list" + "obsidian-pandoc-reference-list", + "templater-obsidian" ] \ No newline at end of file diff --git a/content/templates/_default.md b/content/templates/_default.md new file mode 100644 index 00000000..c9e61288 --- /dev/null +++ b/content/templates/_default.md @@ -0,0 +1,4 @@ +--- +date: <% tp.date.now("") %> +--- + diff --git a/quartz.config.ts b/quartz.config.ts index 6751a6c1..f100792a 100644 --- a/quartz.config.ts +++ b/quartz.config.ts @@ -47,7 +47,7 @@ const config: QuartzConfig = { transformers: [ Plugin.FrontMatter(), Plugin.CreatedModifiedDate({ - priority: ["git", "filesystem", "frontmatter"], // you can add 'git' here for last modified from Git but this makes the build slower + priority: [ "frontmatter","git",], // you can add 'git' here for last modified from Git but this makes the build slower }), Plugin.Latex({ renderEngine: "katex" }), Plugin.SyntaxHighlighting(), diff --git a/quartz/components/ContentMeta.tsx b/quartz/components/ContentMeta.tsx index 3c05cf31..c63ce3a5 100644 --- a/quartz/components/ContentMeta.tsx +++ b/quartz/components/ContentMeta.tsx @@ -24,10 +24,12 @@ export default ((opts?: Partial) => { if (text) { const segments: string[] = [] - if (fileData.dates) { - segments.push('last updated: ' + formatDate(fileData.dates?.["modified"], cfg.locale)) + if (fileData.dates?.created) { + segments.push('created: ' + formatDate(fileData.dates.created, cfg.locale)) + } + if (fileData.dates?.modified) { + segments.push('last updated: ' + formatDate(fileData.dates.modified, cfg.locale)) } - // Display reading time if enabled if (options.showReadingTime) { const { text: timeTaken, words: _words } = readingTime(text)