Skip to content

Commit f1cb2ab

Browse files
committed
Improve meta:description
1 parent 702f50a commit f1cb2ab

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

layout/includes/head.pug

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@
66
- if (is_year()) pageTitle += ': ' + page.year;
77
- pageTitle = pageTitle ? pageTitle += ' | ' + config.title : config.title;
88
- var banner = bannerOf(page) || theme.default.url;
9+
-
10+
var description = truncate(
11+
strip_html(page.content) || config.description || theme.profile.description,
12+
{
13+
length: 140,
14+
separator: ' ',
15+
omission: '',
16+
}
17+
)
918
-
1019
var openGraph = open_graph({
11-
description: page.content || config.description || theme.profile.description,
20+
description,
1221
image: banner,
1322
fb_app_id: theme.facebook,
1423
fb_admins: theme.fb_admin,

0 commit comments

Comments
 (0)