Last active
October 13, 2015 08:18
Revisions
-
balupton revised this gist
Jan 2, 2013 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,4 +4,6 @@ 2. Add it and a template helper to your [docpad configuration file](http://bevry.me/docpad/config) 3. Use the template helper in your app [Discussion about localisation within DocPad.](https://github.com/bevry/docpad/issues/17) -
balupton revised this gist
Jan 2, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # DocPad: Localising Dates 1. Install [Moment](http://momentjs.com) via `npm install --save moment` 2. Add it and a template helper to your [docpad configuration file](http://bevry.me/docpad/config) -
balupton created this gist
Nov 29, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ 1. Install [Moment](http://momentjs.com) via `npm install --save moment` 2. Add it and a template helper to your [docpad configuration file](http://bevry.me/docpad/config) 3. Use the template helper in your app This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # Requires moment = require('moment').lang('fr') # set locale to french # Define Configuration docpadConfig = templateData: # Format the passed date, by default format like: Thursday, November 29 2012 3:53 PM formatDate: (date,format='LLLL') -> return moment(date).format(format) # Export Configuration module.exports = docpadConfig This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ This document was last modified at: <%= @formatDate(@document.date) %>