This commit is contained in:
Shan Carter
2017-01-11 10:34:33 -08:00
parent 9ebc8d5ea6
commit 10c436ffb2
7 changed files with 125 additions and 91 deletions
+1 -3
View File
@@ -7,12 +7,9 @@ export default function(dom, data) {
let text = el.textContent;
localData = ymlParse.safeLoad(text);
}
console.log(localData)
data.title = localData.title ? localData.title : "Untitled";
data.description = localData.description ? localData.description : "No description.";
data.published = localData.published ? new Date(localData.published) : new Date("Invalid");
data.updated = localData.updated ? new Date(localData.updated) : new Date("Invalid");
data.authors = localData.authors ? localData.authors : [];
@@ -39,5 +36,6 @@ export default function(dom, data) {
}
return a;
});
}