metalsmith-moment

4.0.0 • Public • Published

metalsmith-moment

A Metalsmith plugin to convert a set of file metadata to moment.js objects.

Build status

Installation

This plugin requires Node.js 18 or later

$ npm install metalsmith-moment

JavaScript usage

const msMoment = require("metalsmith-moment");

metalsmith.use(msMoment(["published", "modified"]));

This will convert the published and modified properties to moment.js objects by applying moment.js parsing rules. Any falsy property is just ignored.

CLI usage

{
  "plugins": {
    "metalsmith-moment": ["published", "modified"]
  }
}

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i metalsmith-moment

Weekly Downloads

9

Version

4.0.0

License

MIT

Unpacked Size

5.43 kB

Total Files

8

Last publish

Collaborators

  • dpobel