Skip to content

Commit 9234851

Browse files
committed
description优化
1 parent 75f5ff0 commit 9234851

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

templates/blog/article_detail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta property="og:type" content="article"/>
66
<meta property="og:title" content="{{ article.title }}"/>
77

8-
<meta property="og:description" content="{{ article.body|truncate }}"/>
98

9+
<meta property="og:description" content="{{ article.body|custom_markdown|striptags|truncatewords:20 }}"/>
1010
<meta property="og:url"
1111
content="{{ article.get_full_url }}"/>
1212
<meta property="article:published_time" content="{% datetimeformat article.pub_time %}"/>

templates/blog/article_index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
{% block header %}
55
{% if tag_name %}
66
<title>{{ page_type }}:{{ tag_name }} | {{ SITE_DESCRIPTION }}</title>
7-
<meta name="description" content="{{ page_type }}:{{ tag_name }}"/>
7+
{% comment %}<meta name="description" content="{{ page_type }}:{{ tag_name }}"/>{% endcomment %}
88
{% else %}
99
<title>{{ SITE_NAME }} | {{ SITE_DESCRIPTION }}</title>
10-
<meta name="description" content="{{ SITE_SEO_DESCRIPTION }}"/>
1110
{% endif %}
12-
11+
<meta name="description" content="{{ SITE_SEO_DESCRIPTION }}"/>
1312
<meta name="keywords" content="{{ SITE_KEYWORDS }}"/>
1413
<meta property="og:type" content="blog"/>
1514
<meta property="og:title" content="{{ SITE_NAME }}"/>

0 commit comments

Comments
 (0)