Skip to content

Metalsmith plugin to convert a set of file metadata to moment date objects

License

Notifications You must be signed in to change notification settings

dpobel/metalsmith-moment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metalsmith-moment

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

Build status

Installation

This plugin requires Node.js 20 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

About

Metalsmith plugin to convert a set of file metadata to moment date objects

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published