metalsmith-sitemap
Advanced tools
Comparing version 0.0.7 to 0.0.8
var fs = require('fs'), | ||
Handlebars = require('handlebars'), | ||
_ = require('lodash'), | ||
moment = require('moment'), | ||
toFn = require('to-function'), | ||
@@ -63,2 +64,15 @@ url = require('url'), | ||
if (!theUrl) { | ||
return; | ||
} | ||
if (!lastModified) { | ||
if (data && data.stats && data.stats.mtime) { | ||
lastModified = moment(data.stats.mtime).format("YYYY-MM-DD"); | ||
} | ||
else { | ||
return; | ||
} | ||
} | ||
entry = _.defaults({ | ||
@@ -65,0 +79,0 @@ loc: url.resolve(options.hostname, theUrl), |
{ | ||
"name": "metalsmith-sitemap", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "A metalsmith plugin for generating a sitemap.xml file.", | ||
@@ -33,5 +33,6 @@ "main": "lib/index.js", | ||
"handlebars": "^2.0.0-alpha.4", | ||
"to-function": "2.0.5", | ||
"lodash": "^2.4.1" | ||
"lodash": "^2.4.1", | ||
"moment": "^2.8.4", | ||
"to-function": "2.0.5" | ||
} | ||
} |
7582
86
4
+ Addedmoment@^2.8.4
+ Addedmoment@2.30.1(transitive)