summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2015-04-13 15:07:49 -0500
committerDan McGee <dan@archlinux.org>2015-04-13 15:07:49 -0500
commit0fd1bc9690ce7b1be70fcc2a3fc845549da7d660 (patch)
treeab909956f817d7ed38d6e29ccc8c785a35db6685 /public
parent73db0d8ac2cd0bb7cf5109e38e2be96d0467d830 (diff)
downloadarchweb-0fd1bc9690ce7b1be70fcc2a3fc845549da7d660.tar.gz
archweb-0fd1bc9690ce7b1be70fcc2a3fc845549da7d660.zip
Add JSON-LD search engine configuration
Implemented as documented here: http://googlewebmastercentral.blogspot.com/2014/09/improved-sitelinks-search-box.html Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'public')
-rw-r--r--public/views.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/public/views.py b/public/views.py
index 7dd0528c..16f5db22 100644
--- a/public/views.py
+++ b/public/views.py
@@ -25,10 +25,12 @@ def index(request):
else:
def updates():
return get_recent_updates()
+ domain = "%s://%s" % (request.scheme, request.META['HTTP_HOST'])
context = {
'news_updates': News.objects.order_by('-postdate', '-id')[:15],
'pkg_updates': updates,
'staff_groups': StaffGroup.objects.all(),
+ 'domain': domain,
}
return render(request, 'public/index.html', context)