From db6f518520f82288884bc2049e41b45ec41e9c57 Mon Sep 17 00:00:00 2001 From: ache Date: Sat, 10 Aug 2024 06:47:41 +0200 Subject: Support for notes --- src/build/loadMD.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/build/loadMD.mjs') diff --git a/src/build/loadMD.mjs b/src/build/loadMD.mjs index a1eab3b..8153d37 100644 --- a/src/build/loadMD.mjs +++ b/src/build/loadMD.mjs @@ -20,6 +20,8 @@ const loadMD = (listFile, suffix, lang) => { const metaData = toml.parse(tomlStringValue); const newHTML = mdToHtmlRaw(mdRaw); + const langR = lang || metaData.lang; + const htmlContent = newHTML; const htmlRender = toString(htmlContent); @@ -51,7 +53,8 @@ const loadMD = (listFile, suffix, lang) => { .toLowerCase(), ); // Maybe encodeURI - const readMore = h("a", i18n[lang]["read_more"]); + console.log(langR); + const readMore = h("a", i18n[langR]["read_more"]); readMore.properties.href = `/${suffix}/${file.slice(0, -3)}`; const pubYear = getArticleYear({ metaData }); -- cgit v1.2.3-70-g09d2