Update code to support better wiki link style on Help vault: namedly Alias divider, case-sensitive file name

This commit is contained in:
Tuan Cao 2022-03-16 12:01:01 +07:00
parent c5425dc961
commit 1d6c3b1382

View File

@ -70,7 +70,9 @@ export const Transformer = {
permalink = permalink.replace("ç","c").replace("ı","i").replace("ş","s")
//console.log("wiki pemalink", permalink);
return `/note/${permalink}`
}
},
aliasDivider:"|"
}).use(html)
.process(sanitizedContent,
function (err, file) {
@ -105,7 +107,7 @@ export const Transformer = {
var processedFileName = filename.replace(".md", "")
processedFileName = processedFileName.replace('(', '').replace(')', '')
processedFileName = processedFileName.split(" ").join("-")
processedFileName = processedFileName.toLowerCase()
// processedFileName = processedFileName.toLowerCase()
const conversionLetters = [
["ç", "c"], ["ş","s"], ["ı", "i"], ["ü","u"], ["ö","o"], ["ğ","g"],
["Ç", "C"], ["Ş","S"], ["İ", "I"], ["Ü","U"], ["Ö","O"], ["Ğ","G"]