summaryrefslogtreecommitdiff
path: root/src/build/loadMD.mjs
diff options
context:
space:
mode:
authorache <ache@ache.one>2024-08-10 06:47:41 +0200
committerache <ache@ache.one>2024-08-10 06:47:41 +0200
commitdb6f518520f82288884bc2049e41b45ec41e9c57 (patch)
tree77e321d48f2f9fb61b4b85af4ebd5dd569fbc00a /src/build/loadMD.mjs
parentUpdate smol-toml (diff)
Support for notes
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 });