mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 06:34:39 -04:00
Update to auto generate meta description based on content in publish note and slide
This commit is contained in:
parent
8c10c393ce
commit
71a356552f
2 changed files with 17 additions and 7 deletions
|
@ -260,6 +260,9 @@ module.exports = function (sequelize, DataTypes) {
|
|||
if (!title) title = "Untitled";
|
||||
return title;
|
||||
},
|
||||
generateDescription: function (markdown) {
|
||||
return markdown.substr(0, 100).replace(/(?:\r\n|\r|\n)/g, ' ');
|
||||
},
|
||||
decodeTitle: function (title) {
|
||||
var decodedTitle = LZString.decompressFromBase64(title);
|
||||
if (decodedTitle) title = decodedTitle;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue