Files
assembly/docs/plugins/CreatedModifiedDate.md
T

35 lines
1.7 KiB
Markdown
Raw Normal View History

2024-02-23 21:07:53 +01:00
---
2026-03-19 22:18:42 +01:00
title: CreatedModifiedDate
description: Determines creation and modification dates from frontmatter, git, or filesystem.
2024-02-23 21:07:53 +01:00
tags:
- plugin/transformer
2026-03-19 22:18:42 +01:00
image:
repository: "[quartz-community/created-modified-date](https://github.com/quartz-community/created-modified-date)"
enabled: true
required: false
2024-02-23 21:07:53 +01:00
---
This plugin determines the created, modified, and published dates for a document using three potential data sources: frontmatter metadata, Git history, and the filesystem. See [[authoring content#Syntax]] for more information.
> [!note]
2024-04-03 16:30:41 -04:00
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
2024-02-23 21:07:53 +01:00
This plugin accepts the following configuration options:
2024-07-17 01:08:58 +09:00
- `priority`: The data sources to consult for date information. Highest priority first. Possible values are `"frontmatter"`, `"git"`, and `"filesystem"`. Defaults to `["frontmatter", "git", "filesystem"]`.
- `defaultDateType`: Which date type to use when displaying dates. Can be `"created"`, `"modified"`, or `"published"`. Defaults to `"modified"`.
2024-02-23 21:07:53 +01:00
When loading the frontmatter, the value of [[Frontmatter#List]] is used.
2024-02-23 21:07:53 +01:00
> [!warning]
2026-03-20 21:14:30 +01:00
> If you rely on `git` for dates, make sure `defaultDateType` is set to `modified` in the plugin's options.
2024-02-23 21:07:53 +01:00
>
> Depending on how you [[hosting|host]] your Quartz, the `filesystem` dates of your local files may not match the final dates. In these cases, it may be better to use `git` or `frontmatter` to guarantee correct dates.
## API
- Category: Transformer
2026-03-14 18:10:02 +01:00
- Function name: `ExternalPlugin.CreatedModifiedDate()`.
- Source: [`quartz-community/created-modified-date`](https://github.com/quartz-community/created-modified-date)
- Install: `npx quartz plugin add github:quartz-community/created-modified-date`