Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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).