summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErik Michelson2020-07-03 00:06:03 +0200
committerErik Michelson2020-07-03 00:06:03 +0200
commitee4210a5115e29d02bb1ae8fc6297c2c318eb24b (patch)
treee4b88b2daa51c49f05718cc0bb559acdef826843 /lib
parent3cc957a88b3b434edbc9db072c7259d188333c9a (diff)
Added dynamic lang-attr to pretty.ejs
CodiMD currently only uses the 'lang' attribute in YAML-metadata of a note for setting certain js-elements of the markdown-renderer. This commit adds the chosen lang into the published version of a note. Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Diffstat (limited to 'lib')
-rw-r--r--lib/web/note/util.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/web/note/util.js b/lib/web/note/util.js
index c5affd05..128c89cf 100644
--- a/lib/web/note/util.js
+++ b/lib/web/note/util.js
@@ -81,6 +81,7 @@ exports.getPublishData = function (req, res, note, callback) {
const data = {
title: title,
description: meta.description || (markdown ? models.Note.generateDescription(markdown) : null),
+ lang: meta.lang || null
viewcount: note.viewcount,
createtime: createtime,
updatetime: updatetime,