summaryrefslogtreecommitdiff
path: root/src/build/loadMD.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/build/loadMD.mjs')
-rw-r--r--src/build/loadMD.mjs5
1 files changed, 4 insertions, 1 deletions
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 });