frontmd2json
Advanced tools
Comparing version 0.0.4 to 0.0.5
12
index.js
@@ -14,9 +14,11 @@ "use strict"; | ||
var articles = paths.map(function(filePath) { | ||
var json = frontMatter.loadFront(filePath, 'markdown') | ||
json.path = path.dirname(filePath) | ||
json.markdown = json.markdown.replace(/^\n*/, '') | ||
return json | ||
var meta = frontMatter.loadFront(filePath, 'markdown') | ||
meta._path = path.dirname(filePath) | ||
meta._markdown = meta.markdown.replace(/^\n*/, '') | ||
return { | ||
meta: meta | ||
} | ||
}) | ||
.map(function(json) { | ||
json.html = remarkable.render(json.markdown) | ||
json.html = remarkable.render(json.meta._markdown) | ||
return json | ||
@@ -23,0 +25,0 @@ }) |
{ | ||
"name": "frontmd2json", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "convert markdown files with frontmatter to json", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3007
25