Skip to content

Commit 2795e4a

Browse files
committed
wechat url
1 parent 248f9d0 commit 2795e4a

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

app/OctBlog/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@
4343
},
4444
'wechat': {
4545
'display_wechat': os.environ.get('display_wechat', 'true').lower() == 'true',
46-
'wechat_msg': os.environ.get('wechat_msg', 'Welcome to follow my wechat')
46+
'wechat_msg': os.environ.get('wechat_msg', 'Welcome to follow my wechat'),
47+
'wechat_image_url': os.environ.get('wechat_image_url') or 'http://7tsygu.com1.z0.glb.clouddn.com/gevin-view.jpg?imageView/2/w/150',
48+
'wechat_title': os.environ.get('wechat_title', 'GevinView'),
4749
},
4850
'copyright': {
4951
'display_copyright': os.environ.get('allow_display_copyright', 'true').lower() == 'true',

app/main/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ def post_detail(slug, post_type='post', fix=False, is_preview=False):
172172

173173
data['display_wechat'] = OctBlogSettings['wechat']['display_wechat']
174174
data['wechat_msg'] = OctBlogSettings['wechat']['wechat_msg']
175+
data['wechat_image_url'] = OctBlogSettings['wechat']['wechat_image_url']
176+
data['wechat_title'] = OctBlogSettings['wechat']['wechat_title']
175177

176178
data['display_copyright'] = OctBlogSettings['copyright']['display_copyright']
177179
data['copyright_msg'] = OctBlogSettings['copyright']['copyright_msg']

app/templates/main/post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ <h1>{{ post.title }}</h1>
8383
<!-- donate -->
8484
<div class ="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
8585
<p>{{ wechat_msg }} <i class="fa fa-weixin" aria-hidden="true"></i></p>
86-
<img src="http://7tsygu.com1.z0.glb.clouddn.com/gevin-view.jpg?imageView/2/w/150" title="GevinView">
86+
<img src="{{ wechat_image_url }}" title="{{ wechat_title }}">
8787
</div>
8888

8989
</div>

0 commit comments

Comments
 (0)