This commit is contained in:
ycjcl868 2019-08-01 01:13:23 +08:00 committed by 偏右
parent 5dd132340e
commit 31592426a8

View File

@ -54,7 +54,8 @@ module.exports = {
selector: ($, pathname) => {
let description = '';
if (pathname !== '/') {
description = ($('section.markdown p').text() || '').slice(0, 50);
const desc = ($('section.markdown p').text() || '');
description = desc.length > 50 ? `${desc.slice(0, 50)}...` : desc;
}
console.log('description', description);
return {