Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 months 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 (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-08-03T23:27:15.000Z (6 months ago)
- Last Synced: 2024-10-04T00:47:43.466Z (4 months 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
[![npm package version](https://img.shields.io/npm/v/matter-now)](https://www.npmjs.com/package/matter-now)
[![Build status](https://img.shields.io/github/actions/workflow/status/rbardini/matter-now/main.yml)](https://github.com/rbardini/matter-now/actions)
[![Dependencies status](https://img.shields.io/librariesio/release/npm/matter-now)](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.
![Demo](demo.gif)
## 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).