diff options
-rw-r--r-- | docs/setup/yunohost.md | 8 | ||||
-rw-r--r-- | lib/models/note.js | 1 | ||||
-rw-r--r-- | lib/web/note/util.js | 1 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | public/docs/yaml-metadata.md | 2 | ||||
-rw-r--r-- | public/views/pretty.ejs | 2 | ||||
-rw-r--r-- | yarn.lock | 5 |
7 files changed, 18 insertions, 3 deletions
diff --git a/docs/setup/yunohost.md b/docs/setup/yunohost.md new file mode 100644 index 00000000..a7666df9 --- /dev/null +++ b/docs/setup/yunohost.md @@ -0,0 +1,8 @@ +YunoHost +=== + +CodiMD is available as a 1-click install on [YunoHost](https://yunohost.org/). YunoHost is a Debian GNU/Linux based distribution packaged with free software that automates the installation of a personal web server. + +[![Install CodiMD with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=codimd) + +The source code for the package can be found [here](https://github.com/YunoHost-Apps/codimd_ynh).
\ No newline at end of file diff --git a/lib/models/note.js b/lib/models/note.js index 141402ac..edc79639 100644 --- a/lib/models/note.js +++ b/lib/models/note.js @@ -406,6 +406,7 @@ module.exports = function (sequelize, DataTypes) { if (meta.title && (typeof meta.title === 'string' || typeof meta.title === 'number')) { _meta.title = meta.title } if (meta.description && (typeof meta.description === 'string' || typeof meta.description === 'number')) { _meta.description = meta.description } if (meta.robots && (typeof meta.robots === 'string' || typeof meta.robots === 'number')) { _meta.robots = meta.robots } + if (meta.lang && (typeof meta.lang === 'string')) { _meta.lang = meta.lang } if (meta.GA && (typeof meta.GA === 'string' || typeof meta.GA === 'number')) { _meta.GA = meta.GA } if (meta.disqus && (typeof meta.disqus === 'string' || typeof meta.disqus === 'number')) { _meta.disqus = meta.disqus } if (meta.slideOptions && (typeof meta.slideOptions === 'object')) { _meta.slideOptions = meta.slideOptions } diff --git a/lib/web/note/util.js b/lib/web/note/util.js index c5affd05..f1af1300 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, diff --git a/package.json b/package.json index c6538255..e486d680 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "jsdom-nogyp": "^0.8.3", "keymaster": "^1.6.2", "list.js": "^1.5.0", - "lodash": "^4.17.11", + "lodash": "^4.17.16", "lutim": "^1.0.2", "lz-string": "git+https://github.com/hackmdio/lz-string.git", "mariadb": "^2.1.2", diff --git a/public/docs/yaml-metadata.md b/public/docs/yaml-metadata.md index 083a0943..10956382 100644 --- a/public/docs/yaml-metadata.md +++ b/public/docs/yaml-metadata.md @@ -76,7 +76,7 @@ You can find your the language code in ISO 639-1 standard: **Example** ```yml -langs: ja-jp +lang: ja-jp ``` ## dir diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index 2cf96a7b..51900a4a 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html lang="en"> +<html lang="<%= lang || "en" %>"> <head> <meta charset="utf-8"> @@ -6259,6 +6259,11 @@ lodash@4.17.x, lodash@^4.14.2, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14 resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== +lodash@^4.17.16: + version "4.17.19" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" + integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== + logform@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/logform/-/logform-2.1.2.tgz#957155ebeb67a13164069825ce67ddb5bb2dd360" |