|
@ -91,11 +91,11 @@ module.exports= |
|
|
{ |
|
|
{ |
|
|
return new Promise(function(resolve, reject) |
|
|
return new Promise(function(resolve, reject) |
|
|
{ |
|
|
{ |
|
|
const pathName = "blogContent/posts/" + categoryURL + "/" |
|
|
|
|
|
|
|
|
const pathName = "content/posts/" + categoryURL + "/" |
|
|
+ postURL + ".md"; |
|
|
+ postURL + ".md"; |
|
|
var markDown = utils.getFileContents(pathName).toString(); |
|
|
var markDown = utils.getFileContents(pathName).toString(); |
|
|
|
|
|
|
|
|
markDown = markDown.split("(media/").join("(" + "../blogContent/posts/" |
|
|
|
|
|
|
|
|
markDown = markDown.split("(media/").join("(" + "../content/posts/" |
|
|
+ categoryURL + "/media/"); |
|
|
+ categoryURL + "/media/"); |
|
|
|
|
|
|
|
|
module.exports.convertToHTML(markDown, blocks).then(function(result) |
|
|
module.exports.convertToHTML(markDown, blocks).then(function(result) |
|
@ -142,7 +142,7 @@ module.exports= |
|
|
var regExp = /\<customHTML .*?>/; |
|
|
var regExp = /\<customHTML .*?>/; |
|
|
while (result.search(regExp) != -1) |
|
|
while (result.search(regExp) != -1) |
|
|
{ |
|
|
{ |
|
|
const pathName = "blogContent/posts/" + categoryURL + "/html/" |
|
|
|
|
|
|
|
|
const pathName = "content/posts/" + categoryURL + "/html/" |
|
|
+ postURL + ".html"; |
|
|
+ postURL + ".html"; |
|
|
|
|
|
|
|
|
var htmlContent = utils.getFileContents(pathName).toString(); |
|
|
var htmlContent = utils.getFileContents(pathName).toString(); |
|
|