Skip to content
Permalink
Browse files

Updates script

  • Loading branch information
davidmerfield committed Dec 14, 2019
1 parent e0cdac9 commit 96750cd300255ca5ace75f8323b6d37d7d51ad98
Showing with 1 addition and 2 deletions.
  1. +1 −2 scripts/blog/write-data-metadata.js
@@ -16,7 +16,7 @@ get(process.argv[2], function(err, user, blog) {
function(entry, next) {
var contents, hasMetadata, dateMetadata;
if (entry.metadata.date) return next();
if (SUPPORTED_EXTENSIONS.indexOf(path.extname(entry.path)) === -1) {
if (SUPPORTED_EXTENSIONS.indexOf(path.extname(entry.path).toLowerCase()) === -1) {
console.log(entry.path, 'Cannot add metadata to unsupported file type')
return next();
}
@@ -27,7 +27,6 @@ get(process.argv[2], function(err, user, blog) {
.utc(entry.dateStamp)
.tz(blog.timeZone)
.format(FORMAT);
console.log('hasMetadata', hasMetadata);
if (hasMetadata) {
contents = dateMetadata + '\n' + ltrim(contents);
} else {

0 comments on commit 96750cd

Please sign in to comment.
You can’t perform that action at this time.