|
@@ -2,11 +2,15 @@ const hubdown = require("hubdown");
|
|
|
|
|
|
|
|
module.exports = function(config, item) {
|
|
module.exports = function(config, item) {
|
|
|
return new Promise(function(resolve) {
|
|
return new Promise(function(resolve) {
|
|
|
- hubdown(item.content).then(doc => {
|
|
|
|
|
- resolve({
|
|
|
|
|
- ...item,
|
|
|
|
|
- content: doc.content
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.log("item content:", item.content);
|
|
|
|
|
+ hubdown(item.content || "", { frontmatter: true })
|
|
|
|
|
+ .then(doc => {
|
|
|
|
|
+ console.log("Doc:", doc);
|
|
|
|
|
+ resolve({
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ ...doc
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => console.log);
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|