From eba0a3d562c16c3ae78cd7847835a3bbf86f91f7 Mon Sep 17 00:00:00 2001 From: liangliangyy Date: Tue, 27 Aug 2019 19:25:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Durl=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog/context_processors.py | 1 + templates/blog/tags/sidebar.html | 2 +- templates/share_layout/base.html | 4 ++-- templates/share_layout/nav.html | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/blog/context_processors.py b/blog/context_processors.py index cea83a1..00c8c88 100644 --- a/blog/context_processors.py +++ b/blog/context_processors.py @@ -36,6 +36,7 @@ def seo_processor(requests): 'SITE_SEO_DESCRIPTION': setting.site_seo_description, 'SITE_DESCRIPTION': setting.site_description, 'SITE_KEYWORDS': setting.site_keywords, + 'SITE_BASE_URL': requests.scheme + '://' + requests.get_host() + '/', 'ARTICLE_SUB_LENGTH': setting.article_sub_length, 'nav_category_list': Category.objects.all(), 'nav_pages': Article.objects.filter(type='p', status='p'), diff --git a/templates/blog/tags/sidebar.html b/templates/blog/tags/sidebar.html index f78794f..806a53f 100755 --- a/templates/blog/tags/sidebar.html +++ b/templates/blog/tags/sidebar.html @@ -116,7 +116,7 @@