Update to auto generate meta description based on content in publish note and slide
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user