Namespace, Primitive, Method
    Have ideas to improve npm?Join in the discussion! »

    handlebars-helper-formatdate

    1.0.0 • Public • Published

    handlebars-helper-formatdate

    Handlebars helper that format dates using moment.

    Installation

    npm install handlebars-helper-formatdate
    

    Usage

    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.

    Install

    npm i handlebars-helper-formatdate

    DownloadsWeekly Downloads

    10

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar