Browse Source

fix: seo

pull/18727/head
ycjcl868 5 years ago
committed by 偏右
parent
commit
31592426a8
  1. 3
      site/theme/index.js

3
site/theme/index.js

@ -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 {

Loading…
Cancel
Save