Skip to content

Commit

Permalink
Merge 5aa92bb into 82505ed
Browse files Browse the repository at this point in the history
  • Loading branch information
liangliangyy committed May 22, 2018
2 parents 82505ed + 5aa92bb commit f951238
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion blog/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def test_validate_feed(self):

def test_image(self):
import requests
rsp = requests.get('https://www.lylinux.net/static/blog/img/avatar.png')
rsp = requests.get('https://www.python.org/static/img/python-logo@2x.png')
imagepath = os.path.join(settings.BASE_DIR, 'django.jpg')
with open(imagepath, 'wb') as file:
file.write(rsp.content)
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ olefile==0.45.1
packaging==17.1
Pillow==5.1.0
Pygments==2.2.0
PyMySQL==0.8.0
PyMySQL==0.8.1
pyparsing==2.2.0
python-memcached==1.59
python-slugify==1.2.5
Expand All @@ -34,6 +34,6 @@ sqlparse==0.2.4
Unidecode==1.0.22
urllib3==1.22
webencodings==0.5.1
WeRoBot==1.4.0
WeRoBot==1.4.1
Whoosh==2.7.4
xmltodict==0.11.0
10 changes: 9 additions & 1 deletion templates/blog/article_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta property="og:title" content="{{ article.title }}"/>


<meta property="og:description" content="{{ article.body|custom_markdown|striptags|truncatewords:20 }}"/>
<meta property="og:description" content="{{ article.body|custom_markdown|striptags|truncatewords:1 }}"/>
<meta property="og:url"
content="{{ article.get_full_url }}"/>
<meta property="article:published_time" content="{% datetimeformat article.pub_time %}"/>
Expand All @@ -17,6 +17,14 @@
<meta property="article:tag" content="{{ t.name }}"/>
{% endfor %}
<meta property="og:site_name" content="{{ SITE_NAME }}"/>

<meta name="description" content="{{ article.body|custom_markdown|striptags|truncatewords:1 }}"/>
{% if article.tags %}
<meta name="keywords" content="{{ article.tags.all|join:"," }}"/>
{% else %}
<meta name="keywords" content="{{ SITE_KEYWORDS }}"/>
{% endif %}

{% endblock %}
{% block content %}
<div id="primary" class="site-content">
Expand Down
4 changes: 2 additions & 2 deletions travis_test/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ olefile==0.45.1
packaging==17.1
Pillow==5.1.0
Pygments==2.2.0
PyMySQL==0.8.0
PyMySQL==0.8.1
pyparsing==2.2.0
python-slugify==1.2.5
pytz==2018.4
Expand All @@ -33,6 +33,6 @@ sqlparse==0.2.4
Unidecode==1.0.22
urllib3==1.22
webencodings==0.5.1
WeRoBot==1.4.0
WeRoBot==1.4.1
Whoosh==2.7.4
xmltodict==0.11.0

0 comments on commit f951238

Please sign in to comment.