https://github.com/rbardini/matter-now
📅 Append the current date to the YAML front matter of Markdown files
https://github.com/rbardini/matter-now
date datetime front-matter markdown now time timestamp yaml
Last synced: about 1 month ago
JSON representation
📅 Append the current date to the YAML front matter of Markdown files
- Host: GitHub
- URL: https://github.com/rbardini/matter-now
- Owner: rbardini
- License: mit
- Created: 2020-01-30T17:57:39.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-08-03T23:27:15.000Z (about 1 year ago)
- Last Synced: 2024-10-04T00:47:43.466Z (about 1 year ago)
- Topics: date, datetime, front-matter, markdown, now, time, timestamp, yaml
- Language: JavaScript
- Homepage: https://npm.im/matter-now
- Size: 791 KB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# matter-now
[](https://www.npmjs.com/package/matter-now)
[](https://github.com/rbardini/matter-now/actions)
[](https://libraries.io/npm/matter-now)Append the current date to the YAML front matter of Markdown files. Useful for adding the published date to static content files like blog posts.

## Installation
```console
npm install -g matter-now
```## Usage
```console
$ matter-now
Usage: matter-now [options]Options:
-a, --attr front matter attribute (default: "date")
-f, --format date-fns date format (default: "yyyy-MM-dd'T'HH:mm:ssxxx")
-v, --version output the version number
-h, --help display help for command
```matter-now can also be used with [lint-staged](https://github.com/okonet/lint-staged) to append dates to git staged Markdown files:
```json
{
"*.md": "matter-now"
}
```See it in action [here](https://github.com/rbardini/rbardini.com).