mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
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>
This commit is contained in:
parent
3cc957a88b
commit
ee4210a511
2 changed files with 2 additions and 1 deletions
|
@ -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,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="<%= lang || "en" %>">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
|
Loading…
Reference in a new issue