hexo-include-markdown
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -25,12 +25,14 @@ 'use strict'; | ||
try{ | ||
let db = JSON.parse(fileData.toString("UTF-8")) | ||
let db = (fileData && fileData != "" ? JSON.parse(fileData.toString("UTF-8")) : []) | ||
let taglist = [] | ||
for( let p of db.models.Post.entries() ){ | ||
if( p[1].hexoIncludeMarkdown && p[1].hexoIncludeMarkdown.markdown){ | ||
taglist.push({ | ||
source : p[1].source , | ||
markdown : p[1].hexoIncludeMarkdown.markdown | ||
}) | ||
} | ||
if(db && db.models && db.models.Post){ | ||
for( let p of db.models.Post.entries() ){ | ||
if( p[1].hexoIncludeMarkdown && p[1].hexoIncludeMarkdown.markdown){ | ||
taglist.push({ | ||
source : p[1].source , | ||
markdown : p[1].hexoIncludeMarkdown.markdown | ||
}) | ||
} | ||
} | ||
} | ||
@@ -37,0 +39,0 @@ resolve({ |
{ | ||
"name": "hexo-include-markdown", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "index", | ||
@@ -5,0 +5,0 @@ "dependencies": {}, |
12892
259