handlebars-helper-formatdate
v1.0.0
Published
Handlebars helper that format dates using moment
Readme
handlebars-helper-formatdate
Handlebars helper that format dates using moment.
Installation
npm install handlebars-helper-formatdateUsage
In your templates:
<h1>{{ title }}</h1>
<span class="post-date">On {{ formatDate date 'MMM DD YYYY' }}</span>In your front matters:
---
title: A post
description: A very simple post.
date: 2016-10-29
---
...In your metalsmith script:
var handlebars = require('handlebars');
var hbtdate = require('handlebars-helper-formatdate')(handlebars);handlebars Object
A Handlebars instance.License
MIT License, see LICENSE for details.
